Dsplii 7
Dsplii 7
Department of Communications Engineering.
Optical Communications Systems Engineering.
1
Digital Signal Processing Laboratory II Exp.No.7: Implementation of IIR band-pass Filter
▪ Aim
To implement IIR band-pass filter for a different type of IIR filter.
▪ Theory
The classical IIR filters - Butterworth, Chebyshev Types I and II, elliptic, and Bessel, all
approximate the ideal “brick wall" filter in different ways. The Signal Processing Toolbox
in MATLAB provides functions to create all these types of IIR filters in both the analog
and digital domains and in lowpass, high-pass, bandpass, and band-stop configurations.
For most filter types, you can also find the lowest filter order that fits a given filter
specification in terms of passband ripple, stopband attenuation, and the transition band
widths. Figure 1 shows the amplitude response requirements for the bandpass IIR filter.
Figure (1): General amplitude response requirements for the bandpass IIR filter types.
Page | 2
Digital Signal Processing Laboratory II Exp.No.7: Implementation of IIR band-pass Filter
3. Ast2: Attenuation in the second stop band in decibels (the default units). Also called
Astop2.
4. BWp: Bandwidth of the filter passband. Specified in normalized frequency units.
5. BWst: Bandwidth of the filter stopband. Specified in normalized frequency units.
6. C: Constrained band flag. This enables you to specify passband ripple or stopband
attenuation for fixed-order designs in one or two of the three bands.
1. F3dB1: cutoff frequency for the point 3 dB point below the passband value for the first
cutoff. Specified in normalized frequency units. (IIR filters)
2. F3dB2: cutoff frequency for the point 3 dB point below the passband value for the
second cutoff. Specified in normalized frequency units. (IIR filters)
3. Fc1: cutoff frequency for the point 6 dB point below the passband value for the first
cutoff. Specified in normalized frequency units. (FIR filters)
4. Fc2: cutoff frequency for the point 6 dB point below the passband value for the second
cutoff. Specified in normalized frequency units. (FIR filters)
5. Fp1: frequency at the edge of the start of the pass band. Specified in normalized
frequency units. Also called Fpass1.
6. Fp2: frequency at the edge of the end of the pass band. Specified in normalized
frequency units. Also called Fpass2.
7. Fst: frequency at the edge of the start of the first stop band. Specified in normalized
frequency units. Also called Fstop1.
8. Fst2: frequency at the edge of the start of the second stop band. Specified in normalized
frequency units. Also called Fstop2.
9. N: filter order for FIR filters. Or both the numerator and denominator orders for IIR
filters when na and nb are not provided.
10.Na: denominator order for IIR filters.
11.Nb: numerator order for IIR filters.
Page | 3
Digital Signal Processing Laboratory II Exp.No.7: Implementation of IIR band-pass Filter
Graphically, the filter specifications look similar to those shown in the following figure.
d = fdesign.bandpass('Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2', .35,.45,.55,.65,60,1,60);
Hbutter = design(d,'butter','SystemObject',true);
Hcheby1 = design(d,'cheby1','SystemObject',true);
Hcheby2 = design(d,'cheby2','SystemObject',true);
Hellip = design(d,'ellip','SystemObject',true);
hfvt = fvtool(Hbutter,Hcheby1,Hcheby2,Hellip, 'DesignMask', 'on',...
'Color','white');
axis([0 1 -70 2])
legend(hfvt, 'Butterworth','Chebyshev Type I','Chebyshev Type II','Elliptic', 'Location', 'Northwest')
Page | 4
Digital Signal Processing Laboratory II Exp.No.7: Implementation of IIR band-pass Filter
▪ Procedure
1. Open the MATLAB software by double clicking the icon on desktop.
2. Open the new M-file by using file menu.
3. Write the program in new file.
4. Click on save and run the icon.
5. Perform error check which displayed on command window.
6. Plot the waveforms which displays on figure window.
7. Note down the values, which displays on the work space.
8. Write a MATLAB program to design a bandpass filter for each type of classical IIR
Filters.
9. Draw the relationship between the magnitude (dB) and normalized frequency for
Butterworth, Chebyshev Type I, Chebyshev Type II and Elliptic for band-pass.
▪ Discussion
For band-pass filter compare among the classical IIR filters types - Butterworth,
Chebyshev Types I and II, and elliptic.
Page | 5