Why is the example of using an FFT to get a frequency spectrum scaled the way it is?
5 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
MathWorks Support Team
2009-6-27
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.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!