Dr. Friedman-Hill:
I am trying to test Fuzzy Jess inside my rules and had one question - what is the formular to calculate the local centre of gravity?
Thanks.
Yuping
****************************************************************************************************************************************
momentDefuzzify
Moment defuzzification defuzzifies the FuzzySet of the FuzzyValue returning a floating point (double value) that represents the fuzzy set. It calculates the first moment of the area of a fuzzy set about the y axis. The set is subdivided into different shapes by partitioning vertically at each point in the set, resulting in rectangles, triangles, and trapezoids. The centre of gravity (moment) and area of each subdivision is calculated using the appropriate formulas for each shape. The first moment of area of the whole set is then:
![]()
where xiยด is the local centre of gravity, A i is the local area of the shape underneath line segment (pi-1, pi), and n is the total number of points. As an example,
For each shaded subsection in the diagram above, the area and centre of gravity is calculated according to the shape identified (i.e., triangle, rectangle or trapezoid). The centre of gravity of the whole set is then determined:
![]()
Moment defuzzification defuzzifies the FuzzySet of the FuzzyValue returning a floating point (double value) that represents the fuzzy set. It calculates the first moment of the area of a fuzzy set about the y axis. The set is subdivided into different shapes by partitioning vertically at each point in the set, resulting in rectangles, triangles, and trapezoids. The centre of gravity (moment) and area of each subdivision is calculated using the appropriate formulas for each shape. The first moment of area of the whole set is then:
where xiยด is the local centre of gravity, A i is the local area of the shape underneath line segment (pi-1, pi), and n is the total number of points. As an example,
For each shaded subsection in the diagram above, the area and centre of gravity is calculated according to the shape identified (i.e., triangle, rectangle or trapezoid). The centre of gravity of the whole set is then determined: