SLAA235A February   2005  – August 2018 MSP430F147 , MSP430F147 , MSP430F148 , MSP430F148 , MSP430F149 , MSP430F149

 

  1.   Fuzzy Logic Motor Control With MSP430™ MCUs
    1.     Trademarks
    2. 1 Background Information
      1. 1.1 Fuzzification
      2. 1.2 Fuzzy Inference
      3. 1.3 Centroid Calculation Defuzzification Method
    3. 2 Hardware Description
    4. 3 Software Description
    5. 4 References
  2.   Revision History

Centroid Calculation Defuzzification Method

The result of the defuzzification must be a numeric value that determines the duty factor of the PWM signal that drives the motor. This value is obtained by finding the centroid point of the function that is the result of the multiplication of the output membership function and the output vector Y[ ]. The general mathematical formula to obtain the centroid point is:

Equation 1. eq01_slaa235.gif

Y[i] are the i-th members of the output vector,

multifact[i] are the multiplying coefficients of the output membership function.

Figure 4 shows a graphical representation of the output membership function as used in this application with the coefficients [-10h, -8h, 0h, 8h, 10h].

fig04_slaa235.gifFigure 4. Output Membership Function

Using the example output vector Y[ ] = [0h, 30h, 3D0h, 0h, 0h], the following defuzzification output value can be calculated:

Equation 2. eq02_slaa235.gif
fig05_slaa235.gifFigure 5. Output Membership Function Multiplied with Vector Y[ ]