为什么陷波滤波器不能消除信号的开始?

时间:2015-12-31 07:41:40

标签: python-2.7 filter scipy signals

我使用陷波滤波器去除正弦(频率= 1KHZ),但看起来信号开头有问题。

filter signal

#1kHZ   fs=44100
l = np.cos(2*1000.0*np.pi/44100.0 )  
r = 0.999  
#Notch Filter
b=[1, -2*l, 1]
a=[1, -2*l*r, r*r]
#Get data from wav file
data, f, n = _wave_get_data("C:/SourceCode/Auana-P/sine/SINE_02.wav")
#filter
zi = signal.lfilter_zi(b, a)
y,zf=signal.lfilter(b, a, data[0], zi=zi)
#plot
n = len(y)
x = np.arange(0, n)
pl.plot(x,y)
pl.show()

0 个答案:

没有答案