Assignment 4
Assignment 4
Problem 1 (2 points)
(a) Draw the pole-zero plot for the filter given a = 0.9 and a = −0.9.
Determine the filter type for two filters? Explain using the pole-zero
plot.
(b) Verify the results in 1(a) with pezdemo. The demo can be downloaded
from the course home page.
Problem 2 (2 points)
(d) Does the inverse filter have a linear phase characteristics? Justify your
answer.
1
Problem 3 (2 points)
α − z −1
A(z) =
1 − αz −1
The parameters α and K are used to tune the filter.
1
2
+
x[n] y[n]
A(z) +
−1
+
K
2
Figure 1: Low-frequency shelving filter
(b) The filter in Figure 1 consists of a sum of two branches (upper and
lower).
2
• Let α = 0.7. Plot the magnitude response of the filter and listen to
the original and modified music file when K is equal to 0.5, 1 and
4, respectively.
• What do the parameters K and α control?
Problem 4 (4 points)
The sequence d(n) is contaminated with additive noise e(n), that is, the
observed signal is
g(n) = d(n) + e(n).
(a) Use MATLAB to generate and plot sequences d(n) and g(n) and their
magnitude spectra, |D(f )| and |G(f )|. (Use FFT length N=2048)
(A segment of the noise e(n) of length L can be generated by MATLAB
command randn(1,L))
Compare the plots before and after adding the noise.
(b) To isolate the two sinusoids from the noisy signal g(n) we want to design
two digital resonators with transfer functions Hx (z) and Hy (z). The
resonators should have zeros at z = 1 and z = −1. Use common sense to
figure out how close to the unit circle the poles should be.
(c) Use the two filters designed in 2b) to filter the noise contaminated signal
g(n) (use the Matlab function filter)
Plot the outputs from the filters qx (n) and qy (n) as well as their
amplitude spectra |Qx (f )| and |Qy (f )|.
Are the resulting plots what you expected?
(d) We wish to combine the two digital resonators in order to isolate both
sinusoids.
3
• Find its zeros and poles. (Hint. You can use the MATLAB
functions poly and roots)
• Use zplane to plot the zeros and poles, and discuss their placement.
• Plot the output from the combined filter, and the its magnitude
spectra.
• Compare the plots with the plots of d(n) and g(n) and their
magnitude spectra.