Ee20 hw5 s10 Sol
Ee20 hw5 s10 Sol
Ee20 hw5 s10 Sol
HW 5.1 Solution
(a)
∞
X(ω) = x(n)e−iωn
n=−∞
d
∞
d
i X(ω) = i x(n)e−iωn
dω dω n=−∞
∞
d −iωn
= i x(n) e
n=−∞
dω
∞
= i x(n)(−in)e−iωn
n=−∞
∞
= (nx(n))e−iωn
n=−∞
(n) = nx(n)
x
(b) Upsampling
∞
X(ω) = x(n)e−iωn
n=−∞
∞
X(ω) = (n)e−iωn
x
n=−∞
(n) is non-zero only at n = kN, k = . . . − 2, −1, 0, 1, 2, . . .
but x
∞
X(ω) = (kN)e−iωkN
x
k=−∞
∞
= x(k)e−i(ωN )k
k=−∞
= X(ωN)
Echo system
F
Remember that δ(n − n0 ) ↔ e−iωn0 , and that for LTI system Y (ω) =
H(ω)X(ω)
From the difference equation y(n) = x
(n) + α
y (n − N)
1
Take Fourier transform of both sides
Y (ω) = X(ω)
+ αe−iωN Y (ω)
(1 − αe−iωN )Y (ω) = X(ω)
Y (ω)
H(ω) =
X(ω)
1
=
1 − αe−iωN
For single sample echo system y(n) = x(n) + αy(n − 1)
We have frequency response H(ω) = 1−αe1−iωN by letting N = 1 in previ-
ous part.
So, H(ω) = H(ωN)
Find impulse response: h(n) is, by definition, the output when the input
is an impulse, so let x(n) = δ(n) and find y(n)
By upsampling property,
n
αN if n ≥ 0 and n mod N = 0
h(n) =
0 otherwise
HW 5.2 Solution
(a)
X(ω) + X ∗ (ω) 1 − cos ω
Re{X(ω)} = =
2 2
iω −iω
1 e +e
= −
2 4
Sincexis a real-valued signal, by the properties of DTFT for real-valued signals,
2
X(ω) = X ∗ (−ω) ⇒ X ∗ (ω) = X(−ω)
δ(n − 1) + δ(n + 1)
∴ x(n) + x(−n) = δ(n) −
2
x being causal, x(−n) = 0, ∀n > 0
δ(n − 1) + δ(n + 1)
⇒ ∀n > 0, x(n) + 0 = δ(n) −
2
−δ(n − 1)
=
2
δ(−1) + δ(1)
n = 0 ⇒ 2x(0) = δ(0) −
2
= 1
= δ(0)
⇒ x(0) = 1/2
⎧
⎨ 1/2 n=0
∴ x(n) = −1/2 n=1
⎩
0 otherwise
δ(n) − δ(n − 1)
equivalently, x(n) =
2
Since we made no extra assumptions on x apart from what is given, the
solution above is the unique solution.
(b)
5 1 1
Note that − cos ω = ( − eiω )( − e−iω )
4 2 2
and
|X(ω)|2 = X(ω)X ∗(ω)
1 1
Thus, X(ω)could be − eiω or − e−iω .
2 2
3
It was given in the problem that the signal was causal. From this as-
sumption, X(ω) cannot be 12 − eiω .
1
X(ω) = − e−iω
2
4
HW 5.3 Solution
(a) (I)
⇒ h(n) = 0 when n<0
(II) (i)
A(ω) = H(ω)ei2ω ⇒ a(n) = h(n + 2) or h(n) = a(n − 2)
(ii)
1
a(n) = A(ω)eiωn dω
2π 2π
1 1
a(0) = A(ω)dω = (12π) = 6
2π 2π 2π
(iii)
⇒ a(n) is symmetric. so a(n) and h(n)are both length 5 .
(iv)
2
A(ω) = a(n)e−iωn
n=−2
2
A(0) = a(n)
n=−2
= a(−2) + a(−1) + a(0) + a(1) + a(2)
= 2a(2) + 2a(1) + 6
= 8 (from the figure)
A(π) = A(−π)
2
= a(n)e−iπn
n=−2
2
= a(n)eiπn
n=−2
2
= a(n)(−1)n
n=−2
= a(−2) − a(−1) + a(0) − a(1) + a(2)
= 2a(2) − 2a(1) + 6
= 12
5
We have 2 equations for 2 unknowns...solving them gives
a(2) = a(−2) = 2, a(1) = a(−1) = −1
6 6
a(n) h(n)
2 2 2 2
n n
-2 -1 0 1 2 0 1 2 3 4
-1 -1 -1 -1
(b)
y(n) = (x ∗ h)(n)
= 2x(n) − x(n − 1) + 6x(n − 2) − x(n − 3) + 2x(n − 4)
x(n) 2 + y(n)
z −1
q1(n) −1 +
z −1
q2(n) 6 +
z −1
q3(n) −1 +
z −1
q4(n) 2
(c)
6
(d)
4
H(ω) = h(n)e−iωn
n=0
= 2 − e−iω + 6e−2iω − e−3iω + 2e−4iω
= e−2iω (2e2iω − eiω + 6 − e−iω + 2e−2iω )
= ei(−2ω) (6 − 2 cos(ω) + 4 cos(2ω))
∠H(ω) = −2ω
|H(ω)| = (6 − 2 cos(ω) + 4 cos(2ω)) = |A(ω)|
So the given figure can be used for (f)
(e) (i)
y(n) = 8, because |H(0)| = 8, ∠H(0) = 0
(ii)
x(n) = eiπn
y(n) = ei(−2π) (6 − 2 cos(π) + 4 cos(2π))eiπn
= 12eiπn
= 12(−1)n
(iii)
π
π
π π