Exam 2018 DSP Release
Exam 2018 DSP Release
Venue ____________________
ETEN3000 Digital Signal Processing
Student Number |__|__|__|__|__|__|__|__|
EXAMINATION
End of Semester 1, 2018
1
Notes in both margins and reverse of exam paper may be written by Students during
reading time 2
4
Supplied by the University
5
1 x 16 page answer book
6
Formula sheet (separate to exam paper)
7
Mathematical Formulae and Statistical Tables
8
Materials 10
None 11
Calculator 12
13
A non-programmable calculator is permitted in this exam
14
Instructions to Students
15
All principal working steps must be shown in the solutions.
16
Attempt Questions 1, 2, 3, and either Question 4 or 5.
17
18
Total ________
End of Semester 1, 2018
ETEN3000 Digital Signal Processing
(a) A discrete-time linear time invariant system with frequency response H(e jθ ) and
n
impulse response h[n] was subjected to the input sequence x[n] = (¼) u[n]. The
output sequence was observed to have the form y[n] = aδ[n] + bδ[n-1] where a and
b are real constants.
4 2 1 1
H ( z) = + , < z <
1+ 1 z -1 1- 1 z -1 4 2
2 4
Page 1 of 5
End of Semester 1, 2018
ETEN3000 Digital Signal Processing
(a) A Type IV linear phase highpass FIR filter with 6 taps is to be designed using the
window method.
Suppose the cutoff frequency of the ideal highpass filter is θc = 0.4p, design the filter
using the Bartlett window and list the 6 filter coefficients. (9 Marks)
(b) A digital bandstop filter with the following design specification is to be realised as a
linear phase FIR filter. Suppose the frequency response of the filter is to have the form
H (e jq ) = A(q ) e- j M q 2
H ( e jq )
1 + d1 1 + d3
1
1 - d1 1 - d3
d2
0 p q
q1 q2 q3 q4
d1 = d2 = 0.1, d3 = 0.14
(ii) Can the Kaiser window found in Part (i) above be used to design a low-pass filter?
Explain. (2 Marks)
Page 2 of 5
End of Semester 1, 2018
ETEN3000 Digital Signal Processing
A digital lowpass filter with the following design specification is to be realised as an IIR
filter.
Stop-band attenuation: ³ 20 dB
Pass-band deviation: £ 1 dB
Pass-band edge: 0.2p
Stop-band edge: 0.55p
(b) Determine the transfer function H(z) of the corresponding digital IIR filter. Present
your answer in the form
b0 + b1z-1 + + bM z- M
H ( z) =
1 + a1z-1 + + a N z- N
where M and N are some positive integers and a1, , a N , b0 , , bM are real
constants. (4 Marks)
(c) Draw the Direct Form I block diagram of the IIR filter. (3 Marks)
Page 3 of 5
End of Semester 1, 2018
ETEN3000 Digital Signal Processing
(a) Let h[n] be the impulse response of an IIR filter with frequency response H(e jθ ). A
method to approximate the IIR filter with an N-tap FIR filter is as follows.
Step 1 Sample the frequency response of the IIR filter at N equally spaced frequency
points from θ = 0 to θ = 2p(N-1) / N.
j 2Np k
G[k ] = H (e ), k = 0, 1, , ( N -1)
Step 2 The coefficients of the FIR filter are given by the inverse DFT
Suppose
1
H ( z) =
1- 1 z -1
2
(b) Ten successive samples of the signal x[n] have been captured
9
x[n ] = { 2, 0, 1
2
,- 1
2
, -1, 1, - 1
2
, 0, 1
2
}n=0 .
, -1
Estimate the spectrum of x[n] to a frequency resolution of 2p/8, using the Welch
method with 25% overlap and L = 4 Bartlett windows. Ignore all runt segments.
(17 Marks)
Page 4 of 5
End of Semester 1, 2018
ETEN3000 Digital Signal Processing
(a) Use the 4-point DFT/FFT and 4-point IDFT/IFFT, and the overlap-add method to find
the linear convolution w[n] = x[n] * y[n] where (17 Marks)
(b) The continuous-time signal xc (t) is bandlimited to 5000.Hz, i.e., Xc (jw ) = 0 for
|ω| ≥ 2p(5000). Only 10.s of the signal has been recorded and is available for
processing. We would like to estimate the power spectrum of xc (t) using the available
data in the radix-2 Cooley-Tukey FFT algorithm, and it is required that the estimates
have a spectral resolution of at least 10.Hz. Suppose that we use Bartlett’s method
of periodogram averaging.
(i) If xc (t) is sampled at the Nyquist rate, what is the minimum segment length L
that we must use to get the desired spectral resolution? (7 Marks)
(ii) Using the minimum segment length of Part (a), with 10.s of data, how many
segments K are available for averaging? (5 Marks)
(iii) How does the choice of sampling rate affect the spectral resolution and variance
of the estimate? Are there any benefits to sampling above the Nyquist rate?
(5 Marks)
Page 5 of 5
SOLUTIONS
Question 1
X (e jq ) = 1 (1 - 1 e- jq )
4
and Y (e jq ) = a + be- jq
Y ( e jq )
\ H ( e jq ) = jq
= ( a + be- jq ) (1 - 14 e- jq ) = a + (b - 14 a )e- jq - 1 be- j 2q
4
X (e )
whereupon H ( e j p 2 ) = a + (b - 1 a )(- j )
4
- 1 b(-1)
4
=1
Hence a+ 1b =1 and b- 1a =0
4 4
i.e. a = 16 and b= 4
17 17
h[n ] = 16 d[n ] - 1 d [n - 2]
17 17
a + be- j p 2 a - jb a - jb
H (e j p 2 ) = = = =1
1 (1 - 1 e- j q 2
4 ) 1 (1 + j 14 ) (16 - j 4) 17
16 - j 4
\ a - jb =
17
4 2 6 6z2
H ( z) = + = =
1 + 12 z-1 1 - 14 z-1 (1 + 12 z-1 )(1 - 14 z-1 ) ( z + 12 )( z - 41 )
(bii) System is not stable since the ROC does not include the unit circle.
(biii) System is not causal since the ROC is not of the form of entries 1 or 4 in the ROC
chart. Alternatively, the system is not causal since |z| → ¥ is not in the ROC.
Question 2
hd [n ] =
2sin 2 ( p2 ( n - M2 ))
-
2sin 2 ( q2 (n - M2 ))
c
p ( n - M2 ) p ( n - M2 )
ì 2n ,
ï 0 £ n £ M2 ìï n , 0 £ n £ 2.5
ï
ï M ïï 2.5
w[n ] = ï ï
and í2 - 2Mn , M2 £ n £ M = í2 - 2.5n , 2.5 £ n £ 5
ï
ï ï
ï
ï ï
î0,
ï otherwise î0,
ï otherwise
n 0 1 2 3 4 5
hd [n] 0.1273 0.0656 -0.5150 0.5150 -0.0656 -0.1273
w[n] 0.0 0.4 0.8 0.8 0.4 0
h[n] = hd [n] w[n] 0.0 0.0262 -0.4120 0.4120 -0.0262 0.0
Now, since
width of lower passband = 2 ´q1 = 0.4p > Dq
width of stopband = q3 - q2 = 0.7p - 0.4p = 0.3p > Dq
width of upper passband = 2 ´ (p - q4 ) = 2 ´ (p - 0.9p ) = 0.2p = Dq
é A-8 ù é 23.0980 - 8 ù
and M = ê ú = ê ú = êé10.5161úù = 11
êê 2.285 Dq úú ê 2.285 ⋅ 0.2p ú
This results in a Type II filter which, according to the design matrix in pp. 13 of the
Attachment, is not suitable as a bandstop filter. We thus increase M to 12 to obtain
a Type I filter which is now suitable.
Summarising, the first-cut window design is given by
b = 0.9512 and M = 12
(bii) Yes, provided the transition width of the low-pass filter is 0.2π, and the band edges
and the pass- and stop-band tolerances are such that δ = 0.07. In fact, any window of
any length can be used to design a low-pass FIR filter with appropriate specifications
(type, band edges, tolerances.) The purpose of the window is to shape the impulse
response of the ideal filter so that the resultant FIR filter meets the frequency design
specifications.
Stop-band attenuation: ³ 20 dB
Pass-band deviation: £ 1 dB
Pass-band edge: w1 = 2 tan ( 0.22 p ) = 0.649839
Stop-band edge: w2 = 2 tan ( 0.55
2 )
p = 2.341699
20log10 a2 = - 20 a2 = 0.1 = g2
é
ê 1 log
N = êê
1- g22 g12
⋅ (
1- g12 g 22 )ùúú = é2.319332ù = 3
ú ê ú
ê 2 log w12
êê
w
( ) ú
úú
s0 s2 = s0 2 = wc2
and ( s0 + s2 ) = 2 Re {s0 } = - wc
1 1 1 -s0 s1s2
H c ( s) = s
⋅ s
⋅ s
=
1- s0
1- s1
1- s2
( s - s0 )( s - s1 )( s - s2 )
-s0 s1s2
=
(s 2
- ( s0 + s2 ) s + s0 2 ) ( s - s1 )
wc3
=
( s2 + wc s + wc2 ) ( s + wc )
wc3
=
s 3 + 2wc s 2 + 2wc2 s + wc3
1
6
³ g12
1 + (w1 wc )
w1
i.e. wc ³ 1
= 0.813973
é(1 g 2 ) - 1ù 6
êë 1 úû
Likewise, at w = w2 we require
1
6
£ g22
1 + (w2 wc )
w2
i.e. wc £ 1
= 1.088743
êë(1 g 2 ) - 1úû
é 2 ù6
Suppose wc = 1. Then
1
H c ( s) = 3 2
s + 2s + 2s + 1
Alternatively, suppose
0.813973 + 1.088743
wc = = 0.951358
2
Then
0.861057
H c ( s) =
{s2 + 0.9514s + 0.9051}{s + 0.9514}
0.861057
= 3 2
s + 1.902716s + 1.810164 s + 0.861057
H ( z) = H c ( s) 1 - z-1
s =2
1 + z-1
wc3
=
( ) ( ) + 2w ( 2 )+w
3 2
1 - z-1 1 - z-1 2 1 - z-1 3
2 -1
+ 2wc 2 -1 c c
1+ z 1+ z 1 + z-1
wc3 (1 + z-1 )3
=
(8 + 8wc + 4wc2 + wc3 ) + (-24 - 8wc + 4wc2 + 3wc3 ) z-1
+ (24 - 8wc - 4wc2 + 3wc3 ) z-2 + (-8 + 8wc - 4wc2 + wc3 ) z-3
ì
ï 1 (1 + 3z-1 + 3z-2 + z-3 )
ï
ï 21 , wc = 1
ï
ï1 - 25 z-1 + 15 z-2 - 3 z-3
=ï
í 21 21 21
ï
ï
ï 0.042855(1 + 3z-1 + 3z-2 + z-3 )
ï , wc = 0.951358
ï
ï1 - 1.264536 z -1
+ 0.764075 z -2
- 0.156698 z -3
î
(c) The Direct Form I block diagram of H(z), for wc = 1 is shown below. Block diagram
for wc = 0.951358 can be drawn similarly.
1 21
x[n] y[n]
z -1 z -1
17 25 21
z -1 z -1
17 -5 7
z -1 z -1
1 21 17
(a) Since G[k] is derived by sampling H(e jθ ) at N frequency points, g[n] is h[n] time
aliased to N samples. Now, from the Table of z-transforms,
n
h[n ] = ( 12 ) u[n ]
¥
N ùm
( 12 ) å éêë( 12 )
n n
i.e. g [n ] = úû = ( 12 ) 1
N
m =0 1 - ( 12 )
Notes:
(i) This problem is just DFT/FFT Tutorial Problem 13 posed in the form of FIR filter
design. In particular, it gives a link between FIR and IIR filter design.
(ii) Of interest is that the impulse response of the FIR filter is just the first N points of the
impulse response of the IIR filter, scaled.
(iii) The problem can also be solved as follows. From the problem statement, one can write
j 2Np k 1
G[k ] = H (e )= , a = 12
- j 2Np k
1 - ae
N -1 N -1 j 2Np nk
1 j 2Np nk 1 e
\ g [n ] =
N
å G[ k ] e =
N
å - j 2Np k
k =0 k =0 1 - ae
The above result can be derived by expanding the summation and then combining its
terms into a ratio. In particular, one can show the denominator is given by
- j 2Np ⋅0 - j 2Np ⋅1 - j 2Np ( N -2) - j 2Np ( N -1)
(1- ae ) ⋅ (1- ae ) (1- ae ) ⋅ (1- ae ) = 1- a N
If answered using this approach, students are required to write down all steps in the
tedious derivation!
w[n ] = m ⋅ wB [n ]
3
Now, the length 4 Bartlett window is given by wB [n ] = {0, 23 , 23 , 0} . Therefore, the
n =0
normalised window is given by
3
w[n ] = 2
4 ⋅ wB [n ] = {0, 2, 2, 0}
0 + ( 23 )2 + ( 23 )2 + 02 n =0
Following the steps outlined in the lecture notes, we begin with the following table
which shows segments overlapping by 25%.
n 0 1 2 3 4 5 6 7 8 9
1 1 1 1
x[n] 2 0 2
-
2
-1 1 -
2
0 2
-1
1 1
x(1) [n] 2 0 2
-
2
1 1
x (2) [ n] -
2
-1 1 -
2
1 1
x (3) [ n ] -
2
0 2
-1
We next window the sub-sequences x(1)[n], x(2)[n] and x(3)[n], and compute their
modified periodograms. However, since we want a frequency resolution of 2p/ 8, we
must first zero-pad the windowed sub-sequences to 8 points. Thus
k =1 x(1) [n] 2 0 1 - 1
2 2
(1)
w[n] x [n] 0 0 1 0 0 0 0 0
X (1) [i ]
1 -j -1 j 1 -j -1 j
= DFT {w[n] x (1) [n]}
j 28p i 2 1 1 1 1 1 1 1 1
PW(1) (e ) = 14 X (1) [i] 4 4 4 4 4 4 4 4
X (2) [i] -1 - 2 1 1 - 2 -1
0 2 2
= DFT {w[n] x [n]} (2)
+ j(1- 2) + j 2 + j(1+ 2) - j(1 + 2) - j 2 - j(1- 2)
j 28p i 2 1 1 1 1
PW(2) (e ) = 14 X (2) [i] 0 1-
2
1 1+
2
2 1+
2
1 1-
2
w[n] x(3)[n]] 0 0 1 0 0 0 0 0
X (3) [i]
1 -j -1 j 1 -j -1 j
= DFT {w[n] x(3) [n]}
j 28p i 2 1 1 1 1 1 1 1 1
PW(3) (e ) = 14 X (3)[i] 4 4 4 4 4 4 4 4
j 28p i
PW(1) ( e ) 1
4
1
4
1
4
1
4
1
4
1
4
1
4
1
4
j 28p i
PW(2) ( e ) 0 1- 1 1 1+ 1 2 1+ 1 1 1- 1
2 2 2 2
j 28p i
PW(3) ( e ) 1
4
1
4
1
4
1
4
1
4
1
4
1
4
1
4
j 2p i
SˆW (e 8 ) = 1
6
1- 1
2 3 2
1
2
1+ 1
2 3 2
5
6
1+ 1
2 3 2
1
2
1- 1
2 3 2
1
3 {PW(1) + PW(2) + PW(3) } 0.1667 0.2643 0.5 0.7357 0.8333 0.7357 0.5 0.2643
Examiner’s Note: Students are expected to show side calculations in the script, an example
of which is as follows where a = (1 - j ) 2 .
é X (1) [0]ù é .1 1 1 1 1 1 1 1 ùú é é 0 ù é 0 ù
ê ú ê 0 ù ê ú ê ú
ê (1) ú ê ú
* ê ú ê ú ê
ê X [1] ú ê .1 a - j -a* -1 -a j a úê ú ê - 2(a + j ) ú ê-1 + j (1- 2)úú
ê ú ê ú ê- 2 ú ê ú ê ú
ê X (1) [2]ú ê. ú
j ú êê 2 úú ê 2(-1 + j ) ú ê 2(-1 + j) ú
ê ú ê 1 -j -1 j 1 -j -1
ê ú ê ú
ê (1) ú ê úê ú ê 2(a + j ) ú ê 1 + j (1 +
ê X [3]ú ê .1 -a* j a -1 a* -j -a ú ê 0 ú ê
*
ú 2) úú
ê ú = ê úê ú = ê ú = êê ú
ê X (1) [4]ú ê .1 -1 1 -1 1 -1 1 -1 úú êê 0 úú ê 2 2 ú ê 2 2 ú
ê ú ê ê ú ê ú
ê (1) ú ê *ú ê 0 ú ê ú ê
ê X [5]ú ê .1 -a -j a *
-1 a j -a ú ê ú ê 2(a - j ) ú ê 1- j (1 + 2) úú
ê ú ê úê ú ê ú ê ú
ê X (1) [6]ú ê .1 0 ú
ê ú ê j -1 -j 1 j -1 - j úú êê ú
ê 2(-1- j ) ú ê 2(-1- j) ú
ê (1) ú ê. ú ëê 0 ûú ê ú ê ú
êë X [7]úû êë 1 a* * ê- 2(a* - j )ú ê-1- j (1- 2) úû
j -a -1 -a -j a úû ë û ë
(i) Clearly, x[n] is shorter than y[n]. Therefore, P = 2 and Q = 6. Also, for 4-point
DFT/IDFTs, N = 4.
(iii) To compute the “full” N-point linear convolutions of x[n] with segments of y[n],
we require the segments of y[n] to have length L = N – P + 1 = 4 – 2 + 1 = 3.
(iv) y[n] has length Q = 6. Therefore, there are R = éêQ Lùú = éê6 3ùú = 2 segments.
(v) We zero pad y[n] to RL = 2 ´3 = 6 points. But y[n] already has 6 points. Therefore,
zero-padding is not required, and its two 3-point segments are given by
y0 [n ] = {1, 0, - 2}
y0zp [n ] = {1, 0, - 2, 0}
y1zp [ n ] = {0, 1, - 1, 0}
(vi) The remaining steps are summarised by the following table, where Yrzp [k ] =
DFT { yrzp [n ]} , and wr [n ] = IDFT { X zp [k ]Yrzp [k ]} .
n 0 1 2 3 4 5 6
y0zp[n] 1 0 -2 0
Y0zp[k] -1 3 -1 3
X zp [k ]⋅ Y0zp [k ] 0 3+j3 -2 3-j3
w0 [n] 1 -1 -2 2
y1zp [ n - L ] 0 1 -1 0
Y1zp[k] 0 1-j -2 1+j
X zp [k ]⋅ Y1zp [k ] 0 2 -4 2
w1[n - L] 0 1 -2 1
w[n] 1 -1 -2 2 1 -2 1
(bi) Sampling at the Nyquist rate, the sampling period is given by T = 1/10,000. Therefore,
since θ = ωT = 2pfT, we require a spectral resolution of
1 p
S res = 2p ⋅10 ⋅ = rad/sample
10, 000 500
Now, each data segment of Bartlett’s method is windowed by a length L rectangular
window. As the main-lobe width of this window is Δml = 4p/L, we solve
4p p
£ L ³ 2, 000 2048
L 500
(bii) Sampling at 10,000 Hz, 10 s of recording yields 10,000´10 = 105 samples. Therefore,
the number of available segments is given by
éN ù é 105 ù
K = ê ú = ê ú = 49
êLú ê 2048 ú
ê ú
(biii) Suppose we wish to maintain the same continuous-time spectral resolution of 10 Hz.
Increasing the sampling rate will decrease T, and since Sres = 2p⋅10⋅T (in rad/sample),
this will decrease the discrete-time spectral resolution Sres. But Sres = Δml and Δml is
generally inversely proportional to L. Therefore, to maintain a spectral resolution of
10 Hz, we will require a larger L. However, increasing the sampling rate also increases
the number of samples N recorded in the 10 s time interval. The number of segments
K = N/L thus remains the same and so there is no change in the variance.
Summarising, increasing the sampling rate while keeping the continuous-time spectral
resolution the same will have no effect on the variance. The only gain is an increase
in the frequency resolution θres of the discrete-time spectrum estimate since each data
segment now contains more samples. As for the discrete-time spectral resolution Sres,
although it is reduced, there is no material gain when translated back to the continuous-
time domain.