Learning Outcomes
SLO | After this lecture you will be able to... | CLO | Bloom |
|---|---|---|---|
SLO 23.1 | Explain the five steps of fuzzy inference: fuzzify, apply operators, implication, aggregation, defuzzify | CLO3 | C2 Understand |
SLO 23.2 | Apply Mamdani inference: firing strengths, clip or scale, max aggregation and defuzzification methods | CLO3 | C3 Apply |
SLO 23.3 | Apply zero- and first-order Sugeno inference and compare it with Mamdani | CLO3 | C3 Apply |
1. The Fuzzy Inference Process
§1.1 Five steps
Slide L23-S06
A fuzzy inference system (FIS) turns crisp inputs into a crisp output using membership functions and IF-THEN rules. Inference means reaching a conclusion from facts and rules.
Step | What happens | Fan at 30 °C, 40 % |
|---|---|---|
1 Fuzzify | Crisp input -> degree in each term | comfortable 0.33, hot 0.20, dry 0.33 |
2 Apply operators | AND = min, OR = max, NOT = 1 - μ -> firing strength | R3 = min(0.33, 0.67) = 0.33 |
3 Implication | Shape each THEN set by its strength (clip or scale) | 'fast' clipped at 0.20 |
4 Aggregation | Join all rule outputs into one set (max) | max of four clipped shapes |
5 Defuzzify | Turn the set into one number (centroid) | 45.04 % |
R1 IF temp is cold THEN fan is slow R2 IF temp is comfortable AND hum is dry THEN fan is slow R3 IF temp is comfortable AND hum is NOT dry THEN fan is medium R4 IF temp is hot AND hum is dry THEN fan is medium R5 IF temp is hot AND hum is NOT dry THEN fan is fast |
§1.2 Steps 1 and 2 worked
Slide L23-S07
Step 1 Fuzzify the inputs temp 30 C is cold 0.00 temp 30 C is comfortable 0.33 temp 30 C is hot 0.20 humidity 40 % is dry 0.33 Step 2 Apply AND (min) / NOT (1 - mu) -> firing strengths R1 IF cold THEN slow 0.00 R2 IF comfortable AND dry THEN slow 0.33 R3 IF comfortable AND NOT dry THEN medium 0.33 R4 IF hot AND dry THEN medium 0.20 R5 IF hot AND NOT dry THEN fast 0.20 Steps 3-5 Mamdani (clip, max, centroid) -> 45.04 % Sugeno (weighted average) -> 45.88 % |
Firing strength = how strongly a rule applies (0 to 1). Several rules usually fire at the same time; R1 does not fire because 30 °C is not cold.
§1.3 Steps 3 to 5: the inference diagram
Slide L23-S08
Each row is a rule: read the input degrees, take the min, clip the THEN set. Aggregate the clipped sets with max, then find the centroid z* = Σ μ(z)·z / Σ μ(z) - the balance point of the shape.
2. Mamdani Inference
§2.1 Implication: clip or scale
Slide L23-S10
input clip scale 30 C, 40 % 45.04 44.51 36 C, 70 % 82.78 83.33 34 C, 65 % 81.43 83.33 |
Method | Rule output | Shape |
|---|---|---|
Clip (min) - Mamdani | min(μTHEN(z), w) | Flat top at height w |
Scale (product) - Larsen | w · μTHEN(z) | Same shape, shorter |
§2.2 Defuzzification methods
Slide L23-S11
method 30 C/40 % 36 C/70 % centroid 45.04 82.78 bisector 43.66 84.64 mom 33.00 95.00 som 0.00 90.00 lom 66.00 100.00 |
Method | Rule |
|---|---|
Centroid | Balance point (centre of area) - smooth, most used |
Bisector | Line that splits the area in two halves |
MOM | Mean of the z values with the highest μ |
SOM / LOM | Smallest / largest z with the highest μ |
Example: a flat top from 20 to 60 gives SOM = 20, LOM = 60, MOM = 40. Maximum methods can jump (33 -> 95 above); centroid changes smoothly, which is why controllers use it.
3. Sugeno Inference
§3.1 Zero-order and first-order
Slide L23-S13
In a Sugeno (Takagi-Sugeno-Kang) system each THEN-part is crisp: a constant (zero-order) or a linear formula z = p·t + q·h + r (first-order). The output is the weighted average z* = Σ wi zi / Σ wi.
Rule | w | z | w · z |
|---|---|---|---|
R2 slow | 0.33 | 17 | 5.67 |
R3 medium | 0.33 | 50 | 16.67 |
R4 medium | 0.20 | 50 | 10.00 |
R5 fast | 0.20 | 83 | 16.60 |
Sum | 1.07 | 48.93 -> 48.93 / 1.07 = 45.88 |
input zero-order first-order 30 C, 40 % 45.88 49.31 36 C, 70 % 83.00 85.80 45 C, 40 % 72.00 85.00 45 C, 90 % 83.00 95.00 |
§3.2 Mamdani vs Sugeno
Slide L23-S14
input Mamdani Sugeno 20 C, 50 % 50.00 50.00 30 C, 40 % 45.04 45.88 33 C, 60 % 80.56 83.00 36 C, 70 % 82.78 83.00 42 C, 35 % 65.46 66.50 Work per input: Mamdani: 5 clipped sets x 101 points, max, centroid Sugeno: 5 products, 2 sums, 1 division |
Mamdani | Sugeno | |
|---|---|---|
THEN-part | Fuzzy set | Constant or linear formula |
Steps 4-5 | max + centroid | Weighted average |
Speed | Slower | Fast |
Easy to read | Very | Less |
Learn from data | Hard | Easy (ANFIS) |
§3.3 Choosing a method
Slide L23-S15
Mamdani when people must read and check the rules (expert advice, e.g. a cotton-disease advisor). Sugeno for fast control in small chips (inverter AC, cruise control) and for learning from data (ANFIS, P11). Tsukamoto (1979) uses monotonic THEN sets and a weighted average; it is rarely used today.
4. Common Mistakes
Wrong idea | Correct idea |
|---|---|
Only the strongest rule matters. | All firing rules contribute. |
AND of 0.33 and 0.67 is 0.22. | Standard AND is min: 0.33. |
Sugeno divides by the number of rules. | Divide by Σ wi. |
Mamdani clips the input set. | It clips the THEN (output) set. |
Defuzzify each rule, then average. | Mamdani aggregates first, defuzzifies once. |
Word Bank
Word | Simple meaning | Example |
|---|---|---|
Inference | Reaching a conclusion from facts and rules | 30 °C, 40 % -> 45 % fan |
Fuzzify | Turn a number into degrees | 30 °C -> hot 0.20 |
Firing strength | How strongly a rule applies | R5 = 0.20 |
Implication | Shaping the THEN set by the strength | clip at 0.20 |
Aggregation | Joining all rule outputs | max |
Defuzzify | Turn a fuzzy set into one number | centroid 45.04 |
Centroid | Balance point of a shape | Σ μz / Σ μ |
Weighted average | Average where each value counts by its weight | Σ wz / Σ w |
Self-Check Questions
- List the five steps of fuzzy inference in order. (see §1.1)
- Find the five firing strengths at 34 °C, 20 % humidity. (see §1.2)
- What does the max in aggregation do? (see §1.3)
- Clip vs scale: draw both for strength 0.5. (see §2.1)
- SOM, MOM, LOM for a flat top from 40 to 80? (see §2.2)
- Sugeno: strengths 0.3 (z = 20), 0.7 (z = 70). Output? (see §3.1)
- Give two reasons to choose Sugeno. (see §3.2)
Reading: Fuzzy Logic Toolbox User's Guide Ch 2 (fuzzy inference process, Mamdani and Sugeno systems); scikit-fuzzy documentation (defuzz).