Adaptive Control of Nonlinear System Using Neuro-Fuzzy Learning by PSO Algorithm Mourad Turki1, Sana Bouzaida1, Anis Sakly1, Faouzi M’Sahli1 1 Research Unit Etude des Systèmes Industriels et Energies Renouvelables, The National School of Engineers of Monastir, Tunisia
[email protected],
[email protected],
[email protected],
[email protected]
Abstract—This paper proposes the optimization of parameters of neuro-fuzzy system using the particle swarm optimization. Neuro-fuzzy techniques have emerged from the fusion of neural networks and fuzzy inference systems. They could serve as a powerful tool for system modeling and control. These fuzzy systems are optimized by adapting the antecedent and consequent parameters. Among them, the ANFIS use the least square to optimize the consequent parameters and retropropagation to train the antecedent parameters. Several learning algorithms of fuzzy models have been proposed, e.g. evolutionary algorithms, such as particle swarm optimization. These different methods have been developed to learn the parameters of neuro-fuzzy system and to test them in the on-line control of nonlinear system.
I.
presented. Section IV detailed the learning algorithm with PSO. The simulation and application of ANFIS and PSO in the on-line control of nonlinear system are presented in section V. Section VI presents conclusions. II.
A. ANFIS structure The ANFIS combines two approaches: neural networks and fuzzy systems. This makes it possible to combine the advantages of each technique. The ANFIS, given in Fig. 1, is composed of two parts: the first is the antecedent part and the second is the conclusion part, which are connected to each other by fuzzy rules based in network form.
INTRODUCTION
A1
Fuzzy systems and neural networks are both very popular techniques that have seen increasing interest in recent decades. The fuzzy neural networks benefits from the advantages of the two techniques. Many different structures for fuzzy neural networks have been proposed [1]. Among them, we can note the ANFIS which is a neural network based on fuzzy approach. In this system, the learning procedures are performed by interleaving the optimization of the antecedent and conclusion parts parameters. Many learning algorithms of fuzzy models have been proposed [2]. The backpropagation algorithm is the most widely used and considered as a powerful training technique for fuzzy models by means of error propagation via variation calculs. However, the backpropagation learning algorithm using the gradient decent technique may reach the local minima and the global solution may never be found.
x1 A2
x1 ∏
x2
N
y ∑
B1
x2
∏
N
Layer 2
Layer 3
Layer 5
B2
Layer 1
x1
x2
Layer 4
Figure 1. Structure of ANFIS
The ANFIS implements a Takagi Sugeno Fuzzy inference system and composed by five layers [3].
The aim of this study is to use particle swarm optimization for optimizing the antecedent and consequent parameters and to compare with the ANFIS system to control the temperature of a water bath system. The rest of this paper is outlined as follows. Section II describes the concept of ANFIS model, which will be used in this paper. In section III, the particle swarm optimization is
978-1-4673-0784-0/12/$31.00 ©2012 IEEE
THE CONCEPT OF ANFIS
The first layer executes a fuzzification process, the second layer executes the fuzzy AND of the antecedent part of the fuzzy rules, the third layer normalizes the MFs, the fourth layer executes the conclusion part of fuzzy rules, and the last layer computes the output of the fuzzy system by summing up the outputs of layer four.
519
Where x and v represent respectively the position and velocity of the particle. c1 and c2 are positive constants namely acceleration constants. r1 and r2 are random numbers between 0 and 1. pbest is the best position found by the particle. gbest is the global best position and finally w is the inertia weight.
B.
Training method A neuro-fuzzy system is optimized by adapting the antecedent parameters (membership function parameters) and consequent parameters (the polynomial coefficients of the consequent part). The famous training algorithm for ANFIS is the algorithm that uses the gradient method (GD) to update antecedent parameters and the least squares method (LSE) to update conclusion part parameters.
IV.
LEARNING ALGORITHM WITH PSO METHOD The learning algorithms of most fuzzy inference systems rely on the classic methods such us GD and LSE used in ANFIS. However, when we use classic methods to train antecedent and consequent parameters, there is a high probability to fall in local minima [5]. To overcome this drawback, the particle swarm optimization "PSO" has been used and provide efficient tools for performing structural optimum designs [6].
A step in the learning procedure is composed of two passes: forward pass and backward pass. In the forward pass, the optimal consequent parameters are estimated by LSE method, while the antecedent parameters are assumed to be fixed. In the second pass, backpropagation is used to modify the antecedent parameters, while the consequent parameters calculated in forward pass remain fixed. The antecedent parameters are updated by the gradient method.
cij (t ) = cij (t − 1) − α (∂E (t ) / ∂cij )
In this paper, we use an evolutionary technique based on PSO to adjust both the antecedent and the consequent parameters.
(1)
The structure of a particle in the evolutionary technique is shown in Fig. 2. It shows a fuzzy rule, where cij and σij represent a Gaussian membership function with mean and deviation, respectively, of the ith dimension and jth rule node, and wij represent the consequent parameters.
σ ij (t ) = σ ij (t − 1) − α (∂E (t ) / ∂σ ij ) Where E (t ) =
1 ( yd (t ) − y (t )) 2 2
M1
(2)
cij and σij are respectively the center and the standard deviation values of each input xi to the jth Gaussian membership function. y is the output system and yd the desired output. α is the learning rate for antecedent parameters and E(t) is the instantaneous square error.
M2
Figure 2.
W2
…..
W22
…
Structure of a particule
The procedure of adapting parameters in neuro-fuzzy systems employs PSO method to adjust both the antecedent and consequent parts in the same time. The detailed process of the learning algorithm with PSO is described as follow:
The PSO was developed from observations of the social behavior of animal, including bird flocking and fish schooling [4]. It works by having a population called swarm of candidate solutions called particles. These particles are attracted towards the best solution found by the particle and it’s neighborhood. Each particle has a position and velocity vector representing the potential solution to the problem.
•
Initiation: initialize the particle’s position with a random vector of the search space.
•
Fitness based position update: the particle adjusts the velocity and position according to the location of the best fitness achieved by the particle itself (pbest) and the location of the best fitness achieved across the whole population (gbest).
•
Convergence: the process is repeated until a termination condition has been reached.
The PSO use the following equations to update its velocity and position:
x (k + 1) = x ( k ) + v ( k + 1)
W1
c11 σ11 c21 σ21 c12 σ12 ... w12
III. PARTICLE SWARM OPTIMIZATION PSO The particle swarm optimization (PSO) is an evolutionary computational model that optimizes a problem by improving a candidate solution. It can search solutions in a very large space of candidate solutions.
v(k + 1) = wv(k ) + c1r1 ( pbest − x(k )) + c2 r2 ( gbest − x(k ))
…….
(3) (4)
520
V. SIMULATIONS In this section, the ANFIS algorithm and the algorithm based on PSO are applied for the on-line control of the temperature of a water bath system, which is nonlinear and can be described by this equation of difference:
y (k + 1) = e
−α Ts
β (1 − e−α Ts ) α y (k ) + u (k ) + (1 − e−α Ts ) y0 0.5 y ( k ) − 40 1+ e
z-1
yref(k+1)
u
Control with the inverse model
On-line parameters adaptation
eu
THE INITIAL PARAMETERS BEFORE TRAINING FOR PSO
Figure 3. On-line strategy of control
METHOD
Values
Population size
200
b1
2
b2
2
wmax
0.9
wmin
0.4
To test the performance of ANFIS and PSO methods, we use two tasks. The first task is to control the simulated system to follow three set-points:
yref
⎧35°C for k ≤ 40 ⎪ = ⎨55°C for 40