You are on page 1of 2

Digital IIR Filter Design

The digital IIR filter transfer function we will be designing will be obtained using the following
steps:
1. Start with an analogue lowpass prototype filter with cut-off frequency of 1 rad/sec.
2. Use frequency transformation to transform the analogue lowpass prototype to a lowpass,
highpass, bandpass or bandstop analogue filter with the desired cut-off frequency/frequencies.
3. Use the bilinear or the impulse invariance transformation to transform the analogue filter to its
approximate IIR digital filter.
Eliminate all frequencies that are higher than 100 Hz from the incoming signal x(t). If the
sampling frequency is 1000 Hz, design a digital low pass IIR (Infinite Impulse Response) filter
to accomplish this task.
The cut-off frequency, Wc, of the equivalent analogue low pass filter needed is 200 rad/sec.
clc;
for n=2:4:6;
[zs, ps, ks]=buttap(n);
[nums, dens]=zp2tf(zs,ps,ks);
[nums, dens]=lp2lp(nums, dens, 200*pi);
%Bilinear transform
fs=1000;
[numzb, denzb]=bilinear(nums, dens, fs)
%Impulse Invariance method
[numzi, denzi]=impinvar(nums, dens, fs)
[Hb, fb]=freqz(numzb, denzb);
[Hi, fi]=freqz(numzi, denzi);
subplot(2,1,1);
plot(fb/pi, abs(Hb));
hold on;
axis([0 1 0 1]);
title('The Magnitude response using the Bilinear transform');
subplot(2,1,2);
plot(fi/pi, abs(Hi));
hold on;
end
title('The Magnitude response using the Invariance transform');
xlabel('frequency in pi units');
axis([0 1 0 1]);

Exercise:
Consider the input continuous signal
x ( t )=5+cos ( 20 t)
Design a digital second order IIR lowpass Butterworth filter to attenuate the cos(20t) term and
pass the dc 5 term.

You might also like