0% found this document useful (0 votes)
6 views4 pages

EXP723BEC088

Jtsutditiy

Uploaded by

Khelan Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

EXP723BEC088

Jtsutditiy

Uploaded by

Khelan Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Experiment - 7 : Design the infinite impulse response (IIR) digital

filters for low pass, high pass, band pass and band stop responses.
23BEC088

Q.1. Design the Butterworth bandstop filter by running Program P7_1. Write down the exact expression
for the transfer function generated. What are the filter specifications? Does your design meet the
specifications? Using Octave, compute and plot the filter’s unwrapped phase response and the group
delay response.

Wp = [0.2 0.4];
Ws = [0.25 0.35];
Rp = 1;
Rs = 40;

[n, Wn] = buttord(Wp, Ws, Rp, Rs);


[b, a] = butter(n, Wn, 'stop');
[H, w] = freqz(b, a, 512);

figure;
subplot(2,1,1); plot(w/pi, unwrap(angle(H))); title('Unwrapped Phase Response');
subplot(2,1,2); plot(w/pi, grpdelay(b, a, 512)); title('Group Delay Response');

1
Q.2 Design an elliptic bandpass filter meeting the specification given in Question Q7.3. Write down the
exact expression for the transfer function generated. Does your design meet the specifications? Using
Octave, compute and plot the filter’s unwrapped phase response and the group delay response.

Wp = [0.3 0.6];
Ws = [0.2 0.7];
Rp = 1;
Rs = 40;

[n, Wn] = ellipord(Wp, Ws, Rp, Rs);


[b, a] = ellip(n, Rp, Rs, Wn, 'bandpass');
[H, w] = freqz(b, a, 512);

figure;
subplot(2,1,1); plot(w/pi, unwrap(angle(H))); title('Unwrapped Phase Response');
subplot(2,1,2); plot(w/pi, grpdelay(b, a, 512)); title('Group Delay Response');

Q.3 Design a lowpass IIR filter with the following specifications:

Filter order = 2, Butterworth type

Cut-off frequency=800 Hz

Sampling rate =8000 Hz

Design using the bilinear z-transform design method. Plot the frequency

2
responses using MATLAB.

Hint: freqz(bLP,aLP,512,8000); axis([0 4000 –40 1]); ‘Label and print your

graph. What are the filter gains for the stopband at the cut-off frequency and

2000 Hz and the passband at 50 Hz based on the plot of the magnitude

frequency response?

fs = 8000;
fc = 800;

[n, Wn] = buttord(fc/(fs/2), (fc+200)/(fs/2), 1, 40);


n = n(1);
[b, a] = butter(n, Wn, 'low');
[H, f] = freqz(b, a, 512, fs);

figure;
plot(f, 20*log10(abs(H))); axis([0 4000 -40 1]); title('Magnitude Frequency
Response');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
grid on;

Observations(a) Butterworth Bandstop Filter

3
• The Butterworth bandstop filter was designed with stopband frequencies Ws = [0.25 0.35] and
passband frequencies Wp = [0.2 0.4].
• The filter order was determined using buttord(), and coefficients were generated using butter().
• The phase response was smooth, indicating linear phase characteristics in the passband.
• The group delay was relatively constant, ensuring minimal signal distortion.
• The magnitude response showed a gradual roll-off compared to sharp-cutoff filters.

(b) Elliptic Bandpass Filter

• An elliptic bandpass filter was designed with Wp = [0.3 0.6] and stopband Ws = [0.2 0.7].
• The order was determined using ellipord(), and coefficients were generated using ellip().
• The magnitude response had a steep roll-off, indicating high selectivity.
• The phase response showed greater variation, suggesting nonlinear phase characteristics.
• The group delay was less uniform, meaning potential phase distortion.

(c) Lowpass IIR Filter (Butterworth)

• A Butterworth lowpass filter was designed for a cutoff frequency of 800 Hz at an 8 kHz sampling rate.
• The order was computed using buttord(), and the filter coefficients were generated using butter().
• The magnitude response was maximally flat in the passband, with a smooth roll-off in the stopband.
• The filter maintained a gradual transition, requiring a higher order for sharper cutoff.
• The phase response was smooth, maintaining low phase distortion.

Conclusions

• Butterworth filters provide smooth frequency response and minimal distortion but require a higher
order for sharper transitions.
• Elliptic filters offer sharper cutoffs with lower order, making them efficient but at the cost of higher
phase distortion.
• Phase-sensitive applications (e.g., audio and speech processing) benefit from Butterworth filters due
to their low group delay variation.
• Elliptic filters are more suitable for applications where sharp frequency separation is required but
phase distortion is acceptable.
• For real-time audio applications, Butterworth filters are preferable, while elliptic filters work well for
narrowband filtering where selectivity is critical.

You might also like