我在 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