Norwegian University of Science and Technology
Department of Electronics and Telecommunications
TTT4120 Digital Signal Processing
Problem Set 2
The main topics for this problem set are representation of signals and systems
in the frequency domain, and the sampling theorem. Relevant chapters from
the text book are 4.2.3, 6.1, 4.3, 4.4, 5.1.1, 5.1.4, and 5.4.1. You will need
headphones for Problem 4. The maximum score for each problem is given in
parentheses.
Problem 1 (3 points)
Two signals x(n) and y(n) are given by
{
2 n = 0 1 −M ≤ n ≤ M
x(n) = 1 n = ±1 y(n) =
0 otherwise.
0 otherwise,
(a) Show that the Fourier transform of x(n) is given by
X(ω) = 2 + 2 cos ω
and sketch it for ω ∈ [−π, π].
(b) Show that the Fourier transform of y(n) is given by
( )
sin ω(M + 12 )
Y (ω) =
sin( ω2 )
and sketch it for M=10 and ω ∈ [−π, π] (you may use Matlab).
(c) Explain why the signals x(n) and y(n) have real valued spectra.
(d) Let the signal
∞
∑
z(n) = x(n − lN )
l=−∞
1
be the periodic extension of x(n). Assume that N is greater than the
length of the signal, i.e. N > 3.
Sketch the signal z(n).
Find the Fourier series coefficients {ck } of z(n).
Sketch {ck } as a function of ω = 2π k
N ∈ [−π, π] for N = 10.
(e) Compare the spectra of x(n) and z(n), i.e. X(ω) and {ck }. What is the
relationship between the spectra?
Problem 2 (1.5 points)
Let x(n) be a signal with the Fourier transform X(w). Find the fourier
tranforms of the following signals:
(a) x1 (n) = x(n + 3)
(b) x2 (n) = x(−n)
(c) x3 (n) = x(3 − n)
(d) x4 (n) = x(n) ∗ x(n)
Problem 3 (3 points)
Two systems (from Problem Set 1) are given by the following difference
equations
y(n) = x(n) + 2x(n − 1) + x(n − 2) (1)
y(n) = −0.9y(n − 1) + x(n). (2)
(a) Find the frequency responses of these two systems.
(b) Find the magnitude and phase responses of the two systems. Are they
even or odd functions?
(c) Use Matlab (the functions freqz, abs and angle) to find and plot the
magnitude and phase responses of the systems.
(d) Determine whether each system represents a lowpass, bandpass,
bandstop or highpass filter. Justify your answers.
1
(e) The signal x(n) = 2 cos( π2 n + π4 ) is passed through the two systems.
Find the frequency, amplitude and phase of the corresponding output
signals.
2
Problem 4 (2 points)
The analog signal xa (t) is given by
xa (t) = cos(2000πt).
The spectrum of xa (t) is shown in Fig. 1.
Figure 1: Spectrum of the signal xa (t)
(a) Two time-discrete signals, x1 (n) and x2 (n), are generated by sampling
the signal xa (n) using the sampling frequencies Fs = 4000Hz and
Fs = 1500Hz, respectively.
Sketch the spectra of the two sampled signals, X1 (f ) and X2 (f ), for
f ∈ [− 21 , 12 ].
(b) Use Matlab to generate a segment of both time-discrete signals
corresponding to the signal duration of 1s.
Play the two signal segments using Matlab function sound with the
corresponding sampling frequencies.
Why do they sound differently when they both represent the same
analog signal?