07 Fuzzy Logic
07 Fuzzy Logic
Fuzzy logic
Introduction, or what is fuzzy thinking?
Fuzzy sets
Linguistic variables and hedges
Operations of fuzzy sets
Fuzzy rules
Summary
© Negnevitsky, Pearson Education, 2005 1
Introduction, or what is fuzzy thinking?
Experts rely on common sense when they solve
problems.
How can we represent expert knowledge that
uses vague and ambiguous terms in a computer?
Fuzzy logic is not logic that is fuzzy, but logic that
is used to describe fuzziness. Fuzzy logic is the
theory of fuzzy sets, sets that calibrate vagueness.
Fuzzy logic is based on the idea that all things
admit of degrees. Temperature, height, speed,
distance, beauty – all come on a sliding scale. The
motor is running really hot. Tom is a very tall guy.
© Negnevitsky, Pearson Education, 2005 2
Boolean logic uses sharp distinctions. It forces us
to draw lines between members of a class and non-
members. For instance, we may say, Tom is tall
because his height is 181 cm. If we drew a line at
180 cm, we would find that David, who is 179 cm,
is small. Is David really a small man or we have
just drawn an arbitrary line in the sand?
Fuzzy logic reflects how people think. It attempts
to model our sense of words, our decision making
and our common sense. As a result, it is leading to
new, more human, intelligent systems.
0.6
0.4
0.2
0.0
150 160 170 180 190 200 210
Height, cm
Degree of
Membership Fuzzy Sets
1.0
0.8
0.6
0.4
0.2
0.0
150 160 170 180 190 200 210
Height, cm
0.6
0.4
0.2
0.0
150 160 170 180 190 200 210
Height, cm
Degreeof Fuzzy Sets
Membership
1.0
0.8
0.6 Short Average Tall
0.4
0.2
0.0
150 160 170 180 190 200 210
0
Crisp Subset A Fuzziness x
IF project_duration is long
THEN completion_risk is high
IF speed is slow
THEN stopping_distance is short
0.4
Very Short Very
VeryTall
Tall
Tall
0.2
0.0
150 160 170 180 190 200 210
Height, cm
Very [ mA (x)] 2
Extremely [ mA(x) ] 3
Somewhat mA (x)
2 [mA (x )]2
if 0 m A 0.5
Indeed
1 2 [1 m A (x)]2
if 0.5 < mA 1
A AA
Complement Containment
A B AA B
Intersection Union
© Negnevitsky, Pearson Education, 2005 26
Complement
Crisp Sets: Who does not belong to the set?
Fuzzy Sets: How much elements do not belong to
the set?
The complement of a set is an opposite of this set.
For example, if we have the set of tall men, its
complement is the set of NOT tall men. When we
remove the tall men set from the universe of
discourse, we obtain the complement. If A is the
fuzzy set, its complement A can be found as
follows:
mA(x) = 1 mA(x)
m ( x) m ( x)
1 1
AB AB
0 0
x x
1 AB 1
AB
0 0
x x
Intersection Union
IF x is A
THEN y is B
0.4 0.4
0.2 0.2
0.0 0.0
160 180 190 200 70 80 100 120
Height, cm Weight, kg
0.4 0.4
0.2 0.2
0.0 0.0
160 180 190 200 70 80 100 120
Height, cm Weight, kg
IF project_duration is long
AND project_staffing is large
AND project_funding is inadequate
THEN risk is high
IF service is excellent
OR food is delicious
THEN tip is generous
IF temperature is hot
THEN hot_water is reduced;
cold_water is increased