Description
I Paper Assignment (30%)
1. (4%) This problem examines conversions between various filter specifications.
Given the absolute specifications Îīs = 0.0001 and Ïð = 0.3Ï, Ïð = 0.5Ï, determine the
relative specifications ðīð and Ïð
, âð.
2. (6%) The Hann window function can be written as
w[n] = [0.5 â 0.5 cos(2Ïn/M)]ðĪð
[n].
where ðĪð
[n] is the rectangular window of length M + 1.
(a) Express the DTFT of w[n] in terms of the DTFT of ðĪð
[n].
(b) Explain why the Hann window has the wider mainlobe but lower sidelobes than the
rectangular window of the same length.
3. (12%) Consider an FIR filter with impulse response h[n] = u[n] â u[n â 4].
(a) Determine and sketch the magnitude response |ðŧ(ð
ðÏ)|
(b) Determine and sketch the amplitude response ðī(ð
ðÏ). Compare this sketch with that in (a)
and comment on the difference.
(c) Determine and sketch the phase response â ðŧ(ð
ðÏ).
(d) Determine and sketch the angle response ÎĻ(ð
ðÏ). Compare this sketch with that in (c) and
comment on the difference.
4. (8%) Consider the type-IV linear-phase FIR filter characterized by antisymmetric impulse
response and odd-M.
(a) Show that the amplitude response ðī(ð
ðÏ) is given by (10.38) with coefficients d[k] given
in (10.39).
(b) Show that the amplitude response ðī(ð
ðÏ) can be further expressed as (10.40) with
coefficients dĖ [k] given in (10.41)
II Program Assignment (70%)
5. (10%) A lowpass FIR filter is given by the specifications: Ïð = 0.3Ï, Ïð = 0.5Ï, and ðīð = 50
dB.
Use the fir2 function to obtain a minimum length linearphase filter. Use the appropriate window
function in the fir2 function. Provide a plot similar to Figure 10.12.
6. (12%) Design a highpass FIR filter to satisfy the specifications: Ïð = 0.3Ï, Ïð = 0.5Ï, and ðīð
= 50 dB.
(a) Use Kaiser window to obtain a minimum length linear-phase filter. Provide a plot similar to
Figure 10.12.
(b) Repeat (a) using the fir1 function.
7. (12%) In this problem we reproduce Figures 10.4 and 10.5. For each of the following linearphase FIR filters described by h[n], obtain impulse response, amplitude response, magnitude
response, and pole-zero plots in one figure window. For frequency response plots use the
interval â2Ï âĪ Ï âĪ 2Ï.
(a) Type-I filter: h[n] = {1, 2, 3, â2, 5, â2, 3, 2, 1}.
(b) Type-II filter: h[n] = {1, 2, 3, â2, â2, 3, 2, 1}.
(c) Type-III filter: h[n] = {1, 2, 3, â2, 0, 2, â3, â2, â1}.
(d) Type-IV filter: h[n] = {1, 2, 3, â2, 2, â3, â2, â1 }.
8. (18%) Consider a Blackman window of length L = 21.
(a) Compute and plot the log-magnitude response in dB over âÏ âĪ Ï âĪ Ï. In the plot measure
and show the value of the peak of the first sidelobes.
(b) Compute and plot the accumulated amplitude response in dB using the cumsum function. In
the plot measure and show the value of the peak of the first sidelobe.
(c) Repeat (a) and (b) for L = 41.
9. (18%) An ideal lowpass filter has a cutoff frequency of Ïð = 0.4Ï. We want to obtain a length L
= 40 linear-phase FIR filter using the frequency-sampling method.
(a) Let the sample at Ïð be equal to 0.5. Obtain the resulting impulse response h[n]. Plot the
log-magnitude response in dB and determine the minimum stopband attenuation.
(b) Now vary the value of the sample at Ïð and find the largest minimum stopband attenuation.
Obtain the resulting impulse response h[n] and plot the log-magnitude response in dB in the
plot window of (a).
(c) Compare your results with those obtained using the fir2 function (choose hamming window).
III Reference
ðŧ(ð
ðÏ) = â (ð[ð]ð ðð [ð (ð â
1
2
)]) ð
ð+1
2
ð=1
ð
â
ðÏð
2
â ððī(ð
ðÏ)ð
âðÏð/2
. (10.38)
ð[ð] = 2â [
ð+1
2
â ð]. ð = 1,2, âĶ ,
ð+1
2
(10.39)
ðī(ð
ðÏ) = sin(
ð
2
) â ðĖ[ð] cos ðð (ðâ1)/2
ð=0
. (10.40)
d[k] =
{
1
2
(2ðĖ[0] â ðĖ[1]), ð = 1
1
2
(2ðĖ[ð â 1] â ðĖ[ð]), 2 âĪ ð âĪ (ð â 1)/2
1
2
(2ðĖ[(ð â 1])/2), ð = (ð + 1)/2
. (10.41)
ðŧ(ð
ðÏ) = â â[ð]
ð
ð=0 ð
ðÏn â ðī(ð
ðÏ)ð
ððđ(ð
ðÏn)
. (10.42)
ðđ(ð
ðÏn
) â âÎąÏ + Îē. (10.43)