Professional Documents
Culture Documents
Remarks: ……………………………………………
Experiment # 02
Developing Transfer Function, Block Diagram Reduction & Pole
Zeros Map of Transfer Functions
Objectives:
1. We will learn commands in MATLAB that would be used to represent such systems in
terms of transfer function or pole-zero gain representations and also find laplace
transform using MATLAB.
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.
Create the transfer function G(s) = s/(s2 + 2s + 1), using: >> G = tf([1 0],[1 2 1])
>> pole(G)
>> zero(G)
>> [num,den]=zp2tf(z,p,k)
Figure-2: Pzmap
K: Dc gain of system which is the relation between the input signal and the steady state
value of output.
T: It characterize the speed of response of system to an input. Higher the time constant
slower is the response and vice versa.
In order to represent the response of the system in time domain we need to compute the
inverse Laplace transform of the above equation, we have
MATLAB Code
The impulse response of system with K=1 and T=1, T=2 is shown in fig 5.
>> a=1/(s+1)
>> b=1/(2*s+1)
>> impulse(a,b)
>> legend('T=1','T=2')
Observation
As you can see in the impulse response that increasing the value of time constant T slower
the response and vice versa.
In order to represent the response of the system in time domain we need to compute the
inverse Laplace transform of the above equation, we have
MATLAB Code
The step response of system with K=1 and T=1, T=2 is shown in fig 6.
>> a=1/(s+1);
>> b=1/(2*s+1);
>> step(a,b)
>> legend('T=1','T=2')
Observation
Initially the output c(t) is zero and finally it becomes unity. One important characteristic
of such an exponential response curve c(t) is that at t=T the value of c(t) is 0.632, or the
response c(t) has reached 63.2% of its total change. It will reached to almost reached to 1
at t=5T. As seen from Equation, the steady state is reached mathematically only after an
infinite time.
There is no ramp command in MATLAB. Therefore, we need to use the step command or
the lsim command (presented later) to obtain the ramp response. Specifically, to obtain
the ramp response of the transfer-function system G(s), divide G(s) by s and use the step-
response command.
MATLAB Code
>> t=0:0.1:10;
>> a=1/(s*(s+1));
>> b=1/(s*(2*s+1));
>> c=step(a,t); , d=step(b,t);
>> plot(t,t,t,c,t,d)
>> legend('input','T=1','T=2'), grid
>>title('Ramp Response')
>>xlabel('t Sec'), ylabel('Input and Output')
Observation
The error signal e(t) is given by,
As t approaches infinity, e–t/T approaches zero, and thus the error signal e(t) approaches T
or
The error in following the unit-ramp input is equal to T for sufficiently large t. The smaller
the time constant T, the smaller the steady-state error in following the ramp input.
MATLAB Code
t=0:0.1:10;
t1=(t.^2)/2;
a=1/(s^2*(s+1));
b=1/(s^2*(2*s+1));
c=step(a,t);
d=step(b,t);
plot(t,t1,t,c,t,d)
Conclusion
From these responses, we can conclude that the first order control systems are not stable
with the ramp and parabolic inputs because these responses go on increasing even at
infinite amount of time. The first order control systems are stable with impulse and step
inputs because these responses have bounded output. But, the impulse response doesn’t
have steady state term. So, the step signal is widely used in the time domain for analyzing
the control systems from their responses.
Specify transfer functions or convert LTI models to transfer function form ,we use the
command of (tf ). To create TFS we specify, Sys=tf (num,den) .i.e numerator and
denominator.
>>sys = feedback(sys1,sys2,+1)
Figure-10
Figure-11
Exercise
Q.1 Create single-input, single-output (SISO) transfer functions in factored form using zpk
and transfer function method.
Q.2 Find Step response of transfer function using MATLAB and Simulink, both for open
loop and closed loop.
C(s) = 2s+1
R(s) s2+s+1
Q.3 Find ramp and parabolic response of transfer function using MATLAB and Simulink,
both for open loop and closed loop.
C(s) = s+1
R(s) 3s2+3s+1
Labs Rubrics
Control System
Lab # 2
LTI Systems, Laplace Transform & Pole Zeros Map of
Transfer Function
Name of Student: ……………………………………………… Roll No: ………………
ER4 System model/ None of the Incomplete diagrams and Diagrams without Correct Diagrams,
Mathematical model/ requirements are partially correct labels and few properly labeled
Network model/ Block fulfilled/ labels/Circuit doesn’t details. showing all the
diagram/ Circuit Demonstrates incorporate required Construction is necessary details and
Diagram/ Simulation minimal or no components/ Blocks not fairly good / Input/Outputs/
Diagram understanding of connected correctly/ Chooses a Chooses an optimal
the connection Chooses a mathematical mathematical mathematical model
between model that applies to an model that applies that applies to an
mathematical engineering problem, but to an engineering engineering problem,
models and requires assistance in problem, and has and develops new
engineering model development. some success in models.
problems/ model
minimal effort development.
shown
ER9 Results and Plots Unable to Inaccurate plots and Correct plots Good presentation of
produce any plots results without any the correct plots with
or results necessary proper labels,
/minimal efforts identifying features captions & visibility
shown such as labels,
captions & visibility
Format/Layout & Follows poorly the Follows, for some part, all Follows, for most Closely follows all the
RR1 Organization requirement the requirements related part, all the requirements related
related to format to format and layout. The requirements to format and layout.
and layout. The organization is unclear related to format Written work is well
report is and layout. The organized and easy to
disorganized to organization is understand
the extent that it generally good, but
prevents some parts seem
understanding of out of place
he content
RR2 Content/Information The report is not The report is objective The report is The report is objective
objective based based and for some part objective based and based and addresses
and addresses the addresses the issues for most part the issues referred in
issues referred in referred in the proposed addresses the issues the proposed topic
the proposed topic with an acceptable referred in the with in depth analysis
topic poorly. The engineering/theoretical proposed topic with and reasoning. The
provided analysis. The provided an acceptable provided information
information & information & results for engineering/theore & results is necessary,
results is not some parts is necessary tical analysis and relevant and sufficient
coherent rather and sufficient to discuss reasoning. The to discuss these
irrelevant. Little these issues provided issues. The details are
engineering/theor information & easily understood at
etical analysis is results for most part peer level.
presented is necessary and
sufficient to discuss
these issues