Spark! Fuzzy Logic Editor Help


Variables | Sets | Rules | API | Integration | Tutorial


Output Fuzzy Variable

Spark! currently only supports two defuzzification methods:

Center of Gravity

The Center of Gravity defuzzification method calculates the center of gravity for the "filled" portions of the sets.  The center of gravity is the point at which the set would "balance".  In figure 1 below, each of the "filled" portions of the sets is balanced on the black wedge.  The green line shows the 'x' value for the center of gravity.

Figure 1

 

In Figure 2, the sets are combined as they would in a Spark! model.  The green line shows the COG for each set, but in the output variable, we're concerned with the point at which the combination of the sets would balance.  This point is shown by the black wedge.  The COG defuzzification method, calculates the 'x' value for that point. 

Figure 2

Maxima

The Maxima defuzzification method isn't one you find in many of the fuzzy logic "theory and application" books.  It is simply the index of the set with the highest degree of membership.  

This method is used when you do not want a specific 'x' value but are interested only in which output set is the "winner".  For example if you were using a Spark! model to decide which weapon a video game "bad guy" should fire.  An output value of 35.46 wouldn't help much.  You're interested in which "Set" was most active ("Pistol", "Cannon", "Nuke", etc.).

This defuzzification method can be used to create Fuzzy State Machines (FuSMs).