You are on page 1of 9

RootLocusControllerDesignUsingtheMatlabsisotoolToolbox

Overview
In this lab you will explore the use of the root locus controller design methodology. The root locus
indicates the achievable closedloop pole locations of a system as a parameter (usually the controller
gain)variesfromzerotoinfinity.Foragivenplantitmayormaynotbepossibletoimplementasimple
proportionalcontroller(i.e.,selectagainthatspecifiesclosedlooppolelocationsalongtherootlocus)
toachievethespecifiedperformanceconstraints.Infact,inmostcasesitwillnotbepossible.Whenthis
occurs,itisthecontrolengineersjobtoselectacontrollerstructure(againandnumbersofpolesand
zerosofacontrollertransferfunction)andtherespectivecontrollerparameters(valuesforthegainand
polesandzeros)tochangetheshapeoftherootlocussothatforsomevaluesofthecontrollergain,the
dominant second order closedloop poles lie within the performance region. In this lab we are
investigating several controller structures on individual plants and comparing the design process and
performance.WewillbeusingtheMatlabsisotooltoolboxtocompletetherootlocusdesigns.

Objectives
Attheconclusionofthislaboratoryexperience,studentsshouldbeableto:

TosuccessfullydesignP,I,PD,PI,andPIDcontrollerstomeetclosedloopperformance
specificationsincludingtransientperformanceandsteadyerror.

Deliverables
Acompletedworksheetincludingthefollowing:

Figureswithplotsofclosedloopstepresponses.
Controllerparameters,gain,pole(s),andzero(s),foreachofthecontrollerdesigns.
Answerallthequestionsontheworksheet.

Background
Forthislab,wewillassumeaunityfeedbackcontrolleroftheformshowninFigure1,where
controllertransferfunctionand
istheplanttransferfunction.

Plant
Controller

isthe

Figure1GenericUnityFeedbackControlSystem.

Page1of9

Note,incontrollerdesigntherearemultiplepossiblesolutions,somebetterthanothers.Itispossibleto
have multiple designs that satisfy the given performance constraints, but practical implementation
issuesandcostcouldbeprohibitiveforsomedesigns.Asageneralrule,itisagoodideatokeepyour
controllerassimpleaspossiblewhilemeetingtheprescribedperformancecriteria.Inthislabwewillbe
investigating several controller structures on individual plants and comparing the design process and
performance.ThecommoncontrollerstructureswewillbeusinginthislabarelistedinTable1along
withtheirrespectivetransferfunctions.
Table1CommonControllerTypes
ControllerType

ControllerStructure

Proportional(P)

Integral(I)

Proportional+Integral(PI)

LagController

where | |

Proportional+Derivative(PD)

LeadController

| |

where | |

Proportional+Integral+Derivative(PID)
(RealZeros)

Proportional+Integral+Derivative(PID)
(ComplexConjugateZeros)

| |

NotethattheI,PI,andPIDcontrollerswillproduceapositionerror( )ofzeroaslongastheplantdoes
notcontainazeroattheorigin,whichwouldcancelthecontrollerspoleattheorigin.

Page2of9

IntroductiontoMatlabsisotool
A. GettingStarted
1. Enterthetransferfunctionfortheplant,
commandprompt).

,inyourworkspace(i.e.,fromtheMatlab

2. Typesisotoolatthecommandprompt.
3. ClickClosewhenthehelpwindowcomesup.
4. ClickonViewOpenLoopBodetoturnoffthebodeplot.(Whateverischeckedinthislistwill
bedisplayedinthewindow.)
B. LoadingtheTransferFunction
1. ClickonFileImport.
2. Awindowontheleftwillshowyouthetransferfunctionsinyourworkspace,whilethewindow
ontherightwillletyouchoosethecontrolsystemconfiguration.
3. Wewillusuallybeassigning
toblockG(theplant).DoubleclickthespacenexttoGand
typeyourtransferfunctionnameandhitEnter.Youmusthitenterornothingwillhappen.
4. Onceyouhitenter,youshouldbeabletoclicktheOKbuttonatthebottomofthewindow.
Thenthewindowwillclose.
5. Afteryouenterthetransferfunction,therootlocuswillbedisplayed.Doublechecktomake
surethattheopenlooppolesandzerosofyourplantareinthecorrectlocations.
C. GeneratingtheStepResponse
1. ClickonAnalysisResponsetoStepCommand.
2. Youwillprobablytwocurvesonyourstepresponseplot.TofixthisclickonAnalysisOther
LoopResponsesMakesureonly to ischecked,andthenclickOK.
3. Youcannowclickonthepinkboxesontherootlocus(thecurrentclosedlooppolesforthe
givengain)andmovethemalongtherootlocus.Essentially,youareexploringdifferent
controllergainvaluesbydoingthis.Notehowthestepresponsechangesasyoumovethe
closedlooppolelocations.
4. Thevaluesoftheclosedlooppoleswillappearatthebottomoftherootlocuswindowasyou
clickandholdthemouseonthepinkboxesrepresentingthem.Thisonlygivesyouthevalueof
theclosedlooppoleyouareclickingon.Ifyouneedtheotherclosedlooppolelocations,you
willhavetoclickonthemoneachoftheotherbranches.

Page3of9

D. EnteringtheCompensator(Controller)
1. ClickCompensatorsEditC.ClickonAddRealZeroorAddRealPoletoentercontroller
zerosorpoles.Youwillbeabletomakechangestothesevalueslater.Afteryouaredone,click
OKtoexitthiswindow.
2. Lookattheformof
tobesureitiscorrect.Thenlookattherootlocuswindowandseehow
itchangedoncethecompensatorwasadded.
3. Youcanagainseehowthestepresponsechangeswiththecompensatorbyclickingonthe
closedlooppoles(thepinksquares)anddraggingthemalongtherootlocus.
4. Youcanalsochangethelocationofthepoles/zerosofthecompensatorbyclickingonthemand
draggingthem.Becarefulnottoinadvertentlychangethepolesandzerosoftheplant!
E. AddingDesignConstraints
1. ClickEditRootLocusDesignConstraintstheneitherNewtoaddnewconstraintsorEdit
toeditexistingconstraints.
2. Atthispointyoucanchoosefromsettlingtime,percentovershoot,dampingratio,andnatural
frequencyconstraints.
F. Printing/SavingtheFigures
Tosaveafiguresisotoolcreatedduringyoursession,clickFilePrinttoFigure.Thisopensa
figurewindowandputsthecurrentfigurethere.
G. OddsandEnds
1. Youmaywanttoadjusttheaxes.Todothis,clickEditRootLocusProperties,clickon
Limits,andsetthedesiredaxislimits.
2. Youmayalsowanttoturnthegridon.ClickEditRootLocusGrid.
3. Itisconvenienttousethezero/pole/gainformatforthecompensators.Todothis,clickonEdit
SISOToolPreferencesOptionsandclickonzero/pole/gain.

Page4of9

InLabPartA
Usetheplantgivenin(3)forthissectionofthelab.

(3)

Thisisasecondordersystemwithtworealpoleslocatedat5and6.Ourgoalistospeeduptheclosed
loopsystemresponsesothatthetwopercentsettlingtimeislessthan1second,produceaposition
errorof0.1orless,andkeeppercentovershootlessthan10%.Tokeepthingsreasonable,keepthegain,
,lessthan10foralldesigns.

1. EnteringtheConstraints
Enterthepercentovershootandsettlingtimeconstraintsinsisotool.Rememberthatthese
constraintsarebasedonasecondordersystemstepresponseandforhigherordersystemsare
predicatedbytheassumptionofsecondorderdominanceoftheclosedloopsystempoles.
Therefore,thesedesignconstraintsareguidelinesandyoumayhavetorefineyourdesigntostay
furtherinsidetheseconstraintstomeettheperformancespecifications.
2. Proportional(P)Control
Determinetherootlocusforthissystemwithproportionalcontrol.(Whenyouentertheplant
transferfunctioninsisotool,thisisthedefaultrootlocusplot.Atthispointthecontrolleris
specifiedas
1.
Lookatthestepresponseasthegainincreases.Youshouldnoticeafewthings:

as increases,theimaginarypartoftheclosedlooppolesincreases,andthereforethe
percentovershootincreases
as increases,thepositionerrordecreases
sincetherealpartofthepoledoesnotchangeonce isgreaterthanabout0.008,the
settlingtimeremainsconstantatabout0.8seconds.
thereisnovalueof forwhichthesystemisunstable

Doaswellasyoucantomeetbothconstraints(youwillnotbeabletodoverywell)thensavethe
stepresponseandcontroleffortplotsandyourcontrollergaintoturninwiththelabworksheet.
3. Integral(I)Control
a) Addarealpoleatzerotoimplementtheintegralcontroller.Youcandothisfromtherootlocus
plotortheControlandEstimationToolsManagerasdescribedearlier.Notethatonceyou
placeacompensatorpole(orzero)youcanclickanddragittoanewlocation.However,foran
integralcontrollerthepoleisalwaysatzero,soleaveittherefornow.
b) Youshouldnotethattherearetworootlocusbranchesthatheadtowardstheimaginaryaxis
(towardinstability),whichisgenerallynotdesirable.
c) Findthevalueof thatmakesthesystemmarginallystable(thecriticalgain).

Page5of9

d) Trytofindavaluefor thatgivesaresponsewithsettlingtimelessthanorequalto2seconds
andhaslittleovershoot.Savethecorrespondingstepresponseandcontroleffortplotsandthe
controllergaintoturninwiththelabworksheet.
e) Isthepositionerrorzero?Couldyoufinda valueforwhichyoucouldmeetthe1second
settlingtimeconstraint?
4. Proportional+Derivative(PD)Control
a) Edityourcompensatorbyremovingtheintegrator(thepoleatzero)andaddarealzero.Note
thatinthisPDdesignthatyoucanselectwhereyouplacethisrealzeroalongtherealaxis.Take
amomenttoexplorewhathappenstotherootlocus,thestepresponse,andthecontroleffort
asyoumovethezero.
b) Nowmovethezerobetween1and4.Findaconfigurationwithapositionerrorlessthan0.5.
Savethestepresponseandcontroleffortfigureandthecontrollerthatproducedit.
c) Nextmovethezerobetween7and9.Whathappenstotherootlocus?Arewelikelytogeta
fasterresponseoftheclosedloopsystemwiththisdesignthanthepreviousone?Specifya
controllerwithazerointhisrangethatproducesasettlingtimeof0.1secondsorless.(Dont
forgetthat
10.)Savethestepresponseandcontroleffortfigureandthecontrollerthat
producedit.
5. Proportional+Integral(PI)Control
a) Edityourcompensatorbyaddingarealpoleatzero(addingtheintegralelement).Notethatin
thisPIdesignthatyoucanselectwhereyouplacethisrealzeroalongtherealaxis,butthatthe
realpolemustremainatzero.
b) Placethezerobetween0and5.Findacontrollerthatproducesasettlingtimeoflessthan0.8
seconds,apercentovershootoflessthan2%,andapositionerrorofzero.Savethestep
responseandcontroleffortfigureandthecontrollerthatproducedit.Areallyourpolesinside
thedesignregion?
c) Nowsettherealzerototheleftof6.Thistypeofconfigurationisnotlikelytogetafaster
responsethanwithjustaPcontroller.Why?
6. Proportional+Integral+Derivative(PID)Control
a) LetsstartbymakingaPIDcontrollerwithcomplexconjugatezeros.Edittheprevious
compensatorbydeletingtherealzeroandaddingcomplexconjugatezerosat 7
7andlook
attherootlocusplot.
b) Findagainvalueof onthisrootlocussothatthestepresponsehaslessthan10%percent
overshootandasettlingtimelessthan0.5seconds.Savethestepresponseandcontroleffort
figureandthecontrollerthatproducedit.Areallyourpolesandzeroswithinthedesignregion?
Wouldyoucallthisasecondorderdominantsystem?
c) Keepingtherealpartofthezerosat7,reducetheimaginarypartofthezerosasmuchas
possiblewhilekeepingthesamebasicshapeoftherootlocus.Atsomepoint,asyoureducethe
imaginarypart,therootlocuswilltakeaverydifferentshape.Findavalueof onthisrootlocus
sothatthestepresponsehasapercentovershootoflessthan2%,settlingtimelessthan1

Page6of9

second,andapositionerroroflessthan0.01.(Remembertokeep
10.)Savethestep
responseandcontroleffortfigureandthecontrollerthatproducedit.
d) NowletsmakeaPIDcontrollerwithrealzerosat7and8.Determinetherootlocusforthis
system.Findavalueof onthisrootlocussothatpercentovershootislessthan2%andthe
settlingtimeislessthan1second.(Remembertokeep
10.)Savethestepresponseand
controleffortfigureandthecontrollerthatproducedit.

Page7of9

InLabPartB
Usetheplantgivenin(4)forthissectionofthelab.
.

(4)

Thisisamodelobtainedfromoneofthemassspringdampersystemsinthecontrolslab.
PerformanceConstraints

0.1forunitstepinputs
0.5 seconds

, %
%OS 10%
ControllerParameterConstraints

0.03
10

Meetthesedesignconstraintsbyimplementingthefollowingcontrollerstructures
Icontroller(hardtomeetsettlingtime,probablyneed , % 1 sec)
PDcontroller(trytoget , % 0.1 sec)
PIcontroller(hardtomeetsettlingtime,probablyneed , % 1.5 sec)
PIDcontrollerwithrealzeros
PIDcontrollerwithcomplexconjugatezeros
Foreachoneofthesecontrollerdesigns,youneedtoincludeyourplotofthestepresponse,your
controllerparameters,andthesteadystateerror.

Page8of9

InLabPartC
Usetheplantgivenin(5)forthissectionofthelab.
.

(5)

Thisisamodelobtainedfromanothermassspringdampersysteminthecontrolslab.
PerformanceConstraints

0.2forunitstepinputs
1 seconds

, %
%OS 20%
ControllerParameterConstraints

0.03
10

Meetthesedesignconstraintsbyimplementingthefollowingcontrollerstructures
Icontroller(hardtomeetsettlingtime,dothebestyoucan)
PDcontroller(trytoget , % 0.1 sec)
PIcontroller(hardtomeetsettlingtime,probablyneed , % 10 sec)
PIDcontrollerwithrealzeros
PIDcontrollerwithcomplexconjugatezeros
Foreachoneofthesecontrollerdesigns,youneedtoincludeyourplotofthestepresponse,your
controllerparameters,andthesteadystateerror.

Page9of9

You might also like