Вы находитесь на странице: 1из 17

Summer Term 2014 Digital Signal Processing

Chapter 0: A Review of Analog Signals and Systems

Problem 0.1
Sketch the even part s
e
(t) =
s(t) +s(t)
2
and the odd part s
o
(t) =
s(t) s(t)
2
of the following signals s(t):
a) s(t) = rect(t/2)
b) s(t) =(t) (t)
c) s(t) = rect(t 1/2)
Problem 0.2
Determine the energy and the power for each of the following signals and determine whether these signals are
energy signals, power signals, or neither.
a) s
1
(t) = (t)
b) s
2
(t) = rect(t 1)
c) s
3
(t) = r(t) =t (t)
d) s
4
(t) = rect(t) cos(22t)
e) s
5
(t) = A cos(22t)
f) s
6
(t) = B sin(22t) (t)
Problem 0.3
Compute the convolution s(t) s(t) and s(t) s(t) s(t) for s(t) = rect(t) and sketch the results.
Problem 0.4
Find and sketch the following convolution products:
a) g(t) = (t) rect(t)
b) g(t) = rect(t) rect(t)
c) g
1
(t) = (t) [e
t
(t)]
and g
2
(t) = [(t) e
t
] (t).
Problem 0.5
-1
0 1 2 t
1
3 4 5
h(t)
-1
Consider the continuous-time LTI system with impulse response h(t):
Sketch the output signal g(t) for each of the following input signals:
a) s(t) = (t)
b) s(t) = (t 3)
c) s(t) = rect(t 1/2)
d) s(t) = rect (t/2)
e) s(t) = h(t)
f) s(t) = h(t)
Problem 0.6
Sketch each of the following signals:
a) g(t) =(t +1) 3(t 1)
b) g(t) =(t 1) [(t 0.5) +(t 1.5)]
c) g(t) = [3(t +4) +2(t +5)] [(t 2) +(t 3)].
Problem 0.7
The impulse response of a rst order RC lowpass is: h(t) =
1
T
(t) e
t/T
. Determine whether this system is
stable and causal.
Problem 0.8
Sketch the response of an ideal differentiator and an ideal integrator to each of the following input signals:
a) s
1
(t) = arect(t/T +1/2) b) s
2
(t) = a(t/T +1/2).
Cologne University of Applied Sciences 1 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 0.9
-1 0 1 t
1
s(t)
-1 1
t
1
g(t)
-1
1
Consider the following signals s(t) and g(t):
a) Sketch the autocorrelation functions
E
ss
() and

E
gg
() of s(t) and g(t).
b) Sketch the crosscorrelation function
E
sg
().
Problem 0.10
s(t)
1
t -1
1
4
-1
Consider the following signal s(t):
a) Sketch its autocorrelation function
E
ss
().
b) Determine the signal energy E
s
from the ACF
E
ss
().
Problem 0.11
(OL 2.1)
Try to compute the convolution products rect(t) rect(t) and si(t) si(t) via time-domain convolution and
by using the Fourier transform.
Problem 0.12
(OL 2.3)
Determine the Fourier transform of a s

t t
0
T

.
Problem 0.13
(OL 2.12)
A medium wave transmitter transmits the following signal: s(t) = rect( f
1
t){[1 +0.5cos(2 f
2
t)] cos(2 f
3
t)},
where f
1
= 1 Hz, f
2
= 10
3
Hz and f
3
= 10
6
Hz. Sketch s(t) and |S( f )|.
Problem 0.14
(OL 2.14)
-4 -3 -2 -1 0 1 2 3 4
t
1
2
s(t)
Compute the Fourier transform of the following signal:
Problem 0.15
(OL 4.9)
Compute the signal energy, the autocorrelation function and
the energy density spectrum |S( f )|
2
for each of the following signals:
a) s
2
(t) =(t)
b) s
3
(t) = si(t).
Cologne University of Applied Sciences 2 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Chapter 1: Signals, Systems, and Digital Signal Processing
Problem 1.1
Generate the following sequences using basic signal functions and basic signal operations. Plot signal samples
using the stem function.
a) s
1
[n] = 3[n+2] +2[n] [n3] +5[n7], 5 n 15.
b) s
2
[n] =
5
k=5
e
|k|
[n2k], 10 n 10.
c) s
3
[n] = 10[n] 5[n5] 10[n10] +5[n15].
d) s
4
[n] = e
0.1n
[[n+20] [n10]] .
e) s
5
[n] = 5[cos(0.49n) +cos(0.5ln)], 200 n 200. Comment on the waveform shape.
f) s
6
[n] = 2sin(0.0ln)cos(0.5n), 200 n 200. Comment on the waveform shape.
g) s
7
[n] = e
0.05n
sin(0.ln+/3), 0 n 100. Comment on the waveform shape.
h) s
8
[n] = e
0.01n
sin(0.ln), 0 n 100. Comment on the waveform shape.
Problem 1.2
Generate the following random sequences and obtain their histogram using the hist function with 100 bins.
Use the bar function to plot each histogram.
a) s
1
[n] is a random sequence whose samples are independent and uniformly distributed over [0,2] interval.
Generate 100,000 samples.
b) s
2
[n] is a Gaussian random sequence whose samples are independent with mean 10 and variance 10. Gener-
ate 10,000 samples.
c) s
2
[n] = s
1
[n] s
1
[n 1] where s
1
[n] is the random sequence given in part 1 above. Comment on the shape
of this histogram and explain the shape.
d) s
4
[n] =
4
k=1
y
k
[n 1] , where each random sequence y
k
[n] is independent of the others with samples uni-
formly distributed over [0.5,0.5]. Comment on the shape of this histogram.
Problem 1.3
Generate the following periodic sequences and plot their samples (using the stem function) over the indicated
number of periods.
a) s
p1
[n] = {. . . , 2, 1, 0, 1, 2, . . .}
periodic
. Plot 5 periods.
b) s
p2
[n] = {e
0.1n
[[n] [n20]]}
periodic
. Plot 3 periods.
c) s
p3
[n] = {sin(0.1n)[[n] [n10]]}
periodic
. Plot 4 periods.
d) s
p4
[n] = {. . . , 0, 1, 3, . . .}
periodic
+{. . . , 0, 1, 3, 4, . . .}
periodic
, 0 n 24 . What is the period of s
p4
[n] ?
Problem 1.4
Let s[n] = {2, 4, 3, 1, 5, 4, 7} . Generate and plot the samples (use the stem function) of the following
sequences.
a) s
1
[n] = 2s[n3] +3s[n+4] s[n].
b) s
2
[n] = 4s[4+n] +5s[n+5] +2s[n].
c) s
3
[n] = s[n+3] s[n2] +s[1n] s[n+1].
d) s
4
[n] = 2e
0.5n
s[n] +cos(0.1n) s[n+2], 10 n 10.
Cologne University of Applied Sciences 3 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 1.5
The complex exponential sequence e
j2F
0
n
or the sinusoidal sequence cos(2F
0
n) are periodic if the normalized
frequency F
0
is a rational number; that is F
0
= K/N , where K and N are integers.
a) Prove the above result.
b) Generate e
j20.05n
, 100 n 100. Plot its real and imaginary parts using the stem function. Is this
sequence periodic? If it is, what is its fundamental period? From the examination of the plot what interpre-
tation can you give to the integers K and N above?
c) Generate and plot cos(0.1n), 20 n 20. Is this sequence periodic? What do you conclude from the plot?
If necessary examine the values of the sequence to arrive at your answer.
Problem 1.6
Using the evenodd function, decompose the following sequences into their even and odd components. Plot
these components using the stem function.
a) s
1
[n] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} .
b) s
4
[n] = e
0.1n
[[n+20] [n10]] .
c) s
3
[n] = cos(0.2n+/4), 20 n 20.
d) s
4
[n] = e
0.05n
sin(0.1n+/3), 0 n 100.
Problem 1.7
A complex-valued sequence s
e
[n] is called conjugate-symmetric if s
e
[n] = s
*
e
[n] and a complex-valued se-
quence s
o
[n] is called conjugate-antisymmetric if s
o
[n] = s
*
o
[n].
Then, any arbitrary complex-valued sequence s[n] can be decomposed into s[n] = s
e
[n] +s
o
[n] where s
e
[n] and
s
o
[n] are given by s
e
[n] =
1
2

s[n] +s
*
[n]

and s
o
[n] =
1
2

s[n] s
*
[n]

respectively.
a) Modify the evenodd function discussed in the text so that it accepts an arbitrary sequence and decom-
poses it into its conjugate-symmetric and conjugate-antisymmetric components by implementing the above
equations.
b) Decompose the following sequence: s[n] = 10e
(0.1+j0.2)n
, 0 n 10, into its conjugate-symmetric and
conjugate-antisymmetric components. Plot their real and imaginary parts to verify the decomposition. (Use
the subplot function.)
Problem 1.8
The operation of signal dilation (or decimation or down-sampling) is dened by
g[n] = s[nM]
in which the sequence s[n] is down-sampled by an integer factor M. For example, if s[n] ={. . . , 2, 4, 3, 6, 5, 1, 8, . . .}
then the down-sampled sequence by a factor 2 is given by g[n] = {. . . , 2, 3, 5, 8, . . .}.
a) Develop a MATLAB function dnsample that has the form
function [g,m] = dnsample(s,n,M)
% Downsample sequence s[n] by a factor M to obtain g[m]
to implement the above operation. Use the indexing mechanism of MATLAB with careful attention to the
origin of the time axis n = 0.
b) Generate s[n] = sin(0.l25n), 50 n 50. Decimate s[n] by a factor of 4 to generate g[n] . Plot both s[n]
and g[n] using subplot and comment on the results.
c) Repeat the above using s[n] = sin(0.5n), 50 n 50. Qualitatively discuss the effect of down-sampling
on signals.
Cologne University of Applied Sciences 4 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Chapter 2: Discrete-Time Linear Time-Invariant Systems
Problem 2.1 (2.9)
Using the conv_m function, determine the autocorrelation sequence
E
ss
[m] and the crosscorrelation sequence

E
sg
[m] for the following sequences: s[n] = 0.9
n
, 0 n 20; g[n] = 0.9
n
, 20 n 0. Describe your obser-
vations of the above results.
Problem 2.2 (2.10)
In a certain concert hall, echoes of the original audio signal s[n] are generated due to the reections at the walls
and ceiling. The audio signal experienced by the listener g[n] is a combination of s[n] and its echoes. Let
g[n] = s[n] +s[nk]
where k is the amount of delay in samples and is its relative strength. We want to estimate the delay using
the correlation analysis.
a) Determine analytically the autocorrelation
E
gg
[m] in terms of the autocorrelation
E
ss
[m].
b) Let s[n] = cos(0.2n) +0.5cos(0.6n), = 0.1, and k = 50 . Generate 200 samples of g[n] and determine
its autocorrelation. Can you obtain k and by observing
E
gg
[m]?
Problem 2.3 (2.11)
Consider the following discrete-time systems:
Tr
1
{s[n]} = s[n] [n]
Tr
2
{s[n]} = s[n] +n s[n]
Tr
3
{s[n]} = s[n] +
1
2
s[n2] +
1
3
s[n3] s[2n]
Tr
4
{s[n]} =
n
k=
2s[k]
Tr
5
{s[n]} = s[2n]
Tr
6
{s[n]} = round(s[n]) ,
where round( ) denotes rounding to the nearest integer.
a) Determine analytically whether the above systems are linear.
b) Let s
1
[n] be a uniformly distributed random sequence between [0,1] over 0 n 100 , and let s
2
[n] be a
Gaussian random sequence with mean 0 and variance 10 over 0 n 100 . Using these sequences, verify
the linearity of the above systems. Choose any values for scale factors a
1
and a
2
of s
1
[n] and s
2
[n]. You
should use several realizations of the above sequences to arrive at your answers.
Problem 2.4
Consider the discrete-time systems given in Problem 2.3.
a) Determine analytically whether the above systems are time-invariant.
b) Let s[n] be a Gaussian random sequence with mean 0 and variance 10 over 0 n 100. Using this sequence,
verify the time invariance of the above systems. Choose any values for sample shift. You should use several
realizations of the above sequence to arrive at your answers.
Problem 2.5
For the systems given in Problem 2.3 determine analytically their stability and causality.
Problem 2.6
The linear convolution dened has several properties:
Commutation: s
1
[n] s
2
[n] = s
2
[n] s
1
[n]
Cologne University of Applied Sciences 5 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Association: (s
1
[n] s
2
[n]) s
3
[n] = s
1
[n] (s
2
[n] s
3
[n])
Distribution: s
1
[n] (s
2
[n] +s
3
[n]) = s
1
[n] s
2
[n] +s
1
[n] s
3
[n]
Identity: s[n] [nn
0
] = s[nn
0
]
a) Analytically prove these properties.
b) Using the following three sequences, verify the above properties:
s
1
[n] = cos(n/4) ([n+5] [n25])
s
2
[n] = 0.9
n
([n] [n20])
s
3
[n] = round(5w[n]), 10 n 10, where w[n] is uniform over [1, 1].
Use the conv_m function.
Problem 2.7
Determine analytically the convolution g[n] = s[n] h[n] of the following sequences and verify your answers
using the conv_m function.
a) s[n] = {2, 4, 5, 3, 1, 2, 6}, h[n] = {1, 1, 1, 1, 1}
b) s[n] = {1, 1, 0, 1, 1}, h[n] = {1, 2, 3, 4}
c) s[n] = (1/4)
n
[[n+1] [n4]], h[n] = [n] [n5]
d) s[n] = n/4[[n] [n6]] , h[n] = 2([n+2] [n3])
Problem 2.8
Let s[n] = (0.8)
n
[n] , h[n] = (0.9)
n
[n] and g[n] = s[n] h[n]. Use three columns and one row of subplots for
the following parts.
a) Determine g[n] analytically. Plot rst 51 samples of g[n] using the stem function.
b) Truncate s[n] and h[n] to 26 samples. Use the conv_m function to compute g[n]. Plot g[n] using the stem
function. Compare your results with those of part a).
c) Using the filter function, determine the rst 51 samples of g[n] = s[n] h[n]. Plot g[n] using the stem
function. Compare your results with those of parts a) and b).
Problem 2.9
When the sequences s[n] and h[n] are of nite duration N
s
and N
h
, respectively, then their linear convolution
can also be implemented using matrix-vector multiplication.
If elements of s[n] and g[n] are arranged in column vectors s and g respectively, then we obtain
g = Hs
where linear shifts in h[n m] for n = 0, . . . , N
h
1 are arranged as rows in the matrix H. This matrix has
an interesting structure and is called a Toeplitz matrix. To investigate this matrix, consider the sequences
s[n] = {1, 2, 3, 4, 5} and h[n] = {6, 7, 8, 9}.
a) Determine the linear convolution g[n] = s[n] h[n].
b) Express s[n] as a 51 column vector s and g[n] as a 81 column vector g . Now determine the 55 matrix
H so that g = Hs.
c) Characterize the matrix H. From this characterization can you give a denition of a Toeplitz matrix? How
does this denition compare with that of time invariance?
d) What can you say about the rst column and the rst row of H?
Cologne University of Applied Sciences 6 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 2.10
MATLAB provides a function called toeplitz to generate a Toeplitz matrix, given the rst row and the rst
column.
a) Using this function and your answer to Problem 2.9 part d), develop another MATLAB function to imple-
ment linear convolution. The format of the function should be
function [g,H]=conv_tp(h,s)
% Linear Convolution using Toeplitz Matrix
% % [g,H] = conv_tp(h,s) % g = output sequence in column vector form
% H = Toeplitz matrix corresponding to sequence h so that g = Hs
% h = Impulse response sequence in column vector form
% s = input sequence in column vector form
b) Verify your function on the sequences given in Problem 2.9.
Problem 2.11
A linear and time-invariant system is described by the difference equation
g[n] 0.5g[n1] +0.25g[n2] = s[n] +2s[n1] +s[n3]
a) Using the filter function, compute and plot the impulse response of the system over 0 n 100.
b) Determine the stability of the system from the above impulse response.
c) If the input to this system is s[n] =[n] (5+3cos(0.2n) +4sin(0.6n)), determine the response g[n] over
0 n 200 using the filter function.
Problem 2.12
A "simple" digital differentiator is given by
g[n] = s[n] s[n1],
which computes a backward rst-order difference of the input sequence. Implement this differentiator on the
following sequences and plot the results. Comment on the appropriateness of this simple differentiator.
a) s[n] = 5([n] [n20]) : a rectangular pulse.
b) s[n] = n([n] [n10]) +(20n)([n10] [n20]): a triangular pulse.
c) s[n] = sin

n
25

([n] [n100]) : a sinusoidal pulse.

Chapter 3: Ideal Sampling and Reconstruction
Problem 3.1
A voice signal in telecommunications is a lowpass signal with a cut-off frequency f
c
= 4KHz.
H
r
( f )
-f
2
-f
1
f
1
f
2
f
a) What is minimum sampling rate that permits a perfect reconstruction of
the analogue signal?
The analogue signal shall be reconstructed by using a non-ideal lowpass
lter with the following transfer function H
r
( f ):
b) Determine the minimum sampling rate r and the minimum frequency f
1
such that the analogue signal can be reconstructed perfectly.
Cologne University of Applied Sciences 7 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 3.2
An analog signal s(t) =sin(2 f
0
t) of frequency f
0
=500Hz is sampled using the following sampling intervals.
In each case plot the spectrum of the resulting discrete-time signal.
a) T = 0.1 ms b) T = 1 ms c) T = 0.01 sec
Problem 3.3 (3.20)
We implement the following analog lter using a discrete lter, i.e. the analog input signal s(t) is rst converted
to a discrete-time signal s[n], which is then processed by a discrete-time LSI system with impulse response h[n].
The output signal g[n] is then converted back to the analog output signal g(t). The sampling rate in the A/D and
D/A is 8000 samples/sec, and the impulse response is h[n] = (0.9)
n
[n].
a) What is the digital frequency in s[n] if s(t) = 10cos(25000t)?
b) Determine the steady-state output g(t) if s(t) = 10cos(25000t).
c) Determine the steady-state output g(t) if s(t) = 5sin(24000t).
d) Find two other analog signals s(t) with different analog frequencies, that will give the same steady-state
output g(t) when s(t) = 10cos(25000t) is applied.
e) To prevent aliasing, a pre-lter would be required to process s(t) before it passes to the A/D converter. What
type of lter should be used and what should be the largest cutoff frequency that would work for the given
conguration?
Problem 3.4 (3.21)
Consider an analog signal s(t) = sin(210t), 0 t 1. It is sampled at T = 0.01, 0.05, and 0.1 sec intervals to
obtain s[n].
a) For each T plot s[n].
b) Reconstruct the analog signal s
r
(t) from the samples s[n] using ideal interpolation (Use = 0.001) and
determine the frequency in s
r
(t) from your plot. (Ignore the end effects.)
c) Reconstruct the analog signal s
sp
(t) from the samples s[n] using the cubic spline interpolation and determine
the frequency in s
sp
(t) from your plot. (Again ignore the end effects.)
Problem 3.5 (3.22)
Consider the analog signal s(t) = cos(210t +), 0 t 1. It is sampled at T = 0.05 sec intervals to obtain
s[n]. Let = 0, /6, /4, /3, /2. For each of these values, perform the following:
a) Plot s(t) and superimpose s[n] on it using the stem function.
b) Reconstruct the analog signal s
r
(t) from the samples s[n] using ideal interpolation (Use t = 0.001) and
superimpose s[n] on it.
c) Reconstruct the analog signal s
sp
(t) from the samples s[n] using the cubic spline interpolation and superim-
pose s[n] on it.
d) You should observe that the resultant reconstruction in each case has the correct frequency but a different
amplitude. Explain this observation. Comment on the role of phase of s(t) on sampling and reconstruction
of signals.
Cologne University of Applied Sciences 8 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Chapter 4: The Fourier-Transform of Discrete-Time Signals
Problem 4.1 (3.1)
Using the matrix-vector multiplication approach discussed in the tutorial, write a MATLABfunction to compute
the DTFT of a nite-duration sequence. The format of the function should be
function S=dtft(s,n,F) % Computes Discrete-time Fourier Transform
%
% S = dtft(s,n,F)
% S = DTFT values computed at normalized frequencies given by F
% s = input sequence in row vector form
% n = sample index vector
% F = normalized frequency location vector
Use this function to compute the normalized DTFT S
a
(F) of the following nite-duration sequences over
1/2 F 1/2. Plot s[n] and the DTFT magnitude and angle graphs in one gure window.
a) s[n] = (0.6)
|n|
[[n+10] [n11]] . Comment on the angle plot.
b) s[n] = n (0.9)
n
[[n] [n21]] .
c) s[n] = (cos(0.5n) + j sin(0.5n))[[n] [n51]] . Comment on the magnitude plot.
d) s[n] = {4, 3, 2, 1, 1, 2, 3, 4}. Comment on the angle plot.
e) s[n] = {4, 3, 2, 1, 1, 2, 3, 4}. Comment on the angle plot.
Problem 4.2
Let s
1
[n] = {1, 2, 2, 1}. A new sequence s
2
[n] is formed using s[n] = s
1
[n] +s
1
[n4].
a) Express S
a2
( f ) in terms of S
a1
( f ) without explicitly computing S
a2
( f ).
b) Verify your result using MATLAB by computing and plotting magnitudes of the respective DTFTs.
Problem 4.3 (3.3)
For each of the following sequences s[n] plot the magnitude and angle of S
a
(F) over 1/2 F 1/2.
a) s[n] = 2(0.5)
n
[n+2].
b) s[n] = (0.6)
|n|
[[n+20] [n21]] .
c) s[n] = n (0.9)
n
[n+3].
d) s[n] = (n+3) (0.8)
n1
[n2].
e) s[n] = 4 (0.7)
n
cos(0.25n)[n].
Problem 4.4 (3.4)
The following nite-duration sequences are called windows and are very useful in DSP.
Rectangular:
R
M
[n] =

1, 0 n < M
0, otherwise
Hanning:
C
M
[n] = 0.5

1cos

2n
M1

R
M
[n]
Triangular:
T
M
[n] = 0.5

1
|M12n|
M1

R
M
[n]
Hamming:
C
M
[n] =

0.540.46cos

2n
M1

R
M
[n]
For each of these windows, plot their DTFTs for M = 10, 25, 50, 101. Scale transform values so that the max-
imum value is equal to 1. Plot the magnitude of the normalized DTFT S
a
(F) over 1/2 F 1/2. Study
these plots and comment on their behavior as a function of M.
Cologne University of Applied Sciences 9 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 4.5
Using the denition of the DTFT, determine the sequences corresponding to the following DTFTs:
a) S
a
(F) = 3+cos(2F) +4cos(22F)
b) S
a
(F) = [16cos(23F) +8cos(25F)] e
j2F3
c) S
a
(F) = 2+ j4sin(22F) 5cos(24F)
d) S
a
(F) = [1+2cos(2F) +3cos(22F)] cos(2 1/2 F)e
j2F5/2
e) S
a
(F) = j [3+2cos(2F) +4cos(22F)] sin(2 F)e
j2F3
Problem 4.6
Using the denition of the inverse DTFT, determine the sequences corresponding to the following DTFTs:
a) S
a
(F) =

1, 0 |F| 1/6
0, 1/6 < |F| 1/2
b) S
a
(F) =

1, 0 |F| 3/8
0, 3/8 < |F| 1/2
c) S
a
(F) =

2, 0 |F| 1/16
1, 1/16 < |F| 3/8
1, 3/8 < |F| 1/2
d) S
a
(F) =

0, 0 |F| 1/8
1, 1/8 < |F| 3/8
0, 3/8 < |F| 1/2
e) S
a
(F) = 2F e
/2210F
Remember that the above transforms are periodic in F with period equal to 1. Hence, the DTFT spectra are
given only over the primary period of 1/2 F 1/2.
Problem 4.7
A complex-valued sequence s[n] can be decomposed into a conjugate symmetric part s
e
[n] and an conjugate
anti-symmetric part s
o
[n] as discussed in Chapter 1. Show that
s
e
[n] Re{S
a
( f )} and s
o
[n] jIm{S
a
( f )}
where Re{S
a
( f )} and Im{S
a
( f )} are the real and imaginary parts of the DTFT S
a
( f ) respectively.
Verify this property on s[n] = 2(0.9)
n
[cos(0.ln) + j sin(0.9n)][(n) (n10)] using the MATLAB func-
tions developed in Chapter 1.
Problem 4.8
A complex-valued DTFT S
a
( f ) can also be decomposed into its conjugate symmetric part S
ae
( f ) and conjugate
anti-symmetric part S
ao
( f ), i.e.,
S
a
( f ) =S
ae
( f ) +S
ao
( f ),
where S
ae
( f ) =
1
2
(S
a
( f ) +S

a
(f )) and S
ao
( f ) =
1
2
(S
a
( f ) S

a
(f ))
Show that
S
ae
( f ) Re{s[n]} and S
ae
( f ) jIm{s[n]},
where Re{s[n]} and Im{s[n]} are the real and imaginary parts of the DTFT s[n] respectively. Verify this property
on s[n] = e
j0.1n
[(n) (n20)] using the MATLAB functions developed in Chapter 1.
Cologne University of Applied Sciences 10 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 4.9
Using the frequency-shifting property of the DTFT, show that the real part of S
a
(F) of a sinusoidal pulse
s[n] = cos(2F
0
n) R
M
[n], where R
M
[n] is the rectangular pulse given in Problem 4.4 is given by
Re{S
a
(F)} =
1
2
cos((M1)(F F
0
))
sin(N(F F
0
))
sin((F F
0
))
+
1
2
cos((M1)(F +F
0
))
sin(N(F +F
0
))
sin((F +F
0
))
Compute and plot Re{S
a
(F)} for F
0
= 1/4 and M = 5, 15, 25, 100. Use the plotting interval [1/2, 1/2] for F.
Comment on your results.
Problem 4.10
Let s[n] = T
10
[n] be a triangular pulse given in Problem 4.4. Using properties of the DTFT, determine and plot
the DTFT of the following sequences.
a) s[n] = T
10
[n]
b) s[n] = T
10
[n] T
10
[n10]
c) s[n] = T
10
[n] T
10
[n]
d) s[n] = T
10
[n] e
jn
e) s[n] = T
10
[n] cos(20.05n)
Problem 4.11
For each of the linear, shift-invariant systems described by the impulse response, determine the frequency
response function H
a
(F). Plot the magnitude response |H
a
(F)| and the phase response
a
(F) = H
a
(F) over
the interval [-1/2,1/2].
a) h[n] = (0.9)
|n|
b) h[n] = si(0.2n)[[n+20] [n20]]
c) h[n] = si(0.2n)[[n] [n40]]
d) h[n] = (0.9)
|n|
e) h[n] = (0.5)
|n|
cos(20.05n)
Problem 4.12
Let s[n] = Acos(2F
0
n +
0
) be an input sequence to an LTI system described by the impulse response h[n].
Show that the output sequence g[n] is given by
g[n] = A|H
a
(F
0
)| cos(2 f
0
n+
0
+H
a
(F
0
))
Problem 4.13
Let s[n] = Acos(20.25n +60

) be the input to each of the systems described in Problem Problem 4.11. In

each case determine the output sequence g[n].
Problem 4.14
For a linear, shift-invariant system described by the difference equation
g[n] =
M

m=0
b
m
s[nm] +
N

l=1
a
l
g[nl]
the frequency response function is given by
H
a
(F) =
M

m=0
b
m
e
j2mF
1+
N

l=1
a
l
e
j2lF
Cologne University of Applied Sciences 11 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Write a MATLAB function freqresp to implement the above relation. The format of this function should be
function [H]=freqresp(b,a,F)
% Frequency response from difference equation
%
% [H]=freqresp(b,a,F)
% H = frequency response computed at normalized frequencies F
% b = numerator coefficient vector
% n = denominator coefficient vector
% F = normalized frequency location vector
Problem 4.15
Determine H
a
(F) and plot its magnitude and phase for each of the following systems:
a) g[n] =
1
5
4

m=0
s[nm]
b) g[n] = s[n] s[n2] +0.95g[n1] 0.9025g[n2]
c) g[n] = s[n] s[n1] +s[n2] +0.95g[n1] 0.9025g[n2]
d) g[n] = s[n] 1.7678s[n1] +1.5625s[n2] +1.1314g[n1] 0.64g[n2]
e) g[n] = s[n]
5

m=1
(0.5)
m
g[nm]
Problem 4.16
A linear, shift-invariant system is described by the difference equation
g[n] =
3

m=0
s[n2m]
3

m=1
(0.81)
m
g[n2m]
Determine the steady-state response of the system to the following inputs:
a) s[n] = 5+10(1)
n
b) s[n] = 5+cos(20.25n+/2)
c) s[n] = 2sin(21/8 n) +3cos(23/8 n)
d) s[n] =
5
k=0
(k +1)cos(2k/8 n)
e) s[n] = cos(2
1
2
n)
Cologne University of Applied Sciences 12 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Chapter 5: The z-Transform
Problem 5.1
Determine the z-transform S(z) of the following discrete-time signals s[n]:
a) s[n] = n a
n1
[n]
b) s[n] = (1/5)
n
n [n]
c) s[n] = n [n] (n4) [n4] 4 [n5]
d) s[n] = 2n
2
[n] +
n
m=0
(1/2)
m
e) s[n] = ([n1] [n4]) ([n] [n3])
f) s[n] = (1/5)
n
e
jn
[n]
g) s[n] = [sin(n/4) +cos(n/4)] [n]
Problem 5.2
For the discrete-time LSI systems described by the system functions below, determine the poles and zeros of
the system function, the pole-zero plot and check whether the system is stable. For each system, determine the
initial value h and, if it exists, the nal value lim
n
h[n] of the impulse response h[n] .
a) H(z) =
2z
2
+z
(z 1) (z +1/2)
b) H(z) =
z
2
3z
(z 1/10) (z 3/5)
c) H(z) =
1
z
2
1/2 z 1/2
d) H(z) =
3z
3
6z
2
(z 1)
2
(z 1/5)
e) H(z) =
16z
2
+12z +2
z
2
3/2 z 1
f) H(z) =
sin(b) z
z
2
2cos(b) z +1
Problem 5.3
Determine rst 3 values n =0, 1, 2 of the discrete-time signals s[n] corresponding to the z-transforms S(z) given
below by polynomial long devision and check your results with Matlab/Octave using the filter function:
a) S(z) =
3z
1
33z
3
1+3z
1
2 z
2
b) S(z) =
3z +2
z
2
1/2 z +1
c) S(z) =
2+4z
1
23z
1
+z
2
d) S(z) =
z (z
2
+3z)
z
3
1/2 z
2
+3/2 z 2
Problem 5.4
For each of the z-transforms given below, determine the corresponding discrete-time signal s[n] using partial
fraction expansion:
a) S(z) =
z +1
1/2z 1/10
b) S(z) =
5

2

z
z
2

2 z +1
c) S(z) =
1
(z +2/5) (z
2
1/25)
Problem 5.5
An LSI system is given by the system function H(z) =
z
2
2z +1
z
2
1/4
.
a) Determine the poles and zeros of H(z) and sketch the pole-zero plot. Is the system stable?
b) Determine the difference equation representation of the system, if s[n] is the input signal and g[n] is the
output signal.
c) Determine the output g[n] if the input is s[n] = 6n
2
[n]. Check your result using the filter function.
Cologne University of Applied Sciences 13 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 5.6
Im{z}
x
-1
x o
Re{z}
z
N1
1
z
P2
z
P1
o
z
N2
An LSI-Systems is given by the following pole-zero locations:
Zeros: z
N1
= 0, z
N2
= 1 , poles: z
P1
= 1/3, z
P2
= 1/2
and lim
z
H(z) = 6.
a) Determine the system function H(z). Is this system stable?
b) Sketch a block diagram of the system.
c) Determine the step response h

[n] of the system, i.e. the system

response if the input is the unit step [n]. Check your result using
the filter function.
Problem 5.7
An LSI system is given by the following system function: H(z) =
z
2
+1
z
2
+1/4
.
a) Determine the poles and zeros of H(z) and sketch the pole-zero plot. Is this system stable?
b) Determine the impulse response h[n]. Check your result using the filter function. Plot h[n] using the
stem function.
c) Determine the values of the frequency response H
a
( f ) for the following frequencies: f
0
=0, f
1
=r/8, f
2
=
r/4, f
3
= r/2,
where r = 1/T is the sampling rate.
d) Check your results and plot the magnitude |H
a
( f )| of the frequency response using the freqz function.
Problem 5.8
For the linear, causal, and time-invariant systems described by the difference equations below, determine (i)
the impulse response representation, (ii) the system function representation, (iii) the pole-zero plot, and (iv) the
output g[n], if the input signal is s[n] = 2(0.9)
n
[n].
a) g[n] = (s[n] +2s[n1] +s[n3])/4
b) g[n] = s[n] +0.5s[n1] 0.5g[n1] +0.25g[n2]
c) g[n] = 2s[n] +0.5g[n1]
d) g[n] = 0.45s[n] 0.4s[n1] +s[n2] +0.4g[n1] +0.45g[n2]
e) g[n] =
4

m=0
(1.25)
m
s[nm]
4

l=1
(0.8)
l
g[nl]
Problem 5.9
A stable system has the following pole-zero locations: Zeros: z
N1
= j, z
N2
= j, poles: z
P1,2
=
1
2
j
1
2
.
It is also known that the DCgain is zero dB, i.e. the frequency response evaluated at zero frequency is H
a
(0) =1.
a) Determine the system function H(z) and indicate its region of convergence.
b) Determine the difference equation representation.
c) Determine the system response g[n] if the input is s[n] = sin(2n/4)[n].
d) Determine the steady-state response g
ss
[n] if the input is s[n] = sin(2n/4)[n].
Cologne University of Applied Sciences 14 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Problem 5.10
A digital lter is described by the difference equation g[n] = s[n] +s[n1] +0.9g[n1] 0.81g[n2].
a) Using the freqz function, plot the magnitude and phase of the frequency response H
a
(F). Note the magni-
tude and phase at F = 1/6 and F = 1/2.
b) Generate 250 samples of the signal s[n] = sin(2 1/6n) +5cos(2 1/2n) and process them through the
lter. Compare the steady-state portion of the output to s[n]. How are the amplitudes and phases of the two
sinusoids affected by the lter?
Problem 5.11
Determine the output signal g[n] for an LSI system given by the difference equation
g[n] = s[n] +0.5g[n1] +0.25g[n2]
if the input signal is s[n] = (0.8)
n
[n]. Check your result using the filter function.
Problem 5.12
A causal LSI system is given by the following difference equation:
g[n] 0.4g[n1] 0.45g[n2] = 0.45s[n] +0.4s[n1] s[n2]
a) Using the freqz function, plot the magnitude and phase of the frequency response H
a
(F).
b) Determine the output signal g[n] if the input signal is s[n] = 2 + (0.5)
n
[n]. Decompose the input signal
into an aperiodic and a periodic component s[n] = s
periodic
[n] +s
aperiodic
[n]. Determine the system responses
g
periodic
[n] and g
aperiodic
[n] to s
periodic
[n] and s
aperiodic
[n] separately and use the superposition principle to
derive g[n].
Problem 5.13
A causal LSI system is given by the following difference equation:
g[n] = s[n1] +g[n1] +g[n2].
a) Find he system function H(z) for this system.
b) Plot the poles and zeros of H(z) and indicate the region of convergence (ROC).
c) Determine the impulse response h[n] of this system.
d) Is this system stable? Justify your answer.
Problem 5.14
Determine the output signal g[n] for an LSI system given by the difference equation
g[n] = s[n] +3s[n1] +0.25g[n1].
if the input signal is s[n] = e
j2n/8
[n]. Check your result using the filter function. What is the steady-state
response of the system.
Cologne University of Applied Sciences 15 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
Chapter 7: Digital Filter Design
Problem 7.1
An ideal lowpass lter is described in the frequency-domain by
H
a
(F) =

1 e
j2F
, 0 |F| F
c
0, F
c
< |F| 1/2
where F
c
is called the cutoff frequency and is called the phase delay.
a) Determine the ideal impulse response h[n] using the IDTFT.
b) Determine and plot the truncated impulse response h
d
[n] =

h[n], 0 n N1
0, otherwise
, for N = 41, = 20,
and F
c
= 1/4.
c) Determine and plot the frequency response function |H
da
(F)| and compare it with the ideal lowpass lter
response |H
a
(F)|. Comment on your observations.
Problem 7.2
An ideal highpass lter is described in the frequency-domain by
H
a
(F) =

0, 0 |F| F
c
1 e
j2F
, F
c
< |F| 1/2
where F
c
is called the cutoff frequency and is called the phase delay.
a) Determine the ideal impulse response h[n] using the IDTFT.
b) Determine and plot the truncated impulse response h
d
[n] =

h[n], 0 n N1
0, otherwise
for N = 31, = 15, and
F
c
= 1/4.
c) Determine and plot the frequency response function |H
da
(F)| and compare it with the ideal highpass lter
response |H
a
(F)|. Comment on your observations.
Chapter 8: Probability Theory
Problem 8.1
Consider an ensemble of sinusoids with random amplitude:
k
s(t) = A
k
cos(2 f
0
t).
The amplitude A is a random variable uniformly distributed over 0V A 2V.
a) Sketch the probability distribution function (PDF) f
A
(x) of the random variable A and nd its mean and its
mean square value.
The frequency shall be given as f
0
= 1kHz.
b) Find the ensemble averages E{s(0)}, E{s
2
(0)} and E{s(t
1
)}, E{s
2
(t
1
)} where t
1
= 0.5ms.
Is this process stationary?
Problem 8.2
Consider an ensemble of sinusoids with random phase:
k
s(t) = A cos(2 f
0
t +
k
).
The phase is a random variable presumably with a uniform distribution over 0 2.
a) Sketch four sample functions
k
s(t) for = 0, = /2, = , = 3/2 over 0 t 1/ f
0
.
Cologne University of Applied Sciences 16 Prof. Dr.-Ing. Harald Elders-Boll
Summer Term 2014 Digital Signal Processing
b) Find mean and mean-square E{s(0)}, E{s
2
(0)} at time t = 0.
c) Find mean and mean-square E{s(t)}, E{s
2
(t)} at an arbitrary time t.
d) Find the autocorrelation function
ss
(t
1,
t
2
) = E{s(t
1
)s(t
2
)} to decide whether the process is (wide sense)
stationary.
e) Find the corresponding time averages
k
s(t),
k
s
2
(t) and s(t)s(t +) to decide whether it is (wide sense)
ergodic.
f) Determine the power density spectrum
ss
( f ).
Problem 8.3
A sample function of a random process is generated by repeating a 10 seconds randomly chosen segment of
a hard rock compact disk (CD). The segment to be repeated is chosen randomly. Assume that this selection
happened innitely long ago. Is the process stationary?
Problem 8.4
White noise with power spectral density N
0
/2 is applied to an RC-lowpass with impulse response h(t) =
1
T
(t) e
t/T
.
a) Find the power density spectrum
gg
( f ) of the output process g(t) and calculate the output noise power.
b) Find the autocorrelation function
gg
() of the output process g(t) and calculate the output noise power.
Problem 8.5
Consider an LTI system with transfer function H( f ) = Trect(T f ) cos(T f ).
a) Find the impulse response h(t) and its autocorrelation function
E
hh
().
The input signal is a wide-sense stationary random process s(t) with power density spectrum
ss
( f ) = N
0
+
c( f ) and c > 0.
b) Compute mean m
s
and the ACF
ss
() of the input process s(t).
c) Compute the power density spectrum
gg
( f ), mean m
g
, the ACF
gg
(), and the power P
g
of the output
process g(t).
Problem 8.6
Consider two uncorrelated, jointly stationary random processes s(t) and g(t) with power density spectra given
by
ss
( f ) = rect( f ) +2( f ) and
gg
( f ) =( f ).
a) Find mean, power and variance of both processes.
b) Sketch the ACF and the power density spectrum of the sum process r(t) = s(t) +g(t) and nd its power and
variance.
Cologne University of Applied Sciences 17 Prof. Dr.-Ing. Harald Elders-Boll