0% found this document useful (0 votes)
28 views2 pages

Lab 11

Uploaded by

f20241046
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)
28 views2 pages

Lab 11

Uploaded by

f20241046
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

Digital Signal Processing (EEE F434/ ECE F434)

Lab 11: Filter design

Instructions:
1. Ensure that you show the outputs of the task to the TAs and get them evaluated. No queries will be
entertained post lab session.
2. Make sure your attendance is marked if you are present in tha lab.
3. Plots should include x label, y label, legend, and titles.
4. If the report/code is found to be copied, zero marks will be awarded.

1. A speech signal with a bandwidth of 4 kHz is sampled at 8 kHz. The signal is corrupted by
sinusoids with frequencies 1 kHz, 2 kHz, and 3 kHz.
a) Design an IIR filter using notch filter components that eliminate these sinusoidal signals.
b) Choose the filter's gain so that the maximum gain is equal to 1, and plot the log-magnitude
response of your filter.
c) Load the Handel sound file in MATLAB [Available in MATLAB is a short snippet of Handel’s
hallelujah chorus, which is a digital sound about 9 seconds long, sampled at 8192 sam/sec], and
add the preceding three sinusoidal signals to create a corrupted sound signal. Now, filter
the corrupted sound signal using your filter and comment on its performance.

2. Design an analog Butterworth lowpass filter with a 0.25 dB or better ripple at 500 rad/sec
and at least 50 dB of attenuation at 2000 rad/sec. Determine the system function in a rational
function form. Plot the magnitude response, the log-magnitude response in dB, the phase
response, the group delay, and the impulse response of the filter.

3. Design a bandpass filter using the Hamming window design technique. The specifications are
lower stopband edge: 0.3π
upper stopband edge: 0.6π, As = 50 dB
lower passband edge: 0.4π
upper passband edge: 0.5π, Rp = 0.5 dB
Plot the impulse response and the magnitude response (in dB) of the designed filter. Do not
use the fir1 function.
Rp is the passband ripple in dB, and As is the stopband attenuation in dB

Hint: As we have not yet covered the windowing technique for digital filter design in lectures
Hamming window is given by

 In MATLAB, w=hamming(M) returns the M-point Hamming window function in array


w.
Digital Signal Processing (EEE F434/ ECE F434)
Lab 11: Filter design

 Impulse response of ideal LPF is a sinc function, which needs to be truncated on


both sides to obtain an FIR filter, this process of truncation is called windowing.
 In general, h(n) can be thought of as being formed by the product of hd(n) and a
window function w(n) as: h(n) = hd(n)w(n), where hd(n) is ideal frequency response
given as

and

---------------------------------------------------------

You might also like