Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
73 views

Control Systems-Lab Manual 06

This experiment involves modeling and analyzing linear time-invariant (LTI) systems using MATLAB. Students will learn how to represent LTI systems using transfer functions, zero-pole-gain models, and state-space models. They will analyze systems by plotting pole-zero maps and simulating responses to inputs like impulses, steps, and arbitrary signals. Students will create LTI models, plot pole-zero maps, and simulate responses to different inputs to understand and analyze LTI systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Control Systems-Lab Manual 06

This experiment involves modeling and analyzing linear time-invariant (LTI) systems using MATLAB. Students will learn how to represent LTI systems using transfer functions, zero-pole-gain models, and state-space models. They will analyze systems by plotting pole-zero maps and simulating responses to inputs like impulses, steps, and arbitrary signals. Students will create LTI models, plot pole-zero maps, and simulate responses to different inputs to understand and analyze LTI systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab Experiment # 6: Representation and Response of different LTI Systems

Objectives: This experiment has following two objectives:


vi.Continued with the learning of Mathematical Modeling from previous experiment, we now
start focusing the linear systems. We will learn commands in MATLAB that would be used to
represent such systems in terms of transfer function or pole-zero-gain representations.

vii.
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.
Examples of Creating LTI Models
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.
Example of Creating Transfer Function Models
You can create transfer function (TF) models by specifying numerator and
denominator coefficients. For example,
>>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 using s as the polynomial variable.
>>s=tf('s');
>>sys= s/(s^2 + 2*s +
1) Transfer function:
s
------------s^2 + 2 s +
This is identical to the previous transfer function.

19

EE 400 Control Systems

Example of Creating Zero-Pole-Gain Models


To create zero-pole-gain (ZPK) models, you must specify each of the three components in
vector format. For example,
>>sys = zpk([0],[-1 -1],[1])
Zero/pole/gain:
s
------(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.
>>sys=zpk([1 0], [-1 -3 -.28],[.776])
Zero/pole/gain:
0.776 s (s-1)
-------------------(s+1) (s+3) (s+0.28)
Plotting poles and zeros of a system:
pzmap
Compute pole-zero map of LTI models
pzmap(sys)
pzmap(sys1,sys2,...,sysN)
[p,z] = pzmap(sys)
Description:
pzmap(sys) plots the pole-zero map of the continuous- or discrete-time LTI model sys. For
SISO systems, pzmap plots the transfer function poles and zeros. The poles are plotted as x's
and the zeros are plotted as o's. pzmap(sys1,sys2,...,sysN) plots the pole-zero map of several
LTI models on a single figure. The LTI models can have different numbers of inputs and
outputs. When invoked with left-hand arguments,
[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.

20

EE 400 Control Systems

Example Plot the poles and zeros of the continuous-time system

>>H = tf([2 5 1],[1 2 3]);


sgrid >>pzmap(H)
Simulation of Linear systems to different
Inputs :- impulse, step and lsim
You can simulate the LTI systems to inputs like impulse, step and other standard inputs and
see the plot of the response in the figure window. MATLAB command impulse calculates
the unit impulse response of the system, step calculates the unit step response of the system
and lsim simulates the (time) response of continuous or discrete linear systems to arbitrary
inputs. When invoked without left-hand arguments, all three commands plots the response
on the screen. For example:
To obtain an impulse response
>> H = tf([2 5 1],[1 2 3]);
>>impulse(H)
To obtain a step response
type >>step(H)
Time-interval specification:
To contain the response of the system you can also specify the time interval to simulate
the system to.
For example,
2. t = 0:0.01:10;
3. impulse(H,t)
Or
4. step(H,t)

LAB TASKS
Simulation to Arbitrary Inputs:
To simulates the (time) response of continuous or discrete linear systems to arbitrary inputs
use 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. Simulate and plot the response of the system

21

EE 400 Control Systems

to a square wave with period of four seconds. First generate the square wave with gensig.
Sample every 0.1 second during 10 seconds, then simulate with lsim.

LAB TASK

4
using zpk command.
Exercise 4: Determine
the transfer function using zpk command.

22

EE 400 Control Systems

You might also like