Forums

Comparing input and output of multirate system

Started by pompano April 14, 2008
I have designed a front end to a com system (in Matlab) that takes an input
IF, does Fs/4 down conversion, and then then down-samples by a variable
amount through a series of halfbands.  A sharp FIR filter is then applied
to get the desired signal. 

I've been asked to show a nice plot with the original and the output
spectrums overlayed, but I'm having a little trouble with this.  I take
appropriate length FFT's of both signals such that the bin size is the
same.  Then shift the plot so they line up but it doesn't look so good.  I
this a feasible way to display the results, or should I stick to
analytically proving the filters are suitable?  

Thanks, 
Joe
"pompano" <petrone3000@gmail.com> wrote in message 
news:iIWdnU44Ochx757VnZ2dnUVZ_j2dnZ2d@giganews.com...
>I have designed a front end to a com system (in Matlab) that takes an input > IF, does Fs/4 down conversion, and then then down-samples by a variable > amount through a series of halfbands. A sharp FIR filter is then applied > to get the desired signal. > > I've been asked to show a nice plot with the original and the output > spectrums overlayed, but I'm having a little trouble with this. I take > appropriate length FFT's of both signals such that the bin size is the > same. Then shift the plot so they line up but it doesn't look so good. I > this a feasible way to display the results, or should I stick to > analytically proving the filters are suitable? > > Thanks, > Joe
Joe, You might be kind enough to define: "nice plot" and "doesn't look so good". I don't see any obvious issues on the face of it. That is as long as you're only looking at one side of the spectrum. If you're looking at both sides then you have to do some cutting to make the overlap work. By "one side" I mean everything from zero to fs/2 and nothing from fs/2 to fs. Fred
On Apr 14, 11:06&#2013266080;am, "pompano" <petrone3...@gmail.com> wrote:
> I have designed a front end to a com system (in Matlab) that takes an input > IF, does Fs/4 down conversion, and then then down-samples by a variable > amount through a series of halfbands. &#2013266080;A sharp FIR filter is then applied > to get the desired signal. > > I've been asked to show a nice plot with the original and the output > spectrums overlayed, but I'm having a little trouble with this. &#2013266080;I take > appropriate length FFT's of both signals such that the bin size is the > same. &#2013266080;Then shift the plot so they line up but it doesn't look so good. &#2013266080;I > this a feasible way to display the results, or should I stick to > analytically proving the filters are suitable? &#2013266080; > > Thanks, > Joe
Joe, You might try doing the inverse of your processing with filters that are as close to ideal as possible, and reverse the mixing to reconstruct the high rate input signal from what you are outputting at the lower rate. Done right, with an appropriate input signal(s) this can show what part of the input was saved in the processing. Dirk
pompano wrote:
> I have designed a front end to a com system (in Matlab) that takes an input > IF, does Fs/4 down conversion, and then then down-samples by a variable > amount through a series of halfbands. A sharp FIR filter is then applied > to get the desired signal. > > I've been asked to show a nice plot with the original and the output > spectrums overlayed, but I'm having a little trouble with this. I take > appropriate length FFT's of both signals such that the bin size is the > same. Then shift the plot so they line up but it doesn't look so good. I > this a feasible way to display the results, or should I stick to > analytically proving the filters are suitable? > > Thanks, > Joe
What is the point of the plot? To give confidence in the theory, it should be enough to work through the analysis to prove the filters are suitable. To give confidence to the implementation, then your signal in/signal out approach is correct. I would be tempted to fake up an input signal with a perfect unity amplitude and completely random phase -- this way the amplitude plot of the output would immediately show up as correct or not. I'd also at least spot-check the thing with some pure sinusoidal tones in, while looking for _both_ the expected pure sinusoid on the output _and_ any excess energy which would indicate aliasing. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
>pompano wrote: >> I have designed a front end to a com system (in Matlab) that takes an
input
>> IF, does Fs/4 down conversion, and then then down-samples by a
variable
>> amount through a series of halfbands. A sharp FIR filter is then
applied
>> to get the desired signal. >> >> I've been asked to show a nice plot with the original and the output >> spectrums overlayed, but I'm having a little trouble with this. I
take
>> appropriate length FFT's of both signals such that the bin size is the >> same. Then shift the plot so they line up but it doesn't look so good.
I
>> this a feasible way to display the results, or should I stick to >> analytically proving the filters are suitable? >> >> Thanks, >> Joe > >What is the point of the plot? To give confidence in the theory, it >should be enough to work through the analysis to prove the filters are >suitable. To give confidence to the implementation, then your signal >in/signal out approach is correct. > >I would be tempted to fake up an input signal with a perfect unity >amplitude and completely random phase -- this way the amplitude plot of >the output would immediately show up as correct or not. I'd also at >least spot-check the thing with some pure sinusoidal tones in, while >looking for _both_ the expected pure sinusoid on the output _and_ any >excess energy which would indicate aliasing. > >-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com > >Do you need to implement control loops in software? >"Applied Control Theory for Embedded Systems" gives you just what it
says.
>See details at http://www.wescottdesign.com/actfes/actfes.html >
Thank you all for the responses. I asked the question because my results after trying "didn't look so good", by which I mean there was a definite distortion in the output. I really just wanted a sanity check that what I was trying to do would work. I'm doing this to give confidence in the theory to someone who is an EE but not a DSP expert - and in doing so I did find a bug in my implementation. This bug as well as neglecting to account for some zero padding that I added at one stage are what caused the distortion I was seeing. It is working much better now. Thanks again, Joe