Design of a fuzzy logic controller with GA learning

Design of a fuzzy logic controller with GA learning(OLD PROPOSAL)

Anirban Chakraborty
(9710406 EE)


Formatting


Motivation

We know that, fuzzy logic, unlike boolean algebra or crisp logic,deals with problems that have vagueness, uncertainity, or imprecision,and uses membership functions with values varying between 0 and 1. Fuzzy logic tends to mimic human thinking which is also fuzzy in nature. Fuzzy logic is recently finding wide application in management,control,economics,medicine. A real-time system has a nonlinearity with parameter variation problem. The control also needs to be very fast. In most of the cases, sensor signals are imprecise. There is always some uncertainity. To handle this uncertainity fuzzy logic is an useful tool. The fuzzy control is basically non-linear and adaptive in nature,giving robust performance under parameter variation and load disturbance effect. I also want to apply genetic algorithms in the design of fuzzy membership functions and fuzzy rules simultaneously.

Literature review

In most of the papers,generation of membership functions, had been a task mainly done either iteratively,or by trial and error method,or by human experts. Now GA's can be used for the generation of membership functions and rule base,so that the control systems can operate optimally. Karr,for example, has used a genetic algorithms to generate membership functions for pH control problem and cart-pole problem. Such papers have shown GA's ability to create individual part of a fuzzy logic controller. Membership functions have strong co-relations with rule bases. Furthermore,rule base has more effect on the output. So designing one by an expert and the other by GA's will not produce good results. So i want to produce both by GA's. McCormic has done such type of works. Bose has designed a number of fuzzy logic controllers, but all are based on expert's experience.

Input/Output and Methodology

I want to design and analyze a fuzzy controller for the simplified version of inverted pendulum. At first the differential equation of the system has to be formulated. In this equation angular position and angular velocity are the controlled variables. Force is the control action. Then the system would be expressed by two state equations. For this problem we want to keep the angular position within +2 degrees and -2 degrees and angular velocity within +5dps and -5dps. Here angular position and angular velocity are state variables.

Inverted Pendulum

Now i want to construct three membership functions(negative,zero and positive)for each state variable. The membership functions will be bell shaped. So they can be defined by three variables.(a,b,c). Here c defines the central axis of membership functions. A and b are responsible for the slope and positions of points. where the membership values are 0.5. I will adjust the values of the parameters of the membership function with label 'zero'. Initially I will give the initial values of a,b,c in binary form. Each will be converted to (or encoded into)a 4 -bit binary equivalent.

	 parameter		ranges      
	 ~~~~~~~~           ~~~~~~~~~~~~~~
            a               ( .75 to 1.25),
            b               ( .75 to 1.25),
            c               ( -.25 to +.25)
For two sides b/a polarities are different. A decoding formulae is used to get the decimal equivalent.

The output space is also fuzzified by 7 labels. Each label will be represented by a 3-bit binary equivalent. The range of the output force is between -24N and +24N. The output membership functions are not formed by GA's otherwise defuzzification would be difficult.

We then construct 9 rules in a 3*3 FAM table. So each individual of one generation consists of 4*3(position membership functions)+4*3(angular velocitymembership function)+3*9(for rules of FAM table)alleles

The number of individuals in one generation=10. Maximum number of generations=100. Probablity of recombination=0.7. Probablity of mutation=.03.

Then some initial values of angular positions and angular velocity are assumed. Then we do 10 iterations. In each set of 10 iterations we take one set of parameter values or an individual. In the iterations 'and'('min')operations are done to get the firing strengths. There would be 4 'and' operations in each iteration.

For each combination of two input labels the output label is determined by FAM table. Then defuzzification is done by height method. After defuzzification we get the force output. With this value of force and state equations the new values of state variables are found. With these new values the next iteration is started. If both the variables in each iteration lies within the limit the individual will be awarded 10 points. If either of the variables lies outside the prescribed limit, the individual will be awarded 0. If both the limits are crossed the individual will be awarded -10 points.

Then with the same individual another set of initial state variables are chosen and 10 more iterations are done. In this way 10 sets of initial variables are tested out. Now the sum of fitness values is the ultimate fittness of the individual. All the individuals are tested and given a fittness value according to its performance.

The first 6 individuals are selected according to their fittness values. They are inherited directly to the next generation. They are also allowed to reproduce. To select two mates the C library function 'random' is used. Now to detect whether the recombination is allowed or not a coin is flipped . If head comes out the recombination is allowed. The coin flipping operation is implemented by means of a subroutine. Then again the function 'random' is called to obtain to get the location of recombinations. In almost same manner the mutations are done. It should be observed whether the average fittness, maximum fittness,minimum fittness are increasing or not.

BIBLOGRAPHY

  1. Homaifar,McCormic,"Simultaneous design of membership functions and rule sets for for Fuzzy controllers using GA's.", IEEE Transactions on Fuzzy Systems, vol.3, no 2, MAY 1995 .
  2. Sousa, Bose , "Design of a FLC for phase controlled rectifier fed dc motor " ,IEEE Transactions on Industry Applications, vol.30, no.2, Jan/Feb 1994.
  3. Jang, "ANFIS" ,IEEE transactions on Systems, Man and Cybernatics, vol.23, No.3 MAY/JUNE 1993
  4. KIM , Zeigler , "Designing of a FLC using a multiresolutional paradigm ". IEEE transactions on Fuzzy systems, 1996
  5. Guo,Peters , "Design and application of an analog FLC ", IEE trans.on fuzzy systems , vol.4, Nov 1996
  6. G.J.Goldberg , "Computer implementation of a Genetic Algorithms "(book)
  7. T.J.ROSS , "Fuzzy logic and its Engineering Applications"(book)
  8. B.K.Bose , "Expert Systems, Fuzzy logic and Neural Network Applications on Power Electronics and motion control ", Proc, of IEEE, vol.8 , No.8 , Aug 1994
      end