Lecture02 (Fuzzy Sets)
Lecture02 (Fuzzy Sets)
University
ASTU
School of EEC
1. Introduction to Fuzzy
Normal Crisp logic
where everything must be either
True or False
leads to PARADOXES.
1
Contd
Plato: Let's define be humans
as featherless bipeds in a class
Diogenes: I brought a plucked
chicken into the classroom,
saying "Behold! I've brought
you a man!
Diogenes
Plato, philosopher
(BC 428-348)
Contd
An iron of A big iron
12.5Kg is is falling
falling to fast! Get
10m/s! Get out!
12.5Kg 12.5Kg
out!
Precision Significance
2
Contd
Fuzzy logic is a precise logic of imprecision and
approximate reasoning.
Fuzzy logic may be viewed as an attempt at
formalization of two human capabilities:
- the capability to converse and make rational decisions
in an environment of imperfect information.
- the capability to perform a wide variety of physical
and mental tasks without any measurements and any
computations.
Contd
Examples of sentences used in everyday life:
- Go to the market and buy some eggs.
- The weather so hot today, isn't it?
- This student is handsome.
- That car ran fast.
- University tuition is expensive.
3
Contd
Artificial Real world
It is only true in Every fact is a matter of degree.
mathematics that Facts are not always vague, but
deals with they are somewhat inaccurate.
symbols (Black or
White).
: 2+6= ? How long is this pencil?
:8 3.45cm(???)
Contd
Knowledge
If service is poor, then tip is cheap
If service is good, then tip is average
If service is excellent, then tip is generous
Input Result
Service is a Tip is below
little good average
4
Contd
• Four operations(+, -, /, *)
Digital Computer • Logial comparison
• Data storage
• Repeating has the same result
Accurate
input data Results
(0/1, B/W)
Imprecise
information Fuzzy
and vague Technique
words
Contd
Many decision-making problems are very complex, but
people successfully deal with inaccurate knowledge.
Real-world problems are complex and precise technology
is difficult, and instead approximations are required to
obtain similar models.
We need the theory that can deal with expert knowledge
and solve engineering problems.
Decision-
Making
Know
Expert Engineering
Knowledge Systems
System
Approximations
5
Contd
Terminology
Fuzzy is blurred, indistinct, confused, vague,
imprecisely defined. (Oxford dictionary)
Fuzzy theory is a theoretical framework that enables
us to effectively deal with ambiguous and inaccurate
knowledge of the real world.
Fuzzy inference is what mimics human reasoning in
deriving certain conclusions in dealing with rough
information and uncertainty
Contd
History Togai &
Sugeno, Ostergaard, Watanabe,
Cement 1985 +NN,
Fuzzy Fuzzy chip
kiln control +GA,
measure and +Sliding
Integral 1977 Tagaki & 1995
1972 Sugeno,T-S mode
1978
1965 fuzzy system
1974 North-
Zadeh, Mamdani, Holland Co.,
Fuzzy set Steam engine Fuzzy Sets
theory control and Systems
“The danger of fuzzy logic is that it will encourage the sort
of imprecise thinking that has brought us so much trouble.
Fuzzy logic is the cocaine of science.” -W. Kahan-
6
Contd
Applications
• Air conditioner (Mitsubishi)
• Vacuum cleaner (Panasonic)
• Automatic transmission system (Nissan)
• Washing machine (Matsushita)
• Camcorder (Panasonic, Canon)
• Anti-sway control of cranes
Contd
• Waste water treatment plants
• Positioning in presses
• Temperature control in plastic molding machines
• Nonlinear PID controller design
7
2. Crisp set
• All elements in a universal set(or a universe of
discourse or shortly universe) are divided into two
groups: members or non members.
• A set is described by a list expression if the number
of elements is finite, or a condition expression if it
is infinite.
For example,
A= 'capital cities'= {Addis Abba, Seoul, London...}
B= 'real numbers'= {r | -<r<}
Contd
(Definition) Membeship function
A function that indicates whether or not it belongs to
the set A, usually denoted by A(u) or A(u).
It assigns 0 or 1 to each element u.
u
1, u A 0
A (u ) u
0, u A A 1
8
Contd
For example,
Universe U= {2, 3, 6, 8, 9}
Set A= 'multiples of 2'= {2, 6, 8}
= {(2,1), (6,1), (8,1)}
= {(2,1), (3,0), (6,1), (8,1), (9,0)}
1, u A
A (u )
0, u A
A(2)= 1; 2A
A(3)= 0; 3A
A(6)= 1; 6A
A(8)= 1; 8A
A(9)= 0; 9A
Contd
Operations of Fuzzy Sets
In order to generate new sets from existing sets, three
operations are defined:
- Complement
- Union
- Intersection
They are analogous to substraction, addition, and
multiplication in certain respects.
9
Contd
(Definition) Complement, A
The complement of a set A is the set of those members
of the universe that are not members of A. That is,
A= {u| u A}.
Contd
(Definition) Union, AB
The union of the sets A and B is the set of all members
that are members of A or B, or both. That is,
AB= {u| uA or uB}.
Read 'A union B' or 'A cup B'.
10
Contd
(Definition) Intersection, AB
The intersection of the sets A and B is the set of all
members that are members of both A and B. That is,
AB= {u| uA and uB}.
Contd
For example,
U= {Elephant, Lion, Tiger, Monkey, Giraffe} U
A= 'herbivorous animals'= {E, M, G}
B= 'long-nose animals'= {E}
C= 'Predator'= {L,T}
11
3. Fuzzy set
a1 a2 a3 a4
1 Apple Non-apple 1
0
a1 a4
Set A='apple'={a1, a2, a3}, A='non-apple'={a4}
Fuzzy set
A= 'apple'= {(a1,1), (a2,1), (a3,0.7), (a4,0.1)}
A= 'non-apple'= {(a1,0), (a2,0),(a3,0.3),(a4,0.9)}
Contd
U= {James, Rahel, Tomy, Dereje}
J: 23years old, 176cm, R: 21years old, 165cm
T: 52years old, 155cm, D: 33years old, 180cm
A= 'tall persons'
={(J,0.8), (N,0.5), (T,0.1), (D,1)}
B= 'young persons'
={(J,0.8), (R,0.9), (T,0.1), (D,0.5)}
Note that their membership is subjective, but it is
probabilistic and rational.
12
Contd
• A crisp set is a two-valued distinction between
members and non-members.
• A fuzzy set is based on the degree of membership and
the degree of authenticity (multi-valued).
• The fuzzy set uses the number between 0 (completely
false) and 1 (completely true) as a membership grade.
Two-valued Multi-valued
Contd
Crisp set Fuzzy set
13
Contd
(Definition) Fuzzy set
Given a universe U, a fuzzy set A is defined as a set of
ordered pairs
A= {(u, A(u))|uU}
where A: U [0, 1] : Membership function (MF)
A(u)
1.0
A(0.8)= 0.51
Membership grade (MG)
0.0 u
0 u= 0.8 2
Contd
U : Continuous universe
A(u)
A= {(u, A(u))}
or
A= A (u ) / u
14
Contd
Example 1: Given U= {u | 0u10}, define a fuzzy
set A= 'number close to 5'.
Solution: One answer can be written by
A= {(u, A(u))}
1
where A(u)= A(u)
1 (u 5) 2 1
or 0.8
0.6
1
A=
1 (u 5) 2
/u 0.4
0.2
0
0 2 4 6 8 10
u
Contd
U : Discrete universe
A= {(ui, A(ui))} 1
0.8
or 0.6
A i
A (ui ) / ui
0.4
0.2
or 0
-10 -5 0 5 10
15
Contd
Example 2: Given U= {0,1,2,...,9,10}, define a fuzzy
set A= 'integer close to 5' and draw its MF.
Solution: A={(3,0.2),(4,0.6),(5,1.0),(6,0.6),(7,0.2)}
or
A= 0.2/3+0.6/4+1.0/5+0.6/6+0.2/7
A(u)
1
0
u
3 4 5 6 7
Contd
Example 3: Given U= {Ras Dashen, Everest,
Kilimanjaro, Kaka}, obtain a fuzzy set B= 'highest
mountains' and draw MF.
Solution: B= 0.6/Ras Dashen+1.0/Everest
+0.7/Kilimanjaro +0.5/Kaka Everest(8,848 m)
Kilimanjaro(5,895 m)
B(u)
0.5
0
Ras Dashen Everest Kilimanjaro Kaka
16
Contd
(Definition) Height, H(A)
The height of the fuzzy set A is the largest membership
grade attained by any element. That is
H ( A) sup A (u )
uU
Contd
For example, given
1
B= {(u, B(u))}, where B(u)=
1 10u 2
H(B)= 1 since the maximum value is 1 when u= 0.
0.5
0
-4 -2 0 2 4
u
17
Contd
(Definition) Support, S(A)
Support is defined as a set of elements in the fuzzy set
A among the elements in a universe U, and the result is
a crisp set.
S(A)= {u | A(u)> 0, uU }
Contd
(Definition) -cut set, A
An -cut of the fuzzy set A is a crisp set A, that
contains all the elements whose membership values are
greater than or equal to ,
A= {uU| A(u) }. A(u)
1
0.2
0
0 2 4 6 8 10 u
A
18
Contd
A0.1 A0.5
Contd
For example, given fuzzy sets A and B
(1) A= {(u,0.2),(v,0.9),(w,1)} , = 0.2, 0.5
(2) B= 0.2/a+0.6/b+0.4/c+0.9/d, = 0.5, 0.9
19
Contd
Quiz 1: Determine the -cut A0.5 of the fuzzy set A.
1
A= {(u,A(u))} where A(u)= .
1+u2
Contd
(Definition) Level set, A
The level set of the fuzzy set A is defined as a set of
different degrees of belonging to A and the result is a
crisp set.
A= { | A }
For example, U= {a,b,c,d,e} and
A= 0.2/a+0.6/c+0.1/e
then A0= {a,b,c,d,e}, A0.1= {a,c,e}, A0.2= {a,c}, A0.6= {c}
A= {0, 0.1, 0.2, 0.6}
20
Contd
(Definition) Normality
A fuzzy set A is is said to be normal if its height equals
to one, that is, sup A (u ) 1
uU
Contd
(Definition) Convexity
A fuzzy set A is convex if and only if
A(u1+(1-)u2) min[A(u1), A(u2)]
for all u1, u2U and [0,1].
A(u)
A(u2+(1-)u1)
A(u2)
A(u1)
u
u1 u2
u2+(1-)u1
21
Contd
A(u) A(u)
1 1
u 0 u
0
(a) normal and convex (b) not normal but convex
A(u) A(u)
1 1
0 u 0 u
Contd
(Definition) Cardinality
The cardinality of a fuzzy set A is generally defined as
follows:
• scalar cardinality | A |
A (u )
uU
• relative cardinality | A|
A
|U |
• fuzzy cardinality |A|= {(|A |, ) | }
22
Contd
For example U= {a, b, c} and
A= 'good apples'= 0.5/a + 1/b + 0.1/c
a b c
(1) scalar cardinality
|A|= 0.5+1+0.1= 1.6 (The numbers of good apples
are 1.6.)
(2) relative cardinality
|U|= 3, ||A||= 1.6/3= 0.53 (The proportion of good
apples is 53%.)
Contd
U= {a, b, c}and A= 0.5/a + 1/b + 0.1/c
(3) fuzzy cardinality
level set A= {0.1, 0.5, 1}
A0.1= {a,b,c}, |A0.1|= 3
A0.5= {a,b}, |A0.5|= 2
A1= {b}, |A1|= 1
|A|= 0.1/3+0.5/2+1.0/1= {(3,0.1), (2,0.5), (1,1)}
23
Contd
(Definition) Equality, A= B
The fuzzy sets A and B are equal iff they have the same
MFs, that is,
A(u)= B(u), uU.
Contd
(Definition) Subset, AB
A fuzzy set A is a subset of(included in) a fuzzy set B iff
the MF of A is less than or equal to that of B, that is,
A(u) B(u), uU. B(u)
For example,
U= {a, b, c}, A(u)
B= 0.2/a + 0.6/b + 0.9/c
and AB
C= 0.4/a + 0.6/b + 1.0/c
then, B is a subset of C. That is, BC .
24
4. Fuzzy Set Operations
(Definition) Fuzzy complement
The complement of a fuzzy set A in U, denoted by A, is
defined as
Contd
In order for the function c to be qualified as a
complement, it should satisfy at least the following two
requirements:
(Basic axioms)
Axiom c1: c(0)= 1 and c(1)= 0 (boundary condition).
25
Contd
Axiom c2: For all a= A(u1) and b= A(u2)[0,1], if a <
b, then c(a) c(b) (nonincreasing condition).
It notes that an increase in MG must result in a decrease
or no change in MG for the complement.
Any violation of these will result in an operator that is
unacceptable.
(Additional axioms)
Axiom c3: c is continuous (continuity).
Axiom c4: c(c(a))= a, for all a=A(u)[0,1](involutive).
Contd
Standard fuzzy complement
A̅(u)= c(A(u))= 1-A(u)
A
1
A̅(u) 1
0.8 0
0.6 A
1
0.4
0
0.2
0
0 0.2 0.4 0.6 0.8 1 A(u)
26
Contd
Sugeno class
1− (u)
A̅(u)= 1+A (u) where (−1,)
A
Contd
Yager class 1
A̅(u)= (1 A (u )) w
w
where w(0,)
27
Contd
Consider U= {M, S, G} and
A= 'Economical cars'= 1/M+0.4/S+0.1/G,
Contd
Example 2: Given U= and
1
A= {(u,A(u))}, where A(u)= .
1+u2
Draw A using (1) standard, (2) Sugeno (= 1), and (3)
Yager (w= 2). 1 1
Solution: 0.5 0.5
0 0
-5 0 5 -5 0 5
(1) A(u) (2) Standard
1 1
0.5 0.5
0 0
-5 0 5 -5 0 5
(3) Sugeno (4) Yager
(=1) (w=2)
28
Contd
(Definition) Fuzzy union
The union AB of the fuzzy sets A and B in U is
defined as
AB= {(u, AB(u))| uU}
where AB(u)= s(A(u),B(u))
A B AB
Contd
To be qualified as an union for all a= A(u), b= B(u),
c= C(u)[0,1], the function s should satisfy at least
the following four requirements:
(Basic axioms)
Axiom s1: s(1,1)= s(0,1)= s(1,0)= 1, s(0,0)= 0
(boundary).
Axiom s2: s(a,b)= s(b,a) (commutative).
Axiom s3: if aa' and bb', then s(a,b)s(a',b')
(nonincreasing).
Axiom s4: s(s(a,b),c)= s(a,s(b,c)) (associative).
29
Contd
(Additional axioms)
Axiom s5: s is continuous (continuity).
Axiom s6: s(a,a)= a (idempotency).
(Definition) s-norm
Any function s:[0,1][0,1] [0,1] that satisfies Axioms
s1~s4 is called an s-norm.
Contd
Examples of s-norms
a= A(u), b= B(u)
Standard
AB(u)= max[a,b]= ab
Algebraic
AB(u)= a+b-ab
Yager class
AB(u)= min[1,(aw+bw)1/w], w(0,)
30
Contd
Bounded sum
AB(u)= min[1,a+b]
Drastic sum
a, if b 0
AB b, if a 0
1,
otherwise
Contd
For example, consider U= {M, S, G} and two fuzzy
sets
A= 'Economical cars'= 1/M+0.4/S+0.1/G,
B= 'Luxurious cars'= 0.1/M+0.5/S+1/G
31
Contd
(2) Algebraic A= 1/M+0.4/S+0.1/G,
AB(M)= 1+0.1-10.1= 1, B= 0.1/M+0.5/S+1/G
AB (S)= 0.4+0.5-0.40.5= 0.7,
AB (G)= 0.1+1-0.11= 1, AB(u)= a+b-a.b
AB= 1/M+0.7/S+1/G
(3) Yager(w= 2) AB(u)= min[1, a2+b2]
AB(M)= min[1, 12+0.12]= 1,
AB (S)= min[1, 0.42+0.52]= 0.64,
AB (G)= min[1, 0.12+12]= 1,
AB= 1/M+0.64/S+1/G
Contd
(4) Bounded sum
A= 1/M+0.4/S+0.1/G,
AB(M)= min[1,1+0.1]= 1, B= 0.1/M+0.5/S+1/G
AB(S)= min[1,0.4+0.5]= 0.9,
AB(G)= min[1,0.1+1]= 1, AB(u)= min[1,a+b]
AB= 1/M+0.9/S+1/G
(5) Drastic sum
AB(M)= 1, AB(S)= 1, a, if b 0
AB(G)= 1 AB b, if a 0
AB= 1/M+1/S+1/G 1,
otherwise
32
Contd
(Definition) Fuzzy intersection
The intersection of the fuzzy sets A and B in U, denoted
by AB, is defined as
AB= {(u, AB(u))| uU}
where AB(u)= t(A(u),B(u)).
A B AB
Contd
To be qualified as an intersection for all a= A(u), b=
B(u), c= C(u)[0,1], the function t should satisfy at
least the following four requirements:
(Basic axioms)
Axiom t1: t(1,1)= 1, t(0,1)= t(1,0)= t(0,0)= 0
(boundary).
Axiom t2: t(a,b)= t(b,a) (commutative).
Axiom t3: if aa' and bb', then t(a,b)t(a',b')
(nonincreasing).
Axiom t4: t(t(a,b),c)= t(a,t(b,c)) (associative).
33
Contd
(Additional axioms)
Axiom t5: t is continuous (continuity).
Axiom t6: t(a,a)= a (idempotency).
(Definition) t-norm
Any function t:[0,1][0,1] [0,1] that satisfies Axioms
t1~t4 is called an t-norm.
Contd
Examples of t-norms
a= A(u), b= B(u)
Standard
AB(u)= min[a,b]= ab
Algebraic
AB(u)= ab
Yager class
AB(u)= 1-min[1,((1-a)w+(1-b)w)1/w], w(0,)
34
Contd
Bounded product
AB(u)= max[0,a+b-1]
Drastic product
a, if b 1
A B (u ) b, if a 1
0,
otherwise
Contd
Consider U= {M, S, G} and two fuzzy sets
A= 'Economical cars'= 1/M+0.4/S+0.1/G,
B= 'Luxurious cars'= 0.1/M+0.5/S+1/G
(1) Standard
AB(M)= 10.1= 0.1,
AB(u)= ab
AB(S)= 0.40.5= 0.4,
AB (G)= 0.11= 0.1
AB= 'Economical and luxurious cars'
= 0.1/M+0.4/S+0.1/G
35
Contd
(2) Algebraic
AB(M)= 10.1= 0.1, A= 1/M+0.4/S+0.1/G,
B= 0.1/M+0.5/S+1/G
AB(S)= 0.40.5= 0.2,
AB(u)= ab
AB(G)= 0.11= 0.1,
AB= 0.1/M+0.2/S+0.1/G
AB(u)= 1-min[1, (1−a)2+(1−b)2]
(3) Yager
(w= 2)
AB(M)= 1-min[1, 0.92]= 0.1,
AB(S)= 1-min[1, 0.62+0.52]= 0.219,
AB(G)= 1-min[1, 0.92]= 0.1,
AB= 0.1/M+0.219/S+0.1/G
Contd
(4) Bounded product
A= 1/M+0.4/S+0.1/G,
AB(M)= max[0,1+0.1-1]= 0.1, B= 0.1/M+0.5/S+1/G
AB(S)= max[0,0.4+0.5-1]= 0,
AB(G)= max[0,0.1+1-1]= 0.1, AB(u)= max[0, a+b-1]
AB= 0.1/M+0.1/G
(5) Drastic product
AB(M)= 0.1, a, if b 1
AB(S)= 0, A B (u ) b, if a 1
AB(G)= 0.1 0,
otherwise
AB= 0.1/M+0.1/G
36
Contd
(Definition) Difference of fuzzy sets
Given two fuzzy sets A and B in U, the difference of A
and B is defined as:
A−B= {(u, A−B(u))| uU}
where A−B(u)= min[A(u),1-B(u)]
A B B
Crisp set
A-B
A−B= AB
Contd
A−B= {(u, A−B(u))| uU}
where A−B(u)= min[A(u),1-B(u)]
1 1
A(u) B(u) 1-B(u)
0 0
A(u)
A−B(u)
37
Contd
(Definition) Distance of fuzzy sets
Given two fuzzy sets A and B in U, the distance of A
and B is defined as:
• Hamming d(A,B)=
ui U
| A (ui ) B (ui ) |
distance
• Euclidean d(A,B)=
[
ui U
A (ui ) B (ui )]
2
distance
Contd
For example, given A and B in U,
U= {w, x, y, z}
A= 1.0/w+0.8/x+0.5/y+0.3/z
B= 0.3/w+0.5/y+1.0/z
A−B(u)= min[A(u),1-B(u)]
(1) Difference
A−B= (10.7)/w+(0.81)/x+(0.50.5)/y+(0.30)/z
= 0.7/w+0.8/x+0.5/y
38
Contd
U= {w, x, y, z}
A= 1.0/w+0.8/x+0.5/y+0.3/z
B= 0.3/w+0.5/y+1.0/z d(A,B)= |
ui U
A (ui ) B (ui ) |
39