Fuzzy Logic and Its Applications
Fuzzy Logic and Its Applications
T.J.Ross, McGraw-Hill
Fuzzy Set Teory, 1997
G.Klir et al. Prentice Hall
Fuzzy Sets and Fuzzy Logic 1995
G Klir et al. Prentice Hall
Introduction
In 1965, Prof. Lofti Zadeh published the first
article “Fuzzy Sets”.
It becomes billions of dollars business.
America
Europe
Asia
Thousands of patents
Uncertainty: Incomplete
Ambiguity: Imprecise
Applications:
Air Conditioner Washing Machine
Subway System Camera
Aerospace Nuclear Submarine
Pattern Recognition Control
Image Processing Computer Vision
They reflect a recent trend to view fuzzy logic (FL),
neurocomputing (NC), genetic computing (GC), Rough
Sets (RS) and probabilistic computing (PC) as an
association of computing methodologies falling under
the rubric of so-called soft computing.
Based on Randomness.
Fuzziness
Example.
Random Errors generally average out over time
or space
Non-random errors will not generally average out
and likely to grow with time.
Information World
Information World
Examples:
A number is close to 5
Fuzziness
Examples:
He/she is tall
Fuzziness
Union:
A B = {x | x A or x B}
Intersection:
A B = {x | x A and x B}
Complement:
A’ = {x | x A, x X}
X – Universal Set
Set Difference:
A | B = {x | x A and x B}
Set difference is also denoted by A - B
Properties of Classical Sets
AB=BA
AB=BA
A (B C) = (A B) C
A (B C) = (A B) C
A (B C) = (A B) (A C)
A (B C) = (A B) (A C)
AA=A
AA=A
AX=X
AX=A
A=A
A=
Properties of Classical Sets
If A B C, then A C
De Morgan’s Law:
(A B)’ = A’ B’
(A B)’ = A’ B’
Proof:
LHS= {x | x (A and B)}= {x | x A or x B)}=
A’ B’= RHS
Can be extended to n sets
Hence,
A B XA B(x)
= XA(x) XB(x)
= max(XA(x),XB(x))
Note: Some books use + for , but still it is not ordinary
addition!
Some more explanations follow…
Fuzzy Sets
A B XA B(x)
= XA(x) XB(x)
= min(XA(x),XB(x))
A’ XA’(x)
= 1 – XA(x)
A B XA(x) XB(x)
A’’ = A
Fuzzy Sets
A = {A(x1) / x1 + A(x2) / x2 + …}
= { A(xi) / xi}
Note: ‘+’ add
‘/ ’ divide
Only for representing element and its
membership.
Also some books use (x) for Crisp Sets too.
Fuzzy Set Operations
A’(x) = 1 - A(x)
AB=BA
AB=BA
A (B C) = (A B) C
A (B C) = (A B) C
A (B C) = (A B) (A C)
A (B C) = (A B) (A C)
AA=A AA=A
AX=X AX=A
A=A A=
If A B C, then A C
A’’ = A
Sets as Points in Hypercubes
Explore to n-dimension
Classical Relations
Fuzzy relations
Logic, Approximate reasoning, Rule-based learning
systems, Nonlinear Simulation, Classification,
Pattern Recognition, etc.
Cartesian Product
A = {a,b}
B = {0,1}
A x B = { (a,0) (a,1) (b,0) (b,1) }
Ordered Pairs
Consider
AxA
or A x B x C if C is given
a b c
1 1 0 1
R= 2 1 1 0
3 0 1 1
Using a diagram to represent the relation
Crisp Relations
Relations can also be defined for continuous universes
R = { (x,y) | y 2x, x X, y Y}
X= 1 y 2x
0 otherwise
Crisp Relations
Cardinality:
N: # of elements in X
M: # of elements in y
Cardinality of R
nX x Y = nX • nY = M • N
Union
R S XR S(x,y)
XR S(x,y) = max{ XR(x,y),XS(x,y) }
Intersection
R S XR S(x,y)
XR S(x,y) = min{ XR(x,y),XS(x,y) }
Complement
R’ XR’(x,y)
XR’(x,y) = 1 – XR(x,y)
Containment
R S XR(x,y) XS(x,y)
Identity
0
Properties of Crisp Relations
Commutativity
Associativity
Distributivity
Idempotency All hold
De Morgan Law
Excluded middle Law
Etc.
Properties of Crisp Relations
Composition
Let R be a relation representing a mapping from X to Y
X
Y University sets
Let S be a relation, a mapping from Y to Z
Can we find T from R to S?
Properties of Crisp Relations
T: mapping from X to Z
T=RS
Two ways to compute XT(xz)
1. XT(xz) =y
Y(XR(xy) Xs(yz))
= ymax(min{X
Y R(xy),XS(yz)})
Max-min composition
Max-product composition
multiplication
Properties of Crisp Relations
Using Matrix representation:
y1 y2 y3 y4
x1 1 0 1 0
R = x2 0 0 0 1
x3 0 0 0 0
z1 z2
y1 0 1 z1 z2
y2 0 0 x1 0 0
S= y3 0 1 T= x2 0 0
y4 0 0 x3 0 0
Union:
R S = max{ R(x,y),S(x,y) }
Intersection:
R S = min{ R(x,y),S(x,y) }
Complement:
R’(x,y) = 1 - R(x,y)
Containment:
R S R(x,y) S(x,y)
Properties of Fuzzy Relations
Commutativity
Associativity
Distributivity
Idempotency All hold
De Morgan Law
Excluded middle Law
Etc.
Note: R R’ E
R R’ 0
In general.
Properties of Fuzzy Relations
Example:
A = 0.2/x1 + 0.5/x2 + 1/x3
B = 0.3/y1 + 0.9/y2
y1 y2
0.2 x1 0.2 0.2
AxB= 0.5 0.3 0.9 = x2 0.3 0.5
1 x3 0.3 0.9
Properties of Fuzzy Relations
Note: R S S R
Properties of Fuzzy Relations
Example:
y1 y2 z1 z2 z3
R= x1 0.7 0.5 S = y1 0.9 0.6 0.2
x2 0.8 0.4 y2 0.1 0.7 0.5
z1 z2 z3
Using max-min, T = x1 0.7 0.6 0.5
x2 0.8 0.6 0.4
z1 z2 z3
Using max-product, T = x1 0.63 0.42 0.25
x2 0.72 0.48 0.20
Note: Set, Relation, Composition
How to find new membership from the given ones!
Tolerance and Equivalence Relation
Graph representation:
Crisp Tolerance Relation
(or proximity relation)
R1n-1 = R1 R1 … R1 = R
Crisp Tolerance Relation
(or proximity relation)
Example:
1 1 0 0 0 Note: symmetric, reflexive, but
1 1 0 0 1 not transitive, why?
R1 = 0 0 1 0 0 X(x1 x2) = 1
0 0 0 1 0
0 1 0 0 1 X(x2 x5) = 1 but
X(x1 x5) 1 (=0)
1 1 0 0 1
1 1 0 0 1
Try R12 = 0 0 1 0 0 Now, it is transitive!
0 0 0 1 0
1 1 0 0 1
Fuzzy Tolerance and Equivalence Relation
Example:
1 0.8 0 0.1 0.2
0.8 1 0.4 0 0.9
R1 = 0 0.4 1 0 0
0.1 0 0 1 0.5
0.2 0.9 0 0.5 1
Value Assignment
How to find the membership values for the relation?
1. Cartesian Production
Note: you have to know the membership value for the
sets! Will discuss in chapter 4.
3. Look up table y1 y2 y3
x1
x2
x3
Fuzzy Tolerance and Equivalence Relation
Value Assignment
4. Linguistic rule of knowledge – chapters 7 – 9
5. Classification – chapter 11
Example:
x1 x2 x3 x4 x5
xi1 0.3 0.2 0.1 0.7 0.4
xi2 0.6 0.4 0.6 0.2 0.6
xi3 0.1 0.4 0.3 0.1 0
Max-min Method:
1 symm
0.538 1
R1 = 0.667 0.667 1
0.429 0.333 0.25 1
0.818 0.429 0.538 0.429 1
Computationally simple!
Other Similarity Methods
Absolute Exponential:
Scalar Product:
Where:
Other Similarity Methods
Where: and
Absolute subtrahend:
Graphically,
Features of Membership Function