0% found this document useful (0 votes)
88 views21 pages

f18 Practice Midterm1 Solutions

The document is the solutions to a signals and systems midterm exam with 10 multiple choice and short answer questions. It provides the answers to each question, explaining whether statements are true or false and solving problems about signal properties such as periodicity, energy, and average power. The highest possible score is 100 points.
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)
88 views21 pages

f18 Practice Midterm1 Solutions

The document is the solutions to a signals and systems midterm exam with 10 multiple choice and short answer questions. It provides the answers to each question, explaining whether statements are true or false and solving problems about signal properties such as periodicity, energy, and average power. The highest possible score is 100 points.
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/ 21

18-290

Signals and Systems


Profs. Byron Yu and Pulkit Grover Fall 2017

Midterm 1 Solutions

Name:

Andrew ID:

Problem Score Max


1 10
2 8
3 12
4 6
5 10
6 10
7 12
8 13
9 13
10 6
Total 100
2 Midterm 1 Solutions

1. (10 points) Determine whether the following statements or equations are true or false
by circling the answer. No explanation is needed.

(a) The signal x[n] = sin(2n) is periodic.


True False
(b) To obtain the graph of y(t) = x(2t + 2), we first scale x(t) in time by 2 and then
shift it to the left by 1.
True False
(c) The system with input x[n] and output y[n] = 3x[n − 2] is memoryless.
True False
(d) cos(t) ∗ δ(t − 2π) = 1
True False
e−jωt −ejωt
(e) sin(ωt) = −2j

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.

(a) x(t) = et cos(πt + 1) + 4


e−jωt +ejwt
(b) x(t) = 2
π
(c) x[n] = sin( 2 n) cos(n + 1)
(d) x[n] = sin2 ( 3π
2
n) + sin( 3π
4
n)

Solution:

(a) Not periodic due to et .



(b) Periodic because x(t) = cos(ωt), and the fundamental period is ω
.
(c) Not periodic since cos(n + 1) is not periodic.
(d) Periodic because sin2 ( 3π
2
n) and sin( 3π
4
n) are both periodic. The fundamental
2 3π 3π
periods of sin ( 2 n) and sin( 4 n) are 2 and 8, so the fundamental period of x[n]
is 8.
4 Midterm 1 Solutions

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

(b) x(t) = cos(t) sin(t)


(c) x[n] = an u[−n], |a| > 1

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

Since T is large enough, we have,

1
P = lim E
T ⇒∞ 2T
1 92
= lim
T ⇒∞ 2T 3
=0

(b) Notice that, x(t) = cos(t) sin(t) = 12 sin(2t)

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

Power Since the energy is finite, power P = 0.


Midterm 1 Solutions 7

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

Label the axes appropriately.

0 0

Solution:

Even component xe (t) = 12 (x(t) + x(−t))


8 Midterm 1 Solutions

x(t), x(−t) xe (t)


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

Even component xo (t) = 21 (x(t) − x(−t))

x(t), −x(−t) xo (t)


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

5. (10 points) Consider the following continuous-time signal:

x(t)

3
2

t
−3 −2 −1 1 2 3
−1

−2

−3

Sketch the following signals. Label the axes appropriately.

(a) y1 (t) = −x( 2t + 1)

0
10 Midterm 1 Solutions

(b) y2 (t) = 2x(−4 − t)

Solution:

(a) Shift left by 1, scale t by 0.5 and flip by x-axis

x(t)
2

0 t
−7−6−5−4−3−2−1 1 2 3 4 5 6 7

−1

−2

(b) Shift right by 4, flip by y-axis and scale y by 2


Midterm 1 Solutions 11

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

(a) y(t) = tx(t)


(
x[n] if |x[n]| ≤ 10
(b) y[n] =
10 if |x[n]| > 10

Solution:

(a) Causal, not stable, linear, not time invariant


Causality: Since y(t) only depends on the current value of x(t), it is causal.
Stability: Let |x(t)| ≤ M . Then,

y(t) = tx(t)
=⇒ |y(t)| = |t||x(t)|
≤ |t|M
= M t → ∞ as t → ∞.

Hence the system is not stable.


Linearity: Let x1 (t) and x2 (t) be two inputs, and let x(t) = ax1 (t) + bx2 (t) be a
third input, where a, b are arbitrary constants. Then,

y1 (t) = tx1 (t)


y2 (t) = tx2 (t)
y(t) = tx(t)
= t(ax1 (t) + bx2 (t))
= atx1 (t) + btx2 (t)
= ay1 (t) + by2 (t).

Hence the system is linear.


Time invariance:

y(t) = tx(t)
=⇒ y(t − τ ) = (t − τ )x(t − τ ).
Midterm 1 Solutions 15

Let x̂(t) = x(t − τ ).

ŷ(t) = tx̂(t)
= tx(t − τ )
6= y(t − τ ).

Hence the system is not time invariant.


(b) Causal, stable, not linear, time invariant
Causality: Since y[n] only depends on the current value of x[n], it is causal.
Stability: Case 1: Let |x[n]| ≤ M ≤ 10. Then,

y[n] = x[n]
=⇒ |y[n]| = |x[n]|
≤M

Case 2: Let |x(t)| ≤ M > 10. Then,


(
x[n] if |x[n]| ≤ 10
y[n] =
10 if |x[n]| > 10
=⇒ |y(t)| ≤ 10

Hence the system is stable.


Linearity: Counterexample: Let x1 [n] = 10 and x2 [n] = 10 be two inputs and
let x[n] = x1 [n] + x2 [n] be a third input.
This means that x[n] = 20.

y1 [n] = 10
y2 [n] = 10
y[n] = 10
6= y1 [n] + y2 [n]

Hence the system is not linear.


16 Midterm 1 Solutions

8. (13 points) Compute the convolution y(t) = x(t) ∗ h(t), where

x(t) = u(t + 1) − u(t − 1)


h(t) = u(t) − u(t − 1)

Solution: It is easier to solve this problem graphically.

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

Case 1: t > 2 no overlap between two figures.

x(t)
2

0 t
−1 1 t−1 t

−1

−2

Case2: 1 < t < 2 the overlap area is 2 − t


Midterm 1 Solutions 17

x(t)
2

0 t
−1 t−1
1 t

−1

−2

Case3: 0 < t < 1 the overlap area is 1

x(t)
2

0 t
−1t − 1 t
1

−1

−2

Case4: −1 < t < 0 the overlap area is t + 1


18 Midterm 1 Solutions

x(t)
2

0 t
−1 t
t−1
1

−1

−2

Case5: t < −1 no overlap between two figures.

x(t)
2

0 t
−1 t
t−1
1

−1

−2

The complete signal,




 0, t < −1

t + 1, −1 ≤ t < 0



y(t) = 1, 0≤t<1

2 − t, 1≤t<2





0, t≥2
Midterm 1 Solutions 19

9. (13 points) Evaluate the following convolution:

y[n] = e−n u[n] ∗ (u[n] − u[n − 5])

Solution: Let x[n] = u[n] − u[n − 5] and h[n] = e−n u[n].


The convolution sum is given by,

X
y[n] = e−k u[k](x[n − k])
k=−∞

X
= e−k x[n − k]
k=0

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

Case 3: n ≥ 4 i.e. there is full overlap between n − 4 ≤ k ≤ n and 0 ≤ k < ∞.


X
y[n] = e−k x[n − k]
k=0
Xn
= e−k
k=n−4
5
−n e −1
=e
e−1

Thus, the solution is:


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

You might also like