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

Fuzzification

Fuzzification is the process that determines the degree of membership of the input values to defined fuzzy sets (linguistic variables). In the case of the rotation speed control of serial universal motors, the input values are:

  1. Absolute error in the rotation speed
  2. Error = SetSpeed – CurrentSpeed

  3. Differential rotation speed error
  4. This value is obtained by subtracting the previous error value from the current error value:

    dError = Error – LastError

In the example for this application report, five fuzzy sets are defined for the input values Error and dError:

  1. NM: negative medium
  2. NS: negative small
  3. ZE: zero equal
  4. PS: positive small
  5. PM: positive medium

The membership functions (see Figure 1) are triangular-shaped and the maximum value is scaled to 400h instead of 1, which is found in other documents describing fuzzy theory. Using 400h greatly reduces the calculation complexity, because the multiplying operation becomes only one addition or subtraction.

fig01_slaa235.gifFigure 1. Membership Function

The result of the fuzzification of an input value is a vector with five elements as there are five fuzzy sets, and the value of each member defines the degree of membership of the input value to a particular fuzzy set (y-value). The vectors for the absolute and differential errors which are the results of the fuzzification are denoted as X1[ ] and X2[ ].

For example, assume Error is 30h and dError is 10h. According to Figure 2 and Figure 3, the results after fuzzification are:

X1[ ] = [0h, 0h, 3D0h, 30h, 0h]

X2[ ] = [0h, 0h, 3F0h, 10h, 0h]

fig02_slaa235.gifFigure 2. Membership Function For Error (X1[ ])
fig03_slaa235.gifFigure 3. Membership Function For dError (X2[ ])