0% found this document useful (0 votes)
13 views

Homework2 Solutions

Uploaded by

Dupree Cleveland
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Homework2 Solutions

Uploaded by

Dupree Cleveland
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Homework 2 ESET 3302 Dr.

Geetha Chandrasekaran
(Due: Sep 21, 10:00 pm)

1. For each of the following LTI systems indicate whether or not the system is causal.
n
(a) h[n] = 12 u[n] , where u[n] is the unit step function.

Solution: Since h[n] = 0 for all n < 0, the impulse response is zero for all negative
values of n, this system is causal.

1 n

(b) h[n] = 2 u[n − 1]

Solution: Since h[n] = 0 for all n ≤ 0, the impulse response is zero for all negative
values of n, this system is causal.

1 |n|

(c) h[n] = 2

Solution: Since h[n] > 0 for all n < 0, the impulse response is non-zero for all
negative values of n. This system is not causal.

(d) h[n] = u[n + 2] − u[n − 2]

Solution: Since h[−2] = 1 > 0, the impulse response is non-zero for all negative
values of n = −2. This system is not causal.

1 n
+ 3n u[−n − 1]

(e) h[n] = 3 u[n]

Solution: Note that h[−1] = 13 . Since h[n] > 0 for all n < 0, the impulse response
is non-zero for all negative values of n. This system is not causal.

2. For each of the following LTI systems indicate whether


P or not the system is stable. Given an
impulse response h[n], the system is stable only if ∞
n=−∞ |h[n]| < ∞

(a) h[n] = 4n u[n]

Solution: Since ∞ 2 3
P
n=0 |h[n]| = 1 + 4 + 4 + 4 + · · · → ∞, the impulse response
is not absolutely integrable over time. This system is not stable.

(b) h[n] = u[n] − u[n − 10]


P∞
Solution: Since n=0 |h[n]| = 1 + 1 + · · · + 1 (10 times) → ∞, the impulse
response is not absolutely integrable over time. This system is stable.

(c) h[n] = 3n u[−n − 1]


Solution: For this
P problem a plot will be very helpful
 to visualize the impulse
response. Since ∞ n = 1 + 1 2 + 1 3 +··· = 1 = 3 <
P−1 
n=−∞ |h[n]| = n=−∞ 3 3 3 3 1− 1 2
3
∞, the impulse response is absolutely integrable over time, hence stable.

3 |n|

(d) h[n] = 4 cos(πn/4)

1
Homework 2 ESET 3302 Dr. Geetha Chandrasekaran
(Due: Sep 21, 10:00 pm)

Solution: For this


P problem a plot P∞will be nvery helpful to visualize the impulse
3 2 3 3
response. Since ∞ 3
· · = 1−1 3 =

n=−∞ |h[n]| = n=0 (3/4) = 1 + 4 + 4 + 4 + ·
4

4 < ∞ and ∞ n = −1 + 1 + 3 + 3 2 + 3 3 + · · · =
P P−1  
n=−∞ |h[n]| = n=−∞ (3/4) 4 4 4
−1 + 1−1 3 = 4 < ∞, the impulse response is absolutely integrable over time, hence
4
stable.

(e) h[n] = 2u[n + 5] − u[n] − u[n − 5]

2 h[n]

1.5

0.5

−6 −4 −2 2 4 6

Solution: For this Pproblem the plot above is very helpful to visualize the impulse
response. We have ∞ n=−∞ |h[n]| = 2 × 5 + 1 × 5 = 15 < ∞, the impulse response
is absolutely integrable over time, hence stable.

3. Consider the difference equation of a causal LTI system

1
y[n] + y[n − 1] = x[n − 1]
a
(a) Find the impulse response h[n], as a function of the constant a.

Solution: To find the impulse response set x[n] = δ[n] , then h[n] = y[n].

• Since x[n − 1] = 0, for all n < 1, y[n] = 0, ∀n < 1.

• y[1] = a1 y[0] + δ[0] = 1, since δ[0] = 1

• y[2] = a1 y[1] + δ[1] = 1


a × 1, = 1
since y[1] = 1
a
2
• y[3] = a1 y[2] + δ[2] = 1
a × a1 = a1 , since y[2] = a1
2 3 1 2
• y[4] = a1 y[3] + δ[2] = 1
× a1 = a1 , since y[3] =

a a

1 n−1
• Since y[n] = 0, ∀n < 1, we have the impulse response h[n] =

a u[n − 1]

2
Homework 2 ESET 3302 Dr. Geetha Chandrasekaran
(Due: Sep 21, 10:00 pm)

(b) For what range of values of a will the system be stable?

Solution: The impulse response is stable if ∞ 2


P
n=−∞ |h[n]| < ∞. For the given
n−1
impulse response, n=−∞ |h[n]|2 = ∞
P∞ P 1
 1
n=1 a = 1−a , if a < 1. The system is
stable if a < 1.

4. (Convolution) Let the impulse response of a system be

h[n] = 2δ[n] + δ[n − 1].

Sketch the output of the system, if the input is x[n] = 2δ[n + 1] + 3δ[n] + 4δ[n − 1] + 5δ[n − 2].
(Hint: Plot the impulse response and input, then work on the convolution. You can always
cross validate your answer using MATLAB).
Solution : Convolution is commutative, y[n] = h[n] ∗ x[n] = x[n] ∗ h[n]

h[0] → contribution h[1] → contribution


10 5

8 4

6 3

4 2

2 1

−2 −1 1 2 3 4 −2 −1 1 2 3 4

y[n] = 4δ[n + 1] + 8δ[n] + 11δ[n − 1] + 14δ[n − 2] + 5δ[n − 3]

5. (DTFT ) Consider an LTI system defined by the following difference equation

y[n] = −2x[n] + 4x[n − 1] − 2x[n − 2]

(a) Determine the impulse response of this system

Solution: The impulse response is the output of the system when x[n] = δ[n]

h[n] = −2δ[n] + 4δ[n − 1] − 2δ[n − 2]

(b) Determine the frequency response of this system. Express your answer in the form

H(ejω ) = A(ejω )e−jωnd ,

3
Homework 2 ESET 3302 Dr. Geetha Chandrasekaran
(Due: Sep 21, 10:00 pm)

where A(ejω ) is a real function of ω. Explicitly specify A(ejω ) and the delay nd of this
system.
Solution: To find the DTFT we use the formula below:

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

H(ejω ) = −2e−jω(0) + 4e−jω(1) − 2e−jω(2) = −2 + 4e−jω − 2e−j2ω

(c) Sketch a plot of the magnitude |H(ejω )| and the phase ∠H(ejω ).

Solution: See next page for plot.

Impulse response
4
2
0
-2
0 10 20 30 40 50 60
Time
|H(ej )|

0
-pi -3pi/4 -pi/2 -pi/4 0 pi/4 pi/2 3pi/4 pi
(rad/sample)

2
H(ej )

0
-2
-pi -3pi/4 -pi/2 -pi/4 0 pi/4 pi/2 3pi/4 pi
(rad/sample)

(d) Suppose that the input to this system is

x1 [n] = 1 + ej0.5πn , −∞ < n < ∞,

determine the corresponding output y1 [n]. (Hint: Use the frequency response function)
Solution: DTFT of a constant 1 is a δ function at ω = 0, i.e., X ′ (ejω ) = 2πδ(ω).
• DTFT of ej0.5πn is a δ at ω = 0.5π , i.e., X ′′ (ejω ) = 2πδ(ω − 0.5π).
• Therefore, DTFT of x1 [n] is: X1 (ejω ) = 2πδ(ω) + 2πδ(ω − 0.5π)

4
Homework 2 ESET 3302 Dr. Geetha Chandrasekaran
(Due: Sep 21, 10:00 pm)

• Y (ejω ) = H(ejω )X(ejω ) = (−2 + 4e−jω − 2e−j2ω ) · (2πδ(ω) + 2πδ(ω − 0.5π))

Y (ejω ) = (−2 + 4e−jω − 2e−j2ω ) · 2πδ(ω) + (−2 + 4e−jω − 2e−j2ω ) · 2πδ(ω − 0.5π)

Evaluating at the delta functions:

Y (ejω ) = (−2+4e−j×0 −2e−j2×0 )·2πδ(ω)+(−2+4e−j0.5π −2e−j(2·0.5π) )·2πδ(ω−0.5π)

Simplifying the constants:

Y (ejω ) = 8πe−j0.5π δ(ω − 0.5π)

• Method 1: By definition, inverse DTFT of 8πe−j0.5π δ(ω − 0.5π)


Z π
1
x′ [n] = X ′ (ejω )ejωn dω
2π −π
Z π
1
= 8πe−j0.5π δ(ω − 0.5π)ejωn dω
2π −π
= 4e−j0.5π ejωn ω=0.5π
, since δ(ω − 0.5π) = 1, when ω = 0.5π
−j0.5π j0.5πn j0.5π(n−1)
= 4e e = 4e

DTFT
• Method 2: Recall the DTFT pair ejw0 n ←→ 2πδ(w − w0 ).
DTFT
Therefore, 8πe−j0.5π δ(ω − 0.5π) ←→ 4e−j0.5π ej0.5πn .
(e) Now, suppose that the input to this system is

x2 [n] = 1 + ej0.5πn u[n], −∞ < n < ∞,




determine the corresponding output y2 [n]. (Hint: Use the frequency response function)

Solution: The effect of u[n] is zero input for n < 0, which results in the output
being zero for n < 0. Therefore, the output y[n] for the input x[n] = (1 +
ej0.5πn )u[n] is: (
4ej0.5π(n−1) , for n ≥ 0
y[n] =
0, for n < 0

You might also like