一、目的和要求
1)学习用MATLAB实现IIR滤波器的设计。 二、实验内容
1)设计一个低通巴特沃斯模拟滤波器,以满足 :通带截止频率为100HZ,阻带截止频率为200HZ,通带波汶小于3dB,阻带不大于为30dB(采样频率设为1000HZ) wp=100;ws=200;rp=3;rs=30;fs=1000; wp1=wp/fs*2;ws1=ws/fs*2; [N,Wn]=buttord(wp1,ws1,rp,rs); [b,a]=butter(N,Wn); freqz(b,a,512,fs);
5001000Magnitude (dB)-50-100-150-200-250-3000100200300Frequency (Hz)400500Magnitude (dB)-100-200-300-4000200400600Frequency (Hz)800100000-100Phase (degrees)-200-300-400Phase (degrees)-200-400-600-800-50002000100200300Frequency (Hz)400500400600Frequency (Hz)8001000 2)设计一个高通巴特沃斯模拟滤波器,以满足 :通带范围为600~1000HZ,阻带截止频率分别为400HZ,通带波汶小于3dB,阻带不大于为30dB(采样频率设为2000HZ)
wp=600;ws=400;rp=3;rs=30;fs=2000; wp1=wp/fs*2;ws1=ws/fs*2; [N,Wn]=buttord(wp1,ws1,rp,rs); [b,a]=butter(N,Wn,’high’); freqz(b,a,512,fs);
3)设计一个带通巴特沃斯模拟滤波器,以满足 :通带范围为100~250HZ,阻带截止频率分别为50HZ、300HZ,通带波汶小于3dB,阻带不大于为30dB(采样频率设为1000HZ)
wp=[100 250];ws=[50 300];rp=3;rs=30;fs=1000; wp1=wp/fs*2;ws1=ws/fs*2; [N,Wn]=buttord(wp1,ws1,rp,rs); [b,a]=butter(N,Wn); freqz(b,a,512,fs);
10010000Magnitude (dB)Magnitude (dB)-100-200-300-100-200-300-400-4000100200300Frequency (Hz)4005000100200300Frequency (Hz)4005005000-500-1000-15000-200Phase (degrees)Phase (degrees)-400-600-800-1000-12000100200300Frequency (Hz)4005000100200300Frequency (Hz)400500 4)设计一个带阻巴特沃斯模拟滤波器,以满足 :通带截止频率为100HZ、350HZ,阻带截止频率分别为150HZ、300HZ,通带波汶小于3dB,阻带不大于为30dB(采样频率设为1000HZ)
wp=[100 350];ws=[150 300];rp=3;rs=30;fs=1000; wp1=wp/fs*2;ws1=ws/fs*2; [N,Wn]=buttord(wp1,ws1,rp,rs); [b,a]=butter(N,Wn,'stop'); freqz(b,a,512,fs);
5)用一个低通巴特沃模拟滤波器原型设计一低通数字滤波器(脉冲响应不变、双线性变换),以满足(T=1) :
wp=0.2*pi;ws=0.3*pi;rp=1;rs=15;T=1; [N,Wn]=buttord(wp1,ws1,rp,rs); [b,a]=butter(N,Wn); [bz1,az1]=impinvar(b,a,T) figure(1);
freqz(bz1,az1,512) figure(2);
[bz2,az2]=bilinear(b,a,T) freqz(bz2,az2,512)
因篇幅问题不能全部显示,请点此查看更多更全内容