German University in Cairo
Faculty of IET
Communication Engineering Department
Dr. Engy Aly Maher
Digital Signal Processing (COMM 602)
Final Assignment
Spring 2020
Full Name:
Student's ID:
Tutorial Number:
TA Name:
CHEATING CASES ARE GRADED ZERO!
Question
Number
1 2 3 4 5 6 7 Total
Obtained
Score
Maximum
Score
Instructions
You should submit the assignment with the cover page.
Solve in the space provided following each problem.
Itβs an individual assignment so no grouping is allowed.
The deadline for submitting the assignment will be: June 11/06/2020. The
system will not accept any delayed submission
Important note:
Substitute with the numbers a, b, and c from the first step in your solution
where a, b, and c are given as:
If you have two zeros in your ID, convert the zero to 1
Example: ID=46-2004, then a=2, b=1, c=4
β’ In case you find in the problem 2a it means 2*a
Example : if your a= 2 then 2a = 4 not 22!!!!
Question 1:
For the following transfer function:
π»(π§) =5π β 2ππ§β1 β ππ§β2
(1 β ππ§β1)(1 β 0.5π§β1 + 0.25π§β2)
a) Find the difference equation
b) What is the type of the system?
c) What is the order of the system?
d) Sketch the pole-zero pattern on the Z-plane
e) Is the system stable or not?
f) Implement the transfer function using canonical realization.
g) Find the unit step response if the system is causal
h) Find the first three samples of h(n) using the long division.
------------------------------------------------------------------------------------------------------------
Solution:
Question 2:
(a) Proof the following relations:
(i) Nj
NNN eWWW
2
2/
2 where
(ii) k
N
Nk
N WW
2
(iii) kn
N
nk
N WW 2
2
(b) Compute the DFT of the following signal:
otherwise
nn
nx
0
302
)(
2
(c) Compute the DFT of the four points x(n)=(a b a c) using the linear transformations on
sequence x(n) and X(k). Use the matrix 4W to find the DFT using the relation:
NNN xWX .
Where
)1)(1()1(21
)1(242
12
....1
........
....1
....1
1....111
NN
N
N
N
N
N
N
NNN
N
NNN
N
www
www
www
W and
Nj
N ew
2
(d) Compute the Inverse DFT of the signal: 32102
cos21)( , , , , kkkX
using
the linear transformations on sequence X(k). Use the same matrix 4W to find the IDFT.
------------------------------------------------------------------------------------------------------------
Solution:
Question 3:
(a) Use the decimation in time algorithm to find FFT for the signal: x(n) = [a b a]
(b) Use the decimation in time algorithm to find Inverse FFT for the 4-points:
π(π) = [(1 + βπ) π (1 β βπ) π ]
------------------------------------------------------------------------------------------------------------
Solution:
Question 4:
(a) Given the following system:
ππ¦[π] β ππ¦[π β 1] + ππ¦[π β 2] β π₯[π] β ππ₯[π β 1] = 0, given that the system
is non-causal.
(i) Find Z-transform of the above system and determine the ROC.
(ii) Find the frequency response, then determine the magnitude and phase
responses
(b) Find the inverse z-transform of: (π§) =1
(1+π§β1)(1βπ§β1)2 , given that π₯[π] is anti-causal.
(c) Determine the transfer function and the difference equation that describe the system
shown in the figure:
------------------------------------------------------------------------------------------------------------
Solution:
Question 5:
a) Given the analog transfer function: 3410
52
ss
sH(s) . Use the step invariant
method to design a digital filter. Use sampling interval T=1. Find the magnitude
and Phase response.
b) Design a band-pass filter with the cutoff frequencies then ππ = 0.1ππ , ππ =
0.5ππ and at least 20 dB of attenuation at 3.01s and 9.0
2s . Determine
the resonance frequency of the designed filter.
c) Use the bilinear transform method to design a low-pass IIR filter with the following
specifications: digital passband edge frequency is 125.0 , the passband ripple is
πΏπ = 0. abc, the digital stopband edge frequency is 5.0 , and the maximum
stopband ripple isπΏπ = 0. ab . Realize the resulting digital filter canonical form.
------------------------------------------------------------------------------------------------------------
Solution:
Question 6:
(a) Using a Hamming window with M=5, approximate the following ideal band-pass
filter with a causal linear-phase FIR filter
π»π(πππ) = {
0, 0 < |π| < 0.4πππ, 0.4ππ < |π| < 0.6ππ0, 0.6ππ < |π| < ππ
(b) Using a Blackman window with M=4, approximate the following ideal band-stop
filter with a causal linear-phase FIR filter
π»π(πππ) = {
π, 0 < |π| < 0.4ππ0, 0.4ππ < |π| < 0.6πππ, 0.6ππ < |π| < ππ
(b) Repeat Part (a) but using frequency sampling method.
------------------------------------------------------------------------------------------------------------
Solution:
Question 7:
(a) Use the window method with Hamming window to design FIR filter with order
M=4. The desired frequency response is given by:
The frequency response is periodic at the sampling angular frequency 2s .
The cut-off angular frequency c .
(b) For the desired frequency response plotted in part (a), use frequency sampling
method to design the FIR filter if sec]/[6 rads , sec]/[2 radc and the
filter order M=4.
------------------------------------------------------------------------------------------------------------
Solution:
s c
0 c s
|)(| dH
ππ
Formula Sheet Common Z-transform Pairs:
Sequence Transform ROC
πΉ[π] 1 π΄ππ π§
π[π] 1
1 β π§β1 |π§| > 1
βπ[βπ β π] 1
1 β π§β1 |π§| < 1
πππ[π] 1
1 β ππ§β1 |π§| > |π|
βπππ[βπ β π] 1
1 β ππ§β1 |π§| < |π|
ππππ[π] ππ§β1
(1 β ππ§β1)2 |π§| > |π|
βππππ[βπ β π] ππ§β1
(1 β ππ§β1)2 |π§| < |π|
ππ ππ¨π¬[ππ + π]π[π] cos(π) β π cos(π β π) π§β1
1 β 2π cos(π) π§β1 + π2π§β2 |π§| > |π|
βππ ππ¨π¬[ππ + π]π[βπ β π] cos(π) β π cos(π β π) π§β1
1 β 2π cos(π) π§β1 + π2π§β2 |π§| < |π|
π|π¨| β (|π|)π ππ¨π¬[π½ππ + π½π¨] π[π] π΄
1 β ππ§β1+
π΄β
1 β πβπ§β1 |π§| > |π|
βπ|π¨| β (|π|)π ππ¨π¬[π½ππ + π½π¨] π[βπ β π] π΄
1 β ππ§β1+
π΄β
1 β πβπ§β1 |π§| < |π|
Geometric-sum Formulae:
βπππ
π=π
= {
ππ β ππ+1
1 β π, π β 1
π β π + 1 , π = 1
βππβ
π=π
=ππ
1 β π, |π| < 1
βπππβ
π=0
=π
(1 β π)2, |π| < 1
Z-transform Properties:
Property Time domain Z-domain ROC
Notation π₯[π] π(π§) ROC: π1 < |π§| < π2
π₯1[π] π1(π§) ROC1
π₯2[π] π2(π§) ROC2
Conjugation π₯β[π] πβ(π§β) ROC
Time reversal π₯[βπ] π(π§β1) 1
π2< |π§| <
1
π1
Time shifting π₯[π β π] π§βππ(π§)
ROC with possible
inclusion/exception of the points: π§ =
0 and/or π§ = β
Z-domain scaling πππ₯[π] π(πβ1π§) |π|π1 < |π§| < |π|π2
Z-domain
differentiation ππ₯[π] βπ§
ππ(π§)
ππ§ ROC
Linearity πΌπ₯1[π] + π½π₯2[π] πΌπ1(π§) + π½π2(π§) At least, ROC1 β© ROC2
Convolution π₯1[π] β π₯2[π] π1(π§)π2(π§) At least, ROC1 β© ROC2
Unilateral Z-transform Shifting Properties:
Property π±[π§] π+(π³)
Time delay π₯[π β π], π > 0 π§βπ [π+(π§) +βπ₯[βπ]π§ππ
π=1
]
Time advance π₯[π + π], π > 0 π§π [π+(π§) ββπ₯[π]π§βππβ1
π=0
]
Z-transform Theorems:
Initial value theorem: π₯[0] = limπ§ββ
π+(π§)
Or: π₯[0] = limπ§ββ
π(π§) if π₯[π] is causal.
Final value theorem: If ROC of (π§ β 1)π+(π§) includes the unit circle, then π₯[β] = limπ§β1(π§ β 1)π+(π§).
DFT Properties:
Property Time domain Discrete frequency domain
Notation π₯[π] =1
πβ π[π]ππ
2ππππ
πβ1
π=0
π[π] = β π₯[π]πβπ2ππππ
πβ1
π=0
π₯1[π] π1[π]
π₯2[π] π2[π]
Conjugation π₯β[π] πβ[(βπ)π]
Circular time reversal π₯[(βπ)π] π[(βπ)π]
Circular time shifting π₯[(π β π)π] πβπ2ππππ π[π]
Circular frequency shifting ππ2ππππ π₯[π] π[(π β π)π]
Linearity πΌπ₯1[π] + π½π₯2[π] πΌπ1[π] + π½π2[π]
Circular convolution π₯1[π]β π₯2[π] π1[π]π2[π]
Multiplication π₯1[π]π₯2[π] 1
ππ1[π]β π2[π]
Parsevalβs theorem βπ₯1[π]π₯2β[π]
πβ1
π=0
1
πβ π1[π]π2
β[π]
πβ1
π=0
If π₯[π] πβπ·πΉπ β π[π], then
π₯[π] = π₯π π[π] + π₯π
π[π] + ππ₯πΌπ[π] + ππ₯πΌ
π[π]
π[π] = ππ π[π] + ππ
π[π] + πππΌπ[π] + πππΌ
π[π]
NNN )x(WX
Inverse Discrete-Time Fourier Transform (IDTFT):
βπ[π] =1
2πβ«π»π(π
ππ)ππππππ
π
βπ
N
1
NN X)(Wx and
N
1
N (1/N)W)(W
Low-pass Butterworth Filters:
For |π»π(πΞ©1)| β₯ π΄1 and |π»π(πΞ©2)| β€ π΄2, the filter order has to satisfy
π β₯
log (π΄2β2 β 1π΄1β2 β 1
)
2 log (Ξ©2Ξ©1)
Given that |π»π(πΞ©1)| = π΄1 and |π»π(πΞ©2)| = π΄2, the following relation holds
(Ξ©2Ξ©1)2π
=π΄2β2 β 1
π΄1β2 β 1
Normalized low-pass prototype filters (Ξ©πβ² = 1):
Order Transfer function
π 1
π + 1
π 1
π 2 + β2π + 1
π 1
π 3 + 2π 2 + 2π + 1
π 1
π 4 + 2.6131π 3 + 3.4142π 2 + 2.6131π + 1
Frequency transformations for Analog filters:
Transformed filter type Transformation Frequency mapping
Low-pass π βπ
Ξ©π -
High-pass π βΞ©ππ
Ξ©β² βΞ©πΞ©
Band-pass π βπ 2 + Ξ©π’Ξ©ππ (Ξ©π’ β Ξ©π)
Ξ©β² β |βΞ©2 + Ξ©π’Ξ©πΞ©(Ξ©π’ β Ξ©π)
|
Band-stop π βπ (Ξ©π’ β Ξ©π)
π 2 + Ξ©π’Ξ©π Ξ©β² β |
Ξ©(Ξ©π’ β Ξ©π)
βΞ©2 + Ξ©π’Ξ©π|
Bilinear Transformation:
Ξ© =2
πtan (
π
2) , π =
2
πβ1 β π§β1
1 + π§β1
Common Laplace-transform Pairs:
Signal Transform
πΉ(π) 1
π(π) 1
π
πβπππ(π) 1
π + π
ππβπππ(π) 1
(π + π)2
ππβπ
(π β π)!πβπππ(π)
1
(π + π)π
ππ¨π¬(ππ)π(π) π
π 2 +π2
π¬π’π§(ππ)π(π) π
π 2 +π2
πβππ ππ¨π¬(ππ)π(π) π + π
(π + π)2 +π2
πβππ π¬π’π§(ππ)π(π) π
(π + π)2 +π2
βππ + π ππβππ ππ¨π¬ (ππ β πππ§βπ (π
π))π(π)
π(π + π) + ππ
(π + π)2 +π2, π > 0
βππ + π ππβππ ππ¨π¬ (ππ β πππ§βπ (π
π) + π )π(π)
π(π + π) + ππ
(π + π)2 +π2, π < 0
π|π¨|πππ{π}π ππ¨π¬(ππ¦{π} π + π½π¨) π(π) π΄
π β π+
π΄β
π β πβ
Window Functions for FIR Filter Design:
Name of window Time-domain sequence
π β€ π β€ π΄β π
Hamming 0.54 β 0.46 cos [2ππ
π β 1]
Hanning 0.5 (1 β cos [2ππ
π β 1])
Blackman 0.42 β 0.5 cos [2ππ
π β 1] + 0.08 cos [
4ππ
π β 1]