• 沒有找到結果。

On GA-based optimal fuzzy control

N/A
N/A
Protected

Academic year: 2021

Share "On GA-based optimal fuzzy control"

Copied!
6
0
0

加載中.... (立即查看全文)

全文

(1)

On

GA-based

Optimal

Fuzzy

Control

Sinn-Cheng Lin, Student Member IEEE and Yung-Yaw Chen, Member IEEE

Lab. 202, Department of Electrical Engineering National Taiwan University

Taipei, Taiwan, R.O.C. email: [email protected]

Abstract

Two architectures for designing optimal fuzzy control systems were proposed in this paper. In both cases, the membership functions in the fuzzy rule- bases were tuned by the genetic algorithms. The ob- jective was to explore a fuzzy controller by minimiz- ing a quadratic cost fkction. In the first architecture, the employed controller was a conventional ,fuzzy logic controller which used the system states as input variables. Consequently, the reciprocal of the cost function to be minimized could be directly applied towards evaluating the fitness of the controller. In the second architecture, a $ m y sliding mode controller was adopted. The combined information of the sys- tem states, i.e. the sliding function, formed a single input variable. The problem of minimizing the cost function in this case could be transformed to that of deriving an optimal sliding surface. Then, a faster hitting time and a smaller distance away from the sliding surface a controller had, a lugher fitness it got. Simulations and comparisons were taken on both cases.

Keywords: fiizzy control, optimal control, fuzzy slid- ing mode control, genetic algorithms

I. Problem Formulation

Consider a class of nth order nonlinear systems that can be expressed by the following state equation [51:

where x = [xl xp ... x,JT E is the state vector; U E

W

is the control input;

A.)

is an unknown continuous function with known upper bound, i.e. I f /

IJ”,

g(.) is an unknown positive definite function with known lower bound, i.e. 0 < gL 5 g. Actually, (1) represents a general uncertain nonlinear dynamical system. De-

fine a quadratic cost h c t i o n [3]:

J =

5

J,x(t)Tex(t)dt

(2)

where Q E R””” is a positive definite weighting ma-

trix. The objective of this paper can be described as follows:

Given a system of ( I ) , O J I ~ Y knowing the upper

bound of.f(.) and the lower bound of g o , attempt to develop a f l z z y control system such that (2) is mini- mized.

Genetic algorithms (GAS) are parallel and global search techniques which take the concepts from evolution theory and natural genetics. They emulate biological evolutions by means of genetic operations such as reproduction, crossover and mutation. Usual- ly, GAS are used as optimization tools [2]. In this pa- per, GAS are used for searching the parameter space of fuzzy membership functions and for finding suit- able fuzzy controllers to minimize

J.

Two architec- tures of fuzzy control for optimization are proposed

1) GA-based optimal fuzzy logic control: Fig. 1 shows the block diagram of such a control system, In this architecture, the employed fuzzy controller is a traditional fuzzy logic controller (FLC) [I]. Conse- quently, the input of the GA-based FLC (GA-FLC) is the state vector x, so that the cost function (2) can be directly calculated and converted to the fitness value for genetic operations.

2) GA-based optimal fuzzy sliding mode control: Fig. 2 shows the basic configuration of such a control system. In which, the employed fuzzy controller is a fuzzy sliding mode controller (FSMC) [ 6 ] . There is a mapping mechanism which maps the state vector, x ,

to a sliding function, s. As a result, the input variable of the GA-based FSMC (GA-FSMC) is s instead of

x . In the other word, the fitness function, or equiva- lently the cost function J(x), for genetic operations can’t be directly obtained. The primary job remained is to transform the problem of minimizing the origi- nal cost function J(x) to that of minimizing an altera- tive cost function J, wluch is a function of s, i.e. J, = Js(S).

(2)

state

Fig. 1. The architecture of GA-based FLC

Fig. 2. The architecture of GA-based FSMC

11. Genetic Algorithms: an overview GAS work with a set of artificial elements (parameter strings) called a population. An individual (string) in a population is referred as a chromosome, and a single element in a chromosome is called

a

gene. GAS generate a new population (called off- springs) by applying the genetic operators to the chromosomes in the old population (called parents). Each iteration of genetic operations are referred as a generation. A fitness function, i.e. the function to be maximized, is used to evaluate the fitness of an indi- vidual. One of the important purpose of GAS is to re- serve the better schemata, i.e. the patterns of certain genes, so that the offsprings may yield higher fitness than their parents. Consequently, the fitness value increases from generation to generation. In most of GAS, reproduction, crossuver and mutation are three basic operators. Actually, reproduction and crossover don't introduce new patterns of gene into the popula- tion, but mutation does. Mutation can be viewed as a random-work mechanism to avoid the local optimum trapping problem. As a result, GAS wuld always find a sub-optimal solution that approximate the global one.

Although there are a large amount of genetic al- gorithms had been proposed, the fundamental princi- ple were based on the simple genetic algorithm (SGA). In general, the individual strings that the SGA works on are binary-coded (e.g. 01101110); hence, SGA also known as binary-coded GA. The

basic operations of SGA are briefly described as fol- 1) Reproduction: the Darwinian "survival of the lows [2]:

fittest'' is the underlying spirit of reproduction. First, a fitness value F is assigned to each individual string in a population. A higher F value indicates a better fit (or larger benefit). Next, the old individual strings are probabilistically selected and copied into a mating pool according to their fitness value. The arrange- ment allows the strings with a higher fitness to have a greater probability of contributing a larger amount of offsprings in the new population.

2) (,'rossuver: crossover provides a mechanism for individual strings to exchange information via a probabilistic process. Once the reproduction operator is applied, the members in the mating pool are al- lowed to mate with one another. First, two parents are randomly selected from the mating pool. Next, a random crossover point is picked up,

on

which the parents wili exchange their genes. Finally, the par- ents' genetic codes are mixed by exchanging their codes following the crossover point. For example, let

a, h denote two parent strings, and a',

b'

be their chl- dren. If the crossover point is selected on the 3rd bit, then we have: a' = 1 0 1 0 1 ~ a = 1 0 1 0 1 ~ >

-__

--- b = 0 1 1 1 1 ~ b ' = 0 1 1 1 1 ~

This random process provides a highly efficient method to search the string space for finding a better solution.

3 ) Mutation: every gene is subject to a random change with probability of the pre-assigned mutation rate in each iteration. In the SGA, a mutation opera- tor is nothing but just changes a random-selected bit from 0 to 1 or vice versa.

111.

GA-based Optimal Fuzzy Logic

Control In general, each rule in the rule-based of an FLC can be represented as:

wlierej = 1, 2,

...,

NI and NI is the number of rules;

X,(') are fuzzy sets called the input linguistic labels;

particularly, they are all Gaussian-typed in this paper,

called the output linguistic labels and @) are supports of

Lf"

on which the membership grade put) (rp@> = 1 .

(3)

weighted average defuzzification methods [SI are adopted, then the control output of (3) is given by:

where the and operator A can be min, product or any T-norm [l].

Obviously, the control output of FLC is depend on the parameters of membership functions, i.e. ma(‘), o,O) and cpZo). Hence, the genetic algorithms are ap- plied towards adjusting the parameter set o?),

qZk)

I

i = 1, 2,

...,

n, j = 1, 2,

...,

Nl} of (3) so as to minimize J(x)

.

To synthesis the optimal FLC by GA, each rule can be parameterized as:

R‘) = enc(mlo), ..., m:), o,O),

,.., o:),

(pl0), ..., cp:))

where e m ( . ) denotes the encoding operator whch encodes the real values into the corresponding binary codes. Then, the chromosome of an individual, which represents a particular rule-base of FLC, can be de- fined as:

( 6 )

(5)

R =

{I?(’),

R(2), ..., R(“) }

Since the state x is directly fed into the mecha- nism of CA, J(x) can be calculated straightforward. Therefore, the fitness function for GA-FLC can be directly defined as:

F = 1/(J+ 6) (7)

where 6 is a small positive value for avoiding the nu- merical error of divided by zero.

Gaussian-typed in this paper,

i.e. pso,(s) = exp

[

-(

5)2]

;

V’

are the output lin- guistic labels and p u b ) (cpQ) = 1 .

Again, the singleton fuzzification and weighted- average defuzzification methods are adopted to ob- tain the control output of (5), as shown in following:

Clearly, the genetic algorithms can be applied towards adjusting the parameter set {mD), ob), cp” l j = 1, 2,

...,

AJ,} to obtain a suitable ii such that J(x) is

minimized.

Similarly, each rule of FSMC can be parameter- ized as:

R6) = enc(wP, ok), cp‘)) (1 1) again, the chromosome of an individual (a particular rule-base of FSMC) can be defined as:

,

,

..., R ) (12)

R = {R‘” R(2)

To define the fitness function of GA-FSMC, let’s look at Fig .2. Since the input variable that fed into the GA mechanism is s instead of x, the fitness func- tion can’t be calculated from x directly. In the other word, J(x) can’t be calculated and converted to the fitness fimction straightforward. In the following, the optimal sliding surface is derived by minimizing the cost function (2). Correspondingly, the fitness func- tion of GA-FSMC can be defined in the following intuition: a controller which can drive the state to hit the optimal sliding surface as fast as possible and keep the state to the surface as close as possible will get a higher score.

B. Optimal Sliding Surface Design IV. GA-based Optimal

Fuzzy

Sliding Mode

Control A. Fuuy Sliding Mode Controller

Consider again the sliding surface defined in (8). Without loss of generality, let c,, = 1, i.e.

n-1 A

(13) In the FSMC [6] design, the sliding surface can = x n +

where C = [c1 c2 ...

and

X =

[XI x2

...

xn-lIT.

Assume that there is a control U * which can achieve

the sliding mode in a finite time, i.e. s = 0 and i = 0

as t 2. t,,

.

Then, the original system (1) can be linear-

lized by U*, and the equivalent system is given as: = X n +ET? = 0

be defined as: i=l

Y(X) = C’X = 0 (8) where c = [c, c,

...

cJT E

EY

is a coefficient vector that has to be properly determined. Each rule in an FSMC is represented as [6]:

RD):

IF s is $)(mD), 0”) THEN U is

v)(cpo)

(9)

where j = I, 2, ..., N,, and N , is the number of rules;

(4)

n 1 o ... 0 1 0 o n 1 ... 0 1 0 . . , ... , : I : . , . . : . . l I j o o n . . . 0 1 1 0 - c , -cl ". -c..1 I - C A . . . . . . . . , . __ __ __ __ ___- + X I *2

in which Po is the solution of the following Riccati equation:

-1 T

ArPo + P d o -PoA 12Q22A l 2 P o

+

Qo = 0 (23) Consequently, the coefficients of optimal sliding sur- face is given by:

T

(14) E' =

(v*'

+ Q i i Q 2 1 ) (24)

A

= A X Rewriting (14) yields:

After deriving the function s' (x) =

[E*T

l ] x , the primary missions the optimal GA-FSMC has to do is to drive the state to hit the optimal sliding surface (s* = 0) as fast as possible and then keep the state to s* =

(15)

0 as close as possible is , To achieve such goal, de-

fille an aitemative cost function in which the state, x , has been partitioned into two

parts, E E R ( n - l ) X 1 ,

5

E R i x i , and the system matrix, A , has been divided into four sub-matrix, A E

R(n-l)X(n-l)

,

A,,€ , A2,€

RIX(n-i)

and A 5

RIX1. Obviously, E = x n and

6

=X.

Hence, from (13)

we have

J , ( s ) = t ,

+I;

(s*)2dt (25)

Similar to (7), the fitness function for the optimal GA-FSMC can be defined as:

5 + E T E = O (16) F = l/(Js

+

6 ) (26)

Partition the weighting matrix of J x ) , i.e. Q, in the

same way of partitioning A , we get V. Stability Consideration

Since the initial population is random selected, and the CA consists of stochastic processes. Hence, the evolution procedure of both cases described (17)

above may yield unstable control systems. In this section, the approaches of guaranteeing the stability the original structure is proposed. Consider the fol- it gets ready to transform the

Optimization problem to a LQ One. Accord- of GA-based fuzzy control systems without ing to (2), (15), (16) and (17), we have

& = A ( l ~ + A l , h ( 18) lowing control law:

and 11 = l L f +

auy

(27)

J =

$

Jm (E'.Q~~E

+

? ~ ~ Q 2 ~ h ) d t (19) where uf is a fiizzy control law that given by (4) for

GA-FLC and given by (1 0) for GA-FSMC; 74 denotes a stabilizing control law and

a

is a switching factor.

To stabilize the GA-FLC, the stabilizing control can be realized by the supervisory control proposed by Wang [ 5 ] , i.e. f s where Ao = A i l - A 1 2 Q i t Q 2 1 Qo = Q i i - Qi2Q;tQ21 (20)

1

A

=

Qii

e 2 1 E +

5

u s = s g n ( x ' P b ) [ . , ' ~ + \ k T x l )

+

Iql]

(28) ObviOUslY, (18) and (19) form a standard LQR where b =

[o

0

...

gIT, k = [k, k,

...

k,lT

and P is a sym- system [3] with a pseudo state E and a pseudo Control

A.

Therefore, the optimal control of (1 8) for minimiz- metric positive definite matrix satisfying the Lyapu- nov equation ing (19),

h*,

can be solved by the famous LQR tech-

nique [3]. ATP

+

P A =

-

A*

with the optimal gain

(21) where > 0 and A is the companion matrix of Hur- witz polynomial z"

+

kif''

+

...+

k"

= 0. The switch- ing factor in this case is selected as

(5)

where

S

> 0 is a pre-specified bound of s*

0

model can be represented as [4]

N

a,

c c

-1 where x,, x2 define the position and velocity, res1

tively; U is the control force; m is the mass of the

-1.5

hicle, and d denotes the drag coefficient. '

Fig. 4. Cost function of GA-FSMC

r - - - - - - - - -

.""\

_ _ _ - -

1

- - - - _ _

1

I I - - -

L-''\;-

-I+ - - -

- I

I i i I I I I I I I ',.\..,i I I I I

VI. Simulation and Discussion

matrix Q =

I

:5 Of

J

,

the population size = IO,

the crossover rate = 0.8 and the mutation rate = 0.03.

...

I L- ...1 _I

201 , I I I

0 50 100 150 200

Generation

Fig. 3. Cost function of GA-FLC

Resoonse of GA-FSMC

-1.5' I I I

0 0.5 1 1.5

state, XI

Fig. 6. State response of GA-FSMC One of the most important advantages of FSMC

is that the size of rule-base of FSMC is significantly smaller than that of FLC. As a result, the length of chromosome and the size of search space of GA- FSMC can be efficiently reduced, as we have pointed out in [6]. So, we expect that the convergent rate of GA-FSMC may be faster than that of GA-FLC. Fig. 3 and Fig. 4 show the evolution results of GA-FLC and GA-FSMC, respectively. We can see that the conver- gent rate agrees with s u r e x w t i o r R g . 5 anid Fig.

(6)

6 show the find responses of GA-FLC and GA- FSMC, respectively. Although the architectures of both cases are so different, the state trajectories of them, however, are almost identical.

VII. Conclusions

In this paper, we developed the GA-based opti- mization methods for the fizzy control systems. Two kinds of architectures, GA-FLC and GA-FSMC, are dealt with. The final results of system responses of such two different approaches are similar, as shown in the simulations. In GA-FSMC design, an optimal sliding surface was derived based on the LQ tech- nique.

References

C. C. Lee, “Fuzzy logic in control systems: Fuzzy logic controller, parts I and 11,” ZEEE Trans. Syst., Man, Cyberrr., vol. 20, no. 2, pp.

D. E. Goldberg, Genetic Algorithms in Search, Optimization, and Machine learning, Addison- Wesley, 1989.

F. L. Lewis, Applied Optimal Control and Es- timation, Englewood Cliffs, NJ: Prentice Hall,

1992.

J. J. E. Slotine and W. Li, Applied Noidinear Control, Englewood Cliffs, NJ: Prentice Hall, 1991.

L. X. Wang, Adaptive Fuzzy Systems and Coir-

trol, Englewood Cliffs, NJ: Printice Hall, 1994. S. C. Lin and Y. Y. Chen, “A GA-based fuzzy controller with sliding mode,” IEEE Int. Con$ on Fuzzy Systems, Japan, 1995.

參考文獻

相關文件

On the other hand Chandra and Taniguchi (2001) constructed the optimal estimating function esti- mator (G estimator) for ARCH model based on Godambes optimal estimating function

利用 determinant 我 們可以判斷一個 square matrix 是否為 invertible, 也可幫助我們找到一個 invertible matrix 的 inverse, 甚至將聯立方成組的解寫下.

Then, we tested the influence of θ for the rate of convergence of Algorithm 4.1, by using this algorithm with α = 15 and four different θ to solve a test ex- ample generated as

Numerical results are reported for some convex second-order cone programs (SOCPs) by solving the unconstrained minimization reformulation of the KKT optimality conditions,

Particularly, combining the numerical results of the two papers, we may obtain such a conclusion that the merit function method based on ϕ p has a better a global convergence and

By exploiting the Cartesian P -properties for a nonlinear transformation, we show that the class of regularized merit functions provides a global error bound for the solution of

(B) Basketball is usually played by young people.. (C) Basketbal l is reported in the Olympic

Corpus-based information ― The grammar presentations are based on a careful analysis of the billion-word Cambridge English Corpus, so students and teachers can be