AIM: To design and implement IIR (LPF/HPF) filters.
Software - MATLAB
Learning Objectives: To make the students familiar with designing concepts of FIR filter
with the use of MATLAB.
The IIR filter can realize both the poles and zeroes of a system because it has a rational
transfer function, described by polynomials in z in both the numerator and the denominator:
M and N are order of the two polynomials.
bk and ak are the filter coefficients. These filter coefficients are generated using FDS (Filter
Design software or Digital Filter design package).
IIR filters can be expanded as infinite impulse response filters. In designing IIR
filters, cutoff frequencies of the filters should be mentioned. The order of the filter
can be estimated using butter worth polynomial. That’s why the filters are named as
butter worth filters. Filter coefficients can be found and the response can be plotted.
% IIR filters LPF & HPF
disp('enter the IIR filter design specifications');
rp=input('enter the passband ripple');
rs=input('enter the stopband ripple');
wp=input('enter the passband freq');
ws=input('enter the stopband freq');
fs=input('enter the sampling freq');
c=input('enter choice of filter 1. LPF 2. HPF \n ');
disp('Frequency response of IIR LPF is:');
disp('Frequency response of IIR HPF is:');
title('magnitude response of IIR filter is:');
xlabel('(a) Normalized freq. -->');
ylabel('Gain in dB-->');
title('phase response of IIR filter is:');
xlabel('(b) Normalized freq. -->');
ylabel('Phase in radians-->');