Professional Documents
Culture Documents
Similar to FIR digital filter design, the IIR digital filter design consists of two steps. In
the first step, the filter order N is estimated from the given specifications. In the second
step, the coefficients of the transfer function are determined using the estimated order and
the filter specifications.
Order Estimation
The figure below shows the typical magnitude specifications for a digital lowpass filter.
The peak passband ripple 𝛼! and the minimum stopband attenuation 𝛼" are given in dB;
that is, the loss specifications of a digital filter are given by
𝛼! = −20𝑙𝑜𝑔#$ (1 − 𝛿! ) dB,
𝛼" = −20𝑙𝑜𝑔#$ (𝛿" ) dB.
For the filter estimation of the IIR digital filter to be designed using the bilinear
transformation method, the functions to use are as follows: buttord for the Butterworth
filters, cheb1ord for the Type 1 Chebyshev filters, cheb2ord for the Type 2 Chebyshev
filters, and ellipord for the elliptic filters.
The normalized passband edge is 1000 Hz / (4000 Hz/2) = 0.5 and the normalized
stopband edge is 600 Hz / (4000 Hz/2) = 0.3. Using the function cheb2ord
What’s the resulting value for N? How would you compare the result if you used the FIR
function kaiserord?
Ex 2. Determine the minimum order of an elliptic bandpass filter operating at a sampling
rate of 1600 Hz with the following specifications: passband edges at 200 Hz and 280 Hz,
stopband edges at 160 Hz and 300 Hz, passband ripple of 0.1 dB, and minimum stopband
edge of 70 dB.
For IIR filter design based on the bilinear transformation, MATLAB/Octave includes
functions for each one of the four magnitude approximation techniques. Specifically, the
following M-files are available: butter for the design of butterworth filters, cheby1 for
the design of Type 1 Chebyshev filters, cheby2 for the design of Type 2 Chebyshev
filters, and ellip for the design of elliptic filters. The output could be either the numerator
and denominator coefficient vectors or the vectors of zeros, the vector of poles, and the
scalar gain factor. The numerator and denominator coefficients of the transfer function
can be determined from the latter data using the function zp2tf. After the transfer function
has been computed, the frequency response can be computed using the function freqz.
Ex 3. Determine the transfer function and plot the gain response of an elliptic IIR lowpass
filter with the following specifications: passband edge at 800 Hz, stopband edge at 1000
Hz, passband ripple of 0.5 dB, minimum stopband attenuation of 40 dB, and sampling
rate of 4000 Hz.
Wp = 800/2000; Ws = 1000/2000;
Rp = 0.5; Rs = 40;
[n,Wp] = ellipord(Wp,Ws,Rp,Rs) % Gives mimimum order of filter
[b,a] = ellip(n,Rp,Rs,Wp); % Elliptic filter design
freqz(b,a,512,4000) %plot frequency response
Other types of digital filters can be designed by simple modifications of the filter
functions.
Ex 4. Design a Type 1 Chebyshev IIR highpass filter. The specifications of the highpass
filters are as follows: passband edge at 700 Hz, stopband edge at 500 Hz, passband ripple
of 1 dB, minimum stopband attenuation of 32 dB, and sampling frequency of 2000 Hz.
If your design is correct, the magnitude response of the filter should look like the figure
below.
Type I Chebyshev Highpass Filter
0
X: 0.7031
Y: −0.6847
−50
−100
Gain, dB
−150
−200
−250
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
ω/π
If your design is correct, the magnitude response of the filter should look like the figure
below.
IIR Butterworth Bandpass Filter
50
0
X: 0.75
Y: −40
−50
−100
Gain, dB
−150
−200
−250
−300
−350
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
ω/π
Challenge: The figure below shows the mapping of DTMF frequencies to the digits.