Sunteți pe pagina 1din 4

Generating a Step Response of a Given Transfer Function

Using the step Command and the Time-Domain


Function in MATLAB
John Carlo S. Tigue
Department of Electrical and Electronics Engineering
University of San Carlos
Nasipit,Talamban, Cebu City
tiguejohncarlo@gmail.com
abstractmathematicalnotionofadynamicalsystemusingan
Abstract This paper shows background and the use of
evolutionparameter.UsingMATLAB,onecangenerateastep
step Command that will generate a step response given a
transfer function. Also, with the use of the time-domain
response of a given transfer function by using step
function from a given systems transfer function which is
command,SISOTOOLandSIMULINKfunction.
G(s) =1/(s-2), the step response is also generated. The timedomain function is obtained using the inverse laplace
Stepcommand
transform and partial fraction. The detailed solution on
how to get the time-domain function from a given systems
The Step command calculates the step response of a
transfer function is presented in this report. The students
dynamicsystem.Forthestatespacecase,zeroinitialstateis
were able to learn the theories that govern about the timeassumed.Whenitisinvokedwithnooutputarguments,this
domain function.
functionplotsthestepresponseonthescreen.
I. INTRODUCTION
TransferFunction

InverseLaplaceTransform

TransferFunctionistheratiooftheoutputofasystemto
theinputofasystem,intheLaplacedomainconsideringits
initial conditions and equilibrium point to be zero. This
assumptionisrelaxedforsystemsobservingtransience.Ifwe
haveaninputfunctionofX(s),andanoutputfunctionY(s),
wedefinethetransferfunctionH(s)tobe[2]:

InmathematicstheLaplacetransformisanintegral
transformnamedafteritsdiscovererPierreSimonLaplace(/l
?pl??s/).Ittakesafunctionofapositiverealvariablet(often
time)toafunctionofacomplexvariables(frequency).
The Laplace transform is very similar to the Fourier
transform. While the Fourier transform of a function is a
complexfunctionofarealvariable(frequency),theLaplace
transformofafunctionisacomplexfunctionofacomplex
variable.Laplacetransformsareusuallyrestrictedtofunctions
oftwitht>0.Aconsequenceofthisrestrictionisthatthe
Laplacetransformofafunctionisaholomorphicfunctionof
the variable s. Unlike the Fourier transform, the Laplace
transform of a distribution is generally a wellbehaved
function.Alsotechniquesofcomplexvariablescanbeused
directly to study Laplace transforms. As a holomorphic
function, the Laplace transform has a power series
representation. This power series expresses a function as a
linear superposition of moments of the function. This
perspectivehasapplicationsinprobabilitytheory.

Thetransferfunctiondescribesthebehaviouroftheoutputas
afunctionoftheinputfrequency.Thisisusefulparticularlyin
a
linear timeinvariant system, where given some input X(s),
OnecanfindtheoutputY(s)directlybyusingtherelation
Y(s)=(Xs)H(s),whereH(s)isthetransferfunction.
StepResponse
The step response of a system in a given initial state
consistsofthetimeevolutionofitsoutputswhenitscontrol
inputsareHeavisidestepfunctions.Inelectronicengineering
andcontroltheory,stepresponseisthetimebehaviorofthe
outputsofageneralsystemwhenitsinputschangefromzero
tooneinaveryshorttime.Theconceptcanbeextendedtothe

TimeDomainFunction
In acontrol system,theremay besomeenergystoring
elementsattachedtoit.Energystoringelementsaregenerally
inductorsandcapacitorsincaseofelectricalsystem.Dueto
presenceoftheseenergystoringelements,iftheenergystate
ofthesystemisdisturbed,itwilltakecertaintimetochange

fromoneenergystatetoanother.Theexacttimetakenbythe
systemforchangingoneenergystatetoanother,isknownas
transienttimeandthevalueandpatternvoltagesandcurrents
duringthisperiodisknownastransientresponse.Atransient
responseisnormallyassociatedwithanoscillation,whichmay
besustainedordecayinginnature.Theexactnatureofthe
system depends upon the parameters of the system. Any
systemcanberepresentedwithalineardifferentialequation.
The solution of this linear differential equation gives the
responseofthesystem.Therepresentationofacontrolsystem
by linear differential equation of functions of time and its
solutioniscollectivelycalledtimedomainanalysisofcontrol
system.
II. METHODOLOGY
The instructor tasked the student to generate a step
responseofthegiventransferfunction G(s) = 1/(s-2) using
step Command and time-domain function from the given
systems transfer function.
B. GeneratingStepResponseUsingStepCommand
First, the numerator and denominator of the given
transferfunction, G(s) = 1/(s-2) were encoded in MATLAB
using, num = [1] and den = [0 1 -2] for the output and input of
the given transfer function respectively. After the numerator
(output) and denominator (input) were encoded, the transfer
function (Gs) was next to be encoded by using the function,
Gs = tf (num, den).
The given transform function
automatically appeared in the screen after inputting those
functions. The step(Gs) was then encoded to generate the
transfer function.
B. Generating Step Response Using Time-Domain
Function from the Given Systems Transfer Function
Thesolutionbelowwasusedinfindingthetime-domain
function from the given systems transfer function given as
G(s) = 1/(s-2).

G ( s )=

C ( s)
1
; R ( s )= (Unitstep).(Assuming

s
R( s)

L1 [ C ( s ) ]=L1 [ R ( s ) G ( s ) ]=C (t )=L1


Where

aunitstep.
Thus,thefinalequationusedingettingthetimeresponseofa
giventransferfunctionis,
1
C ( t )=L

G(s) Equation1

[ ]

Todeterminethetimedomainfunctionofthestep
responseforasystemstransferfunctiongivenas,

G ( s )=

1
( s2) ,thefinalequationwasusedasshownin

equation1.
The given transfer function

substitutedtotheequation

G ( s )=

1
( s2) was

C ( t )=L1

[ ]

G(s)
. Thus,
s Equation2

weobtainedtheequationof:

1
1
C ( t )= L
s(s2)

Using the partial fraction theorem for Laplace transform, we


cCan get,

{(

1
A
B
= +
s (s2)
s
s2
s s2 )

Equation3

Solving the following as shown in equation 3, we can get:

1= A ( s2 )+ B(s)

When s = 0; 1 = A (0 2); A =

G( s)
C ( s )=R ( s ) G ( s )=C ( s ) =

G(s)
s

C ( t ) =timeresponseofgiventransferfunctionfor

zeroinitialcondition.)
Fromtheequationabove,wecanget:

[ ]

1
2

s = 2; 1 = A (2 2) + 2B; B =

1
2

Substituting the values of A and B in, we can obtain:


UsingtheinverseLaplacetransform,wecanobtainthe
followingequation:

Equation4

1
1
1
2
2
=
+
s s2
s ( s2 )

Figure1representstheGeneratedStepResponseofthe
Transform Function

G ( s )=

1
( s2) of using step

Command.Itcanbeseenfromthestepresponseabovethat
around28seconds,thestepresponseincreasesitsamplitude
Finding the Laplace transform of equation 4, we can obtain:

L1

[ ]

[ ]

1
1
Equation5
2
1 ; 1 2
1
=
L
= e2 t
s
2
s2 2

untilitreachesataround

6 x 105 .

B.Generatingastepresponseusingtimedomainfunction

Thus, the final time-domain function is shown in equation 6


that is used in obtaining the step response using matlab.

C ( t )=

1 1 2 t
+ e
2 2

Equation6
Figure2GeneratedStepResponseUsingTimeDomainFunction

After the time-domain function is obtained, the student


use the matlab to input the obtained equation. The desired
response time were encoded using, t = [0:1/1000:30]. After
encoding the response time, the time response of given
transferfunctionforaunitstepisfollowedusing,c=0.5+
0.5*exp(2*t).Thetimeresponseversustimedomainfunction
isplottedusing,plot(t,c).
Theobservationsafterseeingthegeneratedstepresponsewere
noted.
III. RESULTS AND DISCUSSION

Figure 2 shows the Generated Step Response Using Time


Domain Function from a given systems transfer function
which is

G ( s )=

1
( s2) .Itcanbeseenfromthestep

response above that around 28 seconds, the step response


increasesitsamplitudeuntilitreachesataround

2. 6 x 105

.
CONCLUSION

The following are the generated step response using the


step command and the time-domain function from a given
systems transfer function which is

A.

G ( s )=

1
(s2) .

Generatingastepresponseusingstepcommand

Therefore, there are many ways to obtain the step response


of the given transfer function, by using the step command
and obtaining its time-domain function by using the inverse
Laplace transform.
The step response of a system in a given initial state
consists of the time evolution of its outputs when its control
inputs are Heaviside step functions. In electronic engineering
and control theory, step response is the time behavior of the
outputs of a general system when its inputs change from zero
to one in a very short time. The concept can be extended to the
abstract mathematical notion of a dynamical system using an
evolution parameter.

Figure1GeneratedStepResponseUsingstepCommand

ACKNOWLEDGMENT

The authors would like to thank God for helping them


in enlightening their minds in making this project. They would
also like to thank their classmates for guiding them and giving
them advices in how to make this project. Thank you also to
their parents for supporting them and helping in making this
project successful. Without them, this project would not be
successful.

REFERENCES
[1]
[2]

Gilat, Amos (2004). MATLAB: An Introduction with Applications 2nd


Edition. John Wiley & Sons. ISBN 978-0-471-69420-5.
Barnett, R.A.; Ziegler, M.R.; Byleen, K.E. (2008), College Mathematics
for Business, Economics, Life Sciences and the Social Sciences (11th
ed.), Upper Saddle River, N.J.: Pearson, ISBN 0-13-157225-3

S-ar putea să vă placă și