Professional Documents
Culture Documents
Transformation:TransferFunctionStateSpace
Transformation:TransferFunctionStateSpace
Alltransformation Printable
Contents
StateSpacetoTransferFunction
TransferFunctiontoStateSpace
ControllableCanonicalForm
ObservableCanonicalForm
Otherforms
Twoofthemostpowerful(andcommon)waystorepresentsystemsarethetransferfunctionformandthestate
spaceform.Thispagedescribeshowtotransformatransferfunctiontoastatespacerepresentation,andvice
versa.Convertingfromstatespaceformtoatransferfunctionisstraightforwardbecausethetransferfunctionform
isunique.Convertingfromtransferfunctiontostatespaceismoreinvolved,largelybecausetherearemanystate
spaceformstodescribeasystem.
StateSpacetoTransferFunction
Considerthestatespacesystem:
Now,taketheLaplaceTransform(withzeroinitialconditionssincewearefindingatransferfunction):
WewanttosolvefortheratioofY(s)toU(s),soweneedsoremoveQ(s)fromtheoutputequation.Westartby
solvingthestateequationforQ(s)
Thematrix(s)iscalledthestatetransitionmatrix.Nowweputthisintotheoutputequation
Nowwecansolveforthetransferfunction:
Notethatalthoughtherearemanystatespacerepresentationsofagivensystem,allofthoserepresentationswillresultinthesametransfer
function(i.e.,thetransferfunctionofasystemisuniquethestatespacerepresentationisnot).
Example:StateSpacetoTransferFunction
Findthetransferfunctionofthesystemwithstatespacerepresentation
Firstfind(sIA)andthe=(sIA)1(note:thiscalculationisnotobvious.Detailsarehere).Rulesfor
invertinga3x3matrixarehere.
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
1/9
8/26/2016
Transformation:TransferFunctionStateSpace
Nowwecanfindthetransferfunction
Tomakethistaskeasier,MatLabhasacommand(ss2tf)forconvertingfromstatespacetotransfer
function.
>>%Firstdefinestatespacesystem
>>A=[010001342]
>>B=[001]
>>C=[510]
>>[n,d]=ss2tf(A,B,C,D)
n=
001.00005.0000
d=
1.00002.00004.00003.0000
>>mySys_tf=tf(n,d)
Transferfunction:
s+5
s^3+2s^2+4s+3
Example:StateSpacetoTransferFunction(Symbolic)
Findthetransferfunctionofthesystemwithstatespacerepresentation
Firstfind(sIA)andthe=(sIA)1(note:thiscalculationisnotobvious.Detailsarehere).
Nowwecanfindthetransferfunction
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
2/9
8/26/2016
Transformation:TransferFunctionStateSpace
KeyConcept:TransformingfromStateSpacetoTransferFunction
Givenastatespacerepresentationofasystem
thetransferfunctionisgiveby
andthecharacteristicequation(i.e.,thedenominatorofthetransferfunction)is
TransferFunctiontoStateSpace
Recallthatstatespacemodelsofsystemsarenotuniqueasystemhasmanystatespacerepresentations.
Thereforewewilldevelopafewmethodsforcreatingstatespacemodelsofsystems.
Beforewelookatproceduresforconvertingfromatransferfunctiontoastatespacemodelofasystem,let'sfirst
examinegoingfromadifferentialequationtostatespace.We'lldothisfirstwithasimplesystem,thenmovetoa
morecomplexsystemthatwilldemonstratetheusefulnessofastandardtechnique.
Firstwestartwithanexampledemonstratingasimplewayofconvertingfromasingledifferentialequationto
statespace,followedbyaconversionfromtransferfunctiontostatespace.
Example:DifferentialEquationtoStateSpace(simple)
Considerthedifferentialequationwithnoderivativesontherighthandside.We'lluseathirdorder
equation,thoughtitgeneralizeston thorderintheobviousway.
Forsuchsystems(noderivativesoftheinput)wecanchooseasournstatevariablesthevariableyand
itsfirstn1derivatives(inthiscasethefirsttwoderivatives)
Takingthederivativeswecandevelopourstatespacemodel
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
3/9
8/26/2016
Transformation:TransferFunctionStateSpace
Note:Forannthordersystemthematricesgeneralizeintheobviousway(Ahasonesabovethemaindiagonalandthedifferential
equationconstantsforthelastrow,Bisallzeroswithb0 inthebottomrow,Ciszeroexceptfortheleftmostelementwhichisone,and
Diszero)
RepeatStartingfromTransferFunction
Considerthetransferfunctionwithaconstantnumerator(note:thisisthesamesystemasinthe
precedingexample).We'lluseathirdorderequation,thoughtitgeneralizeston thorderintheobvious
way.
Forsuchsystems(noderivativesoftheinput)wecanchooseasournstatevariablesthevariableyand
itsfirstn1derivatives(inthiscasethefirsttwoderivatives)
Takingthederivativeswecandevelopourstatespacemodel(whichisexactlythesameaswhenwe
startedfromthedifferentialequation)
Note:Forannthordersystemthematricesgeneralizeintheobviousway(Ahasonesabovethemaindiagonalandthecoefficientsof
thedenominatorpolynomialforthelastrow,Bisallzeroswithb0 (thenumeratorcoefficient)inthebottomrow,Ciszeroexceptforthe
leftmostelementwhichisone,andDiszero)
Ifwetrythismethodonaslightlymorecomplicatedsystem,wefindthatitinitiallyfails(thoughwecansucceed
withalittlecleverness).
Example:DifferentialEquationtoStateSpace(harder)
Considerthedifferentialequationwithasinglederivativeontherighthandside.
Wecantrythesamemethodasbefore:
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
4/9
8/26/2016
Transformation:TransferFunctionStateSpace
Themethodhasfailedbecausethereisaderivativeoftheinputontherighthand,andthatisnot
allowedinastatespacemodel.
Fortunatelywecansolveourproblembyrevisingourchoiceofstatevariables.
Nowwhenwetakethederivativesweget:
Thesecondandthirdequationsarenotcorrect,because isnotoneofthestatevariables.However
wecanmakeuseofthefact:
Thesecondstatevariableequationthenbecomes
Inthethirdstatevariableequationwehavesuccessfullyremovedthederivativeoftheinputfromtheright
sideofthethirdequation,andwecangetridofthetermusingthesamesubstitutionweusedforthe
secondstatevariable.
Theprocessdescribedinthepreviousexamplecanbegeneralizedtosystemswithhigherorderinputderivatives
butunfortunatelygetsincreasinglydifficultastheorderofthederivativeincreases.Whentheorderofderivativesis
equalonbothsides,theprocessbecomesmuchmoredifficult(andthevariable"D"isnolongerequaltozero).
Clearlymorestraightforwardtechniquesarenecessary.Twoareoutlinedbelow,onegeneratesastatespace
methodknownasthe"controllablecanonicalform"andtheothergeneratesthe"observablecanonicalform(the
meaningofthesetermsderivesfromControlTheorybutarenotimportanttous).
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
5/9
8/26/2016
Transformation:TransferFunctionStateSpace
ControllableCanonicalForm(CCF)
Probablythemoststraightforwardmethodforconvertingfromthetransferfunctionofasystemtoastatespace
modelistogenerateamodelin"controllablecanonicalform."ThistermcomesfromControlTheorybutitsexact
meaningisnotimportanttous.Toseehowthismethodofgeneratingastatespacemodelworks,considerthethird
orderdifferentialtransferfunction:
WestartbymultiplyingbyZ(s)/Z(s)andthensolvingforY(s)andU(s)intermsofZ(s).Wealsoconvertbacktoa
differentialequation.
Wecannowchoosezanditsfirsttwoderivativesasourstatevariables
Nowwejustneedtoformtheoutput
Fromtheseresultswecaneasilyformthestatespacemodel:
Inthiscase,theorderofthenumeratorofthetransferfunctionwaslessthanthatofthedenominator.Iftheyare
equal,theprocessissomewhatmorecomplex.Aresultthatworksinallcasesisgivenbelowthedetailsarehere.
Forageneralnthordertransferfunction:
thecontrollablecanonicalstatespacemodelformis
KeyConcept:TransferfunctiontoStateSpace(CCF)
Forageneraln thordertransferfunction:
thecontrollablecanonicalstatespacemodelformis
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
6/9
8/26/2016
Transformation:TransferFunctionStateSpace
ObservableCanonicalForm(OCF)
Anothercommonlyusedstatevariableformisthe"observablecanonicalform."ThistermcomesfromControl
Theorybutitsexactmeaningisnotimportanttous.Tounderstandhowthismethodworksconsiderathirdorder
systemwithtransferfunction:
Wecanconvertthistoadifferentialequationandsolveforthehighestorderderivativeofy:
Nowweintegratetwice(thereasonforthiswillbeapparentsoon),andcollecttermsaccordingtoorderofthe
integral:
Choosetheoutputasourfirststatevariable
Lookingattherighthandsideofthedifferentialequationwenotethaty=q1andwecallthetwointegraltermsq2:
so
Thisisourfirststatevariableequation.
Nowlet'sexamineq2anditsderivative:
Againwenotethaty=q1andwecalltheintegraltermsq3:
so
Thisisoursecondstatevariableequation.
Nowlet'sexamineq3anditsderivative:
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
7/9
8/26/2016
Transformation:TransferFunctionStateSpace
Thisisourthird,andlast,statevariableequation.
Ourstatespacemodelnowbecomes:
Inthiscase,theorderofthenumeratorofthetransferfunctionwaslessthanthatofthedenominator.Iftheyare
equal,theprocessissomewhatmorecomplex.Aresultthatworksinallcasesisgivenbelowthedetailsarehere.
Forageneralnthordertransferfunction:
theobservablecanonicalstatespacemodelformis
KeyConcept:TransferfunctiontoStateSpace(OCF)
Forageneraln thordertransferfunction:
theobservablecanonicalstatespacemodelformis
Otherforms
Therearemanyotherformsthatarepossible.ForexampleMATLABusesavariantofthecontrollability
canonicalforminits"ss2tf"function.
References
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
8/9
8/26/2016
Transformation:TransferFunctionStateSpace
Copyright2005to2015ErikCheeverThispagemaybefreelyusedforeducationalpurposes.
Comments?Questions?Suggestions?Corrections?
ErikCheeverDepartmentofEngineeringSwarthmoreCollege
http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
9/9