Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

End of Semester 1, 2017

Venue ____________________
ETEN3000 Digital Signal Processing
Student Number |__|__|__|__|__|__|__|__|

Family Name _____________________

First Name _____________________

Department of Electrical and Computer Engineering

EXAMINATION
End of Semester 1, 2017

ETEN3000 Digital Signal Processing


This paper is for Bentley Campus, Miri Sarawak Campus and Sri Lanka Inst Info Tech students

This is a CLOSED BOOK examination


Examination paper IS NOT to be released to student

Examination Duration 3 hours


For Examiner Use Only
Reading Time 10 minutes
Q Mark
Notes in both margins and reverse of exam paper may be written by Students during
reading time 1

2
Total Marks 100
3
Supplied by the University
4
1 x 16 page answer book
5
Formula sheet (separate to exam paper)
6

Mathematical Formulae and Statistical Tables 7

Supplied by the Student 8

Materials 9

10
None
11
Calculator
12
A non-programmable calculator is permitted in this exam
13
Instructions to Students
14

All principal working steps must be shown in the solutions. 15

Attempt Questions 1, 2, 3, and either Question 4 or 5. 16

17

18

Examination Cover Sheet

Total ________
End of Semester 1, 2017
ETEN3000 Digital Signal Processing

Candidates are required to attempt Questions 1, 2 and 3, and either Question 4 or 5

Question 1 (22 Marks)

(a) xc (t ) is a continuous-time bandlimited signal whose Fourier transform is shown below.

X c ( jw )
1

-wo 0 wo w

Suppose xc (t ) is sampled at ws < 2wo such that the spectrum of the sampled signal
contains aliased components. These aliased components can be removed in discrete-
time by the ideal low pass filter

ïì1, q < qc
H (e jq ) = ïí
ïïî0, otherwise

If ws = 60p and wo = 40p , determine the maximum value of qc such that as much
as possible of the un-aliased signal components are retained. (8 Marks)

(b) A causal LTI system with input x[n] and output y[n] is described by the following
LCCDE

y[n] = 3
2
y[n -1] + y[n - 2] + x[n -1]

(i) Determine the system function H ( z ) . (8 Marks)

(ii) Where are the poles and zeros of H ( z ) ? (3 Marks)

(iii) Determine the impulse response of the system. (3 Marks)

Page 1 of 5
End of Semester 1, 2017
ETEN3000 Digital Signal Processing

Candidates are required to attempt Questions 1, 2 and 3, and either Question 4 or 5

Question 2 (22 Marks)

(a) A Type I linear phase highpass FIR filter with 7 taps is to be designed using the
window method.

Suppose the cutoff frequency of the ideal highpass filter is qc = 0.4p , design the filter
using the Bartlett window and list the 7 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

where A(q ) is a real and even function of θ, and M is an integer.

H ( e jq )

1 + d1 1 + d3
1
1 - d1 1 - d3

d2
p q
0 q1 q2 q3 q4

d1 = d2 = 0.1, d3 = 0.14

q1 = 0.2p, q2 = 0.4p, q3 = 0.7p and q4 = 0.9p

The filter is to be designed using the Kaiser window method.

(i) Determine the Kaiser window. (11 Marks)

(ii) Comment on the likelihood that your window will lead to a design that meets the
design specification. (2 Marks)

Page 2 of 5
End of Semester 1, 2017
ETEN3000 Digital Signal Processing

Candidates are required to attempt Questions 1, 2 and 3, and either Question 4 or 5

Question 3 (22 Marks)

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.5 dB
Pass-band edge: 0.3p
Stop-band edge: 0.75p

The filter is to be designed using the bilinear transformation method.

(a) Suppose the analog lowpass characteristic is to be approximated by a Butterworth


filter. Determine the transfer function Hc(s) of the analog lowpass filter. Hc(s) is
required to be stable and causal. (15 Marks)

(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 +  + aN z-N

where M and N are some positive integers and a1, , aN , 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, 2017
ETEN3000 Digital Signal Processing

Candidates are required to attempt Questions 1, 2 and 3, and either Question 4 or 5

Question 4 (34 Marks)


3 3
(a) Consider the two sequences x1[n] = {1, -1, 0, 2}n=0 and x2 [n] = {1, a 2, 0, - a}n=0
where a is unknown. Suppose the 4-point circular convolution of x1[ n] and x2 [ n] is
given by

4 x [n] = {7, 3, 0, 4}
3
y[n] = x1[n]  2 n=0

Determine, if any, all possible values for a. (17 Marks)

(b) Eight successive samples of the signal x[ n] have been captured

}n=0 .
7
x[n ] = {1, -1, 1 , 1, 0, -1, 0, 2
2

Estimate the spectrum of x[ n] , to a frequency resolution of 2p 8 , using the Welch


method with 50% overlap and L = 4 Hanning windows. (17 Marks)

Page 4 of 5
End of Semester 1, 2017
ETEN3000 Digital Signal Processing

Candidates are required to attempt Questions 1, 2 and 3, and either Question 4 or 5

Question 5 (34 Marks)

(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)

x[n] = {1, -1}1n=0

and y[ n] = {1, 0, - 2, 0, 1, -1}5n=0 .

(b) The power spectrum of a discrete-time signal is to be estimated using the Welch
method with Hamming window and 50% overlap. Suppose the periodograms of the
Welch method are to be computed with the radix-2 Cooley-Tukey FFT algorithm.

(i) If it is known the power spectrum contains a peak with a 3 dB bandwidth of


0.01 cycles/sample but the exact location of the peak is not known, determine
the segment length L of the Welch method so that the spectral window is
narrower than the peak. (11 Marks)

(ii) Suppose the number of samples N acquired is large. Explain why it is not
advantageous to increase L beyond the value obtained in Part (b)(i). (6 Marks)

END OF EXAMINATION PAPER

Page 5 of 5
SOLUTIONS

Question 1

(a) The problem can be solved in continuous-time or in discrete-time frequencies.

Solving in continuous-time frequencies, it follows from the following diagram that we


require
wc < w1

where w1 = ws - wo = 60p - 40p = 20p

2p
Now qc = wc ⋅ T = wc ⋅
ws

Therefore, we require
2p 2p
qc < 20p ⋅ =
60p 3

X s ( jw )
H ( jw )

w
0 wc 40p 60p
wo w s
w1 = w s - wo

Alternatively, in discrete-time frequencies, we require

qc < q1

where q1 = qs - qo = 2p - woT

2p 2p 4
Now woT = wo ⋅ = 40p ⋅ = p
ws 60p 3

Therefore, we require
4 2
qc < 2p - p = p
3 3

Sem 1 Exam, 2017 – Solutions 1


X ( e jq )
H (e jq )

q
-2p 0 qc qo 2p 4p
qs
q1 = qs - qo

(bi) Taking z-transforms of the LCCDE, we get

(1 - 32 z-1 - z-2 )Y ( z) = z-1 X ( z )


Y ( z) z-1 z-1
\ H ( z) = = =
X ( z) 1- 3 z-1 - z-2 (1 - 2 z-1 )(1 + 1 z-1 )
2 2

As for the ROC, since the system is causal

RH = { z > 2} Ç { z > 12 } = { z > 2}

(bii) Writing H ( z ) as follows

z-1 z2 z
H ( z) = ⋅ =
(1 - 2 z-1 )(1 + 1 z -1 )
2
z2 ( z - 2)( z + 12 )

we see H ( z ) has zeroes at z = 0 and z  ¥ , and poles at z = 2 and z = - 12 .

(biii) Taking the partial fraction expansion of H ( z )

2 2
H ( z) = 5
- 5
1 - 2 z -1 1 + 12 z-1

n
\ h[n] = ( 52 ) 2n u[n] - ( 52 )(- 12 ) u[ n]

Sem 1 Exam, 2017 – Solutions 2


Question 2

(a) FIR filter has 7 taps. Therefore, M = 7 - 1 = 6 , whereupon

sin (p (n - M2 )) sin (qc (n - M2 )) sin (p (n - 3)) sin (0.4p (n - 3))


hd [ n] = - = -
p (n - M2 ) p (n - M2 ) p (n - 3) p (n - 3)

ì 2n ,
ï 0 £ n £ M2 ïì n, 0£n£3
ï
ï M ï
ï 3
ï ï
and w[n] = í2 - 2Mn , M2 £ n £ M = í2 - n3 , 3 £ n £ 6
ï
ï ï
ï
ï
ï0, otherwise ï
ï
ï
î î0,
ï otherwise

n 0 1 2 3 4 5 6
hd [ n] 0.0624 -0.0935 -0.3027 0.6 -0.3027 -0.0935 0.0624
w[ n] 0.0 0.3333 0.6667 1.0 0.6667 0.3333 0.0
h[n] = hd [n] w[n] 0.0 -0.0312 -0.2018 0.6 -0.2018 -0.0312 0.0

Note, to find hd [3] , it is necessary to apply l’Hôpital’s rule.

(bi) The filter is required to be Type I or Type II. The tightest transition width is given by

Dq = min {(q2 - q1 ), (q4 - q3 )} = min {(0.4p - 0.2p ), (0.9p - 0.7p )} = 0.2p

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

\ d = min {d1, d2 ; d2 , 1d
2 3 } = min {0.1, 0.1; 0.1, } = 0.07
0.14 ,
2

Proceeding with the design


A = - 20 log d = - 20 log(0.07) = 23.0980

b = 0.5842( A - 21)0.4 + 0.07886( A - 21) = 0.9512

é 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. 14 of the
Attachment, is not suitable for a bandstop filter. We thus increase M to 12 to obtain
a Type I filter which is now suitable.

Sem 1 Exam, 2017 – Solutions 3


Summarising, the first-cut window design is given by
b = 0.9512 and M = 12

(bii) Kaiser claims the design will yield an M that is within 2 of the required value.

Question 3

(a) Suppose Td = 1 . The corresponding analog filter specifications are given by

Stop-band attenuation: ³ 20 dB
Pass-band deviation: £ 1.5 dB
Pass-band edge: w1 = 2 tan ( 0.32 p ) = 1.01905
Stop-band edge: w2 = 2 tan ( 0.75
2 )
p = 4.82843

We next define g1 and g 2 as follows.

20log10 (1- a1 ) = -1.5  (1- a1 ) = 0.841395 = g1

20log10 a2 = - 20  a2 = 0.1 = g 2

It then follows the order of the Butterworth filter required is given by

é
ê 1 log
ê
N = ê
1- g12 g22

1- g22 g12( )ùúú = é1.7615ù = 2
ú ê ú
êê 2 log w12
w
( ) úú
and the N = 2 stable and causal poles of H c ( s) are located at

s0,1 = wc (cos135  j sin135) = wc - ( 1


2
 j 1
2
)
Observe that s0 = s1* . Thus
s0 s1 = s0 2 = w c2

and ( s0 + s1 ) = 2 Re {s1 } = - 2wc

whereupon H c ( s) is given by

1 1 s0 s1 s0 s1
H c ( s) = s
⋅ s
= = 2
1- s0
1- s1
( s - s0 )( s - s1 ) s - ( s0 + s1 ) s + s0 2
wc2
=
s2 + 2wc s + wc2
Sem 1 Exam, 2017 – Solutions 4
We now determine the cut-off frequency wc . We require, at w = w1
1
4
³ g12
1 + (w1 wc )

i.e. (student to fill in derivation)


w1
i.e. wc ³ 1
= 1.27154
é(1 g 2 ) - 1ù 4
êë 1 úû

Likewise, at w = w2 we require
1
4
£ g 22
1 + (w2 wc )
w2
i.e. wc £ 1
= 1.53072
ëê( 2 )
é 1 g 2 - 1ù 4
ûú

Hence 1.27154 £ wc £ 1.53072

Suppose wc = 2 = 1.41421 . Then


2
H c (s) = 2
s + 2s + 2

Alternatively, suppose wc = 1.5 . Then


2.25
H c (s) = 2
s + 1.5 2 s + 2.25

Finally, suppose
1.27154 + 1.53072
wc = = 1.40113
2

1.96317
Then H c (s) = 2
s + 1.9815s + 1.96317

Sem 1 Exam, 2017 – Solutions 5


(b) Since we have chosen Td = 1 , the transfer function of the IIR filter is found as follows.

H ( z ) = H c (s) 1 - z-1
s= 2
1 + z-1

wc2
=
( ) ( )+w
2
- z -1 - z -1
21 -1 + 2 wc 2 1 2
c
1+ z 1 + z-1

= (student to fill in missing steps)

wc2 (1 + z-1 ) 2
=
(4 + 2 2wc + wc2 ) + (-8 + 2wc2 ) z-1 + (4 - 2 2wc + wc2 ) z-2

ì
ï 0.2(1 + 2 z-1 + z-2 )
ï
ï , wc = 2
ï
ï 1 - 0.4 z-1 + 0.2 z-2
ï
ï
ï
ï 0.2143(1 + 2 z-1 + z-2 )

í , wc = 1.5
ï
ï1 - 0.3336 z -1
+ 0.1913 z -2
ï
ï
ï
ï
ï 0.197777(1 + 2 z-1 + z-2 )
ï , wc = 1.40113
ï
ï - z -1
+ z -2
î1 0.410396 0.201505

(c) The Direct I form block diagram of H ( z ) , for wc = 2 , is shown below. The block
diagram for wc = 1.5 and wc = 1.40113 can be drawn similarly.

0.2
x[n] y[n]

z -1 z -1
0.4 0.4

z -1 z -1
0.2 -0.2

Sem 1 Exam, 2017 – Solutions 6


Question 4

(a) It can be shown, using for example the table method with the periodic extension of one
of the sequences, that

{ }n=0
2 2 2 3
4 x [ n ] = 1 + a + 2 a , -1 + a , - 2 a - a , 2 - a
x1[ n]  2

Therefore, we require
1 + a + 2a 2 = 7
-1 + a 2 = 3
-2a - a 2 = 0
and 2-a = 4

The last equation indicates that, if it exists, a can only equal -2. We next substitute
a = -2 into the first 3 equations and find they all hold. Accordingly, one can conclude
there exists a solution, that solution is unique, and is given by a = -2.

(b) For a frequency resolution of 2p 8 , we are required to estimate S x ( e jq ) at the eight


frequency points qk = 2pk 8 , k = 0,  , 7 .

The length 4 Hanning window is given by wH [ n] = {0, 34 , 34 , 0} . Therefore, the


3
n=0
normalised window is given by

⋅ wH [ n ] = {0, 2, 2, 0}
3
w[ n ] = 4
0 2
+( 34 ) 2 +( 34 ) 2 +0 2 n= 0

Following the steps outlined in the Attachment, we begin with the following table.

n 0 1 2 3 4 5 6 7
1
x[n] 1 -1 2
1 0 -1 0 2
1
x(1) [n] 1 -1 2
1
1
x (2) [ n] 2
1 0 -1

x (3) [n] 0 -1 0 2

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

Sem 1 Exam, 2017 – Solutions 7


k =1 x (1) [n ] 1 -1 1 1
2

x(1) [n]w[n] 0 - 2 1 0 0 0 0 0

X (1) [i ]
1- 2 -1 -1 + j 2 1+ j2 1+ 2 1- j2 -1- j 2 -1
= DFT { x (1) [n ]w[n ]}
j 28p i 2 3- 1 1 3 5 3 + 1 5 3 1
PW(1) (e ) = 14 X (1) [i ] 4 2 4 4 4 4 2 4 4 4

k=2 x(2) [n] 1 1 0 -1


2

x (2) [n]w[n] 0 2 0 0 0 0 0 0

X (2) [i ]
2 1- j -j 2 -1 - j - 2 -1 + j j 2 1+ j
= DFT { x (2) [n ]w[n ]}
j 28p i 2 1 1 1 1 1 1 1 1
PW(2) (e ) = 14 X (2) [i ] 2 2 2 2 2 2 2 2

k =3 x (3) [n] 0 -1 0 2

x(3) [n]w[n] 0 - 2 0 0 0 0 0 0

X (3) [i ]
- 2 -1 + j j 2 1+ j 2 1- j -j 2 -1 - j
= DFT { x (3) [n ]w[n ]}
j 28p i 2 1 1 1 1 1 1 1 1
PW(3) (e ) = 14 X (2) [i ] 2 2 2 2 2 2 2 2

Finally, we average the modified periodograms as follows.

j 28p i
PW(1) ( e ) 3- 1
4
1
4
3
4
5
4
3+ 1
4
5
4
3
4
1
4
2 2
j 28p i
PW(2) ( e ) 1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
j 28p i
PW(3) ( e ) 1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
j 2p i
SˆW (e 8 ) = 7 - 1
12 3 2
5
12
7
12
9
12
7 + 1
12 3 2
9
12
7
12
5
12
1
3 {PW(1) + PW(2) + PW(3) } 0.3476 0.4167 0.5833 0.7500 0.8190 0.7500 0.5833 0.4167

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 ùú é - 2 +1 ù
ê ú ê 1 1 1 1 1
é 0 ù ê ú é 1- 2 ù
ê (1) ú ê ú
* ê ú ê ú ê ú
ê X [1] ú ê .1 a - j -a* -1 -a j a úê ú ê -a 2 - j ú ê -1 ú
ê ú ê ú ê- 2 ú ê ú ê ú
ê X (1) [2]ú ê. j úú ê 1 ú ê j 2 -1 ú ê ú
ê ú ê 1 -j -1 j 1 -j -1
ê ú ê ú ê-1 + j 2 ú
ê (1) ú ê. úê ú ê * ú ê ú
ê X [3]ú ê 1 -a* j a -1 a* -j -a ú ê 0 ú ê a 2+ j ú ê 1+ j2 ú
ê ú = ê úê ú = ê ê
ú = ê ú
ê X (1) [4]ú ê. -1 úú ê 0 ú ê + ú + ú
ê ú ê 1 -1 1 -1 1 -1 1
ê ú ê 2 1 ú ê 1 2 ú
ê (1) ú ê. *ú ê 0 ú ê ú ê ú
ê X [5]ú ê 1 -a -j a *
-1 a j -a ê ú ú ê a 2 - j ú ê 1 - j 2 ú
ê ú ê úê 0 ú ê ú ê ú
ê X (1) [6]ú ê .1 ê-1- j 2 ú
ê ú ê j -1 -j 1 j -1 - j úú ê ú ê - j 2 -1 ú
ê ú ê ú
ê (1) ú ê. * * ú êë 0 úû ê * ú ê -1 ú
ë û
êë X [7]úû ëê 1 a j -a -1 -a -j a ûú ëê-a 2 + j ûú

Sem 1 Exam, 2017 – Solutions 8


Question 5

(a) We proceed as follows.

(i) Clearly, x[n] is shorter than y[n]. Therefore, P = 2 and Q = 6. Also, for 4-point
DFT/IDFTs, N = 4.

(ii) With N = 4, we zero pad x[n] to 4 points to obtain

x zp [n ] = {1, - 1, 0, 0}3n =0  X zp [k ] = {0, 1 + j, 2, 1 - j}3k =0

(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 point. Therefore,
zero-padding is not required, and its two 3-point segments are given by

y0[n] = {1, 0, - 2}

y1[n] = {0, 1, -1}

When zero-padded to N = 4 points, they yield

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

Sem 1 Exam, 2017 – Solutions 9


Examiner’s Note: Students are expected to show all side calculations, for example
é X [0]ù é1 1 1 1 ù êé xzp [0]ùú é1 1 1 1ùé1ù é 0 ù
ê ú ê ú ê úê ú ê ú
ê X [1] ú ê1 - j -1 j ú êê xzp [1] úú ê1 - j -1 j ú ê-1ú ê1 + j ú
ê ú = ê úê ê ú ê ú ê ú
ê X [2]ú ê1 -1 1 -1ú ê x [2]úú = ê1 -1 1 -1ú ê 0 ú = ê 2 ú
ê ú ê úê zp
ú ê úê ú ê ú
ê ú ê ú ê úê ú ê ú
ëê X [3]ûú êë1 j -1 - j ûú êê xzp [3]úú ê1 j -1 - j ûú ëê 0 úû
ë êë1- j úû
ë û
é w0 [0]ù é1 1 1 1 ù éW0 [0]ù é1 1 1 1 ùé 0 ù é1ù
ê ú ê úê ú ê úê ú ê ú
ê w0 [1] ú 1 ê 1 j -1 - j ú ê W0 [1] ú 1 ê 1 j - 1 - j ú ê 3 + j 3ú ê-1ú
ê ú = ê úê ú = ê úê ú = ê ú
ê w [2]ú 4 êê1 -1 1 -1úú êêW0 [2]úú 4 êê1 -1 1 -1úú êê -2 úú ê-2ú
ê 0 ú ê ú
ê w [3]ú ê1 - j -1 j ú êW [3]ú ê1 - j -1 j ú ê 3 - j 3ú ê2ú
ëê 0 ûú ê
ë ú
û êë 0 ûú ê
ë ú
ûëê ú
û êë úû

(bi) The Welch method uses a length L Hamming window. Since we require the main-
lobe width of this window to be less than 0.01 cycles/sample, i.e.,
8p
Dml = £ 2p ´ 0.01 rad/sample
L -1
we get
8p
L³ + 1 = 401
2p ´ 0.01
But L must be an integer power of 2. Thus, L = 512 .

(bii) Increasing L will increase spectral resolution but we already have enough resolution.
Indeed, increasing L will reduce the number of segments K which in turn will
increase the variance of the estimate.

Sem 1 Exam, 2017 – Solutions 10

You might also like