Introduction to Neuro-Fuzzy Systems

The lecture focuses on how to combine Neural Networks (NN) with Fuzzy Logic to develop a Neuro-Fuzzy System (NFS). The primary goal of an NFS is to improve the performance of a fuzzy reasoning tool (or fuzzy logic controller) by representing it using the learning structure of a neural network.

While you can combine these two concepts in different ways—such as a "Fuzzy Neural Network" where individual neurons use fuzzy set theory —the Neuro-Fuzzy System is far more popular and practical for solving real-world problems. The lecture specifically concentrates on an NFS based on the Mamdani Approach.


The 5-Layer Architecture of an NFS

An NFS using the Mamdani approach is structured into five distinct layers, each performing a specific function in the fuzzy inference process:

To optimize this system, the network can be tuned using methods like Batch mode training, Backpropagation (BP) algorithms, or Genetic Algorithms (GA).


Step-by-Step Numerical Example Walkthrough

The bulk of the lecture is dedicated to a numerical example to calculate the prediction deviation of the system.

The Setup:

Here is how the data flows through the 5 layers:

Layer 1

The inputs are passed directly through.

Layer 2 (Fuzzification)

We determine where the inputs fall on the modified triangular membership graphs.

Layer 3 (AND Operation)

Because we have 2 non-zero states for I1 and 2 non-zero states for I2, there are 4 combinations (rules) that activate. We use the minimum value to find the strength of each combination:

  1. NR AND SM: min(0.25,0.272727)=0.25
  2. NR AND M: min(0.25,0.727272)=0.25
  3. FR AND SM: min(0.75,0.272727)=0.272727
  4. FR AND M: min(0.75,0.727272)=0.727272

Layer 4 (Fuzzy Inference)

Using the colored Rule Base grid from the slides, we map the 4 activated combinations to their specific output consequence and attach the strengths calculated in Layer 3:

  1. If I1 is NR AND I2 is SM O is LW (Strength: 0.25)
  2. If I1 is NR AND I2 is M O is LW (Strength: 0.25)
  3. If I1 is FR AND I2 is SM O is H (Strength: 0.272727)
  4. If I1 is FR AND I2 is M O is H (Strength: 0.727272)

Pasted image 20260511210449.png

Layer 5 (Defuzzification)

We now have four "fired" fuzzy shapes. Because the strengths act as a ceiling, the triangular output shapes are cut off (truncated) at their respective strength levels, turning them into trapezoids (or smaller shapes).

Using geometric formulas (as shown in the handwritten notes), the area (A) and center of area (f) are calculated for each of the four shapes:

Finally, the Center of Sums formula is applied to these values:

5O1=(0.9625×6.466)+(0.9625×6.466)+(2.072×9.4)+(4.072×9.4)0.9625+0.9625+2.072724+4.0727225O1=8.700328

The Defuzzification Layer (Layer 5) is the critical final step in a Neuro-Fuzzy System. Its entire purpose is to translate the fuzzy, linguistic conclusions reached by the network back into a concrete, real-world number that a system can actually use.

If a fuzzy controller is managing an air conditioner, the rules might determine that the cooling fan needs to spin at a speed that is a combination of "Medium" and "Fast." The defuzzification layer calculates exactly how many Revolutions Per Minute (RPM) that combination translates to.

1. The Hand-off from Layer 4 (Clipping)

Before Layer 5 can do its math, it receives the "fired" rules from Layer 4.

Each fired rule has a specific strength (a number between 0 and 1 calculated by the AND operations). This strength acts as a horizontal blade that slices off the top of the output membership triangles.

2. The Geometric Breakdown

Layer 5 looks at each of these resulting shapes (the trapezoids) and calculates two specific properties for each one:

(Note: Calculating the area and centroid of a trapezoid requires breaking it down geometrically, which is why your lecture notes show specific equations for finding these values based on the base widths and the cutoff heights).

3. The Center of Sums Calculation

Once Layer 5 has the Area (A) and Center (f) for every fired rule, it aggregates them using a weighted average formula:

Crisp Output=(A1f1)+(A2f2)+...+(Anfn)A1+A2+...+An

Why use Center of Sums? There are other defuzzification methods (like the Center of Gravity method), but Center of Sums is highly popular in Neuro-Fuzzy Systems because it is computationally faster. Instead of trying to calculate the complex mathematical union of overlapping shapes, Center of Sums simply adds the areas together, even if they overlap. This speed is crucial when training the network through many iterations.


Final Calculation

The final step is to find the deviation in prediction. We subtract our predicted output from the known target output: