0% found this document useful (0 votes)
91 views

PID Controller Desi76

The document discusses proportional-integral-derivative (PID) control, which is a widely used method for feedback control systems. PID control involves modulating the error between a setpoint and measured value using proportional, integral, and derivative terms. The proportional term depends on current error, the integral term depends on accumulated error over time, and the derivative term depends on the rate of change of error. An example is given of using PID control to maintain the speed of a car at 130 km/h despite changes in conditions like slopes.

Uploaded by

Hassan alla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

PID Controller Desi76

The document discusses proportional-integral-derivative (PID) control, which is a widely used method for feedback control systems. PID control involves modulating the error between a setpoint and measured value using proportional, integral, and derivative terms. The proportional term depends on current error, the integral term depends on accumulated error over time, and the derivative term depends on the rate of change of error. An example is given of using PID control to maintain the speed of a car at 130 km/h despite changes in conditions like slopes.

Uploaded by

Hassan alla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

TheRepubl icofIr

aq
Mini s
tryofeducat
ion
Uni veesi
tyofBasrah
CollegeofEngineering
El
ect
ric
alEngi neeri
ngDepar t
ment
ControlSystemsTechnology

PI
DCont
rol
ler
des
ign,t
uni
ngpar
amet
ers,andsi
mul
ati
onf
or4t
hor
der
plant

‫ﺮ‬
‫ﻴ‬‫ﻣ‬‫ﺍﻷ‬
‫ﺪ‬‫ﺒ‬
‫ﺪﻋ‬‫ﻤ‬
‫ﺃﺣ‬ ‫ﺀ‬
‫ﺎ‬‫ﻴ‬
‫ﺿ‬:‫ﻻﻢ‬
‫ﺍﺳ‬
‫ﺋﻲ‬
‫ﺎ‬‫ـﻣﺴ‬
‫ﻢ‬‫ﻜ‬‫ﺗﺤ‬
I
ntr
oduc
tion
Letusi magine,forexampl e,i nacaront hehi ghway.  
Wewantt odr i
veat
130Km/ hwi t
houthavingt opr esst heaccel er
at or.
 Thecr uisespeedcont r
ol
ofyourcarmustbyi t
selfmai ntainthisspeed.  Whenappr oachingas lope,
thesyst em r
eali
zesthatfort hesamepoweratt hemot orlevel ,itnolonger
reachest he130Km/ hsetpoi ntandwi l
laddal it
tl
eboost .
 Yesbuthow
much?  Andhowl ongwi l
littakef ort hesystem t ostabi l
i
zear oundt heset
point
?
Thisist hewholepr oblem ofensl avementandPI D controlisonewayt o
solveit!
Therear emanyot herexampl esofensl avement sthatuseot hervar iables
fortheirsystem l
ikespeed,angl e,positi
on,t ension. ..Butwhat ever,the
underlyingi
deastayst hesame.  
PIDi st hemostwi delyusedr egulatori
nt hei ndustry. 
Thei deaof​ t

his
supervisorybodyi st oi ntentionall
ymodi fyt he value oft he errort hat
remainsbet weenthesetpoi ntandt hemeasur ementmade.

Now wecandef inePI D contr


ol(orproport
ional
,integr
alandder i
vat
ive
cont
rol
)asitisamet hodofr egul
ati
onoftenusedf orensl
avement.Iti
sa
syst
em capabl
e ofreaching and maint
aini
ng a setpointthankstot he
measurement
sitper
forms.

Forexampl
e,i
nthec
aseofaposi
ti
oncont
rolt
heer
rorwoul
dbe:
ε =Ω 
setpoi
nt -Ω 
measur
ement

Fi
gur
e1:Ensl
avementwi
thPI
D

P,pr
opor
ti
ona
l
I
nthecaseofpr
opor
ti
onalcont
rol
,theer
rori
svi
rt
ual
l
yampl
i
fi
edbya
certai
ngai nconst antthatshoul dbedet ermi neddependingont hesystem.
Set
poi nt(t) =K  p .
ε(t)
Whi chgi vesLapl ace:
Setpoint(s) =K  p .
ε(s)
Thei deai st oincreaset heeffectoft heer r
oront hesystem sothatitreact
s
fastert or efer
ence changes.  The larger 
the value of  
p ,t he l
argerthe
response consume ener gy. 
However ,t he stabili
ty of t
he syst em is
deterioratedandi nt hecaseofan  excessive 
K p t
hesyst em mayeven
diverge.
Ifwet aket heexampl eofadr if
tingcar ,proport
ionalregul
ati
onconsi st
sof
count eri
ngst eerqui cklytorestorethecar .
at
Rot i t
onPosi r
on(
i ad)

Fi
gur
e2:St
epr
esponsewi
thdi
ff
erentKp
Ti
me(
s
)
I
,Int
egr
ate
d
Toproporti
onalcontr
ol,wecanaddt heintegrati
onoftheerr
or. 
Inthi
scase
weobtainPIregulati
on(propor
ti
onalandintegrat
ed).
Theer r
orbetweent hesetpointandt hemeasur ementi
sintegrat
edher e
wit
hr especttot i
me and mul t
ipl
i
ed bya const antwhich mustal so be
det
erminedaccordingtothesystem.
t
Set
poi
nt(
t) =K 
p .
ε(t
) +K 
i τ)
. ε(
  dτ ∫0
Whi
chgi
vesLapl
ace:
ε(s)
Setpoi s
nt()=K  p 
. s
ε()+K  i 
.
s
Whydoweneedt oaddt hi
sfuncti
onal i
tytoourcontrolbody?
Well,duri
ngasi mplepr oporti
onalcheck,t hereremainsast ati
cerror.
 When
thesystem isapproachi ngitssetpoi nt
,theer r
orisnol ongerlar
geenough
tomovet heenginef orward. 
Thei ntegraltermthuscompensat esforthe
stat
ic err
orand t herefore provides a syst em mor e stablei n st
eady
stat
e. 
Thehi gher  
i  
,t hemor et hest ati
cer roriscorrected.Tot akethe
exampleoft hedrift
ingcar ,thei ntegralterm consist
si naddingasmal l
counter-
steeri
ngblowi nordertorecoverpr operl
y.
at
Rot i t
oci
onVel r
y( s)
ad/

Fi
gur
e3:St
epr
esponsewi
thaPIcont
rol
ler
Ti
me(
s
)
D,De
riva
tive
TogetaPIDcheck,west i
llneedt oaddat er
m. Thisconsi
stsofder
ivet
he
er
rorbet
weent hesetpointandt hemeas urementwi t
hrespecttot
imeand
al
somult
ipl
yitbyaconst ant.
t   t
dε()
Set
point(t) =K p .
ε(t) +K  i
  τ)
. ε(
0

dτ +K  d .
dt
Whichgi
vesLaplace:
ε(s)
Setpoi
nt(s)=K  p .
ε(s)+K i 
. +Kd.s
s
Whydoweneedader ivati
vet erm?
Wel l
,PIcont r
olcanl eadt oover shoot i
ngthesetpoint,whichisnotalways
very desirable( exampl e ofr ever se polari
tyint he case ofel ect
ri
c
motors).
 Thet erm der ivat
ivel i
mi tst his.
 Whent hesystem approachesthe
setpoint
,thisterm br eakst hesyst em byappl yi
nganact ionintheopposit
e
dir
ecti
onandt husallowsf ast erstabi l
izati
on.
Sti
llwit
ht heexampl eoft hecar ,theder i
vat
iveter
mr epresent
sthesmal l
l
ocki ntheopposi tedi r
ecti
onofadj ustmenttostabili
zet hecarwheni t
approachest hepointi twant edrej oin.
at
Rot i t
onPosi r
on(
i ad)

Ti
me(
s
)
Fi
gur
e4:St
epr
esponsewi
thPI
Dcont
rol
ler

I
I.
 Ca
lcul
ati
onofc
oef
fi
cie
nts
Wewi l
lnow seehow t ofindtheval ues​t

oassigntothet hreecoeff
ici
ents
(
 K 

,K p , K 
d )ofthePI Dcont r
ol. 
Ther ear
et wowayst odot hi
s,oneby
model
ing,t heotherbyexper imentati
on,knowingthatoftenonecompl etes
t
hefi
rstthroughthes econd.
Model
ingt hesystem consistsi
ndet ermini
ngit
sbehaviorbycal cul
ati
onand
f
rom t
her ededucingpl ausibl
evalues​ f

orthecoeff
ici
ents. 
Theexper i
enti
al
appr
oachmeansthatwewi l
lusearealr
esponsef
rom t
hesyst
em t
ofi
rst
adj
ustr
oughl
ythenf
inel
ythecoef
fi
ci
ent
s.

Mode
linga
ppr
oac
h:
Thechoi cet oproceedwiththemodel ingofthesystem ornotisdictat
edby
theinherentconstrai
ntstothesystem.  
Oftenthecompl exi
tyofrealsyst
ems
putsmodel i
ngoutofr each,butinsomecases,i nchemi str
yormechani cs
forexampl e,ther ul
esthatgovernthesy st
em ar esimpleenought hatwe
canat t
emptt omodelt hesyst em. 
Ont heotherhand,i tmaybeonl yin
cases wher et he syst
em i s part
icular
ly cri
ti
calordi f
fi
cul
tt o access
(i
ndus t
ri
alpr ocessheavy,system whichcannotbet akenoutofser vi
ce),i
t
i
sessent ialtomodelthesystem inordert ohaveasuf f
ici
entl
yprecisesetof
coeff
ici
ent stoimmediatel
yobtainaPI Dr egul
atorwhichisfunct
ional.

Her
ewegi veanexampleofmodel
ingasimplesystem:theelect
ri
cmot
or.
Ast
heequationsofdynami
csandelect
romagnet
ism areknownandusabl
e,
wecandeterminet
heequati
onst
hatgovernthesystem.
Her
earetheequati
ons:

Fi
gur
e5:Mot
orf
unct
ionalschemat
ic

Symbol Par
amet
er Uni
t

J momentofi
ner
ti
aof kg.
m^2
t
herot
or

b motorvi
scous N.
m.s
f
ri
cti
onconst
ant

Ke el
ect
romotivef
orce V/
rad/
sec
const
ant

Kt motort
orque N.
m/Amp
constant
R el
ect
ri
cresi
stance Ohm

L el
ect
ri
cinduct
ance H

1 b
s2.
Θ(s)= .
KtI
(s)-.
s. s)
Θ(
J J

b 1
s)
Θ( ( J)
s = Kt.
.s2 + .
J
I(
s)

Kt
s)= 2
Θ( .
I(
s)
s +b.
J. s

-
R 1 Ke
s.
Is)= .
( (
Is)+ .
V(s)- .
s.Θ(
s)
L L L

R 1 Ke
(
I ( )
s)
.s + = .
L L
V(s)- .
L
s.Θ(
s)

1 Ke
(
Is)= V(
. s)+ 2 .
Θ(s)
L.
s +R L.
s +R.s

Kt 1 Kt Ke
s)= 2
Θ( . .
V(s)+ 2 . 2 .
Θ(s)
J.
s +b.sL.s +R J.
s +b.sL.
s +R.s

Tr
ansf
erf
unct
ioni
s

s)
Ω( K rad
= [ ]
V(
s) (
J.s +b)
.(
L.s +R)+K2 s.V

Wede
duc
efr
omt
hist
het
rans
ferf
unc
ti
onoft
hes
yst
em:
s)
Ω( A
=
s)
V( 2ξ 1 2
1+ . s
s+ 2.
ω0 ω 0
1
Wi
thA = staticgain
Ke
ξ=R J Dampi ngf
act
or
2 KtKeL

ω0 = KeKt Pur
epul
se
LJ

From thi
s,wecandeducethetr
ansferf
uncti
onoftheslavesystem and
ther
eforetheval
ues​t
oassi
gntothecoeff
i
cient
stoobtainananswert hat
sati
sfi
esus.
Thepur poseoft
hisexampl
eistoshowhowasi mplesystem governedby
equati
onssimpl
eli
neardi
ff
erent
ial
s,gi
vesri
setocomplexvalues​
fort
he
coef
fi
cient
s. 
Wecanthusjust
if
ythepract
i
cali
nter
estoftheexperi
mental
method.

Expe
rime
nta
lappr
oac
h
Herewepr esentt wopossibl
eappr oachesf ordet er
mini ngcoefficient
sby
experience.
Mention:onemet hodwit
ht heuseoft hePI Dregul at
orandt heot herwhi ch
doesnotusei t
.
Weal soi ndicatetheadvantagesanddi sadvantagesoft heset womet hods.
Theexi stenceoft hesecondmet hodi sjust
if
iedbyt hef actthatincer t
ain
contr
ollerstheval ues​
ofthecoeff
ici
entscannotbemodi fied,thisi
st hecase
i
fforexampl et hecontr
olleri
sanel ectroni
ccircuitandt hecoef f
icientsare
deter
mi nedbyt hecomponent s(
resist
ors,capacitors)
.

1.Zi
egl
er-
Nic
hol
sappr
oac
hforc
los
edl
oops
yst
ems(
alr
eadyr
egul
ate
d)

St
abl
eosci
ll
ati
ons
Fi
gur
e6:Obt
aini
ngst
abl
eosci
ll
ati
onsbyexper
iment
ingwi
thdi
ff
erentcoef
fi
cient
s

Coe
ffi
ci
entva
lue
s:
Wenote: 
K u =K p 
osci
ll
ati
ons ,
 P u =Per i
odofosci
l
lat
ions
Ku Pu P 
u
Thenchoose 
K p = ,  
K i
 = ,  K d = .
1.
7 2 8
Thesevalues​
f

ort
hecoef
fi
cient
sar
ethosethatZi
egl
erandNichol
sfound
t
oal l
ow dampi
ngt
heampli
tudeoft
heoscil
l
ati
onsby1/4ateachpseudo-
peri
od.

Be
nef
it
s

 Themet hodiseasytoimplementphysical
lyandf r
om acal cul
ati
on
pointofview
Itcan be appl i
ed to a syst
em al r
eady i
n product
ion and all
ows
automaticadapt
ati
onofther egulat
ortoadaptt
ochangesi nint
ernal
(wear)andexter
nalparameters(envi
ronment
)tothesystem.

Di
sadva
nta
ges

 Thesyst em maybecomeunst ableorgoi ntodangerousstates(f


or
examplef orchemicalsyst
ems)
 Themet hodmayt akeal ongt i
mei ft
hesyst em react
sverys l
owly
(days,weeki nthecaseofcertainchemicalreacti
ons)
For
tunat
ely,manys ystemshave l ow character
isti
ct i
mes( el
ect
roni
cor
mechanical
).
Pr
otoc
ol:
 Appl
yat
imes
lott
othes
yst
ema
ndr
ecor
dit
sre
spons
e.

Fi
gur
e7:St
udyoft
hesyst
em r
esponset
oani
che
Assumi
ng:
X0 τ
K0 = .
M0τdelay
Wet
henhave:
 K 
p =1.
2 *K 
0 ,
 K 
i =2.τdelay 
and 
K d =0.
5 *τdelay

Be
nef
it
s

 Thi
smet hoddoesnotr
equi
rehavi
ngasyst
em al
readysl
aved,nor
guessi
ngavaluef
orK 
p

Di
sadva
nta
ges

I
tr equi
resmor emat er
ial
:recordi
ngofaresponsecur
ve.
I
tf or
cest oputthesystem "of
fl
ine"
I
ft he system response istoo dif
fer
entfr
om the response shown
above,t hismet hodgivesvalueswhi chmaynotbesui tabl
eatal l
(somesyst emsf orexampledonotar enotatallcontrol
l
ablebyPI D
regulat
ors).

Conc
lus
ion

Theexper i
ment almet hodspr esentedaboveal low goodest imatest obe
made.Gener i
cf orareasonabl ysimplesy st
em ( i
econt r
oll
abl ebyaPI D!).
However ,itisver yof tennecessar yt of i
ne-tunet hecoef f
ici
entsunt ila
system is obtained.r especting the specif
icati
ons. Forthis we use t he
fol
lowi
ngr ules:
I f
 K p 
increasest hent hecl i
mbwi l
lbef asterbutt herewi l
lbemor e
overshoot
I f
 K i
 i
ncreasest hent her i
sewi l
lbef asterandt hest ati
cer rorwi l
lbe
l
owerbutt hesteadyst atewillt
akelongert oreach
I f
 K d 
increasest hent heover shootwi l
ldecreaseandt het i
mef or
establi
shingsteadyst atealso,butthesensi ti
vi
tytonoi sewi l
lincrease.
Othermet hods( notaddr essed):I
nternalModelCont r
ol,Nasl i
nMet hod

II
I.
 Li
mitsa
ndimprove
ments
Aswesawear li
er,aPIDservocanincl
udeacer
tai
nnumberofl
imi
tswhi
ch,
i
fnottakenint
oaccount,cani
mpairthepr
operf
unct
ioni
ngoft
hesyst
em or
evendamagei t
.
4thor
derpl
ante
xampl
e

Lett
het
ransf
erf
unct
i
onbel
owi
sourpl
ant

Bui
l
dingamodelonSi
mul
i
nkwi
tht
hist
ransf
erf
unct
ion

Wi
thoutPI
Dcont
rol
l
ert
her
esponsehasasi
gni
fi
cantval
ueoft
ransi
ntanda
st
eadyerror(
theoutputi
sles
sthan0.
6fr
om i
nput
),butwi
thPcot
rol
l
ee
we'
llr
eli
zethedif
fence.

I
nor
dertofi
ndtheval
ueofPI
Dpar
amet er
sweshal
lusethef
oll
owi
ngt
abl
e
PIDtype Kp Ti Td
P 0.
5Kcr Inf
init
e 0
PI 0.
45Kcr Pcr/1. 2 0
PID 0.
6Kcr 0.5Pcr 0.125Pcr
Byusi
ngMATLAPwesckuchRootl
ocust
ofi
ndKcr=63.
1asshown
bel
l
ow

Tof i
ndPcr ,f
ir
stl
ywetakeKcrasagaint
othesyst
em andpysimulinkt
o
f
indcr i
ti
calperi
odti
me=3.148sec,t
henwefi
ndPcr=( 2*
pi)
/(
3.148)=
1.99719r ad/
s
WhenweuseaPcont
rol
l
erweshal
lfol
l
owt
hef
ir
str
owi
nthet
abl
eKp=
0.
5*Kcr
,andP=Kp

Fi
gurebell
owshowst heresponse,andtheadvant
geofusi
ngPcont r
oll
er,
howitdecr
easesthetimeoftransi
nt,andmakethest
eadyresponsehi
gher
(about0.
65from i
nput).
Togetmoradvant
ageofourcont
rol
l
er,we'
l
laddanot
herpar
amet
er,by
usi
nganint
egrat
edproper
ty.

Byusi
ngt hesecondrowofthepar
ameterstablwe'
llgetKp=0.45*
Kcr
,
and
P=Kp=28. 395
Ti=Pcr/1.
2=1. 66374
I=Kp/Ti=17.07174
Wit
hthisparametesther
esponsei
nthefoll
owingfi
gurewil
lappear
s

Wit
hthi
scontr
oll
erwerel
i
zethatt
heti
meoft
ransi
nti
sdecr
easedandt
he
st
eadyst
atbecomesneartot
heinput
.
Togetanext
r aadvant
ageofthecont
rol
l
er,anot
herpar
ameterwi
l
ladded,i
t
i
sthederi
vat
iveparameter
,andthecont
rol
lerwi
l
lbeaPID,asshown
bel
low

Tocalculat
et hevaluesoft
hiscont
rol
l
erweuset
hwthir
drowoft
het
abl
eto
fi
ndthatKp=0. 6*
Kcr
P=Kp=37. 86
Ti=0.5*Pcr=0. 99796
Td=0. 125*Pcr=0. 24949
I=Kp/Ti=37937
D=Kp*Td=9. 44573
Thenther esponsewi l
lbeasshowninfol
l
owi
ngf
igur
e
Concl
usi
on

ThePI Dcont rolsyst em i st odayoneoft hemostusedcont rolsystemsf or


manyr easons.Fi r
stly,i tisver ysimplet osetupandi seffectiveformost
par tofrealsyst ems.I naddi tion,thecal culati
onoft hecoef fi
cientsleaves
thechoi cebet weensever almet hodsofi ncreasingdi ffi
culty.Ont heone
hand,anexper i
ment almet hodandver yeasyt osetupal l
owsqui ckly
obtaincor rectcoef ficientsf orsyst emst hatdonotr equi r
ever ylargedetai l
s
i
nt heser vo.Ont heot herhand,advancedmat hemat i
calmet hodsof fer
techniquesf orobt aini ngt hei dealcoef fi
cientsforapar t
icularsyst em.So
theset ti
ngpl aceofaPI D ser voper hapsbot hf astandef f
icientandal low
optimizationcoef fi
cient sf ort hemostadvancedsyst ems.However ,iti s
i
mpor t
antt onot et hatt hist ypeofser vo- controlisl imi t
edbyanumberof
const r
aints.
First,itmayt urnouti neffec t
ivef orcer tainsyst emswhi chcont ai
nnoi se
(Der i
vati
vecoef f
ici
ent )orwhi char enotl i
near( thePI Dser vobei nglinear,
thenon- li
near ityofasyst em l eadst oinstablesyst em) .Finally,iti
spossi ble
toopt i
mi zet her esponseofasyst em bymul t
iplyingt hecont rols(li
kef or
exampl et hedoubl ePI D ser vo).I ti
sf oral lt
heser easonst hatthismodel
servor emai nst hemostusedi nt heindust rytoday.

Re
fer
enc
es
Moder
nCont
rolSyst
ems:byRi
char
dC.Dor
f&Rober
tH.Bi
shop

Moder
nCont
rolEngi
neer
ing:byKasuhi
koOgat
a

Autonomousrobotcontrolandservo
ht
tp://
clube
lek.
insa
-lyon.f
r/j
oomla/fr/
bas
e_de
_conna
iss
anc
es/
inf
orma
ti
que
/
se
rvo_and_pil
oti
ng_of_robot_a
uto.php

PI
Dus edi
npos i
ti
onand/orspeedre
gulati
onofe l
ect
ri
cmot
ors
,Chr
ist
opheLeLa
nn2007,
ht
tp:/
/www.t
otofweb.
net
/pr
ojet
s/
pid/
rappor
t.pdf

Pr
a c
ti
calPr
ocessContent
ht
tp://
www.contr
olgur
u.c
om/
wp/
p76
.ht
ml

You might also like