power spectral density of fft

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Parametric Spectral Estimation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by