Content uploaded by Prof. Hassan Kazemian
Author content
All content in this area was uploaded by Prof. Hassan Kazemian on Aug 04, 2014
Content may be subject to copyright.
Intelligent Fuzzy PID Controller
Prof. H. Kazemian, PhD, SMIEEE,
Computing, Communications Technology s and Mathematics Department,
London Metropolitan University,
100 Minories, London EC3N 1JY,
England, UK.
TEL: ++44-20-7320 3109.
FAX:++44-20-7320 1717.
email: h.kazemian@londonmet.ac.uk
Abstract
This article aims to describe the development and two tuning methods
for a self-organising fuzzy PID controller. Before application of fuzzy logic,
the PID gains are tuned by conventional tuning methods. In the first tun-
ing method, fuzzy logic at the supervisory level readjusts the three PID
gains during the system operation. In the second tuning method fuzzy
logic only readjusts the values of the proportional PID gain, and the
corresponding integral and derivative gains are readjusted using Ziegler-
Nichols tuning method while the system is in operation. For the composi-
tional rule of inferences in the fuzzy PID and the self-organising fuzzy PID
schemes two new approaches are introduced: the Min implication function
with the Mean of Maxima defuzzification method, and the Max-product
implication function with the Centre of Gravity defuzzification method.
The self-organising fuzzy PID controller, the fuzzy PID controller and the
PID controller are all applied to a non-linear revolute-joint robot-arm for
step input and path tracking experiments using computer simulation. For
the step input and path tracking experiments, the novel self-organising
fuzzy PID controller produces a better output response than the fuzzy
PID controller; and in turn both controllers produce better process out-
put that the PID controller.
Keywords: Fuzzy controller, fuzzy PID controller, self-organising
fuzzy PID controller, implication function, defuzzification method
1 Introduction
The Proportional Integral Derivative (PID) controller is one of the most pop-
ular controllers in industrial applications. However, the PID controller has a
sub-optimal performance in the industrial processes. There have been many
attempts in the past to develop control techniques and algorithms to tune the
PID gains KP, KI and KD [1]-[3]. These control techniques and algorithms are
largely inadequate for tuning the gains of the PID controllers, for non-linear
systems. Some of the techniques and algorithms used to tune the PID gains
demonstrate that further retuning is necessary by a skilled human operator
1
during the application of the controller to a process. The fuzzy controllers have
been applied to industrial processes with some degree of success [4]-[6], where
the rule buffer codifies the experience of a skilled human operator. As a result
of fuzzy controllers’ successes, the fuzzy PID controllers have been studied in
last decade [7]-[14]. Furthermore, the applications of autonomous or intelligent
fuzzy PID controllers have been recently gathering momentum and many re-
searchers have worked in the areas of self-tuning fuzzy PID controllers. For
example self-tuning fuzzy PID have been applied to load and frequency control
in energy conversion and management [15], heating, ventilating and air condi-
tioning plant [16], and programmable logic controllers [17], to name a few. This
article takes the fuzzy PID controller and the self-tuning fuzzy PID controller
research further by developing a novel self-organising fuzzy PID controller.
The self-organising fuzzy PID controller is a learning controller. The rule
production and modification of the self-organising fuzzy PID controller generates
its own control rule strategies, and deposits the new rules in the rule buffer. The
rules are produced and updated constantly in the rule buffer during the system
operation, according to the new experience encountered both at the setpoint
and from the process under control. For the self-organising fuzzy PID con-
troller, the step input and path tracking trajectories are applied to a non-linear
revolute-joint robot-arm, with presence of noise and time variant dynamics. The
revolute-joint robot-arm is used as a test bed to study the behaviour of the self-
organising fuzzy PID controller for dynamic system applications. The results of
the computer simulation experiments for the self-organising fuzzy PID controller
are compared with the fuzzy PID controller and the PID controller, to evaluate
the suitability of the self-organising fuzzy PID controller for dynamic system
applications and also obtain some information about the tuning procedure. In
order to have measurements of the performances of the self-organising fuzzy
PID controller, the fuzzy PID controller and the PID controller, the Integral of
the Absolute magnitude of the Error (IAE) criterion is used. The performance
index IAE is particularly useful for computer simulation studies.
Section 2 describes the fuzzy PID controller and the self-organising fuzzy
PID controller. Section 3, describes the applications of the controllers to a non-
linear revolute-joint robot-arm. Section 4 is the computer simulation results for
the step input and the path tracking trajectories. Section 5 is the conclusion.
2 The development of self-organizing fuzzy PID
controller
In Figure 1, the general structure of the fuzzy controller is derived from the
general structure of the PID controller. Assilian in 1974 defined the fuzzy con-
troller’s inputs as the error and the change of error, and the output as an incre-
mental one, similar to the PID controller [18]. The fuzzy section of the fuzzy
controller from Figure 1 is used for the fuzzy PID controller, as shown in Figure
2. The fuzzy section of the fuzzy PID controller comprises of the fuzzifier, the
rule buffer, the fuzzy control and the defuzzifier blocks. The remaining blocks
of the fuzzy PID controller of Figure 2 are the PID gains and the revolute-joint
2
Figure 1: The fuzzy controller
Figure 2: The fuzzy PID controller
3
Figure 3: Membership function against universe of discourse
robot-arm. The gains of the fuzzy PID controller are initially tuned using a con-
ventional tuning technique. The fuzzy section has a supervisory role to readjust
the gains of the PID controller during the system operation.
Table 1: Membership matrix
Quantized levels / Universe of Discourse
Linguistic
Sets −4−3−2−1 0 1 2 3 4
PL 0 0 0 0 0 0 0.3 0.7 1.0
PS 0 0 0 0 0.3 0.7 1.0 0.7 0
ZE 0 0 0.3 0.7 1.0 0.7 0 0 0
NS 0.3 0.7 1.0 0.7 0 0 0 0 0
NL 1.0 0.7 0 0 0 0 0 0 0
Membership Function
In Figure 2, the fuzzifier block fuzzifies the error and the change of error.
Scaling and quantisation constitute the fuzzification of the error and the change
of error. The values of scaling factor are obtained by trial and error during the
tuning of the controller. The scaling factor for the error is shown as ESF and
for the change of error is presented as CES F . Quantisation of the error and
the change of error require all the fuzzified values to remain within a certain
range. In the experiments presented in this work, the range is from Negative
Large to Positive Large. In Figure 3, the linguistic codes for this range are:
Negative Large (NL) = −4 or −3, Negative Small (NS) = −2 or −1, Zero (ZE)
= 0, Positive Small (PS) = +1 or +2, Positive Large (PL) = +3 or +4. In
the fuzzy control block, the fuzzified error, the fuzzified change of error and the
rules from the rule buffer block produce an output using the compositional rule
of inference [19]. An implication function and a defuzzification method consti-
tute the compositional rule of inference. There are many types of implication
functions and defuzzification methods. However, in the experiments carried out
for the novel self-organising fuzzy PID controller, the Min implication function
with the Mean of Maxima defuzzification method and the Max-product im-
plication function with the Centre of Gravity defuzzification method produced
better results for the process output. The Min implication function [20] with
the Mean of Maxima defuzzification method are shown by equations (1) and (2)
4
respectively:
uR(x, y) = uA(x)∩uB(y).(1)
uP i = [UP i(max)+UP i(max−1)]/2.(2)
where a fuzzy subset Awith elements xhas a membership function of uA(x),
within a range of 0 to 1, see the membership matrix Table 1. Equally, a fuzzy
subset Bwith elements yhas a membership function of uB(y). uR(x, y) is the
resultant of the Min implication function. The Mean of Maxima is defined [21],
by taking an average between two elements in the universe of discourse, which
correspond to two largest values of the membership functions. The universe of
discourse UP i(max)is the highest value of the membership function, the universe
of discourse U|P i(max −1) is the second highest value and UPi is the resultant.
pis the proportional gain and iis the sampling instant. The Max-product [22]-
[23] implication function and the Centre of Gravity [24] defuzzification method
are shown by equations (3) and (4) respectively:
uR(x, y) = uA(x)·uB(y).(3)
uP i =
n
X
1
(xn∗Uni)/
n
X
1
xn.(4)
where ·represents multiplication, xis the elements of the membership function,
UP i is the universe of discourse and nis the number of membership function
contributions (n= 1,2, ..., etc.). The output of the defuzzifier block needs to
be defuzzified, since non-fuzzy signal is required for the PID gains block. The
fuzzified UP i, is dequantised and descaled and is added to the proportional gain
KPin the PID gains block to readjust the values of KP, using equation (5).
Similar methods are also used to readjust the values of KIand KDin equations
(6) and (7).
KP(F uzzy −apps)=KP+UP i ∗KCP.(5)
KI(F uzzy −apps)=KI+UIi ∗KCI.(6)
KD(F uzzy −apps)=KD+UDi ∗KCD.(7)
KP, KIand KDon the right of equations (5), (6) and (7) represent the PID gains
before the readjustments, and KP(F uzzy −apps), KI(F uzzy−apps)and KD(F u zzy−apps)
on the left of equations represent the PID gains after the application of the fuzzy
PID controller. KCP, K CIand KCDare the descaling factor coefficients for
the proportional, integral and derivative PID gains, respectively. As the values
of the PID gains KP, KIand KDchange at different rates, three different values
for the descaling factor coefficients are used. For instance, the range of varia-
tions in values for KPis greater than KIand KD. The values of the descaling
factor coefficients KCP, K CIand KCDare also chosen to be different for each
link. For a 2 link revolute-joint robot-arm, KCP S , K CIS and KCD S are the
descaling factor coefficients for the shoulder; KCP A , KCIA and K CDA are the
descaling factor coefficients for the arm.
Finally in Figure 2, the controller output from the PID gains block has a
transfer function
U(s)
E(s)=KP(F uzzy −apps)+KI(F uzzy−apps)
s+KD(F uzzy −apps)∗s. (8)
5
Figure 4: The self-organising fuzzy PID controller
Figure 5: The rules in the linguistic rule table
6
The block diagram of a novel self-organising fuzzy PID controller is shown in
Figure 4. The broken lines in the block diagram show the self-organising fuzzy
at the supervisory controller level and the PID at the actuator level. The rule
production and modification section of the self-organising fuzzy PID controller
presented in Figure 4 had been initially proposed by Mamdani & Baaklini [25],
and has been studied by various researchers such as Procyk & Mamdani [26]
and Kazemian & Scharf [27] to name a few. However, the rule production and
modification section at supervisory level readjusting PID gains at the actuator
level, has only been studied by Kazemian [28]-[31]. The self-organising fuzzy
PID controller in this research is in effect the fuzzy PID controller with an
additional rule production and modification. The self-organising fuzzy PID
controller automatically builds its own control rule strategies in the rule buffer
according to the changes encountered both at the setpoint and from the process
under control, starting with no rules in the rule buffer, during the application
of the self-organising fuzzy PID controller to the dynamic system. In Figure
4, the rule production and modification comprises of four blocks, the linguistic
rule table, the PID fuzzifier, the past states buffer and the rule reinforcement.
The linguistic rule table is responsible for keeping the revolute-joint robot-arm
output as close as possible to the setpoint. If the revolute-joint robot-arm output
approaches or follows the setpoint, then no value (zero) is outputted from the
linguistic rule table block. If the revolute-joint robot-arm output deviates from
the setpoint, a value called the gain correction KGC is outputted from the
linguistic rule table block. Based on these objectives a set of nine linguistic
rules are produced, Figure 5. The nine linguistic rules are converted into a
table (Table 2), which is placed in the linguistic rule table block of the rule
production and modification. From the fuzzifier block of Figure 2, two values
of the fuzzified error and the fuzzified change of error are fed into the linguistic
rule table block (Table 2) and a corresponding value of KGC is outputted. The
PID fuzzifier block obtains and fuzzifies the PID gains from the PID gains block.
The scaling factors for the PID fuzzifier block are denoted as SFpf , S Fif and
SFdf. The past states buffer is a storage block for the past values of the PID
gains. Number of the PID gains in the past states buffer are based on the time
lag of the system and in turn the time lag depends on delay-in-reward. The
new values of the gain correction (KGC) and the values of the past states buffer
generate new control rules in the rule reinforcement block, when the revolute-
joint robot-arm output deviates from the setpoint.
Table 2: The linguistic rule table
Fuzzy Change Of Error −→
Fuzzy error ↓NL NL NS NS ZE PS PS PL PL
NL ZE ZE ZE ZE NL NL NL NL NL
NL ZE ZE ZE ZE NL NL NL NL NL
NS ZE ZE ZE ZE NS NS NS NS NS
NS ZE ZE ZE ZE NS NS NS NS NS
ZE ZE ZE ZE ZE ZE ZE ZE ZE ZE
PS PS PS PS PS PS ZE ZE ZE ZE
PS PS PS PS PS PS ZE ZE ZE ZE
PL PL PL PL PL PL ZE ZE ZE ZE
PL PL PL PL PL PL ZE ZE ZE ZE
7
KP rop(i)=KP rop(i−N)+KGC .(9)
KInt(i)=KI nt(i−N)+KGC .(10)
KDeri(i)=KDer i(i−N)+KGC .(11)
where KP rop(i−N), KInt(i−N)and KDeri(i−N)are the PID gains from the past
states buffer block. iis sampling instant and Nis number of past samples
before the present sample. The new rules from the rule reinforcement block are
transferred continuously to the rule buffer block during the system operation.
3 Kinematics and dynamics of the robot-arm
The mathematical model of a revolute-joint robot-arm is taken as a non-linear
dynamic system and employed as a tool to study the behavior of the SOF-PID
controller, the SOFC and the PID controller. The mathematical model outlines
the robot-arm by its rotational characteristics and comprises of three sections,
the structure of the arm, the inverse-arm and the forward-arm. The structure of
the robot-arm consists of two sections, the kinematics and the dynamics. The
kinematics describes the relative positions between the links of the arm and
gives the axes of rotation for each of the joints [32]. The dynamics constitute
the moment of inertia, the center of mass and the mass for each of the links [33].
The inverse-arm is a set of equations which, when evaluated, yield the motor
voltages required to produce particular accelerations. This is the inverse of a
real arm, which produces accelerations given the voltages. The forward-arm
is the process of applying voltages to each of the motors and calculating the
movements of the joints in the robot-arm.
The robot-arm model can accommodate up to seven links and six joints.
The seven links comprise of link 0 to link 6, and the six joints consist of joint
1 to joint 6. In the computer simulation, link 1 is taken as a Single-Input
Single-Output. A 2-link and a 3-link represent a Multi-Input Multi-Output,
and link 0 is the static base. In Figure 6, the Denavit-Hartenburg (D-H) [34]
convention describes the kinematics of the links and joints as such that, link i
rotates around the Zi−1axis of link i−1 when joint iturns. Similarly, link
i+ 1, rotates around Ziat joint i+ 1, etc. Xiis related to link iand points
along the common normal of Ziand Zi−1. The D-H representation of a link is
based on four geometric parameters:
•θiis the angle between links, measuring the joint angle from the Xi−1axis
to the Xiaxis about the Zi−1axis.
•αiis the twist of the link, the angle between axes Zi−1and Ziabout the
Xiaxis.
•aiis the length of the link, the shortest distance between the Zi−1and Zi
axes.
•diis the distance between the links, from the link i−1 to the link ialong
the Zi−1axis.
8
Figure 6: Robot-arm link coordination
The driving force for each link is an armature controlled DC motor. The voltage
is applied at the input of the armature terminals and speed of rotation is pro-
duced at the output. A second order differential equation is used to represent
the dynamics of a DC motor and load.
d2y
dt2+f∗dy
dt +r(t) = r(t)u. (12)
where uis the input to the process, yis the output from the process, fis the
friction, and r(t) is the small friction values which varies with time. The non-
linearities in a revolute-joint robot-arm are caused by backlash, friction and
motor characteristics. In the robot-arm, the moment of inertia varies with time
due to the movements of the links. The DC motor dynamics is a time variant
system, which could represent small friction values and changes in the moment
of inertia of the motor and load [35]. By varying the term r(t) which stands for
small friction values, changes in the moment of inertia of the motor and load
will take place. A sharp decrease or increase in the moment of inertia makes the
system more difficult to control. The third order method of Runge-Kutta [36] is
used to integrate the second order dynamic equation. To simulate the noise, a
random number generator program is used to produce 5000 different numbers.
This is based on a congruent linear random number generator, which gives a
distribution close to a rectangular. In accordance with observations made with
a practical system, the output is scaled to give a deviation of ±0.8 units, which
is added to the process output.
9
4 Computer simulation results
The self-organising fuzzy PID controller is applied to a revolute-joint robot-arm
for a step input and a trapezium waveform tracking experiments. The results
are compared with a fuzzy PID controller and a conventional PID controller.
For the step input two different methods are utilised. In method 1, section 4 -
part A experiments, the fuzzy PID controller and the self-organising fuzzy PID
controller readjust the three PID gains, KP, KIand KD, while the system is in
operation. In contrast, in method 2, section 4 - part B, the fuzzy PID controller
and the self-organising fuzzy PID controller only readjust KPgain, and Ziegler-
Nichols [37] tuning method calculates the corresponding values of KIand KD.
Method 1 is only suitable for step input, since the values of KP, KIand KDare
readjusted at the rise time, the steady state error period and between the rise
time and the steady state error period, respectively. For a multi-input multi
output path tracking experiment such as the trapezium waveform the rise time,
the steady state error and overshoot do not apply.
A) Step input experiments using method 1
The step input experiments are to produce some initial results for the fuzzy
PID controller, the self-organising fuzzy PID controller and the conventional
PID controller. For a revolute-joint robot-arm with pick and place in mind, the
parameters for the three controllers are tuned to obtain an appropriate damping
around the setpoint, minimise the overshoot and depress the steady state error.
The PID gains KP, KIand KDare initially tuned off line, without the fuzzy
controllers. The experimental results presented in this article are based on the
following off line tuning method. Firstly, a large value of KPis chosen and
gradually the KPvalue is reduced until the time the output process overshoot
is minimised. Subsequently, KIand KDare tuned; and finally KPis re-tuned
to deduce the best possible output response. Once the PID gains KP, KIand
KDare tuned, the fuzzy controllers readjust the PID gains during the system
operation. For the step input experiments, one of the PID gains are readjusted
at the time. From the start of the signal to the point near to the setpoint,
KPis readjusted to improve the rise time; from this point until approaching
the steady state error region, KDis readjusted to dampen the overshoot; and
lastly, KIis readjusted to reduce the steady state error.
One experiment for the fuzzy PID controller and one experiment for the
self-organising PID controller are outlined with the following parameter values:
the initial PID gains are KP= 50, KI= 0.55, KD= 1.0; ESF = 0.3, CESFL
for the linguistic rule table = 4, CESFFfor the fuzzy control = 12; delay-in-
reward = 6; the descaled coefficients for the defuzzifier block are KCP= 0.5,
KCI= 0.05, K CD= 0.1; the scaling factors for the PID fuzzifier block are SFpf
= 0.12, SFif = 12 and S Fdf = 6; and the linguistic rule table of Table 2 is used.
Figures 7 and 8 demonstrate examples of process out for a step input using the
fuzzy PID controller - method 1 and the self-organising fuzzy PID controller -
method 1, receptively. The Y-axis is the process output in degree centigrade
and the X-axis is the sample number, 12 millisecond per sample. As the figures
indicate, there is an improvement in the process output for the self-organising
fuzzy PID controller than the fuzzy PID controller. Due to less computation in
10
Figure 7: Step response, method 1: using the fuzzy PID controller. Scaling:
X-axis: 12 ms / sample Y-axis: output - degrees
Figure 8: Step response, method 1: using the self-organising fuzzy PID con-
troller, run number 5. Scaling: X-axis: 12 ms / sample Y-axis: output -
degrees
11
the simulation, the rise time is slightly faster for the fuzzy PID controller than
the self-organising fuzzy PID controller. The overshoot is virtually non-existent
for the self-organising fuzzy PID controller and the fuzzy PID controller. The
steady state error is improved considerably for the self-organising fuzzy PID
controller than the fuzzy PID controller. This is because, the self-organising
fuzzy PID controller continuously changes the values of the rule buffer block
during the system operation. In contrast, the values of the rule buffer block
for the fuzzy PID controller are predetermined, prior to the experiments being
carried out.
B) Step input experiments using method 2
The PID gains are initially tuned off line, using the same tuning procedure
explained in section 4 - part A. The fuzzy PID controller and the self-organising
fuzzy PID controller readjust the values of KP. The corresponding values of
KIand KDare calculated using Ziegler-Nichols tuning method. The method
assumes that the proportional PID gain KPis 60% of the gain KOSC at the
time of oscillation, the integral time constant TI is 50% of the oscillation period
TOSC and the derivative time constant TD is 12.5% of the oscillation period
TOSC .
KP= 0.6∗KOSC .(13)
TI= 00.5∗TOSC .(14)
TD= 0.125 ∗TOSC .(15)
The Ziegler-Nichols tuning method is based on continuous systems and can also
be used on discrete systems for a fast sampling time. By using the PID controller
equations, KI=KP/TIand KD=KPTDand the Ziegler-Nichols equations
(13, 14 & 15), equations (16 & 17) are obtained:
KI= 2KP/TOSC .(16)
KD= 0.125 ∗KP∗TOSC .(17)
By using the universe of discourses UP i, UIi and UD i in place of KP, KIand
KDrespectively, equations (18 & 19) are obtained.
UIi = 2UP i /TOSC .(18)
UDi = 0.125 ∗UP i ∗TOS C .(19)
The equivalent values of UIi and UDi from equations (18 & 19) are substituted
into equations (6 & 7), and equations (20 & 21) are obtained. Equations (20 &
21) constitute the mathematical calculation of the values of KIand KDusing
Ziegler-Nichols method. Equation (5) remains the same.
KI(F uzzy −apps)=KI+ (2UP i/TOS C )∗KCI.(20)
KDFuzzy −apps)=KD+ (0.125 ∗UP iTOS C )∗KCD.(21)
One experiment out of many experiments carried out is outlined here, using
the same parameter values as section 4 - part A. Method 2 reduces the scal-
ing factors from three to one in the PID fuzzifier block, SFpf = 0.12, as the
12
Figure 9: Step response, method 2: using the fuzzy PID controller. Scaling:
X-axis: 12 ms / sample Y-axis: output - degrees
Figure 10: Step response, method 2: using the self-organising fuzzy PID con-
troller, run number 4. Scaling: X-axis: 12 ms / sample Y-axis: output - degrees
13
proportional gain is only used at the rule production and modification section.
Comparing Figures 9 and 10, there is an improvement in the self-organising fuzzy
PID controller than the fuzzy PID controller using method 2. As explained in
section 4 - part A, the rise time for the fuzzy PID controller is slightly faster
than for the self-organising fuzzy PID controller, and the overshoot is non-
existent for both controllers. The steady state error is improved notably for
the self-organising fuzzy PID controller than the fuzzy PID controller, as the
self-organising fuzzy PID controller continuously changes the values of the rule
buffer during the system operation. Finally, comparing the fuzzy PID controller
and the self-organising fuzzy PID controller using method 1 (Figures 7 & 9) and
method 2 (Figures 8 & 10), the two methods produce very similar results using
computer simulation. However, method 1 and method 2 might produce differ-
ent results for practical applications. For a step input experiment, after initial
tuning of the PID gains using conventional methods, it is possible to predict
which of the three PID gains should be readjusted at the rule production and
modification section to further improve the process output response. However,
it should be noted that re-adjusting the gains KP, KIand KD, improves some
part of the output response and deteriorates the other part. For instance for
a step input, the proportional gain KPhas a direct effect over the rise time
and oscillation, the integral gain KIreduces the steady state error but increases
the possibility of instability, and the derivative gain KDreduces the overshoot
but it may cause major fluctuations in the process output in the presence of
high rates of change like noise. In contrast for the path tracking experiments,
with continuous changes at the setpoint and from the process itself during the
system operation, one can not instantaneously decide which PID gains should
be readjusted in order to obtain an optimum path. Therefore, it is better to
apply method 2 to the path tracking experiments, as only KPneeds readjusting
by the rule production and modification section.
Figure 11, compares the fuzzy PID controller (method 2) and the self-
organising fuzzy PID controller (method 2) with the PID controller. In Figure
11, the steady state errors are about 1.6% for the fuzzy PID controller, 1.1% for
the self-organising fuzzy PID controller and 2.3% for the PID controller. The
overshoot is negligible for the fuzzy PID controller and the self-organising fuzzy
PID controller. However, the overshoot is high for the PID controller. This is
because, due to the derivative part of the PID controller and in the presence of
high rates of change such as noise, the PID controller fluctuates in the process
output.
C) Trapezium waveform experiments
The fuzzy PID, the self-organising fuzzy PID and the conventional PID are
all single-input single-output controllers. As a result for a two-input two-output,
the experiments bring together the simultaneous operations of two individual
controllers one controlling the shoulder movement and the other controlling the
arm movement. Each controller considers its joint as a single-input single-output
system, learning its rules in the face of cross-coupling effects experienced by the
other system. To trace the trapezium waveform of varying amplitudes, the
two joint angles are moved using kinematics transformations and joint angles
manipulations. The sampling time is chosen to be 6ms and the step size for
14
Figure 11: Step response, method 2: using the fuzzy PID Controller, the self-
organising fuzzy PID controller run number 4, and the PID controller. Scaling:
X-axis: 12 ms / sample Y-axis: outputs - degrees
Runge-Kutta integration is 8ms. The rule buffer block in the self-organising
fuzzy PID controller initially has no rules. The controller learns the appropriate
control rule strategy by itself by going through a series of training (RUNS),
during which it produces and modifies its database. If a stable control rule
strategy is reached, then no new rules will be produced nor modified in the
subsequent RUNS. The maximum number of RUNS in the experiments carried
out were 6. For the path tracking experiments 6 RUNS were carried out for
the fuzzy PID controller, the self-organising fuzzy PID controller and the PID
controller, in order to obtain measurements of the performances provided by
the Integral of the Absolute magnitude of the Error (IAE) criterion.
For comparison purposes the experiments outlined here start from sample
number 200. This is to allow the self-organising fuzzy PID controller to have
about 1.2 seconds (200 samples x 6ms = 1.2sec) to build its database in the rule
buffer block. In Figures 12 and 14, a path tracking experiment for a trapezium
waveform with the following parameters is outlined using two fuzzy PID con-
trollers: ESF = 0.4, CE SF = 10, K CP S = 0.35, KCIS = 0.04, K CD S = 0.1,
KCP A = 0.3, KCIA = 0.04, K CDA = 0.09. The Min implication function
with the Mean of Maxima is used in Figure 12 and the Max - product impli-
cation function with the Centre of Gravity is used in Figure 14. In Figures 13
and 15, a path tracking experiment for a trapezium waveform with the follow-
ing parameter values is shown, using two self-organising fuzzy PID controllers:
ESF = 0.45, the change of error scaling factor for the fuzzy control block
CE SFF= 12, the change of error scaling factor for the linguistic rule table
15
Figure 12: (a, b). Tracking a trapezium waveform: using two fuzzy PID con-
trollers, Min implication function with Mean of Maxima defuzzification method,
run number 4. Scaling: X-axis: 6 ms / sample Y-axis: outputs - degrees
Figure 13: (a, b). Tracking a trapezium waveform: using two self-organising
fuzzy PID controllers, Min implication function with Mean of Maxima defuzzi-
fication method, run number 5. Scaling: X-axis: 6 ms / sample Y-axis: outputs
- degrees
Figure 14: (a, b). Tracking a trapezium waveform: using two fuzzy PID con-
trollers, Max-product implication function with Centre of Gravity defuzzifica-
tion method, run number 5. Scaling: X-axis: 6 ms / sample Y-axis: outputs -
degrees
16
Figure 15: (a, b). Tracking a trapezium waveform: using two self-organising
fuzzy PID controllers, Max-product implication function with Centre of Gravity
defuzzification method, run number 3. Scaling: X-axis: 6ms / sample Y-axis:
outputs - degrees
Figure 16: (a, b). Tracking a trapezium waveform: using two PID controllers,
run number 4. Scaling: X-axis: 6ms / sample Y-axis: outputs - degrees
17
block CE SFL= 6, SFpf = 1.1, KCP S = 0.4, K CI S = 0.05, KCDS = 0.11,
KCP A = 0.35, K CI A = 0.05, KCDA = 0.1 and delay −in −reward = 6. The
Min implication function with the Mean of Maxima is used in Figure 13 and
the Max - product implication function with the Centre of Gravity is used in
Figure 15. For the purpose of comparison, the gains in the PID gains block for
the fuzzy PID controller and the self-organising fuzzy PID controller are chosen
to be the same: KP[S] = 4.5, KI[S] = 1.6, KD[S] = 1.15 for the shoulder,
and KP[A] = 4, KI[A]=1.3, KD[A]=1.1 for the arm. For the path track-
ing experiments, two self-organising fuzzy PID controllers trace the trapezium
waveform closer and smoother than two fuzzy PID controllers, refer to Figures
12 - 15. Increasing the amplitude and frequency of the trapezium waveform
effect the fuzzy PID controller more than the self-organising fuzzy PID con-
troller. As a result, the self-organising fuzzy PID controller can react quickly to
the changes experienced both at the setpoint and from the process. There have
been numerous experiments carried out with different implication functions and
defuzzification methods using different fuzzy controllers. Yamazaki [23], used
the Max - product implication function in conjunction with the Centre of Grav-
ity defuzzification method and concluded that the process output is smoother.
Lembessis [38], combined the Min implication function [20] with the Mean of
Maxima defuzzification [21] method and argued that this combination produces
a faster convergence to the setpoint. There were some initial experiments car-
ried out in this research to apply the fuzzy PID controller and the self-organising
fuzzy PID controller to a revolute-joint robot-arm using the Max - product im-
plication function with the Centre of Gravity defuzzification method, as well as
the Min implication function with the Mean of Maxima defuzzification method.
The experimental results of Figures 12 and 13 show that the Min implication
function with the Mean of Maxima produce a faster convergence to the setpoint.
The experimental results of Figures 14 and 15 also reveal the Max - product
implication function with the Centre of Gravity produce a smoother transient
response. In contrast, the process output response is much better for two fuzzy
PID controllers and two self-organising fuzzy PID controllers than two PID
controllers, see Figures 12 - 16. An introduction of noise to the system for the
fuzzy PID controller and the self-organising fuzzy PID controller produces less
disturbances in the process output response than for the PID controller.
In many cases, the number of rules that define different output conditions
are limited. Subsequently, so often, no rules in particular satisfy certain out-
puts. This is of course one of the biggest drawbacks of the fuzzy controllers, as
it undermines the efficiency of such controllers. To overcome this, neighbour-
ing control outputs are used. In other words, for a given output, the control
algorithms will check if there is a corresponding rule. If there is not, then the
rules in the closest neighbourhood will be used. The extent of the neighbouring
control output distance is determined by the user; a distance of 1 unit is used
in this work.
A system is considered an optimum control system, when the system param-
eters are adjusted so that the performance index reaches a minimum positive
value or zero. The Integral of the Absolute magnitude of the Error (IAE) crite-
18
rion is a suitable performance index.
IAE =
T
Z
0
e(t)dt. (22)
In equation (22), Tis a finite time chosen so that the integral approaches a
steady state value. In the trapezium waveform experiments, the IAE criterion
provides useful information in the analysis of the path tracking ability of the
system. Table 3 presents the IAE performance for the fuzzy PID controller,
the self-organising fuzzy PID controller and the PID controller. As already
explained in this section, the Min implication function with the Mean of Max-
ima defuzzification method as well as the Max - product implication function
with the Centre of Gravity defuzzification method are used for the fuzzy PID
controller and the self-organising fuzzy PID controller. The three controllers’
performances could be evaluated by looking at the figures. It could be concluded
that the lower figure values are usually indicative of better performances. How-
ever, for the trapezium waveform experiments, the lowest value of the IAE
criterion does not always produce the best tracking performance. For instance,
for very close path tracking experiments, the process output response had an
unexpected initial overshoot.
Table 3: Trapezium path tracking experiments
Fuzzy Self- Fuzzy Self- PID
PID orga- PID orga-
MM nising COG nising
PID PID
MM COG
IAE run Fig. IAE run Fig. IAE run Fig. IAE run Fig. IAE run Fig.
51.32 2 46.23 3 50.12 3 45.77 4 53.15 4 15
50.01 3 47.91 2 48.54 5 13 44.31 6 54.26 3
48.76 5 45.65 4 47.33 6 47.12 2 55.98 3
49.36 4 11 46.73 3 51.72 4 46.64 3 52.23 6
47.11 6 44.85 5 12 49.11 5 45.39 5 51.76 5
50.68 5 45.89 4 49.89 4 44.87 5 53.19 2
49.71 6 44.18 6 50.79 2 46.34 3 14 54.38 4
5 Conclusion
For the step input experiments, the fuzzy PID controller and the self-organising
fuzzy PID controller are applied to a non-linear robot-arm using computer sim-
ulation. The results of the computer simulation for the fuzzy PID controller and
the self-organising fuzzy PID controller are compared with a conventional PID
controller subject to the same data provided at the setpoint, in order to anal-
yse the results and also obtain some information about the tuning procedure.
The results of the step input experiments for the fuzzy PID controller and the
self-organising fuzzy PID controller demonstrate that, using the first method
that is readjusting the three PID gains individually produces virtually the same
19
results as, using the second method that is readjusting the proportional PID
gain first and applying Ziegler-Nichols method to calculate the corresponding
values of the integral and the derivative gains. In general, the rise time for the
fuzzy PID controller is faster than the self-organising fuzzy PID controller. The
steady state error is better for the self-organising fuzzy PID controller than the
fuzzy PID controller. The overshoot for the fuzzy PID controller and the self-
organising fuzzy PID controller is virtually non-existent. It is concluded that
for the step input experiments, the novel self-organising fuzzy PID controller
is capable of producing a better process output than the fuzzy PID controller
and the PID controller in controlling a non-linear robot-arm. An introduction
of noise to the system for the fuzzy PID controller and the self-organising fuzzy
PID controller creates less disturbances in the process output response than for
the PID controller.
The fuzzy PID controller and the self-organising fuzzy PID controller are
both also applied to a non-linear revolute-joint robot-arm for a path tracking
experiment to trail a trapezium waveform. To conclude, the new self-organising
fuzzy PID controller traces the trapezium better than the fuzzy PID controller.
This is because the rules in the rule buffer are updated and changed constantly
during the application of the self-organising fuzzy PID controller to the pro-
cess. The results of the experiments for the fuzzy PID controller and the self-
organising fuzzy PID controller provide a smoother process output response
using the Max - product implication function with the Centre of Gravity de-
fuzzification method. The experimental results for the fuzzy PID controller and
the self-organising fuzzy PID controller present a swifter convergence to the
setpoint using the Min implication function with the Mean of Maxima defuzzi-
fication method. For the path tracking experiments, the fuzzy PID controller
and the self-organising fuzzy PID controller both produce a better process out-
put response than the PID controller, in the presence of noise and time variant
dynamics.
References
[1] M.M. Zavarei and M. Jamshidi. Time-delay systems - analysis, optimisation
and applications. Amsterdam: North-Holland Systems and Control Series,
vol. 9, 1987
[2] D.P. Atherton. PID controller tuning. IEE Computing & Control Engineer-
ing journal, pp. 44–50, April 1999
[3] P. Airikka. PID controller: algorithm and implementation. IEE Computing
& Control Engineering journal, pp. 6–11, Dec/Jan 2003/2004
[4] M.S. Fodil, P. Siarry, F. Guely and J.L. Tyran. A fuzzy rule base for the
improved control of a pressurised water nuclear reactor. IEEE Transactions
on Fuzzy Systems, vol. 8, no. 1, pp.1–10, February 2000
[5] J.S. Won and R. Langari. Fuzzy torque distribution control for a paral lel hy-
brid vehicle. Expert Systems, Int. J. of Knowledge Engineering and Neural
Networks, vol.19, no. 1, pp. 4–10, February 2002
20
[6] S.X. Yang, H. Li, M.Q.-H. Meng and P.X. Liu. An embedded fuzzy con-
troller for a behaviour-based mobile robot with guaranteed performance.
IEEE Transactions on Fuzzy Systems, vol. 12, no. 4, pp. 436–446, August
2004
[7] W. Li. Design of a hybrid fuzzy logic proportional plus conventional integral-
derivative controller. IEEE Trans. Fuzzy Systems, vol. 6, no. 4, pp. 449–463,
1998
[8] R.K. Mudi and N.R. Pal. A robust self-tuning scheme for PI- and PD-type
fuzzy controllers. IEEE Trans. on Fuzzy Systems, vol. 7, no. 1, pp. 2–16,
1999
[9] G.K.I. Mann, B.G. Hu and R.G. Gosine. Two level tuning of fuzzy PID
control lers. IEEE Transactions on Systems, Man and Cybernetics, Part B,
vol. 31, no. 5, pp. 263–269, April 2001
[10] K.S. Tang, K.F. Man, G. Chen and S. Kwong. An optimal fuzzy PID con-
troller. IEEE Transactions on Industrial Electronics, vol. 48, no. 4, pp.
757–765, August 2001
[11] B.G. Hu, G.K.I. Mann and R.G. Gosine. A systematic study of fuzzy
PID control lers-function-based evaluation approach. IEEE Transactions on
Fuzzy Systems, vol. 9, no. 5, pp. 699–712, October 2001
[12] R.S. Ranganathan, H.A. Malki and G. Chen. Fuzzy predictive PI control
for processes with large time delays. Expert Systems, Int. J. of Knowledge
Engineering and Neural Networks, vol. 19, no. 1, pp. 21–33, February 2002
[13] G.K.I. Mann and R.G. Gosine. Adaptive hierarchical tuning of fuzzy con-
trollers. Expert Systems, Int. J. of Knowledge Engineering and Neural Net-
works, vol. 19, no. 1, pp. 34–45, February 2002
[14] Y. Zhao and E.G. Collins Jr. Fuzzy PI control design for an industrial weigh
belt feeder. IEEE Trans. Fuzzy Systems, vol. 11, no. 3, pp. 311–319, June
2003
[15] E. Yesil, M. Guzelkaya and I. Eksin. Self tuning fuzzy PID type load and
frequency controller. Energy Conversion and Management Journal, vol. 45,
no. 3, pp. 377–390, ISSN. 0196-8904, 2004
[16] B. Moshiri and F. Rashidi. Self-tuning based fuzzy PID controllers: appli-
cation to control of nonlinear HVAC systems. Intelligent Data Engineering
and Automated Learning - IDEAL 2004, vol. 3177, pp. 437–442, ISBN.
978-3-540-22881-3, Oct. 2004
[17] O. Karasakal, E. Yesil, M. Guzelkaya and I. Eksin. Implementation of a
new self-tuning fuzzy PID control ler on PLC. Turk Journal of Elec. Eng.,
vol. 13, no. 2, pp. 277–286, 2005
[18] S. Assilian. Artificial Intelligence in the control of real dynamic systems.
PhD. Thesis, Queen Mary University of London, 1974
21
[19] L.A. Zadeh. Outline of a new approach to the analysis of complex systems
and decision processes. IEEE Trans. Syst., Man and Cybern., vol. 3, no. 1,
pp. 28–44, 1973
[20] E.H. Mamdani. Advances in linguistic synthesis of fuzzy controllers. Int. J.
Man-Machine Studies, vol. 8, pp. 669–678, 1976
[21] W. Pedrycz. Fuzzy control and fuzzy systems, Second Extended Edition.
Research Studies Press LTD, Taunton, Somerset, England TA1 1HD, 1993
[22] I.P. Holmblad and J.J. Ostergaard. Fuzzy logic control: operator experience
applied in automatic process control. FLS Review, F.L. Smidth & Co., 77
Vigerslev Alle, DK-2500, Valby, Copenhagen, Denmark, vol. 45, pp. 11–16,
1981
[23] T. Yamazaki. An improved algorithm for a self-organising controller. PhD.
Thesis, Queen May University of London, 1982
[24] Y.F. Li and C.C. Lau. Development of Fuzzy Algorithms for Servo Systems.
IEEE Control Systems Magazine, pp. 65–72, April 1989
[25] E.H. Mamdani and N. Baaklini. Prescriptive method for deriving control
policy in a fuzzy logic controller. Electronics Letters, vol. 1, pp. 625–626,
1975.
[26] T.J. Procyk and E.H. Mamdani. A Linguistic self-organising process con-
troller. Automatica, vol. 15, pp. 15-30, 1979
[27] H.B. Kazemian and E.M. Scharf. An application of multi-input multi-output
self organising fuzzy controller for a robot-arm. IEEE Int. Journal Neural
Network World, vol. 6, no. 4, pp. 631–641, 1996
[28] H.B. Kazemian. Study of learning fuzzy control lers Expert Systems: The
Int. Journal of Knowledge Engineering and Neural Networks. Blackwell
publishers Ltd., vol. 18, no. 4, pp. 186–193, September 2001
[29] H.B. Kazemian. Comparative study of a learning fuzzy PID controller and
a self-tuning controller. ISA Transactions the Int. Journal of Science and
Engineering of Measurement and Automation. Elsevier Science Ltd., vol.
40, no. 3, pp. 245–253, July 2001
[30] H.B. Kazemian. The SOF-PID controller for the control of a MIMO robot-
arm. IEEE Transactions on Fuzzy Systems, vol. 10, no. 4, pp. 523–532,
August 2002
[31] H.B. Kazemian. Developments of fuzzy PID controllers. Expert Systems:
The Int. Journal of Knowledge Engineering and Neural Networks. Blackwell
publishers Ltd., vol. 22, no. 5, pp. 254–264, November 2005
[32] J. Denavit and R.S. Hartenburg. A kinematic notation for lower-pair mech-
anisms based on matrices. J. Applied Mechanics, pp. 215–221, 1955
[33] M.W. Walker and D.E. Orin. Efficient dynamic computer simulation of
robotics mechanisms J. Dyn. Sys., Meas., and Control, vol. 104, pp. 205–
211, 1982
22
[34] K.S. Fu, R.C. Gonzalez and C.S.G. Lee. Robotics: control, sensing, vision,
and intelligence. McGraw-Hill Int. Eds., Industrial Engineering Series, 1988
[35] R.C. Dorf and R.H. Bishop. Modern control systems. Addison-Wesley Pub-
lishing Company, 10th Ed., 2004
[36] W. Bolton. Essential mathematics for engineering. Butterworth Heinemann
Publishing Company, 1st Ed., 1997
[37] J.G. Ziegler and N.B. Nichols. Optimum settings for automatic controllers.
Transaction of ASME, vol. 65, pp. 433–444, 1943
[38] E. Lembessis. Dynamic learning behaviour of a rule-based self organizing
control ler. Ph.D. Thesis, Queen Mary University of London, UK, 1984
23