LTI
LTI
LTI
Representation
Objectives: This experiment has following two objectives:
1. We will learn commands in MATLAB that would be used to represent linear systems
in terms of transfer function or pole-zero-gain representations.
2. We will also learn how to make preliminary analysis of such systems using plots of
poles and zeros locations as well as time response due to impulse, step and arbitrary
inputs.
List of Equipment/Software
Following equipment/software is required:
Category Soft-Experiment
Deliverables
ing outcomes.
The differential equation for the above Mass-Spring system can be derived as follows
Transfer Function:
Applying the Laplace transformation while assuming the initial conditions are zeros, we
get
Then the transfer function representation of the system is given by
Control System Toolbox in MATLAB offers extensive tools to manipulate and analyze
linear time-invariant (LTI) models. It supports both continuous- and discrete-time
systems. Systems can be single-input/single-output (SISO) or multiple-input/multiple-
output (MIMO). You can specify LTI models as:
Transfer functions (TF), for example,
Building LTI models with Control System Toolbox is straightforward. The following
sections show simple examples. Note that all LTI models, i.e. TF, ZPK and SS are also
MATLAB objects.
>>num = [1 0];
>>den = [1 2 1];
>>sys = tf(num,den)
Transfer function:
s
s^2 + 2 s + 1
A useful trick is to create the Laplace variable, s. That way, you can specify polynomials
>>s=tf('s');
>>sys= s/(s^2 + 2*s + 1) \
Transfer function:
s
s^2 + 2 s + 1
(s+1)^2
produces the same transfer function built in the TF example, but the representation is now
ZPK. This example shows a more complicated ZPK model.
Zero/pole/gain:
0.776 s (s-1)
[p,z] = pzmap(sys) returns the system poles and zeros in the column vectors p and z. No
plot is drawn on the screen. You can use the functions sgrid or zgrid to plot lines of
constant damping ratio and natural frequency in the s- or z- plane.
Example
Plot the poles and zeros of the continuous-time system.
>>H = tf([2 5 1],[1 2 3]); sgrid
>>pzmap(H) \
Time-interval specification:
‘lsim’. When invoked without left-hand arguments, ‘lsim’ plots the response on the
screen.
lsim(sys,u,t) produces a plot of the time response of the LTI model sys to the input time
history ‘t’,’u’. The vector ‘t’ specifies the time samples for the simulation and consists of
regularly spaced time samples.
First generate the square wave with gensig. Sample every 0.1 second during 10 seconds:
>>[u,t] = gensig(‘square’,4,10,0.1);
Transfer function:
2 s^2 + 5 s + 1
s^2 + 2 s + 3
>> lsim(H,u,t)
Figure 2 : pole zero map of the system G
Figure 3 : the impulse response of the system
Figure 4 : the step response of the system 2
The similarity between the results in parts a and b is due to the fact that the
step response offers input of 1/s while the impulse response gives input of 1,
and the output will be whatever according to the two transfer functions in
each case.
Dd
Conclusion:
This experiment was a great and excellent proof of how to represent some
important features and concepts in control systems using Matlab and
programming involvement. First, we plotted the zeros and poles of a certain
transfer function using the pzmap order, then we were able to obtain the step
and impulse responses using direct orders, which are step and impulse orders,
and finally we observed and clarified the effect of change,finally, we learned
how the differential equation can be represented by a transfer function in
order to obtain a figure of step response, noting that the transfer function
must be properly written by Matlab codes in order to obtain the correct
results. Finally, it is necessary to state that it was a beneficial experiment full
of new and important knowledge.