HOME JOURNALS CONTACT

Journal of Applied Sciences

Year: 2008 | Volume: 8 | Issue: 19 | Page No.: 3439-3445
DOI: 10.3923/jas.2008.3439.3445
Genetic Algorithm Combined with H∞ Filtering for Optimizing Fuzzy Rules and Membership Functions
H. Kharrati and S. Khanmohammadi

Abstract: This study presents a hybrid approach for determining the fuzzy rules and membership functions simultaneously. The optimization process consists of a Genetic Algorithm (GA) which determines the rule base and a H∞ Filtering method for tuning the parameters of membership functions. The procedure discussed in this study is illustrated on a simple automotive cruise control problem as a case study. By comparing nominal and optimized fuzzy controllers, we demonstrate that the hybrid algorithm, as a combination of genetic algorithm and H∞ filter, can be an effective tool for improving the performance of a fuzzy controller. In the other words, the fuzzy controller thus designed can implement simpler in the real world applications, by using a few fuzzy variables.

Fulltext PDF Fulltext HTML

How to cite this article
H. Kharrati and S. Khanmohammadi, 2008. Genetic Algorithm Combined with H∞ Filtering for Optimizing Fuzzy Rules and Membership Functions. Journal of Applied Sciences, 8: 3439-3445.

Keywords: H∞ filtering, Genetic algorithm, fuzzy membership function and fuzzy rule

INTRODUCTION

The Generation rules and membership functions for fuzzy systems is a challenging problem. Fuzzy Logic Controllers are applied to various industrial and non-linear systems; however, the parameters of fuzzy controller including fuzzy rules and membership functions are always built by designers with trial and error and based on their experience or some experiments. The design of a Fuzzy Logic Controller (FLC) includes the design of a rule base and the membership functions of input/output variables. The performance of a FLC depends on both its rule base and its membership functions (Jacomet et al., 1997; Eftekhari and Katebi, 2007; Simon, 2002). The fuzzy rules express the control signals based on human verbal rules and the membership functions to convert linguistic terms into precise numeric values (Yen and Langari, 1999) and (Lotfi, 1994). The process of control based on modeling of human thinking has many advantages such as simple calculations, high robustness, no requirement for finding the transform function of system and suitability for nonlinear, time varying and uncertain transfer function of a system (Cordón et al., 2002; Espinosa and Vandewalle, 2000). Most FLC`s are designed based on the experience or knowledge of experts. However, it is often the case that no expert is available. Therefore, the time-consuming trial and error method is usually used to find fuzzy control rules and membership functions. For efficiency, an optimal design of control rules and membership functions is desired (Pedryez, 2001; Alcalá et al., 2007).

Pedryez and Reformat (2005), Nakamura and Kehtarnavez (1995) and Aytekin (2003) have used various methods over the past decade to optimize membership functions while in other studies Liu et al. (2001), Krone et al. (2000), Cordón et al. (2000), Huang and Xing (2002), Huang and Moraga (2005), Guely and Siarry (1993), Andrews et al. (1995) and Yam et al. (1999) have been used to design control rules for FLC`s. However, these designs of FLC`s still require the use of an expert`s experience. In this study, to apply the FLC`s more efficiently, a strategy based on combining Genetic Algorithm with H∞ Filtering is presented to determine both membership functions and fuzzy rules simultaneously in a suitable manner. The fuzzy rules optimization can be formulated as a space search problem, where each point represents a rule base set and corresponding membership functions. These characteristics lead to evolutionary algorithms, such as GA, as better candidates for searching these spaces (Pham and Karaboga, 2000; Kim and Roschke, 2006). Also the optimization of membership functions can be viewed as an identification problem for a nonlinear dynamic system. This identification problem can be solved with a H∞ Filter. If we constrain the membership functions to a specific shape (e.g., triangles or trapezoids) then each membership function can be parameterized by a few numbers of variables and the membership optimization problem can be reduced to a parameter optimization problem. Then the parameter optimization problem can be formulated as a nonlinear filtering problem (Shen and Deng, 1997; Zhou and Feng, 2008). In the other words, the optimization process consists of two separate phases. First we generate and fix the fuzzy set of the input/output variables of the system by using a genetic algorithm with defining appropriate operators such as chromosomes, selection, crossover and mutation. So these fuzzy sets must be refined. In the second step a H∞ Filter method as a linear estimator does the fine-tuning by optimization the parameters of the fuzzy membership functions (triangular membership functions in this study). The proposed mixed learning procedure makes the design of FLC`s simpler and more efficient (Alam and Tokhi, 2007; Arslan and Kaya, 2001; Wong and Hamouda, 2000).

The objective of this study is the use of hybrid method for optimizing the fuzzy rules and parameter of membership.

MATERIALS AND METHODS

Genetic algorithm: The Genetic Algorithm (GA) is an optimization and heuristic global search technique based on the principles of genetics and natural selection. A GA allows a population composed of many individuals to evolve under specified selection rules to a state that maximizes the fitness (i.e., minimizes the cost function). There are also some special improved properties in the searching process of genetic algorithm. Usually, genetic algorithm has three operations called selection, crossover and mutation (Pham and Karaboga, 2000; Srinivas and Patnaik, 1994).

Define the string of a chromosome: The string of searching parameters for the optimization problem should be defined first. These parameters are genes in a chromosome, which can be binary or real coded and termed chromosome. Various chromosomes represent various solutions.

Define cost function: The cost function is the performance index of GA to evaluate each chromosome. Definition of cost function is according to the performance requirements of the problem, e.g., convergence value, error, settling time, rise time, etc.

Initial population: The GA starts with a group of chromosomes known as population. The population has Npop chromosomes called population size.

Selection operator: In order to replace the discarded chromosomes (low fitness chromosomes) and keep the population size constant, two chromosomes are selected from the remaining chromosomes to produce two new offspring.

Table 1: Example of the Selection of a GA

Table 2: Example of the Crossover of a GA

Table 3: Example of the Mutation of a GA

Pairing takes place in the mating population until sufficient offspring are born to replace the discarded chromosomes. An example of the operation is shown in Table 1.

Crossover (mating) operator: Mating is the creation of one or more offspring from the parents selected in the pairing process. The current members of the population limit the genetic makeup of the population. The most common form of mating involves two parents that produce two offspring. An example of the operation is shown in Table 2.

Mutation operator: The mutation operator is used to avoid the possibility of mistaking a local optimum for a global one. Consequently, mutation keeps the GA from converging too fast before sampling the entire cost surface. An example of the operation is shown in Table 3.

H∞ filtering: This section briefly outlines the H∞ Filtering algorithm. Consider a nonlinear, discrete time system given by Shen and Deng (1997), Zhou and Feng (2008) and Grewal and Andrews (1993):

(1)

where, the vector xi is the state of the system at time i, ωi the process noise, yi is the observation Vector, vi is the observation noise, δi is an arbitrary noise sequence and f(·) and h(·) are nonlinear vector functions of the state. The problem addressed by the H∞ filter is to find an estimate of xi+1 given yk (k = 0... i). It is assumed that the sequences {vi} and {ωi} are independent unity variance noise process, but the noise sequence {δi} is arbitrary. We define the augmented noise vector and the estimation error as follows:

(2)

The problem solved by the H∞ filter is to find an estimate such that the infinity norm of the transfer function from the augmented noise vector e to the estimation error is bounded by a user-defined quantity γ.

(3)

where, the maximum steady state gain from e to is less than γ. It can be shown (Zhou and Feng, 2008) that the desired estimate can be obtained by the following recursive H∞ estimator.

(4)

(5)

Assume that {Qi} and {Pi} are nonsingular sequences of matrices. Ki is known as the H∞ gain. In the case of a linear system it can be shown that the covariance of the estimation error is bounded by Q (Zhou and Feng, 2008).

(6)

For nonlinear systems the transfer function is undefined (but the maximum gain from e to is still generally less than γ) and the covariance bound is not strictly satisfied (but is still approximately satisfied). The H∞ filter equations do not satisfy the transfer function bound (3) or the covariance bound (6) unless the following inequalities hold at each time step i.

(7)

The determination of B and γ in (1) and (3) is a difficult task that remains as an open research problem, however, some general guidelines for determining B and γ can be given. As we increase B and γ we tell the filter that the state is likely to change more at each time step. This results in a filter that is more responsive to changes in the measurement. This can be viewed as an increase in the bandwidth of the filter (Assawinchaichote et al., 2007).

The optimization process: Here, the hybrid algorithm which consists of two separate phases is introduced. Here, we will limit present discussion to single output system with two inputs (error and change in error) for ease of notation and illustration, however, the results of this study can be easily extended to multiple output systems. Also, we will assume that the membership functions are triangular.

First the number of fuzzy sets of the input/output variables and the range of each input/output (-l, l) are initiated. For example we start with three fuzzy variables, i.e., the linguistic values NL (Negative Large), ZO (Zero) and PL (Positive Large). If the performance of the designed FLC can not operate efficiency, the number of fuzzy variables will automatically increase by one until the requirement is satisfied. Input/output constrains are determined with respect to case study conditions. A triangular-shaped membership function can be parameterized by the three parameters. We denote the centroid, lower half width and upper half width of the ith membership function of the jth input/output by cij, aij and bij as shown in Fig. 1 The degree of membership function of a crisp input/output x in the ith category of the jth input/output is therefore given by Zhou and Feng (2008):

(8)

The defuzzification algorithm (used here) is the simple maximum-corresponding method, as shown in Fig. 2 (Yen and Langari, 1999).

Fig. 1: A triangular membership function with three parameters

Fig. 2: The simple maximum-corresponding method for defuzzification

Fig. 3: Example of chromosome

Phase 1: Rule optimization by GA: In this phase the number and sequence of fuzzy rules are optimized. The parameters of membership functions are selected randomly. Assume that the initial number of fuzzy rules which are applied to FLC is N. Therefore, 3xN membership functions are needed (for two inputs one output system). As mentioned earlier, each membership function has three parameters c, a and b (centroid, lower half width and upper half width of the membership function, respectively). Consequently, 3x3xN parameters must be initiated randomly with respect to input/output constrains. In this paper we start with three fuzzy sets, i.e., the linguistic values NL, ZO and PL. the chromosome of the GA includes NxN consequent variables on the fuzzy control table. To reduce the number of genes in the chromosome, the discrete real-coded genes are used. An example of the collection of the genes in the chromosome is shown in Fig. 3 (Liu et al., 2001; Pedryez and Reformat, 2005; Magdalena, 1997):

Numbers 1, 2 and 3 in the chromosomes represent the linguistic values NL, ZO and PL, respectively. Table 4 shows the decoded chromosome. Npop chromosomes of an initial population are randomly generated. The cost function of each chromosome is calculated. The chromosomes are sorted by their costs and three genetic operations, reproduction, crossover and mutation, are applied to generate the next generation.

The GA will repeat the procedure until the requirement is achieved and convergence takes place. If the cost function of the best chromosomes remains constant for a certain number of generations, M, number of fuzzy sets are increased automatically by GA and the algorithm is reinitiated.

The cost function f in GA phase is composed of two performance indexes, the maximum overshoot Mp and the settling time ts, in the system`s step response as (Magdalena, 1997).

(9)

where, β is the weighting factor. If β is set to be smaller than 0.7 the settling time is reduced and if it set to be larger than 0.7 the overshoot is reduced.

Phase 2: Membership optimization by H∞ filtering: The fuzzy sets obtained in phase 1 must be refined.

Table 4: Fuzzy rules for chromosome example

This refinement is achieved by fine tuning the parameters of the triangular membership functions using H∞ filter (Simon, 2003; Shen and Deng, 1997; Zhou and Feng, 2008; Grewal and Andrews, 1993). In order to cast the membership function optimization problem in a suitable form for H∞ filtering, the parameters of membership functions are constituted the state of a nonlinear system and the output of the fuzzy system is constituted by the output of the nonlinear system to which the H∞ filter is applied. The cost function (error function) in H∞ filter phase is:

(10)

where, T is the number of training samples, yq is the target value of the fuzzy approximation of the system and ŷq is the output of the fuzzy system. We can optimize E by using the partial derivatives of E with respect to the centroids and half-widths of the input and output fuzzy membership function parameters. This idea was first suggested by Guely and Siarry (1993) and was extended in Simon (2003). In this study we will optimize the parameters of membership function of both the two inputs and the single output of FLC.

Consider a 2-input, 1-output FLC which has N fuzzy rules for each set of inputs and output. As above, we denote the centroid and half widths of the ith fuzzy membership function of the jth input/output by cij, aij and bij. The state vector x in (1) of the non- linear system can then be expressed as:

(11)

where, the vector x thus consists of all parameters of fuzzy membership functions arranged in a single vector.

The nonlinear system model to which the H∞ filter can be applied is (1) where h(xi) is the nonlinear mapping of fuzzy system between the parameters of membership function and the single output of the fuzzy system. ωi and vi are artificially added noise processes that improve the stability of the H∞ filter (Zhou and Feng, 2008). Now we can apply the H∞ filter recursion (5). f(.) is the identity mapping, yi is the target output and is the actual output of the fuzzy system, given the current membership function parameters.

Fig. 4: Flowchart of hybrid optimization algorithm

Hi is the partial derivative of fuzzy output with respect to the membership function parameters (which can be computed by the successful use of the H∞ filter) and Fi is the identity matrix. The Qi and Pi matrices are tuning parameters which can be considered as the covariance matrices of the artificial noise processes ωi and vi respectively. The flowchart of hybrid algorithm (phase 1 and 2) is shown in Fig. 4.

RESULTS AND DISCUSSION

In order to test the introduced hybrid method, we apply it to a fuzzy controller for an automotive cruise control system (Yen and Langari, 1999). An automobile`s acceleration can be stated as a function of the external forces acting on the vehicle: engine force Fengine, drag force Fdrag (a function of velocity) and gravity-induced force Fgravity (a function of road grade). If we assume that the time constant of the engine is small relative to the time constant of the vehicle, we obtain:

(12)

where, m is the vehicle mass, θ is the throttle position and F*engine and Fdrag are given by:

(13)

where, η, α and Fidle are constants. In this study we use the values m = 800 kg, η = 15000 N and α = 6 N/(m/s)2. Fidle is the engine idle force, which we will assume to be 1200 N.

Fig. 5: Schematic of case study

Fig. 6: Convergence of GA in the first stage

Both the Genetic Algorithm (GA) and H∞ Filter have been implemented in MATLAB® to optimize the fuzzy rules and membership functions of FLC. The control goal is to retain vehicle velocity at specific value (reference speed) for example 25 m sec-1. Assume the vehicle is moving on a flat road and a sudden 15% increase in the road grade will cause a decrease on speed. In this time the FLC must be operated to retain speed at reference value, 25 m sec-1 (Fig. 5).

The FLC has two inputs, error and change in error and a single output, θ, as a control signal. The error is defined as the reference speed minus the measured speed. First GA starts with three fuzzy sets, NL, ZO and NB to generate minimum number and best sequence of rules. Range of each input (-l,l) is (-10,10) and range of output is (-1,1).The initial population number NPOP is equal to 50 and weighting factor in (9) is selected 0.7. Number of total iterations in GA phase and number of generations for reinitialization, M, are 150 and 25, respectively. The convergence curve of GA and obtained fuzzy rules are shown in Fig. 6 and Table 5, respectively.

Now these fuzzy sets which are obtained from first phase, GA, must be refined by fine tuning the parameters of the triangular membership functions using H∞ filter.

Fig. 7: Performance of FLC before and after optimization

Table 5: Optimization rules for the FLC

Table 6: Membership parameters of input 1

There are three fuzzy rules for each set of two inputs and the output. So N in (11) is equal to three and the FLC has a total of 9 membership functions for the two inputs and one output. Each membership function is constrained to be triangular, therefore each function has three parameters (a centroid and two half widths). Consequently, the FLC has a total of 27 parameters to be determined. Thus we have 27 state variables in (11). The parameters of H8 filter are set as follows: the matrix P0 in (5) is set to 30000 I27 (I27 is 27x27 identity matrix); the matrix Q0 in (5) is set to 3000 I27.

Figure 7 shows the performance of nominal and optimized FLC to retain the speed of vehicle at 25 m sec-1 when a sudden 15% increasing in the road grade is occurred. It can be seen that the FLC performance has been improved after optimizing process. Also, the best membership function parameters obtained from H∞ filter are shown in Table 6-8.

The proposed mixed learning method is implemented in MATLAB® to optimize the fuzzy rules and membership functions of FLC on a PC with 1.2 GHz processor and 256 MB of RAM. Number of iterations which are needed for convergence of both algorithms in each phase (GA and H∞ filter) and their simulation times are illustrated in Table 9.

Table 7: Membership parameters of input 2

Table 8: Membership parameters of output

Table 9: No. of iterations and simulation times of each phase

CONCLUSION

In this study, a hybrid method has been used for optimizing fuzzy rules and parameters of membership functions. The optimization process is divided to two stages. The first one is the genetic algorithm based on three operators, selection, crossover and mutation to generate minimum number and appropriate sequence of fuzzy rules. The other stage is the optimization of membership function by H∞ filter approach based on derivative of the error function with respect to membership function parameters. We constrained the membership functions to a triangular shape; then each membership function can be parameterized by three variables (centroid and two half widths) and the membership optimization problem can be convert to a parameter optimization problem. This technique can save time compared to a conventional trial and error design procedure. The optimized FLC requires only a few fuzzy sets. To test the introduced method, the optimized FLC was applied to an automotive cruise control problem and the results were satisfactory when compared with a nominal FLC.

REFERENCES

  • Alcalá, R., J.A. Fdez, F. Herrera and J. Otero, 2007. Genetic learning of accurate and compact fuzzy rule based systems based on the 2-tuples linguistic representation. Int. J. Approximate Reason., 44: 45-64.
    CrossRef    Direct Link    


  • Andrews, R., J. Diederich and A.B. Tichle, 1995. A survey critique of techniques for extracting rules from trained artificial neural networks. Knowledge-Based Syst., 8: 373-389.
    CrossRef    Direct Link    


  • Arslan, A. and M. Kaya, 2001. Determination of fuzzy logic membership functions using genetic algorithms. Fuzzy Sets Syst., 118: 297-306.
    CrossRef    Direct Link    


  • Assawinchaichote, W., S.K. Nguang and P. Shi, 2007. Robust H∞ fuzzy filter design for uncertain nonlinear singularly perturbed systems with Markovian jumps: An LMI approach. Inform. Sci. Int. J., 177: 1699-1714.
    CrossRef    Direct Link    


  • Aytekin, B., 2003. Determining fuzzy membership functions with tabu search-an application to control. Fuzzy Sets Syst., 139: 209-225.
    CrossRef    Direct Link    


  • Cordón, O., F. Herrera and I. Zwir, 2002. Linguistic modeling by hierarchical systems of linguistic rules. IEEE Trans. Fuzzy Syst., 10: 2-20.
    CrossRef    INSPEC


  • Cordón, O., F. Herrera and P. Villar, 2000. Analysis and guidelines to obtain a good uniform fuzzy partition granularity for fuzzy rule-based systems using simulated annealing. Int. J. Approximate Reason., 25: 187-215.
    CrossRef    Direct Link    


  • Eftekhari, M. and S.D. Katebi, 2007. Extracting compact fuzzy rules for nonlinear system modeling using subtractive clustering, GA and unscented filter. Applied Math. Model.,
    CrossRef    


  • Espinosa, J. and J. Vandewalle, 2000. Constructing fuzzy models with linguistic integrity from numerical data-AFRELI algorithm. IEEE Trans. Fuzzy Syst., 8: 591-600.
    CrossRef    


  • Grewal, M.S. and A.P. Andrews, 1993. Kalman Filtering Theory and Practice. 1st Edn., Prentice-Hall. Inc. Upper Saddle River, NJ, USA., ISBN: 0-13-211335-X


  • Guely, F. and P. Siarry, 1993. Gradient descent method for optimizing various fuzzy rule bases. Proceedings of the 2nd International Conference on the Fuzzy Systems, March 28-April 1, 1993, San Francisco, CA., USA., pp: 1241-1246.


  • Huang, S.H. and H. Xing, 2002. Extract intelligible and concise fuzzy rules from neural networks. Fuzzy Sets Syst., 132: 233-243.
    CrossRef    Direct Link    


  • Huang, C. and C. Moraga, 2005. Extracting fuzzy if-then rules by using the information matrix technique. J. Comput. Syst. Sci., 70: 26-52.
    CrossRef    Direct Link    


  • Jacomet, M., A. Stahel and R. Wälti, 1997. On-line optimization of fuzzy systems. Inform. Sci. Int. J., 98: 301-313.
    CrossRef    Direct Link    


  • Kim, H.S. and P.N. Roschke, 2006. Design of fuzzy logic controller for smart base isolation system using genetic algorithm. Eng. Struct., 28: 84-96.
    CrossRef    Direct Link    


  • Krone, A., H. Krause and T. Slawinski, 2000. A new rule reduction method for finding interpretable and small rule bases in high dimensional search spaces. Proceedings of the 9th IEEE International Conference on Fuzzy Systems, May 7, 2000, San Antonio, TX, USA., pp: 694-699.


  • Liu, B.D., C.Y. Chen and J.Y. Tsao, 2001. Design of adaptive fuzzy logic controller based on linguistic hedge-concepts and genetic algorithms. IEEE Trans. Syst. Man Cybernetics Part B: Cybernetics, 31: 32-53.
    CrossRef    INSPEC


  • Zadeh, L.A., 1994. Soft computing and fuzzy logic. IEEE Software, 11: 48-56.
    CrossRef    Direct Link    


  • Magdalena, L., 1997. Adapting the gain of an FLC with genetic algorithms. Int. J. Approximate Reason., 17: 327-349.
    CrossRef    Direct Link    


  • Nakamura, E. and N. Kehtarnavaz, 1995. Optimization of fuzzy membership function parameters. Proceedings of the International Conference on Systems, Man and Cybernetics, October 22, 1995, Vancouver, Canada, pp: 1-6.


  • Pham, D.T. and D. Karaboga, 2000. Intelligent Optimization Techniques: Genetic Algorithms, Tabu Search, Simulated Annealing and Neural Networks. 1st Edn., Springer, Berlin, Heidelberg, New York, London, ISBN: 1852330287, pp: 302
    CrossRef    


  • Pedryez, W., 2001. Fuzzy equalization in the construction of fuzzy sets. Fuzzy Sets Syst., 119: 329-335.
    CrossRef    Direct Link    


  • Pedryez, W. and M. Reformat, 2005. Genetically optimized logic models. Fuzzy Sets Syst., 150: 351-371.
    CrossRef    Direct Link    


  • Shen, W. and L. Deng, 1997. Game theory approach to discrete H∞ filter design. IEEE Trans. Signal Processing, 45: 1092-1095.
    CrossRef    INSPEC


  • Simon, D., 2002. Training fuzzy systems with the extended Kalman filter. Fuzzy Sets Syst., 132: 189-199.
    CrossRef    Direct Link    


  • Simon, D., 2003. Kalman filtering for fuzzy discrete time dynamic systems. Applied Soft Comput., 3: 191-207.
    CrossRef    Direct Link    


  • Srinivas, M. and L.M. Patnaik, 1994. Genetic algorithms: A survey. Computer, 27: 17-26.
    CrossRef    PubMed    


  • Wong, S.V. and A.M.S. Hamouda, 2000. Optimization of fuzzy rules design using genetic algorithm. Adv. Eng. Software, 31: 251-262.
    CrossRef    Direct Link    


  • Yam, Y., P. Baranyi and C. Yang, 1999. Reduction of fuzzy rule base via singular value decomposition. IEEE Trans. Fuzzy Syst., 7: 120-132.
    CrossRef    INSPEC


  • Yen, J. and R. Langari, 1999. Fuzzy Logic: Intelligence, Control and Information, Prentice Hall. 1st Edn., Upper Saddle River, Englewood Cliffs, NJ.


  • Zhou, S. and G. Feng, 2008. H∞ filtering for discrete-time systems with randomly varying sensor delays. Automatica, 44: 1918-1922.
    CrossRef    Direct Link    


  • Alam, M.S. and M.O. Tokhi, 2008. Hybrid fuzzy logic control with genetic optimisation for a single-link flexible manipulator Eng. Applied Artif. Intell., 21: 858-873.
    CrossRef    

  • © Science Alert. All Rights Reserved