数字信号处理实验7
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Laboratory Exercise 7
DIGITAL FILTER DESIGN
7.1 DESIGN OF IIR FILTERS
Project 7.1 Estimation of IIR Filter Order
Answers:
Q7.1The normalized passband edge angular frequency Wp is -0.2
The normalized stopband edge angular frequency Ws is -0.4
The desired passband ripple Rp is -0.5dB
The desired stopband ripple Rs is -40dB
(1) Using these values and buttord we get the lowest order for a Butterworth lowpass filter
to be - 8
The corresponding normalized passband edge frequency Wn is - 0.2469 or 0.2469pi
(2) Using these values and cheb1ord we get the lowest order for a Type 1 Chebyshev
lowpass filter to be -5
The corresponding normalized passband edge frequency Wn is - 0.2000
(3) Using these values and cheb2ord we get the lowest order for a Type 2 Chebyshev
lowpass filter to be -5
[N, Wn] = cheb2ord(0.2,0.4,0.5,40).
The corresponding normalized passband edge frequency Wn is - 0.4000
(4) Using these values and ellipord we get the lowest order for an elliptic lowpass filter to
be – 4
[N, Wn] = ellipord(0.2,0.4,0.5,40).
From the above results we observe that the Elliptic filter has the lowest order meeting the
specifications.
Q7.2The normalized passband edge angular frequency Wp is - 0.6000
The normalized stopband edge angular frequency Ws is - 0.3429
The desired passband ripple Rp is -1dB
The desired stopband ripple Rs is -50dB
(1) Using these values and buttord we get the lowest order for a Butterworth highpass filter
to be -8
[N, Wn] = buttord(Wp,Ws,Rp,Rs).
The corresponding normalized passband edge frequency Wn is - 0.5647
(2) Using these values and cheb1ord we get the lowest order for a Type 1 Chebyshev
highpass filter to be – 5
[N,Wn] = cheb1ord(Wp,Ws,Rp,Rs).
The corresponding normalized passband edge frequency Wn is - 0.6000
(3) Using these values and cheb2ord we get the lowest order for a Type 2 Chebyshev
highpass filter to be -5
[N,Wn] = cheb2ord(Wp,Ws,Rp,Rs).
The corresponding normalized passband edge frequency Wn is – 0.3429
(4) Using these values and ellipord we get the lowest order for an elliptic highpass filter to
be -4
[N,Wn] = ellipord(Wp,Ws,Rp,Rs).
The corresponding normalized passband edge frequency Wn is –Wn = 0.6000,
From the above results we observe that the Elliptic filter has the lowest order meeting the
specifications.
Project 7.2 IIR Filter Design
A copy of Program P7_1 is given below:
%程序p7.1
%巴特沃斯带阻滤波器的设计
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');
%显示传输函数
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('巴特沃斯带阻滤波器的设计');
Answers:
Q7.5The coefficients of the Butterworth bandstop transfer function generated by running Program P7_1 are as follows:
分子系数是
Columns 1 through 6
0.0330 0.0000 0.2972 0.0000 1.1889 0.0000
Columns 7 through 12
2.7741 0.0000 4.1611 0.0001 4.1611 0.0000