Wednesday, May 22, 2013

Easy Way to Understand Fuzzy Inference - 1


Fuzzy Inference is the brain of fuzzy logic system. In this stage, skills & experiences of an expert control engineer are needed to design behavior of the system. As mentioned in the previous discussion, input variable Angle has 5 membership functions (linguistic variables); neg_big, neg_small, zero, pos_small & pos_big, input variable Distance also has 5 membership functions; neg_close, zero, close, medium & far, and output variable Power has 5 membership functions i.e. pos_high, pos_medium, zero, neg_medium and neg_high.
Fuzzification VHDL

The following table is summary of fuzzy inference of the system that comprises 2 inputs (Angle, Distance) and 1 output (Power) with 5 membership functions:

neg_big
neg_small
zero
pos_small
pos_big
neg_close
neg_high
neg_med
neg_med
pos_med
zero
zero
neg_med
neg_med
zero
pos_med
pos_med
close
neg_med
zero
zero
zero
pos_med
medium
neg_med
neg_med
zero
pos_med
pos_med
far
zero
neg_med
pos_med
pos_med
pos_high

As shown in the table above, Y axis (blue color) represents input variable Distance and X axis (yellow color) represents input variable Angle. Output variable Power (white color) is located in the middle between X and Y axis (the 2 input variables). Based on the table we can describe IF-THEN rules of the system as follows:
  1. IF Distance = neg_close AND Angle = neg_big THEN Power = neg_high
  2. IF Distance = neg_close AND Angle = neg_small THEN Power = neg_med
  3. IF Distance = neg_close AND Angle = zero THEN Power = neg_med
  4. IF Distance = neg_close AND Angle = pos_small THEN Power = pos_med
  5. IF Distance = neg_close AND Angle = pos_big THEN Power = zero
  6. IF Distance = zero AND Angle = neg_big THEN Power = neg_high
  7. IF Distance = zero AND Angle = neg_small THEN Power = neg_med
  8.  
    21. IF Distance = far AND Angle = neg_big THEN Power = zero 
    22. IF Distance = far AND Angle = neg_small THEN Power = neg_med
    23. IF Distance = far AND Angle = zero THEN Power = pos_med 
    24. IF Distance = far AND Angle = pos_small THEN Power = pos_med
    25. IF Distance = far AND Angle = pos_big THEN Power = pos_high

Fuzzy Inference of 2 input variables and 1 output variable with 5 membership functions will give 25 IF-THEN rules as mentioned above. We suppose you can build IF-THEN rules 8th to 20th by your self. Next discussion related to this topic can be read on easy-way-to-understand-fuzzy-inference-2.

Let ask us if you are still fuzzy with this...


Source of figures: Industrial Application of Fuzzy Logic Control (slide presentations), Inform Software Corporation, 20001 Midwest Rd., Oak Brook, IL 60521, U. S. A.

No comments:

Post a Comment