Document not found! Please try again

Fuzzy Logic Controllers Generated by Pseudo-Bacterial Genetic

0 downloads 0 Views 257KB Size Report
This paper presents a new genetic operator called adaptive operator to improve local portions of chromo- somes. This new operator is implemented into Pseudo ...
Fuzzy Logic Controllers Generated by Pseudo-Bacterial Genetic Algorithm with Adaptive Operator

Norberto Eiji Nawa, Tomonori Hashiyama, Takeshi Furuhashi, Yoshiki Uchikawa School of Engineering, Nagoya University Furo-cho, Chikusa-ku, Nagoya 464-01, JAPAN Tel.+81-52-789-2793, Fax.+81-52-789-3166 e-mail: feiji,tom,[email protected] Abstract This paper presents a new genetic operator called adaptive operator to improve local portions of chromosomes. This new operator is implemented into PseudoBacterial Genetic Algorithm (PBGA). The PBGA was proposed by the authors as a new approach combining a genetic algorithm (GA) with a local improvement mechanism inspired by a process in bacterial genetics. The PBGA was applied for the acquisition of fuzzy rules. The aim of the newly introduced adaptive operator is to improve the quality of the generated rules of the fuzzy models, producing blocks of e ective rules and more compact models. The new operator adaptively decides the division points of each chromosome for the bacterial mutation and the cutting points for the crossover, according to the distribution of degrees of truth values of the rules. In this paper, rst, results obtained when using the PBGA with the adaptive operator for a simple fuzzy modeling problem are presented. Second, the PBGA with adaptive operator is used in the design of a fuzzy logic controller for a semi-active suspension system. The results show the bene ts obtained with this operator.

1 Introduction Fuzzy Logic Controllers (FLCs) have shown their feasibility in real world applications, making use of existent knowledge from experts. However, when the necessary knowledge is incomplete or can not be easily described and obtained, alternative approaches for building a FLC have to be used. Hybrid systems that utilize Soft Computing methodologies, such as fuzzy logic, neural computing, genetic computing, etc., provide the perspective to overcome these diculties.

The Pseudo-Bacterial Genetic Algorithm (PBGA) [1] implements a local improvement mechanism based on the genetic recombination of bacterial genetics. It is ecient in improving local portions of chromosomes. The chromosomes are divided into several portions and each of them is improved by the bacterial mutation of the PBGA (which is described in Section 3). In a previous work [2], the PBGA was applied for the acquisition of fuzzy rules for a semi-active suspension system. However, there was no criterion for the determination of the division points of the chromosomes. The division points were arbitrarily determined. This paper introduces an adaptive operator in the PBGA to determine the points for the bacterial mutation and also the cutting points for the crossover operator. The adaptive operator decides the mutation and cutting points according to the degrees of truth values of the fuzzy rules. This special operator works e ectively to identify precise models with less number of irrelevant fuzzy rules, i.e. unused parts of chromosomes. The results obtained in the modeling of a non-linear equation shows the feasibility of this new operator. The fuzzy logic controller for semi-active suspension systems generated through this approach also shows better performance in simulations.

2

Fuzzy Models and Genetic Algorithm

Systems that use inference machines based on fuzzy logic have been used in a wide range of applications. Fuzzy inference uses IF-THEN type linguistic rules that can deal with vagueness of concepts. Those rules can incorporate knowledge of experts. These characteristics are especially useful for modeling systems for which there is no analytical description available. Basically, the design process of a fuzzy model consists of

2. the membership functions of each variable; 3. the fuzzy rules, and 4. the parameters in 2 and 3. Tasks 1 to 3 are related to the de nition of the the structure of the fuzzy model. Task 4 is related to the tuning of the parameters of the model. Even for the cases where there is an expert available or when a linguistic description of the modeled system can be found, a lot of adjustments of the fuzzy models based on trial-and-error are necessary. If there is not an expert available nor a linguistic description, the design process of the model has to start from the scratch. In order to overcome these diculties, automatic design methods and rule acquisition procedures for fuzzy systems have been proposed, mostly making use of hybrid systems with arti cial neural networks and/or genetic algorithm(GA)[6, 7, 8]. The GA has been used combined with fuzzy logic in the design of Fuzzy Logic Controllers (FLCs) [2, 9, 10]. The strong point of hybrid systems combining the GA and fuzzy logic is that almost all the tasks that comprise the design process of a fuzzy model can be accomplished automatically. The structure of the model and the parameters of it can be determined by the same hybrid system. In order to improve the eciency in the discovery of e ective fuzzy rules, an additional operator was introduced in this paper.

3.2 Algorithm Description A similar process to the bacterial genetics is implemented in the PBGA. Its algorithm is brie y described as follows (Figure 1): t-th generation

(t+1)-th generation

1: 2: n:

1': 2': n':

...

1. the input and output variables;

evolution. Mutated genes can be transferred from a single bacterium to others and lead to a rapid evolution of the entire population.

...

the following steps to determine:

1st chromosome 2nd ...

... part i

part 1 part 2

n-th part p

One part is randomly chosenn

Mutation is performed in the i-th part of m -1 clones.

The best chromosome among the m clones has its i-th part transferred to the others.

Loop is repeated until all the parts are mutated and tested.

1':

3 PBGA

n':

3.1 Bacterial Genetics The process of bacterial recombination that inspired the PBGA is the following: Bacteria can transfer DNA to recipient cells through mating. Male cells transfer strands of genes to female cells. After that, those female cells acquire characteristics of male cells and transform themselves into male cells. By these means, the characteristics of one bacteria can be spread among the entire bacteria population. Another analogy is possible. Bacteriophages can carry a copy of a gene from a host cell and insert it into the chromosome of an infected cell. This process is called transduction. By transduction, it is also possible to spread the characteristics of a single bacterium to the rest of the population. These genetic recombination mechanisms have con gured a process of microbial

selection k':

reproduction i': j': i': j':

crossover i': j':

i": j":

Figure 1. Scheme of the PBGA 1. Generation of the initial population: somes are created and evaluated;

n

chromo-

2. Genetic Operations: (a) Bacterial operation: This genetic operation is applied to each chromosome one by one.

3. Stopping condition: If the stopping condition is satis ed, stop, otherwise, go back to 2.

accumulated truth value, it means that that rule was intensively and frequently triggered during the evaluation process. Consequently, this is an evidence of the e ectiveness and utility of that rule. On the other hand, if a rule possesses a low value of accumulated truth value, this is an indication that the rule does not play an important role in the system. The motivation for using the moving average of the accumulated truth value is to identify portions of good quality rules in the chromosome. Those strings having high moving averages are considered to have a high concentration of good quality rules. These strings are desirable to be preserved. On the other hand, blocks with low moving averages have higher probabilities of being mutated. The crossover points are also adaptively determined according to the moving averages of the accumulated truth values of the fuzzy rules. The lower the moving average, the higher the probability of being selected as the crossover point. This selection of crossover points works well to build blocks with e ective fuzzy rules. E ective fuzzy rules are highly desired in order to build more compact models. Figure 2 shows a schematic of the adaptive operator. Concentration of good quality rules Moving Average of the Truth Value

Suppose there are p parts in a chromosome. The rst chromosome is chosen and it is reproduced in m clones. The i-th part (randomly chosen) of m-1 clones is mutated. The elite among the m chromosomes is selected and the i-th part of the selected chromosome is transferred to the m-1 chromosomes. On this stage, the i-th part of all the clones is replaced by the i-th part of the selected chromosome. This process, mutation-evaluationselection-replacement, is repeated. The mutation is applied to another randomly chosen part, di erent from the already chosen ones. When all the p parts have been tested, one chromosome from the m clones is selected to remain in the population and the other m-1 clones are deleted. This genetic operation is applied to all the n chromosomes in the population. (b) Conventional genetic operations: The chromosomes with lower tness values are deleted and some randomly chosen chromosomes from the remaining group are reproduced. Chromosomes are mated and o springs are generated by crossover.

Concentration of poor quality rules

3.3 Adaptive Operator In the process of bacterial operation, the division points of the chromosome were arbitrarily determined and kept xed during the whole search process. Also, the crossover points in the chromosome were randomly chosen. The adaptive operator is used to determine the division points when the local improvement operation of the PBGA is to be applied. The probability of a certain locus to be selected is inversely proportional to the degree of truth value of the fuzzy rule it encodes. For each chromosome, the moving average of each fuzzy rule is calculated. The moving average is de ned as the average of the accumulated truth values of the rules. For example, the moving average of the rule j , the moving average Mj can be de ned as: + Tj 01 + Tj + Tj +1 + Tj +2 (1) 5 where Tj is the accumulated truth value of the fuzzy rule j after the evaluation of a given model. The accumulated truth value of a fuzzy rule is a measure of its quality. If a rule possesses a high value of Mj

=

Tj 02

...

Part 1

Part 2

Part 3

Part 4

Part p

Chromosome encoding Fuzzy Model

Figure 2. Scheme of the adaptive operator

4

Encoding Method

Each chromosome in the population encodes the rules of the rule base of the fuzzy model as well as the membership functions of the variables. The lengths of the chromosomes are variable. Each rule contains information about the variables in the antecedent and consequent parts. The data about each of the membership functions are also encoded in the chromosome. In this paper, the membership functions are triangle-shaped, so their parameters are the pairs (center, width). For example, the Rule 1 in Figure 3 means:

if X1 and X3 and X4 then Y

is T(4.238, 3.423) is T(3.428, 1.213) is T(1.382, 0.381) is T(12.112, 9.141)

where T(c,w) means the triangle-shaped membership function whose center is c and width w. This encoding gives a high degree of freedom for the PBGA, which can de ne the variables to be used in the rules, the rules themselves and the parameters of the membership functions.

C= 4.238

X1

X3

X1

C= 4.452

C= 3.543

X1

W= 1.294

W= 4.139

W= 3.483

C= 3.428

C= 2.302

C= 3.198

C= 2.349

X3

X2

X2

W= 1.213

W= 0.564

W= 1.674

W= 1.378

C= 1.382

C= 1.312

C= 1.234

C= 2.872

X4

Y

C= 2.434

X2 W= 3.423

X4

X4

X3

W= 0.381

W= 1.009

W= 0.963

W= 1.364

C= 12.112

C= 1.943

C= 0.932

C= 1.234

X5

W= 9.141

X6

X4

W= 0.465

W= 0.324

W= 0.735

C= 0.342

C= 8.342

C= 2.436

X6

Y W= 0.239

X5 W=2.345

W= 2.593

C= 0.539

C=14.34

X7

Y W= 0.283

W= W=5.394 1.235

with x1 [1 . . . 5]; x2 [1 . . . 5]; x3 [0 . . . 4]; x4 [0:0 . . . 0:6]; x5 [0:0 . . . 1:0] and x6 [0:0 . . . 1:2]. The function y (x1 ; x2 ; x3 ; x4 ; x5 ; x6 ) was modeled on 7 fuzzy variables, 6 variables on the function plus one dummy variable. 80 randomly chosen 6-tuples were used as training data entries. The population of chromosomes was xed in 30 chromosomes during the whole search process. A test data set with 160 entries is used to check the performance of the best model generated by the PBGA. The following performance index (P I ) was used. PI

=

1

X

nentries

nentries

i=1

jy 0 y3 j + N umRules 3 ! i

i

yi

Table 1. Error of the built models using erage of 100 runs)

Y

Rule 1

Rule 2

Rule 3

.......

PBGA PBGA+Adap.Op

Rule n

Chromosome

Figure 3. Example of a Fuzzy Model encoded in a Chromosome

5 Experiments and Simulation Results

5.1 Identi cation of nonlinear function In order to test the eciency of the adaptive operator, experiments were performed to build a fuzzy model of the following function: y

= x1 + x02:5 + x3 3 x4 + 2 3 e23(x5 0x6 )

(2)

r

(3)

where the rst term of the expression is the average error of the inferred values of the fuzzy models built by the PBGA to the values of the training data set, N umRules is the number of fuzzy rules of the model, N umM AX is the maximum number of rules allowed to one chromosome and !r is an assigned weight. N umM AX was arbitrarily set to 50 and !r was set to 0.1 after some parameter adjusting experiments. The second term of P I increases the pay-o of the PBGA to models with fewer rules. The obtained results are shown in Table 1:

C= 5.483 W= 4.568

N umM AX

PI

(av-

160 entries 29.88% 12.52%

From the data in Table 1, it can be clearly seen that the PBGA with the adaptive operator can design better models than the PBGA alone. The second column entitled \160 entries" contains the value of the error of the models when they are tested to the 80 entries of the training data set plus another 80 entries of unknown data. Table 2. Fuzzy rules of the built models using P I (average of 100 runs)

PBGA PBGA+Adap.Op

Number of Rules 13 13

Non-used Rules 33.16% 14.02%

The third column in Table 2, \Non-used Rules", indicates that the ratio of the irrelevant rules included in the models built by the PBGA with the adaptive operator is lower than that of the models obtained by the PBGA only. In other words, the combination of PBGA with the adaptive operator is able to build models with more e ective rules and less non-used rules. The simulation results show the e ects of the adaptive operator. The number of rules of the models built by both of the methods, the PBGA with and without the adaptive operator, is the same. However, the error presented by the models built by the PBGA with the adaptive operator is comparatively much better than the error of the models built by the PBGA alone. This shows the bene t brought by the adaptive operator for building e ective fuzzy rules.

5.2 Fuzzy Logic Controller for Semi-active Suspension System

Tire Data Performance Evaluator

Body Data

Semi-active Suspension System

Semi-active suspension systems aim to improve the ride comfort and the drivability of cars, in the same way as active control systems. However, semi-active systems are simpler, more reliable and considerably cheaper when compared to active systems. The basic principle of the semi-active control systems is to actuate in the damping coecient of the shock absorber(damper), according to the current ride conditions. This is achieved by controlling the electromagnetic valve inside the absorber. The seminal work in the eld of semi-active suspension systems was proposed by Karnopp[11] and its objective was only to reduce the vertical acceleration of the body of the car. The system proposed in [2] used a PBGA to build FLCs for a semi-active suspension system. Figure 4 shows the simulation model of the semi-active suspension system. K is the sti ness of the suspension and Cd is the damping coecient of the shock absorber. The dynamics of the simulation process is as follows. Each chromosome in the population encodes a FLC. All the chromosomes are tested in the model of the suspension system and receives a tness value from the Performance Evaluator, which gives a grade according to the performance index that is being used. Basically, the controllers are supposed to minimize some physical variables of the system, for example, Body

Vertical Position, Body Vertical Velocity, Body Vertical Acceleration, Tire Vertical Position, Tire Vertical Velocity and Tire Vertical Acceleration. This process is repeated within the dynamics of the PBGA. One point that should be remarked is that the fuzzy controllers generated possess a multi-objective character, since the

Fuzzy Logic Controller

Car Body

Cd K Tire Data

Tire

Road Surface

Figure 4. Semi-active suspension model performance index was set to minimize multi-objective functions. 5.2.2

5.2.1

PBGA

Simulation Results

Simulations were performed using PBGA with adaptive operator and simple GA. The rst approach used a simple GA (as de ned in [12]) and the fuzzy controllers encoded in the chromosomes used xed membership functions, de ned a priori. Every input and output variables had its universe of discourse divided 7 partitions, usually named as Positive Big, Positive Medium and so on. The task of the simple GA was basically to de ne the rule base of the FLCs over the prede ned membership functions. 100 chromosomes constituted the population and the process ran through 100 generations. The performance index (P I ) used was: PI

= peak (P oscar )+ peak(V elcar )+ peak(Acccar ) (4)

The system tries to minimize the peak values of the parameters of the car body (Vertical Position, Velocity and Acceleration). The average of the best FLC in the population in 10 run is shown in Figure 5, under the name of Simple GA with xed MF. The improvements obtained by that approach for this system were very small. The vertical axis on the graph in Figure 5 represents the tness value utilized. Fitness value equal to 3 can be understood as the same performance of the controller designed by Karnopp in [11]. The rst approach was not able to evolve FLC's that di er considerable from controllers presented in [11]. The second approach also used a simple GA. However, the membership functions of the variables in the FLC's were not de ned a priori. The chromosomes in this second approach used the same encoding method

better quality rules. Operators like the adaptive operator should be used to combine forces with the dynamics of the GA type algorithms in order to build better quality models. Providing mechanisms that look deeper into the structure and peculiarities of fuzzy models are necessary when using GAs, in order to equilibrate the attention given to the performance itself and to the quality of the built model.

Comparison of different GAs 3.15

Average in 10 Runs − Fitness Value

3.1

3.05 Simple GA with fixed MF 3

2.95

Simple GA

References

2.9 PBGA 2.85

2.8 PBGA with adap.operator 2.75 0

10

20

30

40

50 60 Generations

70

80

90

100

Figure 5. Obtained performances using di erent GAs presented in section 4. It had the possibility of de ning the membership functions and rule base of FLC's simultaneously. The obtained performance is the curve over the label Simple GA. The third approach used the PBGA. It is possible to see that the performance is signi cantly better than the two approaches presented above. The last approach was the PBGA with the adaptive operator, that achieved the best performance among all.

6 Conclusions This paper presented a new adaptive operator for determining the mutation points of chromosomes and the cutting points for crossover. The e ects of the new operator introduced into a Pseudo-Bacterial Genetic Algorithm were shown in experiments building a fuzzy model of non-linear equation and fuzzy logic controller for semi-active suspension system. Although the obtained results in the FLC design are not yet conclusive, operators like the one presented in this paper should be used for mainly two reasons: rst, because of the possibility of improving the performance of the generated FLC's, second, in order to improve the quality of the FLC's themselves. When using an automatic design method, too much emphasis has been given to the performance of the controller, as it was a black box, and little to the rules that comprise it. The adaptive operator had an e ective action for increasing the percentage of active rules in the built models. This led to more compact fuzzy models with

[1] T.Furuhashi, Y.Miyata, K.Nakaoka, Y.Uchikawa, \A New Approach to Genetic Based Machine Learning for Ecient Finding of Fuzzy Rules", Lecture Notes in Arti cial Intelligence, Vol. 1011, 173-189, 1995. [2] T.Hashiyama, T.Furuhashi, Y.Uchikawa, \A Study on Finding Fuzzy Rules for Semi-Active Suspension Controllers with Genetic Algorithm", Proc. of the IEEE Intl. Conference on Evolutionary Computation 95, Perth, Australia. [3] L.Zadeh, \Fuzzy Sets", Information and Control, Vol.8, 338-353, 1965. [4] T.Terano, K.Asai, M.Sugeno, \Fuzzy systems theory and its applications", Academic Press, 1992. [5] C.C.Lee, \Fuzzy Logic in Control - Fuzzy Logic Controller" - Parts I & II, IEEE Transactions on Systems, Man and Cybernetics, 20(2), 404-435, Mar/Apr 1990. [6] S.Horikawa, T.Furuhashi, Y.Uchikawa, \On Fuzzy Modeling Using Fuzzy Neural Networks with the Back-Propagation Algorithm", IEEE Trans. on Neural Networks, Vol. 3, No. 3, 801-806, 1992. [7] C.L.Karr, L.M.Freeman, D.L.Meredith, \Improved fuzzy process control of spacecraft autonomous rendezvous using a genetic algorithm", SPIE Intelligent Control and Adaptive Systems, Vol. 1196, 274-288, 1989. [8] M.A.Lee, R. Saloman, \Hybrid Evolutionary Algorithms for Fuzzy System Design", Proc. IFSA'95 (S~ao Paulo), vol. 1, 269-272, 1995. [9] C.L.Karr, \Design of an Adaptive Fuzzy Logic Controller Using a Genetic Algorithm", Proc. of the 4th Intl. Conference on Genetic Algorithms, 450-457. [10] F.Ho mann, G.P ster, \A New Learning Method for the Design of Hierarchical Fuzzy Controllers Using Messy Genetic Algorithms", Proc. IFSA'95 (S~ao Paulo), vol. 1, 249252, 1995. [11] D. Karnopp, et. al, \Vibration Control Using Semi-Active Force Generators", ASME Journal of Engineering for Industry, vol. 96, No.2, 619-626. [12] D.E.Goldberg, \Genetic Algorithms in search, optimization, and machine learning", Addison-Wesley, New York, 1989.

Suggest Documents