AIFA 22 Fuzzy Logic 050324
AIFA 22 Fuzzy Logic 050324
AIFA 22 Fuzzy Logic 050324
05/03/2024
Koustav Rudra
Fuzzy Reasoning
• Based on Fuzzy set theory and consequently Fuzzy Logic
• Stochastic Uncertainty
• The probability of Hitting the target is 0.8
• Lexical Uncertainty
• Uncertainty that creeps in from our usage of day-to-day
words
• Such words are subjective / ambiguous/ pre-imprecise
101.66oF 101.66oF
102.74oF
102.74oF
Strong Fever Strong Fever
Either an element belong to the set or not Chance becomes less as the point moves further
Set and Logic: Connection
a
b
• belongs(a,X)
• belongs(b,X)
c
• ~belongs(d,X)
d
Fuzzy Logic
• Fuzzy Logic: Reasoning with qualitative information
• This is more realistic than predicate calculus
• Because in real life we need to deal with qualitative statements
• Examples:
• In process control: Chemical plant
• Rule: If the temperature is moderately high & the pressure is medium then turn the knob
slightly right
Fuzzy Logic
• Dealing with precise numerical information is often inconvenient, not suitable for humans
• Deals with reasoning that is approximate rather than fixed and exact
• Compared to traditional binary sets, fuzzy logic variables may have a truth value that ranges in
degree between 0 and 1
• Classical logic which requires a deep understanding of a system, exact equations, and precise
numeric values
Logic Types
• Bivalent Logic
• Classical logic, often described as Aristotelian logic
• True or false
• Bayesian Reasoning and probabilistic models
• Each fact is either True or false
• Often unclear whether a given fact is true or false
• Multivalent Logics
• Three-valued logic
• True , false, and undetermined
• 1 represents true, 0 represents false, and real numbers between 0 and 1 represent degree of
truth
Fuzzy Sets vs Traditional/Crisp Sets
• Traditional set, Crisp set
• Defined by the values that are contained within it
• A value is either within the set, or it is not
• e.g a set of natural number
• Fuzzy set
• Each value is a member of the set to some degree, or is not a member of the set to some degree
• Example:
• Bill is 7 feet tall
• John is 4 feet tall
• Jim is 5 feet tall
Crisp Set: Membership
• Membership/ Characteristics/ Discriminative Predicate
• Example:
• S = {2,3,5,a,b,c}
• X = universe = {1,2,3,…,10,a,b,c,…,z}
• 1 ∉ 𝑆 (𝑑𝑜𝑒𝑠 𝑛𝑜𝑡 𝑏𝑒𝑙𝑜𝑛𝑔)
• 𝑎 ∈ 𝑆 (𝑏𝑒𝑙𝑜𝑛𝑔𝑠)
• Example:
• Crisp set, 𝑆" = {2,4,6,8,10}
• 𝜇!! 𝑥 is a predicate which denotes x to be an even number less than or equal to 10
• Given any ‘a’ which is a number, the 𝜇!! 𝑥 question produces 0/1
Fuzzy Set Theory: Basics
• 𝑥 ∈ 𝐻𝑒𝑖𝑔ℎ𝑡
• Fuzzy set: 𝑀𝑒𝑑𝑖𝑢𝑚 ⊆ 𝐻𝑒𝑖𝑔ℎ𝑡
#.% #.& #.( "
• 𝑀𝑒𝑑𝑖𝑢𝑚 = { , , , }
&" '"" &" &"" &" )"" &" "#""
* (,)
• 𝑀𝑒𝑑𝑖𝑢𝑚 = { # }
,
Fuzzy Set
• Fuzzy set membership function
• Choose entirely arbitrarily, reflect a subjective view on the part of the author
N
0 500 600 700
• Continuous Definitions:
1
• By Intension
• Needs a closed form expression related to properties
• X = {x| x≥6}
Fuzzy Set Representation
5 1 0
10 1 0
20 1 0 Age
30 0.6 0
𝜇
40 0.5 0.2
60 0.01 0.5
𝜇 !"## (ℎ)
0
1 2 3 4 5 6 7 8 9
Height
Shapes of Profiles
• Shapes of profiles are obtained from experiments or expert judgement
Koustav Rudra
Membership Function
• A membership function for a fuzzy set A on the universe of discourse X is defined as 𝜇. : 𝑋 →
0,1 ,
0, 𝑥≤𝑎
𝑥−𝑎
, 𝑎<𝑥≤𝑚
𝜇! (𝑥) = 𝑚 − 𝑎
𝑏−𝑥
, 𝑚<𝑥<𝑏
𝑏−𝑚
0, 𝑥≥𝑏
Trapezoidal Function
• It is defined by
• a lower limit a,
• an upper limit d,
• a lower support limit b, and
• an upper support limit c,
• where a < b < c < d
0, 𝑥 < 𝑎 𝑜𝑟 𝑥 > 𝑑
𝑥−𝑎
, 𝑎≤𝑥≤𝑏
𝜇! (𝑥) = 𝑏−𝑎
1, 𝑏≤𝑥≤𝑐
𝑑−𝑥
, 𝑐≤𝑥≤𝑑
𝑑−𝑐
Trapezoidal Function: R Function
Trapezoidal Function: L Function
Gaussian Function
• It is defined as
• a central value m and
• a standard deviation k > 0
• The smaller k is, the narrower the “bell” shape
(,23)$
2
𝜇. 𝑥 = 𝑒 14 $
Example
Crisp Set Fuzzy Set
1
𝜇$#%&'+ 𝑥 =
1 + (𝑥 − 𝑎)(
1 1
𝜇$#%&', −1 = = = 0.5
1 + (−1 − 0)( 2
1 1
𝜇$#%&', 2 = = = 0.2
1 + (2 − 0)( 5
Membership Function: Close to a
1
𝜇$#%&'+ 𝑥 =
1+ 𝑥−𝑎
Koustav Rudra
Linguistic Variable
• Ravi is tall (adjective)
• Set of tall people is Fuzzy
• A linguistic variable is
• The predicate of a sentence
• Typically is an adjective (often qualified by adverb)
• A linguistic variable to be amenable to Fuzzy Logic, must have an underlying numerical quantity
• A Fuzzy set is always defined over a crisp set and said to be subset of that crisp set
Linguistic Variable
• Terms, Degree of Membership, Membership Function, Base Variable, …
Low Temp Normal Raised Temperature Raised Temperature
1
𝜇(𝑥)
0
36! 𝐶 37! 𝐶 38! 𝐶 39! 𝐶 40! 𝐶 41! 𝐶 42! 𝐶
Over the same crisp set we can define different Fuzzy sets based on variable
Hedges
• Hedges are entities to deal with adverb
• John is tall
• Jack is very tall
• Jill is somewhat tall
• Very à squaring the 𝜇 function
• Somewhat àtaking square root of 𝜇 function
Hedges
Very
0
1 2 3 4 5 6 7 8 9
Height
Concentration and Dilation Operator
• 𝜇34566 ℎ = (𝜇 4566 (ℎ))#
• 𝜇74566 ℎ = 𝜇 4566 (ℎ)
1
Very
0
1 2 3 4 5 6 7 8 9
Height
Thank You