计算功率谱密度的方法:-
F = fft (s);
PSD = (1/N) * F * conj(F);
其中“s”是以数组形式提供给我的输入信号。
我也知道采样率(Fs)
。
我想知道归一化因子 "N"
的值应该是多少。
最佳答案
功率谱密度函数有许多不同的定义,相应的比例因子也有不同的可能性。 Numerical recipes in C 的第 13.4 节列出了几个常见的定义,例如:
- defined for discrete positive, zero, and negative frequencies, and its sum over these is the function mean squared amplitude
- defined for zero and discrete positive frequencies only, and its sum over these is the function mean square amplitude
- defined in the Nyquist interval from -fc to fc and its integral over this range is the function mean squared amplitude
- defined from 0 to fc, and its integral over this range is the function mean square amplitude
因此,正确的定义和比例因子将特定于您的应用程序。为了说明这些不同的定义可能对比例因子产生的影响,我在下面列出了一些使用不同定义的具体实现。
自从我提到了《数值食谱》一书后,我们就可以开始查看为展示 PSD 示例实现而选择的定义(并不是说它是正确的定义)。在这种情况下,使用上面列出的第二个定义(即“仅针对零和离散正频率定义,其总和是函数均方振幅”),这导致归一化:
len = length(F);
N = 0.5*len^2;
PSD = (1/N) * F(1:len/2) * conj(F(1:len/2));
Octave's pwelch另一方面使用不同的功率谱密度定义(即上面列出的最后一个),这导致不同的归一化近似为:
len = length(F);
N = 0.5*len*Fs; % where Fs is the sampling rate
PSD = (1/N) * F(1:len/2) * conj(F(1:len/2));
关于signal-processing - 计算功率谱密度时归一化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31153563/