678 C H A P T E R 11: Introduction to the Design of Discrete Filters
[b,a] = cheby1(lporder,R,wn,‘stop’); % stopband
end
[H,w] = freqz(b,a,256);
end
To illustrate the design of filters other than low-pass filters, consider the design of a Butterworth and
Chebyshev band-pass and band-stop filter of orderN=30 and half-power frequencies [0.4π, 0.6π].
The following script is the design, which is shown in Figure 11.19.
FIGURE 11.19
(a) Band-Stop Butterworth and (b)
Chebyshev filters: (clockwise for each
side from top left) poles and zeros,
magnitude, phase frequency responses,
and loss. (b)
(a)
− 1 01
− 1
−0.5
0
0.5
1
Real part
Imaginary part
0 0.2 0.4 0.6 0.8
0
50
100
150
200
Loss (dB)
ω/π
Real part
Imaginary part
Loss (dB)
ω/π
− 1
−0.5
0
0.5
1
600
400
200
0
− 1 01
0 0.2 0.4 0.6 0.8
0 0.2 0.4 0.6 0.8
0
0.2
0.4
0.6
0.8
1
Magnitude
ω/π
0 0.2 0.4 0.6 0.8
− 30
− 20
− 10
0
Phase (rad)
ω/π
Magnitude
ω/π
Phase (rad)
ω/π
0
0.5
1
− 30
− 40
− 50
− 20
− 10
0
0 0.2 0.4 0.6 0.8
0 0.2 0.4 0.6 0.8