3.1所示。Р图3.1 语音信号时域和频谱图Р3.2.2 IIR数字滤波器的设计Р下面分别用巴特沃思数字滤波器(低通、带通、高通)对被噪声污染后的信号进行滤波。Р3.2.2.1巴特沃思低通滤波器Р(1)添加高频的噪声信号zs=0.05*cos(2*pi*10000*t/22050),MATLAB程序如下。噪声信号的时域及幅频图如图3.2所示。Р %噪声信号Рzt=0:length(x)-1;Рzs=0.05*cos(2*pi*10000*t/22050);Рzs0=0.05*cos(2*pi*10000*t/22050000);Рfigure(2);Рsubplot(2,1,1)Рplot(zs0)Рtitle('噪声信号波形');Рzs1=fft(zs,1200);Р%sound(zs,FS,bits); %回放噪音Рsubplot(2,1,2)Рplot(f(1:600),abs(zs1(1:600)));Рtitle('噪声信号频谱'); Р图3.2噪声信号时域和频谱图Р(2)设计巴特沃思低通滤波器,MATLAB程序如下。滤波器图如图3.3所示。Р%低通滤波Рfp=3000;fs=3500;Fs=22050;Рrp=1;rs=10;Рwp=2*pi*fp/Fs;Рws=2*pi*fs/Fs;РFs1=1;Рwap=2*tan(wp/2);Рwas=2*tan(ws/2);Р[N,wc]=buttord(wap,was,rp,rs,'s');Р[B,A]=butter(N,wc,'s');Р[Bz,Az]=bilinear(B,A,Fs1);Рfigure(4);Р[h,w]=freqz(Bz,Az,512,Fs1*22050);Рplot(w,abs(h));Рtitle('巴特沃斯低通滤波器');Рxlabel('频率(HZ)');ylabel('耗损(dB)');