Fuzzy Logic
1. What is Fuzzy Logic?
Fuzzy Logic is a method of decision-making that allows a computer to work with degrees of truth instead of only True or False.
In simple words:
Fuzzy Logic allows a system to make decisions using concepts such as Low, Medium, High, Cold, Warm, Hot, Slow and Fast.
Traditional logic says:\[ \boxed{True\ or\ False} \]
Fuzzy logic allows:\[ \boxed{0\leq Truth\ Value\leq1} \]
2. Simple Example
Suppose we want to control an air conditioner.
Traditional logic might use:
If temperature > 30°C → AC ON
Otherwise → AC OFF
This creates a sharp boundary.
Fuzzy logic can use:
IF temperature is High THEN fan speed is High.
For example:
| Temperature | Cold | Warm | Hot |
|---|---|---|---|
| 20°C | 0.9 | 0.1 | 0.0 |
| 28°C | 0.1 | 0.8 | 0.2 |
| 35°C | 0.0 | 0.2 | 0.8 |
| 40°C | 0.0 | 0.0 | 1.0 |
Thus, at 35°C, the system can understand that the temperature is Hot to degree 0.8.
3. Basic Elements of Fuzzy Logic
A fuzzy logic system mainly contains:
- Fuzzy Sets
- Membership Functions
- Fuzzy Rules
- Fuzzy Inference
- Defuzzification
Overall process:
Crisp Input
↓
Fuzzification
↓
Fuzzy Values
↓
Fuzzy Rules
↓
Fuzzy Inference
↓
Fuzzy Output
↓
Defuzzification
↓
Crisp Output
4. Fuzzy Rules
Fuzzy systems generally use IF–THEN rules.
Example:
IF temperature is Hot THEN fan speed is High.
Another example:
IF temperature is Cold THEN fan speed is Low.
For a washing machine:
IF clothes are Dirty AND clothes are Heavy THEN washing time is Long.
These rules are easy for humans to understand.
5. AND, OR and NOT
Fuzzy logic also uses logical operations.
AND
Usually represented using minimum:\[ \mu_{A\ AND\ B}=\min(\mu_A,\mu_B) \]
Example:\[ \min(0.7,0.5)=0.5 \]
OR
Usually represented using maximum:\[ \mu_{A\ OR\ B}=\max(\mu_A,\mu_B) \]
Example:\[ \max(0.7,0.5)=0.7 \]
NOT
A common definition is:\[ \mu_{\neg A}=1-\mu_A \]
If:\[ \mu_A=0.7 \]
then:\[ \mu_{\neg A}=1-0.7=0.3 \]
6. Example of Fuzzy Logic System
Consider an automatic fan controller.
Input
Temperature = 32°C
Fuzzification
The system may calculate:
Warm = 0.4
Hot = 0.7
Rules
IF temperature is Warm
THEN fan speed is Medium
IF temperature is Hot
THEN fan speed is High
Inference
The rules produce fuzzy output for fan speed.
Defuzzification
Finally, the system may produce:\[ \boxed{Fan\ Speed=75\%} \]
7. Fuzzy Logic vs Classical Logic
| Classical Logic | Fuzzy Logic |
|---|---|
| True or False | Degree of truth |
| 0 or 1 | 0 to 1 |
| Exact boundaries | Gradual boundaries |
| Strict rules | Flexible rules |
| Difficult with vague information | Handles vague information |
| Example: Hot/Not Hot | Example: Slightly Hot/Very Hot |
8. Applications of Fuzzy Logic
Fuzzy Logic is used in:
- Air conditioners
- Washing machines
- Automatic cars
- Traffic control
- Medical diagnosis
- Industrial control
- Robotics
- Decision-making
- Consumer electronics
- Pattern classification
9. Advantages
- Handles vague information.
- Easy to understand.
- Uses human-like rules.
- Does not always require an exact mathematical model.
- Useful for complex control systems.
- Can provide smooth decisions instead of sudden ON/OFF decisions.
Limitation
The quality of a fuzzy system depends heavily on the membership functions and rules designed by the developer.
Exam Definition
Fuzzy Logic is a form of logic used in Artificial Intelligence and Soft Computing that represents information using degrees of truth between 0 and 1 rather than only True or False. It uses fuzzy sets, membership functions and IF–THEN rules to make decisions in situations involving uncertainty, vagueness and imprecise information.
Remember
Fuzzy Logic = Degrees of Truth + IF–THEN Rules
Classical Logic: Yes/No
Fuzzy Logic: How much?
