$30
ECE102 Homework #3
Signals & Systems
100 points total.
1. (20 points) Linear systems
Determine whether each of the following systems is linear or not. Explain your answer.
(a) y(t) = cos(t)x(t)
(b) y(t) = d
dt(
1
2
x(t)
2
)
(c) y(t) = e
x(t)
(d) y(t) = x(t) + 2u(t + 1)
2. (13 points) LTI systems
(a) (7 points) Consider an LTI (linear time-invariant) system whose response to x1(t) is
y1(t), where x1(t) and y1(t) are illustrated as follows:
Sketch the response of the system to the input x2(t).
(a) x2(t) (b) y2(t)
(b) (6 points) Assume we have a linear system with the following input-output pairs:
• the output is y1(t) = cos(t)u(t) when the input is x1(t) = u(t);
• the output is y2(t) = cos(t)(u(t + 1) − u(t)) when the input is x2(t) = rect(t +
1
2
).
Is the system time-invariant?
1
3. (38 points) Convolution
(a) (10 points) For each pair of the signals given below, compute their convolution using
the flip-and-drag technique.
i. f(t) = δ(t + 1) + 2δ(t − 2), g(t) = e
−tu(t)
ii. f(t) = 2 rect(t −
3
2
), g(t) = 2 r(t − 1)rect(t −
3
2
)
(b) (10 points) For each of the following, find a function h(t) such that y(t) = x(t) ? h(t).
i. y(t) = R t
t−T
x(τ )dτ
ii. y(t) = P∞
n=−∞ x(t − nTs)
(c) (10 points) Simplify the following expressions:
i. [δ(t − 3) + δ(t + 2)] ∗
e
3tu(−t) + δ(t + 2) + 2
ii. d
dt [(u(t) − u(t + 1)) ? u(t − 2)], Hint: Show first that u(t) ? u(t) = r(t) where r(t)
is the ramp function.
(d) (8 points) Explain whether each of the following statements is true or false.
i. If x(t) and h(t) are both odd functions, and y(t) = x(t) ? h(t), then y(t) is an even
function.
ii. If y(t) = x(t) ? h(t), then y(2t) = h(2t) ? x(2t).
4. (12 points) Impulse response and LTI systems
Consider the following three LTI systems:
• The first system S1 is given by its input-output relationship: y(t) = R t
−∞ x(τ − t0)dτ ;
• The second system S2 is given by its impulse response: h2(t) = u(t − 2);
• The third system S3 is given by its impulse response: h3(t) = u(t + 3).
(a) (4 points) Compute the impulse responses h1(t) of system S1.
(b) (4 points) The three systems are interconnected as shown below.
Determine the impulse response heq(t) of the equivalent system.
(c) (4 points) Determine the response of the overall system to the input x(t) = δ(t)+δ(t−3).
2
5. (17 points) MATLAB
To complete the following MATLAB tasks, we will provide you with a MATLAB function
(nconv()), which numerically evaluates the convolution of two continuous-time functions.
Make sure to download it from CCLE and save it in your working directory in order to use
it.
The function syntax is as follows:
[y, ty] = nconv(x,tx,h,th)
where the inputs are:
x : input signal vector
tx: times over which x is defined
h : impulse response vector
th: times over which h is defined
and the outputs are:
y : output signal vector
ty: times over which y is defined.
The function is implemented with the MATLAB’s conv() function. You are encouraged
to look at the implementation of the function provided (the explanations are included as
comments in the code).
(a) (7 points) Task 1
Use the nconv() function to check your results for problem 3(a)(ii). Plot the output
for each problem (you can consider either function to be the input). Properly label the
axes of the plots. Make sure to use the same step size for tx and th.
(b) (5 points) Task 2
Using the nconv() function, perform the convolution of two unit rect functions: rect(t)?
rect(t). Plot and label the result.
(c) (5 points) Task 3
Using the result of task 2 and the same MATLAB function, calculate y(t) = rect(t) ?
rect(t) ? rect(t). Plot and label the result.
(d) (Optional) Task 4
Now, what happens if we consider rect(t) ? rect(t) ? · · · ? rect(t) = rect(N)
(t)? Using
for loop, calculate the result of convolving N rect(t) functions together. Plot and label
the results (use N = 100).
3