1、实验七数字滤波器设计Q7.1 用MATLAB确定一个数字无限冲激响应低通滤波器所有四种类型的最低阶数。指标如下:40kHz的抽样率,4kHz的通带边界频率,8kHz的阻带边界频率,0.5dB的通带波纹,40dB的最小阻带衰减。评论你的结果。N1,wn1=buttord(4000*2*pi/40000,8000*2*pi/40000,0.5,40,s)N2,wn2=cheb1ord(4000*2*pi/40000,8000*2*pi/40000,0.5,40,s)N3,wn3=cheb2ord(4000*2*pi/40000,8000*2*pi/40000,0.5,40,s)N4,wn4=ell
2、ipord(4000*2*pi/40000,8000*2*pi/40000,0.5,40,s)结果:N1 = 9wn1 = 0.7533N2 = 5wn2 = 0.6283N3 = 5wn3 = 1.2069N4 = 4wn4 =0.6283Q7.2 用MATLAB确定一个数字无限冲激响应低通滤波器所有四种类型的最低阶数。指标如下:3500Hz的抽样率,1050Hz的通带边界频率,600Hz的阻带边界频率,1dB的通带波纹,50dB的最小阻带衰减。评论你的结果。N1,wn1=buttord(1050*2*pi/3500,600*2*pi/3500,1,50,s)N2,wn2=cheb1ord(
3、1050*2*pi/3500,600*2*pi/3500,1,50,s)N3,wn3=cheb2ord(1050*2*pi/3500,600*2*pi/3500,1,50,s)N4,wn4=ellipord(1050*2*pi/3500,600*2*pi/3500,1,50,s)结果:N1 = 12wn1 = 1.7402N2 = 7wn2 = 1.8850N3 = 7wn3 = 1.2049N4 = 5wn4 =1.8850%程序P7.1%巴特沃兹带阻滤波器的设计Ws=0.4 0.6;Wp=0.2 0.8;Rp=0.4;Rs=50;%估计滤波器阶数N1,Wn1=buttord(Wp,Ws,R
4、p,Rs); %设计滤波器num,den=butter(N1,Wn1,stop); %显示传输函数disp(分子系数是);disp(num);disp(分母系数是);disp(den);%计算增益响应g,w=gain(num,den); %绘制增益响应plot(w/pi,g);grid axis(0 1 -60 5);xlabel(omega /pi); ylabel(增益,dB);title(巴特沃兹带阻滤波器的增益响应);Q7.5 通过运行程序P7.1来设计巴特沃兹带阻滤波器。写出所产生的传输函数的准确表达式。滤波器的指标是什么?你的设计符合指标吗?使用MATLAB,计算并绘制滤波器的未畸
5、变的相位响应及群延迟响应。N1 = 9Wn1 = 0.3243 0.6757分子系数是 Columns 1 through 7 0.0330 0.0000 0.2972 0.0000 1.1889 0.0000 2.7741 Columns 8 through 14 0.0000 4.1611 0.0001 4.1611 0.0000 2.7741 0.0000 Columns 15 through 19 1.1889 0.0000 0.2972 0.0000 0.0330分母系数是 Columns 1 through 7 1.0000 0.0000 2.6621 0.0000 4.1451
6、0.0001 4.1273 Columns 8 through 14 0.0001 2.8977 0.0000 1.4381 0.0000 0.5027 0.0000 Columns 15 through 190.1178 0.0000 0.0167 0.0000 0.0011Q7.6 修改程序P7.1来设计符合习题Q7.1所给指标的切比雪夫1型低通滤波器。写出所产生的传输函数的准确表达式。你的设计符合指标吗?使用MATLAB,计算并绘制滤波器的未畸变的相位响应及群延迟响应。Ws =0.4 0.6;Wp=0.3 0.7;Rp=0.4;Rs=50;N1,Wn1 = buttord(Wp,Ws,Rp,Rs)num,den=butter(N1,Wn1,stop);h,w1=grpdelay(num,den);H,w=freqz(num,den);p=angle(H);figure;plot(w1/pi,p);gridylabel(相位);xlabel(频率/);title(传输函数的相位响应); figure;plot(w1/pi,h);gridylabel(群延迟);xlabel(频率/);title(传输函数的群延迟); N1 = 9Wn1 = 0.3243 0.6757