Icfc 2010 6 CR

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

TUNING METHOD FOR PID CONTROL SCHEME

A Blended Ant System Optimization Technique with Takagi Sugeno Fuzzy System

A. H. Besheer
Department of Electrical Engineering, University of Tabuk, Tabuk, Kingdom of Saudi Arabia
Department of Natural Resources Evaluation, Environmental Studies & Research Institute
Menofiya University, ElSadat City, Egypt
[email protected]

Keywords: T-S fuzzy control, PID control, Ant system optimization.

Abstract: This paper addresses the ant colony system optimization method that is used for tuning the parameters of
three independent fuzzy systems to optimally determined different gains of PID controller. Each fuzzy
module is utilized to obtain different PID parameters. The objective of Ant Colony Optimization is to
improve both the design efficiency of fuzzy systems and its performance. The optimum relationship
between the PID controller gains and the parameters of fuzzy modules is explored using Ant system
algorithm. Firstly, the design of typical Takagi-Seguno fuzzy PID controller is presented. Then, the well
known ant colony optimization method is applied to the problem of tuning the parameters of Takagi-Seguno
fuzzy rule base. Finally, the optimal PID gains are obtained. Simulation examples are provided to illustrate
the effectiveness of the proposed technique.

1 INTRODUCTION methods, the Ziegler-Nichols, (1942) (ZN) technique


has been very
With its three-term functionality offering treatment influential.
of both transient and steady-state responses, Fuzzy control and tuning methodologies have
proportional-integral-derivative (PID) control emerged in last years as promising ways to approach
provides a generic and efficient solution to real- nonlinear control problems and to deal with
world control problems. The wide application of difficulties of conventional PID controllers
PID control has stimulated and sustained research (Vaishnav & Khan, 2007). The area of auto-tuning
and development to “get the best out of PID’’, and of PID controller using fuzzy systems has attracted
“the search is on to find the next key technology or many authors (Visioli, 2001)& (Bhattacharya,
methodology for PID tuning” (Li, Ang, & Chong, Chatterjee & Munshi, 2003). However, a common
2006)0. bottleneck encountered in fuzzy controller design is
Generally, the tuning methods of PID control that derivation of fuzzy rules is often difficult and
scheme fall into two broad categories: online model- time-consuming, and relies on expert knowledge. To
free methods and methods that build a model of the overcome this disadvantage, many automatic
plant. The former tunes the PID controller in loop methods for fuzzy system design and optimization
with the given plant using an optimization algorithm algorithms have been proposed, such as neural fuzzy
such as steepest descent or Newton’s method to systems (Lin & Lee, 1996) and evolutionary fuzzy
minimize some cost function, for instance, error systems (Cordon, Herrera, Hoffmann, & Magdalena,
between the input and output. The second approach 2001)0.
builds a model of the plant and accordingly decides Recently, the social inspired optimization
the parameters of the controller by using a algorithms become a successful alternative for the
deterministic approach or an optimization method conventional tuning method to adapt the PID
(Aggarwal, Mao & O’Reilly, 2008). A controllers. Using these new methods, the global
comprehensive review of these methods is given in optimal or suboptimal solutions of the optimized
(Johnson & Moradi, 2005). Among the tuning control scheme are found. These algorithms are
adopted by many researchers for tuning PID

113
ICFC 2010 - International Conference on Fuzzy Computation

controller in its classical and intelligent forms. One controller parameters are calculated from the
such approach is Ant System Optimization (ASO) defuzzification process. This paper has two main
which is founded on the foraging behavior of ants contributions. Firstly, a PID controller has been
and their indirect communication based on designed for higher order system using a blending
pheromones. ASO has been applied to several tuning mechanism namely Takagi – Sugeno fuzzy
combinatorial problems such as job scheduling, Ant system algorithm. Secondly, a satisfactory
routing optimization in data communication closed loop performance is achieved with respect to
networks and telephone networks (Jones & Bouffet, the conventional ZN frequency response tuning
2007). method and the Ant system algorithm. The objective
One of the widely used methods for optimizing a of Ant System Optimization in this paper is to
fuzzy logic controller is to modify the rule base improve both the design efficiency of Takagi –
using this self-organizing algorithm automatically Sugeno fuzzy systems and its performance to get
according to previous responses until the desired optimal PID parameters. Simulation results for a
control performance is achieved. Many works higher order system have been demonstrated.
studied this problem such as (Sharkawy, 2006),
(Cordon et al., 2001) and (zheng & quan, 2007). In
(Sharkawy, 2006), a tracking control problem is 2 T – S FUZZY TUNER
assumed to develop a self tuning PID control
scheme with application to Antilock Braking System
FOR PID CONTROLLER
via combinations of fuzzy and genetic algorithms.
Many PID controllers were presented in literature,
While in (Nobahari & Pourtakdoust, 2005), the
the expression of PID control law for a continuous
approximation of analytical test function is
time system is given as follows:
performed using ant colony algorithm to tune the
parameters of Takagi Sugeno (T-S) fuzzy rule base.
(1)
The authors simplified their work by assuming
constant consequence part instead of the ordinary
where e(t) is the error between the input and the
linear function consequent part of T-S fuzzy system.
output of the system; u(t) is the control action
In (zheng & quan, 2007), Incremental fuzzy PID
generated by the PID controller; Kp is the
controller is used which is slightly different from the
proportional gain; Ti is the integral time constant;
T-S fuzzy PID controller where, the scaling factors
and Td is the derivative time constant.
for input/output Macvicar-Whelan based fuzzy
In this section, three independent T-S fuzzy
system are addressed in the ant colony optimization
systems are used to tune different gains of PID
framework. In T-S fuzzy systems design, one
controller. Each fuzzy module is assigned to obtain
challenging design task is the determination of the
each PID gains. The typical T-S fuzzy systems
parameters of the consequent part. In this paper,
studied in this paper have two inputs and one output.
ASO is employed to design the consequent part of a
The input variables are error and rate of change of
Takagi Sugeno fuzzy PID controller. The paper
the error. We denote e(t), and y(t) as error, rate
presents design procedures for a model free T-S
of change of error and system output, respectively.
fuzzy PID controller. Three independent T-S fuzzy
A fuzzy set for e(t) (or ) is denoted as A (or B)
systems are combined to tune different gains of PID
and the corresponding membership is designated as
controller. The optimum relationship between the
PID controller parameters and the parameters of T-S or( . Throughout this work, a
fuzzy modules is explored. Using Ant system Gaussians membership functions for the two inputs
algorithm, the parameters of each T-S fuzzy system of the premise part of T-S fuzzy system are used.
are optimally determined. The idea is to start with a The error e(t) and the rate of change of the error
tuned, conventional PID controller, replace it with are normalized using three Gaussian membership
an equivalent Takagi-Sugeno fuzzy PID controller functions; negative N, zero Z, and positive P, so that
and eventually fine-tune the T-S fuzzy tuner. This is nine rules constitute the rule base for each module.
relevant whenever a PID controller is possible or For simplicity, the consequent part has been chosen
already implemented. to be a first order function of e(t) and . The rule
In the proposed T-S Fuzzy Ant System PID, bases have the following form:
structure of T-S fuzzy system is well adapted via Rule j: If e(t) is A and e t is B then
defining the optimum parameters of its consequence
part. Once new rules are generated, the PID where , is the gain to be tuned, i.e.

114
TUNING METHOD FOR PID CONTROL SCHEME - A Blended Ant System Optimization Technique with Takagi
Sugeno Fuzzy System

Kp , Ki or Kd . aij and bij are the constants, and j=1, idea, loosely inspired by the behavior of real ants, is
2, …9 is the rule number. In this paper, the weighted that of a parallel search over several constructive
average technique is utilized to get the overall fuzzy computational threads based on local problem data
output as follows: and on a dynamic memory structure containing
Given a pair of e(t), ), the final output of the information on the quality of previously obtained
fuzzy system is inferred as follows (Besheer & result. In this algorithm, computational resources are
Emara, 2009): allocated to a set of artificial ants that exploit a form
of indirect communication mediated by the
∑ ,
environment to find the shortest path from the ant
∑ , nest to a set target. Ant algorithms have been proved
(2) to be a quick global optimal solution finder when
compared to other heuristic methods such as
,
simulated annealing and genetic algorithms. It also
states that the ant algorithms have the quality to find
, ∏ , , new optimal solution without reinitiating the
, computations from scratch.
, ∑ ,
3.2 T-S Fuzzy PID Optimization
Where , is the grade of membership of
Problem
, in A and B. In this paper, we assume that,
, 0 1,2, … , Usually, the optimization process consists of finding
∑ , 0 for all t. Therefore we obtain the controller parameters such as to minimize or
, 0 1,2, … , maximize a given cost function of the closed loop
and ∑ 1 , 1 system consisting of a fuzzy PID controller and an
unknown plant. The optimization of step response of
Remark: Our approach is different from those of the system under control by minimizing a suitable
(Sharkawy, 2006), (Nobahari & Pourtakdoust, 2005) performance criterion is the aim of this work.
0& (zheng & quan, 2007) in the following ways. Each T-S fuzzy module consists of constant
i. A Takagi – Sugeno type of the fuzzy PID premise parameters (that is needn’t to be optimized)
control system is assumed instead of incremental and 18 free consequence parameters (that will be
fuzzy PID control system. optimized). The total number of free parameters to
be optimized for the overall fuzzy system is 54. The
ii. The input membership functions of T-S fuzzy AS algorithm is applied to optimize two different
tuner are assumed to be constant (i.e. σ, c are parameter matrices (a & b). These parameters
constant over each rules and fuzzy system). matrices are driven by the consequence parts of
iii. The total no. of free parameters to be tuned in fuzzy rule base. The dimension of both parameter
(Sharkawy, 2006) is 117 parameters while in our matrices is “3x9”. The effectiveness of the proposed
proposed design procedures are 54 parameters (i.e. T-S Fuzzy controller is quantified by the following
smaller computational burden). performance criteria that are evaluated at the end of
a step response experiment. It includes the
overshoot , settling time ts and steady state error ess
3 ASO ALGORITHM BASED of the system unit step response. The performance
criterion of the system F is designed as follows:
T-S FUZZY OPTIMAL
PARAMETER (3)
DETERMINATION Where , & are three weighting coefficients
and f1, f2 & f3 are defined as follows:
3.1 Ant System Optimization
, 0
, & (4)
The Ant System is the first member of a class of 0, 0
algorithms called Ant Colony Optimization (ACO)
that was initially proposed by Colorni, Dorigo & where , & are the performance values
Maniezzo (1996). This technique is adopted in this obtained from ZN tuning formula (Ziegler-Nichols,
paper due to its simplicity. The main underlying 1942). The parameters matrices for the problem of

115
ICFC 2010 - International Conference on Fuzzy Computation

tuning T-S fuzzy PID controller are defined as: where k is a dummy parameter and m is the total no.
… … of ants.
… & … (5)
… … 3.3 Proposed Algorithm
Now, the control problem in this paper can be Using the same technique used in (Tan, Zeng ,He &
formulated as follows: Guangchao, 2005) or the ant system optimization,
Given a plant G(s) to be controlled (Figure 1), we can modify the design algorithm presented in
determine the optimum values of the parameters (Cordon et al., 2001) to take into account the
matrices a & b that are existed in the consequence presence of T-S fuzzy system. The proposed AS
part of the T-S fuzzy rule base using ant system Algorithm based T-S Fuzzy optimal parameter
algorithm, hence, find the optimal PID parameters determination can be summarized as follows:
Kp, Ti and Td so that the control system has the
minimum value of given performance criterion “F” Step 1: Determine Kpo, Kio and Kdo using the
(3). Figure 1 depicts the closed loop control system classical Ziegler-Nichols tuning formula for a given
used in this paper. control system with a PID controller and compute
Takagi Sugeno Fuzzy Tuner
the system's performance indexes and esso.
e
T-S Fuzzy T-S Fuzzy
Sys 2
T-S Fuzzy
Sys 3
Step 2: Specify the initialization parameters of our
Sys 1
proposed problem that contain the following:
PID
Controller  Values of , , , and m.
Ant Sys. Fine Tuner Kd
+
 The maximum number of iterations tmax.
SP + + y(t)
e Kp G(S)
 A one-dimensional array Pathk with 108
+
Ki
elements. Array Pathk can be used to denote the
moving path of ant k. In our case, the initial
Figure 1: The Proposed Closed loop Control System. values of this array (Pathk-initial) are all set to 1.
Step 3: Set the iteration counter t=1 and then place
We assume that the value of each parameter inside
all of the m ants at the origin O.
the matrices a & b has two digit; one digit before
decimal point and the other after the decimal point. Step 4: Set i=1. Step 5: Set k=1.
Using ant system optimization frame work a planar
Step 6: Compute the transition probability of each
structure of 10 rows and 108 lines is adopted. 10
node on line Li using the following formula
rows mean the number of 0~9; 108 lines mean 108
bits of 54 parameters aij and bij. The nodes of , , , ,
, ,
lines(1~2)is the 1st~2nd bit of a11; ∑ , , , ,
line(3~4)is the 1st~2nd bit of b11; line
(5~6)is the 1st~2nd bit of a12; line (7~8)is Where , , is the visibility of node (i, j) and
| |
the 1st~2nd bit of b12 and so on till a39 & b39. So, defined as: , , Where the values of
in the PID control AS, there are totally 1080 nodes. j* are set in the following way:
nij is used to denote the node j on line Li. The y  In the first iteration of the AS algorithm, the
coordinate of the node nij is denoted by j. Let an ant values of j* (i=1-108, j=0-9) are assigned from the
depart from the origin O. In its each step forward, it different values of the one dimensional array Pathk-
chooses a node from the next line Li (i=1, 2, …, initial.
108) and then moves to this node along the straight
line. When it moves to a node on line L108, it  In each of the following iterations, j* are
completes one tour. Its moving path can be determined from the calculated one dimensional
expressed as Path={O, n1j, n2j, …, n108j}. Obviously, array Pathk (it contains different entities of matrices
the elements of a & b matrices represented by this a & b) that is corresponding to optimal traveling
path can be computed by the for loop Matlab code: path generated in the previous iteration by the ants.
α&β represent respectively the relative importance
k=1; for i=1:3; for j=1:9 of the pheromone concentration and visibility in
a(i,j)=path(1,k,m)+path(1,k+1,m)*1e-1; transition probability
b(i,j)=path(1,k+2,m)+path(1,k+3,m)*1e-1; (6)
k=k+4; end; end Step 7: Based on the calculated transition probabili-

116
TUNING METHOD FOR PID CONTROL SCHEME - A Blended Ant System Optimization Technique with Takagi
Sugeno Fuzzy System

ty in the previous step and using Roulette wheel ASO Algorithm based T-S Fuzzy PID control is
selection method, select a node on line Li for ant k applied to the following control systems.
and move ant k to this node, then save the y
Case 1 (High-Order System):
coordinate of the node into the ith element of Pathk. 1
Step 8: Set k←k+1. If k ≤m, go to Step 6; 1 1 0.01 1 0.05 1 0.2
Otherwise, continue.
Case 2 (Second Order System):
Step 9: Set i←i+1. If i ≤ 108, go to Step 5;
1
Otherwise, continue.
1.6 1
Step 10: For each ant k (k=1, 2, …, m): according to
Case 3 (Time delay System):
Pathk, compute different entities values of matrices a
& b using formula (5). , 0.1, 1, 5.
1
Step 11: For each ant k (k=1, 2, …, m): evaluate the
A unit step experiment is performed on a closed loop
PID gain values from the T-S fuzzy system
control system that is consisted of G(s) and T-S
according to formula (2).
fuzzy PID controller for each case. This controller is
Step 12: For each ant k (k=1, 2, …, m): perform a tuned via Ant System algorithm. The parameters
simulation experiment using the calculated matrices setting of the proposed algorithm are:
a & b and compute the system's performance 100, 0.5 & 1
indexes , & , then compute the performance The unit step responses of the control system
criterion Fk using formula (3). with the proposed Takagi Sugeno fuzzy ant system
Step 13: Compare all of the obtained Fk values and PID controller (TSFASPID) are shown in Figure 2,
find the optimal ant path of this iteration (Pathk- Figure 4 & Figure 4 for all the cases. Figure 5 shows
the performance criterion (F) convergence process
optimal), that has minimum value of the performance
criterion (i.e. mink Fk, k=1,2,…,m). Save the Pathk- of the controlled system for case 1. From Figure 5,
the optimal solution can be obtained within 10
optimal and the corresponding optimal PID gains.
iterations which reveal very fast convergence speed.
Step 14: Set each element of Pathk to 0, k=1, 2,…, Figure 6 depicts the unit step response of the control
m. system using ant system PID controller (ASPID),
Step 15: Update the pheromone concentration of Ziegler-Nichols PID controller (ZNPID) and Takagi-
each node on the moving ant path using the Sugeno fuzzy ant system PID controller for case 1.
following updating rule: , , 1 , , Obviously in this case, the TSFASPID controller has
Δ , &Δ , ∑ Δ , smaller overshoot value than the ZNPID controller
and better control performance than ASPID in terms
Where 0 1 is the pheromone decay of settling time, and rising time.
parameter; Δ , is the amount of pheromone laid
1.4
at nij by ant k in the iteration just completed and
computed by the following formula: 1.2

1
.
Δ ,
Unit Step Response

0.8
0
0.6
Where Fk is the value of performance criterion of ant
k in the iteration just completed and computed by the 0.4

formula (3); Q is a positive constant. 0.2

Step 16: Set t←t +1. If t< tmax and all of the m ants 0
0 5 10 15 20 25 30
do not make the same tour, place all the ants at the Time (sec.)

origin O and go to Step 4; if t< tmax but all of the m Figure 2: the unit step response of the control system using
ants make the same tour or t = tmax, ; stop. ASTSFPID controller case1.

4 SIMULATION EXAMPLE 5 CONCLUSIONS


To validate the algorithm proposed in this paper, In this paper, an optimal Takagi Seguno fuzzy PID

117
ICFC 2010 - International Conference on Fuzzy Computation

controller is determined using ant system algorithm.


The proposed ant system algorithm search for the
optimal parameters of the consequent part of the
Takagi Seguno fuzzy system that is in turn produces
the optimal PID gains. The proposed algorithm is
easily implemented, has a good convergence
property and has an efficient searching ability for the
optimal PID controller.
1.4

1.2

1
Figure 6: Unit step response of the controlled system using
Unit Step Response

0.8 3 different controllers –case 1.


0.6

0.4
REFERENCES
0.2

Yun Li, Kiamheong Ang, and Gregory C. Y. Chong, 2006.


0
0 10 20 30 40 50 60 70 80 90 100 PID Control System Analysis and Design; Problems,
Time (sec.)
Remedies and Future Directions, IEEE Control Sys-
Figure 3: the unit step response of the control system using tem Magazine.
ASTSFPID controller case 2. Varun Aggarwal, Meng Mao and Una-May O’Reilly,
2008. A Self-Tuning Analog Proportional – Integral –
Derivative (PID) Controller, Proceedings of the first
1.2
NASA/ESA conference on Adaptive Hardware and
Systems
1 M. A. Johnson and M. H. Moradi, 2005. PID Control.
Springer Science Business Media.
Unit step response

0.8
S. R. Vaishnav and Z. J. Khan, 2007. Design and
0.6 Performance of PID and Fuzzy Logic Controller with
Smaller Rule Set for Higher Order System,
0.4
Proceedings of the World Congress on Engineering
0.2 and Computer Science, San Francisco, USA.
A. Visioli, 2001. Tuning PID Controllers with Fuzzy
0
0 10 20 30 40 50 60 70 80 90 100 Logic, IEE Proc. Control Theory and Applications,
Time (sec.)
Vol. 148 (1).
Figure 4: the unit step response of the control system using S. Bhattacharya, A. Chatterjee and S. Munshi, 2003. An
ASTSFPID controller case3. Improved PID-type Fuzzy Controller Employing
Individual Fuzzy P, Fuzzy I and Fuzzy PID
Performance Criterion Evolution Controllers, Transaction of the Institute of
40
Measurements and Control Vol. 25 (4), pp. 352-372.
35 Lin, C. T. and Lee, C. S. G., 1996. Neural Fuzzy Systems:
A Neural-Fuzzy Synergism to Intelligent Systems.
30
Englewood Cliffs: Prentice Hall.
25
Cordon, O., Herrera, F., Hoffmann, F. and Magdalena, L.,
Value of F

2001. Genetic Fuzzy Systems: Evolutionary Tuning


20 and Learning of Fuzzy Knowledge Bases. Singapore:
World Scientific.
15
Abdel Badie Sharkawy, 2006. Genetic fuzzy self tuning
10
PID controllers for antilock braking systems",
Alexandria Engineering Journal, Vol. 45, No. 6, pp.
5
0 10 20 30 40 50 60 70 80 90 100
657-673.
Number of iterations Hadi Nobahari, Seid H. Pourtakdoust, 2005. Optimization
Figure 5: convergence tendency of the performance of fuzzy rule bases using continuous ant colony
criterion F -case 1. system. Proceeding of the first International
Conference on Modeling, Simulation and Applied
optimization, Sharjah, U.A.E, February 1-3.

118
TUNING METHOD FOR PID CONTROL SCHEME - A Blended Ant System Optimization Technique with Takagi
Sugeno Fuzzy System

Tan Guan-zheng and Dou Hong-quan, 2007. ACS


algorithm-based adaptive fuzzy PID controller and its
application to CIP-I intelligent leg. J.Cent. South Univ.
Technol. (2007)04-0528-09, Springer,
Karl O. Jones, André Bouffet, 2007. COMPARISON OF
Ant Colony Optimisation And Differential Evolution.
International Conference on Computer Systems and
Technologies- CompSysTech’07.
Guanzheng Tan, Qingdong Zeng, Shengjun He and
Guangchao, 2005. Adaptive and robust design for PID
controller based on ant system algorithm. Lecture
Notes in Computer Science, SpringerLink, Volume
3612/2005
A. H. Besheer and H. R.Emara, 2009. Relaxed LMI Based
designs for Takagi Sugeno Fuzzy Regulators and
Observers; Poly-Quadratic Lyapunov Function
approach. Proceedings of the IEEE International
Conference on Systems, Man, and Cybernetics San
Antonio, TX, USA.
Ziegler, J. G., Nichols, N. B., 1942. Optimum Setting for
Automatic Controller. ASME transaction, pp.759-768.
Dorigo M, V. Maniezzo and A. Colorni, 1996. Ant system
Optimization by a colony of cooperating agents”,
IEEE Transaction on Systems Man and cybernetics –
part B, 26 (1), pp. 29-41.

119

You might also like