power spectral density of fft

3 ビュー (過去 30 日間)
Fragkos Maragkou
Fragkos Maragkou 2014 年 7 月 27 日
回答済み: Daniel kiracofe 2014 年 7 月 28 日
hello guys, i have a piece of code that gets the fft of a part of the signal and i am now trying to get the PSD.
Fs = 44100; cj = sqrt(-1); %T=.6; dt = 1/Fs; left=test(:,1); right=test(:,2); time = 45; interval =.636; w_range = time*Fs: (time+interval)*Fs-1; I = left(w_range); Q = right(w_range); n = interval * Fs; f = -Fs/2:Fs/n:Fs/2-Fs/n;
s = I+cj.*Q;
% Smooth the signal ss = smooth(s,201);
sf = (fftshift(fft(ss(1:n)))); %FFT of signal
figure(1) plot(f,((20*log10((abs(sf))./max(abs(sf))))))
so now i was wondering from my understanding in order to get the PSD i just need to raise sf to the power of two or is there more things i need to perform?
Thanks in advance

採用された回答

Daniel kiracofe
Daniel kiracofe 2014 年 7 月 28 日
well, in some sense, you can never really "get" the PSD of anything. you can only estimate it. And yes, the fft magnitude squared is an estimator of the PSD. This is referred to as the periodogram. However, it is not a very good estimator. A better estimator would be to use the pwelch() function. I some tutorial on PSD here http://www.mechanicalvibration.com/Introduction_power_spectral.html that may help you.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by