Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1

Experiment 2: LTI Systems


Prepared by : Shahram Shahbazpanahi

I. O BJECTIVES
In this experiment, you will learn how to verify whether a system is LTI or not? You also
learn how to build an analog filter by using simple blocks such as integrator, adder, subtractors,
and gain modules.
II. P RE -L AB A SSIGNMENTS
In this section, you learn how the linearity and time-invariance properties of a system can be
verified by applying different inputs to the system.
1) Consider a continuous-time system whose input-output relationship is given by the following equation
y(t) = ex(t)

(1)

where where x(t) and y(t) are, respectively, the input and the output of the system. Use
Simulink to obtain and plot the output y(t) for two cases; i) x(t) = 2u(t), ii) x(t) = 4u(t).
Based on these plots, what can you say about the linearity of this system?
2) For the system whose input-output relationship is given by (1), use Simulink to find the
output y(t) for two cases i) x(t) = u(t), ii) x(t) = u(t 2). Based on these plots, what
can you say about the time-invariance of this system?
3) Consider a system whose input-output relationship is given by the following differential
equation
dy
+ 3y(t) = x(t)
dt

(2)

where x(t) and y(t) are, respectively, the input and the output of the system. Assume that
the system is at initial rest, i.e., if x(t) = 0 for t t0 , then y(t) = 0 for t t0 .
a) Use your knowledge on differential equations to obtain y(t) for t 0 when x(t) =
u(t). Plot the so-obtained y(t) for 0 t 10.
October 10, 2009

DRAFT

b) You can use function lsim to obtain the output of an LTI system to any input. Simply
use lsim(a, b, x, t) where b and a are two vectors containing, respectively,
the coefficients of the left-hand side and right-hand side, of the differential equation
which describes the relationship between the input and the output of the system. x is
a vector containing the values of the input signal on a time grid define by vector t.
Make yourself familiar with function lsim and then use this function to analytically
obtain the step response of the system in (2).
c) Compare the results you obtained in parts a and b.
d) Make yourself familiar with function step and then use this function to obtain the
step response of the system in (2).
e) Make yourself familiar with function impulse and then use this function to obtain
the impulse response of the system in (2).
III. L AB ACTIVITIES
In this section, you will learn how to verify the linearity of system (block box) by means of
applying different inputs to the system.
A. System Property Verification
1) In the following activities, p(t) is defined as

p(t) =

and T = 10s.

1,

for 0 t 1
(3)

0,

for t > 1 or t < 0

a) Find out a way to model the following four systems

System A: described by the following differential equation


dy
+ y(t) = x(t) + Initial rest
dt

System B: Described by y(t) = x(t) cos(200t)

System C: Described by y(t) = cos(x(t))

System D: Described by y(t) = x2 (t)(cos(200t)

October 10, 2009

(4)

DRAFT

b) Apply x(t) = p(t) to system A and record the output. Apply x(t) = p(t) + p(t T )
to system A and record the output. Compare these two outputs and comment on the
time-invariance of the system.
c) Apply x(t) = p(t) to system A and record the output. Apply x(t) = 2p(t) to system
A and record the output. Compare these two outputs and comment on linearity of
the system.
d) Apply x(t) = p(t) to system B and record the output. Apply x(t) = p(t) + p(t 2)
to system B and record the output. Compare these two outputs and comment on the
time-invariance of the system.
e) Apply x(t) = p(t) to system B and record the output. Apply x(t) = 2p(t) to system
B and record the output. Compare these two outputs and comment on linearity of
the system.
f) Apply x(t) = p(t) to system C and record the output. Apply x(t) = p(t) + p(t T )
to system C and record the output. Compare these two outputs and comment on the
time-invariance of the system.
g) Apply x(t) = p(t) to system C and record the output. Apply x(t) = 2p(t) to system
C and record the output. Compare these two outputs and comment on linearity of
the system.
h) Apply x(t) = p(t) to system D and record the output. Apply x(t) = p(t) + p(t 2)
to system D and record the output. Compare these two outputs and comment on the
time-invariance of the system.
i) Apply x(t) = p(t) to system D and record the output. Apply x(t) = 2p(t) to system
D and record the output. Compare these two outputs and comment on linearity of
the system.
B. Convolution Integral
a) Consider an LTI system whose impulse response is given by h(t) = e4t cos(2t).
Write an M-file to calculate the convolution integral
y(t) =

x( )h(t )d

(5)

October 10, 2009

DRAFT

for any input x(t). You may need to define x(t) as symbolic function and use that
as an input to M-file. Then use this M-file to obtain the output of the system to
x(t) = sin(3t)u(t).
b) Use int function in the Symbolic Toolbox to calculate the convolution integral for
x(t) = sin(3t)u(t).
c) Compare the results obtained above and comment on them.
C. Convolution Sum
In this section. you will learn how to obtain the output of a discrete-time LTI system.
a) Make yourself familiar with conv function.
b) Consider the finite-length signal
x[n] =

1,

0n5

(6)

0, otherwise.

Analytically determine y[n] = x[n] x[n].


c) Use conv to compute the non-zero samples of y[n] = x[n] x[n] and store these
samples in the vector y and plot y[n] using stem function. Make sure that the
horizontal axis of your plot corresponds to the correct indices of the non-zero samples
of y[n].
d) Consider the finite-length signal

h[n] =

n,

0 n 10

0, otherwise.

(7)

Analytically determine y[n] = h[n] x[n].


e) Use conv to compute the non-zero samples of y[n] = h[n] x[n] and store these
samples in the vector y and plot y[n] using stem function. Make sure that the
horizontal axis of your plot corresponds to the correct indices of the non-zero samples
of y[n].
IV. D ESIGN ACTIVITIES
1) Use Simulink to design and simulate a model file that represents the system in (2). Verify
your result by comparing impulse response of this system with what you obtained during
part 3.e of the pre-lab activities.
October 10, 2009

DRAFT

2) Consider a system with the following input-output relationship


d2 y
dy
dx(t)
+ 3 + 2y(t) = 3
+ x(t)
2
dt
dt
dt

(8)

Using integrators, differentiators, adders, subtractors and gain modules, design this system.
Record the step response of this system and compare that with the analytical solution and
comment on that.

October 10, 2009

DRAFT

You might also like