2010 7th International Multi-Conference on Systems, Signals and Devices
Fuzzy Optimal Control of Nonlinear Systems
Emna Kolsi, Nabil Derbel School of Enginnering of Sfax, University of Sfax, Tunisia
Abstract
This work is aimed at looking into the fuzzy optimal control of nonlinear systems detailing adopted mechanisms and approaches in order to be able to control these systems. First of all, the nonlinear systems have been modeled by Sugeno fuzzy systems. Then, three approaches have been considered. In the first one, a local approach to obtain fuzzy models has been applied. The second one is a global fuzzy optimal control procedure. The third one consists in the use of genetic algorithms to optimize parameters of fuzzy controllers. At the end of this work, a comparative study between considered approaches has been presented. It has been found that (i) the global approach gives better results, (ii) the optimized fuzzy controller by genetic algorithms presents a slight sub-optimality, and (iii) the local approach gives also a slight sub-optimality.
Keywords
Optimal control, Fuzzy modeling, Nonlinear systems, Genetic Algorithms.
1 Introduction
Nonlinearities and uncertainties are always bothersome in controlling a real system, since a physical system is usually ill-known, is difficult to describe and has few measurements available, or is highly nonlinear. Different design techniques were developed for modeling and control of nonlinear systems. An important approach is to model the considered nonlinear systems as Takagi-Sugeno (T-S) fuzzy system [1].
The optimality is the most important requirement for any control system. In the linear case, the optimization problem is resolved by determining an optimal feedback of a Ricatti equation[2]. This type of controller is known under the name of a Linear Quadratic Regulator problem (LQR). However, for nonlinear systems, the problem requires the resolution of from Hamilton-lacobi-Bellman equation which represents a partial derivative equation [3].
978-1-4244-7534-6/10/$26.00 mOIO IEEE
1
In the case of the stabilization of TS models, several works concerning the optimal, or rather suboptimal control have been published. Indeed, Li et al [4] treated the concept of the sub-optimality applied to discrete and continuous systems. In reference [5], authors propose a design method of an optimal fuzzy controller with finite and infinite horizons for continuous and discrete TS models. In the same context, reference [6] presents a global approach, i.e., a global optimal fuzzy controller at free horizons (fixed) and infinite horizon. In reference [7], an optimal controller with constraints on the control was proposed.
Genetic algorithms are important optimization methods. In fact, in the literature, many articles treat the adjustment of fuzzy controllers using stochastic methods, such as genetic algorithms. As example, Hoffmann [8] proposed an adjustment approach based on this type of methods. An evolutionary strategy makes it possible to regulate the normalization gains as well as membership functions of the fuzzy controller. Then, in the second time, the rule base is defined by means of a genetic algorithm. These studies were improved by Zhou and Lai [9]. Indeed, the rule base and the rule consequences are defined using the genetic algorithm. Applications to various nonlinear systems show the potential of this method. These algorithms are often delicate to implement. Moreover, the convergence time is not guaranteed.
So, the goal of this work is to apply three control approaches on nonlinear systems. These approaches are the local approach, the global approach and the optimization using genetic algorithms. Then, a comparaison between three approaches is presented.
2 Optimal Control
2.1 Local Approach 2.1.1 Problem statement
Let us consider an optimal control problems which consist in the determination of the control laws that minimize the following criterion expressed as :
(1)
2010 7th International Multi-Conference on Systems, Signals and Devices where Q and R are the ponderation matrices (Q ;:::: 0 and R > 0) .
Generally, for nonlinear systems, there don't exist an explicit optimal solutions. Therefore, we approximate this system by a fuzzy system. In this case, we obtain local linear systems of which we can obtain explicit optimal solutions. In the following, the optimal solution for linear systems is described by the following state equation:
x = Ax +Bu +C (2)
The Hamiltonian of the problem is described by the following expression:
The optimal conditions can be written as follows:
x = H'IjJ = Ax + Bu + C
The Hamiltonian system is described as follow
Letting:
Ax - BR-IBT'lj; + C -Qx_ AT'lj;
'lj;(t) = P(t)x(t) + g(t)
We obtain the following equations:
g + (A - BR-l BT pf g + PC = 0
(4)
(5)
(6)
(7)
(8)
(9)
(10)
The resolution of this problem can be carried out successively, by determining matrix P and vector g.
In the invariant case with a constant disturbance, P and g are constant.
(11)
(12)
If we don't have disturbances the term g is null (g =
0) 2
2.1.2 Local approach details
After the fuzzy modeling of non-linear systems, local linear systems have been applied. Therefore, to obtain a local control law for each linear subsystem
[10] ' the optimal control theory has been applied. After the calculation of the matrix P and the vec
tor g, the optimal control law can be deduced as the following expression:
u(t) _R-l BT Px(t) _ R-l BT g -Kx(t) + v (13)
This control law resulting from the local control can not guarantee the global optimality of the system. For that, to be able to guarantee the global optimality, another approach should be developed.
2.2 Global Approach 2.2.1 System representation and Problem
statement
Let us consider a nonlinear system described by T-S type fuzzy model:
Ri: If Xl is Tli, . . . . . , Xn is Tni then
X(t) Y(t)
Ai(t)X(t) + Bi(t)U(t) Ci(t)X(t) i = 1, ... ,r (14)
As an assumption, fuzzy rules of the controller have the following form:
Ri: If Yl is Sli, . . . . . , Ym is Smi then
u(t) = Ui(t) i = 1, ... , 8 (15)
By giving the fuzzy system (14) with X(to) = Xo and the nonlinear fuzzy controller (15) and with t E [to, tl] , the controller u*( . ) can be expressed, minimizing the following quadratic criterion J[U(. ) ] :
J[u(. ) ]
+
The whole formulation of the fuzzy system is then given by the following expression:
r
X(t) L hdX(t)]Ai(t)X(t) i=l
r
+ L hdX(t)]Bi(t)U(t) i=l
r
Y(t) L hdX(t)]Ci(t)X(t) (17) i=l
and the whole fuzzy controller is described as follows:
8 u(t) = L wdY(t)]Ui(t) (18)
i=l
2010 7th International Multi-Conference on Systems, Signals and Devices r 6
with L hdX(t)] = 1 and L wdY(t)] = 1 i=l
where
with
i=l
hdX(t)] = adX(t)] r
L adX(t)] i=l
wdY(t)] = fdY(t)] L 13dY(t)] i=l
n adX(t)] = II ILTjJXj(t)]
j=l m
13dY(t)] = II ILsjJYj(t)] j=l
where ILTjJX(t)] and ILsjJY(t)] are the membership functions of the fuzzy terms Tji and Sji
Based on the entire fuzzy system (17) with the fuzzy controller u(t) (18) and X(to) = Xo, the optimal control law uHt) is formulated, minimizing the criterion J[Ui (.)]
This kind of quadratic optimal control problems is, obviously, too complex to be solved. To overcome this difficult situation, consider the following synthetical matrices, H[X(T)], W[X(T)], A[X(T)], B[X(T)] and U[X(T)], where:
H[X(t)] = [h1(X(t))In .... hr(X(t))In] W[Y(t)] = [w6(Y(t))Im .... w6(Y(t))Im]
A(t)= A2:(t) ,B(t)= B2
:(t) ,U(t)= u2
:(t)
[ Al(t) 1 [ B1(t) 1 [ Ul(t) 1 Ar(t) Br(t) U6(t)
Using these synthetical notations, the "linear like" fuzzy system has been obtained:
OX(t) Y(t)
H[X(t)]A(t)X(t) + H[X(t)]B(t)u(t) H[X(t)]C(t)X(t) (20)
Thus, the synthetical optimal control law U* (.) can be expressed, minimizing the following quadratic criterion:
3
This synthetical matrix representation "linearlike" of the entire fuzzy system materializes the design of a global optimal fuzzy controller using the general approach LQ.
In the following, the proposed global-concept approach is detailed:
• The entire representation of the fuzzy system is proposed for the formulation and the simplification of the problem of quadratic fuzzy optimal control.
• The matrix Ai(k) and Bi(k) and the normalized membership functions hdX(k)] and wdY(k)] are transformed in synthetical matrices (A(k), B(k), H[X(k)] and W[Y(k)])for the formulation of the "linear-like" global system. This representation allows to determine a plant for designing the global fuzzy optimal controller.
• A decomposition is adopted to transform the optimal control problem in a dynamic problem (step by step) (Lemma 1) . This decomposition accelerates the numerical solution, and preserves the global optimality. Lemma 1: (multi-stage decomposition) A foregoing optimization scheme is a dynamic allocation process or a successive multistage deClSlOn process. In other words, letting and d fi· t t1 t tN ti ti� 1 . e nlng 0 = 0, 1 = 1 , 0 = 1 , � = 2 ... N; b..ti = ti - tb, i = L.N and defin-ing ¢[X(.), u(.)] = minU[IOhl It:" [xt(t)QX(t) + ut(t)Ru(t)]dt + Xt(t1)QIX(t1) and
¢i(X(.), u(.))=
minu i i It:� [xt(t)QX(t)+ [/'0,111 a
ut(t)Ru(t)]dt, i = I, ... ,N-l
minu N ltt� [xt(t)QX(t)+ [to ,tIl 0
ut(t)Ru(t)]dt + Xt(tl)QlX(td, i =N
with regard to the state resulting from the previous decision, i.e., X(t6) Xo; X(tb) = X* (tl�l), i = 2, ... , N, then, ¢(X(.), u(.)) ¢N (X(.), u(.))
¢l(X(.), u(.)) + +
• The existence of N (number of stages where the membership functions are invariant during only one stage) is assumed to make backward recursive Riccati-like equation available. This equation is described as follows:
2010 7th International Multi-Conference on Systems, Signals and Devices This avoids the complexity of the method in favor of the optimal approximation. The representation of the fuzzy system with the synthetical matrices reduces the difficulty and the order of complexity of the global optimization problem.
• For time-invariant case, the finite horizon optimal solution coincides with the asymptotic (infinite-horizon) optimal solution.
2.2.2 Algorithm DDA: Dynamic Decomposition Algorithm (6)
Inputs: the initial chosen membership functions; initial state X(to) ; time-increment /'l,T ; maximum number of design trials nt.
Outputs: optimal controller u*(.) ; optimal trajectory X*(. ) ; value of f).ti;N ( N being initialized as N = 0 ).
• Step 0: (set threshold parameters) Set the default values of /'l,Hl and /'l,H2 .
• Step 1: (initial check) IF (II (dH(X*(T) )jdT Ilr=ttO::: /'l,Hl) , THEN {go to Step 2} ELSE { choose a more smooth membership function and go back to Step 1, or break after nt times of failing trials.} END
• Step 2: ( ti denoting the time-instant in the ith stage, i.e., ti E [to, tjJ; ti+ = ti + /'l,T) .
- (a). Find out the solution 1ft, of (22) with the membership function H(X;,) .
o
(b). Calculate u;, and Xt*'+ by the follow
ing equations:
(23)
(c). IF (II H(Xt*,+) - H(X;o) II::: /'l,H2)
THEN {ti = ti+; go to (an END (d)IF (ti+ = tl) THEN {f).tN = tl - tb; stop} END
• Step 3: (find the starting point of the next stage tb+1 = ti) IF (II (dH(X*(T) )jdT Ilr=t'::: /'l,Hl) THEN {ti = ti; f).ti = tl - to; N = N + 1 ; jump
4
to Step 2} ELSE {decrease /'l,T to get finer time-increment or choose another membership function and jump to Step 1 or break after nt times of failing trials. } END.
2.3 Genetic Algorithms Genetic algorithms (GA's) are search algorithms modeled after the mechanics of natural genetics. In an optimally designed application, GA's can be used to obtain an approximate solution for single variable or multivariable optimal problems. Before a GA is applied, the optimization problem should be converted to a suitably described function. The corresponding function is called "fitness function" . It represents a performance of the problem (the higher the fitness value, the better the system's performance). The objective of a GA is to imitate the genetic operation process, e.g., reproduction, crossover and mutation, to obtain a solution corresponding to the fitness value. Recently, many GA's have been presented. The basic construction of a GA can be simply described as follows
• Initial population: N sets of chromosomes should be randomly generated before using a GA operation. This population is called the initial population
• Evaluation: The evaluation of each chromosome is realized by "fitness function" . The choice of this function is very important to obtain a good operation of the GA.
• Selection: After the evaluation, the chromosomes, which have the highest fitness values, are selected.
• Crossover: It is an effective way of exchanging information and recombining segments from high-fitness individuals. The crossover procedure is to randomly select a pair of strings from a mating pool, then randomly determines the crossover position.
• Mutation: The mutation operator is used to avoid the possibility of mistaking a local optimum for a global one. It is an occasional random change at some string position based on the mutation probability
The evolution procedure of genetic algorithm is shown in the Fig 1.
2010 7th International Multi-Conference on Systems, Signals and Devices
No Yes '-------< Stop Criterion >--------,
Figure 1: Description of a Genetic Algorithm
3 Application
3.1 First Example Let us consider an academic nonlinear system formulated by the following differential equation:
i + x + x + sin x = U (25)
where: x E [-7f 7f] and x E [-7f 7f] .
The following quadratic criterion J will be optimized:
1 1 10 J = - (xi + x� + u)dt 2 0
3.1.1 Local approach
(26)
Figure 2 represents the evolution of the position, the velocity and the control law obtained by the local approach.
3.1.2 Global approach
The nonlinear system is represented by the following T-S fuzzy type model:
Ri: If Xl is Ft Then X = AiX + Biu with i = 1, 2 The following initial conditions have been chosen:
X(O) = [x(O) x(O) jT = [Xl (O) X2(O) ]T = [3 ojT State matrices are: Al = [ �1 �1
] et A2 = [ �2 �1 l Bi = [ � ] , i = 1, 2
Now, the individual matrices are transformed into a synthetical matrix in order to obtain the "linearlike" system.
5
0.5,----------,
o .
-10'---------'---.:;:I(S:u) 10
-1
x2
(c)
_1.5'--�_�_��_I'-'(S)CJ
5
o 2 4 6 8 10
(b)
I(s) 10
Figure 2: Local Approach. (a): position. (b): velocity. (c) control law
A= [ �� ] , B= [ �� ] and H[X(t)] = [hl (X(t) ) h2(X(t) ) ]
Now, the solution of the Ricatti asymptotic equation with the membership function H(Xt*i) will be
o computed by solving the following equation:
ATHT(XnK +KH(XnA -KH(XnBR-l BT HT(XnK + Q = 0 (27)
Then, steps (a) and (b) of the step 2 of the Dynamic Decomposition Algorithm have been applied, in order to obtain the optimal control law and the optimal trajectory using:
(28)
3.1.3 Genetic Algorithm
For this approach, the antecedents and the consequences of the the fuzzy rules have been optimized, i.e the parameters of the membership function and the static gain at the same time have been calculated. In this case, gaussian membership functions have been considered.
For this approach, the quadratic criterion for the local and global approach has been evaluated:
• for the local approach: J = 6.7493
• for the global approach: J = 6.7253
2010 7th International Multi-Conference on Systems, Signals and Devices
(a)
o .
-1 t(s) 0 5
0.5 x2
10
(c)
t(s) 4 6 8 10
(b)
t(s) 10
Figure 3: Global approach. (a) : position. (b) : velocity. (c) control law
3.1.4 Comparaison
In order to compare the local approach and the global approach, the quadratic criterion J defined above has been evaluated. It has been found:
• for the local approach: J = 6.7162
• for the global approach: J = 6.7150 According to these results, it is obvious that the global approach is slightly better than the local approach.
Moreover, it is clear that there is a little difference between the local approach and the global approach with the optimization by genetic algorithms and without optimization.
3.2 Second Example Let us consider a nonlinear mass-spring-damper mechanical system represented by the following differential equation:
x = -0.lx3 - 0.02x - 0.67x3 + U (30) with x E [-1.5 1.5] and x E [-1.5 1.5] .
The following initial conditions have been chosen: X(O) = [x(O) x(O) ]T = [-1 - l]T.
Then, the following quadratic criterion J is minimized:
1 1 10 J = - (xi + x� + u)dt 2 0
3.2.1 Local approach
(31)
Like the first example, all the steps of the local approach in order to obtain the control law have been followed. Results of this approach are represented in figure 5:
6
U
JlI
-L-
f( /J
Figure 4: Mass-Damper System
0.5r------,----------, x2 ( b ) (a)
o .
t(s) _1.5 '---_____ --'-t(S-'--' ) 10 o 5 10
(c)
t(s)
Figure 5: Local Approach. (a) : velocity. (b) : position. (c) control law.
3.2.2 Global approach
This nonlinear system can be represented by the following T-S fuzzy model:
Ri: If Xl is FI and X2 is F� Then X = AiX + Biu with i = 1, . . . , 4 where Fl(x(t) ) = Ff(x(t) ) = 1 - ���y Ff(x(t) ) = Ft(x(t) ) = 1 - Fl(x(t) ) = ���y Fi(x(t) ) = F�(x(t) ) = 1 - 2��Y Fi(x(t) ) = Fi(x(t) ) = 1 - F21 (x(t) ) = ���Y State matrices are described as: A [ 0 -0.02 ] . A = [ -0.225 -0.02 ] ., 1 = 1 0 , 2 1 0 [ 0 -1.5275 ] . A3 = 1 0 ' A4 = [ -Oi
225 -1.�275 ] . Bi = [ � ] , i = 1, .. , 4
2010 7th International Multi-Conference on Systems, Signals and Devices
After that, individual matrices have been transformed into synthetical ones in order to obtain the "linear-like" system.
A� r 1n B� r �� 1 and
H[X(t)] = [hl (X(t) ) h2(X(t) ) h3(X(t) ) h4(X(t) ) ] Now, same steps as the first example have been
considered.
4 Conclusion
Nonlinear systems have been represented by T-S fuzzy models in order to apply the optimal control. A local approach is applied on local linear subsystems defined by fuzzy rules. Then, optimal control laws of the nonlinear system have been approximated. The global approach has been also applied for the same problem. It uses the entire nonlinear system thanks to the transformation of individual matrices into a synthetical one. Another approach can provide the optimal control law which is the optimization with genetic algorithms. This approach
0.5 ,-�------------, provides good performances. The calculation of the x,
-1 0
(a) X,
-0.5
-1
1(5) -1.5 10 0
(c)
1(5) -0.5 oL---:----�---:------:-----'-'------J,0
(b)
1(5)
Figure 6: Global Approach. (a): velocity. (b): position. (c) control law.
3.2.3 Genetic Algorithm
In this section, all the parameters of fuzzy rules have been optimized, i.e the parameters of the membership functions and the consequence gains have been determined.
The evaluation of the criterion J gives: • for the local approach: J = 1.9850 • for the global approach: J = 1.9800
3.2.4 Comparaison
The computation J criterion gives: • for the local approach: J = 1.9162 • for the global approach: J = 1.8894
Comparing different approaches (local approach and global approach) without optimization and with the optimization by genetic algorithms, one can easily conclude that the global approach is little better than the local one. Moreover, it can be concluded that there is a little difference between the two types (with and without optimization).
quadratic criterion for each approach shows that the difference between performances of the approaches is tiny. Therefore, all the approaches can be applicable.
10 References
7
[1] Derbel N., "A Discussion On Sugeno Fuzzy Logic Approximations Of Nonlinear Systems" , Int Multiconf on Systems, Signals & Devices, Amman, Jordan, July 23-26, 2008.
[2] Alazard D., Cumer C., Apkarian P., Gauvrit M., et Ferreres G., "Robustesse et Commande Optimale" , Cepadues, 1999.
[3] Tanaka K., Ikeda T. and Wang H. 0., "Fuzzy regulators and fuzzy observers: Relaxed stability conditions and LMI-based designs" . IEEE Trans., Fuzzy, Sys, Vol. 6 No 2, pages 250-265, May 1998.
[4] Li J.,Wang H. 0, Bushnell L. et Hong Y., "A Fuzzy Logic Approach to Optimal Control of Nonlinear Systems" , International Journal of Fuzzy Systems 2000.
[5] Wu S. J. and Lin C. T., "Optimal fuzzy controller design: local concept approach" . IEEE Transactions on Fuzzy Systems, Vol 8, No. 2. pp. 171-185, 2000.
[6] Wu S. J. and Lin C. T., "Optimal fuzzy controller design in continuous fuzzy system: global concept approach" , IEEE Transactions on Fuzzy Systems, Vol 8, No. 6. pp. 713-729, 2000.
[7] Park Y., Tahk M.J. et Bang H., "Design and Analysis of Optimal Controller for Fuzzy Systems with Input Constraint" , IEEE Transaction on Fuzzy Systems, Vol 12, No 6,pages 766-779, December 2004.
[8] Hoffmann F., Chen C. et Tsao J., " Evolutionary algorithms for fuzzy control system design" , Proc of the IEEE, vol. 89, pp. 1318-1333, 2001.
2010 7th International Multi-Conference on Systems, Signals and Devices [9] Zhou Y.S and Lai L.Y, "Optimal Design for
Fuzzy Controllers by Genetic Algorithms" ,IEEE liansactions On Industry Applications, Vol. 36, No. 1, pages 93-97, January-February 2000.
[10] Derbel N., "A Simple Assessment for Nonlinear Control Using Fuzzy Logic Approximators" , Asian Journal on Information Technology, vol 4. W 11, page 1037-1054, 2005.
8