School of Engineering
Department of Computer and Communication Engineering
Fall 2018
Course: EENG527 – Digital Signal Processing
Instructors: Dr. Ammar El Falou, Dr. Ayman Khalil, Dr. Hussein Kobeissi, Dr. Hussein Nasrallah,
Dr. Mohamad Husseini, Dr. Walid Kaakour, Dr. Hussein Hijazi
Final Examination
Date: 30 January 2019
Time: 120 mins
Student Name: _________________________ Section:_________________
There are four Questions in the booklet each has several parts, please answer all parts of the 4 questions to
the best of your ability.
Marking Scheme:
Questions Weight Mark
Question 1 35 points
Question 2 40 points
Question 3 25 points
Total 100 points
1. This booklet contains 12 question pages excluding cover. Make sure you have all these pages.
2. Closed Book Examination.
3. Do not take the staple out. The exam booklet must remain intact
4. The cheating penalty will be “F” in the exam
Good Luck
School of Engineering
Department of Computer and Communications Engineering
EENG527 – Digital Signal Processing
Final Exam
Fall 2018-2019
January 30, 2019
Student Name
Student ID
Problem Grade Weight
1 35
2 40
3 25
100
Instructions
Closed book/notes
Answer all four questions
The booklet contains 12 question pages (excluding cover)
Basic calculators allowed
Question 1: (35pts)
An LTI system H (z) is characterized by the system function given below.
H(z)
13 1-z 1
3
10 12z 1
1+ 0.5z 1
1-2z 2z
1 2
1+ 0.5z 1 1-2z 1 2z 2
1) Indicate whether the system is FIR or IIR. Justify your answer. (2pts)
the system has poles ==> IIR system
2) Plot the pole-zero pattern. (3pts)
Poles: p1 = 1+j (order = 1) ; p2 = 1-j (order = 1) ; p3 = -0.5 (order = 1) ;
Zeros: z1 = 0 (order = 2) and z2 = 1 (order = 1)
1.5
0.5
Imaginary Part
2
0
-0.5
-1
-1.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3
Real Part
3) Specify the different possible ROC of H (z) and indicate the causality and the stability in each
case. Justify your answer. (3pts)
If system non-causal or two sided ROC1: 0.5 < |z| < √ system stable (unit circle included)
If system causal ROC2: |z| > √ system unstable (unit circle not included)
1/12
If system anti-causal ROC3: |z| < 0.5 system unstable (unit circle not included)
4) Determine the impulse response h(n) for the following cases:
a- The system is stable. (4pts)
A B1 B2
H (z) 1
where A = 3 and B1 = 5 ej0.0628pi and B2 = 5 e-j0.0628pi
1 + z 1 1 p1z
1 1 p 2z 1
2
ROC1 h(n) = (-0.5)n u(n) - 10 √ cos(pi/4 n + 0.0628 pi) u(-n-1)
b- The system is causal (3pts)
ROC2 h(n) = (-0.5)n u(n) + 10 √ cos(pi/4 n + 0.0628 pi) u(n)
5) Implement H(z) using:
a- Direct form II. (3pts)
13-13z 1
H(z)
1 -1.5z 1 z 2 z 3
2/12
b- Cascade form composed of first order and second order elementary systems realized in
direct form II. (4pts)
H(z)
13 1-z 1
= H1(z)*H2(z)
1+ 0.5z 1
1-2z 2z
1 2
H1(z) =
13 1-z 1 H2(z) =
1
1+ 0.5z 1
1
1-2z 2z 2
c- Parallel form composed of first order and second order elementary systems realized in
direct form II. (4pts)
3 10 12z 1
H(z) = H1(z) +H2(z)
1+ 0.5z 1 1-2z 1 2z 2
3 10 12z 1
H1(z) = H2(z) =
1+ 0.5z 1 1-2z 1 2z 2
6) In the sequel, we assume that the system is causal.
a- Show that the difference equation that characterizes the system is given by: (2pts)
( ) ( ) ( ) ( ) ( ) ( )
13-13z 1 Y ( z)
H(z) 1 2 3
1 -1.5z z z X ( z)
( ) ( ) ( ) ( ) ( ) ( )
3/12
b- Assume that the system is relaxed. Determine the response y(n) of the system to the input
x(n) = {1 ; -2 ; 2}. (3pts)
X(z) = 1 -2 z-1 + 2 z-2
Y(z) =H(z)X(z) =H(z) -2 z-1 H(z) +2 z-2H(z) ==> y(n) = h(n) -2h(n-1)+ 2h(n-2)
c- Assume now that the system is nonrelaxed with the initial conditions ( ) ,
( ) and ( ) . For the same input x(n) given in b-, show that the one-sided
z-transform of y(n) is given as below and deduce y(n): (4pts)
14-13z 1
Y (z)
1+0.5z 1
X+(z) = 1 -2 z-1 + 2 z-2
( ) ( ) ( ) [ ( ) ( )] ( ) 14-13z 1
( ) ( ) ( )
1 -1.5z 1 z 2 z 3 1+0.5z 1
1
Let M (z ) 1
m (n ) ( 0.5) n u (n )
1+0.5z
y(n) = 14m(n) -1 m(n-1)
4/12
Question 2: (40pts)
A- A discrete sinusoidal signal x(n) of length L = 20 is obtained by sampling an analog sinusoidal
signal xa(t) = cos(2 F0 t) of frequency F0 at a rate Fs = 100Hz ( Fs > 2F0) and is defined by:
cos(n0 ), 0 n 20
x n
0, n 20
The magnitude of the Fourier transform of x(n) is shown below for - π ≤ w ≤ 0.
1) Complete, on the same figure, |X(w)| for -2π ≤ w ≤ 2π. Justify you answer. (4pts)
By symmetric with respect to w = 0, we obtain the magnitude response for 0 ≤ w ≤ π
By repeating since |X(w)| is periodic with period 2π, we obtain the magnitude response for π ≤ |w| ≤ 2π
5/12
2) What is the tool to obtain a discrete spectrum? How it can be obtained from X(w)? (2pts)
A discrete spectrum is obtained by using a N-point discrete Fourier Transfrom DFT.
The N-point DFT X(k) are obtained by evaluating X(w) for 0 ≤ w ≤ 2π at w = 2pi k / N where 0 ≤ k ≤ N-1
3) On the figure, plot the discrete-line spectrum obtained by applying a 20-point DFT of x(n). (use
circle-mark for each point). (4pts)
N = 20 X(k) = X( w = pik/10 ) for 0 ≤ k ≤ 19
12
10
Fourier Transform |X(w)|
0
0 pi/2 pi 3pi/2 2pi
w
4) Do you think that 20-point DFT is sufficient to have a good picture detail of the spectral
characteristic of x(n)? Justify your answer. (2pts)
Since we have only one nonzero point among the 20 points so discrete spectrum does not reflect the
continuous spectrum. So we cannot reconstruct X(w) from X(k).
5) How we can enhance the picture of the discrete-spectrum in order to be able to reconstruct the
continuous spectrum X(w). (2pts)
We have to evaluate X(w) at more closely spaced frequencies. This can be obtained by increasing N
the length of the DFT, so by padding x(n) by N-L zeros.
6) Plot the discrete-line spectrum obtained by applying a 40-point DFT of x(n). (use x-mark for each
point). (4pts)
N = 40 X(k) = X( w = 2pi k /40 ) for 0 ≤ k ≤ 39
12
10
Fourier Transform |X(w)|
0
0 pi/2 pi 3pi/2 2pi
w
6/12
7) Give an approximation of the analog frequency F0 of xa(t). (2pts)
An analog sine wave has a spectrum of two discrete line at F0 and –F0. From X(w), the first peak is obtained
at w0 = 3pi/10 f0 = 3/20 F0 = f0 * Fs = 15 Hz
B- Let ( ) { } be the input signal to a discrete-time filter with impulse response ( )
{ } and let ( ) be the corresponding output.
1) Give the following sequences:
a- ( ) (( )) ( ). (2pts)
x1(n) ={0 , 1 , 1 , 2 }
b- ( ) (( )) . (2pts)
x2(n) ={2 , 1, 1 , 0}
c- ( ) (( )) . (3pts)
x3(n) ={1 , 1 , 2 , 0 }
d- ( ) (( )) .(3pts)
x4(n) ={2 , 0 , 0 , 1 , 1 }
2) For which sizes of the DFT the circular convolution of ( ) and ( ) is equivalent to their linear
convolution? (2pts)
x(n) ==> N1 = 4
h(n) ==> N2 = 2
y(n) = x(n) * h(n) ==> N1+N2-1 = 5
linear conv is equivalent to circular conv for DFT of size N ≥ 5
3) Compute ( ) using:
a- Circular definition. (4pts)
7/12
Compute the circular convolution of length 4 between x(n) and h(n)
v(n) = x’(n) h’(n) = = [0 ; 2 ; -1 ; 0 ; -1]
[ ][ ]
b- DFT. (4pts)
X(k) = 2w5k + w52k + w53k where k = 0 ; 1 ; 2 ; 3 ; 4
H’(k) = 1 -w5k where k = 0 ; 1 ; 2 ; 3 ; 4
Y(k) = X’(k)H’(k) = 2w5k + w52k + w53k -2w52k -w53k -w54k = 2w5k - w52k -w54k
y(n) = [0 ; 2 ; -1 ; 0 ; -1]
Question 3: (25pts)
We would like to design digital filter with the following specifications:
| ( )| | |
{ | ( )| | |
| ( )| | |
1) Sketch the filter response and specify the type of this filter. (3pts)
The sketch should show the frequency response with a transition bands, locating wp, wc, ws and
intuitively the passband and the stopband ripples.
It is a bandstop filter.
2) Determine the stopband and passband ripples. (3pts).
dp1 = 0.01 and dp 2 = 0.02. ds = 0.0025.
3) Determine the passband and the stopband cutoff frequencies. (4pts)
wp1 = 0.1π ws1 = 0.25π wp2 = 0.8π and ws2 = 0.6π
8/12
4) Determine the attenuation in dB in the stopband. (2pts).
ds (dB) = 20 log10(0.0025) = -52dB
5) Determine the width of the transition band ∆f. (3pts).
∆w1 = 0.15 π and ∆w2 = 0.2π ∆w = min(0.15π , 0.2π ) = 0.15π
∆f = ∆w/2π = 0.075
6) Determine the cutoff frequencies. (3pts)
wc1 = wp1 + ∆w/2 = 0.1π – 0.075π = 0.025 π;
wc2 = wp2 - ∆w/2 = 0.8π + 0.075π = 0.875 π.
7) Using the table of windows in the appendix, what are the appropriate window(s) to design this filter?
Justify your answer. (2pts)
Since the stop band attenuation should be -52 dB or better, hence either Hamming or Blackman
windows could be used.
8) Using the window method, design a FIR filter with minimum length that satisfies the above
specifications. Give a complete expression for the impulse response h(n). Specify any tapered
window by its type – no need to give the formula of the window. (5pts)
Since we would like to use a minimum length filter, and since for Hamming window N = 3.3/∆f
while for Blackman N = 5.5/∆f, we choose Hamming window.
∆f = ∆w / 2π = 0.05.
Therefore N = 3.3 / 0.075 = 44.
The ideal filter:
| |
( ) { | |
| |
hd(n) = δ[n] - sin(0.875π[n])/(πn) + sin(0.025π[n])/(πn)
h(n) = hd(n-22) . wHamming(n) for 0 ≤ n ≤44
9/12
Appendix
One-sided z-Transform:
10/12
11/12
12/12