Вы находитесь на странице: 1из 20

Some Elements of Fuzzy Logic, Fuzzy Sets

and Fuzzy Inference


Introduction:
• He is tall
• He is tall
• The old man is garrulous
• The old man is garrulous
•The car is sleek
• He is married
• He is obese
• The car is sleek
• She is happy
• She is dead
• He is obese • He is married

• She is an Indian • She is dead

• He is alive • She is an Indian

• She is happy • He is alive


Introduction
The dominant context in which science is applied is that in which
statements are either TRUE or FALSE
However the dominant context of human reasoning is where there are
no crisp boundaries between TRUE or FALSE
Fuzzy logic was founded by Dr Lotfi A Zadeh (UCLA, Berkeley)

Proposition: John is young


Given: John is 22 years. The TRUTH that John is young is a matter of degree

Proposition: John is under 22 years.


Given: John is 24 years. The TRUTH that John is 22 years is the NULL SET
Introduction
1; x ∈ A
Crisp set defines membership of its elements from U:→{0,1}
χ A (x) = 
0; x ∉ A
Fuzzy set defines membership of its elements from U: →[0,1]

 1; x ≤ 25
 40 − x
µYoung ( x) =  ;25 < x ≤ 40
 15
 0; elsewhere
If x is 22 the degree of belongingness of x to the set Young is 1. If x is 30 the
degree of its belongingness to Young is 0.666
Fuzzy Vs Probability

PA(x):S→[0,1] determines the probability that an element x belongs to


the set A.
µ A (x) ≠ pA (x)
though both map x to a value in [0,1]. PA(x) measures our knowledge or ignorance of
the truth of the event that x belongs to the set A. However the belongingness of x to A
is not of degree but crisp.
µA(x) measures the degree of belongingness of x to set A and there is no interest
regarding the uncertainty behind the outcome of the event x. Event x has occurred and
we are interested in only making observations regarding the degree to which x belongs
to A
Fuzzy Sets
Operations on Fuzzy Sets:

Question: Given two crispsets A and B determine if


x∈ AU B
Answer: x ∈ C iff x ∈ A or x ∈ B or
χ A ( x ∈ C ) = 1 iff χ A ( x ∈ A) = 1 or χ A ( x ∈ B ) = 1
In case of fuzzy sets: µ A ( x) = 0.6, µ B ( x) = 0.4
How does one define the union operation?
One way is: µ AU B ( x ) = max{µ A ( x ), µ B ( x )}
In other words we extend the crisp set understanding of the
operation union to the fuzzy realm
Operations on Fuzzy Sets
Intersection: µ c ( x ) = min{µ A ( x ), µ B ( x )}
Negation: µ A (x) = 1 − µ A (x)

Illustrating union operation Illustrating intersection operation


Operations on Fuzzy Sets
The law of excluded middle need not hold in fuzzy sets

For crisp sets law holds

For fuzzy sets it does not always hold


However other laws of set operations such as commutativity, associativity,
distributivity, idempotency, identity, transitivity holds
Fuzzy Sets

Notations:
Discrete fuzzy set notation: A discrete fuzzy set A is denoted as the following

µ A (x1 ) µ A (x 2 ) µ A (x n )
A= + +K+
x1 x2 xn

Discrete representation

Continuous fuzzy set representation:


µ A ( x)
A=∫
x Continuous representation
Relations Among Sets

a b c
Unconstrained matrix relation
1 1 1 1 between sets X and Y is also

2 1 1 1
 called the cartesian product of
  two sets defined by:
3 1 1 1
X × Y = {( x, y ) / x ∈ X , y ∈ Y }

A more general constrained relation R between two sets is defined as:

1, ( x, y ) ∈ R
χ R ( x, y ) = 
0, ( x, y )∉ R
Composition Between Sets

Max-Min Composition:
χ T ( x, z ) = ∨ ( χ R ( x, y ) ∧ χ S ( y, z ))
y∈Y

Max-Product Composition:
χ T ( x, z ) = ∨ ( χ R ( x, y ) • χ S ( y, z ))
y∈Y
Composition Between Sets
 y1 y2 y3 y4
 y1  0
z1 z2

x1  1 0 1 0  1
R = x2  0 0 0 1 y2  0 0
  S=  
x3  0 0 0 0 y3 0 1

  y4  0
 0 
Max-Min Composition:
χ T ( x, z ) = ∨ ( χ R ( x, y ) ∧ χ S ( y, z ))
y∈Y

∨ (0,0,0,0) ∨ (1,0,0,0)  0 1 
∨ (0,0,0,0) ∨ (0,0,0,0) T = 0 0 
   
∨ (0,0,0,0) ∨ (0,0,0,0) 0 0
Propositional Calculus
Predicate Logic:
In classical predicate logic, a simple proposition P is a linguistic statement contained in
the universe of propositions which can be classified as being strictly TRUE or FALSE.
T(P) = 1 or 0, where T(P) represents the truth value or the veracity of P
Two propositions P, Q made over the same universal set or universe of discourse can be
related by logical connectives such as disjunction (∨), conjunction (∧), negation (−),
implication (→), equality (↔)or (≡).
Propositions take the form:
P: x is in A (apple is a fruit)
Q: x is in B (red is a color)
Propositional Calculus

Implication (P → Q):
P: x is in A
Q: y is in B
Implication (P → Q): If x in A, then y in B or in short: if P then Q.
Set theoretic notation of (P → Q) is given by : AU B
In other words either y is in B or x is not in A

T(P) T(Q) T(P→Q)


0 0 1
0 1 1
1 0 0
1 1 1
Propositional Calculus
P: x is in A;
Q: y is in B;
S: y is in C
If x is in A then y is in B else y is in C: (P → Q) ∨ (Ρ'→S)
Set theoretically: (A I B) U (A I C )
Tautologies
Modus Ponens: Modus Tollens:
P1: If x is in A then y is in B P1: If x is in A then y is in B
P2: x is in A is given P2: y is not in B is given
P3: y is in B is always true P3: x is not in A is always true
Notation: (P∧(P→Q))→Q is always true Notation: (Q'∧(P→Q)) → P' is always true
Propositional Calculus
Inferencing through predicate logic:
P1: If x is in A then y is in B
P2: Given that x is in A1
Find where is y?

Methodology:
• Find the relation matrix R = A U B = ( A I B) U (A IU )
max(min ( χ A ( x), χ B ( y ) ), min (1 − χ A ( x),1))
• Now find the composition A1oR
• Then y is in B1 = A1oR
Fuzzy Inferencing
Problem: Driving on road, approached by vehicles towards an intersection. How do
you control your breaks depending on the distance to the point of intersection and
speed of the vehicle.

Control Rules:
1. If the distance to intersection (dti) is far and the speed slow apply gentle breaks
2. If dti is near and the speed slow apply medium breaks
3. If dti is near and speed fast apply medium breaks
4. If dti is near and speed fast apply high breaks
Fuzzy Inferencing
Defining input or antecedent membership functions:

Distance to Intersection Speed


Defining output or consequent membership functions:

Pressure on breaks
Fuzzy Inferencing
Given that the distance to intersection is 0.3 normalized units and
speed is 0.7 normalized units how much should be the pressure on
the breaks in normalized units?

Approach:
Fuzzify the antecedent variables
Fire the rules (Mamdani’s min-max inferencing)
Obtain the net consequent membership function
Defuzzify to get crisp output
Fuzzy Inferencing
If dti is far and the speed is
slow apply gentle breaks

If dti is far and the speed is


fast apply medium breaks

If dti is near and the speed is


slow apply medium breaks

If dti is near and the speed is


far apply high breaks
Fuzzy Inferencing
Defuzzification: The process of converting a fuzzy quantity or a fuzzy
set to a crisp value. Commonly used defuzzification methods are:
• Maximum value method
• Center of gravity method
• Center of area method

Center of gravity method of defuzzification results in a break pressure of


0.68 units to be applied

Вам также может понравиться