0% found this document useful (0 votes)
47 views

Assignment 4

This document contains a 4 problem digital signal processing assignment involving filters. Problem 1 involves pole-zero plots and determining filter types. Problem 2 involves calculating the inverse of a filter and analyzing its stability. Problem 3 implements a low-frequency shelving filter and analyzes the effects of its parameters. Problem 4 generates noisy signals, designs resonator filters to isolate sinusoids, and combines the filters.

Uploaded by

Teo Cre
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)
47 views

Assignment 4

This document contains a 4 problem digital signal processing assignment involving filters. Problem 1 involves pole-zero plots and determining filter types. Problem 2 involves calculating the inverse of a filter and analyzing its stability. Problem 3 implements a low-frequency shelving filter and analyzes the effects of its parameters. Problem 4 generates noisy signals, designs resonator filters to isolate sinusoids, and combines the filters.

Uploaded by

Teo Cre
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

Norwegian University of Science and Technology

Department of Electronics and Telecommunications

TTT4120 Digital Signal Processing


Problem Set 4

Problem 1 (2 points)

Given a filter with transfer function


1
H(z) =
1 − az −1

(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)

Consider a causal digital filter with transfer function


1
H(z) = 1 −1
(1 − 2 z )(1 + 12 z −1 )

(a) Find the transfer function of the inverse filter of H(z)

(b) Is the inverse filter stable? Justify the answer.

(c) Is the inverse filter a minimum-phase filter?

(d) Does the inverse filter have a linear phase characteristics? Justify your
answer.

1
Problem 3 (2 points)

In the recording/mastering of sound signals or during playback, it is often


desired to alter the characteristics of the sound at different frequencies. For
example, we may wish to highlight the lower/middle frequencies, while we
may wish to reduce the presence of high frequencies.

This can be done by using so-called ’shelving’ filters. Figure 1 shows a


low-frequency shelving filter implementation. The filter A(z) is :

α − 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

(a) What type of filter is A(z), (Highpass, Lowpass, Bandpass, Bandstop or


Allpass)? Justify your answer.

(b) The filter in Figure 1 consists of a sum of two branches (upper and
lower).

• Use Matlab function freqz to plot the magnitude responces of the


two branches given α = 0.9 and K = 1.
• What types of filters do the upper and lower branches represent?

(c) The Matlab-script LFshelving.m implements the entire filter in Figure 1


and plots its magnitude response. Furthermore, it uses the filter to
modify the music file pluto.wav and plays both the original and
modified music file.

• Let K = 3. Plot the magnitude response of the filter and listen to


the original and modified music file when α is equal to 0.5, 0.7 and
0.9, respectively.

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)

Given a sequence d(n) as:

d(n) = Ax cos(2πfx n) + Ay cos(2πfy n), 0≤n≤L−1

where Ax = Ay = 0.25, fx = 0.04, fy = 0.10 and L = 500.

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.

• Write the expressions for Hx (z) and Hy (z).


• Read about the Matlab functions poly, roots, zplane and freqz.
• Use zplane to plot the zeros and poles of the resonators.
• Use freqz to plot |Hx (f )| and |Hy (f )|.

(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.

• Plot the magnitude response of the resulting system.

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.

You might also like