f18 Practice Midterm1 Solutions
f18 Practice Midterm1 Solutions
Midterm 1 Solutions
Name:
Andrew ID:
1. (10 points) Determine whether the following statements or equations are true or false
by circling the answer. No explanation is needed.
True False
Solution
(a) False. This is a DT signal and scaling it with integer makes it aperiodic.
(b) True.
(c) False. The output is dependent on past input.
(d) False. y(t) = cos(t − 2π) = cos(t)
(e) True.
Midterm 1 Solutions 3
2. (8 points) Determine whether the following signals are periodic and justify. If the
signal is periodic, find the fundamental period.
Solution:
3. (12 points) Determine the total energy and average power of the following signals.
2,
−3 ≤ t ≤ 3
(a) x(t) = 5 − t, 3≤t≤5
0, otherwise
Solution:
(a) Energy:
Z∞
E= |x(t)|2 dt
t=−∞
Z3 Z5
2
= |x(t)| dt + |x(t)|2 dt
t=−3 t=3
Z3 Z5
= (2)2 dt + (5 − t)2 dt
t=−3 t=3
Z3 Z5
= 4dt + (25 + t2 − 10t)dt
t=−3 t=3
3 1 5
= (4t) + (25t + t3 − 5t2 )
t=−3 3 t=3
1
= (4(3) − 4(−3)) + (25(5 − 3) + (53 − 33 ) − 5(52 − 32 ))
3
98
= 24 + (50 + − 80)
3
8
= 24 +
3
80
=
3
Power:
ZT
1
P = lim |x(t)|2 dt.
T →∞ 2T
t=−T
Midterm 1 Solutions 5
1
P = lim E
T ⇒∞ 2T
1 92
= lim
T ⇒∞ 2T 3
=0
Energy
Z∞
E= |x(t)|2 dt
t=−∞
Z∞
1 2
= sin (2t)dt
4
t=−∞
Z∞
1 1
= · (1 − cos(4t))dt
4 2
t=−∞
Z∞
1
= (1 − cos(4t))dt
8
t=−∞
=∞
6 Midterm 1 Solutions
Power:
ZT
1
P = lim |x(t)|2 dt
T →∞ 2T
t=−T
ZT
1 1
= lim (1 − cos(4t))dt
T →∞ 2T 8
t=−T
ZT
1
= lim (1 − cos(4t))dt
T →∞ 16T
t=−T
1 1 T
= lim · (t − sin(4t))t=−T
T →∞ 16T 4
1 1
= lim · (2T − sin(4T ))
T →∞ 16T 2
1 sin(4T )
= lim −
T →∞ 8 32T
1
= .
8
(c) Energy
∞
X
E= |x[n]|2
n=−∞
X∞
= |an u[−n]|2
n=−∞
0
X
= |a|2n
n=−∞
∞
X 1
= .
n=0
|a|2n
1
Since |a| > 1, |a| < 1, hence we can use infinite GP sum.
1
E=
1 − |a|1 2
|a|2
=
|a|2 − 1
4. (6 points) Plot the even and odd components of the following signal:
x(t)
t
−3 −2 −1 1 2 3
−1
−2
−3
0 0
Solution:
2 2
1 1
0 t 0 t
−3 −2 −1 1 2 3 −3 −2 −1 1 2 3
−1 −1
−2 −2
−3 −3
2 2
1 1
0 t 0 t
−3 −2 −1 1 2 3 −3 −2 −1 1 2 3
−1 −1
−2 −2
−3 −3
Midterm 1 Solutions 9
x(t)
3
2
t
−3 −2 −1 1 2 3
−1
−2
−3
0
10 Midterm 1 Solutions
Solution:
x(t)
2
0 t
−7−6−5−4−3−2−1 1 2 3 4 5 6 7
−1
−2
x(t)
4
1 t
0
−7 −6 −5 −4 −3 −2 −1 1 2 3
−1
−2
12 Midterm 1 Solutions
6. (10 points) Consider a continuous-time LTI system H. Given input x(t) below, let
y(t) = H{x(t)} be the output of the system. Assume x(t) = 0 and y(t) = 0 for values
of t not shown.
x(t) y(t)
3 3
2 2
1
1
t t
−3 −2 −1 1 2 3 −3 −2 −1 1 2 3
−1 −1
−2 −2
−3 −3
For the input x1 (t) given below, plot the output y1 (t) = H{x1 (t)} of the system. Label
the axes appropriately.
x1(t)
3
2
1
t
−4 −3 −2 −1 1 2 3 4
−1
−2
−3
Midterm 1 Solutions 13
Solution:
By looking at the graphs, x1 (t) = 2x(t) − x(t − 1)
Since the system is linear and time-invariant, we have
y1 (t) = H{x1 (t)} = H{2x(t) − x(t − 1)} = 2y(t) − y(t − 1)
See the plot below.
y1 (t)
4
3
2
1
−4 −3 −2 −1 1 2 3 4 t
−1
14 Midterm 1 Solutions
7. (12 points) The following systems have x(t) or x[n] as input and y(t) or y[n] as output.
For each system state whether the following properties hold and justify:
• (1 point) Causal
• (1 point) Stable
• (2 points) Linear
• (2 points) Time invariant
Solution:
y(t) = tx(t)
=⇒ |y(t)| = |t||x(t)|
≤ |t|M
= M t → ∞ as t → ∞.
y(t) = tx(t)
=⇒ y(t − τ ) = (t − τ )x(t − τ ).
Midterm 1 Solutions 15
ŷ(t) = tx̂(t)
= tx(t − τ )
6= y(t − τ ).
y[n] = x[n]
=⇒ |y[n]| = |x[n]|
≤M
y1 [n] = 10
y2 [n] = 10
y[n] = 10
6= y1 [n] + y2 [n]
x(t)
2
0 t
−3 −2 −1 1 2 3
−1
−2
x(t)
2
0 t
−3 −2 −1 1 2 3
−1
−2
x(t)
2
0 t
−1 1 t−1 t
−1
−2
x(t)
2
0 t
−1 t−1
1 t
−1
−2
x(t)
2
0 t
−1t − 1 t
1
−1
−2
x(t)
2
0 t
−1 t
t−1
1
−1
−2
x(t)
2
0 t
−1 t
t−1
1
−1
−2
Observe that
(
1, for all 0 ≤ n ≤ 4
x[n] =
0, otherwise
Thus, x[n − k] is also non-zero only in the range n − 4 ≤ k ≤ n. And the summation in
convolution is in the range 0 ≤ k < ∞. So we look at the overlap of these two ranges
of k to find the convolution sum.
Case 1: n < 0, i.e. no overlap between n − 4 ≤ k ≤ n and 0 ≤ k < ∞.
In this case,
∞
X
y[n] = e−k x[n − k] = 0
k=0
Case 2: n ≥ 0 but n − 4 < 0, i.e. 0 ≤ n < 4 . In this case, there is some overlap
between n − 4 ≤ k ≤ n and 0 ≤ k < ∞.
∞
X
y[n] = e−k x[n − k]
k=0
n
X ∞
X
−k
= e x[n − k] + e−k x[n − k]
k=0 k=n+1
Xn ∞
X
= e−k + e−k 0
k=0 k=n+1
−(n+1)
1−e
=
1 − e−1
20 Midterm 1 Solutions
∞
X
y[n] = e−k x[n − k]
k=0
Xn
= e−k
k=n−4
5
−n e −1
=e
e−1
0,
for all n < 0
1−e−(n+1)
y[n] = 1−e−1
, for all 0 ≤ n < 4
−n e5 −1
e e−1 , for all n ≥ 4
Midterm 1 Solutions 21
10. (6 points) Consider a discrete-time LTI system H which has the following input-
output relationship:
y[n] = 0.5x[n + 1] + x[n] + 0.5x[n − 1]
Draw the impulse response of the system, h[n]. Label the axes appropriately.
Solution: For impulse response, we substitute x[n] = δ[n], which gives us,
y[n] = 0.5 · δ[n + 1] + δ[n] + 0.5 · δ[n − 1]
h[n]
−3 −2 −1 1 2 3 n
−1
−2