Solution - Brown CS

ENGN 1570 Homework 3
(Solution)
Example 1.2
Problem 1
We are given the signal x(t):
x(t)
1
−1
0
1
2
3
4
t
5
Let us transform the given x(t) to x(−2t + 6). We need to use all three types of transformations (a shift, a
scale and a flip), but what in what order shall we do them? How do we do it? The following guide explains:
For the signal x(t) above, compute y = x ∗ h using the convolution formula and sketch
y(t) for each signal h below. You should express the result of the convolution as a piece-wise
What to do when you need to do multiple transformations:
• We can do the transformations in any order. However, the amount and
direction of the shift depends on whether it is performed before or after
the reversal and the scale.
function of t, with a closed form algebraic expression for each interval of t.
(a)
• We can think of cascaded transformations as repeated substitutions of
the independent variable t.



0
t<0


To demonstrate these principles, let’s do the transformation in three different orders.
h(t) =
2 0<t<1
Advance by 6
Compress by 2
Reverse

• x(t)
−→
x(t + 6)
−→
x(−t + 6)
−→
x(−2t + 6).


 0
t>1
• x(t)
• x(t)
Compress by 2
−→
x(2t)
Reverse
−→
x(−t)
Advance by 3
−→
Delay by 6
−→
x(2(t + 3))
x(−(t − 6))
9



0






2t






2


Compress by 2
−→ = x(−(2t −1 6)).
y(t)
− 2 t2 + 2t





−t + 29




1 2


t − 5t +

2



 0
Reverse
−→
t<0
x(2(−t + 3)).
1
0<t<1
1<t<2
2<t<3
3<t<4
25
2
4<t<5
t>5
3
2.5
2
1.5
1
0.5
0
−0.5
−1
−2
−1
0
1
2
3
4
5
6
(b) h(t) = δ(t) + δ(t − 1)
y(t) = x(t)∗h(t) = x(t)∗[δ(t)+δ(t−1)] = x(t)∗δ(t)+x(t)∗δ(t−1) = x(t)+x(t−1),
so add a shifted version of x(t) to itself.
3
2.5
2
1.5
1
0.5
0
−0.5
−1
−1
0
1
2
3
4
5
6
7
Problem 2
Let Ch be the system that has output x ∗ h on input x. For each of the choices for h below,
determine if Ch is invertible. If so, give the signal h0 such that Ch0 is the inverse of Ch . If
not, give two input signals that map to the same output signal.
(a) h(t) = e−j2t
Ch can not be invertible because h(t) is periodic. Let T = π be a period of h(t).
Take any non-periodic signal x1 (t) and let x2 (t) be x1 (t) delayed by T . Since x1
2
is not periodic we have x2 6= x1 , but since h is periodic with period T we have
Ch (x1 ) = Ch (x2 ).
(b) h(t) = jδ(t)
Ch is invertible. Take h0 = −jδ(t).
Problem 3
Let y = x ∗ h. Let y 0 , x0 and h0 denote y, x and h delayed by 1 respectively. Determine
which of the statements below are true and which are false. Justify your answers.
(a) If x[n] = 0 for n < N1 and h[n] = 0 for n < N2 then y[n] = 0 for n < N1 + N2 .
True.
Suppose y[n] 6= 0.
y[n] =
X
k
x[k]h[n − k]
For y[n] to be non-zero there must exist a k for which x[k] 6= 0 and h[n − k] 6= 0.
This means k ≥ N1 and n − k ≥ N2 . Since k + (n − k) = n we have n ≥ N1 + N2 .
(b) If x[n] = 0 for n > N1 and h[n] = 0 for n > N2 then y[n] = 0 for n > N1 + N2 .
True.
Suppose y[n] 6= 0.
y[n] =
X
k
x[k]h[n − k]
For y[n] to be non-zero there must exist a k for which x[k] 6= 0 and h[n − k] 6= 0.
This means k ≤ N1 and n − k ≤ N2 . Since k + (n − k) = n we have n ≤ N1 + N2 .
(c) y 0 = x0 ∗ h0
False.
(d) y 0 = x0 ∗ h
True by time invariance of Ch .
(e) y 0 = x ∗ h0
True by time invariance of Cx .
3
Problem 4
The following are impulse responses of LTI systems. Determine if the systems are causal
and/or stable. Justify your answers.
(a) h[n] = (1/5)n u[n]
Causal because h[n] = 0 for n < 0. Stable because
∞
P
( 51 )n = 5/4 < ∞.
n=0
(b) h[n] = (0.8)n u[n + 2]
Not causal because h[n] 6= 0 for n < 0. Stable because
∞
P
(0.8)n = 5 < ∞.
n=−2
(c) h[n] = (−1/2)n u[n] + (1.01)n u[n − 1]
Causal because h[n] = 0 for n < 0. Unstable because the second term becomes
infinite as n → ∞.
(d) h(t) = e−4t u(t − 2)
Causal because h(t) = 0 for t < 0. Stable because
R∞
−∞
|h(t)|dt = e−8 /4 < ∞.
(e) h(t) = e−6|t|
Not causal because h(t) 6= 0 for t < 0. Stable because
R∞
−∞
|h(t)|dt = 1/3 < ∞.
Problem 5
It is often important to transform between continuous and discrete signals. We can define
a discrete signal from a continuous signal by “sampling” the continuous signal at integer
times. The problem of defining a continuous signal y(t) from a discrete signal x[n] is more
complicated because we have to fill in the missing values. A common approach involve using
spline basis functions.
One of the simplest spline functions is the “triangular shaped” signal defined by



0
t < −1




 t + 1 −1 < t < 0
h(t) =


1−t
0<t<1




 0
t>1
(a) Sketch h(t)
4
Let x[n] be a discrete signal. We can define a continuous signal y(t) by taking linear
combinations of shifted and scaled versions of h(t).
∞
X
y(t) =
k=−∞
x[k]h(t − k)
Sketch the resulting y(t) for the following cases:
(b) x[n] = 2
In this case y(t) = 2.
(c) x[n] = n
In this case y(t) = t.
(d)

 3 n=0
x[n] =
 0 n=
6 0
3
2.5
2
1.5
1
0.5
0
−5
−4
−3
−2
−1
0
1
2
3
4
5
(e)



0






5




 2
x[n] =


2






−1




 0
5
n≤0
n=1
n=2
n=3
n=4
n≥5
5
4
3
2
1
0
−1
−2
0
2
4
6
8
10
(f ) In general, what can you say about the resulting y(t) at integer values for t? What
about non-integer values for t?
At integer t we have y(t) = x[t]. Between two consecutive integer values t and
t + 1 we have that y(t) is a linear function. So y(t) is continuous and piecewise
linear. It goes exactly “through” the values defined by x at integer t and fills in
the missing parts using linear interpolation.
6