# Center of Gravity (CoG) method for defuzzification

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

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

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.).

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

Let A_{i} and x_{i} denotes the area and center of gravity of i-th sub-region.

A_{i}=∫ μ_{C}(x) dx and n is the number of geometrical components

**Example:**

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

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

**Equation of line ab:**

(y – y_{1}) / (x – x_{1}) = (y_{2} – y_{1}) / (x_{2} – x_{1})

For line ab, (x_{1}, y_{1}) = (0, 0) and (x_{2}, y_{2}) = (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 – y_{1}) / (x – x_{1}) = (y_{2} – y_{1}) / (x_{2} – x_{1})

For line ab, (x_{1}, y_{1}) = (1, 0.5) and (x_{2}, y_{2}) = (3.5, 0.5)

Horizontal line has 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 – y_{1}) / (x – x_{1}) = (y_{2} – y_{1}) / (x_{2} – x_{1})

For line ab, (x_{1}, y_{1}) = (3.5, 0.5) and (x_{2}, y_{2}) = (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)

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

**Equation of line de:**

(y – y_{1}) / (x – x_{1}) = (y_{2} – y_{1}) / (x_{2} – x_{1})

For line ab, (x_{1}, y_{1}) = (4, 0.8) and (x_{2}, y_{2}) = (6, 0.8)

Horizontal line has 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 – y_{1}) / (x – x_{1}) = (y_{2} – y_{1}) / (x_{2} – x_{1})

For line ab, (x_{1}, y_{1}) = (6, 0.8) and (x_{2}, y_{2}) = (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:**

Putting all these values in equation for CoG method,

= 4.151

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

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