1. FUZZY LOGIC
Fuzzy Set (Value)
Let X be a universe of discourse of a fuzzy variable and x be
its elements
One or more fuzzy sets (or values) Ai can be defined over X
Example: Fuzzy variable: Age
Universe of discourse: 0 – 120 years
Fuzzy values: Child, Young, Old
A fuzzy set A is characterized by a membership function
µA(x) that associates each element x with a degree of
membership value in A
The value of membership is between 0 and 1 and it
represents the degree to which an element x belongs
to the fuzzy set A
2. FUZZY LOGIC
Fuzzy Set Representation
Fuzzy Set A = (a1, a2, … an)
ai = µA(xi)
xi = an element of X
X = universe of discourse
For clearer representation
A = (a1/x1, a2/x2, …, an/xn)
Example: Tall = (0/5’, 0.25/5.5’, 0.9/5.75’, 1/6’, 1/7’, …)
3. FUZZY LOGIC
Fuzzy Sets Operations
Intersection (A B)
In classical set theory the intersection of two sets contains
those elements that are common to both
In fuzzy set theory, the value of those elements in the
intersection:
µA B(x) = min [µA(x), µB(x)]
e.g. Tall = (0/5, 0.1/5.25, 0.5/5.5, 0.8/5.75, 1/6)
Short = (1/5, 0.8/5.25, 0.5/5.5, 0.1/5.75, 0/6)
Tall Short = (0/5, 0.1/5.25, 0.5/5.5, 0.1/5.75, 0/6)
= Medium
4. FUZZY LOGIC
Fuzzy Sets Operations
Union (A B)
In classical set theory the union of two sets contains those
elements that are in any one of the two sets
In fuzzy set theory, the value of those elements in the union:
µA B(x) = max [µA(x), µB(x)]
e.g. Tall = (0/5, 0.1/5.25, 0.5/5.5, 0.8/5.75, 1/6)
Short = (1/5, 0.8/5.25, 0.5/5.5, 0.1/5.75)
Tall Short = (1/5, 0.8/5.25, 0.5/5.5, 0.8/5.75, 1/6)
= not Medium
5. FUZZY LOGIC
Fuzzy Sets Operations
Complement (A)
In fuzzy set theory, the value of complement of A is:
µ A(x) = 1 - µA(x)
e.g. Tall = (0/5, 0.1/5.25, 0.5/5.5, 0.8/5.75, 1/6)
Tall = (1/5, 0.9/5.25, 0.5/5.5, 0.2/5.75, 0/6)
6. FUZZY LOGIC
Fuzzy Relations
Fuzzy relation between two universes U and V is defined as:
µR (u, v) = µAxB (u, v) = min [µA (u), µB (v)]
i.e. we take the minimum of the memberships of the two
elements which are to be related
7. FUZZY RULES
Approximate Reasoning
Example: Let there be a fuzzy associative matrix M for the
rule: if A then B
e.g. If Temperature is normal then Speed is medium
Let A = [0/100, 0.5/125, 1/150, 0.5/175, 0/200]
B = [0/10, 0.6/20, 1/30, 0.6/40, 0/50]
8. FUZZY RULES
Approximate Reasoning: Max-Min Inference
Let A = [0/100, 0.5/125, 1/150, 0.5/175, 0/200]
B = [0/10, 0.6/20, 1/30, 0.6/40, 0/50]
then
M= (0, 0) (0, 0.6) . . .
(0.5, 0) . . .
.
.
.
= 0 0 0 0 0
0 0.5 0.5 0.5 0 by taking the minimum
0 0.6 1 0.6 0 of each pair
0 0.5 0.5 0.5 0
0 0 0 0 0
9. FUZZY LOGIC
Composition of Fuzzy Relations
Now we need a operator which allows us to infer something
about B, given Acurrent
“Composition” is such an operator
10. FUZZY LOGIC
Composition of Fuzzy Relations
Let there be three universes U, V and W
Let R be the relation that relates elements from U to V
e.g. R= 0.6 0.8
0.7 0.9
And let S be the relation between V and W
e.g. S= 0.3 0.1
0.2 0.8
11. FUZZY LOGIC
Composition of Fuzzy Relations
With the help of an operation called “composition” we can find
the relation T that maps elements of U to W
By max-min rule T = R S = maxvV { min(R(u, v), S(v, w)) }
0.6 0.8 0.3 0.1 = 0.3 0.8
0.7 0.9 0.2 0.8 0.3 0.8
Where element (1,1) is obtained by
max{min(0.6, 0.3), min(0.8, 0.2)} = 0.3
Note that S R = 0.3 0.3 R S
0.7 0.8
12. FUZZY LOGIC
Composition of Fuzzy Relations
R = R(u, v)
v1 v2
u1 0.6 0.8
u2 0.7 0.9 V
v2
0.9
0.8
v1
0.6 0.7
u1 u2 U
13. FUZZY LOGIC
Composition of Fuzzy Relations
S = S(v, w)
w1 w2
v1 0.3 0.1
v2 0.2 0.8 V
v2
0.8
0.2
v1
0.1
0.3
w1
w2
W
14. FUZZY LOGIC
Composition of Fuzzy Relations
T = R S = maxvV { min(R(u, v), S(v, w)) }
0.6 0.8 0.3 0.1 = 0.3 0.8
0.7 0.9 0.2 0.8 0.3 0.8
V
v2
0.9
0.8
0.2 v1 0.8
0.1
0.3 0.6 0.7
u1 u2 U
w1
w2
W
15. FUZZY LOGIC
Composition of Fuzzy Relations
T = R S = maxvV { min(R(u, v), S(v, w)) }
0.6 0.8 0.3 0.1 = 0.3 0.8
0.7 0.9 0.2 0.8 0.3 0.8
V
v2
v1
u1 u2
w1 0.3 0.3
U
0.8
w2 0.8
W