Reasoning in Fuzzy Logic
Understand how fuzzy reasoning works in Artificial Intelligence. Explore fuzzification, rule evaluation, aggregation, and defuzzification through a simple air-conditioning example.
Imagine an air conditioner working in a room where the temperature is 30°C and humidity is 70%.
Is the room hot? Is the humidity high? Should the fan run slowly, quickly, or somewhere in between?
These questions do not always have exact yes-or-no answers. Fuzzy Logic allows a system to work with degrees of truth and use them to make decisions.
This process is called fuzzy reasoning or fuzzy inference.
1. What Is Fuzzy Reasoning?
Fuzzy reasoning is the process of using fuzzy sets and IF–THEN rules to draw conclusions from uncertain or approximate information.
Unlike classical logic, where a statement is either true or false, fuzzy logic allows a statement to have a truth degree between 0 and 1.
For example:
- Temperature is Hot: 0.7
- Humidity is High: 0.5
A fuzzy system can use these values to decide an appropriate fan speed.
2. How Does Fuzzy Reasoning Work?
A typical fuzzy inference system follows four main stages:
- Fuzzification: Converts crisp input values into fuzzy membership values.
- Rule evaluation: Checks which fuzzy rules are activated and calculates their firing strengths.
- Aggregation: Combines the outputs of the activated rules.
- Defuzzification: Converts the final fuzzy output into a crisp numerical value.
Let’s understand these stages using an air-conditioning example.
3. Fuzzification
Fuzzification converts numerical inputs into fuzzy values.
Suppose the system receives:
- Temperature: 30°C
- Humidity: 70%
Using predefined membership functions, it may determine:
| Input condition | Membership |
|---|---|
| Temperature is Hot | 0.7 |
| Humidity is High | 0.5 |
These values describe how strongly each condition applies.
4. Rule Evaluation
The system now evaluates its IF–THEN rules.
Consider:
Rule 1:
IF temperature is Hot
AND humidity is High
THEN fan speed is Fast.
Using the minimum operator for AND:
\[
\alpha=\min(0.7,0.5)=0.5
\]
Here, \(\alpha\) is the rule’s firing strength.
The rule is activated with a strength of 0.5.
A fuzzy system may contain several rules, and each activated rule contributes to the final output.
5. Aggregation
When multiple rules are activated, they may produce different fuzzy output sets.
Aggregation combines these outputs into one fuzzy set.
For example:
Rule 1: Fan speed is Fast.
Rule 2: Fan speed is Medium.
Rule 3: Fan speed is Very Fast.
The system combines the contributions of these rules to create a final fuzzy output.
The maximum operator is commonly used for aggregation in Mamdani fuzzy inference systems.
6. Defuzzification
The final output is still a fuzzy set. However, a physical device usually needs a numerical value to operate.
Defuzzification converts the fuzzy output into a crisp value.
For example:
Fuzzy output: Fan speed is Fast
Defuzzified output: 75%
The air conditioner can now use 75% fan speed.
One commonly used method is the Centroid Method, which calculates the centre of area of the aggregated output membership function.
7. Types of Fuzzy Inference Systems
Two widely used fuzzy inference approaches are:
| Method | Main idea |
|---|---|
| Mamdani | Produces fuzzy output sets that are usually defuzzified into a crisp value. |
| Sugeno | Uses constant or mathematical-function outputs and combines them using weighted calculations. |
Both methods use fuzzy rules, but they represent rule outputs differently.
We will explore the Mamdani method in detail in the next article.
8. Applications of Fuzzy Reasoning
Fuzzy reasoning is useful when decisions involve gradual conditions rather than strict boundaries.
Examples include:
- Air conditioning: Adjusting fan speed based on temperature and humidity.
- Automotive systems: Controlling braking and vehicle operations.
- Industrial automation: Managing temperature, pressure, and production processes.
- Robotics: Making decisions from uncertain sensor readings.
- Decision support: Evaluating situations using several approximate factors.
Conclusion
Fuzzy reasoning allows AI systems to draw conclusions from information that is not simply true or false.
By using fuzzification, rule evaluation, aggregation, and defuzzification, a fuzzy inference system can convert approximate inputs into practical decisions.
In the next article, we will study the Mamdani Inference Method, one of the important approaches used to build fuzzy inference systems.
Quick quiz
5 questionsOriginally published at farhanpaal.com — https://farhanpaal.com/articles/reasoning-in-fuzzy-logic/
Keep a copy
Read offline as a printout or PDF.
farhanpaal.com