Answer Booklet: Digital Signal Processing
ELEC96010 (EE3-07)
Aidan O. T. Hogg {aidan.hogg13@imperial.ac.uk}
Imperial College London, (last updated: September 9, 2020)
Module 1
Self-assessment Quiz
1. Consider x
a
(t) = cos(100πt)
(a) Determine the minimum sampling rate to avoid aliasing
Frequency of x
a
(t) is 50 Hz, therefore, 100 Hz is required to avoid aliasing
(b) Write down an expression for x[n] if a sampling frequency of 200 Hz is used.
x[n] = 3 cos(ωn) = 3 cos(2πfn) = 3 cos
2π
F
F
s
n
= 3 cos
2π
50
200
n
= 3 cos
π
2
n
(c) Write down an expression for x[n] if a sampling frequency of 75 Hz is used.
x[n] = 3 cos
2π
F
F
s
n
= 3 cos
2π
50
75
n
= 3 cos
4π
3
n
= 3 cos
2π
3
n
2. If the sampling frequency is 48 kHz, what is the frequency of the discrete time signal corresponding
to a sinusoid at 1.2 kHz?
ω = 2π
F
F
s
= 2π
1200
4800
= 0.05π
3. What is meant when we refer to a frequency of
π
4
?
ω = 2π
F
F
s
=
π
4
F =
F
s
8
, i.e. it means an eighth of the sampling frequency.
4. Given x[n] = (0.5)
n
u[n], find the signals z-transform X(z) and the corresponding ROC.
X(z) =
X
n=−∞
x[n]z
n
=
X
n=0
(0.5)
n
z
n
= 1 + 0.5z
1
+ 0.25z
2
+ ···
=
1
1 0.5z
1
, where |0.5z
1
| < 1. Recall 1 + α + α
2
+ ··· =
1
1 αz
1
if |α| < 1.
Thus X(z) =
1
1 0.5z
1
, where 0.5 < |z|
5. For a signal x[n] with z-transform X(z) and ROC r
1
< |z| < r
2
find the z-transform of x[n] using
the time-reversal property.
Z {x[n]} = X(z) =
X
n=−∞
x[n]z
n
ROC: r
1
< |z| < r
2
Z {x[n]} =
X
n=−∞
x[n]z
n
=
X
m=−∞
x[m]z
m
where m = n
=
X
m=−∞
x[m](z
1
)
m
= X(z
1
) ROC: r
1
< |z
1
| < r
2
Imperial College London EE3-07 - Digital Signal Processing
6. For a causal signal x[n], prove that lim
z→∞
X(z) = x[0].
X(z) =
X
n=0
x[n]z
n
lim
z→∞
X(z) = lim
z→∞
X
n=0
x[n]z
n
= lim
z→∞
h
x[0] +
x[1]
z
+
x[2]
z
2
+ ···
i
= x[0]
Exam Questions
1. Give the definition of the z-transform of a discrete-time signal x[n]. What is meant by the region
of convergence in the context of the z-transform?
X(z) =
X
n=−∞
x[n]z
1
The ROC is the set of z for which X(z) converges absolutely, i.e.
P
n=−∞
|x[n]z
1
| < .
2. Find the z-transform and state the region of convergence for
(a) x[n]={1,1
,9} where the time origin corresponds to the middle sample of x[n];
X(z) = z 1 + 9z
1
, for 0 < |z| <
(b) y[n] = cos(ωn) ˙u[n] where u[n] is the unit step function.
Y (z) =
X
n=−∞
cos(ωn)u[n]z
n
=
X
n=0
cos(ωn)z
n
=
X
n=0
1
2
h
e
jωn
+ e
jωn
i
z
n
=
1
2
X
n=0
e
jωn
z
n
+
X
n=0
e
jωn
z
n
=
1
2
1
1 e
jω
z
1
+
1
1 e
jω
z
1
=
1
2
1 e
jω
z
1
+ 1 e
jω
z
1
(1 e
jω
z
1
)(1 e
jω
z
1
)
=
1
2
2 (e
jω
+ e
jω
)z
1
1 (e
jω
+ e
jω
)z
1
+ z
2
=
1 cos(ω)z
1
1 2 cos(ω)z
1
+ z
2
3. Given a system defined as
H(z) =
1
1 1.6z
1
+ 0.65z
2
state the region of convergence for H(z) to be causal and give an explanation as to whether the
causal filter is also stable.
H(z) =
z
2
z
2
1.6z + 0.65
=
z
2
(z [0.8 + j0.1])(z [0.8 j0.1])
Due to:
z =
1.6 ±
p
(1.6
2
) 4 · 0.65
2
= 0.8 ±
0.01
Therefore:
ROC: |z| >
p
(0.8)
2
+ (0.1)
2
= 0.8062
The ROC includes the unit circle so the system is stable.
Aidan O. T. Hogg Page 2
Imperial College London EE3-07 - Digital Signal Processing
4. Write down the difference equation for H(z) showing the relationship between the input samples
and the output samples. Hence calculate the first 3 samples of the step response of the causal filter
H(z).
H(z) =
Y (z)
X(z)
=
1
1 1.6z
1
+ 0.65z
2
Y (z)(1 1.6z
1
+ 0.65z
2
) = X(z)
Y (z) 1.6Y (z)z
1
+ 0.65Y (z)z
2
= X(z)
y[n] 1.6y[n 1] + 0.65y[n 2] = x[n]
y[n] = x[n] + 1.6y[n 1] 0.65y[n 2]
x[n] = u[n] = ·· , 0, 0, 0, 1
, 1, 1, ···}
y[0] = 1
y[1] = 1 + 1.6 · 1 = 2.6
y[2] = 1 + 1.6 · 2.6 0.65 = 4.51
Tutorial Questions
1. Write down an expression in the z-domain for Y (z) in terms of X(x) and H(z).
Y (x) = H(z)X(z)
2. Write down an expression for X(x) in terms of x[n].
X(z) =
X
n=−∞
x[n]z
n
3. Write down an expression for y[n] in terms of x[n] and h[n].
y[n] =
X
r=−∞
h[r]x[n r]
4. Show that your expression for y[n] in question 3 is related to your expression for Y (z) in question
1 by the z-transform.
Y (z) =
X
n=0
y[n]z
n
=
X
n=−∞
X
r=−∞
h[r]x[n r]z
n
=
X
m=−∞
X
r=−∞
h[r]x[m]z
r
z
m
, where m = n r
=
X
m=−∞
x[m]z
m
X
r=−∞
h[r]z
r
= X(z)H(z)
Aidan O. T. Hogg Page 3
Imperial College London EE3-07 - Digital Signal Processing
5. Find the inverse z-transform of the system X(z) =
7z
2
5z
z
2
2z3
for the following regions of convergence.
(a) |z| < 1
(b) |z| > 3
(c) 1 < |z| < 3.
State in all cases whether the system is causal, anticausal or non-causal.
X(z) =
7z
2
5z
z
2
2z 3
= z
7z 5
z
2
2z 3
= z
7z 5
(z 3)(z + 1)
= z
4
z 3
+
3
z + 1
=
4
1 3z
1
+
3
1 + z
1
, poles: z = {3, -1}
(a) 4(3)
n
u[n 1] 3(1)
n
u[n 1] [anticausal]
(b) 4(3)
n
u[n] + 3(1)
n
u[n] [causal]
(c) 4(3)
n
u[n 1] + 3(1)
n
u[n] [noncausal]
Alternately:
X(z) =
7z
2
5z
z
2
2z 3
= 7 +
12
z 3
+
3
z + 1
= 7 +
12z
1
1 3z
1
+
3z
1
1 + z
1
(a) 7δ[n] 12(3)
(n1)
u[n] + 3(1)
(n1)
u[n] [anticausal]
(b) 7δ[n] + 12(3)
(n1)
u[n 1] 3(1)
(n1)
u[n 1] [causal]
(c) 7δ[n] 12(3)
(n1)
u[n] 3(1)
(n1)
u[n 1] [noncausal]
Aidan O. T. Hogg Page 4
Imperial College London EE3-07 - Digital Signal Processing
Module 2
Self-assessment Quiz
1. How does the Fourier transform modify the information in a signal?
The information of a signal is normally a synonym for the energy of a signal and due to parseval’s
relation this remains unchanged.
2. When applying Fourier analysis to a signal, under which circumstances should a Fourier series
analysis be employed and under which circumstances should a Fourier transform be employed?
Performing the discrete Fourier transform is equivalent to performing the discrete Fourier series
on a periodically extended finite aperiodic signal. Thus the discrete Fourier series is applied when
the signal under analysis is periodic and the discrete Fourier transform is applied when the signal
under analysis is aperiodic.
3. What is the frequency resolution of a 256 point DFT when the sampling frequency is 1000 Hz?
F =
F
s
N
=
1000 pts/s
256 pts
= 3.9063 Hz
4. What is the DFT of the sequence p[n] = {−20, 7.5, 2}
Here is the DFT matrix of D
N
for N = 3. Where w = e
j
2π
N
(i.e w
3
= e
j
2π
3
)
DFT Matrix: D
4
=
1 1 1
1 w
3
w
2
3
1 w
2
3
w
4
3
=
1 1 1
1 e
j
2π
3
e
j
4π
3
1 e
j
4π
3
e
j
8π
3
P [k] =
1 1 1
1 e
j
2π
3
e
j
4π
3
1 e
j
4π
3
e
j
8π
3
20
7.5
2
Thus:
P [0] = 20 + 7.5 2 = 14.5
P [1] = 20 + 7.5e
j
2π
3
2e
j
4π
3
= 20 + 7.5[0.5 0.87j] 2[0.5 + 0.87j] = 22.75 8.23j
P [2] = 20 + 7.5e
j
4π
3
2e
j
8π
3
= 20 + 7.5[0.5 + 0.87j] 2[0.5 0.87j] = 22.75 + 8.23j
5. Comparing an N-point DFT to an N -point FFT, what is the computational complexity reduction
for N = 16, 1024, 4096?
The DFT computational complexity:
N = 16 16
2
= 256 multiplications
N = 1024 1024
2
= 1048576 multiplications
N = 4096 4096
2
= 16777216 multiplications
The FFT computational complexity:
N = 16
16
2
log
2
(16) = 32 multiplications - The saving is a factor of 8
N = 1024
1024
2
log
2
(1024) = 5120 multiplications - The saving is a factor of 205
N = 4096
4096
2
log
2
(4096) = 24576 multiplications - The saving is a factor of 682
6. What properties of a signal x[n] must be satisfied for the DFT to be purely real?
x[n] must be conjugate symmetric, i.e. x[n] = x
[n].
Aidan O. T. Hogg Page 5
Imperial College London EE3-07 - Digital Signal Processing
Exam Questions
1. Consider a complex discrete-time signal x[n] with N samples with discrete Fourier transform
(DFT) X[k].
(a) State the expression for X[k] in terms of x[n] and the number of real multiply operations to
compute X[k].
X(z) =
N1
X
n=0
x[n]e
j
2π
N
kn
for k = 0, 1, 2, 3 ···N 1
This calculation contains N
2
complex multiplications or 4N
2
real multiplications.
(b) State what is meant by the term basis function in the content of transforms such as the
Fourier transform. Write out the expressions for the basis functions employed in a 4-point
DFT and find each of their values.
Basis functions are a set of functions that are orthogonal from which a signal can be
generated using linear combinations.
Thus the basis functions in this case are:
1
1
1
1
,
1
j
1
j
,
1
1
1
1
,
1
j
1
j
.
(c) Now consider the vectors
x = [x[0], x[1], ··· , x[N 1]]
T
and
X = [X[0], X[1], ··· , X[N 1]]
T
,
where [ ]
T
indicates the matrix transpose operation. Deduce and write out the elements of
a matrix D
N
, known as the DFT matrix, such that
X = D
N
x
showing clearly the elements of the matrix.
Here is the DFT matrix of F
N
for N = 4. Where w
4
= e
j
2π
N
(i.e w
4
= e
j
2π
4
= j)
DFT Matrix: D
4
=
1 1 1 1
1 w
4
w
2
4
w
3
4
1 w
2
4
w
4
4
w
6
4
1 w
3
4
w
6
4
w
9
4
=
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
(d) Derive the Decimation-in-Frequency radix-2 FFT algorithm and give the relevant expressions
for X[2k] and X[2k + 1]. Draw a signal flow graph of this algorithm for the case N = 4.
Illustrate the operation of the algorithm by using it to calculate X[k] for the sampled data
sequence x[n] = [2, 1, 0, 1]
The radix-2 decimation in frequency algorithm splits the discrete Fourier transform into two
parts:
X[2k] =
P
N1
n=0
x[n]w
2kn
N
=
P
N/21
n=0
x[n]w
2kn
N
+
P
N/21
n=0
x[n + N/2]w
2k(n+N/2)
N
=
P
N/21
n=0
x[n]w
2kn
N
+
P
N/21
n=0
x[n + N/2]w
2kn
N
× 1
=
P
N/21
n=0
(x[n] + x[n + N/2])w
kn
N/2
=
P
N/21
n=0
g
1
[n]w
kn
N/2
g
1
[n] = x[n] + x[n + N/2]
Aidan O. T. Hogg Page 6
Imperial College London EE3-07 - Digital Signal Processing
X[2k + 1] =
P
N1
n=0
x[n]w
(2k+1)n
N
=
P
N/21
n=0
(x[n] + w
N/2
N
x[n + N/2])w
(2k+1)n
N
=
P
N/21
n=0
((x[n] x[n + N/2])w
n
N
)w
kn
N/2
=
P
N/21
n=0
g
2
[n]w
kn
N/2
g
2
[n] = (x[n] x[n + N/2])w
n
N
Therefore:
X[2k] =
N/21
X
n=0
g
1
[n]w
kn
N/2
g
1
[n] = x[n] + x
n +
N
2
X[2k + 1] =
N/21
X
n=0
g
2
[n]w
kn
N/2
g
2
[n] =
x[n] x
n +
N
2

w
n
N
The signal flow graph follows as:
x[0]
x[1]
x[2]
x[3]
1
1
w
0
4
w
1
4
1
1
1
X[0]
w
0
4
X[2]
X[1]
w
0
4
X[3]
The first task is to determine the intermediate g signals from the given values of x:
g
1
[n] = x[n] + x
n +
N
2
, g
1
[n] = {(2 + 1), (1 1)} = {−1, 0}
g
2
[n] =
x[n] x
n +
N
2

w
n
N
, g
2
[n] = {(2 1), j(1 + 1)} = {−2, 2j}
The second part is to compute the 2-point DFTs:
X[0] = g
1
[0] + g
1
[1] = 2
X[2] = g
1
[0] g
1
[1] = 2
X[1] = g
2
[0] + g
2
[1] = 2 2j
X[3] = g
2
[0] + g
2
[1] = 2 + 2j
Tutorial Questions
1. Find the Discrete Fourier Series coefficients for the sequence x
p
[n] = 10 sin(2πn/3):
Calculate x
p
[n]:
n = 0 : x
p
[0] = 0
n = 1 : x
p
[1] = 10 sin(2π/3) = 8.66
n = 2 : x
p
[2] = 10 sin(4π/3) = 8.66
Calculate X
p
[k]:
Aidan O. T. Hogg Page 7
Imperial College London EE3-07 - Digital Signal Processing
X
p
[k] =
N1
X
n=0
x
p
[n]e
j
2π
N
nk
DFS Matrix: D
4
=
1 1 1
1 w w
2
1 w
2
w
4
=
1 1 1
1 e
j
2π
3
e
j
4π
3
1 e
j
4π
3
e
j
8π
3
X
p
[k] =
1 1 1
1 e
j
2π
3
e
j
4π
3
1 e
j
4π
3
e
j
8π
3
0
8.66
8.66
=
0 + 8.66 8.66
0 + 8.66(0.5 j0.866) 8.66(0.5 + j0.866)
+8.66(0.5 + j0.866) 8.66(0.5 j0.866)
=
0
15j
15j
Therefore:
X
p
[k] = [
|X
p
[k]| = [
X
p
[k] = [
··· 0 15j 15j ···
··· 0 15 15 ···
··· 0
π
2
π
2
···
]
]
]
15
|X
p
[k]|
π
2
π
2
X
p
[k]
2. Find the magnitude spectrum of the sequence {1, 1, 2, 3, 3}. Dont use software tools on a
computer unless you write you own.
Calculate:
X
p
[k] =
N1
X
n=0
x
p
[n]e
j
2π
N
nk
Therefore:
|X[k]| =
10.0 3.1 0.7 0.7 3.1
3. A speech signal is sampled at 8 kHz. A DFT is computed of a block of 1024 samples of the data.
(a) What is the time duration of the block?
T =
N
F
s
=
1024
8000
= 128 ms
(b) What is the frequency resolution of the DFT?
F =
F
s
N
=
8000 pts/s
1024 pts
= 7.8 Hz
Aidan O. T. Hogg Page 8
Imperial College London EE3-07 - Digital Signal Processing
(c) If only 512 data samples were taken but the block was zero padded to restore the size to 1024,
what would be the new answers to (a) and (b)?
This operation is equivalent to truncating the time domain signal by a rectangular window
which has the same as effect as performing a sinc interpolation in the frequency domain.
Thus the F is the same (7.8 Hz), however, this frequency resolution is an illusion.
Whereas the time duration, T , is halved (i.e. 64 ms)
4. A sequence y[n] is constructed from a finite duration sequence x[n] of length 8 samples in the
following manner:
y[n] =
(
x[n/2], for n even
0, for n odd
Determine Y[k] in terms of X[k] where Y[k] and X[k] are the DFTs of y[n] and x[n] respectively.
You have a sequence:
x[n] = {x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]}
You are also told that sequence y[n] is the sequence x[n] upsampled by a factor of 2:
y[n] = {x[0], 0, x[1], 0, x[2], 0, x[3], 0, x[4], 0, x[5], 0, x[6], 0, x[7], 0}
By definition we know:
X[k] =
N1
X
n=0
x[n]e
j
2π
N
nk
, where N = 8
(Note: X [k] is evaluated at 8 uniformly spaced frequencies around the unit circle. so therefore X[0] = X [8],
X[1] = X[9] and so on)
Y [k] =
2N1
X
n=0
y[n]e
j
2π
2N
nk
, where N = 8
(Note: Y [k] is evaluated at 16 uniformly spaced frequencies around the unit circle. so therefore Y [0] = Y [16],
Y [1] = Y [17] and so on)
Therefore by substitution:
Y [k] =
2N1
X
n=0 (n even)
x[
n
2
]e
j
2π
2N
nk
+
2N1
X
n=0 (n odd)
0 × e
j
2π
2N
nk
Which is just:
Y [k] =
2N1
X
n=0 (n even)
x[
n
2
]e
j
2π
2N
nk
Then if substitute n = 2m we get:
Y [k] =
N1
X
m=0
x[m]e
j
2π
2N
(2m)k
=
N1
X
m=0
x[m]e
j
2π
N
mk
= X[k]
However due to the periodicity of the DFT mentioned earlier:
(a) X[k + mN ] = X[k], where N = 8 and m is an integer. (i.e. it repeats every 8 samples)
So therefore X[0] = X[8], X[1] = X[9] and so on.
(b) Y [k + m(2N )] = Y [k] where N = 8 and m is an integer. (i.e. it repeats every 16 samples)
So we need only evaluate Y [k] where k = 0..2N 1.
Aidan O. T. Hogg Page 9
Imperial College London EE3-07 - Digital Signal Processing
Using (a) & (b) we can therefore show that:
Y [0] = X[0]
Y [1] = X[1]
Y [2] = X[2]
Y [3] = X[3]
Y [4] = X[4]
Y [5] = X[5]
Y [6] = X[6]
Y [7] = X[7]
Y [8] = X[8] = X[0]
Y [9] = X[9] = X[1]
Y [10] = X[10] = X[2]
Y [11] = X[11] = X[3]
Y [12] = X[12] = X[4]
Y [13] = X[13] = X[5]
Y [14] = X[14] = X[6]
Y [15] = X[15] = X[7]
So the solution is just:
Y [k + mN] = X[k], where N = 8, k = 0..N 1 and m = 0..1 (Note: Y [k] will repeat every 16 samples)
Aidan O. T. Hogg Page 10
Imperial College London EE3-07 - Digital Signal Processing
Module 3
Self-assessment Quiz
1. What information is needed in order to compute the output of a discrete-time LTI system?
The impulse response, the system function or the difference equation.
The behaviour of an LTI system is completely defined by its impulse response: h[n] = H (δ[n])
2. Explain the convolutions sum in terms of a sum of system impulse responses. Why is this a valid
perspective on convolution?
Linear Convolution: y[n] = x[n] h[n]
=
P
k=−∞
x[k]h[n k]
Proof:
we know h[n] = H (δ[n]) then by time invariance we get:
h[n k] = H (δ[n k])
We can use the principle of homogeneity:
x[k]h[n k] = x[k]H (δ[n k])
We can use the property of linearity:
X
k=−∞
x[k]h[n k] =
X
k=−∞
x[k]δ[n k])
The input is x[n] due to fact that any signal can be expressed as a sum of impulses:
X
k=−∞
x[k]δ[n k] = x[n]
Therefore the output is just y[n]:
y[n] =
X
k=−∞
x[k]h[n k]
3. Why does the DFT computational cost calculation include a factor of 4?
1 complex multiplication costs the same as 4 real multiplications. So if we want the complexity in
terms of real multiplications we need to include a factor of 4.
4. What differences are there, if any, between periodic convolution and circular convolution?
The DFT is the same thing as the DFS. (...well it sort of depends on who you ask... DFT is applied
to finite sequence x[n], DFS is applied to periodic sequence x[n])
Therefore periodic convolution and circular convolution are the same. Periodic convolution arises
from the multiplication of two periodic sequences in the frequency domain (i.e. DFS) whereas
circular convolution arises from the multiplication of two finite sequences in the frequency domain
(i.e. DFT).
Aidan O. T. Hogg Page 11
Imperial College London EE3-07 - Digital Signal Processing
5. What values are assigned to the first M-1 samples of each block in the overlap-save approach?
Overlap save approach:
(a) chop x[n] into
N
K
overlapping chunks of length K + M 1
(b) ~
K+M1
each chunk with h[n]
(c) discard first M 1 from each chunk
(d) concatenate to make y[n]
Therefore the first M-1 samples of each block are the same as the last M-1 samples from the
previous block.
6. Given the autocorrelation function of the input signal, and the autocorrelation function of the
impulse response, what is the autocorrelation function of the systems output?
It is just the convolution: ρ
y
= ρ
h
ρ
x
.
Exam Questions
1. Describe and compare linear convolution and circular convolution. Include relevant definitions.
Linear Convolution: y[n] = x[n] h[n]
=
P
k=−∞
x[k]h[n k]
This relates the output sequence y[n] of a linear system to the input sequence x[n] and the impulse
h[n]. If x[n] is of length M and h[n] is of length L then y[n] will be of length L + M 1
Circular Convolution: y[n] = x[n] ~
N
h[n]
=
P
N1
k=0
x[k]h[(n k)
mod N
]
This is a necessary evil in exchange for using the DFT. The multiplications of two DFTs is the
equivalent of circular convolution of two sequences in the time domain.
Note: These two types of convolution can be made equal by zero extending the input sequences.
2. Consider the two sequences p[n] = {1, 2, 0, 1} and q[n] = {2, 2, 1, 1}.
(a) Compute the linear convolution of these two sequences.
0 1 2 3 n
1 2 0 1 p[n]
2 2 1 1 q[n]
1 2 0 1
1 2 0 1 ×
2 4 0 2 ×
2 4 0 2 ×
2 6 5 5 4 1 1
(b) Compute the Discrete Fourier Transform (DFT) of p(n) and of q(n).
Here is the DFT matrix of F
N
for N = 4. Where w
4
= e
j
2π
N
(i.e w
4
= e
j
2π
4
= j)
DFT Matrix: F
4
=
1 1 1 1
1 w
4
w
2
4
w
3
4
1 w
2
4
w
4
4
w
6
4
1 w
3
4
w
6
4
w
9
4
=
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
Therefore:
P [k] =
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
1
2
0
1
=
4
1 j
2
1 + j
, Q[k] =
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
2
2
1
1
=
6
1 j
0
1 + j
Aidan O. T. Hogg Page 12
Imperial College London EE3-07 - Digital Signal Processing
(c) Using the above DFT result, compute the circular convolution of p(n) and q(n).
P [k]Q[k] =
4
1 j
2
1 + j
6
1 j
0
1 + j
=
24
2j
0
2j
Inverse DFT Matrix: D
4
=
1
4
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
Therefore:
y[n] =
1
4
1 1 1 1
1 j 1 j
1 1 1 1
1 j 1 j
24
2j
0
2j
=
6
7
6
5
(d) Also using the above DFT result, show in detail how to compute the linear convolution of
p(n) and q(n). It is not necessary to carry out the computation but a detailed description of
the computation procedure is required.
Just zero extend both sequences: ˆp[n] = {1, 2, 0, 1, 0, 0, 0} and ˆq[n] = {2, 2, 1, 1, 0, 0, 0}.
Tutorial Questions
1. Given that w[n] = x[n] y[n], show that W (z) = X(z)Y (z).
W (z) =
X
n=0
w[n]z
n
=
X
n=−∞
X
r=−∞
x[r]y[n r]z
n
=
X
m=−∞
X
r=−∞
x[r]y[m]z
r
z
m
, where m = n r
=
X
m=−∞
x[m]z
m
X
r=−∞
y[r]z
r
= X(z)Y (z)
2. Show that x
3p
[n] =
P
N1
l=0
x
1p
[l]x
2p
[n l] given that X
p
[k] is the DFS of x
p
[n] and that X
3p
[k] =
X
1p
[k]X
2p
[k] .
Consider two periodic signals:
X
1p
[k] =
N1
X
l=0
x
1p
[l]e
j
2π
N
lk
X
2p
[k] =
N1
X
r=0
x
2p
[r]e
j
2π
N
rk
Aidan O. T. Hogg Page 13
Imperial College London EE3-07 - Digital Signal Processing
Now if X
3p
[k] = X
1p
[k]X
2p
[k] then by substitution:
X
3p
[k] =
N1
X
l=0
N1
X
r=0
x
1p
[l]x
2p
[r]e
j
2π
N
(l+r)k
The periodic sequence x
3p
[n] is given by:
x
3p
[n] =
1
N
N1
X
k=0
X
3p
[k]e
j
2π
N
nk
Therefore:
x
3p
[n] =
1
N
N1
X
k=0
N1
X
l=0
N1
X
r=0
x
1p
[l]x
2p
[r]e
j
2π
N
(l+rn)k
By changing the order of the summations this can be written in the following form:
x
3p
[n] =
1
N
N1
X
l=0
x
1p
[l]
N1
X
r=0
x
2p
[r]
h
N1
X
n=0
e
j
2π
N
(l+rn)k
i
If we just consider the bracketed term which is:
N1
X
n=0
e
j
2π
N
(l+rn)k
We know that if (l+rn) = 0 then the summation just equals N We also know that if (l+rn) 6= 0
then we can use the identity for a finite geometric sum, a(
1r
n
1r
), to obtain:
N1
X
n=0
e
j
2π
N
(l+rn)k
=
1 e
j
2π
N
(l+rn)kN
1 e
j
2π
N
(l+rn)k
=
1 e
j2π(l+rn)k
1 e
j
2π
N
(l+rn)k
= 0
Putting these results together we get:
N1
X
n=0
e
j
2π
N
(l+rn)k
=
(
N, for (l + r n) = 0
0, for (l + r n) 6= 0
This can be described in the following way:
N1
X
n=0
e
j
2π
N
(l+rn)k
= Nδ[l + r n]
Consequently the expression for x
3p
can be writtem as:
x
3p
[n] =
1
N
N1
X
l=0
x
1p
[l]
N1
X
r=0
x
2p
[r]Nδ[l + r n]
=
N1
X
l=0
x
1p
[l]
N1
X
r=0
x
2p
[n l]
Due to the fact that δ[l + r n] is 0 except for r = n l where it is 1.
Aidan O. T. Hogg Page 14
Imperial College London EE3-07 - Digital Signal Processing
3. Perform the linear convolution of the sequences x[n] and h[n] using (a) the overlap add procedure
and (b) the overlap save procedure. The suggested block size is 3.
x[n] = {3, 2, 1, 4, 1, 2, 3, 2, 1}
h[n] = {1, 1}
(a) Overlap add approach:
i. chop x[n] into
N
K
chunks of length K
ii. convolve each chunk with h[n]
iii. add up the results
(1) Chop x[n] into
N
K
hunks of length K where K = 3
Chunk 1 = [3, 2, 1]
Chunk 2 = [4, 1, 2]
Chunk 3 = [3, 2, 1]
(2) each hunk with h[n]
Therefore:
Chunk 1 h(n):
3 5 3 1
Chunk 2 h(n):
4 5 3 2
Chunk 3 h(n):
3 5 3 1
(3) Add to make y[n]
Solution:
3 5 3 5 5 3 5 5 3 1
(b) Overlap save approach:
i. chop x[n] into
N
K
overlapping chunks of length K + M 1
ii. ~
K+M1
each chunk with h[n]
iii. discard first M 1 from each chunk
iv. concatenate to make y[n]
(1) Chop x[n] into
N
K
overlapping hunks of length K + M 1 where, K = 3 and M = 2
Chunk 1 = [0, 3, 2, 1] (pad M 1 zeros to the first chunk)
Chunk 2 = [1, 4, 1, 2]
Chunk 3 = [2, 3, 2, 1]
(2) ~
K+M1
each hunk with h[n]
y(n) = x(n) ~ h(n)
x(0) x(3) x(2) x(1)
x(1) x(0) x(3) x(2)
x(2) x(1) x(0) x(3)
x(3) x(2) x(1) x(0)
h(0)
h(1)
h(2)
h(3)
=
y(0)
y(1)
y(2)
y(3)
Therefore:
Chunk 1 ~
h
(n):
0 1 2 3
3 0 1 2
2 3 0 1
1 2 3 0
1
1
0
0
=
1
3
5
3
Aidan O. T. Hogg Page 15
Imperial College London EE3-07 - Digital Signal Processing
Chunk 2 ~
h
(n):
1 2 1 4
4 1 2 1
1 4 1 2
2 1 4 1
1
1
0
0
=
3
5
5
3
Chunk 3 ~
h
(n):
2 1 2 3
3 2 1 2
2 3 2 1
1 2 3 2
1
1
0
0
=
3
5
5
3
(3) Discard first M 1 samples from each chunk
3 5 3
5 5 3
5 5 3
(4) Concatenate to make y[n]
Solution:
3 5 3 5 5 3 5 5 3
Aidan O. T. Hogg Page 16
Imperial College London EE3-07 - Digital Signal Processing
Module 4
Self-assessment Quiz
1. Which filter structure, FIR or IIR has feedback and can therefore be unstable if the coefficients
are inappropriately chosen?
IIR filters can only be implemented recursively in practice, therefore, it is possible for them to be
unstable. This is the case when the the region of convergence of the impulse response of the filter
does not contain the unit circle.
2. When designing a half-band lowpass filter using the method of windows, state the value of the
stop-band attenuation achieved at the Nyquist frequency when using a rectangular, Hamming and
Hanning window respectively.
0 1 2 3
ω
0
50
100
|W | (dB)
0.37
-13.0 dB
Rectangular
0 1 2 3
ω
0
50
100
|W | (dB)
0.87
-40.0 dB
Hamming
0 1 2 3
ω
0
50
100
|W | (dB)
0.79
-31.5 dB
Hanning
The value would depend on the number of samples you use for the window, however, it is easy to
note that the value would be highest for the rectangular window followed by the Hamming and
then the Hanning windows.
3. In implementation of digital filters, rounding of numeric values has two effects in the filter. State
these effects.
Coefficient precision
Coefficients can only be stored to finite precision and, therefore, are not exact. This means that the
filter actually implemented is not correct. This is due to the fact that changes to the coefficients
results in movement of the poles and zeros.
Arithmetic precision
It is also not possible to implement exact arithmetic calculations.
4. What is the advantage of the Bilinear Transform over the Impulse Invariant transform for
converting continuous-time filters to discrete-time?
For the Bilinear Transform the Frequency response is identical in both magnitude and phase,
however, when the Impulse Invariant transform is used the frequency response is aliased.
5. Why is frequency warping needed when using the Bilinear Transform for digital filter design?
Some kind of frequency warping is obviously unavoidable in any one-to-one map because the analog
frequency axis is infinite while the digital frequency axis is finite.
Aidan O. T. Hogg Page 17
Imperial College London EE3-07 - Digital Signal Processing
Exam Questions
1. The system function of an FIR filter is given by
H(z) =
N1
X
k=0
b
k
z
k
(a) What is the order of this filter?
N-1
(b) Explain the key properties of a linear phase FIR filter in terms of the filter coefficients and
in terms of the z-domain.
The filter coefficients are symmetric or anti-symmetric
i.e. h[n] = h[N 1 n]n or h[n] = h[N 1 n]n.
The zeros have reciprocal pairs in the z-domain i.e. if z
0
exists the 1/z
0
exists.
(c) Explain the meaning of group delay and state an expression for the group delay of a linear
phase FIR filter.
The group delay τ
H
=
dH(e
jω
)
= α of a linear phase filter is constant and is equal to
N1
2
(d) A type of FIR filter of even order N = 2M has coefficients h[n] = h[N n] and h[M ] = 0.
Show that the frequency response of this FIR filter can be written
H(e
jω
) = e
jλ
M1
X
n=0
2h[n] sin(γ)
and give expressions for λ and γ.
H(e
jω
) =
M1
X
n=0
h[n]e
j
+
2M
X
n=M
h[n]e
j
=
M1
X
n=0
h[n]e
j
+
M1
X
n=0
h[N n]e
j(Nn)ω
= e
jMω
h
M1
X
n=0
h[n]e
j(Mn)ω
+
M1
X
n=0
h[N n]e
j(Mn)ω
i
= e
jMω
h
M1
X
n=0
h[n]e
j(Mn)ω
M1
X
n=0
h[n]e
j(Mn)ω
i
= e
jMω
M1
X
n=0
2jh[n] sin(ω[M n])
= e
j(
π
2
Mω)
M1
X
n=0
2h[n] sin(ω[M n])
Therefore λ =
π
2
M ω and γ = ω[M n]
(e) Describe how a linear phase FIR filter can be efficiently implemented and state quantitatively
the reduction in computational complexity achieved by the efficient implementation compared
to Direct Form 1.
The Computational saving is achieved by performing the multiplication only for each
symmetric pair of coefficients.
i.e. H(z) = h[0](1 + z
7
) + h[1](z + z
6
) + h[2](z
2
+ z
5
) + h[3](z
3
+ z
4
)
(f) Draw and label the signal flow diagram of the efficient implementation of a linear phase FIR
filter for N = 8.
Aidan O. T. Hogg Page 18
Imperial College London EE3-07 - Digital Signal Processing
z
1
z
1
z
1
+ + + +
z
1
z
1
z
1
z
1
+ + +
x[n]
y[n]
h[0] h[1] h[2] h[3]
Tutorial Questions
1. Design a causal linear phase FIR filter with 8 taps and a cut-off frequency of
π
4
using the frequency
sampling method.
The frequency sampling approach takes the IDFT of N equally spaced samples of H(e
jω
).
H[k] = H(e
jω
)
ω=
2π
N
k, for k=0,1,2,··· ,N1
Therefore the IDFT gives:
h[n] =
1
N
N1
X
k=0
H[k]e
j
2πkn
N
If we want to ensure the filter has linear phase then the designer specifies the magnitude and forces
a linear phase:
|H[k]| is specified for k = 1, 2, ··· , N 1
A linear phase of
N 1
2
is imparted
This phase shift is due to the fact that a linear filter has a constant phase delay of
N1
2
.
Proof: (if n is even)
H(e
jω
) =
N/21
X
n=0
h[n]e
j
+
N1
X
n=N/2
h[n]e
j
(split sum)
=
N/21
X
n=0
h[n]e
j
+
N/21
X
n
0
=0
h[N 1 n
0
]e
j(N1n
0
)ω
(n
0
= N 1 n)
=
N/21
X
n=0
h[n]e
j
+
N/21
X
n=0
h[n]e
j(N1n)ω
(symmetry of h[n])
=
N/21
X
n=0
h
h[n]e
j
+ h[n]e
j(N1n)ω
i
= e
j
N1
2
ω
N/21
X
n=0
h
h[n]e
j(
N1
2
n)ω
+ h[n]e
j(
N1
2
n)ω
i
= e
j
N1
2
ω
M1
X
n=0
2h[n] cos
ω
N 1
2
n

= e
j
N1
2
ω
H
real
(e
jω
) (real since h[n] is real)
Aidan O. T. Hogg Page 19
Imperial College London EE3-07 - Digital Signal Processing
Therefore in this case:
h[n] =
1
N
N1
X
k=0
|H[k]|e
j
2π
N
k×
N1
2
e
j
2πkn
N
for n = 1, 2, ··· , N 1
where the e
j
2π
N
k×
N1
2
term is imparting the phase.
Thus for this question where |H[k]| = {1, 1, 0, 0, 0, 0, 0, 1} you get:
h[n] = {0.125 0.096j, 0.125 0.231j, 0.125 0.231j, 0.125 0.096j,
0.125 + 0.096j, 0.125 + 0.231j, 0.125 + 0.231j, 0.125 + 0.096j}
2. Find an expression for the d.c. gain of the first order lowpass filter
H(z) = k
1 + z
1
1 cz
1
|z| > |c|
The d.c. gain is magnitude response evaluated a ω = 0
|H(e
j×0
)| = k
1 + e
j×0
1 ce
j×0
=
2k
1 c
3. For the filter of Question 2, find the value of k for unity gain at d.c.
For unity gain |H(e
j×0
)| = 1
|H(e
j×0
)| = 1
2k
1 c
= 1
k =
1 c
2
4. For the filter of Question 2 with unity d.c. gain, find the value of c to give -3 dB gain at ω =
π
2
.
|H(e
j
π
2
)| =
1 c
2
×
1 + e
j
π
2
1 ce
j
π
2
=
1 c
2
×
1 j
1 + jc
Where
1 c
2
×
1 j
1 + jc
= 10
(3/20)
=
1
2
Therefore c = 0
5. Sketch the magnitude response for the filter of Question 2 with k = 1.
Thus
H(e
jω
) =
1 + e
jω
1 ce
jω
Therefore when
(a) c = -0.9
H(e
jω
) =
1 + e
jω
1 + 0.9e
jω
1 0 1
<(z)
1
0
1
=(z)
0 1 2 3
ω
0.00
0.25
0.50
0.75
1.00
|H|
Aidan O. T. Hogg Page 20
Imperial College London EE3-07 - Digital Signal Processing
(b) c = -0.5
H(e
jω
) =
1 + e
jω
1 + 0.5e
jω
1 0 1
<(z)
1
0
1
=(z)
0 1 2 3
ω
0.0
0.5
1.0
|H|
(c) c = 0
H(e
jω
) = 1 + e
jω
1 0 1
<(z)
1
0
1
=(z)
0 1 2 3
ω
0.0
0.5
1.0
1.5
2.0
|H|
(d) c = 0.5
H(e
jω
) =
1 + e
jω
1 0.5e
jω
1 0 1
<(z)
1
0
1
=(z)
0 1 2 3
ω
0
1
2
3
4
|H|
(e) c = 0.9
H(e
jω
) =
1 + e
jω
1 0.9e
jω
1 0 1
<(z)
1
0
1
=(z)
0 1 2 3
ω
0
5
10
15
20
|H|
Aidan O. T. Hogg Page 21
Imperial College London EE3-07 - Digital Signal Processing
Module 5
Self-assessment Quiz
1. Using only unit delay elements, multipliers and adders, sketch the signal flow graph of the filter
with system function
H(z
2
) =
4
X
n=0
b
n
z
2n
z
1
z
1
z
1
z
1
+ + + +
x[n]
y[n]
b
0
b
1
b
2
b
3
b
4
2. Draw a labelled block diagram of a unity-gain multirate signal processing system that converts
an input signal with sampling frequency 10 kHz to an output signal with sampling frequency 10.5
kHz.
21 H
z
20
x[n] y[n]
3. On slide 5.34, prove that y
4
[n] = y
3
[n].
Upsampled Noble Identity
Note that v[n] = 0 except when
Q | n and that v[Qr] = x[r].
H(z) Q
x[r] u[r] y[n]
=
Q H(z
Q
)
x[r] v[n] w[n]
w[n] =
P
QM
s=0
h
Q
[s]v[n s] =
P
M
m=0
h
Q
[Qm]v[n Qm]
=
P
M
m=0
h[m]v[n Qm]
if Q - n, then v[n Qm] = 0 m so w[n] = 0 = y[n]
if Q | n = Qr, then w[Qr] =
P
M
m=0
h[m]v[Qr Qm] =
P
M
m=0
h[m]x[r m] = u[r] = y[Qr]
4. Given an arbitrary filter A(z), perform a Type 1 polyphase decomposition and draw the block
diagram of this filter.
If A(z) is low-pass so that it is possible to downsample its output by K without the problem of
aliasing.
A(z) K
x[n] v[i]
By decomposing A(z) into a a polyphase Type 1 representation, it is possible to take advantage of
the Noble identities. It is therefore possible to move the downsampling back through the adders
and filters. Thus A
m
(z
K
) turns into A
m
(z) at the lower sample rate. This has the effect of
massively reducing the computation.
Aidan O. T. Hogg Page 22
Imperial College London EE3-07 - Digital Signal Processing
A
0
(z
K
)
z
1
A
1
(z
K
)
+
z
1
A
K1
(z
K
)
+
K
x[n]
v[i]
K A
0
(z)
z
1
K A
1
(z)
+
z
1
K A
K1
(z)
+
x[n]
v[i]
The sample rate at v[i] is now lower, however, it is possible to restore the original sample rate by
upsampling.
Exam Questions
1. A 2-channel maximally decimated filter bank structure is shown in which the analysis filter bank
is directly connected to the synthesis filter bank. The input and output signals are x[n] and ˆx[n]
with corresponding z-transforms X(z) and
ˆ
X(z) respectively
H
0
(z) 2 2 F
0
(z)
H
1
(z) 2 2 F
e
(z)
+
X(z) X
0
(z)
X
1
(z)
ˆ
X(z)
Y
0
(z)
Y
1
(z)
V
0
(z)
V
1
(z)
(a) Deduce expressions for X
0
(z), X
1
(z),
0
(z), V
1
(z), Y
0
(z) and Y
1
(z) in terms of X(z).
X
m
(z) = H
m
(z)X(z), where m {0, 1}
V
m
(z) =
1
K
K1
X
k=0
X
m
(e
j2πk
K
z
1
k
) =
1
2
n
X
m
(z
1
2
) + X
m
(z
1
2
)
o
Y
m
(z) = V
m
(z
2
) =
1
2
{X
m
(z) + X
m
(z)} =
1
2
{H
m
(z)X
m
(z) + H
m
(z)X
m
(z)}, where k = 2
(b) Hence show that the z-transform of the output signal X(z) can be written
ˆ
X
(
z) =
1
2
X(z) X(z)
˜
H(z)
F
0
(z)
F
1
(z)
The matrix
˜
H(z) is known as the aliasing component matrix. Write out
˜
H(z) in terms of
H
0
(z) and H
1
(z).
ˆ
X(z) =
Y
0
(z) Y
1
(z)
F
0
(z)
F
1
(z)
=
1
2
X(z) X(z)
H
0
(z) H
1
(z)
H
0
(z) H
1
(z)
F
0
(z)
F
1
(z)
Aidan O. T. Hogg Page 23
Imperial College London EE3-07 - Digital Signal Processing
(c) i. Write a brief description of quadrature mirror filters.
Quadrature mirror filters are low and high pass filters with mirror symmetry at ω =
π
2
.
That is to say QMF satisfies:
(a) H
0
(z) is real and causal
(b) H
1
(z) = H
0
(z): i.e. |H
0
(e
jω
)| is reflected around ω =
π
2
(c) F
0
(z) = H
1
(z) = H
0
(z)
(d) F
1
(z) = H
0
(z) = H
1
(z)
ii. Draw a labelled illustrative sketch of the magnitude frequency response of H
0
(z) and
H
1
(z) in the case that they are quadrature mirror filters.
π/2
π
1
|H
0
(e
jω
)| |H
1
(e
jω
)|
iii. Write down the relationship between H
0
(z) and H
1
(z) when they are quadrature mirror
filters.
H
1
(z) = H
0
(z)
iv. Also write down the corresponding relationship between the impulse responses of these
filters.
h
1
[n] = (1)
n
h
0
[n]
v. Deduce the condition on the synthesis filter bank such that
ˆ
X(z) is free from aliasing.
ˆ
X(z) =
X(z) X(z)
T (z)
A(z)
, where X(z)A(z) is the ’aliased’ term.
A(z) =
1
2
{H
0
(z)F
0
(z) + H
1
(z)F
1
(z)} = 0
Therefore F
0
(z) = H
1
(z) and F
1
(z) = H
0
(z)
vi. Make an estimate of the order of H
0
(z) necessary to achieve 50 dB stopband attenuation.
Any answer in the range of 64 to 256 would be reasonable. A bonus mark available for
the a systematic approach including reference to any rule of thumb such as the ‘Fred
Harris approximation’
M
A
20(ω
2
ω
1
)/2π
, where A = 20 log
10
()
Aidan O. T. Hogg Page 24
Imperial College London EE3-07 - Digital Signal Processing
Tutorial Questions
1. For the system below, sketch X
1
(z), X
2
(z), Y
0
(z) and Y
1
(z)
H
0
(z)
2 2
H
1
(z)
x[n] x
1
[n]
y
0
[n]
y
1
[n]
x
2
[n]
2π
3π
2
π
π
2
π
2
π
3π
2
2π
ω
|X(e
jω
)|
2π
3π
2
π
π
2
π
2
π
3π
2
2π
ω
|H
0
(e
jω
)|
2π
3π
2
π
π
2
π
2
π
3π
2
2π
ω
|H
1
(e
jω
)|
Aidan O. T. Hogg Page 25
Imperial College London EE3-07 - Digital Signal Processing
Recall the downsampled spectrum: V (e
jω
) =
1
M
P
M1
k=0
U
e
j(ω2πk)
M
Therefore in this case... X
1
(e
jω
) =
1
2
n
X
e
jω
2
+ X
e
j(ω2π)
2
o
The spectrum X(e
jω
) is:
2π
3π
2
π
π
2
π
2
π
3π
2
2π
1
ω
|X(e
jω
)|
The spectrum
1
2
n
X
e
jω
2
o
is:
4π 3π 2π
π
π
2π 3π 4π
1
2
ω
The spectrum
1
2
n
X
e
jω
2
+ X
e
j(ω2π)
2
o
is:
4π 3π 2π
π
π
2π 3π 4π
1
2
ω
Recall the upsampled spectrum: V (e
jω
) = U(e
jMω
)
Therefore in this case... X
2
(e
jω
) = X
1
(e
j2ω
) =
1
2
n
X
e
jω
+ X
e
j(ω2π)
o
The spectrum
1
2
n
X
e
jω
+ X
e
j(ω2π)
o
is:
2π
3π
2
π
π
2
π
2
π
3π
2
2π
1
2
ω
Aidan O. T. Hogg Page 26
Imperial College London EE3-07 - Digital Signal Processing
Other Exam Questions
+
z
1
z
1
+
+ +
X(z) Y (z)
P (z)
R(z)Q(z)
d
1
1
d
2
Therefore
P (z) = (X(z) Q(z))
Q(z) = d
1
P (z)z
1
+ d
2
R(z)
R(z) = X(z) + P (z)z
2
Y (z) = P (z)z
2
+ Q(z)
By substitution:
Q(z) = d
1
P (z)z
1
+ d
2
R(z)
Q(z) = d
1
P (z)z
1
+ d
2
X(z) + d
2
P (z)z
2
Substitute R(z)
Q(z) = d
1
X(z)z
1
d
1
Q(z)z
1
+ d
2
X(z) + d
2
X(z)z
2
d
2
Q(z)z
2
Substitute P (z)
Q(z) =
d
2
+ d
1
z
1
+ d
2
z
2
1 + d
1
z
1
+ d
2
z
2
X(z)
Y (z) = P (z)z
2
+ Q(z)
Y (z) = (X(z) Q(z))z
2
+ Q(z) Substitute P (z)
Y (z) = X(z)z
2
+ Q(z)(1 z
2
)
Y (z) = X(z)z
2
+
d
2
+ d
1
z
1
+ d
2
z
2
1 + d
1
z
1
+ d
2
z
2
X(z)(1 z
2
)
H(z) = z
2
+
d
2
+ d
1
z
1
+ d
2
z
2
1 + d
1
z
1
+ d
2
z
2
(1 z
2
) =
d
2
+ d
1
z
1
+ z
2
1 + d
1
z
1
+ d
2
z
2
This is an allpass filter because b[n] = a
[M n]
Aidan O. T. Hogg Page 27