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

ME 360, Fall 21 Solution to Homework6 Due on Friday, October 8

Problems:

1. Classify each of he following systems in terms of linearity, time invariance, static/dynamic, and causality
(u is the input and y is the output):
R∞
1. y(t) = −∞ u(τ ) cos(t − τ ) dτ
Linear, time-invariant, dynamic, non-causal
R∞
2. y(t) = −∞ u(τ ) cos(t) sin(τ ) dτ
Linear, time-varying, dynamic, non-causal
Rt
3. y(t) = −∞ u(τ ) cos(t − τ ) dτ
Linear, time-invariant, dynamic, causal
Rt
4. y(t) = −∞ u2 (τ ) cos(t) sin(τ ) dτ
Nonlinear, time-varying, dynamic, causal

2. Classify each of the following systems in terms of linearity, time invariance, static/dynamic, and
causality (u is the input and y is the output):

1. y(t) + 7 = x(t) + sin(u(t))


Nonlinear, time-invariant, static, causal
d2 d
2. dt2
y(t)+ cos(2t) dt y(t) = u(t)
Linear, time-varying, dynamic, causal
d
3. dt y(t)+ 3y(t) = u(t)
Linear, time-invariant, dynamic, causal
d2 d d
4. dt2
y(t)
+ 3y dt y(t) = 2 dt u(t) + u(t)
Non-linear, time-invariant, dynamic, causal
d
5. dt y(t)= u(t + 1)
Linear, time-invariant, dynamic, non-causal
d
6. + ty 2 (t) = u(t)
dt y(t)
Nonlinear, time-varying, dynamic, causal

3. In each of the systems below, u[n] is the input and y[n] is the output. Classify for linearity, time
invariance, dynamic, and causality.

1. y[n] = ∞ |m−n|
P
m=−∞ u[m]e
Linear, time-invariant, dynamic, non-causal

2. y[n] = ∞ 2 |m−n|
P
m=−∞ u [m]e
Nonlinear, time-invariant, dynamic, non-causal

3. y[n] = nm=−∞ u[m]e|m−n|


P
Linear, time-invariant, dynamic, causal
4. y[n] = ∞ 2 |m−n|
P
m=n+1 u [m]e
Nonlinear, time-invariant, dynamic, non-causal

4. In each of the systems below, u[n] is the input and y[n] is the output. Classify for linearity, time
invariance, dynamic, and causality.
1. y[n] − y[n − 1] = u[n]
Linear, time-invariant, dynamic, causal
2. y[n] + y[n + 1] = nu[n]
Linear, time-varying, dynamic, non-causal
3. y[n] − y[n − 1]y[n − 2] = u[n]
Linear, time-invariant, dynamic, causal
4. y[n] − n1 y[n] = u[n]
Linear, time-varying, static, causal
5. y[n] = u[n] − 2u[n − 1] − nu[n − 2]
Linear, time-varying, dynamic, causal
6. y[n] − y[n − 1] = sin(u[n])
Nonlinear, time-invariant, dynamic, causal
P1 Details:

1. Define y(t) = O{u(t)}. We have


Z ∞
O{αu1 (t) + βu2 (t)} = [αu1 (τ ) + βu2 (τ )] cos(t − τ ) dτ
−∞
Z ∞ Z ∞
=α u1 (τ ) cos(t − τ ) + β u2 (τ ) cos(t − τ )
−∞ −∞
= αO{u1 (t)} + βO{u2 (t)}
Z ∞
O{u(t − t0 )} = u(τ − t0 ) cos(t − τ ) dτ
−∞
Z ∞
τ 0 =τ −t0
= u(τ 0 ) cos(t − t0 − τ 0 ) dτ 0
−∞
= y(t − t0 )
Thus, the system is linear and time-invariant. It is also dynamic (contains an integral) and non-causal
(depends on future values of u).
2. Similarly to P1.1, the system is linear, non-causal and dynamic. However,
Z ∞
O{u(t − t0 )} = u(τ − t0 ) cos(t) sin(τ ) dτ
−∞
Z ∞
τ 0 =τ −t0
= u(τ 0 ) cos(t) sin(τ 0 + t0 ) dτ 0
−∞
6= y(t − t0 )
Thus, the system is time varying.

P2 Details:

2
ME 360, Fall 21 Solution to Homework 7 Due on Friday, October 22

Reading: Convolution (Sec. 6.1-6.2); Discrete-time convolution (Sec. 7.1-7.2); The notation u1 (t) is used
to denote the unit step.

Problems:

1. Problem 6.5 in Ambardar. Convolutions 1 and 2.

Solution to P1:
1. Convolution 1:
Signal endpoints: [−2, 2], [−1, 3] ⇒ Pairwise sum: [−3, 1, 5].

Figure 1: Convolution 1

Since the signals are piecewise constant, the convolution is linear and peaks at t = 1. From Figure 1,
y(1) = 32. At the end-points, the convolution is zero. Thus, y(−3) = 0 = y(5).
More formally, we compute the convolution by ranges:
R t+1
−3 ≤ t ≤ 1: y(t) = −2 2 · 4 dλ = 8(t + 3)
R2
1 ≤ t ≤ 5: y(t) = t−3 2 · 4 dλ = 8(5 − t).
2. Convolution 2: Signal endpoints: [−2, 2], [0, 1] ⇒ Pairwise sum: [−2, −1, 2, 3].

Figure 2: Convolution 2
Let’s compute the convolution by ranges:
Rt
−2 ≤ t ≤ −1: y(t) = −2 1 · 4e−2(t−λ) dλ = 2(1 − e−2(t+2) )
Rt
−1 ≤ t ≤ 2: y(t) = t−1 1 · 4e−2(t−λ) · dλ = 2(1 − e−2 ) ≈ 2.53.
R2
2 ≤ t ≤ 3: y(t) = t−1 1 · 4e−2(t−λ) dλ = 2(e−2(t−2) − e−2 ).

2. Evaluate each convolution and sketch y as a function of t:

1. u(t) = e−t u1 (t) and h(t) = u1 (t)

2. h(t) = e−t u1 (t) and u(t) = u1 (t)

3. h(t) = e−t+1 u1 (t − 1) and u(t) = u1 (t − 1)

4. h(t) = e−t (u1 (t) + eu1 (t − 1)) and u(t) = u1 (t)

Solution to P2:
R∞
Note that the convolution is defined as y(t) = u(t) ⋆ h(t) = −∞ u(τ )h(t − τ ) dτ .
R∞ −τ
Rt
1. y(t) = −∞ e u1 (τ )u1 (t − τ ) dτ = 0 e−τ dτ = 1 − e−t

2. Since the convolution is commutative, i.e., u(t) ⋆ h(t) = h(t) ⋆ u(t), the convolution result is the same,
which is 1 − e−t .
R∞ R t−1
3. y(t) = −∞ e−τ +1 u1 (τ − 1)u1 (t − τ − 1) dτ = 1 e−τ +1 dτ = 1 − e2−t

4. Let h(t) = h1 (t) + h2 (t), where h1 (t) = e−t u1 (t) and h2 (t) = e−t+1 u1 (t − 1).
Thus, y(t) = u(t) ⋆ h(t) = u(t) ⋆ h1 (t) + u(t) ⋆ h2 (t). u(t) ⋆ h1 (t) = 1 − e−t by P4.2. And u(t) ⋆ h2 (t)
is similar to P4.3.
Rt
Then, y(t) = 1 − e−t + 1 e−τ +1 dτ = 2 − e−t − e1−t .

Figure 3: Sketches of y(t)

3. Find the response y(t) using the method of convolution (u1 (t) denotes the unit step):

2
d
1. dt y(t) + y(t) = u1 (t) y(0) = 0
d
2. dt y(t) + y(t) = u1 (t) y(0) = 1

3. d
dt y(t) + y(t) = te−t u1 (t) y(0) = 0

4. d
dt y(t) + y(t) = cos(t)e−t u1 (t) y(0) = 1

Solution to P3:

1. First, let’s find the impulse response h(t):


d
h(t) + H(t) = δ(t)
dt
⇒ sH(s) + H(s) = 1
1
⇒ H(s) =
s+1
−t
⇒ h(t) = e u1 (t)

Thus, Z ∞
y(t) = h(t) ⋆ u1 (t) = e−τ u1 (τ )u1 (t − τ ) dτ
−∞
Z t
= e−τ dτ = 1 − e−t
0

2. Imposing the initial condition to the answer to P1.1 gives:

y(t) = 1 · e−t + 1 − e−t = 1

3. Similar to P1.1, the impulse response is h(t) = e−t u1 (t). Thus,


Z ∞
−t
y(t) = h(t) ⋆ (te u1 (t)) = e−τ u1 (τ )(t − τ )e−(t−τ ) u1 (t − τ ) dτ
−∞
t
t2 −t
Z
= e−t (t − τ ) dτ = e
0 2

4. Similarly, the impulse response is h(t) = e−t u1 (t). Particular solution can be found by convolution
Z ∞
y1 (t) = h(t) ⋆ (cos(t)e−t u1 (t)) = e−τ u1 (τ ) cos(t − τ )e−(t−τ ) u1 (t − τ ) dτ
−∞
Z t
= e−t cos(t − τ ) dτ = sin(t)e−t
0

Thus,
y(t) = y1 (t) + 1 · e−t = (1 + sin(t))e−t

4. Find the convolution u ∗ h for the following (the underline is used to denote the n = 0 index):

1. u[n] = u1 [n] and h[n] = u1 [n]

2. u[n] = αn u1 [n] and h[n] = β n u1 [n]

3
3. u[n] = {1, 2, 1} and h[n] = {2, 2, 1}

4. u[n] = u1 [n] and h[n] = rect(n/2N )

Solution to P4:
P∞ Pn
1. u ∗ h = k=−∞ u1 [k]u1 [n − k] = k=0 1 =n+1
P∞ k u [k]
Pn α k n β n+1 −αn+1
2. u ∗ h = k=−∞ α 1 · β n−k u1 [n − k] = k=0 ( β ) β = β−α

3. y[n] = {2, 6, 7, 4, 1}.

h[n] = 2 2 1
u[n] = 1 2 1
Input Response
δ[n] h[n] = 2 2 1
2δ[n] 2h[n] = 4 4 2
δ[n] h[n] = 2 2 1
Sum = u[n] Sum = y[n] = 2 6 7 4 1

P∞ k Pn
4. y[n] = k=−∞ u1 [n − k] · rect( 2N )= k=−N 1=n+N +1

4
ME 360, Fall 21 Solution to Homework8 Due on Friday, October 29

Reading: Discrete time systems (Sec. 5.1-5.2); Discrete time convolution (Ch. 7); z-transform (Sec. 17.1)

Problems:

1. Find the z-transform of the following signals:

1. u[n] = {1, 2, 1}

2. h[n] = {2, 2, 1}

3. x[n] = {1, 2, 3, 2, 1}

4. x[n] = 2n u1 [n]
1
5. x[n] = 2n u1 [n]
1
6. x[n] = 2n u1 [n] − 2n u1 [n]

Solution to P1:

1. U (z) = 1 + 2z −1 + z −2

2. H(z) = 2 + 2z −1 + z −2

3. X(z) = z 2 + 2z + 3 + 2z −1 + z −2

4. X(z) = 1 + 2z −1 + 22 z −2 + · · · = 1
1−2z −1
= z
z−2
z
5. X(z) = z− 12

z z
6. X(z) = z−2 − z− 21

2. Find the impulse response h[n] of the following difference equation:

y[n] = 0.5y[n − 1] − u[n]

1. Use the direct method to evaluate h[n] (as I did in the class);

2. Use the method of z-transform.

3. What is the transfer function H(z)? How is it related to h[n]?

Solution to P2:
From the equation we have 0.5h[n − 1] − h[n] = δ[n].

1. Assume the solution of the form h[n] = −An u1 [n]. Then, we have

− 0.5An−1 u1 [n − 1] + An u1 [n] = δ[n]


⇒ An = 0.5An−1
⇒ A = 0, 5
⇒ h[n] = −0.5n u1 [n]
2. Using z-transform method, we have

0.5z −1 H(z) − H(z) = 1


1 z
⇒ H(z) = =−
0.5z −1 − 1 z − 0.5
⇒ h[n] = −0.5n u1 [n]

z
3. The transfer function H(z) = − z−0.5 . It is the z-transform of h[n].

3. The transfer function of a discrete-time system is given by


z2
H(z) =
(z − 12 )(z − 13 )

with initial conditions y[−1] = 0 and y[−2] = 1.


1. What is the zero-input response?
1 n

2. What is the zero-state response with input u[n] = 2 u1 [n] where u1 [n] denotes the unit step.

3. What is the total response with the initial condition indicated in the main part, and the input
indicated in the part 2 above? What property did you use to arrive at this conclusion?
Solution to P3:
From the transfer function we have
Y (z) z2 1
= 1 1 =
U (z) (z − 2 )(z − 3 ) 1 − 6 z + 16 z −2
5 −1

5 1
⇒ y[n] − y[n − 1] + y[n − 2] = u[n]
6 6
1. We now assume u[n] = 0 (zero input) and transform this equation:
5 1
yzi [n] − yzi [n − 1] + yzi [n − 2] = 0
6 6
5 −1 1
Yzi (z) − {z Yzi (z) + y[−1]} + {z −2 Yzi (z) + z −1 y[−1]) + y[−2]} = 0
6 6
1
⇒ Yzi (z) = −
6 − 5z + z −2
−1

Using partial fraction expansion and inverse transformation, we have


1 1 1 z 1 z
Yzi (z) = − = 1 −
3−z 2−z 3z− 3 2 z − 12
1 1 1 1 n h 1 1 i
⇒ yzi [n] = ( )n u1 [n] − ( ) u1 [n] = ( )n+1 − ( )n+1 u1 [n]
3 3 2 2 3 2
z
2. Inverse transformation of input is U (z) = z− 12
.
Partial fractions and inverse transformation of the zero-state response gives
2 6 −12 12 12
Yzs (z) = U (z)H(z) = · = + +
2 − z −1 (2 − z −1 )(3 − z −1 ) 2 − z −1 (2 − z −1 )2 3 − z −1
 
1 n 1 n 1 n 1 n 1 n
⇒ yzs [n] = 6( ) u1 [n] − 4( ) u1 [n] + 3( ) nu1 [n] = (6 + 3n)( ) − 4( ) u1 [n]
2 3 2 2 3

2
3. y[n] = yzi [n] + yzs [n] by superposition property.

4. Compute the z-transform for the following signals:

1. u[n] = u1 [n]

2. u[n] = −u1 [−n − 1]

Solution to P4:

1.
∞ ∞
X X 1 − (z −1 )∞ 1
U (z) = u1 [n]z −n = z −n = −1
= (|z −1 | < 1)
n=−∞
1−z 1 − z −1
n=0

2. Similarly,
∞ −1
X X z(1 − z ∞ ) z
U (z) = −u1 [−n − 1]z −n = (−1)z −n = − = (|z| < 1)
n=−∞ n=−∞
1−z z−1

3
ME 360, Fall 21 Solution to Homework 9 Due 3PM on Monday, November 8

Reading: Class notes. BIBO stability (Section 6.5 and 7.4)

Problems:

1. Consider the following impulse response. Using the method of your choice, verify if the system is BIBO
stable.

Solution to P1:

1. h[n] = {2, 2, 1} is BIBO stable.


X
|h[n]| = |2| + |2| + |1| = 5 < ∞
n=0

2. h[n] = 2n u1 [n] is NOT BIBO stable.

z
H(z) =
z−2
The number of poles equals to the number of zeros. However, pole is not inside the unit circle.

1
3. h[n] = 2n u1 [n] is BIBO stable.

z
H(z) =
z − 0.5
The number of poles equals to the number of zeros. The pole is inside the unit circle.

1
4. h[n] = 2n u1 [n] − 2n u1 [n] is NOT BIBO stable.

z z 1.5z
H(z) = − =
z − 2 z − 0.5 (z − 2)(z − 0.5)

The number of poles is greater than the number of zeros. However, one of the poles is inside the unit
circle.

5. h(t) = u1 (t) − u1 (t − 1) is NOT BIBO stable.

1 − e−s
H(s) =
s
The pole is not on the open left plane.
6. h(t) = e−t u1 (t) is BIBO stable.

1
H(s) =
s+1
The pole is on the open left plane.

7. h(t) = et u1 (t) is NOT BIBO stable.

1
H(s) =
s−1
The pole is not the open left plane.

8. h(t) = et u1 (t) − e−t u1 (t) is NOT BIBO stable.

1 1 −2
H(s) = − =
s−1 s+1 (s − 1)(s + 1)

One of the poles is not the open left plane.

2. Consider the following discrete-time system

y[n] = ay[n − 1] − u[n]

where a is a real number. Determine the range of a for which the system is BIBO. Do this using both

Solution to P2:

1. the test for impulse response h[n].

Y (z) z
Y (z) = az −1 Y (z) − U (z) ⇒ H(z) = = ⇒ h[n] = −an u1 [n]
U (z) a−z

∞ ∞
X
n
X 1
| − a u1 [n]| = an = , |a| < 1
n=−∞
1−a
n=0

So when |a| < 1 the system is BIBO stable.

2. the test for transfer function H(z).

Y (z) z
Y (z) = az −1 Y (z) − U (z) ⇒ H(z) = =
U (z) a−z

The pole is a, so when |a| < 1 the system is BIBO stable (inside the unit circle).

2
3. Consider the following continuous-time system
dy
+ ay = u
dt
where a is a real number. Determine the range of a for which the system is BIBO. Do this using both

Solution to P3:

1. the test for impulse response h(t).

Y (s) 1
sY (s) + aY (s) = U (z) ⇒ H(s) = = ⇒ h(t) = e−at u1 (t)
U (s) s+a
Z ∞ Z ∞
1 1
e−at u1 (t)dt = e−at dt = − e−at |∞
0 =
−∞ 0 a a

So when a > 0 then system is BIBO stable.

2. the test for transfer function H(s).

Y (s) 1
H(s) = =
U (s) s+a

So when a > 0 then system is BIBO stable (on the open left plane).

4. Draw the pole-zero diagram for the following systems:

Solution to P4:

1. h(t) = u1 (t) is NOT BIBO stable.

2. h(t) = e−t u1 (t) is BIBO stable.

3. h[n] = {2, 2, 1} is BIBO stable and causal.

4. h[n] = {2, 2, 1} is BIBO stable and NOT causal.

5. h[n] = {2, 2, 1} is NOT BIBO stable and NOT causal.


s+1
6. H(s) = s2 +5s+6
is BIBO stable.
z+1
7. H(z) = z 2 +5z+6
is NOT BIBO stable.

Indicate if the system is BIBO stable. For 3, 4, and 5, also determine if the system is causal.

3
ME 360, Fall 21 PROBLEM SET 10 Due on Friday, November 12

Problems:

1. The transfer function of a discrete-time (DT) system is given by


z
H(z) = 1
z+ 2

with initial conditions y[−1] = 1.

1. What is the zero-input response?


Solution:
1
Y (z) + z −1 Y (z) = U (z)
2
1
y(n) + y(n − 1) = u(n)
2
1
y(n) + y(n − 1) = 0
2
1
Y (z) + (z −1 Y (z) + y(−1)) = 0
2
−1/2
Y (z) =
1 + 21 z −1
 n+1
1
yzi (n) = − u(n)
2

2. What is the zero-state response with input u[n] = u1 [n] where u1 [n] denotes the unit step?
Solution:   !
z z
U (z)H(z) = 1
z−1 z+ 2
2z/3 z/3
Y (z) = +
z − 1 z + 12
 n
2 1 1
yzs (n) = u(n) + − u(n)
3 3 2

3. What is the total response - including both zero-input and zero-state response?
Solution:
y = yzi + yzs

4. Draw the pole-zero diagram. Is the system BIBO stable?


Solution: Yes, the system is BIBO stable because the pole is in the unit circle.
5. What is the steady state response? [Hint: 1 = cos(0n)]. Compare with the answer from part 3.
Solution:
2
yss = u(n − 1)
3
6. Now consider the input
π π
u(t) = (1 + sin( n) + cos( n))u1 [n]
6 2
Obtain the steady-state response.
Solution:
2
H(e0 ) = H(1) =
3
2
=⇒ |H(e0 )| =
3
∠H(e0 ) = 0

jπ/6 ejπ/6 3+j
H(e ) = jπ/6 1 =

e + 2 3+1+j

jπ/6 3+1 2
=⇒ |H((e )| = p √ =p √
4+2 3+1 5+2 3
     
jπ/6 1 1 π 1
∠H(e ) = arctan √ − arctan √ = − arctan √
3 3+1 6 3+1
i
H(ejπ/2 ) =
i + 12
2
=⇒ |H((ejπ/2 )| = √
5
jπ/2 π
∠H(e ) = − arctan(2)
2
2 π  π 
yss = + |H((ejπ/6 )|sin n + ∠H(ejπ/6 ) + |H((ejπ/2 )|cos + ∠H(ejπ/2 )
3 6 2

2. The transfer function of a continuous time (CT) system is


s
H(s) = 2
s + 5s + 6

2
1. Write the associated ODE with output y(t) and input u(t).
Solution:
sU (s) = s2 Y (s) + 5sY (s) + 6Y (s)
u̇(t) = ÿ(t) + 5ẏ(t) + 6y(t)

2. Obtain the expression for the impulse response h(t).


Solution:

Y (s) = H(s)U (s)


s s
Y (s) = 2 =
s + 5s + 5 (s + 2)(s + 3)
−2 3
= +
s+2 s+3
y(t) = −2e−2t + 3e−3t

3. Consider the input signal u(t) = 4u1 (t) where u1 (t) denotes the unit step. Assuming zero initial
conditions, obtain the output y(t) by using

(a) convolution, and


(b) the method of Laplace transform.

y(t) = h(t) ∗ u(t)


Z ∞
= 4u1 (t − τ )(−2e−2τ + 3e−3τ )dτ
−∞
Z t
=4 (−2e−2τ + 3e−3τ )dτ
0
−2t
= 4(e − e−3t )

Y (s) = H(s)U (s)


s 4 4
Y (s) = 2 =
s + 5s + 5 s (s + 2)(s + 3)
4 −4
= +
s+2 s+3
y(t) = 4(e−2t − e−3t )
4. Draw the pole-zero diagram. Is the system BIBO stable?
Solution: Yes, the system is BIBO stable because all poles are in the LHP.

3
5. What is the steady-state response? Compare with the answer from part 3.
Solution:
yss = 0

6. Now consider the input

u(t) = (1 + sin(t) + cos(2t) + sin(10t))u1 (t)

Obtain the steady-state response.


Solution:

j
H(j) =
5j + 5
1
=⇒ |H(j)| = √
5 2
π
∠H(j) =
4
j
H(2j) =
1 + 5j
1
=⇒ |H(2j)| = √
26
π
∠H(j) = − arctan(5)
2
5j
H(10j) =
25j − 47
5
=⇒ |H(10j)| = √
25 + 472
2
 
π 25
∠H(10j) = − arctan −
2 47

yss = |H(j)|sin (t + ∠H(j)) + |H(2j)|cos (2t + ∠H(2j)) + |H(10j)|sin (10t + ∠H(10j))

You might also like