Why is the example of using an FFT to get a frequency spectrum scaled the way it is?

2 views (last 30 days)
Tech Note 1702 shows how one can use a FFT to get a simple spectral analysis plot.
I understand the section about dropping half the FFT and scaling the rest up by a factor of two, but I don't understand why the FFT is divided by the length of the unpadded signal:
mx = abs(fftx)/length(x);
as opposed to the padded signal, or some other choice.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
In this Tech Note's example, the FFT of the padded signal is used to estimate properties of the unpadded signal. This is reasonable with the assumption that the unpadded signal, "x", is sampled from a continuous signal.
The normalization step in question has an effect on what properties of the unpadded signal are preserved in the in the power spectrum of the padded signal.
For instance, when "mx" is normalized by the length of the original signal:
mx = abs(fftx)/length(x);
then the DC component of original signal:
DC1 = sum(x)/length(x);
is accurately represented by the power spectrum:
DC2 = mx(1);
On the other hand, when "mx" is normalized in a different way:
mx = abs(fftx)/sqrt(nfft*length(x));
the power in the original signal:
P1 = sum(x.^2)/length(x);
is accurately represented by the power spectrum:
P2 = sum(mx);
Neither of these choices for normalization allow both the DC component and power of the original signal to be captured by the calculated power spectrum. This sort of trade-off has lead to the development of other, more complicated, ways of estimating power spectrums.
The attached files illustrate the two approaches above. The logic follows that of Tech Note 1702, with the exception that "x" is defined differently:
x = ones(size(t));
to make this trade-off more clear.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!