PID controller in control systems

khalafGaeid1 31,440 views 39 slides Apr 02, 2018
Slide 1
Slide 1 of 39
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39

About This Presentation

This is a collection of many SlideShare PID controller presentations and research as well
Tikrit University


Slide Content

Assistant Professor Dr. Khalaf S Gaeid
Electrical Engineering Department/Tikrit University
[email protected]
[email protected]
+9647703057076
April 2018

1.Introduction
Acontrollerisadevicethatgeneratesanoutputsignalbasedontheinput
signalitreceives.
Theinputsignalisactuallyanerrorsignal,whichisthedifference
betweenthemeasuredvariableandthedesiredvalueascanbeshownin
feedbackcontrolsystem(Fig.1).
Fig.1.Feedback control system

Asensormeasuresandtransmitsthecurrentvalueoftheprocess
variable(PV)backtothecontroller.
▪Controllererror(e(t))atcurrenttimetiscomputedasset-point(SP)
minusmeasuredprocessvariableasin(1).
e(t)=SP–PV (1)
▪Thecontrollerusesthise(t)inacontrolalgorithmtocomputeanew
controlleroutputsignal.
▪Thecontrolleroutputsignalissenttothefinalcontrolelement(e.g.
valve,pump,heater,fan)causingittochange.
▪Thechangeinthefinalcontrolelementcausesachangeina
manipulatedvariable
▪Thechangeinthemanipulatedvariable(e.g.flowrateofliquidorgas)
causesachangeinthePV

1.Introduction
Aproportional-integral-derivativecontroller(PIDcontrolleror
threetermcontroller)isacontrolloopfeedbackmechanism
widelyusedinindustrialcontrolsystemsandavarietyofother
applicationsrequiringcontinuouslymodulatedcontrol.
APIDcontrollercontinuouslycalculatesanerrorvaluee(t)as
thedifferencebetweenadesiredsetpoint(SP)andameasured
processvariable(PV)andappliesacorrectionbasedon
proportional,integral,andderivativeterms(denotedP,I,and
Drespectively)whichgivethecontrolleritsname.

Thefirsttheoreticalanalysisandpracticalapplicationwasin
thefieldofautomaticsteeringsystemsforships,developed
fromtheearly1920sonwards.Itwasthenusedforautomatic
processcontrolinmanufacturingindustry,whereitwaswidely
implementedinpneumatic,andthenelectronic,controllers.
TodaythereisuniversaluseofthePIDconceptinapplications
requiringaccurateandoptimizedautomaticcontrol.
PIDcontroliswidelyusedinallareaswherecontrolis
applied(solves(90%ofallcontrolproblems).

2. Requirements of a Good Control System
TheessentialrequirementsofagoodControlSystemcanbelistedas
follows:
1)Accuracy:Accuracymustbeveryhighaserrorarisingshouldbe
corrected.Accuracycanbeimprovedbytheuseoffeedbackelement.
2)Sensitivity:Agoodcontrolsystemsensesquickchangesinthe
outputduetoanenvironment,parametricchanges,internalandexternal
disturbances.
3)Noise:Noiseisaunwantedsignalandagoodcontrolsystemshould
besensitivetothesetypeofdisturbances.

2. Requirements of a Good Control System
4)Stability:Thestablesystemshasboundedinputandboundedoutput.
Agoodcontrolsystemshouldresponsetotheundesirablechangesinthe
stability.
5)Bandwidth:Toobtainagoodfrequencyresponse,bandwidthofa
systemshouldbelarge.
6)Speed:Agoodcontrolsystemshouldhavehighspeedthatisthe
outputofthesystemshouldbefastaspossible.
7)Oscillation:Foragoodcontrolsystemoscillationintheoutput
shouldbeconstantoratleasthassmalloscillation.

3.Controller Modes
In industry there are many control modes as follows:
1.ON-OFFcontroller/twopositioncontrollerastemperaturecontroller
usedfordomesticheatingsystem.
2. Three-position controller
3. Proportional Action Control
4. Integral/Reset Action Control
5. Derivative/Rate Action Control
6. P+I Control
7. P+D Control
8. P+I+D Control

• P depends on the present error
• I on the accumulation of past errors
•Disapredictionoffutureerrors,basedon
currentrateofchange
SotheimportanceofPIDcomesfromtheabove
P_Controller
I _Controller
D_Controller

4. The Characteristics of P, I, and D Controllers
Aproportionalcontroller(Kp)willhavetheeffectofreducingtherise
timeandwillreducebutnevereliminatethesteadystateerror.
Anintegralcontrol(Ki)willhavetheeffectofeliminatingthesteady-
stateerrorforaconstantorstepinput,butitmaymakethetransient
responseslower.
Aderivativecontrol(Kd)willhavetheeffectofincreasingthestability
ofthesystem,reducingtheovershoot,andimprovingthetransient
response.

Infact,changingoneofthesevariablescanchangetheeffectoftheother
two.
WiththePIDcontrollerwecansettheP+I+Dvaluessothatwewillnot
haveanyOverorundershootandreachsetpointdirectly.
PIDcontrollerhasallthenecessarydynamics:fastreactiononchange
ofthecontrollerinput(Dmode),increaseincontrolsignaltoleaderror
towardszero(Imode)andsuitableactioninsidecontrolerrorareato
eliminateoscillations(Pmode).
Thiscombinationof{Present+Past+Future}makesitpossibleto
controltheapplicationverywell.

ProportionalController
Inaproportionalcontrollertheoutput(alsocalledtheactuating/control
signal)isdirectlyproportionaltotheerrorsignal.ThepositionofKp
canbeasshowninFig.2.
Fig.2. Proportional controller
Controlsignal=Kp*e(t) (2)
Iftheerrorsignalisavoltage,andthecontrolsignalisalsoavoltage,
thenaproportionalcontrollerisjustanamplifier.

Propertiesofproportionalcontroller:
Inaproportionalcontroller,steadystateerrortendstodependinversely
upontheproportionalgain,soifthegainismadelargertheerrorgoes
downasin(3).
(3)
WhereSSEisthesteadystateerror
Proportionalcontrollerhelpsinreducingthesteadystateerror,thus
makesthesystemmorestable.
Slowresponseoftheoverdampedsystemcanbemadefasterwiththe
helpofthesecontrollers.
Pcontrollerhastheadvantageofreducingdownthesteadystateerrorof
thesystem,butalongwiththatitalsohassomeseriousdisadvantages.
ThesepropertiescanbeshowninFig.3.
1/(1 (0))
p
SSE K G 

Fig.3.ResponseofPVtostepchangeofSPvstime,forthreevaluesof K
p( K
iand K
dheld
constant)

DisadvantagesofPController
1.Duetopresenceofthesecontrollerswehavesomeoffsetsinthe
system.
2.Proportionalcontrollersalsoincreasethemaximumovershootofthe
system.
3.Itdirectlyamplifiesprocessnoise.
Toavoidtheseerrorsandtomakethecontrollermoreaccurateand
practical,weusetheadvancedandmodifiedversionofitknownasthe
ProportionalIntegralControllers(PI)andProportionalDerivative
Controllers(PD).

Integral
Anintegraltermincreasesactioninrelationnotonlytotheerrorbut
alsothetimeforwhichithaspersisted.So,ifappliedforceisnot
enoughtobringtheerrortozero,thisforcewillbeincreasedastime
passes.Apure"I"controllercouldbringtheerrortozero,however,it
wouldbebothslowreactingatthestart(becauseactionwouldbesmall
atthebeginning,needingtimetogetsignificant),brutal(theaction
increasesaslongastheerrorispositive,eveniftheerrorhasstartedto
approachzero),andslowtoend(whentheerrorswitchessides,thisfor
sometimewillonlyreducethestrengthoftheactionfrom"I",notmake
itswitchsidesaswell),promptingovershootandoscillations(seeFig.4).
Moreover,itcouldevenmovethesystemoutofzeroerror:remembering
thatthesystemhadbeeninerror,itcouldpromptanactionwhennot
needed.Analternativeformulationofintegralactionistochangethe
electriccurrentinsmallpersistentstepsthatareproportionaltothe
currenterror.Overtimethestepsaccumulateandaddupdependenton
pasterrors;thisisthediscrete-timeequivalenttointegration.

Fig.4. Response of PV to step change of SP vs time, for three values of K
i( K
pand K
dheld
constant)

Derivative
Aderivativetermdoesnotconsidertheerror(meaningitcannotbring
ittozero:apureDcontrollercannotbringthesystemtoitsset-point),
buttherateofchangeoferror,tryingtobringthisratetozero.Itaimsat
flatteningtheerrortrajectoryintoahorizontalline,dampingtheforce
applied,andsoreducesovershoot(errorontheothersidebecausetoo
greatappliedforce).Applyingtoomuchimpetuswhentheerrorissmall
andisreducingwillleadtoovershoot.Afterovershooting,ifthe
controllerweretoapplyalargecorrectionintheoppositedirectionand
repeatedlyovershootthedesiredposition,theoutputwouldoscillate
aroundtheset-pointineitheraconstant,growing,ordecayingsinusoid.
Iftheamplitudeoftheoscillationsincreasewithtime,thesystemis
unstable.Iftheydecrease,thesystemisstable.Iftheoscillationsremain
ataconstantmagnitude,thesystemismarginallystable.Thiscanbe
illustratedinFig.5.

Fig.5. Response of PV to step change of SP vs time, for three values of K
d( K
pand K
iheld
constant)

5. Mathematical form
Theoverallcontrolfunctioncanbeexpressedmathematicallyasin(4)
(4)
whereKp,Ki,andKd,allnon-negative,denotethecoefficientsforthe
proportional,integral,andderivativetermsrespectively(sometimes
denotedP,I,andD).
Inthestandardformoftheequation(seelaterinarticle),KiandKd
arerespectivelyreplacedbyKp/TiandKd*Td;theadvantageofthis
beingthatTiandTdhavesomeunderstandablephysicalmeaning,as
theyrepresenttheintegrationtimeandthederivativetimerespectively
theaboverelationshipisobtainedfromparallelconfigurationofPID
controllerasillustratedinFig.6.
0
( )
( ) ( ) ( )
t
p i d
de t
u t k e t k e d k
dt
    

Fig.6. Parallel configuration of PID controller
AlthoughaPIDcontrollerhasthreecontrolterms,someapplications
useonlyoneortwotermstoprovidetheappropriatecontrol.Thisis
achievedbysettingtheunusedparameterstozeroandiscalledaPI,PD,
PorIcontrollerintheabsenceoftheothercontrolactions.PIcontrollers
arefairlycommon,sincederivativeactionissensitivetomeasurement
noise,whereastheabsenceofanintegraltermmaypreventthesystem
fromreachingitstargetvalue.

6.Electronicanaloguecontrollers
ElectronicanalogPIDcontrolloopswereoftenfoundwithinmore
complexelectronicsystems,forexample,theheadpositioningofadisk
drive,thepowerconditioningofapowersupply,oreventhe
movement-detectioncircuitofamodernseismometer.Discrete
electronicanaloguecontrollershavebeenlargelyreplacedbydigital
controllersusingmicrocontrollersorFPGAs,toimplementPID
algorithms.However,discreteanalogPIDcontrollersarestillusedin
nicheapplicationsrequiringhigh-bandwidthandlow-noise
performance,suchaslaser-diodecontrollers.

7.LimitationsofPIDcontrol
WhilePIDcontrollersareapplicabletomanycontrolproblems,and
oftenperformsatisfactorilywithoutanyimprovementsoronlycoarse
tuning,theycanperformpoorlyinsomeapplications,anddonotin
generalprovideoptimalcontrol.ThefundamentaldifficultywithPID
controlisthatitisafeedbackcontrolsystem,withconstantparameters,
andnodirectknowledgeoftheprocess,andthusoverallperformanceis
reactiveandacompromise.WhilePIDcontrolisthebestcontrollerinan
observerwithoutamodeloftheprocess,betterperformancecanbe
obtainedbyovertlymodelingtheactoroftheprocesswithoutresorting
toanobserver.
PIDcontrollers,whenusedalone,cangivepoorperformancewhenthe
PIDloopgainsmustbereducedsothatthecontrolsystemdoesnot
overshoot,oscillateorhuntaboutthecontrolsetpointvalue.

7.LimitationsofPIDcontrol
Theyalsohavedifficultiesinthepresenceofnon-linearities,may
trade-offregulationversusresponsetime,donotreacttochanging
processbehavior(say,theprocesschangesafterithaswarmedup),
andhavelaginrespondingtolargedisturbances.
Themostsignificantimprovementistoincorporatefeed-forward
controlwithknowledgeaboutthesystem,andusingthePIDonlyto
controlerror.Alternatively,PIDscanbemodifiedinmoreminorways,
suchasbychangingtheparameters(eithergainschedulingin
differentusecasesoradaptivelymodifyingthembasedon
performance),improvingmeasurement(highersamplingrate,precision,
andaccuracy,andlow-passfilteringifnecessary),orcascadingmultiple
PIDcontrollers.

Closed-loopResponseperformancedependsontheeffectsofPID
parametersascanbeshowninthefollowingtablewhentheparameters
areincreasedascanbeshownintable1.
Table1. Increasing PID controller parameters with the performance of the closed loop
system
•Notethatthesecorrelationsmaynotbeexactlyaccurate,becauseP,I
andDgainsaredependentofeachother.
StabilitySSESettling timeOvershootRise timeparameter
degradedecreaseSmall changeincreasedecreaseKp
degradeEliminateincreaseincreasedecreaseKi
Improve if
Kdsmall
No effectdecreasedecreaseMinorchangeKd

8.Thetuningparametersessentiallydetermine:
Howmuchcorrectionshouldbemade?Themagnitudeofthe
correction(changeincontrolleroutput)isdeterminedbythe
proportionalmodeofthecontroller.
Howlongthecorrectionshouldbeapplied?Thedurationofthe
adjustmenttothecontrolleroutputisdeterminedbytheintegralmode
ofthecontroller.
Howfastshouldthecorrectionbeapplied?Thespeedatwhicha
correctionismadeisdeterminedbythederivativemodeofthe
controller.

8.PIDTuningAlgorithm
TypicalPIDtuningobjectivesinclude:
Closed-loopstability:Theclosed-loopsystemoutputremainsbounded
forboundedinput.
Adequateperformance:Theclosed-loopsystemtracksreference
changesandsuppressesdisturbancesasrapidlyaspossible.Thelarger
theloopbandwidth(thefrequencyofunityopen-loopgain),thefaster
thecontrollerrespondstochangesinthereferenceordisturbancesinthe
loop.
Adequaterobustness:Theloopdesignhasenoughgainmarginand
phasemargintoallowformodelingerrorsorvariationsinsystem
dynamics.

9.Electronic PID Controllers
ElectronicPIDcontrollerscanbeobtainedusingoperationalamplifiers
andpassivecomponentslikeresistorsandcapacitors.Atypicalschemeis
showninFig.7.
Fig.7.ElectronicPIDcontroller

It is evident from Fig. 5, the proportional gain Kpis decided by the ratio
R2/R1of the first amplifier; the integral action is decided by R3and C1
andthederivativeactionbyR5andC2.
Thefinaloutputhowevercomesoutwithanegativesign,comparedto
eqn.(1)(thoughthepositivesigncanalsobeobtainedbyusinga
noninvertingamplifierattheinputstage,insteadoftheinverting
amplifier).
Theop.amps.showninthecircuitsareassumedtobeideal.

10.PIDTuning
Usersofcontrolsystemsarefrequentlyfacedwiththetaskofadjusting
thecontrollerparameterstoobtainadesiredbehavior.Therearemany
differentwaystodothis.Oneapproachistogothroughthe
conventionalstepsofmodelingandcontroldesignasdescribedinthe
previoussection.SincethePIDcontrollerhassofewparameters,a
numberofspecialempiricalmethodshavealsobeendevelopedfordirect
adjustmentofthecontrollerparameters.Thefirsttuningruleswere
developedbyZieglerandNichols.Theirideawastoperformasimple
experiment,extractsomefeaturesofprocessdynamicsfromthe
experimentanddeterminethecontrollerparametersfromthefeatures

Ziegler–Nicholstuningrules(Table2).(a)Thestepresponsemethods
givetheparametersintermsoftheinterceptaandtheapparenttime
delayτ.(b)Thefrequencyresponsemethodgivescontrollerparameters
intermsofcriticalgainkcandcriticalperiodTc.
Table2.Ziegler–Nicholstuningrules
byextensivesimulationofarangeofrepresentativeprocesses.A
controllerwastunedmanuallyforeachprocess,andanattemptwasthen
madetocorrelatethecontrollerparameterswithaandτ
TdTiKpType
1/aP
3τ0.9/aPI
0.5τ2τ1.2/aPID
TdTiKpType
0.5kcP
0.8Tc0.4kcPI
0.125Tc0.5Tc0.6kcPID
(a) Step response method (b) Frequency response method

33
The series configuration of PID control consists of a proportional plus
derivative (PD) compensator cascaded with a proportional plus integral
(PI) compensator.
The purpose of the PDcompensator is to improve the transient
response while maintaining the stability.
The purpose of the PI compensator is to improve the steady state
accuracy of the system without degrading the stability.
Since speed of response, accuracy, and stability are what is needed for
satisfactory response, cascading PD and PI will suffice.

34
Lead/LagcompensationisverysimilartoPD/PI,orPIDcontrol.
TheleadcompensatorplaysthesameroleasthePDcontroller,
reshapingtherootlocustoimprovethetransientresponse.
LagandPIcompensationaresimilarandhavethesameresponse:to
improvethesteadystateaccuracyoftheclosed-loopsystem.
BothPIDandlead/lagcompensationcanbeusedsuccessfully,and
canbecombined.

12.Conclusions
•Proportionalactiongivesanoutputsignalproportionaltothesizeof
theerror.Increasingtheproportionalfeedbackgainreducessteady-state
errors,buthighgainsalmostalwaysdestabilizethesystem.
•Integralactiongivesasignalwhichmagnitudedependsonthetime
theerrorhasbeenthere.Integralcontrolprovidesrobustreductionin
steady-stateerrors,butoftenmakesthesystemlessstable.
•DerivativeactiongivesasignalproportionaltothechangeintheError.
Itgivessortof“anticipatory”control.Derivativecontrolusually
increasesdampingandimprovesstability,buthasalmostnoeffectonthe
steadystateerror
•ThesethreekindsofcontrolcombinedfromtheclassicalPID
controller.
•PIDcanbeimplementedinHardwareandsoftware.
•ThePIcontrollercanbeconsideredasLagcompensator,ThePD
controllercanbeconsideredasleadcompensatorandPIDsameas
Lag-Leadcompensatorworkstoimprovetransientandsteadystate
region.

12.Conclusions
•ThetuningofthecontrollerisoneofthelimitationsofPIDcontroller.
•Proportionalandintegralcontrolmodesareessentialformostcontrol
loops,whilederivativeisusefulonlyinsomecases.
•DesigningandtuningaPIDcontrollerappearstobeconceptually
intuitive,butcanbehardinpractice,ifmultiple(andoften
conflicting)objectivessuchasshorttransientandhighstabilityareto
beachieved.
•ControlengineersusuallypreferP-Icontrollerstocontrolfirstorder
plants.Ontheotherhand,P-I-Dcontrolisvastlyusedtocontroltwo
orhigherorderplants.
•ThemajorreasonsbehindthepopularityofP-I-Dcontrollerareits
simplicityinstructureandtheappilicabilitytovarietyofprocesses.
Moreoverthecontrollercanbetunedforaprocess,evenwithout
detailedmathematicalmodeloftheprocess.

12.Conclusions
•The choice of P-D, P-I or P-I-D structure de pends on the type of the
process we intend to control.
•TherearefewmoreissuesthoseneedtobeaddressedwhileusingP-I
controller.Themostimportantamongthemistheanti-windupcontrol.
Tags