Digital Signal Processing Answers
Digital Signal Processing Answers
ELEC96010 (EE3-07)
Aidan O. T. Hogg {[email protected]}
Imperial College London, (last updated: September 9, 2020)
Module 1
Self-assessment Quiz
1. Consider xa (t) = cos(100πt)
(a) Determine the minimum sampling rate to avoid aliasing
Frequency of xa (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.
F 50 π
x[n] = 3 cos(ωn) = 3 cos(2πf n) = 3 cos 2π n = 3 cos 2π n = 3 cos n
Fs 200 2
(c) Write down an expression for x[n] if a sampling frequency of 75 Hz is used.
F 50 4π 2π
x[n] = 3 cos 2π n = 3 cos 2π n = 3 cos n = 3 cos n
Fs 75 3 3
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?
F 1200
ω = 2π = 2π = 0.05π
Fs 4800
π
3. What is meant when we refer to a frequency of 4?
F π Fs
ω = 2π = ∴ F = , i.e. it means an eighth of the sampling frequency.
Fs 4 8
4. Given x[n] = (0.5)n u[n], find the signals z-transform X(z) and the corresponding ROC.
∞
X ∞
X
X(z) = x[n]z −n = (0.5)n z −n = 1 + 0.5z −1 + 0.25z −2 + · · ·
n=−∞ n=0
1 1
= , where |0.5z −1 | < 1. Recall 1 + α + α2 + · · · = if |α| < 1.
1 − 0.5z −1 1 − αz −1
1
Thus X(z) = , where 0.5 < |z|
1 − 0.5z −1
5. For a signal x[n] with z-transform X(z) and ROC r1 < |z| < r2 find the z-transform of x[−n] using
the time-reversal property.
∞
X
Z {x[n]} = X(z) = x[n]z −n ROC: r1 < |z| < r2
n=−∞
∞
X
Z {x[−n]} = x[−n]z −n
n=−∞
X∞
= x[m]z m where m = −n
m=−∞
∞
X
= x[m](z −1 )−m
m=−∞
∞
X
X(z) = x[n]z −n
n=0
∞
X h x[1] x[2] i
lim X(z) = lim x[n]z −n = lim x[0] + + 2 + ···
z→∞ z→∞
n=0
z→∞ z z
= 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
X(z) = x[n]z −1
n=−∞
P∞
The ROC is the set of z for which X(z) converges absolutely, i.e. n=−∞ |x[n]z −1 | < ∞.
Due to:
√
p
1.6 ± (1.62 ) − 4 · 0.65
z= = 0.8 ± 0.01
2
Therefore:
p
ROC: |z| > (0.8)2 + (0.1)2 = 0.8062
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).
Y (z) 1
H(z) = =
X(z) 1 − 1.6z + 0.65z −2
−1
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)
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.
∞
X
Y (z) = y[n]z −n
n=0
X∞ ∞
X
= h[r]x[n − r]z −n
n=−∞ r=−∞
X∞ ∞
X
= h[r]x[m]z −r z −m , where m = n − r
m=−∞ r=−∞
∞
X ∞
X
= x[m]z −m h[r]z −r
m=−∞ r=−∞
= X(z)H(z)
7z 2 −5z
5. Find the inverse z-transform of the system X(z) = z 2 −2z−3 for the following regions of convergence.
(a) |z| < 1
(b) |z| > 3
(c) 1 < |z| < 3.
7z 2 − 5z 7z − 5 7z − 5
4 3
X(z) = 2 =z 2 =z =z +
z − 2z − 3 z − 2z − 3 (z − 3)(z + 1) z−3 z+1
4 3
= + , poles: z = {3, -1}
1 − 3z −1 1 + z −1
Alternately:
7z 2 − 5z 12 −3 12z −1 −3z −1
X(z) = = 7 + + = 7 + +
z 2 − 2z − 3 z−3 z+1 1 − 3z −1 1 + z −1
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?
Fs 1000 pts/s
∆F = = = 3.9063 Hz
N 256 pts
4. What is the DFT of the sequence p[n] = {−20, 7.5, −2}
2π 2π
Here is the DFT matrix of DN for N = 3. Where w = e−j N (i.e w3 = e−j 3 )
1 1 1 1 1 1
2π 4π
DFT Matrix: D4 = 1 w3 w32 = 1 e−j 3 e−j 3
2 4 4π 8π
1 w3 w3 1 −e 3 e−j 3
−j
1 1 1 −20
2π 4π
P [k] = 1 e−j 3 e−j 3 7.5
4π 8π
1 −e−j 3 e−j 3 −2
Thus:
P [0] = −20 + 7.5 − 2 = −14.5
2π 4π
P [1] = −20 + 7.5e−j 3 − 2e−j 3 = −20 + 7.5[−0.5 − 0.87j] − 2[−0.5 + 0.87j] = −22.75 − 8.23j
−j 4π −j 8π
P [2] = −20 + 7.5e 3 − 2e 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:
16
N = 16 ≈ log2 (16) = 32 multiplications - The saving is a factor of 8
2
1024
N = 1024 ≈ log2 (1024) = 5120 multiplications - The saving is a factor of 205
2
4096
N = 4096 ≈ log2 (4096) = 24576 multiplications - The saving is a factor of 682
2
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].
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].
N −1
2π
X
X(z) = x[n]e−j N kn for k = 0, 1, 2, 3 · · · N − 1
n=0
This calculation contains N complex multiplications or 4N 2 real multiplications.
2
(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.
(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:
PN −1 2kn
X[2k] = n=0 x[n]wN
PN/2−1 2kn
PN/2−1 2k(n+N/2)
= n=0 x[n]wN + n=0 x[n + N/2]wN
PN/2−1 2kn
PN/2−1 2kn
= n=0 x[n]wN + n=0 x[n + N/2]wN ×1
PN/2−1 kn
= n=0 (x[n] + x[n + N/2])wN/2
PN/2−1 kn
= n=0 g1 [n]wN/2 g1 [n] = x[n] + x[n + N/2]
PN −1 (2k+1)n
X[2k + 1] = n=0 x[n]wN
PN/2−1 N/2 (2k+1)n
= n=0 (x[n] + wN x[n + N/2])wN
PN/2−1 n kn
= n=0 ((x[n] − x[n + N/2])wN )wN/2
PN/2−1 kn n
= n=0 g2 [n]wN/2 g2 [n] = (x[n] − x[n + N/2])wN
Therefore:
N/2−1
X
kn N
X[2k] = g1 [n]wN/2 g1 [n] = x[n] + x n +
n=0
2
N/2−1
X
kn N n
X[2k + 1] = g2 [n]wN/2 g2 [n] = x[n] − x n + wN
n=0
2
x[0] X[0]
−1 w40
x[1] X[2]
−1 w40
x[2] X[1]
1
−1 w41 −1 w40
x[3] X[3]
The first task is to determine the intermediate g signals from the given values of x:
N
g1 [n] = x[n] + x n + , g1 [n] = {(−2 + 1), (1 − 1)} = {−1, 0}
2
N n
g2 [n] = x[n] − x n + wN , g2 [n] = {(−2 − 1), −j(1 + 1)} = {−2, −2j}
2
Tutorial Questions
1. Find the Discrete Fourier Series coefficients for the sequence xp [n] = 10 sin(2πn/3):
Calculate xp [n]:
n = 0 : xp [0] = 0
n = 1 : xp [1] = 10 sin(2π/3) = 8.66
n = 2 : xp [2] = 10 sin(4π/3) = −8.66
Calculate Xp [k]:
N −1
2π
X
Xp [k] = xp [n]e−j N nk
n=0
1 1 1 1 1 1
2π 4π
DFS Matrix: D4 = 1 w w2 = 1 e−j 3 e−j 3
4π 8π
1 w2 w4 1 −e−j 3 e−j 3
1 1 1 0 0 + 8.66 − 8.66
2π 4π
Xp [k] = 1 e−j 3 e−j 3 8.66 = 0 + 8.66(−0.5 − j0.866) − 8.66(−0.5 + j0.866)
4π
−j 8π
1 −e−j 3 e 3 −8.66 +8.66(−0.5 + j0.866) − 8.66(−0.5 − j0.866)
0
= −15j
15j
Therefore:
Xp [k] = [ · · · 0 −15j 15j ··· ]
|Xp [k]| = [ · · · 0 15 15 ··· ]
∠Xp [k] = [ · · · 0 − π2 π
2 ··· ]
π
15 2
− π2
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:
N −1
2π
X
Xp [k] = xp [n]e−j N nk
n=0
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?
N 1024
∆T = = = 128 ms
Fs 8000
(b) What is the frequency resolution of the DFT?
Fs 8000 pts/s
∆F = = = 7.8 Hz
N 1024 pts
(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:
(
x[n/2], for n even
y[n] =
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 are also told that sequence y[n] is the sequence x[n] upsampled by a factor of 2:
By definition we know:
N −1
2π
X
X[k] = x[n]e−j N nk , where N = 8
n=0
(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)
2N −1
2π
X
Y [k] = y[n]e−j 2N nk , where N = 8
n=0
(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:
2N −1 2N −1
X n 2π
X 2π
Y [k] = x[ ]e−j 2N nk + 0 × e−j 2N nk
2
n=0 (n even) n=0 (n odd)
Which is just:
2N −1
X n 2π
Y [k] = x[ ]e−j 2N nk
2
n=0 (n even)
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]
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?
∆ P∞
Linear Convolution: y[n] = x[n] ∗ h[n] = k=−∞ x[k]h[n − k]
Proof:
The input is x[n] due to fact that any signal can be expressed as a sum of impulses:
∞
X
x[k]δ[n − k] = x[n]
k=−∞
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).
5. What values are assigned to the first M-1 samples of each block in the overlap-save approach?
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.
∆ P∞
Linear Convolution: y[n] = x[n] ∗ h[n] = 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
∆ PN −1
Circular Convolution: y[n] = x[n] ~N h[n] = 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).
2π 2π
Here is the DFT matrix of FN for N = 4. Where w4 = e−j N (i.e w4 = e−j 4 = −j)
1 1 1 1 1 1 1 1
1 w4 w42 w43 1 −j −1 j
DFT Matrix: F4 = 1 w42 w44 w46 = 1 −1 1 −1
Therefore:
1 1 1 1 1 4 1 1 1 1 2 6
1 −j −1 2 = 1 − j ,
j −j −1 2 = 1 − j
1 j
P [k] =
1 −1 Q[k] =
1 −1 0 −2 1 −1 1 −1 1 0
1 j −1 −j 1 1+j 1 j −1 −j 1 1+j
(c) Using the above DFT result, compute the circular convolution of p(n) and q(n).
4 6 24
1 − j 1 − j −2j
−2 0 = 0
P [k]Q[k] =
1+j 1+j 2j
1 1 1 1
1 1 j −1 −j
Inverse DFT Matrix: D4 =
4 1 −1 1 −1
1 −j −1 j
Therefore:
1 1 1 1 24 6
1 1 j −1 −j −2j 7
y[n] = =
4 1 −1 1 −1 0 6
1 −j −1 j 2j 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).
∞
X
W (z) = w[n]z −n
n=0
X∞ ∞
X
= x[r]y[n − r]z −n
n=−∞ r=−∞
X∞ ∞
X
= x[r]y[m]z −r z −m , where m = n − r
m=−∞ r=−∞
∞
X ∞
X
= x[m]z −m y[r]z −r
m=−∞ r=−∞
= X(z)Y (z)
PN −1
2. Show that x3p [n] = l=0 x1p [l]x2p [n − l] given that Xp [k] is the DFS of xp [n] and that X3p [k] =
X1p [k]X2p [k] .
Consider two periodic signals:
N −1
2π
X
X1p [k] = x1p [l]e−j N lk
l=0
N −1
2π
X
X2p [k] = x2p [r]e−j N rk
r=0
Therefore:
N −1 N −1 N −1
1 X X X 2π
x3p [n] = x1p [l]x2p [r]e−j N (l+r−n)k
N r=0
k=0 l=0
By changing the order of the summations this can be written in the following form:
N −1 N −1 h NX−1
1 X X 2π
i
x3p [n] = x1p [l] x2p [r] e−j N (l+r−n)k
N r=0 n=0
l=0
We know that if (l+r−n) = 0 then the summation just equals N We also know that if (l+r−n) 6= 0
n
then we can use the identity for a finite geometric sum, a( 1−r
1−r ), to obtain:
N −1 2π
X 2π 1 − e−j N (l+r−n)kN 1 − e−j2π(l+r−n)k
e−j N (l+r−n)k = 2π = 2π =0
n=0 1− e−j N (l+r−n)k 1 − e−j N (l+r−n)k
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}
N
i. chop x[n] into K chunks of length K
ii. convolve each chunk with h[n]
iii. add up the results
N
(1) Chop x[n] into K hunks of length K where K = 3
Chunk 1 = [3, 2, 1]
Chunk 2 = [4, 1, 2]
Chunk 3 = [3, 2, 1]
N
i. chop x[n] into K overlapping chunks of length K + M − 1
ii. ~K+M −1 each chunk with h[n]
iii. discard first M − 1 from each chunk
iv. concatenate to make y[n]
N
(1) Chop x[n] into 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]
Therefore:
Chunk 1 ~h (n):
0 1 2 3 1 1
3 0 1 2 1 3
=
2 3 0 1 0 5
1 2 3 0 0 3
Chunk 2 ~h (n):
1 2 1 4 1 3
4 1 2 1 1 5
=
1 4 1 2 0 5
2 1 4 1 0 3
Chunk 3 ~h (n):
2 1 2 3 1 3
3 2 1 2 1 5
=
2 3 2 1 0 5
1 2 3 2 0 3
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.37
0.87
0.79
0 0 0
-13.0 dB
-31.5 dB
|W | (dB)
|W | (dB)
|W | (dB)
-40.0 dB
−50 −50 −50
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.
Exam Questions
1. The system function of an FIR filter is given by
N
X −1
H(z) = bk z −k
k=0
M
X −1 2M
X
H(ejω ) = h[n]e−jnω + h[n]e−jnω
n=0 n=M
M
X −1 M
X −1
= h[n]e−jnω + h[N − n]e−j(N −n)ω
n=0 n=0
hM
X −1 M
X −1 i
= e−jM ω h[n]ej(M −n)ω + h[N − n]e−j(M −n)ω
n=0 n=0
hM
X −1 M
X −1 i
= e−jM ω h[n]ej(M −n)ω − h[n]e−j(M −n)ω
n=0 n=0
M
X −1
= e−jM ω 2jh[n] sin(ω[M − n])
n=0
M −1
π
X
= ej( 2 −M ω) 2h[n] sin(ω[M − n])
n=0
π
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.
x[n] z −1 z −1 z −1
+ + + + z −1
z −1 z −1 z −1
+ + + y[n]
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(ejω ).
H[k] = H(ejω ) 2π
ω= N k, for k=0,1,2,··· ,N −1
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
N −1
is imparted
A linear phase of
2
N −1
This phase shift is due to the fact that a linear filter has a constant phase delay of 2 .
N/2−1 N −1
X X
H(ejω ) = h[n]e−jnω + h[n]e−jnω (split sum)
n=0 n=N/2
N/2−1 N/2−1
X X 0
= h[n]e−jnω + h[N − 1 − n0 ]e−j(N −1−n )ω (n0 = N − 1 − n)
n=0 n0 =0
N/2−1 N/2−1
X X
= h[n]e−jnω + h[n]e−j(N −1−n)ω (symmetry of h[n])
n=0 n=0
N/2−1 h i
X
= h[n]e−jnω + h[n]e−j(N −1−n)ω
n=0
N/2−1 h i
N −1 X N −1 N −1
= e−j 2 ω h[n]ej( 2 −n)ω + h[n]e−j( 2 −n)ω
n=0
M −1
N −1
−j N 2−1 ω N −1
X
=e 2h[n] cos ω −n = e−j 2 ω Hreal (ejω ) (real since h[n] is real)
n=0
2
2. Find an expression for the d.c. gain of the first order lowpass filter
1 + z −1
H(z) = k |z| > |c|
1 − cz −1
3. For the filter of Question 2, find the value of k for unity gain at d.c.
For unity gain |H(ej×0 )| = 1
|H(ej×0 )| = 1
2k
=1
1−c
1−c
k=
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.
π 1 − c 1 + e−j π2 1 − c 1 − j
|H(ej 2 )| = × π = ×
2 1 − ce−j 2 2 1 + jc
Where
1 − c 1 − j 1
× = 10(3/20) = √
2 1 + jc 2
Therefore c = 0
1.00
1
0.75
=(z)
|H|
0
0.50
0.25
−1
0.00
−1 0 1 0 1 2 3
<(z) ω
1
1.0
=(z)
|H|
0
0.5
−1
0.0
−1 0 1 0 1 2 3
<(z) ω
|H|
0 1.0
0.5
−1
0.0
−1 0 1 0 1 2 3
<(z) ω
|H|
0 2
1
−1
0
−1 0 1 0 1 2 3
<(z) ω
|H|
0 10
5
−1
0
−1 0 1 0 1 2 3
<(z) ω
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
4
X
H(z 2 ) = bn z −2n
n=0
x[n] z −1 z −1 z −1 z −1
b0 b1 b2 b3 b4
+ + + + y[n]
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.
x[n] ↑ 21 H z ↓ 20 y[n]
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.
x[n] v[i]
A(z) ↓K
x[n] x[n]
A0 (z K ) ↓K A0 (z)
z −1 z −1
A1 (z K ) + ↓K A1 (z) +
z −1 z −1
v[i] v[i]
AK−1 (z K ) + ↓K ↓K AK−1 (z) +
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
(a) Deduce expressions for X0 (z), X1 (z), 0 (z), V1 (z), Y0 (z) and Y1 (z) in terms of X(z).
(b) Hence show that the z-transform of the output signal X(z) can be written
1 F (z)
X̂ ( z) = X(z) X(−z) H̃(z) 0
2 F1 (z)
The matrix H̃(z) is known as the aliasing component matrix. Write out H̃(z) in terms of
H0 (z) and H1 (z).
F0 (z)
X̂(z) = 0 Y (z) Y1 (−z)
F1 (z)
1 H0 (z) H1 (z) F0 (z)
= X(z) X(−z)
2 H0 (−z) H1 (−z) F1 (z)
ii. Draw a labelled illustrative sketch of the magnitude frequency response of H0 (z) and
H1 (z) in the case that they are quadrature mirror filters.
π/2 π
iii. Write down the relationship between H0 (z) and H1 (z) when they are quadrature mirror
filters.
H1 (z) = H0 (−z)
iv. Also write down the corresponding relationship between the impulse responses of these
filters.
h1 [n] = (−1)n h0 [n]
v. Deduce the condition on the synthesis filter bank such that X̂(z) is free from aliasing.
T (z)
X̂(z) = X(z) X(−z) , where X(−z)A(z) is the ’aliased’ term.
A(z)
1
A(z) = {H0 (−z)F0 (z) + H1 (−z)F1 (z)} = 0
2
Therefore F0 (z) = H1 (−z) and F1 (z) = −H0 (−z)
vi. Make an estimate of the order of H0 (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’
A
M≈ , where A = 20 log10 ()
20(ω2 − ω1 )/2π
Tutorial Questions
1. For the system below, sketch X1 (z), X2 (z), Y0 (z) and Y1 (z)
x2 [n] y0 [n]
H0 (z)
x[n] x1 [n]
↓2 ↑2
y1 [n]
H1 (z)
|X(ejω )|
−2π − 3π −π − π2 π
2
π 3π 2π ω
2 2
|H0 (ejω )|
−2π − 3π −π − π2 π
2
π 3π 2π ω
2 2
|H1 (ejω )|
−2π − 3π −π − π2 π
2
π 3π 2π ω
2 2
PM −1 j(ω−2πk)
1
Recall the downsampled spectrum: V (ejω ) = M k=0 U e M
n jω j(ω−2π) o
1
Therefore in this case... X1 (ejω ) = 2 X e 2 +X e 2
−2π − 3π −π − π2 π
2
π 3π 2π ω
2 2
n jω o
1
The spectrum 2 X e2 is:
1
2
n jω j(ω−2π) o
1
The spectrum 2 X e 2 +X e 2 is:
1
2
n o
1
The spectrum 2 X ejω + X ej(ω−2π) is:
1
2
−2π − 3π −π − π2 π
2
π 3π 2π ω
2 2
P (z)
X(z) + z −1 z −1 + Y (z)
−1
d1
Q(z) d2 R(z)
+ +
Therefore
By substitution:
d2 + d1 z −1 + d2 z −2 d2 + d1 z −1 + z −2
H(z) = z −2 + (1 − z −2
) =
1 + d1 z −1 + d2 z −2 1 + d1 z −1 + d2 z −2