TELKOM
NIKA Indonesia
n
Journal of
Electrical En
gineering
Vol. 14, No. 2, May 2015, pp. 293 ~ 29
7
DOI: 10.115
9
1
/telkomni
ka.
v
14i2.767
4
293
Re
cei
v
ed Fe
brua
ry 18, 20
15; Re
vised
Ap
ril 12, 201
5; Acce
pted
April 25, 201
5
The Design and Simulation of Fuzzy PID Parameter
Self-tuning Controller
Wei Xie
*
1,2
, Jianmin Duan
1
1
Beijin
g Ke
y L
a
borator
y of T
r
affic Engine
erin
g, Beiji
ng Un
iv
ersit
y
of T
e
chn
o
lo
g
y
, Be
iji
ng 1
001
24, Ch
ina
2
Beijin
g Pol
y
te
chnic, Bei
jin
g 1
001
76, Ch
ina
*Corres
p
o
ndi
n
g
author, e-ma
i
l
: xie
w
_
b
j
@
hot
mail.com
A
b
st
r
a
ct
Based o
n
p
a
rameter self-tu
n
in
g
fu
zz
y
PI
D contro
l
l
er, a
fu
zz
y
infer
e
n
c
e method
is utili
z
e
d
t
o
reali
z
e
a
u
to
ma
tic regu
latin
g
PID para
m
eter
, and th
e ap
p
l
i
c
ation of
the
control
l
er
i
n
a
system is st
udi
e
d
with MATLAB in this
paper
. The co
m
b
ination
of PID controller syst
em
and fu
z
z
y
controller sys
tem
combi
nes the
conveni
enc
e
of PID c
ontr
o
l tog
e
ther w
i
t
h the flexi
b
il
it
y of fu
zz
y
co
ntrol, an
d tak
e
s
adva
n
tag
e
of t
he tra
d
itio
na
l
control,
w
h
ic
h has a
gr
eat pr
actical
sig
n
if
ic
ance. T
h
e r
e
s
u
lts of
si
mul
a
tio
n
show
that fu
zzy PID para
m
eter self
-tun
ing
c
ontrol
l
er
has
a better c
ontro
l effect than th
e traditi
on
al o
n
e
,
and ca
n
i
m
pro
v
e the static an
d dyna
mi
c pro
perties of the s
ystem w
e
ll.
Ke
y
w
ords
: self-tuning, fu
z
z
y
PID, Matlab, sim
u
lation
Copy
right
©
2015 In
stitu
t
e o
f
Ad
van
ced
En
g
i
n
eerin
g and
Scien
ce. All
rig
h
t
s reser
ve
d
.
1. Introduc
tion
Due to its
si
mple algo
rith
m, good cont
rol effe
ct an
d
high reli
ability, fuzzy PID controlle
r
is
widely
use
d
in th
e
syste
m
of p
r
o
c
e
s
s
control,
e
s
pe
cially in
the
n
online
a
r
syst
em. In p
r
od
uction
field, the co
nventional m
e
thod of fu
zzy PID
pa
ra
meter can
fu
nction well o
n
the
op
erating
con
d
ition attributing to its complex me
thod,
bad pa
ramete
rs a
n
d
perform
an
ce
on automati
c
tuning. A
s
o
n
e
of th
e mo
st
advan
ce
d
co
ntrol
system
nowaday
s, th
e meth
od
of fuzzy infe
ren
c
e
applie
d in this pap
er n
o
t only kee
p
s t
he sim
p
le pri
n
cipl
e and g
ood control effect, but also
posse
sse
s
a better flexibility and ability
for co
ntrolli
ng
the accuracy
[1].
The system
stru
cture
of p
a
ram
e
ter
self
-tuning
fuzzy
PID Controll
er m
a
inly
co
nsi
s
ts
o
f
two p
a
rts a
s
the a
d
justa
b
le p
a
ram
e
te
r PID
and
fu
zzy
co
ntrol
system, and
i
t
s st
ru
cture
as
Figure 1.
Figure 1. Self-tuning fu
zzy
PID controller
PID controller was
used
t
o
control
syst
em, and fuzzy infe
rence system
uses
error e(t)
and e
r
ror rat
e
e
c
(t)
as inp
u
t, a fuzzy inf
e
ren
c
e
meth
od i
s
utilized
to reali
z
e
aut
omatic
re
gula
t
ing
PID param
eter ,
K
P
、
K
I
、
K
D
to satisfy
different dem
and
s of c
ontroller. Fuzzy control sy
stem
is
not very different fro
m
traditional
con
t
rol system
i
n
stru
cture, the major dif
f
eren
ce is th
at
controlle
r u
s
e
s
fuzzy
controller, a
nd it a
dopts
a g
r
ou
p of fuzzy co
nditional to
d
e
scrib
e
the v
a
rie
s
of the relationshi
p betwee
n
input and o
u
tput [2].
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 14, No. 2, May 2015 : 293 – 297
294
2. The Desig
n
of Fuzz
y
PID Parame
ter
Self-tunin
g
Con
t
roller
2.1. The Stru
cture o
f
Fu
zz
y
Control Sy
stem
The co
nst
r
u
c
tion of fuzzy P
I
D para
m
eter
self-t
uni
ng co
ntrolle
r syste
m
mainly con
s
ist
s
of
two part
s
: a
d
justa
b
le pa
rameter PID
control sy
ste
m
and fuzzy
control
syst
em, as shown in
Figur
e 1. In
the
system, b
y
taking
er
ro
r
and
er
ro
r rat
e
of cha
nge
as
i
nput,
the
method of
fu
zzy
inferen
c
e
ca
n be used to make o
n
li
ne self-tu
n
in
g of PID paramete
r
K
P
,
K
D
and
K
I
[
3
].
Acco
rdi
ngly, the static a
nd
dynam
ic p
e
rf
orma
nce of the controlled o
b
ject can be i
m
prove
d
well
.
2.2. The Parameter Self-tuning Rules
of PID Con
t
r
o
ller
Usually, the control eq
uatio
n of PID controller is:
U
(
k
)=
K
P
E
(
k
)+
K
I
Σ
E
(
k
) +
K
D
EC
(
k
)
(
1
)
In the equ
atio
n,
Σ
E(
k)
=
E
(
k
)+
E(k
-
l)
and EC
(k
)=
E(k
)
-
E
(k-
l
)
(k=0, 1, 2
)
are th
e deviat
i
on of
input va
riabl
e an
d th
e d
e
viation of
chang
e
re
spe
c
tively.
K
P
,
K
D
,
K
I
are
para
m
eters that
cha
r
a
c
teri
ze t
he pro
p
o
r
tion
, integral
and
differential rol
e
respe
c
tively [4].
Acco
rdi
ng to
the impa
ct of
the pa
ramet
e
rs, th
e self-t
uning
prin
cipl
es of th
e pa
rameters
K
P
,
K
D
and
K
I
can be
cha
n
ged in the co
ntrolled p
r
o
c
e
ss of
the sy
stem in the different situ
atio
n:
a) When the
deviation is
large,
K
P
an
d
K
I
should
be increa
se
d
to make the
system
steadi
er. At t
he
same
time
, con
s
id
erin
g
syst
em’
s
ca
p
a
city
of re
sisti
ng
di
sturban
ce,
K
D
sh
ould
be
cho
s
e
n
p
r
op
erly to avoi
d
output
s resp
onse o
scill
ating ne
ar the
set p
o
int. Th
e pri
n
ci
ple i
s
as
follows: when
the deviation chang
e is small,
K
D
should be relativel
y
bigger; whe
n
the chan
ge
is
big,
K
D
shoul
d be small
e
r;
usu
a
lly,
K
D
should be of mi
ddle si
ze.
b)
Wh
en th
e
deviation
and
deviation
rate of
cha
nge
i
s
of
middl
e
si
ze,
K
P
should be sm
all
to redu
ce the
overshoot of system respo
n
se, an
d assure certai
n re
spo
n
se sp
ee
d.
c)
Wh
en the
deviation i
s
b
i
g,
K
P
and
K
D
sho
u
ld be chosen
to accelerate
the system’s
respon
se
spe
ed, and avoid
the over differential a
nd control fun
c
tio
n
prob
ably ca
use
d
by insta
n
t
enlargem
ent of deviation i
n
the begi
nni
ng. In additi
o
n
, in orde
r to
avoid integral satu
ration
and
the system re
spo
n
se’s ove
r
sh
oot,
K
I
s
h
ould be s
m
all, us
ually s
h
ould be z
e
ro [4].
2.3. Ensuring Membersh
ip Function
of Each Vari
able
As
re
quired, fuzzy cont
roll
er which
u
s
e
d
to
pa
ramet
e
r a
d
justm
e
n
t
of PID use
s
form of
two input
s a
nd three o
u
t
puts. Inputs
of the contro
l
l
er are error
e(t) an
d erro
r rate e
c
(t),
and
outputs a
r
e
△
K
P
△
K
I
△
K
D
which a
r
e re
vised by thre
e param
eter
s of PID controller a
s
P, I,
D.
fuzzy sub
s
et of
inputs as E
and
EC an
d
output
s
a
s
△
K
P
△
K
I
△
K
D
is {
NB,NM,NS,ZO,PS,PM,
P
B
}
[5] .The domain is [-6,6] , quanti
z
ation l
e
vels are{
-6
, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4
,
5, 6}.
Figure 2. The
membershi
p
degree fun
c
tion of
E and EC
Figure 3. The
membershi
p
degree fun
c
tion of
△
K
P
△
K
I
and
△
K
D
In the fuzzy logic tool
box of the memb
ership
fun
c
tio
n
editor, gau
ssmf is sel
e
cted by
membe
r
ship f
unctio
n
s
of in
put as E, EC
and trimf
i
s
selecte
d
by m
e
mbe
r
ship fu
nction
s of
out
put
as
△
K
P
△
K
I
△
K
D
, as Figure
2 and Figu
re
3 sho
w
n.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
The De
sig
n
a
nd Sim
u
lation of Fuzzy PID Pa
ram
e
ter Self-tuning
Co
ntrolle
r (W
ei Xie)
295
2.4. Build Fuzzy
Rules Charts
The
cente
r
of
fuzzy
cont
rol
is to buil
d
proper fu
zzy rul
e
s
cha
r
t ba
se
d on the
su
m
m
ary of
desi
gne
rs’
kn
owle
dge a
n
d
operating ex
perie
nce.
According to th
e PID param
eter adj
ustm
ent
prin
ciple
s
ab
ove, we ca
n get the cont
ro
l rules of
△
K
P
△
K
I
and
△
K
D
, as sh
own in Table 1 [6].
Combi
ne the
s
e thre
e table
s
above a
nd
we can get th
e 49 fuzzy co
ntrol rul
e
s a
s
follows:
1. If
()
E is NB
and (E
C is
NB) then
(
K
P
is
PB) (
K
I
is
NB) (
K
D
is
PS
)
(2)
2. If
()
E is NB
and (E
C is
NM) the
n
(
K
P
is
PB) (
K
I
is NB) (
K
D
is
NS)
(3)
3. If
()
E is NB
and (E
C is
NS) then
(
K
P
is PM) (
K
I
is NM) (
K
D
is
NB)
(4)
……
49. If
()
E is PB
and (EC i
s
PB) then (
K
P
is NB) (
K
I
is
PB) (KD is
P
B
)
(50)
Table 1. The
Control Rul
e
s of
△
K
P
△
K
I
an
d
△
K
D
Run fu
zzy fu
nction in MA
TLAB comm
and wi
ndo
w to enter the fuzzy logic e
d
i
tor, and
cre
a
te a n
e
w FIS file, choosin
g the con
t
rol type
as
Mamda
n
i. According to th
e analy
s
is a
b
ove,
by inputting the memb
ership deg
re
e functi
on a
nd q
uantizi
ng inte
rvals of E, EC,
△
K
P
,
△
K
I
and
△
K
D
respe
c
ti
vely, the figure of membersh
ip deg
ree fu
nction
can b
e
achieve
d
.
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 14, No. 2, May 2015 : 293 – 297
296
3. The Appli
cation an
d Simulation of Fuzz
y
PID Control Sy
stem
3.1. Build th
e Simulation Block Diag
r
a
m of the Sy
stem Stru
ctu
r
e
The
simul
a
tio
n
blo
c
k
diag
ram d
e
si
gned
acco
rdi
ng to
Figu
re
1 i
n
MATLAB’s Si
mulink
environ
ment
is as
sh
own in Figur
e 4. In the diag
ra
m, fuzzy con
t
roller a
nd its packag
e
is
as
sho
w
n i
n
Fig
u
re
5. Ke an
d Kec
are
fuzzificatio
n fact
ors,
and K1,
K2 and K3
are defu
zzifi
cati
on
factors. PID
controlle
r a
nd i
t
s pa
ckage i
s
as
sho
w
n
in
Figure 6.
K
P0
,
K
I0
,
K
D0
are their
start valu
e.
By conn
ectin
g
fuzzy controller
with PID co
ntrolle
r, th
e fuzzy-PID
controlle
r
can
be a
c
qui
re
d, as
s
h
ow
n
in
F
i
gu
r
e
7
.
Figure 4. The
simulation bl
ock diag
ram
of Fuzzy PID control syste
m
Figure 5. Fuzzy cont
rolle
r and its pa
cka
g
e
Figure 6. PID controll
er a
n
d
its packa
ge
Figure 7. Fuzzy self-tu
n
ing
PID Controll
er and its p
a
ckag
e
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
The De
sig
n
a
nd Sim
u
lation of Fuzzy PID Pa
ram
e
ter Self-tuning
Co
ntrolle
r (W
ei Xie)
297
3.2. Results and An
aly
s
e
s
of the Exp
e
riment
The G
(
s) of
the mathe
m
atical m
o
d
e
l of the si
mulation o
b
j
e
ct eq
ual
s 2
/
(s
2
+3s+
1)
,
Ke=Ke
c
=0.01
;
K1=0.5, K2=K3=0.01; an
d
K
P0
=20,
K
I0
=1.35 a
nd
K
D0
=3.7. The sa
mpling pe
rio
d
is
T=0.0
1
s. The
control
cu
rve
line of fu
zzy PID is as
sho
w
n in Figu
re
8.
Figure 8. Simulation curve
line
4. Conclusio
n
We
can o
b
viously see tha
t
fuzzy-PID
controlle
r sy
stem ha
s a bet
ter co
ntrol eff
e
ct than
traditional
sy
stem, an
d we ca
n ea
sily
simulate
the system by
using
Matlab, which ca
n
g
r
e
a
tly
help u
s
to revise the contro
l rules.
Ackn
o
w
l
e
dg
ements
The resea
r
ch wo
rk was
sup
porte
d by
gene
ral
pro
g
ram
of scie
nce
and
technolo
g
y
developm
ent proje
c
t of Beijing Muni
cipal
E
ducation Commissio
n under g
r
ant K
M
2015
108
58
004
and key prog
ram of Beijing Polytechni
c u
nder g
r
a
n
t YZKB20140
08.
Referen
ces
[1]
Pan Yon
gpi
ng
, W
ang Qinruo. Desig
n
of Adaptiv
e F
u
zzy-PID Co
ntroll
er
w
i
t
h
Varia
b
l
e Univ
erse
.
Electrical Autom
a
tion
. 20
07;
29(3): 9-2
5
.
[2]
Gao Ju
n-sh
an,
Mu
Xia
o
-gu
a
ng, Ya
ng
Ji
a-xian
g. PID c
ont
roller
b
aes
d o
n
GA
and
n
e
u
r
al
net
w
o
rk
.
Electric Mach
in
es and C
ontro
l
. 2004; 8(2): 1
0
8
-11
1
.
[3]
Xu
e
Din
g-
yu,
Ch
en Y
a
n
g
-
qua
n. S
y
ste
m
simul
a
tio
n
techn
o
lo
g
y
and
ap
pl
icatio
n b
a
sed
o
n
Matlab/Sim
u
li
n
k
. Beijin
g: T
s
in
ghu
a Press. 20
03.
[4]
W
ang Li-
x
in. A Cours
e
in F
u
zz
y S
y
stem & Co
ntrol. Beij
ing: T
s
ing
hua Pr
ess. 2003.
[5]
Yin Y
un-h
ua, F
an S
hui-k
an
g, Che
n
Mi
n-e. T
he
des
i
gn
an
d
simulati
on
of a
daptiv
e fuzz
y
PID contro
lle
r
.
Fire control and
command control
. 200
8; 33(
7): 96-99.
[6]
Pan T
i
an-hong, Li S
hao-
y
uan. Adaptiv
e PID cont
rol for
nonlinear
s
y
stem
s
bas
ed on
laz
y
learning.
Contro
l T
heory
and App
lic
atio
ns
. 2009; 2
6
(1
0): 1180-
11
84.
Evaluation Warning : The document was created with Spire.PDF for Python.