DSPRelated.com
Forums

FFT questions

Started by Greg Aagard July 2, 2003
I haven't done fourier stuff for a while, and I had a couple of
questions.

I'm trying to get the frequency spectrum of a time-sampled signal by
using the FFT function in Matlab.  I get rid of the redundant half of
the output and scale the frequency axis so that it goes from 0 to the
Nyquist frequency (half of 1/T).  I'm pretty sure I'm doing that part
correctly.  I next divide the output by the length of the FFT.  Is
this correct?  I'm trying to get the same result that I would get if I
could take the continuous-time fourier transform of the original time
dependant signal function.

I also had a question about units.  Some of the plots I have seen have
units like amps/MHz on the vertical axis while others just say amps. 
I know that /Hz is generally implied on the vertical axis of a
spectrum.  Does /MHz mean that the output has been multiplied by 10^6,
or is there some other meaning?

These are probably pretty basic questions, I would appreciate any help
anyone could give me.

Thanks,
Greg.
"Greg Aagard" <gja@cc.usu.edu> wrote in message
news:374a78f3.0307021546.733bc0f7@posting.google.com...
> I haven't done fourier stuff for a while, and I had a couple of > questions. > > I'm trying to get the frequency spectrum of a time-sampled signal by > using the FFT function in Matlab. I get rid of the redundant half of > the output and scale the frequency axis so that it goes from 0 to the > Nyquist frequency (half of 1/T). I'm pretty sure I'm doing that part > correctly. I next divide the output by the length of the FFT. Is > this correct? I'm trying to get the same result that I would get if I > could take the continuous-time fourier transform of the original time > dependant signal function. > > I also had a question about units. Some of the plots I have seen have > units like amps/MHz on the vertical axis while others just say amps. > I know that /Hz is generally implied on the vertical axis of a > spectrum. Does /MHz mean that the output has been multiplied by 10^6, > or is there some other meaning? > > These are probably pretty basic questions, I would appreciate any help > anyone could give me. >
Greg, There have been lots of threads here on scaling of the FFT. So, rather than repeat an old discussion / argument, I will simply say that one common method is to *not* scale the FFT and to scale the IFFT by 1/N where N is the number of samples. One convention (the one that I like) is to expect the zeroeth coefficient out of the FFT to represent the "DC" value or average of the input to the transform. This will also represent the gain of a FIR filter should you transform its coefficients. Then, if you scale by 1/N on the inverse transform, you will get the signal back, etc. As far as scaling on the vertical axis: amps, volts, whatevers indicate a particular unit of measure - that is all. They can be made to match the input units. The per MHz or whatever is a little trickier. Generally the approach is used with noise more often and the appropriate scale is units squared per Hz. This is because noise power is what's being measured so the output is either units squared per Hz or units per square root Hz - which is obtained by simply taking the square root of the value and applying the appropriate bandwidth factor. Somewhere I posted about this in the last few months. Fred