【问题标题】:How to reduce the cut-off frquency of a digital filter?如何降低数字滤波器的截止频率?
【发布时间】:2018-07-26 03:56:37
【问题描述】:

我在 python 中创建了一个低通巴特沃斯滤波器。有什么办法可以将截止频率降低到毫赫兹范围?甚至可能吗?下面是我使用的代码。

def butter_bandpass(cutoff_freq, fs, order=5):
   nyq = 0.5 * fs
   cutoff_freq = cutoff_freq / nyq
   b, a = butter(order, cutoff_freq, btype='low')
   w, h = freqz(b, a)
   return b, a

def butter_bandpass_filter(data, time, cutoff_freq, fs, flag, order=5):
   b, a = butter_bandpass(cutoff_freq, fs, order=order)
   #zi = lfilter_zi(b, a)
   y = lfilter(b, a, np.array(data))
   return y

【问题讨论】:

    标签: filter signals signal-processing lowpass-filter butterworth


    【解决方案1】:

    如果截止频率太小到 Fs 的一小部分,5 阶滤波器将在数值上变得不稳定(舍入“错误”会产生 NaN)。尝试通过对数据进行极端下采样来降低采样率 Fs。

    【讨论】:

      猜你喜欢
      • 2017-09-22
      • 2012-08-19
      • 2012-09-02
      • 2019-02-23
      • 1970-01-01
      • 2014-08-29
      • 2013-08-22
      • 1970-01-01
      • 2013-10-29
      相关资源
      最近更新 更多