You are on page 1of 41

ControlSystemsEngineering

APracticalApproach
byFrankOwen,PhD,P.E.
MechanicalEngineeringDepartment
CaliforniaPolytechnicStateUniversity
SanLuisObispo,California
May2012

byFrankOwen,May2012
TableofContents

Preface

Acknowledgements

Chapter1Introductiontocontrolsystems

Chapter2Laplacetransformations

Chapter3Systemmodeling

Chapter4Firstandsecondordersystemresponse

Chapter5Stability

Chapter6Steadystateerror

Chapter7Rootlocus

Chapter8Frequencyresponse

Chapter9DesigningandtuningPIDcontrollers

Chapter10Anintroductiontodigitalcontrol

Preface

Preface1

Preface
Whythisbook?
ThisbookhasbeenwrittenforcontrolsstudentsatCalPolyquitesimplytosavethemmoney.Thereare
many,manygoodcontrolsbooksavailable,buttheyhave,inmyopinion,threeflaws.
1) Theyareveryexpensive.
2) Theyareratherreferencebooksthanabasic,firstbookwhatoneneedswhenfirstapproaching
thesubject.ThuswehavefoundatCalPolythatwebuyabookforalotofmoneyandthenuseonly
asmallpartofit.Itisnotthatthepartsthatwedontusedonthaveanyvalue.Theydo.Butone
doesntneedtobuyacompletereferencebooktounderstandthebasicsandtheessentialsofa
topic.
3) Theyarehighlymathematical.Controlsisaverymathematicaltopic,perhapsthemostheavily
ladenmathematicallyinmechanicalengineering.Therearemanygoodengineersinindustrythat
arenotparticularlyadeptatmathematics,whopracticeengineeringwithasmuchintuitionand
commonsenseasmathematicaladeptness.Amathematicalapproachtocontrolslosessightofthis,
leavesmanypeoplebehind,anddoesnottakeadvantageofthefactthatthistopicalsomakesalot
ofsense,alotofcommonsense.Thustheapproachtakenhereistoincludewhatmathisnecessary
buttoappealtocommonsenseandintuitionwheneverpossible.Withtodaysmodelingtools
readhereMatlab/Simulinkagreatdealofthemathcanbeskippedandreplacedwithmodel
building,toposeandanswerquestionsthatstartwithWhatwouldhappenifwe?
InadditionithasalwaysbeenmyconjecturethatwhatwehavedevelopedatCalPolyinourcontrolslab
wouldalsobeveryusefultocontrolsengineersinindustry.Ourlab,whilenotunique,isveryrare.It
bringscontrolsdowntoearthandteachescontrolsengineershowtodealwithrealsystems,howto
modelthemandthentunethemodels,andhowtosetupandtunePIDcontrollersforrealsystems.
Thesearetheessentialskillsthatacontrolsengineermusthavetooperateinindustry.Inmy
experienceinacademia,theseessentialskillsarenotoftentaught.Controlsstudentshavetheirheads
filledwithmathematics,indeedthemathematicsofcomplexnumbers,butthentheyarenotgiveneven
astartingnotionofhowsuchknowledgeisapplicableintherealworld.Thisbookfocuseseveronthe
realworldofcontrolsinindustry.Ittriesnevertolosesightofthatgoalandtriestoavoidthealluring
trapofmathematicaleleganceandindeedmathematicalsnobbishnessthatseemscommoninthefield
ofacademiccontrols.Sothebookhasalsobeenwrittenforindustrialpractitionersofcontroltheory
whoneedtounderstandthetopicandthenbringintoplaytotheiradvantage.
TheotherinfluencethatledmetowritethisbookwasthethreeyearsIspentteachingcontrolsin
Germany,twoyearsattheMunichUniversityofAppliedSciencesandoneyearattheKarlsruhe
UniversityofAppliedSciences.InGermanytextbooksarerare.Ratherstudentsworkfromascript,a
collectionoftheprofessorsnotesorganizedandprintedforstudentuse.Thisbookisreallyascript,a
collectionofmynotesfromteachingcontrolsoverthepastdecade.Thoughwritingabookisalotof
Preface

Preface2

work,itscommonpracticetohaveshort,directedscriptsatlowcostsforpoorstudents.SoIthought,
whydontwedothesameatCalPoly?Wehavelotsandlotsofexperienceteachingcontrols,sowe
shouldbeabletocomeupwithagoodscript.Besides,withourinvolvementinourlaboratory,wehave
alreadydemonstratedthatwecancomeupwithahighqualitydocumentforteachingthelabportionof
thecourse.
Thusitismyhopethatstudentswillbenefitfromthispracticalapproachtocontrolsjustastheyare
assuredlybenefitingfromsavingalmost$200(in2010).AndIhopethatthisscriptservesasanexample
ofwhatcouldbedoneinothercoursesatCalPolyifprofessorswouldtaketheirhardwonexperience,
collectit,andmakeitavailableatlowcosttothoseeagertolearnbutwithoutalotofmoneytobuy
expensivereferencebooks.Thisdoesnotmeanthatoneshouldntbuytheexpensivereferencebooks.
Maybeoneneedstheminhisorherwork.Butatthatstage,onehasthemeanstobuythemorones
companywillbuythemwhenthereisaneed.
TheuseofMatlab/Simulink
ItishardnowadaystoenvisionpracticingcontrolsengineeringwithoutMatlab/Simulink.The
employmentofthissoftwareinanalyzingsystemsanddesigningcontrollersindeednowinrunning
realcontrollersinphysicalsystemsisderigueur.Thistextdoesnotincludeatutorialinlearning
Matlab/Simulink.Thatsavailableonlineorwiththesoftware.Itisassumedthatthereaderhassome
knowledgeofthissoftware.Problemsareposedinthetextthatdirectlydirectthestudenttousethis
software.Occasionallytipsaregiveninspecificapplicationsthatillustratetheutilityofaparticular
MatlabcommandorSimulinkprocedure.Iftheusersknowledgeofthissoftwareisnotatalevelwhere
thesereferencestoitmakesense,heorsheshouldexplorethesoftwareabit,researchingitshelp
facilityforbackgroundknowledge.ControlsrequiresknowingaboutonlyatinybitofMatlaband
Simulink.Sothereaderisnotrequiredtodoanyextensivefoundationbuildinginordertobeeffective
withMatlab/Simulinkinhisorherstudyofthesubject.
Acknowledgements
Wow,howdidahillbillyguyfromalawyerfamilyinMississippievergettothepointthathecouldsit
downandwriteacontrolsbookalmostdirectlyoutofhishead?Well,ifItoldthatwholestory,thatd
beabookinitself.Lotsofhardwonexperiencebutalsolotsofhelpalongtheway.Itsalwaysbeenmy
contentionthatwhenbestowingthanks,wenevergofarbackenough.SoIwanttoatleastgobackand
thankmyhighschoolmathematicsandphysicsteacher,MacEgger.Hedidntplanttheoriginalseed,
buthewasthereclosetothebeginning.Thentherewerelotsoftwistsandturnstogettothispoint.
Alongtheway:GlenMasadaattheUniversityofTexasatAustintaughtmeclassicalcontrolswhenI
wentandgotamidcareerPhD.JustbeforethatIworkedatoneofthelargestcoalfiredplantsinthe
UnitedStates,AmericanElectricPowersGavinplantinGallipolis,Ohio.Aplantengineertheretaught
mealot,RandyScheidler.Hetaughtmealotaboutpowerplantsbutalsoaboutthelevelofknowledge
ofgoodplantengineersintheUnitedStates.Randyservedasasortofmodeltouseinkeepingwhat
Ivewrittenpractical,oftryingnevertowriteanythingwithoutshowinghowitisused.AndImustback
upfurtherandthankthefolksatTraxCorporationinLynchburg,Virginiafortheirinvitationtocome
Preface

Preface3

workforsevenmonthswiththemin1992onpowerplantsimulators.Ilearnedlotsaboutsteampower
plantsandhowtheyrecontrolledfromthisexperienceatTrax.
SincemyarrivalatCalPolyin1998Ihavebeeninvolvedincontrolsasoftenaspossible.Thecourse
therewashandedofftomebyMikeIanci,EdGarner,andEdBaker.Theyhadbuiltaverypractical,
handsonlab.Thoughwevereplacedmuchoftheequipmentinit,someisstillleftfromthosedays,
andmuchofwhatwasaddedcanbeviewedasrefinementsandimprovementsofwhatthey
bequeathedtous.HereIhavethepleasureofworkingwithverypractical,handonpeoplelikemyself
JohnRidgely,CharlesBirdsong,BillMurray,andXiWu.Allhavecontributedonewayoranothertoour
workinmakingthislaboratorymorepracticalandhandson.Somehavehadeventodealwiththe
consequencesofwhatIregardedasagoodideaatthetime,thatrequiredalotofworkontheirpartsto
implement,toworkthebugsout.Throughtheireffortswehaveatopnotchcontrolslab.Ihaveseena
betteronenowhere,neitherinAmericanorinEurope.Itwastheirsweatthatmadethislabthegreat
teachingtoolthatithasbecome.
MytwosojournsinGermanywereimportantcontributorstothisbook.Ihadthepleasureofworking
withseveralaccomplishedcontrolsengineersthere.Twostandout.ManfredSchusterattheMunich
UniversityofAppliedScienceswelcomedmeintohislabandgavemeaveryconcisescripttoteachout
of.Hisscriptis,infact,amodelformine.AttheKarlsruheUniversityofAppliedSciencesIhadthe
pleasureofworkingwithHelmutScherf,acommittedcontrolsnerd.Helmutisarare,rareexampleofa
practicalcontrolsengineer.HehaspublishedagreatbookinGermanofSimulinkmodelsofvery
common,practicalsystems.Hehasbuiltandisstillbuildingpractical,lowcostsystemsforhiscontrols
labthatserveasusefulplatformsforturningonthecontrolslightinstudentsheads.Manyofhis
perceptive,cuttothequickmethodsofthinkingaboutcontrolstopicshavebeenincorporatedintothis
script.
Sothatsthestoryinbriefofhowthisbookcameabout.Ihopethatyouenjoyitandfindituseful.
FrankOwen
SanLuisObispo,California,U.S.A.
May2012
Chapter1IntroductiontoControlSystems

11

Chapter1IntroductiontoControlSystems
Goals
Thepurposeofthischapteristogiveyouanoverviewofthetopicofcontrolsystemsandtointroduce
youtothebasicconceptsthatyouneedtogoforward.Presentedare
Basiccontrolloopanatomy,thepartsandpiecesofcontrolloopsandhowtheyareconfigured
Positionersvs.regulators,thetwobasictypesofcontrolloops
Aflybywiresystemvs.acruisecontrolsystem,iconicexamplesofthepositionerandthe
regulator
Abeginningdiscussionofblockdiagrams
PIDcontrollers,themostcommonlyusedcontrollersinindustry
Examplesofcontrolsystemsusedinindustry
Controltheoryisarelativelynewfieldinengineeringwhencomparedwithcoretopics,suchasstatics,
dynamics,thermodynamics,etc.Earlyexamplesofcontrolsystemsweredevelopedactuallybeforethe
sciencewasfullyunderstood.ForexampletheflyballgovernordevelopedbyJamesWatttocontrol
overspeedofhissteamenginewasdevelopedoutofnecessity,longbeforethescienceofcontrolscame
intobeing.Figure1.1showsanexampleofthiscontroller.Theflyballsaremountedonashaftthat
turnsandisdrivenbytheenginethroughthepulleyshown.Astheenginespeedsup,theflyballsare
flungoutwardbytheircentrifugalforce.Thisoutwardmovementpullstheleverarmdown,whichraises
itsotherend.Thisistiedtothesteaminletvalve,whichclosesastheflyballweightsmovefurther
outward.Soiftheenginetriestorunaway,theinletsteamvalvewillclose,shuttingoffthefluiddriving
theengine.

Figure1.1Flyballgovernor
ManysaythatthedevelopmentoftheairplanebytheWrightbrotherswasenabledbytheir
understandingofcontrolsthatandthedevelopmentofalightweightenginepowerfulenoughto
Chapter1IntroductiontoControlSystems

12

propeltheirmachineintotheair.Theirdevelopmentofwingwarpingenabledthemtosteertheir
airplane,somethingthathadbeenimpossibleuptothatpoint.Anditiscertainlytruethatmuchof
controltheorygrewupwiththeairplane,asairplanesweredevelopedduringthetwoworldwarsand
alsothroughoutthe20
th
centuryforcivilianpurposes.Asjetenginesweredevelopedandairplanes
becamebigger,itbecameevermoreproblematictopilotanaircraftwithjustmechanicalconnections
betweenthepilotscontrolsinthecockpitandthesurfaceselsewhereontheairplanethatsteerit
throughtheair.Thustheflybywiresystemwasdeveloped,whichcutthisdirectconnectionbetween
thecockpitcontrolsandthecontrolsurfacesontheairplane.Inaflybywiresystem,themovementsof
thestickoryokeandtherudderpedalsinthecockpitaremerelysensedbysensors.Electricalsignals
arethensenttoactuatorsdrivingtheappropriatesurfaces,andthenthesemovetheailerons,the
elevator,ortheruddertosteertheplaneaccordingtothecontrolinputsmadebythepilot.Ofcourse
theforceappliedbytheactuatoronthecontrolsurfacecanbemanytimeswhatahumancouldapply
directly.Andtheforcecanbeappliedatanactuatorfardistantfromthepilot.Soflybywirebrings
withittheadvantageofforceamplificationandremotecontrol.
Inindustryonefindscontrolsystemsofmanytypes.Inarefinery,chemicalplant,foodprocessingplant,
orapowergenerationfacilityonefindscontrolloopsforcontrollingtanklevels,pressuresoffluidsat
variousplacesinaplant,poweroutput,valveposition,pump,fan,orturbinespeed.Moderndayfighter
jetsactuallyaredesignedtobeunstable.Thisallowsthemtomaneuverquickly.Theycanonlyfly
becauseacontrolsystemstabilizestheirflight,makingcorrectionsataspeedthatnopilotcouldmatch.
Ifoneoftheseplanescontrolsystemfailedinflight,theplanewouldbeunflyableandwouldcrash.
Therehasbeenatremendousgrowthofcontrolsystemuseinthemodernautomobile.Thereareeven
nowdrivebywireandbrakebywiresystems,where,likeintheairplane,thedirectmechanicalor
hydraulicconnectionbetweeninputdevicesandwhattheycontrolhasbeencutandreplacedbywish
sensingdevicesandthentransmissionofanelectricalsignaltoanactuatortoturnthewheelsorto
applythebrakes.Likethecontroloftheunstableairplane,skiddetectionandcontroltakeadvantageof
anautomaticcontrolsystemsspeed.Adriverwholosescontrolofhis/hercarmaybesavedbysucha
system.Itspringsautomaticallyintoactionupondetectingaskidsituationandappliesthecorrect
brakingforcestorescuethecarfromtheskidanditdoesthisbeforethedriverisevenawarethata
problemexists.
Besidestheseapplications,controltheoryisusefulevenforanalyzingmanuallycontrolledsystems.A
humanoperatorisinthiscaseactuallyplayingtheroleofthecontroller.Ahumanssensingofand
reactingtoinputswhilemanuallycontrollinganindustrialsystemoravehicleisactuallyastudyin
controls.Hisorherreactiontimes,theforcefeedbackortheangulartravelofasteeringwheeloran
operatinglever,suchhumanmachineissuesarewithintherealmofcontroltheory.Mathematical
modelsofthehumancontrollerhaveevenbeendeveloped,sothatadynamicmodelofamanually
operatedsystemcanbecompletedandstudied.
Muchofwhathasbeendiscussedherecanbeillustratedwiththeexampleofapilotinanairplane.
Takethecaseofanairplanewithoutaflybywiresystem,withdirectconnectionsviacablesandpulleys
betweenthecockpitcontrolsandthecontrolsurfaces,asonefindsinasmall,generalaviationairplane.
Acontrolsexpertmightstudytheeffectofahumancontrollerduringsomeflightmaneuverorcritical
Chapter1IntroductiontoControlSystems

13

situation.Thissystemispurelymechanicalwithahumancontrollerintheloop.Butsomesmallplanes
alsohaveautopilots,soacontrolsengineerhadtodesignasystemthatwouldsenseflightconditions
andoperatethecontrolswithoutinterventionbythepilot.Evenmorecomplicatedisthecaseofa
largerairplanewithaflybywiresystem.Controlsengineersdesignedthesensingandreactionlink
betweenthecockpitcontrolsandthecorrespondingmotionofthecontrolsurfaces.Evenwhenthe
planeisbeingflowninmanualmode,asophisticatedcontrolsystemisengagedsimplytosensethe
pilotsmovementoftheinputcontrolleversandpedalsandtransmitthecommandedmotionto
actuatorsthatwillbringitabout.Nowconsiderthecaseofaflybywiresystemwithanactiveautopilot.
Thecontrolsystemsensesflightconditionsaltitude,heading,andspeedandautomaticallyoperates
theproperactuatorselevator,aileronsandrudder,andthrottletomaintaindesiredvalues.Thus
thesefourvariantsofdoingthesametaskflyinganairplaneshowincreasinglycomplexexamplesof
moderncontrolsystems.
Basiccontrolsystemanatomy
ClassicalcontrolsystemsareSISOsystems,singleinputsingleoutput,asopposedtoMIMOsystems,
multipleinputmultipleoutput,whicharemorecomplicated.Foracontrolsystemtheinputisthe
desiredvalue,andtheoutputistheactualvalue(SeeFigure1.2).

Figure1.2SISOcontrolsystem
Agoodexampleisacruisecontrolsystemforanautomobile.Theuserinputsadesiredvalue,say65
mph.Usuallyonedoesnottypethisin.Onedrivesthecaruptothisspeedmanually,thenpushesa
button.Thespeedometersensesthespeed,storesthisinanonboardcomputer,andthenitisthejob
ofthecruisecontroltokeeptheautomobileatthisspeed.
Thus,wheneverythingisworkingasitshould,theactualvalueisequaltothedesiredvalue.InGerman
thesevariablesareknownastheSollwert,theshouldvalue,andtheIstwert,theisvalue.Incontrolsit
isalwaysgoodtobringthingsdowntoearth,becausecontrolscangetsotheoretical,onequicklyloses
sightofwhatisgoingonorwhyoneisdoingwhatoneisdoing.Iliketorefertothesetwovaluesas
whatyouwantversuswhatyouvegot.Whenwhatyouvegotisntwhatyouwant,then
somethingswrong.WhenSollwertIstwert0,thenthecontrolloopisnotdoingitsjob,and
somethingisbrokenorsomethingneedstobechangedtomakethisdifference0.
Actuallythisdifferencehasaname,theerror.Thatsnoterrorinthesenseofamistake.Ratherits
errorinthesenseofdeviation.Inaperfectlyfunctioningcontrolsystem,theerrorshouldbe0,and
whatyouvegotshouldbewhatyouwant.
Letslookinsidethecontrolloop,attheanatomyofacontrolloop.Almostallcontrolloopsarethe
same.Theyareallmadeupoffivecomponentsarrangedalwaysthesame.Sometimesitisnoteasyto
Chapter1IntroductiontoControlSystems

14

recognizetheseelementsinanactualsystem.Butitsalwaysagoodideatotry.Thisstructureis
fundamentaltocontroltheoryandrepresentstheunderlyingfunctionsthatareneededtomake
feedbackcontrolwork.Asyouprobablyhavealreadyconcluded,thebasicstructureofafeedback
controlsystemisaloop(seeFigure1.3).

Figure1.3Basiccontrolloopanatomy
Thefiveelementsare:
1. thecomparator
2. thecontroller
3. theactuator
4. theplant
5. thesensor
Letsdiscussthesecomponentsonebyone.Illpresentthemintheorderthatseasiesttouseto
identifytheminarealsystem.Usuallytheeasiestelementtoidentifyisthesensor.Foracruisecontrol
system,thesensoristhespeedometer.Thesensoralwaysmeasurestheactualvalueandthenfeedsit
backtothecomparatortocomparewiththedesiredvalue.Thecomparatorisjustthesummingblock
thattakesasinputthedesiredvalueandthemeasuredvalue.Thatsthenatureoffeedbackcontrol,
andthatswhyitscalledfeedbackcontrol:theactualvalueisfedbacktothedesiredvalueand
compared.Anothercommonexampleisthethermostatinyourhouse.Athermometerinyourhouse
measurestheinteriortemperatureandthencomparesthatwiththedesiredtemperatureyouhave
somehowenteredonthefaceplateofthethermostat.
Theerrorsignalistheoutputofthecomparator.Itisalsotheinputtothecontroller.Asyoucansee,all
oftheseblocksintheblockdiagramofFigure2areSISOblocks,andeachoutputbecomestheinputof
anotherblock.Thecontrollertakestheinputfromthecomparator,theerror,anddecideshowthe
systemshouldrespond.Iftheerroris0,thenwhatyouvegot=whatyouwant,andthesystemshould
donothing.Iftheerrorisnot0,thenthecontrollershouldtakesomeaction.
Chapter1IntroductiontoControlSystems

15

Nowadays,withdigitalcontrols,thecontrollerisusuallyjustapieceofsoftwarerunninginacomputer
somewhere.Foracruisecontrol,thereisacomputeralgorithmrunninginanonboardcomputerthat
performsthistask.Soifsomeoneaskedyoutopointtothecontrollerinthecruisecontrolloop,youd
haveahardtimedoingthatwithouttalkingwiththeengineersthatdesignedit.Oryoucouldjustpoint
atablackboxinthecarandsay,Thereitis,andmostpeoplewouldhaveahardtimedisputingthis.
Iftheerrorisnot0,thenthecontrollerneedstotakeaction.Eventuallyitwantstoinfluencetheplant.
Thisisafunnytermforthethingthatweactuallywanttocontrol.Butcontroltheorygrewupin
industrialplants,sothatiswhythisblockhasthisname.Theplantcanbehardtoidentify.One
identifiesitoftenbyasking,Whatarewetryingtocontrol?andthentheplantisthethingthatthat
valueisapropertyof.Forexampleinacruisecontrolloop,thespeediswhatwearetryingtocontrol.
Andthespeedisapropertyofthecar.Sothecaristheplantinacruisecontrolloop.
Oftentheactuatoristhehardestcomponenttoidentify,sooftenweleaveitforlast.Oftenitishardto
drawalinebetweentheactuatorandtheplant.Oftenitshardtoanswerthequestion,Wheredoes
theactuatorendandtheplantbegin?Youllseethisdilemmawithexperience.Sogoodquestionsto
askareWhatdoesthecontrollertalkto?orWheredoesthecontrollersenditssignal?orBywhat
meansdoesthecontrollerinfluencetheplant?.Inacruisecontrolsystemtheplantisthecar.The
actuatoristhethrottle.Ormaybeitstheengine.Itsthethingthatcausesthecarsspeedtoincrease
whenthecontrollernotesthatthecarisgoingtooslowandneedstospeedup.Whatyouhaveisless
thanwhatyouwant,sodosomething.
Thusthesefivelogicalcomponentsarealwayspresentinaclassicalcontrolloop.Thoughitmaybe
hard,itisalwaysofvaluetotrytoidentifythephysicalcomponentsthatcorrespondtothelogical
components.
NotealsoinFigure2thatthesignalsbetweentheblocksalsohavenames:
1. rdesiredvalue(rstandsforreferencevalue;thisisalsoknownasthecontrollersetpoint)
2. eerror
3. ucommand
4. fforce
5. cactualvalue(cstandsforcontrolledvalue)
6. bmeasuredvalue
Thesevariablenamesarenotstandardbyanymeans,butoneseesthemoften.Youshouldbeaware
thatoftenvariationsofthemareused.Butweneednamesforthemsothatwecanrefertothemwhen
talkingaboutwhatsgoingonintheloop.
Twotypesofcontrolloops:positionerandregulator
Controlloopscomeintwoflavorspositioners(alsoknownatrackers)andregulators.Botharemade
upofthesamecomponentspresentedabove.Whatdifferentiatesthemisactuallyhowtheyareused,
whattheirpurposeis.ThecontrolloopshowninFigure1.3isapositioner.Thisloopcanbemodifiedto
Chapter1IntroductiontoControlSystems

16

configurearegulator,asshowninFigure1.4.Notethatthedifferenceistheadditionofthedisturbance
betweentheactuatorandtheplant.Thishintsatthedifferencebetweenthetwoloops.Apositioner
hasadesiredvaluethatchangesoften.Auserisoperatingaplantthroughthecontrolsystem.Itisthe
jobofthecontrolsystemtosensetheoperatorswishesanddrivetheplanttothepointthattheuser
desires.Incontrast,inaregulatorsystem,theuserwantsnormallythattheactualvaluestayatsome
preselectedlevel,eventhoughexternalinfluencesareworkingtodrivethesystemoffofthepreselected
level.Agoodexampleisthecruisecontrolsystemofacar.Yousetthedesiredspeedtoafixedvalue.
Butupwardanddownwardgradestendtomakethespeeddeviatefromitsdesiredvalue.Itisthejobof
thecontrolsystemtokeepthesystematapreselectedspeedinthefaceofdisturbancesthattendto
deflecttheactualspeedfromthiswishedforspeed.

Figure1.4Regulatorloop
Itiscommontoarrangecontrolloopssothattheinputisonthelefthandsideandtheoutputisonthe
righthandside.Witharegulatorloop,whenthedesiredoperatinglevelischosen,theloopselectsthis
levelasthereferencelevelandconsidersittobe0.Theloopworksindeviationsfromthisoperating
level.Weshallseelaterhowthisisdone.Atpresentitsufficestonotethatthedesiredvalueisthe0
referencevalue,sotherinputcanbeeliminated.TheloopcanbereconfiguredasshowninFigure1.5.
Heretheinputisthedisturbance,andtheoutputisstillthesamevariableofinterest,c.Thereworking
ofloopsasshowninthisexampleiscommonlydoneincontrolsandisknownasblockdiagramalgebra.
Weshallseemanymoreexamplesofthisinthematerialtocome.
Chapter1IntroductiontoControlSystems

17

Figure1.5Reworkedregulatorloop
PIDcontrollers,theworkhorseoftheindustry
PID(ProportionalIntegralDerivative)controllersarebyfarthemostcommoncontrollersusedin
industry.Thenamereferstothreedifferentactionsthatthecontrollermakesinrespondingtoanon
zeroinput,theerror,aswehaveseenabove.Thuswespeakofproportionalaction,integralaction,and
derivativeaction.Thethreeactionsoccursimultaneously.Theconfigurationofthecontrollerisa
parallelconfiguration,asisdemonstratedinFigure1.6.

Figure1.6PIDcontrollerconfiguration
Noteinthefigurethattheinputsignal,theerror,isfirsttreatedonewayoranotherandthenmultiplied
byaconstant.Thetoppathistheproportionalpath.Heretheoutputisproportionaltotheerror,
hencethename.Thereisnoactiontakenontheinputsignal.ItisjustmultipliedbyK
P
andthenpassed
ondownstreamtotheoutput.Theintegralactionisthesecondpath.Notethattheerror(theinput)is
firstintegrated.Theoutputoftheintegratorblockistheintegraloftheerror.Thusifyouplottedthe
errorcurvevs.time,thissignalwouldrepresentthenetareaunderthiserrorcurvethroughtime.Thisis
thenmultipliedbyK
I
andbecomestheintegralaction.Thederivativeactionisthethirdpath.Notethat
theerrorisfirstdifferentiated.Theoutputofthederivativeblockisthennottheerrorbuttherateof
changeoftheerroratthecurrenttime.ThischangerateisthenmultipliedbyK
D
tobecomethe
derivativeaction.AllthreeactionsareaddedtogetherinthesummingblocktobecomethetotalPID
controlleraction.
Chapter1IntroductiontoControlSystems

18

Whyonewoulddothisisatthispointnotclearatall.Butasweshallsee,eachoftheseactionshasa
specificuseorjustificationandusuallyimprovesthecontrolresponse.ThethreeconstantsK
P
,K
I
,and
K
D
arecalledthecontrollergains.K
P
istheproportionalgain,K
I
istheintegralgain,andK
D
isthe
derivativegain.Itisalsooftenthecasethatoneoftheactionsisnotpresent.Asweshallsee,the
proportionalactionisbyfarthemostsensibleandusefulaction.OftencontrollershaveonlyPaction
thatisK
I
andK
D
=0.WecallthesePonlyorjustPcontrollers.AcontrollerwithnoDactioniscalledaPI
controller.OnewithnoIactionisaPDcontroller.SoweencounterP,PI,PD,andPIDcontrollers.Note
thatallofthesehavePaction.TheremaybeanoddballcasewithoutPaction,butthatiswhatitis,an
oddballcase.
Problems
1.1 Makeaconceptualmodelofabrakebywiresystem.Theforceonthebrakepedalissensedasa
desiredbrakingforce.Thegreaterthepedalforce,thegreatertheforceappliedbythebrakepads
tothebrakediscs.Thismeasuredpedalforceissensedbyaloadcell,whichproducesavoltage
proportionaltothisforce.Thisvoltageisdeliveredtoaninterfaceboard,whichconvertsitintoa
digitalnumberinamicroprocessor.Thecontrollerrunninginthemicroprocessorproducesan
outputsignalthatisthenconvertedintoavoltagethatdrivesanelectromechanicalactuator.This
drivesapiston,themastercylinder,andproducesapressure.Thepressureworksonthebrake
pistonthatappliesthebrakingforcetothediscpads.Thebrakingforceismeasuredusingactually
apressuresensor.Knowingthesizeofthebrakepads,thebrakingforcecanbedetermined.The
forceappliedtothebrakepadsisnotnecessarilythesameforceappliedtothepedal,buttheyare
proportionallyrelated.Makeablockdiagramofthissystem,showinghowallthecomponentsfit
togethertocomposethesystem.Eachblockshouldallcontainthenameofasystemcomponent.
Eachlinebetweentheblocksshouldshowthetypeofsignalbeingtransmittedbetweenblocks.
1.2 Thefigurebelowshowsapartoftheelectricalpowergenerationsysteminaconventionalsteam
powerplant.Fuel(gas,oil,orcoal)issuppliedonthelefthandsidetotheboiler.Therewateris
heatedintosteamandstoredinasteamdrum.Fromtherethesteamflowsthroughacontrol
valveintotheturbine,whichturnstheplantsgenerator.Thegeneratorproduceselectricpower.
ThereareseveralSISOloopsinplayhere.Oneloadsthegeneratorbyincreasingordecreasingits
electricfield.Ofcoursewhenmoreelectricityisneeded,morefuelwillbeneededtosupportthis.
Buttheconnectionbetweenfuelinandelectricityoutisnotdirect.Thethreelollipopsshown
representmeasuredquantities.Thinkaboutwhatthesemightbe.Thenwriteintheblocksthe
quantitiesthataremeasured.Drawdashedlinesfromtheselollipopstotheactuatorsthatcontrol
them.Itisachainofeventsthatleadfrommorepowerrequiredtomorefuelsupplied.Consider
thecaseofadesiredincreaseinpowerout.Writeoutinwordsthesequenceofcauseandeffect
eventsthatwillleadthesteamplanttoanew,higherlevelofoperation.Makeacopyofthe
completeddiagramtocompletethedeliverableforthisproblem.
Chapter1IntroductiontoControlSystems

19

1.3 Sometimesaplantisatwopartplant,andadisturbanceenterstheplantmidwaybetweenthese
twoparts.Drawaregulatorloopforsuchaplantwithanegativedisturbanceenteringbetween
Plant1andplant2.Letthedisturbancebetheinputtotheloop.
1.4 CreateaSimulinkmodelofaPIDcontroller.Forthisyouwillneedtousegainblocksforthethree
controllergains.Useanintegratorblockandadifferentiatorblockfortheintegralactionandthe
derivativeaction.Atfirstjustsetallgainstoavalueof1.Asinput,useaconstantblockandset
itsvalueto0.Allthreecontrolactionsaresummedwithasumblock.Useascopeblockatthe
outputofthesumblocktocapturewhatoutputthecontrollerdeliversovertime.Alsoplace
scopeblocksonallthreecontrolactionstoseehowtheybehave.Ofcourseintherealworldthe
controllerwouldbehookedintoasystemandreceivethesystemerrorasitsinput.Itsoutput
wouldbefeddownstreamtoanactuator.With0asasteadyinput,youhavemodeledthecaseof
acontrolloopwheretheactualvalueisequaltothedesiredvalue.Whatshouldthecontrollerdo
andwhatdoesitdo?Nowmaketheinput1.Whatdoesthecontrollerdonow?

Chaptei 9 Besigning anu tuning PIB contiolleis

91

Chapter9DesigningandtuningPIDcontrollers
Goals
ProvideapracticallookatthePID,athowitisthoughtofandunderstoodbypractitionersin
industry
DescribeseveralheuristictuningmethodsforPIDcontrollers
InChapters7and8wehavealreadygottenagoodlookatthePIDcontroller.Inthecontextofroot
locusandfrequencyresponsedesignprocedureswehaveundertakenthedesignofPIDcontrollersfor
variouscommonsystems.Inawaytheseapproachesgiveoneafalseimpression.Theyimplythatone
musthaveasystemmodeltotuneaPIDcontroller.Thatisnot,however,commonpracticeinmany,if
notmost,industrialapplications.Forexampleatanklevelcontrollerneedstobeimplemented.One
purchasesacommercialPIDcontrollerandputsitinserviceonthetank.Onethenfieldtunesthe
controller,startingwiththeproportionalgainandthenaddingintegralandderivativegaintoimprove
systemresponse.Allofthisisnormallydonewithoutasystemmodel.
Indeed,thenormalunderstandingofPIDcontrolbyacontrolstechnicianinanormalplantismuchmore
intuitiveanddowntoearththanwhatyouhavelearnedaboutPIDdesignandtuningviarootlocusand
frequencyresponse.Thosetwotechnicsarepowerfuldesigntechniquesandoughttobeunderstoodby
controlstechniciansbutoftentheyarenot.Thusforthecontrolsengineer,itisimportantalsotogain
thisintuitivegraspofPIDcontrolsimplytobeabletocommunicateeffectivelywithplantcontrols
technicians.ThiscommonsenseunderstandingofPIDcontroloffersyetanotherperspectiveonthis
technology,andthiscomplementstheapproachestakenalreadywithrootlocusandfrequency
response.
ThereareanumberofacceptednonmodelbasedmethodsfortuningPIDcontrollersi.e.methods
usedforfieldtuning.ThemostwellknownoftheseisprobablytheZieglerNicholstuningmethod.That
andothersarediscussedinthischapter.
ThePIDcontrollerinterface
Figure9.1showsthefaceplateofatypicalPIDindustrialcontroller,thisoneusedfortemperature
controlinakilnorheattreatmentoven.

Figure9.1IndustrialPIDcontrollerfaceplate
Chaptei 9 Besigning anu tuning PIB contiolleis

92

Theinterfaceissomewhatsparsebecauseoftentherearemanyofthesecontrollersgroupedtogether,
controllingvariouspartsofanindustrialprocess.
Theuserinputpanelforthiscontrollerconsistsofthefourbuttonsatthebottomofthefaceplate.The
firstbuttonisthemanual/automaticbutton,usedtoswitchbetweenthesetwomodesofoperation.
TheAUTOlightontheleftofthefaceplateindicateswhetherthecontrollerisinautomaticmode.In
manualmodethecontrolfunctionisdeactivated.Theusercandrivetheprocessinmanualmodeby
usingtheupanddownarrowsonthecentertwobuttons.Thisadjuststheoutputfromthecontroller
directly.Thisoutputfromthecontrollerissome(settable)range.Oftenthecontroloutputiscalculated
anddisplayedaspercentageofthisrange,asisshownaboveintheOUTwindow.Inmanualmode,
whenoneclickstheuparrow,forexample,thepercentageoutputwouldincrease.Torunthecontroller
inautomaticmode,onemustsetthesetpoint(andmaybesomeotherparameters,likeK
P
,T
I
,andT
D
).
Todothis,onemustreadthedocumentationthatcomeswiththecontroller.Inthecaseabove,theSET
buttonisusedtoenteraparametersettingproceduretosetthecontrollerparametersforautomatic
operation.
Inbothmanualandautomaticoperation,thedisplayofthePV(processvariable)showstheoutput
comingfromthesensorofthevariablethatistheoutputfromtheloop,thevariabletobecontrolled.
SP(setpoint)isthedesiredvalueofthisoutputvariable.Thisistheinputtothecontrolloop.Inthe
aboveexample,thecontrollerisinautomaticmode(theAUTOlightislit).Theactualvalueofthe
controlledprocessis316F,andthedesiredvalueis325F.Thecontrollerisputtingout12%ofits
outputrangetobringtheactualtemperatureuptothedesiredvalue.
TheALMlightisanalarmlight.Thiscanbesettoindicatethattheactualvalueisoutsideacertainrange
aroundthedesiredvalue.Oftenalarmscanbesetattwolevels,awarninglevelandaseverelevel.The
warninglevelwillhavethelightburnamber.Theseverelevelwillhaveitburnred.IftheAUTOlightis
green,thisgreenyellowredcolorschemeforthelightswillallowanoperatortoscanagroupofthese
modulesquicklyanddetermine
1. whichloopsareinautomaticoperation
2. whetherthereareanywarninglevelalarmsactive
3. whetherthereareanyseverelevelalarmsactive
Quartercycledamping
Controllersaredesignedtoimprovesystemresponseortoachieveadesired,prescribedresponse.
Variousaimsarepossible:
Limitastepresponsetoaspecifiedovershoot.Recallthattheovershootisafunctionsolely
of
`

%0S = c
-_
{n
_1-{
2
_
1uu%
/

.At=1thereisnoovershoot.Butbyspecifyingno
Chaptei 9 Besigning anu tuning PIB contiolleis

93

overshoot,onemustsettleforalongerresponse,alongertimetoreachanewsetpoint.So
oftenacompromiseismadeandalittleovershootisacceptedforfasterreactionspeed.
Specifyaspecificfrequencyofoscillation.Notethatincreasingthisfrequencydecreasesthe
systemsspeedofresponse,sincetheresponseisoftenjustthefirsthalftothreequarter
wavecycleoftheresponsesinusoid.
Limitoreliminatesteadystateerror.
Acombinationofsuchspecifications.
Tomeettheseneedsitisveryhelpfultorememberthegeometryespeciallyofcomplexpolesandthe
meaningofvariousdistancesonthisplot.Figure9.2showsthisgeometryagain.

Figure9.2Geometryofcomplex(oscillating)poles
Sobyspecifyingacertainovershoot,oneislimitingthedominantclosedlooppolepairtoarayleading
fromtheoriginatacertainangle(=arccos)fromthenegativerealaxis.Asexplainedabove,oftena
controllerissettogivealittleovershoot(510%)inordertohavethesystemrespondfaster.
Alternativelythereisaconceptcalledquartercycledamping,wherebyeachoscillationis1/4the
amplitudeofthepreviousoscillation(seeFigure9.3).Forquartercycledamping,turnsouttobe
0.2155.Thisleadstoshorterresponsetimesbutmoreovershoot.Whichtopickdependsonthe
applicationandtheabilitytotolerateovershoot.Iftheoscillationfrequencyisspecified,thenthe
verticaldistancefromtherealaxis,
d
,isknown.Ifboththedesiredortolerableovershootandthe
dampingratioareknown,thenthedesiredlocationofthedominantclosedlooppolepairisfixed.
Steadystateerrorisnotreadilyseenontheplot,sonosuchstatementscanbemaderegardingitandits
placementofpolesontheplotabove.
Chaptei 9 Besigning anu tuning PIB contiolleis

94

Figure9.3Quartercycledamping
ThePIDcontroller
AsexplainedinChapter1thePIDcontrolleristheworkhorseofindustry.Most,indeedalmostall,
controlloopsinindustryareSISOloopswithPIDcontrollers.Sotobeactiveasacontrolengineerin
industryonemusthaveagoodunderstandingofPIDcontrollers.Andbythesametoken,withagood
understandingofPIDcontrollers,onecandoalmostanythingonewantsinindustry.Evenintherare
casethatoneneedssomethingotherthanaPIDcontroller,agoodunderstandingofthisworkhorse
controllerwillstandoneingoodsteadtocompareanexoticcontrollerwithaconventionalPID
controller.
BeforebeginningwiththeexplanationofaPIDcontroller,itisfirstusefultorecallwherethecontroller
isplacedinthecontrolloopandwhatitsinputandoutputare.Thecontrollerisjustafterthe
comparator,thesummingblockthattakesthedifferencebetweenthedesiredvalueandtheactual
value.Thustheinputtothecontrolleristheerrorsignal.Thecontrolleroperatesonthiserrorsignal
andproducesacommandthatisthensentdownstreamtotheactuator.Thepurposeofthecontrol
loopistodrivetheerrorto0,sothattheactualvalue=thedesiredvalue.Ifeverythingisworkingasit
should,ewillbe0andthecontrollerwilltakenoaction.Itwillsimplyput0ontheoutput,theinputto
theactuator.Thisisacommandtotheactuatortodonothing.Whentheactualvalueisnotequalto
thedesiredvalue,thecontrollertakesactionandproducesanonzerocommandfortheactuator.
PID,ofcourse,standsforproportionintegralderivative.APIDcontrollerhasaparallelstructurewith
thesethreeactions(seeFigure9.4).ThethreecontrollerconstantsK
P
,K
I
,andK
D
canbetunedto
adjusttherelativestrengthofeachaction.Theproportionalactionisthemainaction,andtheother
twoactionsareaddonstoimprovethecontrol.OftenoneseesaPonlycontroller,i.e.acontrollerwith
onlyK
P
0.OenonseesaPIDcontrollerwithoneaconintegralorderivativeturnedoff.Thusthe
Chaptei 9 Besigning anu tuning PIB contiolleis

95

mostcommonvariantsareaPcontroller,aPIcontroller,aPDcontroller,orthefullblownPID
controller.

Figure9.4PIDcontrollerstructure
Ofcourseonemightask,howdidanyoneevercomeupwiththisstructure?Theanswerliesinthe
developmentofthecontroller.ItwasdevelopedbyaRussianAmericanengineerNicholasMinorsky.
HewasworkingonanautosteeringsystemforshipsfortheU.S.Navy.Minorskyobservedhelmsmen
steeringshipsandnoticedthattheyactednotonlyontheerroritselfbutalsoontherateatwhichthe
errorwasdevelopingandonthehistoryofthepasterror.ThePIDstructurewasdevelopedfromthese
observations.(SeetheWikipediaarticleonPIDcontrollers.)
Proportionalaction
Asstateabove,Pactionisthemainaction.OnealmostneverseesaPIDcontrollerwithoutPaction.P
actionmakesalotofsense.Thecontrollerseestheerrorasinput.Iftheerrorissmall,thecontroller
shouldsuggestasmallaction,anudge,totheactuatortogettheplantbackontrackandreducethe
errorto0.Iftheerrorislarge,thatmeansthattheactualvaluehasdriftedfarawayfromthedesired
value.Thecontrollerneedstosuggestalargeactiontotheactuatortobringtheplantinlinewiththe
desiredvalue.Suchastrategymeansthecontrolleractionshouldbeproportionaltotheerror,i.e.P
action.
Theproportionalgain,K
P
,canalsoberegardedasthesensitivityofthecontroller,howgreatanactionit
willsuggestforagivendeviationofactualfromdesired.IfK
P
ishigh,thecontrollerwilltakealarge
actionforasmalldeviationofactualfromdesired.Thecontrollerisverysensitive.IfK
P
issmall,the
reactionofthecontrollertoadeviationofactualfromdesiredisgentle.Averycommonsense,seatof
thepantsmethodfortuningK
P
isthefollowing.Onelooksattheactuatorandasks,Howmuchcanthe
actuatorgive?Forexample,takeatanklevelloopwiththecontrollinginletvalveoperatingata75%
valveopeningatdesignsteadystate.(SeeChapter3forthetanklevelsystemdescription.)Thevalve
has25%yettogiveifthelevelstartssinking,75%toclosedownifthelevelstartstorise.Onewould
pickthesituationthathadthemostdireconsequencestocontinueeitheranoverflowingtankoran
emptytankandthenposethequestion,HowfarawayfromdesignsteadystatedoIwanttogo
beforethevalveisgivingallitsgottobringthesituationundercontrol?Ifthemostcriticalsituationis
theoverflowingtankandonedecidestoallowthetankleveltorisethreeinchesbeforehavingthevalve
giveitsfull75%topreventafurtherrise,thenonehastheproportionalgain.Ifthetanksactuallevel
Chaptei 9 Besigning anu tuning PIB contiolleis

96

rises3inchesabovethedesiredsteadystate,thene=3inches.Thedesignerhasdecidedthatatthis
deviationthevalveshouldhaveclosedits75%,sothecontrolleroutputshouldbe75%(recallthatsuch
loopsoperateondeviationsfromdesignsteadystate).SoK
P
=25%valveopening/inch.Thisisa
commonsensewaytoselectK
P
andoftenagoodwaytopickaninitialK
P
.RegardlessofhowK
P
is
selected,itisgoodpracticealwaystoperformacommonsensecheckonit,toseehowmuchofa
deviationwilldrivetheactuatortosaturation(seebelow).
Proportionalactionisbaseduponthecurrentvalueoferror.Thusitisbaseduponthepresent.Aswe
shallseebelow,integralactionisbasedonthepast,andderivativeactiononthefuture.
Integralaction
Integralactionisusedtogetridofsteadystateerror.Asystemstypeisnotgreatenough,sooneusesa
PIcontrollertoaddafreeintegratortotheopenlooptransferfunction.Otherwiseexpressed,wehave
seeninChapter6thatPonlycontrolleadsnaturallytosteadystateerrorinmanycases.Theintegral
termactsnotontheerroritselfbutratherontheintegraloftheerrorthatis,ontheaccumulated
errorproducedovertime.

Figure9.4PIcontrolloop
Itisusefultolookatthisactionupclose.Figure9.4showsaPIcontrollerinaloopwithafirstorder
actuator+plant.Aunitstepisgiventotheinput.Ofcourse,withoutintegralcontrol,theoutputwould
notgoto1,thecommandedvalue.Therewouldbesteadystateerror.(TrythisbysettingKI=0inthe
modelabove.)Noticethetwoactionsovertime.Whenthestepisinputatt=1sec,theerror
immediatelygoestoK
P
e.Theintegralactionis0becausethisactionisbasedupontheareaunderthe
e(t)curve,andnotimehaspassedtoallowtheareaunderthecurvetoaccumulate.Astheclockticks,
Chaptei 9 Besigning anu tuning PIB contiolleis

97

thisareadevelops,andtheIactionincreases.Astheplantmovesclosertothedesiredvalue,theP
actiondiminishes.Intheend,withtheplantatthedesiredvalue,thePactionis0andallnonzero
controlactionisprovidedbytheintegralcontrolaction.
Noteworthyisthattheintegralactionwillcontinuetoaccumulateuntiltheerroris0.Oncetheerroris
0,thereisnoproportionalaction.Notethatwithe=0,theintegralactionisnot0;itjustdoesnt
accumulateanymore.
Controlsengineersinthefieldoftenusethetermresettocharacterizethestrengthofintegralaction.
Resetisalsocalledintegraltime,T
I
.(Intheprocessindustry,thisvariableisoftenexpressedasR.Thisis
notthesameRusedfortheinputorreferencevalueinthestandardcontrolloop.)Thisisacomparison
ofintegralactionwithproportionalaction.IfaPIcontrollerweresubjectedtoasteadyinputsignal,the
resettimeisthetimeitwouldtakefortheintegralactiontoreachtheleveloftheproportionalaction.
Sowithaninputsignalof1,theproportionalactionwouldbeK
P
.Theintegralactionwouldbe
K
I
_1 Jt = K
I
t
Att=T
I
,K
P
=K
I
T
I
.SoT
I
=K
P
/K
I
.SinceT
I
isameasureofhowlongittakestheintegralactiontodevelop,
thehigherT
I
is,thelowerK
I
isandthemoregentletheintegralaction.
Sinceintegralactionaccumulatesovertime,whatisimportanttoitisthehistoryoferrorovertime.
Integralactionrememberswhathashappened,soitisanactionbaseduponpastexperience.
Derivativeaction
Derivativecontrolispredictiveinnature.Itoperatesontherateofchangeoferror,notontheerror
itself.Apracticalexampleillustratesthis.InFigure9.5asupplytankhasalevelcontrolleronit.Asthe
liquidinthetankisneeded,anoutletvalveopenstosupplymoretoadownstreamprocess.Ifthetank
startsoffatasteadystateandthenasuddendemandformoreliquiddownstreamoccurs,theoutlet
valveopensquickly,andthelevelinthetankstartstodrop.Thetroublewithproportionalcontrolis
thatitreallydoesnotreactuntiltheerrorhasdeveloped.Sothereisalagtimebeforetheproportional
actioncomesintoplay,sinceitcanonlyreacttocurrenterror,errorthathasalreadyoccurred.Thisis
unfortunate,because,withthevalveopenandtheerrordevelopingrapidly,itwasentirelypredictable
thattheerrorwoulddevelopbeforeitdiddevelop.Theideabehindderivativecontrolliesinthisphrase
withtheerrordevelopingrapidly.Therateofchangeoferrorishigh.Thatmeanstheerroris
developingrapidly,andthereisnoreasonwhythecontrollershouldntreacttothatbeforetheerror
develops.Soastrongderivativeactionatthestart,beforetheerrordevelops,ensuresthatlesserror
willactuallydevelop.
Chaptei 9 Besigning anu tuning PIB contiolleis

98

Figure9.5Levelregulatorexperiencingsuddenincreaseindemand
Anotherscenariowouldbethefollowing.Youaredrivingacarinmanualspeedcontrol(thecruise
controlisnotengaged)atasteadyspeed.Youcometoasteepincline.Youautomaticallypushthe
acceleratoralittleharder,becauseyouknowthatifyoudont,thecarsspeedwilldecrease.Youhave
justappliedderivativecontrol.Throughvisualclues,thesteepincline,youknowthatthespeedwill
decrease,soyouhavetakenaproactivesteptopreventthespeedfromdecreasingbeforeitactually
decreased.Notdoingthis,usingonlyproportionalaction,wouldplayoutlikethis.Youaredrivingata
steadyspeed,encountertheincline,andatfirstdonothingdifferent.Youapplythesameconstant
forcetotheaccelerator.Afterafewmoments,younoticethatthespeedhasdecreased,soyoupush
theacceleratorhardertocompensateforthedecreasedspeed.Thefirstscenarioseemsentirely
plausible.Thesecondseemslikethedrivingstyleofaninexperienceddriverinmaintainingaconstant
speed.Soderivativecontrolisnotsomethingexoticorbizarre.Itfitsnaturallyintonormalhuman
behavior.
Chaptei 9 Besigning anu tuning PIB contiolleis

99

Figure9.6ComparisonofPandPDcontrol
Figure9.6showsacomparisonofPandPDcontrolappliedtoanunderdampedsecondorder
plant+actuatorsubjectedtoaunitstepinput.Noticethatthesystem,underPcontrol,oscillatesmuch
morevigorouslythanitdoesunderPDcontrol.
Figure9.7showstheseparatecontrolactionsfromthissamesystem.Withaunitstepinput,theerror
immediatelygoesto1.SotheproportionalactiongoestoK
P
.Thesuddenincreaseinerrorgenerated
bythestepinputofcourseproducesaninfiniterateoferrorincrease.Sotheinitialderivativeactionis
verylarge.Thisisknowninindustryasaderivativekick.ThisisthelargespikeinFigure9.7.Also
noteworthyabouttheseactionsisthattheproportionalactionenduresbecauseoftheconstantsteady
Chaptei 9 Besigning anu tuning PIB contiolleis

910

stateerror.Soeventhoughtheerrorisnonzeroattheend,itisnotchanging.Andsinceitisnot
changing,itsrateofchangeis0,sothederivativeactionis0.

Figure9.7Proportionalandderivativeactions
InasecondcommonformofthePIDcontroller,thevariableK
D
isnotused.Ratherthestrengthofthe
derivativeactionisexpressedbythederivativetime,T
D
(seebelow).Intheprocessindustry,thisPID
parameterisgiventhesymbolT.
ThefullblownPID
AfullblownPIDcontainsthethreeindividualelements.Thehighertheerror,thegreaterthe
proportionalaction.ButwehaveseeninChapter6thatsteadystateerrorissomethingthatoften
proportionalcontrolactionalonecannotgetridof.Integralactionisaddedtodothis.Itcontinuesto
actuntiltheerrorbecomes0.Derivativeactionallowsthecontrollertorespondinadvance.Itseesthe
errorcomingandactstostopthegrowthoferrorbeforeitoccurs.
Thisisthecommonsense,intuitiveunderstandingofPIDcontrolthatmostcontrolspractitionershave
whoworkupclose,handsonwithcontrolloops.Talkingtoaplantscontrolstechnicianintermsofroot
locusorBodeplotsisusuallynotveryproductive.Thatdoesnotmeanthatthesetechniquesshouldnot
beusedinaplant.Theyshouldbe.Theyarenotaswellknowninthefieldastheyshouldbe.They
enhanceonesknowledgeofsystemdynamicsandwhatisactuallyhappeninginsidecontrolloops.But
theunderstandingofcontrolstechnologyandthelanguageusedwhentalkingaboutitinthefieldis
moreintuitiveandhandsonthanitistheoretical.
Chaptei 9 Besigning anu tuning PIB contiolleis

911

FormsofthePIDcontroller
ThePIDcontrolstructurecanbeexpressedinanumberofdifferentforms.Threecommonformsare
giveninTable9.1.Noticethateachcontrolstructurehasthreeparametersthatdescribeit.Thatmeans
thateachsetofparameterscanbeexpressedintermsofadifferentset.Noticethatinthefirstform,K
P

isaseparateaction,withnoimpactontheothertwoactions.Inthesecondtwoforms,thegainK
PID
isa
multiplierforallactions.TheKT
1
T
2
formistheformconvenienttouseforpolecancellation,wherethe
polestobecancelledareat1/T
1
and1/T
2
.
Form Blockdiagram Transferfunction
K
P
K
I
K
D

0
PI
(s) = K
P
+
K
I
s
+ K

s
=
K

s
2
+ K
P
s + K
I
s

K
PID
T
I
T
D
0
PI
(s) = K
PI
_1 +
1
I
I
s
+I

s]
KT
1
T
2

0
PI
(s) =
K (I
1
s + 1) (I
2
s + 1)
s

Table9.1FormsofPIDcontroller
Actuatorsaturation
ApracticalproblemthatoftenisnotevidentintheworldofSimulinkmodelsisthatthesizeofaloops
actuatorislimited.Acontrollermaytellapoweramplifiertoputout40volts,butifthatamplifier
cannotputoutmorethan15volts,itwillsaturate.Thusallcommandsignalsfromthecontrollerthat
demandmorethan15voltswilleffectivelybechoppedoff.Onesolutiontosuchaproblemwouldbeto
buyandinstallamorepowerfulamplifierthatcouldputout40volts.Butthismaynotbethecorrect
solutiontothisproblem.Forexample,takeacruisecontrolforacar.Youmayhaveitsetat65mphand
engageitwhenyouaregoing40mph.Thiswillcausethecartoreactandtotryashardasitcantoget
to65mphasfastasitcan.Buttheenginecanonlyputoutalimitedamountofpower,soitmaytake
sometimeforthecartoreactandarriveatthedesiredspeed.Duringthisperiod,whenthecarsengine
isfullyengagedtoreach65mph,thespeedcontrolloopissaturated.Tofixthis,onecouldbuyacar
withamorepowerfulengine.Butthisisexpensive,andhowimportantisitanywaytohaveacar
acceleratefrom40mphto65mphveryquickly?Thecontrolloopwasdesignedtoholdthecarata
speedaround65mph,notasanaccelerationlooptogetacarfromtheentrancerampofafreeway
ontothefreeway.Sosaturation,eventhoughitisanonlinearphaenomenon,isnotbadinallcases.In
theexampleofthecruisecontrolforthecar,saturationwhengoingtodrivingspeedisnotbadandcan
betolerated.Butiftheengineofthecarweresopunythatitcouldnotmaintainthecarsspeedat
Chaptei 9 Besigning anu tuning PIB contiolleis

912

relativelygentleincludes,thenonemustaskthequestionofwhetherthecarsenginewassized
properlyforthecar.
Theoperatingconditionsoftheloopmustbetakenintoaccountwhendesigningtheactuatorforthe
loop.Whatkindofloadwillcausetheactuatortosaturatemustbeconsidered,andtheactuatorshould
besizedaccordinglyfortheloopoperationconditions.Actuatorscanalsobesizedtoolarge.Takethe
tanklevelexamplethathasappearedthroughoutthistext.Iftheinputvalveistoolarge,ithastoobiga
gain.Ifthetankleveldropsslightlyandthisvalveopensalittle,itletsinafloodofliquidsothatthe
levelrisesquickly.Shuttingjustalittlecutsoffsomuchliquidthatthetankleveldropsquickly.Thusa
missized,oversizedvalveleadstoafluctuatingtanklevelandunstableormarginallystableoperationin
theprocessthatitisapartof.
Saturationdependsnotjustonthesizeoftheactuatorbutalsoonhowfartheactualvalueisawayfrom
thedesiredvalue.Thiswasseenabovewiththecruisecontrolexample.Thissamephaenomenon
appliesalsotomotioncontrolsystems.Theyarenormallydesignedforsomewhatfinecontrol,to
maintainpositionaroundanarrowrangeofdistance.ForgrossmotionsfrompointAtopointB,motion
actuatorsoftensaturate.

Figure9.8Saturationresponse
Figure9.8showswhatsaturationlookslikeonastepresponseplot.Thelong,straightclimbfrom0up
toanewvaluedoesnotseemtofitwiththeshapeofthecurvysinusoidaloscillationoncethesystem
getswithinanarrowrangeofthefinalvalue.
Aproblemwithintegralcontrolwindup
AhiddenproblemwithintegralcontrollurksintheblockdiagramofaPIDcontroller,inthatoneisnot
awarethatintegralactionhasassociatedwithitasortofstorehouseofrememberedpasterrorthatcan
continuetoact,evenaftertheloopreachesitsdesiredvalue.ConsidertheexampleinFigure9.8.Ifthis
systemwereunderintegralcontrol,inthesaturatedstate,betweent=0.1secandalittleafter0.3sec
thepersistenterrorwouldcauseanaccumulationofareaunderthee(t)curve.Asthesystemnearedits
goalandtheerrorbecamelessandless,theproportionaltermwouldstarttodecrease.Buttheintegral
Chaptei 9 Besigning anu tuning PIB contiolleis

913

actionwouldcontinuetoactbecauseofthestorederrorundertheerrorcurve,eventhoughthenew
setpointhadbeenreached.Thustheintegraltermwoulddrivethesystempastthesetpoint.Infactthe
onlywayfortheintegraltermtosheditsaccumulatedpositiveerrorwouldbeforittoaccumulate
negativeerror.Andtheonlywayforittodothiswouldbetostayabovethesetpointuntilthenegative
accumulatederrorcancelledthepositiveaccumulatederror.Thistendencyoftheintegraltermto
accumulateerror,evenwhentheactuatorisdoingallitcantoreduceerror,iscalledintegralwindup.
Thesolutiontothisproblemissimple:dontlettheareaundertheerrorcurveaccumulate.Aswitchis
putintotheintegralbranchofthePIorPIDcontroller.Iftheactuatorissaturated,turnoffthe
integrationoftheerror.Sointheaboveexample,whiletheactuatorissaturatedbetween0.1secanda
littleover0.3sec,theintegraltermisturnedoff.Whenthesystemnearsitsdesiredvalueandthe
actuatorbecomesunsaturated,theintegraltermisonceagainturnedon.Thispreventsthe
overshootingcausedbyintegralwindupandallowsthesystemtoreachitsdesiredvaluewithless
fluctuationsenroute.

Figure9.9Integratorantiwindupimplementation
Figure9.9showsaSimulinkimplementationofanantiwindupscheme.Theinputandoutputsofthe
saturationblockarecompared.Iftheyareequal(orclose),thentheintegralisallowedtoaccumulate
error.Iftheyarenot,thentheactuatorissaturatedandintegralaccumulationisturnedoff.
Aproblemwithderivativecontrolnoise
Figure9.10showstheoutputfromapressuresensorinawatertank.Noticethateventhoughthetank
levelremainsconstantatabout17.5inches,thereisalotofnoiseinthesignal.Thispresentsaproblem
forderivativeactioninaPIDcontroller.Recallthatthederivativetermactsontherateofchangeof
error,notupontheerroritself.Withthesignalbelow,thetanklevel,andthustheerror,isnotchanging
inthebigpictureovertime.Butthesignalitself,whenconsideringthenoise,isconstantlychanging.
Thederivativeoftheerroristheslopeoftheerrorcurve.Sointhiscase,eveniftheerroris0,thenoise
isconstantlymakingtheslopeflipflopupanddown,oftenwithaseveremagnitude.Derivativeaction
appliedtosuchasignalcausestheactuatortoactfirstinonedirectionvigorously,thenatthenext
Chaptei 9 Besigning anu tuning PIB contiolleis

914

momentintheotherdirectionvigorously.Themotororvalveorhydrauliccylinderthatisbeingdriven
bythiscontrollerisbeingexercisedbackandforthandfornogoodreason.

Figure9.10Noiseintanklevelsensor
Thesolutiontothisistocleanthesignalup.Thiscanbedonewitheitherahardwarefilter,asoftware
filter,orwithboth.ItiscommontoincludeafirstorderfilterinthederivativepathofaPIDcontroller
tocleanuptheerrorsignalbeforetakingitsderivative.Thetimeconstantofthisfilter,T
F
,isoftenbased
onT
D
,thederivativetime.AcommonvalueforT
F
isT
F
=T
D
/10.Figure9.11showssuchan
implementationofaPIDcontrollerwithfiltering.

Figure9.11PIDcontrollerwithderivativefiltering
TuningmethodsforPIDcontrollers
ThenextsectionsdealwithdifferentmethodsfortuningPIDcontrollers.Thesereflectdifferent
strategiesfortuningcontrollers.Mostofthemareheuristicorfieldtuningmethods.Thereareliterally
thousandsofschemeslikethis.Theonesillustratedherearesomeofthebetterknownschemes.
TuningmethodsReplacementofsystemsnaturaldynamicswithdesireddynamics
Chaptei 9 Besigning anu tuning PIB contiolleis

915

TheKT
1
T
2
formofthePIDcontrollersuggestsaninterestingdesignstrategyforacontroller.Onecan
cancelthedynamicsoftwopolesofanopenloopsystemusingthetwozerosofthePIDandtheninstall
onesowndynamicswiththecontrollersremainingpoleattheoriginandwiththecontrollergain.

Figure9.12PIDpolecancellation
Figure9.12showsthisforasimpleopenloopsystemwithtworeal,stablepoles.WithaPonly
controllerthesystemwouldeventuallystartoscillatingasthegainisincreased.Ifonecancelsthepoles
ataandbbyaddingcontrollerzerosthere,theclosedloopsystembecomesasimplefirstorderthat
neveroscillatesasthegainisincreased.Thusonehascancelledtheoriginalsystemsbehaviorand
installedabehaviortoonesownliking.
Abigcaveattothisstrategyisthatthisreallyonlyworksasdescribedforsystemswhosemodels
perfectlyfitthesystem,andthatisvirtuallyneverthecase.Evenifoneisluckyorresourcefulenoughto
haveaperfectmodel,physicalsystemschangeovertimewithwear.Soasystemthathaspolesata
andbwillseethosepolesdriftovertime.Thusthepolesarenotquitecancelled,andthischangesthe
behaviorofthesystem.Thepolesarenotquitecancelled.Thisproblemisalwaysencounteredwith
zero/polecancellation.Itisoftenrecommendedtoplacethezerosnearthepolesinworkingwiththis
strategytobeexplicitaboutthefactthatthezeroswillnotalways(ever?)exactlycancelthepoles.
TuningmethodsZieglerNicholstuning
TheZieglerNicholstuningalgorithmwasdevelopedinthe1940sprimarilyforregulatorcontrolloopsin
theprocessindustry(powergenerationstation,chemicalplants,refineries,etc.).Asregulators,these
loopspurposeisdisturbancerejection,thatiskeepingadesiredquantityatacertainleveldespite
disturbinginfluencesthattrytochangeit.ZieglerNicholsisprobablythebestknownandmostwidely
usedoftheheuristictuningmethodsfortuningPIDcontrollers.Heuristicsimplymeansbasedon
experimentationorbasedontrialanderror.Suchmethodsdonotdependonthedevelopmentofa
systemmodel.Theyarefieldtuningmethods,inthatonecanapplythemtotherealsystemandtuneit
inplace.
InZieglerNicholstuning,tuningparametersK
P
,K
I
,andK
D
arebasedonK
u
andP
u
.K
u
isthegainthat
causesasystemwithaPonlycontrollertobemarginallystable.("u"standsfor"ultimate".)Youcan
findtheultimategainbyatrialanderrorprocess.OnesetsK
P
tosomelowvalue(K
I
andK
D
are0atthis
stage).TestthesystemwiththisK
P
toseeifitoscillatescontinuously(marginallystable).Ifthe
oscillationsdecay,keepincreasingK
P
.Iftheoscillationsincreaseinamplitude(unstablesystem),reduce
Chaptei 9 Besigning anu tuning PIB contiolleis

916

K
P
.Dothisuntilthesystemismarginallystable.Whenyouarriveatthispoint,youhavefoundK
u
,the
gainthatgotyouthere.P
u
istheperiodofthenondecayingoscillationsatthispointofmarginal
stability.
Oftenyouwillnotbeabletoreachasystem'sultimategainbecausethesystemactuatorwillsaturate.
Thisisasituationwherethecontrollerdemandsmoreoftheactuatorthanitcanprovide.Remember
theactuatorgetsacommandinputfromthecontrollerandsendsa"force"signaltotheplant.The
actuatorislimitedintheamountof"force"itcansendtotheplant.Foravalve/tanklevelcontrol
system,thevalvecannotopenmorethan100%,norcanitclosemorethan0%.
Firststep:FindK
u

FindK
u
byincreasingK
P
untilthesystemoscillateswithoutadecay.Whileyouaremonitoringtheloop
output,monitortheactuatoratthesametimetoseewhetherornotitissaturating.Continueto
increaseK
P
untilyoufindK
u
ortheactuatorsaturates.
Iftheactuatorsaturates,youwillnotbeabletogetK
u
.InthiscaseuseanothermethodtogetK
q
("q"
standsforquarter).AdjustthePonlygainuntilyouhavequartercycledamping.Thisisameasurement
forasecondorder,underdampedsystem.Ontheresponseplotlookatthefirsttwohumps(thefirst
humpiswherethe%OSismeasured).K
q
isthevalueofK
P
thatmakestheheightofthesecondhump
1/4theheightofthefirsthump.Usethefinaloutputvalueasthereferenceformeasuringthehump
heights.NowK
u
canbedeterminedfromK
q
.Itis:K
u
=2K
q
.
Secondstep:FindP
u

P
u
istheultimateperiodofoscillation.YoucanfindthisoutfromtheresponseplotwithK
P
=K
u
,ifyou
wereabletofindit.IfyoufoundK
u
fromK
q
,getP
q
.WeassumethatP
u
=P
q
.Thisiscloseenough.
Thirdstep:Findcontrollergains
NowthesuggestedZieglerNicholssettingsforP,PI,andPIDcontrollersare:
P:K
PID
=0.5K
u

PI:K
PID
=0.45K
u
;T
I
=1.2/P
u

PID:K
PID
=0.6K
u
;T
I
=2/P
u
;T
D
=P
u
/8

TuningmethodsAstromHagglundrelaytuningmethodforZieglerNicholstuning
Chaptei 9 Besigning anu tuning PIB contiolleis

917

OneoftheproblemswiththeZieglerNicholstuningmethodisthatoneturnsuptheproportionalgain
todrivethesystemtothevergeofinstability.Thiscanbeadangerousthingtodowitharealsystem.
ToavoidthisbutstillbeabletocalculateK
u
andP
u
,analternativemethodwasdevelopedbyAstromand
Hagglund.Inthismethodthecontrollerisreplacedwitharelayortwopointcontrollerthatputsouta
positiveconstantiftheerrorsignalisnegativeandanegativeconstantiftheerrorsignalispositive.This
controlleristhenalwayspushingthesystemtowardacentraloperatingpoint(seeFigure9.13).

Figure9.13RelaycontrollerofAstromHagglund
Astepintheloopsetpointisusedtoperturbtheloopfromastableoperatingstate.Kischosentogive
enoughofacontrolleroutputtogetaclearresponsebutnottodrivethesystemtoofarawayfromits
stableoperatingpoint.Forexample,ifthestephasasizeof1,theerrorwillsuddenlybecome+1.
Somethinglikea5%commandedchangefromwhatthecontrollercanproducebeforesaturatingthe
actuatorwouldbeappropriate.
Chaptei 9 Besigning anu tuning PIB contiolleis

918

Figure9.14ImplementationofAstromHagglundrelaycontroller
Figure9.14showsthisrelaycontrollerimplementedinSimulink.Withthissystemithasbeen
determinedthataunitstepinputwouldsaturatetheactuatorwithacontrollergainof5.Therelay
controllerworksasfollows:Iftheactualoutputisbelowthedesiredlevel,theerrorwillbepositive,soa
constantpositivesignalwillbesentoutofthecontrollernudgingthesystemupward.Iftheactual
outputisabovethedesiredlevel,theerrorwillbenegative,andaconstantnegativesignalwillbesent
outtonudgethesystembackdown.Whatresultsisasawwavecomingoutofthecontrollerandan
oscillationfromthesystem.Threeparametersareneedfromtheseplots.Figure9.15showsthese
parameters.
Chaptei 9 Besigning anu tuning PIB contiolleis

919

Figure9.15ResultofAstromHagglundrelaytuning
WithdandaonecancalculateK
u
.
K
u
=
4 J
n o

ThisisthesameK
u
thatisusedinZieglerNicholstuning.
TuningmethodsChien,Hrones,Reswicktuning
Chien,Hrones,Reswicktuningwasdevelopedin1952asanalternativetoZieglerNicholstuning.Its
advantageisthatithasseparatesuggestionstomakeforcontrollergains,dependinguponwhethera
loopisaregulatororapositionerloop.Thetestneededtofindtheresponseparametersisalso
somewhatsaferthantheZieglerNicholstestinthatoneisnotdrivingthesystemuptothelimitsof
stability.
Anopenlooptestisperformedontheactuator+plant.Thisisnormallyasequenceoffirstorderorgain
elements.ThusthestepresponseappearsasshowninFigure9.16.
Chaptei 9 Besigning anu tuning PIB contiolleis

920

Figure9.16Chien,Hrones,Reswicktuningopenloopstepresponse
Withthisstepresponse,oneidentifiestheinflectionpointintheresponse.Atangentlineisdrawn
throughthispointandextendeduntilitcrossesthehorizontalaxisandthefinaloutputlevel.Thisthen
definestheparametersT
u
andT
g
.AlsousedisK
ss
,thesteadystategainoftheactuator+plant.These
threeparametersarethenusedinthefollowingtabletosettheparametersforaP,PI,orPIDcontroller.
Nonoscillatoryresponsewithshortest
timetogoal
20%overshootwithshortesttimeto
goal
Positioner Regulator Positioner Regulator
P K
PI
=
u.S I
g
K
ss
I
u
K
PI
=
u.S I
g
K
ss
I
u
K
PI
=
u.7 I
g
K
ss
I
u
K
PI
=
u.7 I
g
K
ss
I
u

PI
K
PI
=
u.SS I
g
K
ss
I
u

I
I
= 1.2 I
u

K
PI
=
u.6 I
g
K
ss
I
u

I
I
= 4 I
u

K
PI
=
u.6 I
g
K
ss
I
u

I
I
= I
u

K
PI
=
u.7 I
g
K
ss
I
u

I
I
= 2.S I
u

PID
K
PI
=
u.6 I
g
K
ss
I
u

I
I
= I
g

= u.S I
u

K
PI
=
u.6 I
g
K
ss
I
u

I
I
= 2.4 I
u

= u.42 I
u

K
PI
=
u.6 I
g
K
ss
I
u

I
I
= 1.SS I
g

= u.47 I
u

K
PI
=
u.6 I
g
K
ss
I
u

I
I
= 2 I
u

= u.42 I
u

TuningmethodsTietzeSchenktuningmethod
Thisisatuningmethodfromtheworldofelectricalengineering.Theprocedureisasfollows.
1. DrivethesystemwithaPonlycontroller.
2. RaiseK
PID
untilaweaklydampedoscillationisevident.Theoscillationshouldlastbutdoesdie
out.Thisshouldbeatabouta15phasemargin,so0.15,so%OS60%.
3. FindT
S
,theperiodofoscillation.
4. SetT
D
=T
S
/(2).
5. SetT
I
=10T
D
.
Chaptei 9 Besigning anu tuning PIB contiolleis

921

Thisworksverywell,evenwithunstablesystems.Whydoesitwork?TheBodediagramliesattheroot
oftherationale.WeusetheKT
1
T
2
formofthePIDcontroller:
0
PI
(s) =
K (I
1
s + 1)(I
2
s + 1)
s

Soweareaddingagain,twofirstorderleads,andanintegrator.BysettingK
PID
toobtainroughly60%
overshootat
d
fortheclosedloopsystem,wehave
M
15at
d
fortheopenloopsystem.Ifwe
placethesecondleadthere,thisaddsanadditional45tothephasemargintogive
M
60,so%OS
10%.Thusthegainandoneleadhavebeenutilized.Remainingareanotherleadandtheintegrator.
Theintegratorisadded,asalways,tolimitoreliminatesteadystateerror.Butthenegativeeffectof
addingtheintegratorwillbetolowerthephaseangle90everywhere,i.e.forall.Topreservethe
phasemarginat60,thefirstleadisaddedonedecadebefore
d
,soat
d
/10.Atthisbreak
frequencythephasecontributionofthefirstleadis45,butby
d
,thebreakfrequencyofthe
secondlead,thephasecontributionofthefirstleadhasreached90,sothephaselossoftheintegrator
hasbeencompensated.
Summingup,
I
2
=
1

B2
=
1

d
=
I
s
2n

I
1
=
1

B1
=
1
[
1
1u

B2
=
1u

B2
= 1u I
2

ConvertingtotheK
PID
T
I
T
D
formneededbymostcontrollers
0
PI
(s) = K
PI
_1 +
1
I
I
s
+ I

s] =
K (I
1
s +1) (I
2
s + 1)
s

K
PI
_
I

s
2
+s +1 I
I

s
_ =
K |I
1
I
2
s
2
+(I
1
+ I
2
) s + 1]
s

K
PI
I

s
2
+ K
PI
s +K
PI
I
I

s
=
K I
1
I
2
s
2
+ K (I
1
+I
2
) s +K
s

Thus
K
PI
I

= K I
1
I
2

K
PI
= K (I
1
+ I
2
)
K
PI
I
I
= K

Fromthesecondresult,
Chaptei 9 Besigning anu tuning PIB contiolleis

922

K
PI
= K (I
1
+ I
2
) = K _
1u I
s
2n
+
I
s
2n
] =
11 K I
s
2n

So
K =
2n K
PI
11 I
s

Then
I

=
K I
1
I
2
K
PI
=
2n K
PI
11 I
s

1
K
PI

1u I
s
2
(2n)
2
=
1u
11

I
s
2n
=
I
s
2n

I
I
=
K
PI
K
=
11 I
s
2n
= 1u I

Ponlycontrolinaregulatorloop
InaregulatorloopitissometimesthecasethatjustPcontrolsufficesbecauseofauniquefeatureofthe
regulator.Theregulatorissetuptorunoffdeviationsfromadesignoperatingcondition,notfromtotal
amountsoftheloopvariables.Takethecommonexampleofatanklevelcontroller.Theloopissetup
asshowninFigure9.17.Forthisparticularexamplethetanksdesignsteadystateis18withtheinlet
valveopen70%.Iftheuserputsinasetpointof18,thesetpointsenttotheinnerloopis0.This
indicatesnotthattheuserwantsthetanktoemptybutratherthatheorshewantsthedeviationfrom
18tobe0.

Figure9.17RegulatorloopwithPonlycontroller
Chaptei 9 Besigning anu tuning PIB contiolleis

923

Noticewhathappensatthisoperatinglevel.Theinnerloophas0comingin,andeverysignalinthe
innerloopis0,assumingthereisnodisturbance.Soatthisoperatinglevel,thedesignoperatinglevel,
thereisnosteadystateerror.Ifthesetpointischangedorifadisturbanceisinput,therewillbea
steadystateerror,sincethesystemisatype0systemwithonlyaproportionalcontroller.Ifapositive
disturbanceflowisadded,thetankwillrunalittlehigh.Ifanegativedisturbanceflowisadded,thetank
willrunalittlelow.Thisamountstodrainingmorefromthetankthanthenormaldesignsteadystate
flowrate.Theloadonthetankhasbeenincreased,sothetanklevelwilldroop.Butinnormal
operatingconditions,thetanklevelwillremainatthedesignlevelwithoutanysteadystateerror.
ThisisafeatureofPcontrolofatype0system.Itwillhavenosteadystateerroratoneoperatingpoint,
namelythepointwhereallthesignalsinthedeviationloopare0.Anothercommonexampleisacruise
controlonacar.Whenonesetsthedesiredspeedbyengagingthecontroller,oneisalsosettingthe
designoperatinglevelandsettingupthedeviationfromtheloop.IfthecontrollerinthisloopisaPonly
controller,whenoneencountersahill,theincreasedloadwillcausethespeedtodroopalittle.Thatis
thespeedwillremainafewmilesperhourbelowthesetdesiredspeed.Thisistolerable.Indeeditmay
evenbedesirable.BynotaggressivelyinsistingwithIcontrolthatthespeedexactlymatchthesetpoint
speed,oneoperatesthecarlessaggressivelyandsavesfuel.
Problems
9.1 TakethesystemofFigure9.7andworkoutitsclosedlooptransferfunction.Determine
nCL
and

CL
.WhatrlesdoK
P
andK
D
playrespectivelyin
nCL
and
CL
?Thatis,ifK
P
increases,whateffect
doesthathaverespectivelyon
nCL
and
CL
?IfK
D
increases,whateffectdoesthathave
respectivelyon
nCL
and
CL
?
9.2 ItisoftensaidofderivativecontrolthatsomederivativecontrolallowsonetoturnupK
P
without
runningintothesameproblemsonewouldwithoutsomederivativecontrol.Theprimary
problemencounteredwithoutderivativecontrolisincreasedovershootandswingingwithan
inputstep.Toseeifthisadageisso,takethesystemofFigure9.6andincreaseK
P
.Doubleit,for
example,andcomparetheresultwiththatofthesamesystemwithhalfthegainandnoK
D
.What
effectonsystemresponsedoesturningK
P
uphave?Thatis,withthisabilitytoturnupK
P
without
itsnormal,negativeconsequences,whatisgained?
9.3 GivenK
P
,K
I
,andK
D
,whatareK
PID
,T
I
,andT
D
theparametersofthesecondformofthePIDin
termsoftheparametersofthefirstform?
9.4 Bypolecancellation,youhavefoundoutthevaluesthatyouneedofK,T
1
,andT
2
ofthethirdform
ofthePIDcontroller.Thecontrolleryouareusing,however,needsthethreeparametersofthe
secondform.DetermineexpressionsforK
P
,T
I
,andT
D
ofthesecondformintermsofK,T
1
,andT
2

ofthethirdform.
9.5 SetupaPIcontrolloopforafirstorderplantwithunitysteadystategainandatimeconstantof
80seconds.UseK
P
=0.6andarepeattimeof3minutes.
Chaptei 9 Besigning anu tuning PIB contiolleis

924

9.6 Anunityfeedback,openloopsystemhaspolesats=6and10.Ithasasteadystategainof16.
a. Designacontrollertocancelthissystemsdynamicsandreplacethemwithafirstorderwitha
timeconstantof1second.
b. Overtime,theoriginalsystemundergoeswearandtearandtheopenlooppolesdriftto5.5
and9,andthegaindriftsto15.Howwillthisaffecttheclosedloopsystemsbehavior?Give
theclosedlooptransferfunctionofboththeoriginalandthewornsystems.UsingMatlab,
plotonthesameplottheoriginalsystemsbehavior(unitstepresponse)andthenthe
behaviorofthewornsystem.
c. Plottherootlociofeachsystem,showingoneachdiagramthelocationoftheclosedloop
pole.
9.7 Theactuator+plantwiththetransferfunction
0
0L
(s) =
1u4u
s
3
+ 16 s
2
+ 2u8 s

istobeoutfittedwithaPIDcontrollerinaunityfeedbackloop.UsetheZieglerNicholstuning
methodtotunecontrollersforthissystem.InstallaK
PID
T
I
T
D
formatcontrollerinaSimulink
model.OnceyouhavefiguredoutK
U
andP
U
forthissystem,copythesystemsothatthereare
threecopiesofitinasingleSimulinkmodel.SetupinthelooprespectivelyaP,aPI,andaPID
controller.RuntheoutputfromeachloopintoaMUXblockandthentoascope,sothattheunit
responsetoeachloopcanbecomparedagainsttheothertwo.
Tohandin:Showallcalculations,reportK
u
andP
u
clearly.PrintoutapictureoftheSimulink
model.Printoutthescopeoutputthatcomparesthethreedifferentcontrollers.
9.8 ThesystemofthepreviousexamplewasusedtoillustratetheAstromHagglundrelaycontroller,
usedtocalculateK
u
andP
u
.Findthevaluesofthesetwoparametersfromtheplotsgiveninthe
textandcomparethemwithwhatyoufoundinthepreviousproblem.
9.9 Takethesystemshownbelow

UsetheChien,Hrones,ReswicktuningmethodtodesignaPIDcontrollerforthissystemtoreject
aunitstepdisturbance.Showyourwork.Designacontrollerfornoovershootandthenonefor
20%overshoot.Givecontrollergainsforeachcase.Demonstratethereactionofbothloopstoa
unitstepdisturbance.
Chaptei 9 Besigning anu tuning PIB contiolleis

925

9.10 Takethesystem
0
0L
(s) =
Su
u.uuS s +1

u.2S
u.SS s +1

1
u.uSS s + 1

UsetheTietzeSchenktuningmethodwithaSimulinkmodeltodesignaPIDcontrollerforthis
system.GivethevaluesofK
PID
,T
I
,andT
D
thatresultfromTietzeSchenk.PrintoutyourSimulink
modelandaunitstepresponseofthetunedsystem.