Professional Documents
Culture Documents
Midterm 2 Hws
Midterm 2 Hws
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):
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
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:
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:
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 ).
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 .
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:
Thus, Z ∞
y(t) = h(t) ⋆ u1 (t) = e−τ u1 (τ )u1 (t − τ ) dτ
−∞
Z t
= e−τ dτ = 1 − e−t
0
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):
3
3. u[n] = {1, 2, 1} and h[n] = {2, 2, 1}
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 ( β ) β = β−α
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. 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
1. Use the direct method to evaluate h[n] (as I did in the class);
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
z
3. The transfer function H(z) = − z−0.5 . It is the z-transform of h[n].
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
2
3. y[n] = yzi [n] + yzs [n] by superposition property.
1. u[n] = u1 [n]
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
Problems:
1. Consider the following impulse response. Using the method of your choice, verify if the system is BIBO
stable.
Solution to P1:
∞
X
|h[n]| = |2| + |2| + |1| = 5 < ∞
n=0
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.
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.
1
H(s) =
s−1
The pole is not the open left plane.
1 1 −2
H(s) = − =
s−1 s+1 (s − 1)(s + 1)
where a is a real number. Determine the range of a for which the system is BIBO. Do this using both
Solution to P2:
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
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:
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
Y (s) 1
H(s) = =
U (s) s+a
So when a > 0 then system is BIBO stable (on the open left plane).
Solution to P4:
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:
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
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)
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
3
5. What is the steady-state response? Compare with the answer from part 3.
Solution:
yss = 0
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