FFT的功率谱密度 [英] Power spectral density of FFT

查看:635
本文介绍了FFT的功率谱密度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一段代码可以获取部分信号的FFT,现在我正在尝试获取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))))))

根据我的理解,为了获得PSD,我只需要将sf提高到2的幂,或者还有什么需要执行的?

解决方案

从技术上讲,您可以通过获取FFT的平方幅度来获得周期信号的功率谱密度(PSD).请注意,如果要以对数分贝标度进行绘制,则20*log10(abs(sf))10*log10(abs(sf).^2)之间确实没有区别.

然而,从某种意义上说,以这种方式计算出的PSD估计值往往具有相当大的方差,在这点上还有更多的选择.有许多技术可用于改进估算.一个简单的步骤包括对数据段应用窗口,执行FFT,然后平均结果PSD(即均方根值).

I have a piece of code that gets the FFT of a part of the signal and I'm 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))))))

From my understanding, in order to get the PSD I just need to raise sf to the power of 2, or is there anything more I need to perform?

解决方案

Technically yes, you can obtain the power-spectral density (PSD) of a periodic signal by taking the squared-magnitude of its FFT. Note that if you are going to plot it on a logarithmic decibel scale, there is really no difference between 20*log10(abs(sf)) or 10*log10(abs(sf).^2).

There is however generally more to it in the sense that the PSD estimate computed in this way tends to have a fairly large variance. There are a number of techniques which can be used to improve the estimate. A simple one consists of applying a window to sections of data, perform the FFT, then averaging the resulting PSDs (i.e. averaging the squared-magnitudes).

这篇关于FFT的功率谱密度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆