Center of Gravity (CoG) method for defuzzification

Center of Gravity (CoG) is the most prevalent and physically appealing of all the defuzzification methods [Sugeno, 1985, Lee 1990]

The basic principle in the CoG method is to find the point x∗ where a vertical line would slice the aggregate into two equal masses.

Defuzzification using CoG method
Defuzzification using CoG method

If ÎŧC is defined with continuous MF:

âˆĢ ÎŧC(x) dx denotes the area of the region bounded by the curve C.

If ÎŧC is defined with discrete MF:

Disadvantage: Computationally intensive

CoG: A geometrical method of calculation

This method returns a precise value depending on the fuzzy set‘s center of gravity. The overall area of the membership function distribution used to describe the combined control action is divided into a number of sub-areas (such as triangle, trapezoidal etc.).

The area and center of gravity, or centroid, of each sub regions, are calculated. Then the sum of all these sub-areas is used to determine the defuzzified value for a discrete fuzzy set

aggregated fuzzy output
Aggregated fuzzy output (before division)
Region splitting for center of gravity
Aggregated fuzzy output (after division)

Let Ai and xi denote the area and center of gravity of i-th sub-region.

Ai=âˆĢ ÎŧC(x) dx and n is the number of geometrical components

Example:

Output fuzzy set 1
Output fuzzy set 1
Output fuzzy set 2
Output fuzzy set 2

To compute the crisp value corresponding to the above output fuzzy sets, we shall create aggregate output by placing them on the same axis

Aggregated fuzzy output
Aggregated fuzzy output
Aggregated fuzzy output with labels
Aggregated fuzzy output with labels

To compute the area covered by these aggregated fuzzy sets, we need to compute the equation of each line forming the region

Equation of line ab:

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

For line ab, (x1, y1) = (0, 0) and (x2, y2) = (1, 0.5)

(y – 0) / (x – 0) = (0.5 – 0) / (1 – 0)

y / x = 0.5 / 1

y = 0.5x   

Line ranges from [0, 1] on X-axis

Equation of line bc:

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

For line ab, (x1, y1) = (1, 0.5) and (x2, y2) = (3.5, 0.5)

The horizontal line has a slope zero, and for any value of x, the y coordinate will remain unchanged. So, for line bc

y = 0.5   

Line ranges from [1, 3.5] on X-axis

Equation of line cd:

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

For line ab, (x1, y1) = (3.5, 0.5) and (x2, y2) = (4, 0.8)

(y – 0.5) / (x – 3.5) = (0.8 – 0.5) / (4 – 3.5)

(y – 0.5) / (x – 3.5) = 0.3 / 0.5

y=(3x / 5) – (8 / 5)

The line ranges from [3.5, 4] on X-axis

Equation of line de:

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

For line ab, (x1, y1) = (4, 0.8) and (x2, y2) = (6, 0.8)

The horizontal line has a slope zero, and for any value of x, the y coordinate will remain unchanged. So, for line bc

y = 0.8   

Line ranges from [4, 6] on X-axis

Equation of line ef:

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

For line ab, (x1, y1) = (6, 0.8) and (x2, y2) = (8, 0)

(y – 0.8) / (x – 6) = (0 – 0.8) / (8 – 6)

(y – 0.8) / (x – 6) = (-0.8 / 2)

y = -0.4x + 3.2   

Line ranges from [6, 8] on X-axis

Summary of line equations:

Line equation for center of gravity

Putting all these values in the equation for the CoG method,

= 4.151

Watch on YouTube:

center of gravity

6 Responses

  1. Hafizhah says:

    Hi, Sir! Thanks for vivid explanation. But I’m still confused how to get range in bc line, that’s on y =3.5 whereas in graph there’s no clear written 3.5? Actually, on point, I’m still confused to determine the range line if there’s no written of number on x absis (not exact in the number, so it’s about comma), is there any formula or rule ? Please explain this, Sir. Thanks a lot

    • codecrucks says:

      Thanks. For that you need to find the intersection of two lines. Probably in defuzzification video, I have explained how to find endpoint coordinates of the line

  2. someone says:

    its 3.625 not 3.5

  3. someone says:

    the intersection of 2 lines are at 3.625 not 3.5!

Leave a Reply

Your email address will not be published. Required fields are marked *