代码之家  ›  专栏  ›  技术社区  ›  Axel

scipy周期图与自实现功率谱密度的差异

  •  1
  • Axel  · 技术社区  · 6 年前

    this answer . 作为比较,我用了 signal.periodogram scipy中提供的功能:

    from scipy.signal import tukey
    import scipy as sp
    f, Pxx_den = sp.signal.periodogram(a_gtrend_orig,12,window=tukey( len(a_gtrend_orig) ))
    

    但是,当我在自我实现的PSD旁边绘制时,它们看起来有很大的不同:

    Comparison of PSD algorithms

    由于使用了相同的窗口函数,周期图函数也应使用FFT,这种差异从何而来?

    1 回复  |  直到 6 年前
        1
  •  1
  •   DrM    6 年前

    您正在比较的示例是 振幅 在每个频率单元,即abs(fft())

    周期图产生 权力 振幅平方 在每个频率箱。

    标签“窗口psd”是从早期编辑,后来被纠正。