Signals & Systems B38SA 2018: Chapter 2 Assignment Question 1 - Theory - 10 Marks
Signals & Systems B38SA 2018: Chapter 2 Assignment Question 1 - Theory - 10 Marks
Prof. Y. Wiaux
Chapter 2 Assignment
Solution:
Any arbitrary input signal x(t) can be decomposed into impulse functions as follows:
Z +∞
x(t) = x(λ)δ(t − λ)dλ
−∞
The output signal y(t) can be expressed in term of input signal as in the following line:
Z +∞
y(t) = Sys{x(t)} = Sys{ x(λ)δ(t − λ)dλ}
−∞
A system is said to be time invariant if, being y(t) = Sys{x(t)} the input-output relationship, any time-shifted input
x(t − τ ) results in a time-shifted output y(t − τ ); therefore, when the system is time-invariant the following expression
holds:
y(t) = Sys{x(t)} implies that Sys{x(t − τ )} = y(t − τ ).
In particular, considering a unit impulse δ(t) as input signal and defining the corresponding response as the impulse
response function h(t), we can rewrite the previous expression as follows:
that is equivalent to y(t) = x(t) ∗ h(t), where ∗ represents the convolution operation.
1
Signals & Systems B38SA 2018
Prof. Y. Wiaux
Solution:
The solution of the non-homogeneous equation (1) is of the form
y(t) = yh (t) + yp (t)
where yh (t) is the solution of the homogeneous equation given by
d2 y(t) d y(t)
(∀t ≥ 0) +6 + 8y(t) = 0 (2)
d t2 dt
and yp (t) is the solution of the particular equation.
(i) The characteristic equation of (2) is
s2 + 6s + 8 = 0,
and has two simple roots s1 = −2 and s2 = −4.
Then, the homogeneous solution is of the form
(∀t ≥ 0) yh (t) = c1 exp(−2t) + c2 exp(−4t).
dyp (t)
Since = k1 , we have, for t ≥ 0
dt
d2 y(t) d y(t)
+6 + 8 y(t) = 8 x(t)
d t2 dt
⇔ 6 k1 + 8 (k1 t + k2 ) = 8 (t + 1)
⇔ (3 + 4t)k1 + 4k2 = 4(t + 1)
⇔ 3k1 + 4k2 − 4 + 4k1 − 4 t = 0.
2
Signals & Systems B38SA 2018
Prof. Y. Wiaux
According to (i) and (ii) the solution of the non-homogeneous equation (1) is given by
Figure 1: RC circuit
3
Signals & Systems B38SA 2018
Prof. Y. Wiaux
1.5
0.5
Amplitude
-0.5
-1
-1.5
-2
-2.5
-2 -1 0 1 2 3 4 5 6 7
t
2. Construct an anonymous function yu(t) for computing the unit-step response of the circuit (see the solved
MATLAB Exercise 2.3 from the book for details). Construct an anonymous function yr(t) for computing the
unit-ramp response of the circuit (a similar function is used in Problem 2.36). Consider the system to be initially
relaxed (zero initial conditions).
3. Express the output signal y(t) of the circuit given the input x(t), in terms of scaled and time shifted versions
of the unit-step response and the unit-ramp response. Consider the system to be initially relaxed (zero initial
conditions). Create an anonymous function for y(t). Compute it in the time interval −2 ≤ t ≤ 7 seconds with
an increment of 0.01 seconds.
4. Graph the input x(t) and the output signal y(t) on the same coordinate system. Make sure that the figure is well
annotated.
Solution:
The input signal x(t) can be expressed as
d y(t) 1 1
+ y(t) = x(t).
dt RC RC
The response of the circuit is obtained by solving the differential equation (see eq. 2.57 in the book) with zero initial
4
Signals & Systems B38SA 2018
Prof. Y. Wiaux
conditions. The solution for the unit step input (see eq. 2.59 in the book) is
t
yu (t) = 1 − e− RC u(t).
Similarly, for the unit ramp we have (see Problem 2.12 from the book)
t
yr (t) = t − RC 1 − e− RC u(t).
Given yu (t) and yr (t) we can construct y(t) using superposition since the circuit is initially relaxed and therefore linear
and time-invariant (see MATLAB Exercise 2.3 from the book). Thus, y(t) can be computed through the MATLAB
statements below. The resulting graph is presented in Figure 3
2
Input signal x(t)
Response of the system y(t)
1.5
0.5
Amplitude
-0.5
-1
-1.5
-2
-2.5
-2 -1 0 1 2 3 4 5 6 7
t
R = 1;
C = 1/4;
r = @(t) t .* (t>0);
u = @(t) 1 .* (t>0);
x = @(t) (r(t) - r(t-1)) ... % create first part of the ramp between t = -1
... % and t = 1 (this creates a plateau at t > 1 with x = 1)
+ (-3)*u(t-1) ... % create second part of the signal between t = 1 and t = 3
+ (2*r(t-3) - r(t-4)) ... % create the two ramp segments going
... % from x = -2 to x = 0 for t = 3 to t = 4
... % and from x = 0 to x = 1 for t = 4 to t = 5
5
Signals & Systems B38SA 2018
Prof. Y. Wiaux
figure;
hold on;
grid on;
xlabel(’t’);
ylabel(’Amplitude’);
axis([-2, 7, -2.5, 2]);