Linear Control System Lab: Familiarization With Transfer Function and Time Response
Linear Control System Lab: Familiarization With Transfer Function and Time Response
Objectives
List of equipment/Software
1) MATLAB
2) Computer
Transfer Function
Page | 1
Linear Control System Lab Lab 3
>>num = [1 0];
>>den = [1 2 1];
>>sys = tf(num,den)
Transfer function:
Zero/pole/gain:
Zero/pole/gain:
Description:
pzmap(sys) plots the pole-zero map of the
continuous- or discrete-time LTI system. For SISO systems, pzmap plots the transfer function
Page | 2
Linear Control System Lab Lab 3
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 3.3.
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.
Example:
Plot the poles and zeros of the continuous-time system.
2 s2 +5 s+1
H ( s )= 2 (3)
s +2 s+3
n=[2 5 1];
d=[1 2 3];
s=tf(n,d)
2 s^2 + 5 s + 1
y1: ---------------
s^2 + 2 s + 3
pzmap (s)
Page | 3
Linear Control System Lab Lab 3
To obtain a step response type
>>step(H) Figure 3.3: Impulse Response
Time-interval specification:
To contain the response of the system you can also specify the time interval, as shown in figure
3.5,
For example,
>>t=0:0.01:10;
>>impulse(H,t)
Or
>>step(H,t)
T = 0:dt:Tfinal
The matrix u must have as many rows as time samples (length(t)) and as many columns as
system inputs. Each row u(I,:) specifies the input value(s) at the time sample t(i).
Simulate and plot the response of the system in equation (2) to a square wave with period of four
seconds.
Page | 4
Linear Control System Lab Lab 3
>>[u,t] = gensig(‘square’,4,10,0.1);
Transfer function:
2 s2 +5 s+1
s 2+2 s+3
>> lsim(H,u,t)
Exercise 01
Using MATLAB plot the pole zero map of the above system.
Exercise 02
B( s) 1
= 2
A (s) s +0.2 s+1
Obtain the unit step response for the following system
B( s) s
=
A (s) s2 +0.2 s+1
Exercise 03
Plot the response of the system when R(s) is a unit impulse and unit step for the
parameter z=3, 6 and 13.
Page | 5
Linear Control System Lab Lab 3
Exercise 04
Consider the differential equation ÿ + 4 ẏ +4 y =u where y(0)= ẏ ( 0 )=0 and u(t) is a unit step.
Determine the solution analytically and verify by co-plotting the analytical solution and the step
response obtained with ‘step’ function.
Task1:
n=[6 0 1];
d=[1 3 3 7];
s=tf(n,d)
6 s^2 + 1
y1: ---------------------
s^3 + 3 s^2 + 3 s + 7
Page | 6
Linear Control System Lab Lab 3
Continuous-time model.
pzmap (s)
TASK2.1:
n=[0 0 1];
d=[1 .2 1];
s=tf(n,d)
1
y1: ---------------
s^2 + 0.2 s + 1
Continuous-time model.
figure (1)
Page | 7
Linear Control System Lab Lab 3
impulse (s)
TASK 2.2:
n=[0 1 0];
d=[1 .2 1];
s=tf(n,d)
s
y1: ---------------
s^2 + 0.2 s + 1
Continuous-time model.
figure (2)
Page | 8
Linear Control System Lab Lab 3
TASK 3:
When z=3,
n=[5 15];
d=[1 3 15];
s=tf(n,d)
5 s + 15
y1: --------------
s^2 + 3 s + 15
Continuous-time model.
subplot (321)
step (s)
Page | 9
Linear Control System Lab Lab 3
subplot (322)
impulse (s)
When z=6,
n=[2.5 15];
d=[1 3 15];
s=tf(n,d)
2.5 s + 15
y1: --------------
s^2 + 3 s + 15
Continuous-time model.
subplot(323)
step (s)
subplot (324)
impulse (s)
Page | 10
Linear Control System Lab Lab 3
When Z=13,
n=[1.154 15];
d=[1 3 15];
s=tf(n,d)
1.154 s + 15
y1: --------------
s^2 + 3 s + 15
Continuous-time model.
s=tf(n,d)
1.154 s + 15
y1: --------------
s^2 + 3 s + 15
Page | 11
Linear Control System Lab Lab 3
Continuous-time model.
subplot(325)
step (s)
subplot (326)
impulse (s)
TASK 4:
n=[1];
d=[1 4 4];
s=tf(n,d)
1
y1: -------------
s^2 + 4 s + 4
Page | 12
Linear Control System Lab Lab 3
Continuous-time model.
step (s)
Laboratory Rubrics
Sr. Performance Exemplary Satisfactory Developing Unsatisfactory (0 Marks)
# Indicator (5 Marks) (4-3 Marks) (2-1 Marks)
Individual and Respectful to one another Collaborative effort Need training and Unsupportive attitude
teamwork while providing timely of a group with support to work with no interest towards
1 and helpful feedback and delayed feedback to effectively in a team individual or common
(PLO-09, allow healthy conflict. achieve a common and individually. goal.
Affective goal in a less efficient
Domain) way.
Scale
Page | 13
Linear Control System Lab Lab 3
Data Analyse and interprets Analyse and Analyse and Analyse and interprets
exploration and data correctly and interprets data interprets data incorrect data with wrong
2 analysis precisely, draws correct correctly most of the correctly conclusions.
and useful conclusions time with correct and occasionally with
(PLO-04, by keenly observing useful conclusion. some incorrect
Cognitive theoretical and conclusion.
Domain) experimental results.
Scale
Skill to Quite able to conduct the Able to conduct Able to conduct Unable to conduct
perform test entire experiment with experiment with experiment with a experiment on his own
3 experiment negligible help from the some help from the lot of help from the and lab instructor
(PLO-04, lab instructor. lab instructor. lab instructor. provides help in almost
Psychomotor every step of the
Domain) experiment.
Scale
Table 1: Lab Performance
Page | 14