why psd result estimated by fft is related to frequency resolution?
3 ビュー (過去 30 日間)
古いコメントを表示
Here is the code from MATLAB help center.(https://www.mathworks.com/help/signal/ug/power-spectral-density-estimates-using-fft.html)
I only change one parameter T(total time) in the code, when i change T from 1,10,100 to 1000, the final result also change about 10 db/hz. But i don't understand why and how to explain that. will the frequency resolution Fs/n influence the final result?
thanks for your answer! really appreciate it !
rng default
Fs = 1000;
T=1;
t = 0:1/Fs:T-1/Fs;
x = cos(2*pi*100*t) + randn(size(t));
N = length(x);
xdft = fft(x);
xdft = xdft(1:N/2+1);
psdx = (1/(Fs*N)) * abs(xdft).^2;
psdx(2:end-1) = 2*psdx(2:end-1);
freq = 0:Fs/N:Fs/2;
plot(freq,10*log10(psdx))
grid on
title('Periodogram Using FFT')
xlabel('Frequency (Hz)')
ylabel('Power/Frequency (dB/Hz)')
0 件のコメント
回答 (1 件)
Raunak Gupta
2020 年 10 月 2 日
Hi,
The power spectral density estimate shown in each T=1,10,100,1000 is correct as it shows a peak around 100 Hz which exactly represent the frequency present in the signal. Since you are changing T, the length of signal x is changing, and the random noise is getting added which is of different size (If we have different T).
If I see the difference between two values of T it is more towards the –50 to –40 dB side which is very small amplitude value for any signal. This is mainly coming due to small noise variations. If you remove the noise term [randn(size(t))] you will not see any difference between T=1 or T=100.
Also note that we ignore Power/Frequency which is very low (in range of –60 to –70dB/Hz or even lower).
Hope this clarifies!
2 件のコメント
Raunak Gupta
2020 年 10 月 5 日
Hi,
I agree the peak value is changing exactly as you say, that is because the length of signal is changing and since it is periodic signal, power spectral density is scaled up with respect to number of points.
You may refer to the blogs related to fft which nicely mentions the logic behind it.
参考
カテゴリ
Help Center および File Exchange で Parametric Spectral Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!