Turning fuzzy rules into a number a machine can act on.
π Where this lives: a fuzzy inference system is what converts "if it is hot and humid, run the fan fast" into an actual motor voltage. That conversion β words in, number out β is the whole engineering contribution, and it is why fuzzy control shipped in millions of appliances while other symbolic AI stayed in laboratories. The system takes vague expert knowledge and produces a precise, smoothly varying control signal. Search "fuzzy inference system Mamdani Sugeno defuzzification".
The architecture
A FUZZY INFERENCE SYSTEM (FIS) maps crisp inputs to crisp outputs
through fuzzy rules. FOUR COMPONENTS:
crisp inputs
β
βΌ
βββββββββββββββββββ
β FUZZIFIER β crisp values β membership degrees
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β INFERENCE ββββββββ RULE BASE β
β ENGINE β β IF β¦ THEN β¦ β
β (evaluate and β ββββββββββββββββββββ
β aggregate) β
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β DEFUZZIFIER β a fuzzy output set β one number
ββββββββββ¬βββββββββ
βΌ
crisp output
1. FUZZIFIER β applies the membership functions of the previous
topic to each crisp input, producing a degree for each
linguistic term.
2. RULE BASE (the knowledge base) β the fuzzy IF-THEN rules,
supplied by an expert or learned.
The IF part is the ANTECEDENT, the THEN part the CONSEQUENT.
3. INFERENCE ENGINE β computes each rule's firing strength,
applies it to the rule's output set (IMPLICATION), and
combines all the rules (AGGREGATION).
4. DEFUZZIFIER β reduces the aggregated fuzzy output to a single
crisp value.
THE FOUR STEPS OF INFERENCE, named as the syllabus expects:
FUZZIFICATION β RULE EVALUATION β AGGREGATION β
DEFUZZIFICATION
A RULE with several antecedents combines them with the fuzzy
operators:
IF temperature IS hot AND humidity IS high THEN fan IS fast
firing strength = min(ΞΌ_hot, ΞΌ_high)
IF temperature IS hot OR humidity IS high THEN fan IS fast
firing strength = max(ΞΌ_hot, ΞΌ_high)
MOST RULES USE AND, so min is the usual case.
A KEY PROPERTY: SEVERAL RULES FIRE AT ONCE, each to a different
degree. That is what produces smooth output β as an input drifts,
one rule's strength falls while another's rises, and the
defuzzified result moves continuously rather than jumping. THE
OVERLAP IN THE MEMBERSHIP FUNCTIONS IS WHAT MAKES THIS WORK, as
the previous topic noted.
A complete worked example
A FAN CONTROLLER. Inputs: temperature and humidity. Output: fan
speed, 0β100%.
THE MEMBERSHIP FUNCTIONS (triangular):
TEMPERATURE cold(0,10,20) warm(15,25,35) hot(25,35,45)
HUMIDITY low(0,25,50) medium(25,50,75)
high(50,75,100)
FAN SPEED low(0,0,50) medium(25,50,75)
high(50,100,100)
THE RULE BASE:
R1: IF temp = warm AND humidity = medium THEN fan = medium
R2: IF temp = hot AND humidity = medium THEN fan = high
R3: IF temp = hot AND humidity = high THEN fan = high
R4: IF temp = warm AND humidity = high THEN fan = high
THE INPUT: temperature = 28 Β°C, humidity = 60%.
ββ STEP 1: FUZZIFICATION ββββββββββββββββββββββββββββββββββββ
TEMPERATURE = 28:
cold: 28 β₯ 20, so 0.00
warm: (35 β 28)/(35 β 25) = 7/10 = 0.70
hot: (28 β 25)/(35 β 25) = 3/10 = 0.30
HUMIDITY = 60:
low: 60 β₯ 50, so 0.00
medium: (75 β 60)/(75 β 50) = 15/25 = 0.60
high: (60 β 50)/(75 β 50) = 10/25 = 0.40
ββ STEP 2: RULE EVALUATION (firing strengths, using min) βββββ
R1: min(warm 0.70, medium 0.60) = 0.60 β fan = medium
R2: min(hot 0.30, medium 0.60) = 0.30 β fan = high
R3: min(hot 0.30, high 0.40) = 0.30 β fan = high
R4: min(warm 0.70, high 0.40) = 0.40 β fan = high
ALL FOUR RULES FIRE, to different degrees. Note that R2, R3 and
R4 all conclude "high" with strengths 0.30, 0.30 and 0.40.
ββ STEP 3: AGGREGATION (combine with max, per output set) ββββ
fan = medium : max(0.60) = 0.60
fan = high : max(0.30, 0.30, 0.40) = 0.40
fan = low : nothing fired = 0.00
THE MAX IS THE OR: several rules supporting the same
conclusion do not add up β the strongest evidence stands. This
is the fuzzy union of the clipped output sets.
ββ STEP 4: DEFUZZIFICATION ββββββββββββββββββββββββββββββββββ
The aggregated output is a fuzzy set: the "medium" triangle
clipped at 0.60 unioned with the "high" triangle clipped at
0.40. It must become one number.
CENTROID METHOD (centre of gravity) β the most common:
crisp output = Ξ£ x Β· ΞΌ(x) / Ξ£ ΞΌ(x)
over the output range. Computing this over fan speed 0β100
gives
FAN SPEED = 62.5%
WEIGHTED AVERAGE METHOD β simpler, using each output set's
peak:
peaks: medium = 50, high = 75
(0.60 Γ 50 + 0.40 Γ 75) / (0.60 + 0.40)
= (30 + 30) / 1.00
= 60.0%
THE TWO ANSWERS DIFFER SLIGHTLY (62.5 against 60.0) because the
centroid accounts for the actual SHAPE of the clipped sets
while the weighted average uses only their peaks. Both are
defensible; the centroid is standard, and the weighted average
is what you compute by hand in an exam.
READ WHAT THE SYSTEM DID: from "28 degrees and 60% humidity" it
produced "run the fan at about 60%", by way of four rules stated
in ordinary words. AND IF THE TEMPERATURE RISES TO 29, every
membership shifts slightly, every firing strength shifts, and the
output moves smoothly upward β NO THRESHOLD IS CROSSED AND
NOTHING JUMPS. That is the property a crisp rule base cannot
provide.
Mamdani versus Sugeno, and assessment
TWO STANDARD FIS TYPES, and the distinction is examined directly.
MAMDANI (MamdaniβAssilian, 1975) β what the example above used
THE CONSEQUENT IS A FUZZY SET.
IF temp IS hot THEN fan IS high
Β· output is a fuzzy set, so DEFUZZIFICATION IS REQUIRED
Β· INTUITIVE and readable β the rules look like human
statements throughout
Β· widely accepted for capturing EXPERT KNOWLEDGE
Β· computationally heavier, because aggregation and
defuzzification operate over the output range
β USE IT when the rules come from a human and
interpretability matters.
SUGENO (TakagiβSugenoβKang, 1985)
THE CONSEQUENT IS A FUNCTION OF THE INPUTS.
IF temp IS hot THEN fan = 2Β·temp + 0.5Β·humidity β 20
Β· a zero-order Sugeno system uses a constant:
IF temp IS hot THEN fan = 80
Β· output is computed as the WEIGHTED AVERAGE of the rule
outputs, so NO DEFUZZIFICATION STEP IS NEEDED:
output = Ξ£ wα΅’ Β· fα΅’ / Ξ£ wα΅’
where wα΅’ is rule i's firing strength
Β· COMPUTATIONALLY EFFICIENT, and well suited to
OPTIMISATION and ADAPTIVE techniques β which is why ANFIS
from the previous topic is built on Sugeno systems, since
the consequents' parameters are differentiable and can be
tuned by gradient descent
Β· works well with LINEAR control theory
Β· LESS INTUITIVE: the consequent is an equation, not a phrase
β USE IT when the system will be TUNED FROM DATA or must run
fast.
THE COMPARISON:
MAMDANI SUGENO
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
consequent a fuzzy set a function of the inputs
defuzzification REQUIRED not needed
interpretability high lower
computation heavier lighter
knowledge source human expert data / optimisation
best for expert systems, adaptive control,
readable control neuro-fuzzy
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
(A third, TSUKAMOTO, uses monotonic membership functions in the
consequent so each rule's output is a single value; it is rarely
used and worth knowing only by name.)
DEFUZZIFICATION METHODS β the list, with what each does:
CENTROID (centre of gravity) the balance point of the
aggregated area. Standard,
smooth, most computation.
BISECTOR the line dividing the area
into two equal halves.
MEAN OF MAXIMUM (MOM) the average of the points at
which membership is maximal.
SMALLEST / LARGEST OF the extremes of the maximal
MAXIMUM region β used where a
conservative or aggressive
response is wanted.
WEIGHTED AVERAGE each output set's peak,
weighted by its strength.
Cheap; the hand-calculation
method.
THE CHOICE AFFECTS THE OUTPUT, as the 62.5 versus 60.0 above
showed, and it is a design decision rather than a detail β
two engineers using different defuzzifiers on the same rule
base get different controllers.
THE ASSESSMENT β advantages:
Β· captures expert knowledge in the expert's own vague terms
Β· SMOOTH, gradual control action with no threshold jumps
Β· robust to imprecise inputs and sensor noise
Β· rules remain READABLE and individually modifiable
Β· no mathematical model of the plant is required, which is
the decisive advantage where the plant is too complex to
model
LIMITATIONS:
Β· MEMBERSHIP FUNCTIONS AND RULES MUST BE CHOSEN, and there is
no principled derivation β the design is expert judgement
Β· the RULE COUNT EXPLODES with inputs: with n inputs each
having m terms, a complete rule base has m^n rules
2 inputs Γ 3 terms β 9 rules
3 inputs Γ 5 terms β 125 rules
4 inputs Γ 5 terms β 625 rules
THIS IS THE CURSE OF DIMENSIONALITY, appearing in fuzzy
form, and it is why fuzzy control is used on problems
with few inputs.
Β· NO LEARNING in the basic form β hence neuro-fuzzy
Β· no formal stability guarantees comparable to classical
control theory, which is a genuine objection in
safety-critical use
Β· foundations weaker than probability's, as the previous
topic conceded
THE HONEST VERDICT: A FUZZY INFERENCE SYSTEM IS A WAY OF
INTERPOLATING BETWEEN EXPERT-STATED OPERATING POINTS. That is
less grand than "fuzzy reasoning" suggests and more useful than
it sounds β interpolating smoothly between a handful of rules an
operator can state is exactly what a great many control problems
need, and it requires no model of the system being controlled.
The property that made fuzzy control commercially successful: raise the temperature from 28 to 29 and every membership, every firing strength and the output all shift slightly β no threshold is crossed and nothing jumps. A crisp rule base switches abruptly at its boundaries, which is precisely the behaviour that makes an appliance feel badly built.
π Go further: the rule-count explosion is the real limit on fuzzy systems, and the standard escape is worth knowing: hierarchical fuzzy systems. Instead of one rule base over four inputs (625 rules at five terms each), you build a tree of two-input subsystems whose outputs feed the next level β three subsystems of nine rules each, twenty-seven rules total for the same four inputs. It is the same decomposition argument as independent subproblems in constraint satisfaction, and it converts an exponential rule count into a linear one at the cost of some expressiveness. Search "hierarchical fuzzy systems rule explosion".
π‘ Exam angle: draw the FIS architecture with its four components and name the four inference steps β fuzzification, rule evaluation, aggregation, defuzzification. The guaranteed numerical question is a complete worked inference: fuzzify the inputs, compute each rule's firing strength with min, aggregate with max, then defuzzify β the weighted average method is the one to use by hand. Distinguish Mamdani (fuzzy-set consequent, needs defuzzification, intuitive) from Sugeno (function consequent, no defuzzification, efficient and tunable). List the defuzzification methods, especially centroid and weighted average. State the limitations, particularly that a complete rule base has mβΏ rules.
Syllabus points
Fuzzy inference system
Mamdani/Sugeno methods (numerical)
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.