11.4 IIR Filter Design 663
%%%%%%%%%%%%%%%%
% Example 11.7
%%%%%%%%%%%%%%%%
% LP Butterworth
alphamax = 2; alphamin = 9; % loss specifications
wp = 0.47;ws = 0.6; % passband and stopband frequencies
[N,wh] = buttord(wp,ws,alphamax,alphamin) % minimal order, half-power frequency
[b,a] = butter(N,wh); % coefficients of designed filter
[H,w] = freqz(b,a);w = w/pi;N = length(H); % frequency response
spec1 = alphamax∗ones(1,N); spec2 = alphamin∗ones(1,N); % specification lines
hpf = 3.01∗ones(1,N); % half-power frequency line
disp(‘poles’) % display poles
roots(a)
disp(‘zeros’) % display zeros
roots(b)
alpha = -20∗log10(abs(H)); % loss in dB
The results of the design are shown in Figure 11.13. The order of the designed filter isN=3 and
the half-power frequency isωhp=0.499π. The poles are along the imaginary axis of thez-plane
(Kb= 1 )and there are three zeros atz=−1. The transfer function of the designed filter is
H(z)=
0.166+0.497z−^1 +0.497z−^2 +0.166z−^3
1 −0.006z−^1 +0.333z−^2 −0.001z−^3
Finally, to verify that the specifications are satisfied we plot the loss functionα(ejω)along with three
horizontal lines corresponding toαmax=2 dB, 3 dB for the half-power frequency, andαmin=9 dB.
− 5 0 5
− 1
0
1
3
Real part
Imaginary
part
0 0.1 0.2 0. 30. 40. 50. 60. 70. 80. 9
0
2
4
6
8
10
12
α(
ω
)dB
ω/π
(b)
0 0. 1 0. 2 0. 3 0. 4 0. 5 0. 6 0. 7 0. 8 0. 9
0
0. 5
1
|H
(e
jω
)|
0 0. 1 0. 2 0. 3 0. 4 0. 5 0. 6 0. 7 0. 8 0. 9 1
− 6
− 4
− 2
0
<H
(e
jω
)
ω/π
(a)
FIGURE 11.13
Design of low-pass Butterworth filter using MATLAB: (a) poles and zeros and magnitude and phase responses,
and (b) verification of specifications using loss functionα(ω).