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);
endTo 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.500.51Real partImaginary part0 0.2 0.4 0.6 0.8050100150200Loss (dB)ω/πReal partImaginary partLoss (dB)ω/π− 1−0.500.516004002000− 1 010 0.2 0.4 0.6 0.80 0.2 0.4 0.6 0.800.20.40.60.81Magnitudeω/π0 0.2 0.4 0.6 0.8− 30− 20− 100Phase (rad)ω/πMagnitudeω/πPhase (rad)ω/π00.51− 30
− 40
− 50− 20− 1000 0.2 0.4 0.6 0.80 0.2 0.4 0.6 0.8