SlideShare a Scribd company logo
1
Fuzzy Logic and Fuzzy Inference
• Why use fuzzy logic?
• Tipping example
• Fuzzy set theory
• Fuzzy inference
2
What is fuzzy logic?
• A super set of Boolean logic
• Builds upon fuzzy set theory
• Graded truth. Truth values between True and False. Not
everything is either/or, true/false, black/white, on/off etc.
• Grades of membership. Class of tall men, class of far cities, class of
expensive things, etc.
• Lotfi Zadeh, UC/Berkely 1965. Introduced FL to model
uncertainty in natural language. Tall, far, nice, large, hot, …
• Reasoning using linguistic terms. Natural to express expert
knowledge.
If the weather is cold then wear warm clothing
3
Fuzzy logic – A Definition
• Fuzzy logic provides a method to formalize reasoning when dealing
with vague terms.
• Traditional computing requires finite precision which is not always
possible in real world scenarios. Not every decision is either true or
false, or as with Boolean logic either 0 or 1.
• Fuzzy logic allows for membership functions, or degrees of
truthfulness and falsehoods. Or as with Boolean logic, not only 0
and 1 but all the numbers that fall in between.
4
Why use fuzzy logic?
Pros:
• Conceptually easy to understand w/ “natural” maths
• Tolerant of imprecise data
• Universal approximation: can model arbitrary nonlinear functions
• Intuitive
• Based on linguistic terms
• Convenient way to express expert and common sense knowledge
Cons:
• Not a cure-all
• Crisp/precise models can be more efficient and even convenient
• Other approaches might be formally verified to work
5
Tipping example
• The Basic Tipping Problem: Given a number between 0 and 10
that represents the quality of service at a restaurant what should
the tip be?
Cultural footnote: An average tip for a meal in the U.S. is 15%,
which may vary depending on the quality of the service provided.
6
Tipping example: The non-fuzzy approach
• Tip = 15% of total bill
• What about quality of service?
7
Tipping example: The non-fuzzy approach
• Tip = linearly proportional to service from 5% to 25%
tip = 0.20/10*service+0.05
• What about quality of the food?
8
Tipping example: Extended
• The Extended Tipping Problem: Given a number between 0 and
10 that represents the quality of service and the quality of the food,
at a restaurant, what should the tip be?
How will this affect our tipping formula?
9
Tipping example: The non-fuzzy approach
• Tip = 0.20/20*(service+food)+0.05
• We want service to be more important than food quality. E.g., 80% for
service and 20% for food.
10
Tipping example: The non-fuzzy approach
• Tip = servRatio*(.2/10*(service)+.05) + servRatio = 80%
(1-servRatio)*(.2/10*(food)+0.05);
• Seems too linear. Want 15% tip in general and deviation only for
exceptionally good or bad service.
11
Tipping example: The non-fuzzy approach
if service < 3,
tip(f+1,s+1) = servRatio*(.1/3*(s)+.05) + ...
(1-servRatio)*(.2/10*(f)+0.05);
elseif s < 7,
tip(f+1,s+1) = servRatio*(.15) + ...
(1-servRatio)*(.2/10*(f)+0.05);
else,
tip(f+1,s+1) = servRatio*(.1/3*(s-7)+.15) + ...
(1-servRatio)*(.2/10*(f)+0.05);
end;
CS 561, Sessions 20-21 12
Tipping example: The non-fuzzy approach
Nice plot but
• ‘Complicated’ function
• Not easy to modify
• Not intuitive
• Many hard-coded parameters
• Not easy to understand
13
Tipping problem: the fuzzy approach
What we want to express is:
1. If service is poor then tip is cheap
2. If service is good the tip is average
3. If service is excellent then tip is generous
4. If food is rancid then tip is cheap
5. If food is delicious then tip is generous
or
1. If service is poor or the food is rancid then tip is cheap
2. If service is good then tip is average
3. If service is excellent or food is delicious then tip is generous
We have just defined the rules for a fuzzy logic system.
14
Tipping problem: fuzzy solution
Decision function generated using the 3 rules.
15
Tipping problem: fuzzy solution
• Before we have a fuzzy solution we need to find out
a) how to define terms such as poor, delicious, cheap, generous etc.
b) how to combine terms using AND, OR and other connectives
c) how to combine all the rules into one final output
16
Fuzzy sets
• Boolean/Crisp set A is a mapping for the elements of S to
the set {0, 1}, i.e., A: S  {0, 1}
• Characteristic function:
A(x) = {1 if x is an element of set A
0 if x is not an element of set A
• Fuzzy set F is a mapping for the elements of S to the interval
[0, 1], i.e., F: S  [0, 1]
• Characteristic function: 0  F(x)  1
• 1 means full membership, 0 means no membership and anything in
between, e.g., 0.5 is called graded membership
17
Fuzzy Sets (contd.)
• fuzzy set A
• A = {(x, µA(x))| x Є X} where µA(x) is called the membership
function for the fuzzy set A. X is referred to as the universe of
discourse.
• The membership function associates each element x Є X with a
value in the interval [0,1].
18
Example: Crisp set Tall
• Fuzzy sets and concepts are commonly used in natural language
John is tall
Dan is smart
Alex is happy
The class is hot
• E.g., the crisp set Tall can be defined as {x | height x > 1.8 meters}
But what about a person with a height = 1.79 meters?
What about 1.78 meters?
…
What about 1.52 meters?
19
Example: Fuzzy set Tall
• In a fuzzy set a person with a height of 1.8 meters would be
considered tall to a high degree
A person with a height of 1.7 meters would be considered tall to a
lesser degree etc.
• The function can change
for basketball players,
Danes, women,
children etc.
20
Membership functions: S-function
• The S-function can be used to define fuzzy sets
• S(x, a, b, c) =
• 0 for x  a
• 2(x-a/c-a)2 for a  x  b
• 1 – 2(x-c/c-a)2 for b  x  c
• 1 for x  c
a b c
21
Membership functions of one dimension
• These membership functions are some of the commonly used
membership functions in the fuzzy inference systems.
• Triangle(x; a, b, c) = 0 if x  a;
= (x-a)/(b-a) if a  x  b;
= (c-b)/(c-b) if b  x  c;
= 0 if c  x.
• Trapezoid(x; a, b, c, d) = 0 if x  a;
= (x-a)/(b-a) if a  x  b;
= 1 if b  x  c;
= (d-x)/(d-c) 0 if c  x  d;
= 0, if d  x.
• Sigmoid(x; a, c) = 1/(1 + exp[-a(x-c)]) where a controls slope at
the crossover point x = c.
22
Membership functions of two dimensions
• One dimensional fuzzy set can be extended to form its cylindrical
extension on second dimension
• Fuzzy set A = “(x,y) is near (3,4)” is
• µA(x,y) = exp[- ((x-3)/2)2 -(y-4)2 ]
= exp[- ((x-3)/2)2 ] exp -(y-4)2 ]
=gaussian(x;3,2)gaussian(y;4,1)
• This is a composite MF since it can be decomposed into two
gaussian MFs
23
Membership functions: P-Function
• P(x, a, b) =
• S(x, b-a, b-a/2, b) for x  b
• 1 – S(x, b, b+a/2, a+b) for x  b
E.g., close (to a)
b-a b+a/2b-a/2 b+a
a
a
24
Simple membership functions
• Piecewise linear: triangular etc.
• Easier to represent and calculate  saves computation
25
Other representations of fuzzy sets
• A finite set of elements:
F = 1/x1 + 2/x2 + … n/xn
+ means (Boolean) set union
• For example:
TALL = {0/1.0, 0/1.2, 0/1.4, 0.2/1.6, 0.8/1.7, 1.0/1.8}
26
Fuzzy sets with a discrete universe
• Let X = {0, 1, 2, 3, 4, 5, 6} be a set of numbers of children a family
may possibly have.
• fuzzy set A with “sensible number of children in a family” may be
described by
• A = {(0, 0.1), (1, 0.3), (2, 0.7), (3, 1), (4, 0.7), (5, 0.3), (6, 0.1)}
27
Fuzzy sets with a continuous universe
• X = R+ be the set of possible ages for human beings.
• fuzzy set B = “about 50 years old” may be expressed as
• B = {(x, µB(x)) | x Є X}, where
• µB(x) = 1/(1 + ((x-50)/10)4)
28
We use the following notation to describe fuzzy sets.
• A = Σ xi Є X µA(xi)/ xi, if X is a collection of discrete objects,
• A = ∫X µA(x)/ x, if X is a continuous space.
29
Fuzzy set operators
• Equality
A = B
A (x) = B (x) for all x  X
• Complement
A’
A’ (x) = 1 - A(x) for all x  X
• Containment
A  B
A (x)  B (x) for all x  X
• Union
A B
A  B (x) = max(A (x), B (x)) for all x  X
• Intersection
A  B
A  B (x) = min(A (x), B (x)) for all x  X
30
• Support(A) is set of all points x in X such that
• {(x, µA(x)) | µA(x) > 0 }
• core(A) is set of all points x in X such that
• {(x, µA(x)) | µA(x) =1 }
• Fuzzy set whose support is a single point in X with µA(x) =1 is
called fuzzy singleton
31
• Crossover point of a fuzzy set A is a point x in X such that
• {(x, µA(x)) | µA(x) = 0.5 }
• α-cut of a fuzzy set A is set of all points x in X such that
• {(x, µA(x)) | µA(x) ≥ α }
32
Example fuzzy set operations
A’
A  B A  B
A B
A
33
Linguistic Hedges
• Modifying the meaning of a fuzzy set using hedges such as very,
more or less, slightly, etc.
• Concentration or Con operator
• Very F = F2
• Dilation or Dil operator
• More or less F = F1/2
• more or less tall
= DIL(old);
• extremely tall
= CON(CON(CON(old)))
• etc.
tall
More or less tall
Very tall
34
Fuzzy inference
• Fuzzy logical operations
• Fuzzy rules
• Fuzzification
• Implication
• Aggregation
• Defuzzification
35
Fuzzy logical operations
• AND, OR, NOT, etc.
• NOT A = A’ = 1 - A(x)
• A AND B = A  B = min(A (x), B (x))
• A OR B = A  B = max(A (x), B (x))
A B A and B
0 0 0
0 1 0
1 0 0
1 1 1
A B A or B
0 0 0
0 1 1
1 0 1
1 1 1
A not A
0 1
1 0
1-Amax(A,B)min(A,B)
From the following
truth tables it is
seen that fuzzy
logic is a superset
of Boolean logic.
36
If-Then Rules
• Use fuzzy sets and fuzzy operators as the subjects and verbs of
fuzzy logic to form rules.
if x is A then y is B
where A and B are linguistic terms defined by fuzzy sets on the sets
X and Y respectively.
This reads
if x == A then y = B
37
Evaluation of fuzzy rules
• In Boolean logic: p  q
if p is true then q is true
• In fuzzy logic: p  q
if p is true to some degree then q is true to some degree.
0.5p => 0.5q (partial premise implies partially)
• How?
CS 561, Sessions 20-21 38
Evaluation of fuzzy rules (cont’d)
• Apply implication function to the rule
• Most common way is to use min to “chop-off” the consequent
(prod can be used to scale the consequent)
39
Summary: If-Then rules
1. Fuzzify inputs
Determine the degree of membership for all terms in the premise.
If there is one term then this is the degree of support for the
consequent.
2. Apply fuzzy operator
If there are multiple parts, apply logical operators to determine the
degree of support for the rule.
3. Apply implication method
Use degree of support for rule to shape output fuzzy set of the
consequent.
How do we then combine several rules?
40
Multiple rules
• We aggregate the outputs into a single fuzzy set which combines their
decisions.
• The input to aggregation is the list of truncated fuzzy sets and the
output is a single fuzzy set for each variable.
• Aggregation rules: max, sum, etc.
• As long as it is commutative then the order of rule exec is irrelevant.
41
max-min rule of composition
• Given N observations Ei over X and hypothesis Hi over Y we have N
rules:
if E1 then H1
if E2 then H2
if EN then HN
• H = max[min(E1), min(E2), … min(EN)]
42
Defuzzify the output
• Take a fuzzy set and produce a single crisp number that represents
the set.
• Practical when making a decision, taking an action etc.
 I x
 I
Center of largest area
Center of gravity
I=
CS 561, Sessions 20-21 43
Tip = 16.7 %
Result of defuzzification
(centroid)
Fuzzyinferenceoverview
44
Limitations of fuzzy logic
• How to determine the membership functions? Usually requires fine-
tuning of parameters
• Defuzzification can produce undesired results
45
Fuzzy tools and shells
• Matlab’s Fuzzy Toolbox
• FuzzyClips
• Etc.
46
General Fuzzified Applications
• Quality Assurance
• Error Diagnostics
• Control Theory
• Pattern Recognition
47
Specific Fuzzified Applications
• Otis Elevators
• Vacuum Cleaners
• Hair Dryers
• Air Control in Soft Drink Production
• Noise Detection on Compact Disks
• Cranes
• Electric Razors
• Camcorders
• Television Sets
• Showers
Japan, Korea, China were the early adapters of
Fuzzy Logic into industrial applications
48
Expert Fuzzified Systems
• Medical Diagnosis
• Legal
• Stock Market Analysis
• Mineral Prospecting
• Weather Forecasting
• Economics
• Politics
49
References
• Slides from CS 561 (Intro to AI) course, Sessions 20-21 of Paolo Pirjanian
• Slides from OperMgt 345 course of Mitch Pence, Boise State University
• Slides from CS623-Lec11-4Sept06, S.G.Sanjeevi of IIT Bombay.
• Fuzzy Logic. Fuzzy Logic - a powerful new technology.
http://www.austinlinks.com/Fuzzy/
• FuzzyNet On-line. Automatic Transmission
http://www.aptronix.com/fuzzynet/applnote/transmis.htm
• Garner, Martin. Weird Water and Fuzzy Logic: More notes of a Fringe
Watcher.
• Generation 5. An Introduction to Fuzzy Logic.
http://www.generation5.org/fuzzyintro.shtml
• Sowell, Thomas . FUZzy Logic For “Just Plain Folks” .
• You Fuzzin’ with me?
http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/sbaa/article1.html
• Zadeh, Lotfi A.
http://http.cs.berkeley.edu/People/Faculty/Homepages/zadeh.html
• Zadeh, L. (1965), "Fuzzy sets", Information and Control, 8: 338-353
• Jang J.S.R., (1997): ANFIS architecture. In: Neuro-fuzzy and Soft
Computing (J.S. Jang, C.-T. Sun, E. Mizutani, Eds.), Prentice Hall, New
50
An Example
The following, illustrates a basic “fuzzy” automatic transmission
system. The transmission uses four fuzzy sensor inference
inputs to control the best gear selection for the given conditions.
The inputs are throttle, vehicle speed, engine speed and engine
load.
51
An Example (cont.)
Labels and Membership Functions of Throttle.
52
An Example (cont.)
Labels and Membership Functions of vehicle speed.
53
An Example (cont.)
Labels and Membership Functions of engine speed.
54
An Example (cont.)
Labels and Membership Functions of engine load.
55
An Example (cont.)
Labels and Membership Functions of shift.
56
An Example (cont.)
Using the labels as defined in the previous slides, rules can be
written for the fuzzy interface unit shown earlier. The rules provide
a tangible knowledge base required for the decision process and
are represented as English like if-then statements.
57
An Example (cont.)
To create the fuzzy interface unit, rules such as the following would
be developed to facilitate the automatic shifting of the vehicle.
If vehicle speed is low, variation of vehicle speed is small, slope
resistance is positive large and accelerator is medium then mode is
steep uphill mode.
If vehicle speed is medium, variation of vehicle speed is small, slope
resistance is negative large and accelerator is small then mode is
gentle downhill mode.
58
An Example (cont.)
If Mode is Steep uphill mode, the Shift is No. 2
If Mode is Gentle downhill mode, then Shift is No. 3
The previous slides illustrate how fuzzy logic can provide a powerful
tool when addressing complex situations that are not feasible using
conventional approaches. By employing fuzzy logic, we have the
ability to include additional variables and rules to take into account
factors that might improve the behavior of the control system.
* See reference (see notes):
http://www.aptronix.com/fuzzynet/applnote/transmis.htm
59
Binary fuzzy relation
• A binary fuzzy relation is a fuzzy set in X × Y which maps each
element in X × Y to a membership value between 0 and 1. If X and
Y are two universes of discourse, then
• R = {((x,y), R(x, y)) | (x,y) Є X × Y } is a binary fuzzy relation in X
× Y.
• X × Y indicates cartesian product of X and Y
60
Fuzzy Rules
• Fuzzy rules are useful for modeling human thinking, perception and
judgment.
• A fuzzy if-then rule is of the form “If x is A then y is B” where A
and B are linguistic values defined by fuzzy sets on universes of
discourse X and Y, respectively.
• “x is A” is called antecedent and “y is B” is called consequent.
61
Fuzzy relations
• A fuzzy relation for N sets is defined as an extension of the crisp
relation to include the membership grade.
R = {R(x1, x2, … xN)/(x1, x2, … xN) | xi  X, i=1, … N}
which associates the membership grade, R , of each tuple.
• E.g.
Friend = {0.9/(Manos, Nacho), 0.1/(Manos, Dan),
0.8/(Alex, Mike), 0.3/(Alex, John)}
62
Fuzzy intersection and Union
• AB = T(A(x), B(x)) where T is T-norm operator. There are some
possible T-Norm operators.
• Minimum: min(a,b)=a ٨ b
• Algebraic product: ab
• Bounded product: 0 ٧ (a+b-1)
63
• C(x) = AB = S(A(x), B(x)) where S is called S-norm operator.
• It is also called T-conorm
• Some of the T-conorm operators
• Maximum: S(a,b) = max(a,b)
• Algebraic sum: a+b-ab
• Bounded sum: = 1 ٨(a+b)
64
Examples, for such a rule are
• If pressure is high, then volume is small.
• If the road is slippery, then driving is dangerous.
• If the fruit is ripe, then it is soft.
65
• The fuzzy rule “If x is A then y is B” may be abbreviated as A→ B
and is interpreted as A × B.
• A fuzzy if then rule may be defined (Mamdani) as a binary fuzzy
relation R on the product space X × Y.
• R = A→ B = A × B =∫X×Y A(x) T-norm B(y)/ (x,y).

More Related Content

What's hot

Heuristic search
Heuristic searchHeuristic search
Heuristic search
Soheil Khodayari
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Sanjay Santhakumar
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Biswajit Pratihari
 
Fuzzy logic ppt
Fuzzy logic pptFuzzy logic ppt
Fuzzy logic ppt
hammadhasan10
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Bhanu Poudyal
 
Fuzzy sets
Fuzzy sets Fuzzy sets
Fuzzy sets
ABSARQURESHI
 
Introduction to optimization Problems
Introduction to optimization ProblemsIntroduction to optimization Problems
combinatorics
combinatoricscombinatorics
combinatorics
Chuckie Balbuena
 
Fuzzy set and its application
Fuzzy set and its applicationFuzzy set and its application
Fuzzy set and its application
KalaivananRaja
 
Mathematical Optimisation - Fundamentals and Applications
Mathematical Optimisation - Fundamentals and ApplicationsMathematical Optimisation - Fundamentals and Applications
Mathematical Optimisation - Fundamentals and Applications
Gokul Alex
 
Fuzzy inference systems
Fuzzy inference systemsFuzzy inference systems
LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
 LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
AartiMajumdar1
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Aditya Sharma
 
Fuzzy set
Fuzzy set Fuzzy set
Fuzzy set
NilaNila16
 
Fuzzy Sets Introduction With Example
Fuzzy Sets Introduction With ExampleFuzzy Sets Introduction With Example
Fuzzy Sets Introduction With Example
raisnasir
 
Chapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy LogicChapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy Logic
Ashique Rasool
 
Fuzzy control and its applications
Fuzzy control and its applicationsFuzzy control and its applications
Fuzzy control and its applications
jeevithaelangovan
 
Fuzzy Logic
Fuzzy LogicFuzzy Logic
Fuzzy Logic
Rishikese MR
 
Np complete
Np completeNp complete
Chpt9 patternmatching
Chpt9 patternmatchingChpt9 patternmatching
Chpt9 patternmatching
dbhanumahesh
 

What's hot (20)

Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy logic ppt
Fuzzy logic pptFuzzy logic ppt
Fuzzy logic ppt
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy sets
Fuzzy sets Fuzzy sets
Fuzzy sets
 
Introduction to optimization Problems
Introduction to optimization ProblemsIntroduction to optimization Problems
Introduction to optimization Problems
 
combinatorics
combinatoricscombinatorics
combinatorics
 
Fuzzy set and its application
Fuzzy set and its applicationFuzzy set and its application
Fuzzy set and its application
 
Mathematical Optimisation - Fundamentals and Applications
Mathematical Optimisation - Fundamentals and ApplicationsMathematical Optimisation - Fundamentals and Applications
Mathematical Optimisation - Fundamentals and Applications
 
Fuzzy inference systems
Fuzzy inference systemsFuzzy inference systems
Fuzzy inference systems
 
LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
 LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy set
Fuzzy set Fuzzy set
Fuzzy set
 
Fuzzy Sets Introduction With Example
Fuzzy Sets Introduction With ExampleFuzzy Sets Introduction With Example
Fuzzy Sets Introduction With Example
 
Chapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy LogicChapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy Logic
 
Fuzzy control and its applications
Fuzzy control and its applicationsFuzzy control and its applications
Fuzzy control and its applications
 
Fuzzy Logic
Fuzzy LogicFuzzy Logic
Fuzzy Logic
 
Np complete
Np completeNp complete
Np complete
 
Chpt9 patternmatching
Chpt9 patternmatchingChpt9 patternmatching
Chpt9 patternmatching
 

Viewers also liked

Fuzzy logic ppt
Fuzzy logic pptFuzzy logic ppt
Fuzzy logic ppt
Priya_Srivastava
 
L4 types of membership functions
L4 types of membership functionsL4 types of membership functions
L4 types of membership functions
Mohammad Umar Rehman
 
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
guest3f9c6b
 
Kecerdasan buatan-v-2-0-bab-5-8
Kecerdasan buatan-v-2-0-bab-5-8Kecerdasan buatan-v-2-0-bab-5-8
Kecerdasan buatan-v-2-0-bab-5-8Alvin Setiawan
 
Anfis.rpi04
Anfis.rpi04Anfis.rpi04
Anfis.rpi04
Modem Narayana
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relations
naugariya
 
Sentence semantics
Sentence semanticsSentence semantics
Sentence semantics
Hywel Evans
 
Fuzzy logic systems
Fuzzy logic systemsFuzzy logic systems
Fuzzy logic systems
Pham Tung
 
Fuzzy Logic in the Real World
Fuzzy Logic in the Real WorldFuzzy Logic in the Real World
Fuzzy Logic in the Real World
BCSLeicester
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Babu Appat
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
garima931
 
Fuzzy logic application (aircraft landing)
Fuzzy logic application (aircraft landing)Fuzzy logic application (aircraft landing)
Fuzzy logic application (aircraft landing)
Piyumal Samarathunga
 
Fingerprint
FingerprintFingerprint
Fingerprint
Neeraj Gupta
 
Topic 8 expert system
Topic 8 expert systemTopic 8 expert system
Topic 8 expert system
Noreliana Md Sharif
 
Application of fuzzy logic
Application of fuzzy logicApplication of fuzzy logic
Application of fuzzy logic
Viraj Patel
 

Viewers also liked (15)

Fuzzy logic ppt
Fuzzy logic pptFuzzy logic ppt
Fuzzy logic ppt
 
L4 types of membership functions
L4 types of membership functionsL4 types of membership functions
L4 types of membership functions
 
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
Fuzzy Logic And Application Jntu Model Paper{Www.Studentyogi.Com}
 
Kecerdasan buatan-v-2-0-bab-5-8
Kecerdasan buatan-v-2-0-bab-5-8Kecerdasan buatan-v-2-0-bab-5-8
Kecerdasan buatan-v-2-0-bab-5-8
 
Anfis.rpi04
Anfis.rpi04Anfis.rpi04
Anfis.rpi04
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relations
 
Sentence semantics
Sentence semanticsSentence semantics
Sentence semantics
 
Fuzzy logic systems
Fuzzy logic systemsFuzzy logic systems
Fuzzy logic systems
 
Fuzzy Logic in the Real World
Fuzzy Logic in the Real WorldFuzzy Logic in the Real World
Fuzzy Logic in the Real World
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Fuzzy logic application (aircraft landing)
Fuzzy logic application (aircraft landing)Fuzzy logic application (aircraft landing)
Fuzzy logic application (aircraft landing)
 
Fingerprint
FingerprintFingerprint
Fingerprint
 
Topic 8 expert system
Topic 8 expert systemTopic 8 expert system
Topic 8 expert system
 
Application of fuzzy logic
Application of fuzzy logicApplication of fuzzy logic
Application of fuzzy logic
 

Similar to Fuzzy logicintro by

Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
MeghaSharma513
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
michaelaaron25322
 
Unit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdfUnit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdf
Ramya Nellutla
 
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
saadurrehman35
 
Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptx
ImXaib
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
blaircomp2003
 
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
Divya Bhatia
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th Sem
DigiGurukul
 
It is known as two-valued logic because it have only two values
It is known as two-valued logic because it have only two values It is known as two-valued logic because it have only two values
It is known as two-valued logic because it have only two values
Ramjeet Singh Yadav
 
Fuzzy logic-introduction
Fuzzy logic-introductionFuzzy logic-introduction
Fuzzy logic-introduction
WBUTTUTORIALS
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series edited
Prof Dr S.M.Aqil Burney
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with Implementation
Bhaumik Parmar
 
AP Advantage: AP Calculus
AP Advantage: AP CalculusAP Advantage: AP Calculus
AP Advantage: AP Calculus
Shashank Patil
 
Linear Regression.pptx
Linear Regression.pptxLinear Regression.pptx
Linear Regression.pptx
nathansel1
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
AdPatel5
 
Normalization.pdf
Normalization.pdfNormalization.pdf
Normalization.pdf
abhijose1
 
Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
Purnima Pandit
 
Machine learning mathematicals.pdf
Machine learning mathematicals.pdfMachine learning mathematicals.pdf
Machine learning mathematicals.pdf
King Khalid University
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment help
HomeworkAssignmentHe
 
Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
SHIMI S L
 

Similar to Fuzzy logicintro by (20)

Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
 
Unit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdfUnit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdf
 
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
 
Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptx
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th Sem
 
It is known as two-valued logic because it have only two values
It is known as two-valued logic because it have only two values It is known as two-valued logic because it have only two values
It is known as two-valued logic because it have only two values
 
Fuzzy logic-introduction
Fuzzy logic-introductionFuzzy logic-introduction
Fuzzy logic-introduction
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series edited
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with Implementation
 
AP Advantage: AP Calculus
AP Advantage: AP CalculusAP Advantage: AP Calculus
AP Advantage: AP Calculus
 
Linear Regression.pptx
Linear Regression.pptxLinear Regression.pptx
Linear Regression.pptx
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Normalization.pdf
Normalization.pdfNormalization.pdf
Normalization.pdf
 
Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
 
Machine learning mathematicals.pdf
Machine learning mathematicals.pdfMachine learning mathematicals.pdf
Machine learning mathematicals.pdf
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment help
 
Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
 

Recently uploaded

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
Unit -II Spectroscopy - EC I B.Tech.pdf
Unit -II Spectroscopy - EC  I B.Tech.pdfUnit -II Spectroscopy - EC  I B.Tech.pdf
Unit -II Spectroscopy - EC I B.Tech.pdf
TeluguBadi
 
Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...
pvpriya2
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
MuhammadJazib15
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
Dwarkadas J Sanghvi College of Engineering
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
b0754201
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
wafawafa52
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
snaprevwdev
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
AlvianRamadhani5
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
Paris Salesforce Developer Group
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
 

Recently uploaded (20)

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Unit -II Spectroscopy - EC I B.Tech.pdf
Unit -II Spectroscopy - EC  I B.Tech.pdfUnit -II Spectroscopy - EC  I B.Tech.pdf
Unit -II Spectroscopy - EC I B.Tech.pdf
 
Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
 

Fuzzy logicintro by

  • 1. 1 Fuzzy Logic and Fuzzy Inference • Why use fuzzy logic? • Tipping example • Fuzzy set theory • Fuzzy inference
  • 2. 2 What is fuzzy logic? • A super set of Boolean logic • Builds upon fuzzy set theory • Graded truth. Truth values between True and False. Not everything is either/or, true/false, black/white, on/off etc. • Grades of membership. Class of tall men, class of far cities, class of expensive things, etc. • Lotfi Zadeh, UC/Berkely 1965. Introduced FL to model uncertainty in natural language. Tall, far, nice, large, hot, … • Reasoning using linguistic terms. Natural to express expert knowledge. If the weather is cold then wear warm clothing
  • 3. 3 Fuzzy logic – A Definition • Fuzzy logic provides a method to formalize reasoning when dealing with vague terms. • Traditional computing requires finite precision which is not always possible in real world scenarios. Not every decision is either true or false, or as with Boolean logic either 0 or 1. • Fuzzy logic allows for membership functions, or degrees of truthfulness and falsehoods. Or as with Boolean logic, not only 0 and 1 but all the numbers that fall in between.
  • 4. 4 Why use fuzzy logic? Pros: • Conceptually easy to understand w/ “natural” maths • Tolerant of imprecise data • Universal approximation: can model arbitrary nonlinear functions • Intuitive • Based on linguistic terms • Convenient way to express expert and common sense knowledge Cons: • Not a cure-all • Crisp/precise models can be more efficient and even convenient • Other approaches might be formally verified to work
  • 5. 5 Tipping example • The Basic Tipping Problem: Given a number between 0 and 10 that represents the quality of service at a restaurant what should the tip be? Cultural footnote: An average tip for a meal in the U.S. is 15%, which may vary depending on the quality of the service provided.
  • 6. 6 Tipping example: The non-fuzzy approach • Tip = 15% of total bill • What about quality of service?
  • 7. 7 Tipping example: The non-fuzzy approach • Tip = linearly proportional to service from 5% to 25% tip = 0.20/10*service+0.05 • What about quality of the food?
  • 8. 8 Tipping example: Extended • The Extended Tipping Problem: Given a number between 0 and 10 that represents the quality of service and the quality of the food, at a restaurant, what should the tip be? How will this affect our tipping formula?
  • 9. 9 Tipping example: The non-fuzzy approach • Tip = 0.20/20*(service+food)+0.05 • We want service to be more important than food quality. E.g., 80% for service and 20% for food.
  • 10. 10 Tipping example: The non-fuzzy approach • Tip = servRatio*(.2/10*(service)+.05) + servRatio = 80% (1-servRatio)*(.2/10*(food)+0.05); • Seems too linear. Want 15% tip in general and deviation only for exceptionally good or bad service.
  • 11. 11 Tipping example: The non-fuzzy approach if service < 3, tip(f+1,s+1) = servRatio*(.1/3*(s)+.05) + ... (1-servRatio)*(.2/10*(f)+0.05); elseif s < 7, tip(f+1,s+1) = servRatio*(.15) + ... (1-servRatio)*(.2/10*(f)+0.05); else, tip(f+1,s+1) = servRatio*(.1/3*(s-7)+.15) + ... (1-servRatio)*(.2/10*(f)+0.05); end;
  • 12. CS 561, Sessions 20-21 12 Tipping example: The non-fuzzy approach Nice plot but • ‘Complicated’ function • Not easy to modify • Not intuitive • Many hard-coded parameters • Not easy to understand
  • 13. 13 Tipping problem: the fuzzy approach What we want to express is: 1. If service is poor then tip is cheap 2. If service is good the tip is average 3. If service is excellent then tip is generous 4. If food is rancid then tip is cheap 5. If food is delicious then tip is generous or 1. If service is poor or the food is rancid then tip is cheap 2. If service is good then tip is average 3. If service is excellent or food is delicious then tip is generous We have just defined the rules for a fuzzy logic system.
  • 14. 14 Tipping problem: fuzzy solution Decision function generated using the 3 rules.
  • 15. 15 Tipping problem: fuzzy solution • Before we have a fuzzy solution we need to find out a) how to define terms such as poor, delicious, cheap, generous etc. b) how to combine terms using AND, OR and other connectives c) how to combine all the rules into one final output
  • 16. 16 Fuzzy sets • Boolean/Crisp set A is a mapping for the elements of S to the set {0, 1}, i.e., A: S  {0, 1} • Characteristic function: A(x) = {1 if x is an element of set A 0 if x is not an element of set A • Fuzzy set F is a mapping for the elements of S to the interval [0, 1], i.e., F: S  [0, 1] • Characteristic function: 0  F(x)  1 • 1 means full membership, 0 means no membership and anything in between, e.g., 0.5 is called graded membership
  • 17. 17 Fuzzy Sets (contd.) • fuzzy set A • A = {(x, µA(x))| x Є X} where µA(x) is called the membership function for the fuzzy set A. X is referred to as the universe of discourse. • The membership function associates each element x Є X with a value in the interval [0,1].
  • 18. 18 Example: Crisp set Tall • Fuzzy sets and concepts are commonly used in natural language John is tall Dan is smart Alex is happy The class is hot • E.g., the crisp set Tall can be defined as {x | height x > 1.8 meters} But what about a person with a height = 1.79 meters? What about 1.78 meters? … What about 1.52 meters?
  • 19. 19 Example: Fuzzy set Tall • In a fuzzy set a person with a height of 1.8 meters would be considered tall to a high degree A person with a height of 1.7 meters would be considered tall to a lesser degree etc. • The function can change for basketball players, Danes, women, children etc.
  • 20. 20 Membership functions: S-function • The S-function can be used to define fuzzy sets • S(x, a, b, c) = • 0 for x  a • 2(x-a/c-a)2 for a  x  b • 1 – 2(x-c/c-a)2 for b  x  c • 1 for x  c a b c
  • 21. 21 Membership functions of one dimension • These membership functions are some of the commonly used membership functions in the fuzzy inference systems. • Triangle(x; a, b, c) = 0 if x  a; = (x-a)/(b-a) if a  x  b; = (c-b)/(c-b) if b  x  c; = 0 if c  x. • Trapezoid(x; a, b, c, d) = 0 if x  a; = (x-a)/(b-a) if a  x  b; = 1 if b  x  c; = (d-x)/(d-c) 0 if c  x  d; = 0, if d  x. • Sigmoid(x; a, c) = 1/(1 + exp[-a(x-c)]) where a controls slope at the crossover point x = c.
  • 22. 22 Membership functions of two dimensions • One dimensional fuzzy set can be extended to form its cylindrical extension on second dimension • Fuzzy set A = “(x,y) is near (3,4)” is • µA(x,y) = exp[- ((x-3)/2)2 -(y-4)2 ] = exp[- ((x-3)/2)2 ] exp -(y-4)2 ] =gaussian(x;3,2)gaussian(y;4,1) • This is a composite MF since it can be decomposed into two gaussian MFs
  • 23. 23 Membership functions: P-Function • P(x, a, b) = • S(x, b-a, b-a/2, b) for x  b • 1 – S(x, b, b+a/2, a+b) for x  b E.g., close (to a) b-a b+a/2b-a/2 b+a a a
  • 24. 24 Simple membership functions • Piecewise linear: triangular etc. • Easier to represent and calculate  saves computation
  • 25. 25 Other representations of fuzzy sets • A finite set of elements: F = 1/x1 + 2/x2 + … n/xn + means (Boolean) set union • For example: TALL = {0/1.0, 0/1.2, 0/1.4, 0.2/1.6, 0.8/1.7, 1.0/1.8}
  • 26. 26 Fuzzy sets with a discrete universe • Let X = {0, 1, 2, 3, 4, 5, 6} be a set of numbers of children a family may possibly have. • fuzzy set A with “sensible number of children in a family” may be described by • A = {(0, 0.1), (1, 0.3), (2, 0.7), (3, 1), (4, 0.7), (5, 0.3), (6, 0.1)}
  • 27. 27 Fuzzy sets with a continuous universe • X = R+ be the set of possible ages for human beings. • fuzzy set B = “about 50 years old” may be expressed as • B = {(x, µB(x)) | x Є X}, where • µB(x) = 1/(1 + ((x-50)/10)4)
  • 28. 28 We use the following notation to describe fuzzy sets. • A = Σ xi Є X µA(xi)/ xi, if X is a collection of discrete objects, • A = ∫X µA(x)/ x, if X is a continuous space.
  • 29. 29 Fuzzy set operators • Equality A = B A (x) = B (x) for all x  X • Complement A’ A’ (x) = 1 - A(x) for all x  X • Containment A  B A (x)  B (x) for all x  X • Union A B A  B (x) = max(A (x), B (x)) for all x  X • Intersection A  B A  B (x) = min(A (x), B (x)) for all x  X
  • 30. 30 • Support(A) is set of all points x in X such that • {(x, µA(x)) | µA(x) > 0 } • core(A) is set of all points x in X such that • {(x, µA(x)) | µA(x) =1 } • Fuzzy set whose support is a single point in X with µA(x) =1 is called fuzzy singleton
  • 31. 31 • Crossover point of a fuzzy set A is a point x in X such that • {(x, µA(x)) | µA(x) = 0.5 } • α-cut of a fuzzy set A is set of all points x in X such that • {(x, µA(x)) | µA(x) ≥ α }
  • 32. 32 Example fuzzy set operations A’ A  B A  B A B A
  • 33. 33 Linguistic Hedges • Modifying the meaning of a fuzzy set using hedges such as very, more or less, slightly, etc. • Concentration or Con operator • Very F = F2 • Dilation or Dil operator • More or less F = F1/2 • more or less tall = DIL(old); • extremely tall = CON(CON(CON(old))) • etc. tall More or less tall Very tall
  • 34. 34 Fuzzy inference • Fuzzy logical operations • Fuzzy rules • Fuzzification • Implication • Aggregation • Defuzzification
  • 35. 35 Fuzzy logical operations • AND, OR, NOT, etc. • NOT A = A’ = 1 - A(x) • A AND B = A  B = min(A (x), B (x)) • A OR B = A  B = max(A (x), B (x)) A B A and B 0 0 0 0 1 0 1 0 0 1 1 1 A B A or B 0 0 0 0 1 1 1 0 1 1 1 1 A not A 0 1 1 0 1-Amax(A,B)min(A,B) From the following truth tables it is seen that fuzzy logic is a superset of Boolean logic.
  • 36. 36 If-Then Rules • Use fuzzy sets and fuzzy operators as the subjects and verbs of fuzzy logic to form rules. if x is A then y is B where A and B are linguistic terms defined by fuzzy sets on the sets X and Y respectively. This reads if x == A then y = B
  • 37. 37 Evaluation of fuzzy rules • In Boolean logic: p  q if p is true then q is true • In fuzzy logic: p  q if p is true to some degree then q is true to some degree. 0.5p => 0.5q (partial premise implies partially) • How?
  • 38. CS 561, Sessions 20-21 38 Evaluation of fuzzy rules (cont’d) • Apply implication function to the rule • Most common way is to use min to “chop-off” the consequent (prod can be used to scale the consequent)
  • 39. 39 Summary: If-Then rules 1. Fuzzify inputs Determine the degree of membership for all terms in the premise. If there is one term then this is the degree of support for the consequent. 2. Apply fuzzy operator If there are multiple parts, apply logical operators to determine the degree of support for the rule. 3. Apply implication method Use degree of support for rule to shape output fuzzy set of the consequent. How do we then combine several rules?
  • 40. 40 Multiple rules • We aggregate the outputs into a single fuzzy set which combines their decisions. • The input to aggregation is the list of truncated fuzzy sets and the output is a single fuzzy set for each variable. • Aggregation rules: max, sum, etc. • As long as it is commutative then the order of rule exec is irrelevant.
  • 41. 41 max-min rule of composition • Given N observations Ei over X and hypothesis Hi over Y we have N rules: if E1 then H1 if E2 then H2 if EN then HN • H = max[min(E1), min(E2), … min(EN)]
  • 42. 42 Defuzzify the output • Take a fuzzy set and produce a single crisp number that represents the set. • Practical when making a decision, taking an action etc.  I x  I Center of largest area Center of gravity I=
  • 43. CS 561, Sessions 20-21 43 Tip = 16.7 % Result of defuzzification (centroid) Fuzzyinferenceoverview
  • 44. 44 Limitations of fuzzy logic • How to determine the membership functions? Usually requires fine- tuning of parameters • Defuzzification can produce undesired results
  • 45. 45 Fuzzy tools and shells • Matlab’s Fuzzy Toolbox • FuzzyClips • Etc.
  • 46. 46 General Fuzzified Applications • Quality Assurance • Error Diagnostics • Control Theory • Pattern Recognition
  • 47. 47 Specific Fuzzified Applications • Otis Elevators • Vacuum Cleaners • Hair Dryers • Air Control in Soft Drink Production • Noise Detection on Compact Disks • Cranes • Electric Razors • Camcorders • Television Sets • Showers Japan, Korea, China were the early adapters of Fuzzy Logic into industrial applications
  • 48. 48 Expert Fuzzified Systems • Medical Diagnosis • Legal • Stock Market Analysis • Mineral Prospecting • Weather Forecasting • Economics • Politics
  • 49. 49 References • Slides from CS 561 (Intro to AI) course, Sessions 20-21 of Paolo Pirjanian • Slides from OperMgt 345 course of Mitch Pence, Boise State University • Slides from CS623-Lec11-4Sept06, S.G.Sanjeevi of IIT Bombay. • Fuzzy Logic. Fuzzy Logic - a powerful new technology. http://www.austinlinks.com/Fuzzy/ • FuzzyNet On-line. Automatic Transmission http://www.aptronix.com/fuzzynet/applnote/transmis.htm • Garner, Martin. Weird Water and Fuzzy Logic: More notes of a Fringe Watcher. • Generation 5. An Introduction to Fuzzy Logic. http://www.generation5.org/fuzzyintro.shtml • Sowell, Thomas . FUZzy Logic For “Just Plain Folks” . • You Fuzzin’ with me? http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/sbaa/article1.html • Zadeh, Lotfi A. http://http.cs.berkeley.edu/People/Faculty/Homepages/zadeh.html • Zadeh, L. (1965), "Fuzzy sets", Information and Control, 8: 338-353 • Jang J.S.R., (1997): ANFIS architecture. In: Neuro-fuzzy and Soft Computing (J.S. Jang, C.-T. Sun, E. Mizutani, Eds.), Prentice Hall, New
  • 50. 50 An Example The following, illustrates a basic “fuzzy” automatic transmission system. The transmission uses four fuzzy sensor inference inputs to control the best gear selection for the given conditions. The inputs are throttle, vehicle speed, engine speed and engine load.
  • 51. 51 An Example (cont.) Labels and Membership Functions of Throttle.
  • 52. 52 An Example (cont.) Labels and Membership Functions of vehicle speed.
  • 53. 53 An Example (cont.) Labels and Membership Functions of engine speed.
  • 54. 54 An Example (cont.) Labels and Membership Functions of engine load.
  • 55. 55 An Example (cont.) Labels and Membership Functions of shift.
  • 56. 56 An Example (cont.) Using the labels as defined in the previous slides, rules can be written for the fuzzy interface unit shown earlier. The rules provide a tangible knowledge base required for the decision process and are represented as English like if-then statements.
  • 57. 57 An Example (cont.) To create the fuzzy interface unit, rules such as the following would be developed to facilitate the automatic shifting of the vehicle. If vehicle speed is low, variation of vehicle speed is small, slope resistance is positive large and accelerator is medium then mode is steep uphill mode. If vehicle speed is medium, variation of vehicle speed is small, slope resistance is negative large and accelerator is small then mode is gentle downhill mode.
  • 58. 58 An Example (cont.) If Mode is Steep uphill mode, the Shift is No. 2 If Mode is Gentle downhill mode, then Shift is No. 3 The previous slides illustrate how fuzzy logic can provide a powerful tool when addressing complex situations that are not feasible using conventional approaches. By employing fuzzy logic, we have the ability to include additional variables and rules to take into account factors that might improve the behavior of the control system. * See reference (see notes): http://www.aptronix.com/fuzzynet/applnote/transmis.htm
  • 59. 59 Binary fuzzy relation • A binary fuzzy relation is a fuzzy set in X × Y which maps each element in X × Y to a membership value between 0 and 1. If X and Y are two universes of discourse, then • R = {((x,y), R(x, y)) | (x,y) Є X × Y } is a binary fuzzy relation in X × Y. • X × Y indicates cartesian product of X and Y
  • 60. 60 Fuzzy Rules • Fuzzy rules are useful for modeling human thinking, perception and judgment. • A fuzzy if-then rule is of the form “If x is A then y is B” where A and B are linguistic values defined by fuzzy sets on universes of discourse X and Y, respectively. • “x is A” is called antecedent and “y is B” is called consequent.
  • 61. 61 Fuzzy relations • A fuzzy relation for N sets is defined as an extension of the crisp relation to include the membership grade. R = {R(x1, x2, … xN)/(x1, x2, … xN) | xi  X, i=1, … N} which associates the membership grade, R , of each tuple. • E.g. Friend = {0.9/(Manos, Nacho), 0.1/(Manos, Dan), 0.8/(Alex, Mike), 0.3/(Alex, John)}
  • 62. 62 Fuzzy intersection and Union • AB = T(A(x), B(x)) where T is T-norm operator. There are some possible T-Norm operators. • Minimum: min(a,b)=a ٨ b • Algebraic product: ab • Bounded product: 0 ٧ (a+b-1)
  • 63. 63 • C(x) = AB = S(A(x), B(x)) where S is called S-norm operator. • It is also called T-conorm • Some of the T-conorm operators • Maximum: S(a,b) = max(a,b) • Algebraic sum: a+b-ab • Bounded sum: = 1 ٨(a+b)
  • 64. 64 Examples, for such a rule are • If pressure is high, then volume is small. • If the road is slippery, then driving is dangerous. • If the fruit is ripe, then it is soft.
  • 65. 65 • The fuzzy rule “If x is A then y is B” may be abbreviated as A→ B and is interpreted as A × B. • A fuzzy if then rule may be defined (Mamdani) as a binary fuzzy relation R on the product space X × Y. • R = A→ B = A × B =∫X×Y A(x) T-norm B(y)/ (x,y).