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

Middle East Technical University

Department of Electrical and Electronics Engineering


EE301: Signals and Systems I

Solutions for Homework 5


January 7, 2018
If you face any problem or mistake please contact Ömer Çayır, ocayir@metu.edu.tr, DZ-10.

1. (a) The Fourier transform of the DT signal x[n] is



X
X(Ω) = x[n]e−jΩn
n=−∞

The magnitude and phase of X(Ω) are shown below for |Ω| < π.
|X(Ω)| ∠X(Ω)
1
π
4 π
−π 0 π −π −π
4

Let Xa (Ω) be the DTFT of x[−n].



X
Xa (Ω) = x[−n]e−jΩn
n=−∞

X
= x[m]ejΩm (for n = −m)
m=−∞

= X(−Ω)

The magnitude and phase of Xa (Ω) are found as

|Xa (Ω)| = |X(−Ω)|

∠Xa (Ω) = ∠X(−Ω)


Over the range −π < Ω < π, they are shown below.
|Xa (Ω)| ∠Xa (Ω)
1
π
−π 4

−π 0 π −π π
4
(b) Let Xb (Ω) be the DTFT of x[n − 1].

X
Xb (Ω) = x[n − 1]e−jΩn
n=−∞

X
= x[m]e−jΩ(m+1) (for n = m + 1)
m=−∞

X
−jΩ
=e x[m]e−jΩm
m=−∞

= e−jΩ X(Ω)

The magnitude and phase of Xb (Ω) are found as

|Xb (Ω)| = |X(Ω)|

∠Xb (Ω) = −Ω + ∠X(Ω)


Over the range −π < Ω < π, they are shown below.
|Xb (Ω)| ∠Xb (Ω)

4

π
−π 0 π −π

−5π
4

2. (a) The frequency response H(Ω) is



X
H(Ω) = h[n]e−jΩn
n=−∞

The impulse response values of the new filter, g[n], are related to h[n] as follows:
(
−h[n], 6 0
if n =
g[n] =
1 − h[0], if n = 0

The frequency response of the new filter, G(Ω), can be written as



X
G(Ω) = g[n]e−jΩn
n=−∞

X
= g[0] + g[n]e−jΩn
n=−∞
n6=0

X
= 1 − h[0] − h[n]e−jΩn
n=−∞
n6=0
 
= 1 − h[0] − H(Ω) − h[0]
= 1 − H(Ω)
The original filter with impulse response h[n] is given to be a low-pass filter with unit gain,
i.e. |H(0)| = 1. Let h[n] be an ideal low-pass filter with the frequency response shown below.
|H(Ω)| = H(Ω)
1

−π −Ωc 0 Ωc π

Then, the new impulse response g[n] is a high-pass filter with the frequency response shown
below.
|G(Ω)| = 1 − H(Ω)
1

−π −Ωc 0 Ωc π

(b)  
1 n
F Ω
z[n] = sinc ←→ Z(Ω) = rect
2 2 π
π  ∞ n 
F
X π   π o
w[n] = cos n ←→ W (Ω) = π δ Ω − − 2π` + δ Ω + − 2π`
2 2 2
`=−∞
1
Z
F
x[n] = z[n]w[n] ←→ X(Ω) = Z(Ω − θ)W (θ) dθ

h2πi

Zπ ∞ h 
Ω−θ
  X
1 π   π i
X(Ω) = rect δ θ − − 2π` + δ θ + − 2π` dθ
2 π 2 2
−π `=−∞
| {z }
δ (θ− π2 )+δ (θ+ π2 ) for θ∈[−π,π]

Ω − π2 Ω + π2
   
1 1
= rect + rect
2 π 2 π
The spectrum X(Ω) is shown below.
X(Ω)

0.5

−π 0 π
The output signal y[n] is
y[n] = h[n] ∗ x[n]
= F −1 {H(Ω)X(Ω)}
1
= F −1 {H(Ω)} (remember that X(Ω) = 0.5 for |Ω| < π)
2
1
= h[n]
2
1 n
= sinc
4 2

3. If x[n] is periodic, there exists a positive integer N such that x[n + N ] = x[n] and its fundamental
period is the smallest nonzero period N satisfying this relation.
(a) The discrete-time signals are given as follows:

x1 [n] = 2.5 cos (nπ/3 + 2.5)

x2 [n] = 3 sin (4n/5 − 1) + 3


For x1 [n],
Ω0 π/3 1
= =
2π 2π 6
is rational. Hence, x1 [n] is periodic. Let’s find N satisfying x1 [n + N ] = x1 [n].
π  π  π
2.5 cos (n + N ) + 2.5 = 2.5 cos n + 2.5 =⇒ N = 2πk for k ∈ Z
3 3 3
Then, we obtain N = 6k, and the fundamental period of x1 [n] is N = 6 (for k = 1).
The DTFS representation of x1 [n] is
X−1
k0 +N
jk 2π π
X
n
x1 [n] = ak e N = ak ejk 3 n
k=hN i k=k0

To find ak , we perform some algebraic manipulations on given expression


x1 [n] = 2.5 cos π3 n + 2.5


ej ( 3 n+2.5) + e−j ( 3 n+2.5)


π π

= 2.5
2
π π
= 1.25ej2.5 ej 3 n + 1.25e−j2.5 e−j 3 n

Then, we replace LHS of expression above with the DTFS representation of x1 [n] for k0 = −2
3
X π π π
ak ejk 3 n = 1.25ej2.5 ej 3 n + 1.25e−j2.5 e−j 3 n
k=−2

and obtain the DTFS coefficients



j2.5 k = 1 + 6` for ` ∈ Z
1.25e ,

ak = 1.25e−j2.5 , k = −1 + 6` for ` ∈ Z

0, otherwise

The magnitude and phase of ak are shown below.
|ak |
1.25

−8 −7 −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 7 8 k

6 ak
2.5

−7 −1 5
−8 −6 −5 −4 −3 −2 0 1 2 3 4 6 7 8 k

−2.5

For x2 [n],
Ω0 4/5 2
= =
2π 2π 5π
is irrational. Hence, x2 [n] is not periodic.
(b) The signal x[n] is given as a periodic signal with fundamental period N and DTFS coefficients
ak .
i. After performing some algebraic manipulations on given expression, we obtain

ej 2 ( N )n + e−j 2 ( N )n
N 2π N 2π
!
+ e−jπn
 jπn 
e
x[n] cos (πn) = x[n] = x[n]
2 2

To express the DTFS coefficients of the given signal in terms of ak , we can use the DTFS
properties as follows:
DTFS
x[n] ←→ ak

ej 2 ( N )n x[n]
N 2π DTFS
←→ ak− N (Frequency shifting)
2

1 j N ( 2π )n DTFS 1
e 2 N x[n] ←→ a N (Linearity)
2 2 k− 2
1 j N ( 2π )n 1 1 1
e 2 N x[n] + e−j 2 ( N )n x[n]
N 2π DTFS
←→ a N + ak+ N (Linearity)
2 2 2 k− 2 2 2

DTFS 1 1
x[n] cos (πn) ←→ bk = ak− N + ak+ N
2 2 2 2

The DTFS representation of the given signal is


N −1  
X
jk 2π n
X 1 1 2π
x[n] cos (πn) = bk e N = ak− N + ak+ N ejk N n
2 2 2 2
k=hN i k=0

ii. The signal is given as (


0, n even
y[n] =
x[n], n odd
It can be expressed as
y[n] = x[n]w[n],
where (
1 − cos (πn) 0, n even
w[n] =
2 1, n odd
Then, we get
1 1
y[n] = x[n] − x[n] cos (πn)
2 2
By using the result of part (i), the DTFS coefficients of the given signal in terms of ak
are
DTFS 1 1 1 1 1
y[n] ←→ ck = ak − bk = ak − ak− N − ak+ N
2 2 2 4 2 4 2

The DTFS representation of the given signal is


N −1  
X
jk 2π n
X 1 1 1 2π
y[n] = ck e N = ak − ak− N − ak+ N ejk N n
2 4 2 4 2
k=hN i k=0

4. (a) A periodic signal with fundamental period N = 15 is given as



1,
 n = 0, 1
x[n] = −1, n = 14

0, 2 ≤ n ≤ 13

x[n]
1

−20 −15 −10 −5 0 5 10 15 20 n

−1

(b) The DTFS coefficients of x[n] are


1 X 2π
ak = x[n]e−jk N n
N
n=hN i
7
1 X 2π
= x[n]e−jk 15 n
15
n=−7
1  jk 2π 2π

= −e 15 + 1 + e−jk 15
15
  
1 2π
= 1 − j2 sin k
15 15
(c) The magnitude and phase of ak are shown below.
0.2

0.15

jak j
0.1

0.05

0
-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
k
:

: /2
ak

0
6

- : /2

-:
-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
k

(d) The approximation to x[n] is given as follows:


M
X
xM [n] = ak ejk(2π/N )n
n=−M

i. The DC component
1

0.5
x0 [n]

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
ii. Upto and including the fundamental components
1

0.5
x1 [n]

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
iii. Upto and including the 2nd harmonic components
1

0.5

x2 [n]
0

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
iv. Upto and including the 4th harmonic components
1

0.5
x4 [n]

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
v. Upto and including the 6th harmonic components
1

0.5
x6 [n]

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
vi. Including all harmonic components
1

0.5
x7 [n]

-0.5

-1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
n
The more harmonic components are added, the more accurate the approximation becomes.
(e) The Parseval’s relation for DT periodic signals is given as
1 X X
|x[n]|2 = |ak |2
N
n=hN i k=hN i

The average power of the periodic signal x[n] is


14
1 X 3
|x[n]|2 = = 0.2
15 15
n=0

100

90
Percentage of the average power

80

70

60

50

40

30

20

10

0
0 1 2 3 4 5 6 7
i

The computed value exceeds 90% of the average power for i = 6.

5. (a)
xc (t) H(ω) yc (t)

H(ω)
1

−2π×103 0 2π×103 ω

Xc (ω)
1

−2π×5×103 0 2π×5×103 ω
(
Xc (ω), |ω| ≤ 2π×103
Yc (ω) = Xc (ω)H(ω) =
0, otherwise
Yc (ω)
1
0.8

−2π×103 0 2π×103 ω

(b) We should find the Nyquist rate to determine the range of sampling frequencies ωs and
sampling periods T that will allow perfect recovery of xc (t) from its samples x[n].
We know that Xc (ω) = 0 for |ω| > ωM = 2π×5×103 . Then, the Nyquist rate is

2ωM = 2π×10×103

The range of sampling frequencies is

ωs > 2ωM = 20π×103

and the range of sampling periods is


2π 1
T = =⇒ T < ×10−3 sec.
ωs 10

(c) For the sampling period T , the DT signal at the input of G(Ω) is

x[n] = xc (nT )

and its spectrum is



F 1 X
x[n] ←→ X(Ω) = Xc ((Ω − 2πk)/T )
T
k=−∞

X(Ω)
1
T

−2π −10π×103 T 0 10π×103 T 2π Ω

Similarly, the DT signal at the output of G(Ω) is

y[n] = yc (nT )

and its spectrum is



F 1 X
y[n] ←→ Y (Ω) = Yc ((Ω − 2πk)/T )
T
k=−∞

Y (Ω)
1
T
4
5T

−2π −2π×103 T 0 2π×103 T 2π Ω


(d) To obtain the desired yc (t) using DT processing, the required DT filter is
G(Ω) = H(Ω/T ), |Ω| < π
G(Ω)
1

−2π −2π×103 T 0 2π×103 T 2π Ω


(e) The given CT processing scheme involves a band-limited input signal xc (t), i.e. Xc (ω) = 0
for |ω| > ωM = 2π ×5×103 , and a low-pass filter with the cut-off frequency ωc = 2π ×103 .
Owing to ωc < ωM , it is possible to obtain the spectrum of y[n] without aliasing and the
desired yc (t) using DT processing even if the sampling period does not satisfy the Nyquist
sampling theorem. However, there will be aliasing in the spectrum of x[n], when ωs < 2ωM .
For the sampling with the sub Nyquist rate, there are two cases as follows:
1. If 2ωM > ωs > ωM + ωc , then the perfect reconstruction of yc (t) is possible.
2. If ωs < ωM + ωc , then the perfect reconstruction of yc (t) is not possible.
When 2ωM > ωs > ωM + ωc , the range of sampling period is
2π 1 1
T = =⇒ ×10−3 > T > ×10−3 sec,
ωs 6 10
and the range of sampling frequency in Hz is
ωs 1
fs = = =⇒ 10×103 > fs > 6×103 Hz.
2π T
After sampling with the sub Nyquist rate, the spectrum of x[n] and y[n] are shown below.
X(Ω)
1
4
T
5T

−2π −10π×103 T −2π×103 T 0 2π×103 T 10π×103 T 2π Ω

Y (Ω)
1
T
4
5T

−2π −2π×103 T 0 2π×103 T 2π Ω

To obtain the desired yc (t) using DT processing, the required DT filter is shown below.
G(Ω)
1

−2π −2π×103 T 0 2π×103 T 2π Ω

When ωs < ωM + ωc , i.e. fs < 6 kHz, G(Ω) cannot be expressed in terms of H(ω) to obtain
yc (t), in other words DT processing of CT signals is not possible for this case.
(
6. (a) n, −3 ≤ n ≤ 2
x[n] =
0, otherwise
The given signal can be expressed as follows:
x[n] = −3δ[n + 3] − 2δ[n + 2] − δ[n + 1] + δ[n − 1] + 2δ[n − 2]

The Fourier transform of the DT signal x[n] is



X
X(Ω) = x[n]e−jΩn
n=−∞

= −3ej3Ω − 2ej2Ω − ejΩ + e−jΩ + 2e−j2Ω


π 
(b) x[n] = sin n + cos(n)
3
The given signal can be expressed as follows:
π π
ej 3 n − e−j 3 n ejn + e−jn
x[n] = +
j2 2

The Fourier transform of the DT signal x[n] is



X
X(Ω) = x[n]e−jΩn
n=−∞
πh  π  π i
= δ Ω− −δ Ω+ + π [δ (Ω − 1) + δ (Ω + 1)] , |Ω| < π
j 3 3

(c) x[n] = u[n − 5] − u[n + 1] + 8δ[n − 3]


The given signal can be expressed as follows:
x[n] = −δ[n + 1] − δ[n] − δ[n − 1] − δ[n − 2] + 7δ[n − 3] − δ[n − 4]

The Fourier transform of the DT signal x[n] is



X
X(Ω) = x[n]e−jΩn
n=−∞

= −ejΩ − 1 − e−jΩ − e−j2Ω + 7e−j3Ω − e−j4Ω


 |n|
(d) 1
x[n] = u[n + 2]
3
The Fourier transform of the DT signal x[n] is

X
X(Ω) = x[n]e−jΩn
n=−∞
∞  |n|
X 1
= e−jΩn
3
n=−2
∞  n
1 1 X 1
= ej2Ω + ejΩ + e−jΩn
9 3 3
n=0
1 1 1
= ej2Ω + ejΩ + 1 −jΩ
9 3 1 − 3e
 n  n
7. (a) 1 π  1 π 
h[n] = sin n u[n] = u[n] · sin n
3 6 3 6
Fourier transform of each term is known and can be used directly.
 n
1 F 1
h1 [n] = u[n] ←→ H1 (Ω) =
3 1 − 13 e−jΩ
π  ∞ h 
F π X π   π i
h2 [n] = sin n ←→ H2 (Ω) = δ Ω− − 2π` − δ Ω + − 2π`
6 j 6 6
`=−∞

Then, we can use the modulation (multiplication) property of DTFT.

1 1
Z
F
h[n] = h1 [n]h2 [n] ←→ H(Ω) = H1 (Ω) ~ H2 (Ω) = H1 (Ω − θ)H2 (θ) dθ
2π 2π
h2πi


1
H(Ω)= H1 (Ω − θ)H2 (θ) dθ

−π
Zπ ∞ h 
1 1 X π   π i
= δ θ − − 2π` − δ θ + − 2π` dθ
j2 1 − 13 e−j(Ω−θ) `=−∞ 6 6
−π | {z }
δ (θ− π6 )−δ (θ+ π6 ) for θ∈[−π,π]
!
1 1 1
= −
j2 1 − 1 e−j (Ω− π6 ) 1 − 1 e−j (Ω+ π6 )
3 3

1 j π6 −jΩ π
!
1 3e e − 31 e−j 6 e−jΩ
= π π
j2 1 − 13 ej 6 e−jΩ − 31 e−j 6 e−jΩ + 91 e−j2Ω
1 π −jΩ
3 sin  6 e
= 2 π −jΩ + 1 e−j2Ω
1− 3 cos 6 e 9

The magnitude and phase of H(Ω) are given as below.


q
|H(Ω)| = (Re {H(Ω)})2 + (Im {H(Ω)})2

Im {H(Ω)}
 
∠H(Ω) = tan−1
Re {H(Ω)}
We can also obtain the magnitude and phase of H(Ω) by separating it into functions of Ω.
1
sin π6 e−jΩ

3 A(Ω)
H(Ω) =   =
1 − 13 e−j (Ω− 6 ) 1 − 13 e−j (Ω+ 6 )
π π
B(Ω)C(Ω)

where
1 π  1
A(Ω) =
sin e−jΩ = ∠(−Ω)
3 6 6
r 1 π
 !
1 −j (Ω− π ) 10 2  π sin Ω −
B(Ω) = 1 − e 6 = − cos Ω − ∠tan−1 3 6 
3 9 3 6 1 − 13 cos Ω − π6
r 1 π
 !
1 −j (Ω+ π ) 10 2  π sin Ω +
C(Ω) = 1 − e 6 = − cos Ω + ∠tan−1 3 6 
3 9 3 6 1 − 31 cos Ω + π6
The magnitude of H(Ω):
− 1
|A(Ω)|
 
1 10 2  π 10 2  π 2
|H(Ω)| = = − cos Ω − − cos Ω +
|B(Ω)| · |C(Ω)| 6 9 3 6 9 3 6

0.4

0.3
jH(+)j

0.2

0.1

0
-2: -3: /2 -: - : /2 0 : /2 : 3 : /2 2:
+

The phase of H(Ω):

∠H(Ω)=∠A(Ω) − ∠B(Ω) − ∠C(Ω)


 !  !
sin Ω − π6
1
sin Ω + π6
1
=−Ω − tan−1 3  − tan−1 3
1 − 31 cos Ω − π6 1 − 13 cos Ω + π6


: /2
H(+)

0
6

- : /2

-:
-2: -3: /2 -: - : /2 0 : /2 : 3 : /2 2:
+
π 
(b) x[n] = (−1)n cos
n
3
Three possible ways to compute the system output y[n] are
1. Convolution in time-domain:
y[n] = h[n] ∗ x[n]

2. The convolution property of FT:


1
Z
y[n] = F −1 {X(Ω)H(Ω)} = X(Ω)H(Ω)ejΩn dΩ

h2πi

3. Eigenfunction property for the input that is sum of complex exponentials:


K
X K
X
y[n] = H(Ωk )rk ejΩk n for x[n] = rk ejΩk n
k=1 k=1
The input x[n] is the sum of complex exponentials. Hence, the third way is more convenient.
j π3 n −j π3 n
!
π  e + e 1 4π 1 2π
x[n] = (−1)n cos n = ejπn = ej 3 n + ej 3 n
3 2 2 2
1 4π 1 2π
y[n] = H(4π/3)ej 3 n + H(2π/3)ej 3 n
2 2

(c)
F
h[n] ←→ H(Ω)
F
h[−n] ←→ H(−Ω) (Time reversal)
F
h∗ [−n] ←→ H ∗ (Ω) (Conjugation)
F
g[n] = h[n] ∗ h∗ [−n] ←→ G(Ω) = |H(Ω)|2 = H(Ω)H ∗ (Ω) (Convolution)

(d)
F
g[n] = ejΩ0 n h[n] ←→ G(Ω) = H(Ω − Ω0 ) (Frequency Shifting)

8. (a) h[n] = 3n u[n] + δ[n + 4]


h[n] 6= 0 for n < 0, i.e. h[−4] = 1 =⇒ h[n] is not causal.
X∞
h[n] is not absolutely summable, i.e. |h[n]| < ∞ does not hold =⇒ h[n] is not stable.
n=−∞

(b) The Fourier transform of h[n]



X ∞
X ∞
X
H(Ω) = h[n]e−jΩn = 3n e−jΩn + δ[n + 4]e−jΩn
n=−∞ n=0 n=−∞

does not converge due to the first summation term (3n → ∞ as n → ∞).
(c) The system (transfer) function
∞ ∞ ∞
X
−n
X
n −n
X 1
H(z) = h[n]z = 3 z + δ[n + 4]z −n = + z4, 3 < |z| < ∞
n=−∞ n=−∞
1 − 3z −1
n=0

Im
z-plane

×
1 3 Re

ROC : 3 < |z| < ∞


(d) The ROC of H(z) does not include the unit circle. Thus, the system is not stable.
The ROC of H(z) does not include ∞. Thus, the system is not causal.
The answers are consistent with those in part (a).
(e) The ROC of H(z) does not include the unit circle. Thus, the DTFT of h[n]

H(Ω) = H(z)|z=ejΩ

does not converge, as seen is part (b).


(f) F{r−n h[n]} = H(z) where r = |z|
Since H(z) converges for |z| > 3, F{r−n h[n]} converges for r > 3.
(g) To express x[n] in terms of h[n], we utilize the given relation H(z)|z=5ej(Ω+π) = F{x[n]} as
follows:
X∞  −n
H(z)|z=5ej(Ω+π) = h[n] 5ej(Ω+π)
n=−∞

X −n
= h[n] 5ejπ e−jΩn
n=−∞
X∞
= x[n]e−jΩn
n=−∞

=F{x[n]}
Then, the desired sequence is
−n
x[n] = h[n] 5ejπ = (−5)−n h[n] = (−0.6)n u[n] + 54 δ[n + 4].

 n
(h) (2j)n h[−n] = 2ejπ/2 h[−n] = z0n h[−n]

Z
h[n] ←→ H(z), ROC : 3 < |z| < ∞
Z 1
h[−n] ←→ H(z −1 ), ROC : 0 < |z| < (Time reversal)
3
Z 1
z0 n h[−n] ←→ H((z/z0 )−1 ) ROC : 0 < |z| < |z0 | (Scaling in the z-domain)
3
Z 1 2
g[n] = (2j)n h[−n] ←→ G(z) = H(2j/z) = 3 + 16z −4 , 0 < |z| <
1 − 2j z 3

You might also like