Articles / AI · Part 39

Mamdani Inference Method

Learn how the Mamdani Inference Method works through fuzzification, rule evaluation, aggregation, and defuzzification. Explore its applications and compare it with Sugeno inference.

Mamdani Inference Method

Imagine an air conditioner that adjusts its fan speed according to the temperature and humidity of a room.

If the temperature is high and humidity is high, the system may decide that the fan speed should be fast.

But how does it reach that decision?

One popular approach is the Mamdani Inference Method, a fuzzy logic technique that uses IF–THEN rules to convert inputs into decisions.

1. What Is the Mamdani Inference Method?

The Mamdani Inference Method is a fuzzy inference technique introduced by Ebrahim Mamdani in 1975.

It uses fuzzy sets and IF–THEN rules to produce an output.

Unlike a traditional system that works only with exact values, Mamdani inference can process approximate information such as:

  • Temperature is High.
  • Humidity is Medium.
  • Fan Speed is Fast.

It is commonly used in control systems and decision-making applications.

2. The Four Main Steps

A Mamdani fuzzy inference system generally follows four steps:

  1. Fuzzification
  2. Rule evaluation
  3. Aggregation
  4. Defuzzification

The process turns numerical inputs into a final numerical output.

3. Fuzzification

Fuzzification converts crisp input values into fuzzy membership degrees.

Suppose an air conditioner receives:

  • Temperature: 30°C
  • Humidity: 70%

Using predefined membership functions, the system may calculate:

Fuzzy condition Membership value
Temperature is High 0.7
Humidity is High 0.5

These values indicate how strongly each condition applies.

4. Rule Evaluation

The system now checks its fuzzy rules.

For example:

IF Temperature is High
AND Humidity is High
THEN Fan Speed is Fast.

For the AND operation, suppose we use the minimum operator:

\[
\alpha=\min(0.7,0.5)=0.5
\]

The firing strength of this rule is 0.5.

In Mamdani inference, this firing strength is commonly used to limit, or clip, the output membership function.

5. Aggregation

A fuzzy system may contain several rules, and each rule can produce an output.

For example:

Rule 1: Fan Speed is Fast.
Rule 2: Fan Speed is Medium.
Rule 3: Fan Speed is Very Fast.

Aggregation combines the output fuzzy sets into one final fuzzy set.

The maximum operator is commonly used for this step in the standard Mamdani method.

6. Defuzzification

After aggregation, the system has a fuzzy output. However, an air conditioner needs a numerical value to control its fan.

Defuzzification converts that fuzzy output into a crisp value.

One commonly used technique is the Centroid Method.

\[
z^*=\frac{\int z\mu(z),dz}{\int \mu(z),dz}
\]

Here:

  • \(z\) represents an output value.
  • \(\mu(z)\) represents its aggregated membership degree.
  • \(z^*\) is the final crisp output.

For example, the system might produce a fan-speed setting of 75%.

7. Applications

The Mamdani method is useful in systems where decisions depend on approximate conditions.

Some applications include:

  • Air conditioning: Controlling temperature and fan speed.
  • Automotive systems: Managing vehicle operations.
  • Industrial control: Regulating pressure, temperature, and speed.
  • Robotics: Making decisions using sensor inputs.
  • Decision support: Evaluating situations using multiple factors.

8. Mamdani vs Sugeno Inference

Both are important fuzzy inference methods, but they represent outputs differently.

Mamdani Sugeno
Uses fuzzy sets as rule outputs Uses constants or mathematical functions
Commonly uses centroid defuzzification Uses weighted output calculations
Often intuitive to understand Often convenient for mathematical optimisation
Useful in rule-based control Useful in modelling and adaptive systems

Conclusion

The Mamdani Inference Method is an important technique in fuzzy logic. It uses fuzzification, rule evaluation, aggregation, and defuzzification to transform approximate inputs into useful decisions.

It demonstrates how an AI system can work with concepts such as High, Low, Fast, and Slow rather than relying only on strict numerical boundaries.

With this article, we complete our planned introduction to Expert Systems and Fuzzy Logic.

Quick quiz

5 questions
Who introduced the Mamdani Inference Method?
What is the first step in a typical Mamdani inference process?
What does rule evaluation calculate?
Which operator is commonly used for aggregation in standard Mamdani inference?
What is the purpose of defuzzification?

Keep a copy

Read offline as a printout or PDF.

farhanpaal.com

Keep reading

AI · Part 7

Types and Structure of Intelligent Agents

Explore the five major types of intelligent agents: Simple Reflex, Model-Based, Goal-Based, Utility-Based, and Learning Agents. Understand their decision-making methods and internal…

10 min read
AI · Part 23

Gradient Descent in Artificial Intelligence

Understand how Gradient Descent helps machine learning models learn by reducing their errors. Explore its mathematical formula, Python implementation, learning rate, types,…

8 min read
AI · Part 36

Operations on Fuzzy Sets

Learn how to perform union, intersection, and complement operations on fuzzy sets. Explore maximum and minimum operators, T-norms, T-conorms, mathematical properties, and…

6 min read

Ask Farhan

Ask anything about Farhan