**4. Integration of meta-heuristic methods with fuzzy control**

### **4.1 Advantages of hybrid systems**

The integration of fuzzy systems with meta-heuristics methods has some characteristics in common and others that complement each other, as shown in Table 1. The junction of these two techniques forms a proper way to deal with non-linear systems and data. Systems that use these techniques have improved their performance in terms of efficiency and speed of execution.

Fuzzy systems have the advantage of storing knowledge. This is a feature of expert systems so that rules, for example, are easy to modify. Fuzzy systems are an effective and convenient alternative to represent the troubleshooting when the states are well defined. However, for

The best way to analyze the term *vi,j* is not to think of each iteration as a population replacement process by a new engine (birth and death), but as a process of continuous adaptation (Eberhart and J. Kennedy, 2001). This way the values of *xi* are not replaced, but continually adapted using vectors speed *vi*. This makes the difference between the OSP and the other EAs clearer: the PSO maintains information on the position and velocity (changes

In spite of the opinion that there is some degree of similarity between the PSO and the majority of other EAs, the PSO has a few features that currently are not present in any other EAs, especially the fact that the PSO models the speed of the particles as well as

The Hybrid Particle Swarm algorithm with Mutation (HPSOM) incorporates the mutation process often used in genetic algorithm in PSO (Esmin et al., 2005). This process will allow the particles can escape a local optimum point and perform searches in different area in the search space. This process starts by random choice in Particle Swarm and move to a new different position within the search space. The process of mutation used is given by the

*mut p k p k* ( [ ]) ([ ]\* 1)

random order within the following scale: [0, 0.1(*xmax – xmin*)] representing 0.1 times the length

The integration of fuzzy systems with meta-heuristics methods has some characteristics in common and others that complement each other, as shown in Table 1. The junction of these two techniques forms a proper way to deal with non-linear systems and data. Systems that use these techniques have improved their performance in terms of efficiency

Fuzzy systems have the advantage of storing knowledge. This is a feature of expert systems so that rules, for example, are easy to modify. Fuzzy systems are an effective and convenient alternative to represent the troubleshooting when the states are well defined. However, for

Where the *p*[*k*] is the randomly chosen particle swarm of and

of the search space. The HPSOM algorithm has the following pseudocode.

**4. Integration of meta-heuristic methods with fuzzy control** 

(10)

is also obtained from a

in position); In contrast, traditional EAs only keep information on the position.

their positions.

following equation:

Create and initialise*:* 

*While ( stop condition is false)* 

*update velocity and position* 

and speed of execution.

**4.1 Advantages of hybrid systems** 

**begin** 

*begin evalaute* 

*mutation*   **end end** 

**3.3 Hybrid Particle Swarm optimization** 

large and complicated systems, fuzzy systems become difficult to adjust, depending on manual methods that involve trial and error. The fuzzy relation matrix representing the relationships between concepts and actions can be unwieldy, and the best values for the parameters needed to describe the functions of relevance may be difficult to determine. The performance of a diffuse system can be very sensitive to specific values of the parameters.


Table 1. Comparison of characteristics of fuzzy logic with meta-heuristic techniques

In general, meta-heuristic methods offer distinct advantages of optimization of functions of relevance and even learning fuzzy rules. The meta-heuristic methods result in a more comprehensive search, reducing the chance of finishing in a local minimum, through sampling of several solutions sets simultaneously. Fuzzy logic contributes with the evaluation function, stage of genetic algorithm where the adjustment is determined.

There are several possible ways to use meta-heuristic methods with fuzzy systems. A type of hybrid system involves the use of separate modules as part of a global system. The modules based on meta-heuristic methods and fuzzy logic can be grouped singly or with other subsystems of computational intelligent or conventional programs that form an application system.

Another use is the design of systems that are primarily of applications with fuzzy logic. The use of genetic algorithms aims to improve the design process and the performance of the operating system based on fuzzy system. The meta-heuristic methods can be used to discover the best values for functions of relevance when the manual selection of values is difficult or takes a long time.

There are different types of meta-heuristic methods. Among them, genetic algorithms (GA) and particle swarm optimization (PSO), which are used in this chapter. These two methods, more another variation of the PSO, called hybrid PSO (HPSO), are chosen due to their features for integration with other systems. The general procedure for using the metaheuristic methods with fuzzy systems is shown in Figure 6. For example, a possible solution (represented by a chromosome or a bird) can be defined as a concatenation of the values of all functions of relevance. When the triangular functions are used to represent the functions of relevance, the parameters are the centers for each set widths and fuzzy. An initial range of possible parameter values, the fuzzy system is rotated to determine how much it works well. This information is used to determine the fit of each solution and to establish a new population. The cycle is repeated until you found the best set of values for the parameters of the functions of relevance.

This process can be expanded to use the population that includes information about the conditions and actions corresponding to fuzzy rules. Include them in meta-heuristic treatment allows the system to learn or refine the fuzzy rules.

An Evolutionary Fuzzy Hybrid System for Educational Purposes 413

To describe each function of relevance of fuzzy controller are defined four parameters, they are: *LL* (lower left), *LR* (lower right), *UL* (upper left) and *UR* (upper right). In this case, all functions are trapezoids. Figure 10(a) shows the position of each these values. For setting the

> ( ) ( ) ( ) ( )

(11)

(12)

 

*New Old i i New Old i i New Old i New Old i*

Figure 10(b) shows an example of shifting membership to the following values: *k* = -8 and

*New Old New Old New Old New Old*

*LL LL LR LR UL UL UR UR*

(a) (b)

starting points used, for *ki* and *wi* to the functions of relevance.

Fig. 10. Typical fuzzy membership function: (a) parameters of relevance, (b) training

Meta-heuristic methods are used to find the optimal values, according to the strategy and

Usually a viable solution to a problem is associated with an individual (chromosome or particle) *p* in the form of a *m* vector with positions *p = {x1, x2, x3, ..., xm}* where each component *xi* represents a gene. Among the types of representation of individuals, the best known are: the binary representation and representation for integers. The binary representation is the classic, as proposed by John Holland (1992). However, for this development the integer code is used to represent each part of the individuals, i.e., each individual is composed by the adjustment coefficients *ki* and *wi* which are integer values. With respect to the size of the chromosome, the size of each individual depends on the number of user-defined relevance functions. For a fuzzy control with a group of 18 functions of relevance for example, an individual with 36 variables (*ki* and *wi* where *i* = 1, ,

The population is initialized by setting each part of all individuals to zero (functions given by the user, the coefficients are equal to zero) and the other individuals are initialized with a string of positive or negative integers in a random procedure taken into a range [-10, 10].

( 8) 2 ( 8) 2 ( 8) ( 8)

 

*LL LL k w LR LR k w UL UL k UR UR k*

functions the following equations are used:

*w* = 2.

parameters

18) is composed.

Fig. 9. Overall process for using a meta-heuristic method to improve the performance of a fuzzy system

#### **4.2 Description of the training module**

The integration of meta-heuristic methods with the fuzzy control has been implemented as follows:


For the meta-heuristic training, many initial positions that the vehicle will start from are defined by the user. Each initial position assesses a sub-population of the chromosomes (or particles) that represents the set of values for the parameters of the functions of relevance, seeking thus an optimization of the control not only over a single trajectory, but all possible starting positions of if from the vehicle to the parking.

After the settings makes by the user, such as number of population, number of generations (or iterations), GA values (rates of crossover, mutation, and son), and PSO values (values of *r*1, *r*2, *c*1, *c*2, and so on), the adjustment of the fuzzy membership functions starts.

The main idea behind the training is to establish the value of adjustment to the fuzzy membership functions of relevance that is how the function shifted to the left or right and how much it will shrink or expand. It is made by 2 parameters for each membership function, denoted by *ki* and *wi*, for the fuzzy membership function *i*. The value *k* makes a shift in the membership function, if with negative value to left or if with positive value to right; while the value of *w* shrink the function for negative values and expand the function for positive values. These values are included in the functions in the following way.

Fig. 9. Overall process for using a meta-heuristic method to improve the performance of a

The integration of meta-heuristic methods with the fuzzy control has been implemented as

a. the chromosome (or particle) was defined as the concatenation of the adjustment values

b. parameters are the centers and the widths of each fuzzy sets. The genes of chromosome

c. a range of possible parameter values, the fuzzy system is rotated to determine how

d. this information is used to determine the fit of each chromosome or particle

e. the cycle is repeated until the number of user-defined generations (or iterations). Each generation (or iteration) is found the best set of values for the parameters of the

For the meta-heuristic training, many initial positions that the vehicle will start from are defined by the user. Each initial position assesses a sub-population of the chromosomes (or particles) that represents the set of values for the parameters of the functions of relevance, seeking thus an optimization of the control not only over a single trajectory, but all possible

After the settings makes by the user, such as number of population, number of generations (or iterations), GA values (rates of crossover, mutation, and son), and PSO values (values of

The main idea behind the training is to establish the value of adjustment to the fuzzy membership functions of relevance that is how the function shifted to the left or right and how much it will shrink or expand. It is made by 2 parameters for each membership function, denoted by *ki* and *wi*, for the fuzzy membership function *i*. The value *k* makes a shift in the membership function, if with negative value to left or if with positive value to right; while the value of *w* shrink the function for negative values and expand the function

*r*1, *r*2, *c*1, *c*2, and so on), the adjustment of the fuzzy membership functions starts.

for positive values. These values are included in the functions in the following way.

fuzzy system

follows:

**4.2 Description of the training module** 

of the functions of relevance

much it works well

functions of relevance.

(or the particles) are composed by these parameters.

(adaptability) and establish a new population, and

starting positions of if from the vehicle to the parking.

To describe each function of relevance of fuzzy controller are defined four parameters, they are: *LL* (lower left), *LR* (lower right), *UL* (upper left) and *UR* (upper right). In this case, all functions are trapezoids. Figure 10(a) shows the position of each these values. For setting the functions the following equations are used:

$$\begin{aligned} \text{LLR}\_{New} &= \text{(LL}\_{Old} + k\_i) - w\_i\\ \text{LLR}\_{New} &= \text{(LR}\_{Old} + k\_i) + w\_i\\ \text{LIL}\_{New} &= \text{(LL}\_{Old} + k\_i)\\ \text{LIR}\_{New} &= \text{(LIR}\_{Old} + k\_i) \end{aligned} \tag{11}$$

Figure 10(b) shows an example of shifting membership to the following values: *k* = -8 and *w* = 2.

$$\begin{aligned} LL\_{New} &= \{LL\_{Old} - 8\} - 2\\ LR\_{New} &= \{LR\_{Old} - 8\} + 2\\ LL\_{New} &= \{LL\_{Old} - 8\} \\ LR\_{New} &= \{LR\_{Old} - 8\} \end{aligned} \tag{12}$$

Fig. 10. Typical fuzzy membership function: (a) parameters of relevance, (b) training parameters

Meta-heuristic methods are used to find the optimal values, according to the strategy and starting points used, for *ki* and *wi* to the functions of relevance.

Usually a viable solution to a problem is associated with an individual (chromosome or particle) *p* in the form of a *m* vector with positions *p = {x1, x2, x3, ..., xm}* where each component *xi* represents a gene. Among the types of representation of individuals, the best known are: the binary representation and representation for integers. The binary representation is the classic, as proposed by John Holland (1992). However, for this development the integer code is used to represent each part of the individuals, i.e., each individual is composed by the adjustment coefficients *ki* and *wi* which are integer values.

With respect to the size of the chromosome, the size of each individual depends on the number of user-defined relevance functions. For a fuzzy control with a group of 18 functions of relevance for example, an individual with 36 variables (*ki* and *wi* where *i* = 1, , 18) is composed.

The population is initialized by setting each part of all individuals to zero (functions given by the user, the coefficients are equal to zero) and the other individuals are initialized with a string of positive or negative integers in a random procedure taken into a range [-10, 10].

An Evolutionary Fuzzy Hybrid System for Educational Purposes 415

initial positions will not only minimize the trajectories for these points, but as well as for other points, thus achieving a global minimization of space covered. Figures 13 show the

trajectories for each initial position.

Fig. 11. Original relevance functions

Fig. 12. Initial positions training

The evaluation function has the role to assess the level of fitness (adaptation) of each chromosome generated by algorithms. The problem goal is to minimize the trajectory of the vehicle to be parked. In case the evaluation function is given by:

$$f = \frac{1}{1+I} \tag{13}$$

where *I* is the total number of iterations until the final position into the park lot. According to the fitness function, the fitness of each chromosome is inversely proportional to the number of iterations.

The integration of meta-heuristic training algorithms with fuzzy model has made as follow:

