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

Proceedings of the 2006 IEEE

International Conference on Mechatronics and Automation


June 25 - 28, 2006, Luoyang, China

Optimal design of Fuzzy controller based on Ant colony


algorithms
Weixing Zhu and Jianliang Chen Binjie Zhu
School of Electrical and Information Engineering Department of Electronic Engineering
Jiangsu University Tsinghua University
Zhenjiang,China 212013 Beijing, China 100084
wxzhu@ujs.edu.cn; cjlonly@126.com shubj03@mails.tsinghua.edu.cn

Abstract- In the design of the fuzzy controller, the fuzzy many different discrete optimization problems. Recent
rules are constructed according to the knowledge and experience applications cover problems VXFK DV vehicle routing,
of experts. It will be hard to design a good fuzzy controller when sequential ordering [7], graph coloring, routing in
the experiences of experts are not available or not complete.
Therefore, how to optimize initial the fuzzy rules becomes the
communications networks [6] ,and so on. In this paper, the
key of design of a good fuzzy controller. Ant colony algorithm is fuzzy rule-base will be automatically constructed and
a novel simulated evolutionary algorithm. It provides a new optimized by using the ant colony algorithm in order to obtain
method to solve the complex combined optimization problem. a suitable fuzzy controller with good dynamic performance
This paper takes advantage of the ant colony algorithm to and static performance. Before using the ant colony algorithm
optimize the fuzzy rules of a fuzzy controller, and can settle the into optimization of fuzzy rules, some appropriate
problem of designing fuzzy controller without the expert’s modifications to the ant colony algorithm will be made. The
experience. The simulating results show that the fuzzy controller results of the simulation prove the good performance of the
designed has the desired dynamic and static performance. fuzzy controller and the feasibility of the algorithm
Keywords-fuzzy controller, Optimal design, ant colony
application.
algorithm, combined optimization Ċ. ANT COLONY ALGORITH
Ant colony algorithm is inspired by the observation of real ant
ĉ. INTRODUCTION colonies. It is proposed first by Italian scholars M.Dorigo, and
Fuzzy control is a practical alternative for a variety of his colleagues. While walking from food sources to the nest,
challenging control applications since it provides a convenient ants deposit on the ground a substance called pheromone,
method for constructing nonlinear controllers via the use of forming in this way a pheromone trail. The ants communicate
heuristic information. Such heuristic information may come with one another by means of pheromone trails and exchange
from an operator who has acted as a “human-in-the-loop” information about which path should be followed. The more
controller for a process. In the design of the fuzzy controller, the number of ants traces a given path, the more attractive this
the fuzzy rules which are incorporated into a fuzzy controller path (trail) becomes and is followed by other ants by
to emulate the decision-making process of the human are depositing their own pheromone. According to this principle
constructed according to the knowledge and experience of of positive feedback, the ant colony can find the shortest route
experts. It will be hard to design a good fuzzy controller when between the nest and the food sources quickly[8][9][10]. As
the experiences of experts are not available or not complete. shown in Fig. 1, two ants start from their nest in search of
Therefore, how to optimize initial the fuzzy rules becomes the food source at the same time to different directions. One of
key of design of a good fuzzy controller. Construction of them chooses the path that turns out to be shorter while the
fuzzy rules is similarly a combined optimization problem. other takes the longer sojourn. The ant moving in the shorter
Moreover, it will become an NP-hard problem with the path returns to the nest earlier and the pheromone deposited in
number of premises and consequents increasing. Several this path is obviously more than what is deposited in the
algorithms have been proposed in literature to solve combined longer path. Other ants in the nest thus have high probability
optimization problem [12]. Recently, evolutionary and of following the shorter route. These ants also deposit their
meta-heuristics like, tabu search, genetic algorithms and own pheromone on this path. More and more ants are soon
simulated annealing have been successfully employed for attracted to this path and hence the optimal route from the nest
such problem. to the food source and back is very quickly established. Such
Ant colony algorithm is a novel simulated evolutionary a pheromone-meditated cooperative search process leads to
algorithm. It has been applied to solve difficult combinatorial the intelligent swarm behavior.
optimization problems such as the traveling salesman problem In the application of ant colony algorithm, the artificial

(TPS) and the quadratic assignment problem (QAP) [2]. There ants’ nature is an abstraction of those behavioral traits of real
are currently many ongoing activities in the scientific ants. In order to implement the ant colony algorithm, the
community to extend and apply ant colony algorithms to combinatorial optimization problem under consideration has

1-4244-0466-5/06/$20.00 ©2006 IEEE


1603
St ar t

I ni t i al i ze Model

t =0

t =t +1

k=0

k=k+1

Const r uct Tr i al

I t er at i on
Sol ut i on

fig. 1 Movement of ant algorithm from nest-food source and back: Cal cul at e Cost

to be constructed as G=(D,L,C), where D = {d1 , d 2 , " , d n } k=m?


No

is a set of points at which decisions have to be made, Yes


L = {l i ( j ) } is the set of options (j) available at each decision Updat e Pher omone
points (i), and C = {ci ( j ) } is the set of costs associated with
No
options L = {li( j ) }. A feasible path over G is called a solution Meet t er mi nat i on
cr i t er i a?

( ϕ ) and a minimum cost path is an optimal solution ( ϕ ∗ ). Yes


The cost of a solution is denoted by f (ϕ ) and the cost of the St op

optimal solution by f (ϕ ∗) [1]. The ant colony algorithm is


Fig.2 the flowchart of ant colony optimization algorithm

used to find a minimum cost path----an optimal solution. The pheromone associated with option l i ( j ) at iteration t;
main steps in the algorithm are shown in Fig.2 and include:
η i ( j ) = 1 / d i ( j ) is the local heuristic factor; and ¢and £ is
trial solutions are constructed incrementally as artificial ants
move from one decision point to the next until all decision the exponent parameters that control the relative importance
points have been covered. The generation of a complete trial of pheromone and the local heuristic factor. It should be
solution and calculation of the corresponding cost are noticed that the addition of the local heuristic factor η i ( j ) is
completed in the same cycle. Pheromone is updated after the analogous to providing real ants with sight, which is
completion of one iteration. A iteration consists of m cycles, sometimes called “visibility”. Moreover, the using of the
where m is the number of ants used. taboo table makes sure that each point could be visited only
For example, a general definition of the traveling once, which means providing artificial ants with memory.
salesman problem is the follow [2]. Consider a set of N nodes, Once an iteration has been completed, and m trial
representing cities, and a set of L arcs fully connecting the solutions have been constructed, the pheromone trails are
nodes N. Let d ij be the length of the arc (i , j ) ∈ L , that updated, which use the form of the equation as follows:
is , the distance between city i and j, where i , j ∈ N . The τ i ( j ) (t +1) = ρτ i ( j ) (t ) + Δτ i ( j ) ˄2˅
TSP is the problem of finding a minimal length Hamiltonian where τ i ( j ) (t + 1 ) presents concentration of pheromone
circuit on the graph G = ( N , L ) , where a Hamiltonian associated with option l i ( j ) at iteration t+1; τ i ( j ) (t )
circuit of graph G is a closed tour visiting once and only once
presents concentration of pheromone associated with option
all the nodes of G, and its length is the sum of the lengths of
all the arcs. l i ( j ) at iteration t; ² ˄ 0 ≤ ρ ≤ 1 ˅ is the remaining
A cost set of C could present the set of choose from city i coefficient of pheromone; Δτ i( j )
is the change in
to city j, which is associated with the concentration of
pheromone concentration associated with option l i ( j ) at
pheromone and the length of arc in the trial solution. At each
decision point of constructing trial solution, the component to iteration t. Δ τ i ( j ) is calculated using the function as follow:
be added to the trial solution is chosen stochastically m
according to the following equation [2] : Δ τ i( j ) = ¦ Δτ k
i( j )
(3)
p i ( j ) (t ) =
k
[τ i ( j ) (t )]α [η i ( j ) ]β (1) k =1

¦ li ( j )
[τ i( j ) (t )]α [η i ( j ) ]β where Δ τ ik( j ) presents the change in the concentration of

where p ik( j ) (t ) is the probability of option l i ( j ) is chosen pheromone associated with option l i ( j ) at cycle k during

τ i ( j ) (t ) is the concentration of
iteration t. the value of Δ τ ik( j ) is given as follow:
at cycle k and iteration t;

1604
Inf erence

Def uzzi f i cat i on


r+ e u The control system is considered as in Fig.2. The

Fuzzi f i cat i on
mechani sm y
ƶ Process Process (plant) to be controlled will be replaced by a typical
- transfer function [5] G(s)=K/[s(Ts+1)], let K=300,T=250. The
d input scaling factors of the fuzzy controller are respectively
Rul e- base
dt
chosen as g1=1.8, g2=4, and its output scaling factor is chosen
as h=0.5. The reference response is initialized according to
Fuzzy cont rol l er Opt i mi zat i on
cri t eri a
desired performance such as rise time, overshoot, settling time
and steady-state error, and is represented by f(t):
Fig.3 the main architecture of fuzzy control system
Every fuzzy rule in the fuzzy system is in the form of
IF E is Ai AND EC is B i THEN U is C i
There are two inputs in the system and every input has
­ R if optionli( j ) is chosenat cyclek seven fuzzy values to be chosen. Hence the total number of
° ˄4˅
Δτ ik( j ) = ® f (ϕ)k rules in maximum fuzzy rule set is 49 (7h7). Because the
°¯ 0 otherwise
only output has seven fuzzy values to be chosen, the solution
where R represents pheromone reward factor; f (ϕ )k space is a 49h7 matrix. The Mandani operation is considered
presents cost of the trial solution generated at cycle k. It is and the method of center of gravity is used for defuzzification
noteworthy that the better the trial solution, and hence the in the optimal design of fuzzy controller.
lower the cost, the larger the amount of pheromone added.
The stopping criterion generally used is the completion of Č. THE APPLICATION AND THE RESULT
a certain number of cycles.
The parameters of the ant colony algorithm should be
ċ)8==<&21752/6<67(0 appropriately chosen. The number of iteration
NC_MAX=200, number of ants m=40, the remaining
In order to apply the ant colony algorithm into the coefficient of pheromone ² =0.9 (chosen according to a
optimization of the fuzzy rules, a fuzzy control system should number of simulating tests ). The algorithm is programmed
be firstly designed. The main architecture of the system is follow the steps in Fig.1. The set of linguistic-numeric
shown in Fig.3. descriptions for the input and output membership functions
The rule-base has all fuzzy rules of the fuzzy will be renumbered as 0~6 so that the arrays in the program
controller. All fuzzy rules will be optimized according to can be used. Rule[49] represents the rule-base to be
the optimization criteria. In this paper, the fuzzy controller optimized, and ´ [49][7] represents the concentration of
has two inputs and one output. The linguistic variables of pheromone on the route to be chosen from each premise to the
the inputs are respectively represented by E (error) and EC consequent.
(change-in-error), and the linguistic variable of the output Running the ant colony algorithm in each sampling
is represented by U. Each of the linguistic variable has period:
seven linguistic values, which is set by NB, NM, NS, ZE, gConstruct trial solution: chose the consequent with the
PS, PM and PB. The shape of all Membership functions is pheromone matrix
triangle, seeing in the Fig.4. ´[49][7], construct the temporary rule-base temp[49],
For the application of ant colony algorithm, the fuzzy rule calculate the real output y(kT) with the temp[49], e(kT),
optimization problem should be constructed as the form G= ec(kT) and u(kT).
˄DˈLˈC˅, where D represents the set of premises; L gCalculate cost: calculate the error=|y(kT)-f(kT)|, save
represents the set of choice from premise to consequence, C the temp[49] to the rule[49] when the error is the
is the cost set of each choice. The cost set is only associated minimum one.
with the concentration of pheromone. In the process of gUpdate pheromone: the pheromone at every route is
constructing trial solution in Fig.1, the equation (1) is used to updated according to the coefficient
calculate the probability of each option, where two parameters (1-²), adding the values of ´[49][rule[49]].
are set as£=0ˈ¢=1DŽ When choosing the consequents according to the
concentration of pheromone, the strategy of choice in the ant
NB NM NS ZE PS PM PB colony algorithm is considered. In order to apply the
1
algorithm better, some modifications have been made [3][11].
Based on the above, another modification has been made in
this paper so that it can be applied in the optimization of fuzzy
rule. The modification of the strategy of choice in ant colony
0 algorithm is as follow:
- 10 - 8 - 6 - 4 - 2 0 2 4 6 8 10
Fig.4 Membership function

1605
­ arg max {τ i ( j ) }, if r ≤ p 0 ,
° τ
° k (5)
s = ® pi( j) = 7
i( j)
, else
° ¦ τ i( j )
°¯ j=0

where p 0 ∈ (0 ,1 ) , r is a random number uniformly


distributed between (0,1). p 0 is considered as a variable
relative to the iteration t, so that the search space would be
expanded and the speed of convergence has little influence. It
is useful for expanding the search space to specify p 0 a
small value in the initial period of the algorithm and for
expediting the convergence to specify p 0 a larger value in b
the final period of the algorithm. One of the important part of Fig.5 Result of step response with optimized rule-base
the ant colony algorithm is the pheromone updating, which is
relative to the evaluating criteria. The updating form of
pheromone of the formula (4) is modified as č. CONCLUTION
It is successful to apply the ant colony algorithm to solve
­c if option li( j ) is chosen at cyclek
Δτ ik( j ) = ® (6) the fuzzy rule optimization problem. A feasible method is
¯0 otherwise given to design the optimal fuzzy controller without expert’s
˄c is a constant valueˈin this paper it is valued as 20˅DŽ experience. The simulating result shows that the fuzzy
The testing interface shows in Fig.5, which is controller with the optimal fuzzy rule-base has the good
programmed with Visual C++. The result of the test shows on performance. That is to say, Different performance
the interface, The solid line is the reference response˄desired requirement of the fuzzy controller could be satisfied
response˅ and the dash line is the real response after the according to different reference response line which the
optimization of rule-base. Fig.5a shows the result of step designer set and the interrelated optimal rule-base is obtained,
response without overshoot. Fig.5b shows the result of step However, in this paper, each of the input scaling gains and the
response with some overshoot. The results of tests show that output scaling gain used in the optimization is a constant, so
the good effect of application of ant colony algorithm to that the optimization is limited. The next important work is to
optimization of fuzzy rules. optimize the scaling gains while the fuzzy rules is optimized.
In that case, the fuzzy controller will be optimized integrally
and has much better dynamic and static performance.

ACKNOWLEDGMENT
The authors would like to thank professor Xincheng Li
and Dr. Changhua Ma for their helpful suggestions,
discussions and comments. Furthermore, This work was
supported by international cooperation plan of Jiangsu
provice(BZ2002055) and advanced research & development
project of Jiangsu University(JDG2003004).

REFERENCES
[1] Holger R. Maier; Angus R. Simpson; Aaron C. Zecchin; Wai Kuan
Foong; Kuang Yeow Phang; Hsin Yeow Seah; and Chan Lim Tan
“Ant Colony Optimization for Design of Water Distribution Systems”
JOURNAL OF WATER RESOURCES PLANNING AND
MANAGEMENT © ASCE / MAY/JUNE 2003
[2]Marco Dorigo, Gianni Di Caro and Luca M.Gambardella. Ant Algorithms
for Discrete Optimization [A] Artificial Life Volume 5, Number 2
[3]ZHANG Ji-hui, GAO Qi-sheng, XU Xin-he. A Self-Adaptive Ant Colony
Algorithm
a [J]CONTROL THEORY AND APPLICATIONS Vol.17,No.1 Feb.2000
[4]XU Jingming, CAO Xianbin, WANG Xufa. Misunderstandings and
Counter Measures on Problem Solving by Ant Colony
Algorithm[A]Computer Engineering. Vol.30 No.16 August 2004
[5]MA Changhua, ZHU Weixing. The Effects of Scaling Factors on the
Dynamic Performance of Fuzzy Controller[A]Journal of Jiangsu University
of Science and Technology(Natural Science). Vol.21 No.5 Sept.2000

1606
[6] Gianni Di Caro ,Marco Dorgo AntNet : Distributed Stigmergetic Control [11]DUAN Hai-bin, WANG Dao-bo Research improvement on the global
for Communication Networks[J ] . Journal of Artificial Intelligence Re2 convergence of ant colony algorithm[A] Systems Engineering and
search , 1998 (9) : 317 - 365. Electronics Vol.26 No.10 Oct.2004
[7]Gambardella, L.M., Dorigo, M. HAS-SOP: an hybrid ant system for the [12]P.S. Shelokar, V.K. Jayaraman, B.D. KulkarniAn ant colony approach
sequential ordering problem. Technique Report, No.IDSIA 97-11, for clustering. P.S. Shelokar et al. / Analytica Chimica Acta 509 (2004)
Lugano:IDSIA,1997 187–195
[8]A Colorni, M Dorigo, V Maniezzo. Distributed optimization by ant
colonies [A] Proc 1st European conf artificial life Pans, France˖
[13] Libao Shi, Jin Haoa, Jiaqi Zhoub, Guoyu Xu. Ant colony optimization
algorithm with random perturbation behavior to the problem of optimal
Elsevierˈ1991˖ 134~142 unit commitment with probabilistic spinning reserve determination. L.
[9]A Colorni, M Dorigo, V Maniezzo. An investigation of some properties of Shi et al. / Electric Power Systems Research 69 (2004) 295–303
an ant algorithm [A] Proc PPSN '92 ˖ 509̚520 [14] ZHOU Wei, LIU Fen-lin, WU Hao, WANG Qing-xian. Dynamical
[10]XIN Bin-jian, WANG Lei, WU Qi-di Research and Applications simulation of simple an t systems [A]Control and Decision Vol.18 No.3
of Ant Colony System Algorithm and Its Hardware Realization [J] May.2003
JOURNAL OF TONGJI UNIVERSITY Vol .30 No.1 Jan. 2002

1607

You might also like