8/13/2019 Siti Zaiton - Fuzzy1
1/48
FUZZY LOGIC & FUZZY SETS
Siti Zaiton Mohd Hashim, PhD
8/13/2019 Siti Zaiton - Fuzzy1
2/48
2
Fuzzy logicFuzzy logic
Introduction:Introduction: what is fuzzy thinking?what is fuzzy thinking?
Fuzzy setsFuzzy sets
Linguistic variables and hedgesLinguistic variables and hedges
Operations of fuzzy setsOperations of fuzzy sets
Fuzzy rulesFuzzy rules
SummarySummary
8/13/2019 Siti Zaiton - Fuzzy1
3/48
3
What is fuzzy thinking?What is fuzzy thinking?
Experts rely onExperts rely on common sensecommon sense when they solvewhen they solveproblems.problems.
How can we represent expert knowledge thatHow can we represent expert knowledge that
uses vague and ambiguous terms in a computer?uses vague and ambiguous terms in a computer?
Fuzzy logic is not logic that is fuzzy, but logic thatFuzzy logic is not logic that is fuzzy, but logic that
is used to describe fuzziness. Fuzzy logic is theis used to describe fuzziness. Fuzzy logic is the
theory of fuzzy sets, sets that calibrate vagueness.theory of fuzzy sets, sets that calibrate vagueness.
Fuzzy logic is based on the idea that all thingsFuzzy logic is based on the idea that all thingsadmit of degrees. Temperature, height, speed,admit of degrees. Temperature, height, speed,
distance, beautydistance, beauty all come on a sliding scale. Theall come on a sliding scale. The
motor is runningmotor is running really hotreally hot. Tom is a. Tom is a very tallvery tall guy.guy.
8/13/2019 Siti Zaiton - Fuzzy1
4/48
4
Boolean logic uses sharp distinctions. It forces usBoolean logic uses sharp distinctions. It forces us
to draw lines between members of a class and nonto draw lines between members of a class and non--
members. For instance, we may say, Tom is tallmembers. For instance, we may say, Tom is tall
because his height is 181 cm. If we drew a line atbecause his height is 181 cm. If we drew a line at
180 cm, we would find that David, who is 179 cm,180 cm, we would find that David, who is 179 cm,
is short. Is David really a short man or we haveis short. Is David really a short man or we have
just drawn an arbitrary line in the sand?just drawn an arbitrary line in the sand?
Fuzzy logic reflects how people think. It attemptsFuzzy logic reflects how people think. It attemptsto model our sense of words, our decision makingto model our sense of words, our decision making
and our common sense. As a result, it is leading toand our common sense. As a result, it is leading to
new, more human, intelligent systems.new, more human, intelligent systems.
8/13/2019 Siti Zaiton - Fuzzy1
5/48
5
In 1965In 1965 LotfiLotfi ZadehZadeh, published his famous paper, published his famous paper
Fuzzy sets.Fuzzy sets.
ZadehZadeh extended the work on possibility theory intoextended the work on possibility theory into
a formal system of mathematical logic, anda formal system of mathematical logic, and
introduced a new concept for applying naturalintroduced a new concept for applying natural
language terms.language terms.
This new logic for representing and manipulatingThis new logic for representing and manipulatingfuzzy terms was calledfuzzy terms was called fuzzy logicfuzzy logic, and, and ZadehZadeh
became thebecame the Master/FatherMaster/Father ofoffuzzy logicfuzzy logic..
8/13/2019 Siti Zaiton - Fuzzy1
6/48
6
Why fuzzy?Why fuzzy?
AsAs ZadehZadeh said, the term is concrete, immediate andsaid, the term is concrete, immediate and
descriptive.descriptive. However, many people in the WestHowever, many people in the West
were repelled by the wordwere repelled by the wordfuzzyfuzzy, because it is, because it isusually used in a negative sense.usually used in a negative sense.
Why logic?Why logic?
Fuzziness rests on fuzzy set theory, and fuzzy logicFuzziness rests on fuzzy set theory, and fuzzy logicis just a small part of that theory.is just a small part of that theory. ZadehZadeh used theused the
term fuzzy logic in a broader sense.term fuzzy logic in a broader sense.
8/13/2019 Siti Zaiton - Fuzzy1
7/48
7
Fuzzy logic is a set of mathematical principlesFuzzy logic is a set of mathematical principles
for knowledge representation based on degreesfor knowledge representation based on degrees
of membershipof membership rather than on crisp membership ofrather than on crisp membership of
classical binary logicclassical binary logic..
Unlike twoUnlike two--valued Boolean logic, fuzzy logic isvalued Boolean logic, fuzzy logic is
multimulti--valuedvalued. It deals with. It deals with degrees ofdegrees of
membershipmembership andand degrees of truthdegrees of truth..
What is fuzzy logic?What is fuzzy logic?
8/13/2019 Siti Zaiton - Fuzzy1
8/48
8
Range of logical values inRange of logical values in
Boolean and fuzzy logicBoolean and fuzzy logic
(a) Boolean Logic. (b) Multi-valued Logic.
0 1 10 0.2 0.4 0.6 0.8 100 1 10
Fuzzy logic uses the continuum of logical values between 0Fuzzy logic uses the continuum of logical values between 0
(completely false) and 1 (completely true).(completely false) and 1 (completely true).Instead of just black and white, it employs the spectrum ofInstead of just black and white, it employs the spectrum of
colours, accepting that things can be partly true and partlycolours, accepting that things can be partly true and partly
false at the same time.false at the same time.
8/13/2019 Siti Zaiton - Fuzzy1
9/48
9
Fuzzy setsFuzzy sets
The concept of aThe concept of a setset is fundamental to mathematics.is fundamental to mathematics.
Crisp set theory is governed by a logic that uses one ofCrisp set theory is governed by a logic that uses one of
only two values: true or false.only two values: true or false.
This logic cannot represent vague concepts, andThis logic cannot represent vague concepts, and
therefore fails to give the answers on the paradoxes.therefore fails to give the answers on the paradoxes.
In fuzzy set theory: an element is with a certain degreeIn fuzzy set theory: an element is with a certain degree
of membership.of membership.
Thus, a proposition is not either true or false, butThus, a proposition is not either true or false, butmay be partly true (or partly false) to any degree.may be partly true (or partly false) to any degree.
This degree is usually taken as a real number in theThis degree is usually taken as a real number in the
interval [0,1].interval [0,1].
8/13/2019 Siti Zaiton - Fuzzy1
10/48
10
The classical example in fuzzy sets isThe classical example in fuzzy sets is tall mentall men. The. Theelements of the fuzzy set tall men are all men,elements of the fuzzy set tall men are all men,
but their degrees of membership depend on theirbut their degrees of membership depend on their
height.height.D e g re e o f M e m b e rs h ip
F u zzy
M a r k
J o h n
T o m
B o b
B i ll
1
1
1
00
1 . 0 0
1 . 0 0
0 . 9 8
0 . 8 2
0 . 7 8
Pe t e r
S t e v e n
M ik eD a v i d
C h r i s
C ris p
1
0
0
0
0
0 . 2 4
0 . 1 5
0 . 0 6
0 . 0 1
0 . 0 0
N a m e H e ig h t, c m
2 0 5
1 9 8
1 8 1
1 6 7
1 5 5
1 5 2
1 5 8
1 7 21 7 9
2 0 8
8/13/2019 Siti Zaiton - Fuzzy1
11/48
11
D e g re e o f M e m b e rs h ip
F u zzy
M a r k
J o h n
T o m
B o b
B i ll
1
1
1
0
0
1 . 0 0
1 . 0 0
0 . 9 8
0 . 8 2
0 . 7 8
Pe t e r
S t e v e n
M ik e
D a v i d
C h r i s
C ris p
1
0
0
0
0
0 . 2 4
0 . 1 5
0 . 0 6
0 . 0 1
0 . 0 0
N a m e H e ig h t, c m
2 0 5
1 9 8
1 8 1
1 6 7
1 5 5
1 5 2
1 5 8
1 7 2
1 7 9
2 0 8
Crisp set asks the question: Is the man tall?Crisp set asks the question: Is the man tall?
Tall men are above 180, and not tall men are below 180.Tall men are above 180, and not tall men are below 180.
Fuzzy set asks the question: How tall is the man?Fuzzy set asks the question: How tall is the man?
The tall is partial membership in the fuzzy set, Tom is 0.82The tall is partial membership in the fuzzy set, Tom is 0.82
tall.tall.
8/13/2019 Siti Zaiton - Fuzzy1
12/48
12
150 210170 180 190 200160
Height, cmDegree ofMembership
Tall Men
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160
Degree ofMembership
170
1.0
0.0
0.2
0.4
0.6
0.8
Height, cm
Fuzzy Sets
Crisp Sets
Crisp and fuzzy sets of Crisp and fuzzy sets of tall mentall men
8/13/2019 Siti Zaiton - Fuzzy1
13/48
13
TheThexx--axis represents theaxis represents the universe of discourseuniverse of discourse the range ofthe range of
all possible values applicable to a chosen variable.all possible values applicable to a chosen variable.
The variable is the mans height. According to thisThe variable is the mans height. According to this
representation, the universe of mens heights consists of all tallrepresentation, the universe of mens heights consists of all tallmen.men.
TheTheyy--axis represents theaxis represents the membership value of the fuzzy setmembership value of the fuzzy set..
The fuzzy set of The fuzzy set of tall mentall men maps height values into maps height values into
corresponding membership values.corresponding membership values.
Fuzzy sets of Fuzzy sets of tall mentall men
8/13/2019 Siti Zaiton - Fuzzy1
14/48
14
LetLetXXbe thebe the universe of discourseuniverse of discourse and its elements be denotedand its elements be denoted
asasxx. In the classical set theory,. In the classical set theory, crisp setcrisp setAA ofofXXis defined asis defined as
functionfunctionffAA((xx)) called the characteristic function ofcalled the characteristic function ofAA
ffAA((xx))::XX {{00,, 11},}, wherewhere
Ax
AxxfA
if0,
if1,)(
This set maps universeThis set maps universeXXto a set of two elements. For anyto a set of two elements. For any
elementelementxx of universeof universeXX, characteristic function, characteristic functionffAA((xx) is equal to 1) is equal to 1ififxx is an element of setis an element of setAA, and is equal to 0 if, and is equal to 0 ifxx is not an elementis not an element
ofofAA..
Crisp set definitionCrisp set definition
8/13/2019 Siti Zaiton - Fuzzy1
15/48
15
A fuzzy set is a set with fuzzy boundaries.A fuzzy set is a set with fuzzy boundaries.
In the fuzzy theory, fuzzy setIn the fuzzy theory, fuzzy setAA of universeof universeXXis definedis defined
by functionby function AA((xx) called the) called the membership functionmembership function of setof set
AA
AA((xx))::XX [[00,, 11],], wherewhere AA((xx)) == 11 ififxx isis totallytotally ininAA;;
AA((xx)) == 00 ififxx isis notnot ininAA;;
0
8/13/2019 Siti Zaiton - Fuzzy1
16/48
16
AA((xx))::XX [[00,, 11],], wherewhere AA((xx)) == 11 ififxx isis totallytotally ininAA;;
AA((xx)) == 00 ififxx isis notnot ininAA;;
0
8/13/2019 Siti Zaiton - Fuzzy1
17/48
17
How to represent a fuzzy set inHow to represent a fuzzy set in
a computer?a computer?
First, determine the membership functions.First, determine the membership functions. In In tall mentall men example, the fuzzy sets of example, the fuzzy sets of talltall,,
shortshortandand averageaverage men, can be obtained.men, can be obtained.
The universe of discourseThe universe of discourse the mens heightsthe mens heights consists of three sets:consists of three sets: shortshort,, averageaverage andand tall mentall men..
As shown in the following figure, a man who isAs shown in the following figure, a man who is
184 cm tall is a member of the184 cm tall is a member of the average menaverage men setset
with a degree of membership of 0.1, and at thewith a degree of membership of 0.1, and at thesame time, he is also a member of thesame time, he is also a member of the tall mentall men
set with a degree of 0.4.set with a degree of 0.4.
8/13/2019 Siti Zaiton - Fuzzy1
18/48
18
Crisp and fuzzy sets of short, averageCrisp and fuzzy sets of short, average
and tall menand tall men
150 210170 180 190 200160
Heig ht , cmDegree ofMembership
Tall Men
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160
Degree ofMembership
Short Average ShortTall
170
1.0
0.0
0.2
0.4
0.6
0.8
Fuzzy Sets
Crisp Sets
Short Average
Tall
Tall
8/13/2019 Siti Zaiton - Fuzzy1
19/48
19
Representation of crisp andRepresentation of crisp and
fuzzy subsetsfuzzy subsets
Fuzzy SubsetA
Fuzziness
1
0Crisp SubsetA Fuzziness
x
X(x)
Typical functions that can be used to represent a fuzzyTypical functions that can be used to represent a fuzzyset areset are sigmoid, gaussiansigmoid, gaussian andandpipi. However, these. However, these
functions increase the time of computation. Therefore,functions increase the time of computation. Therefore,
in practice, most applications usein practice, most applications use linear fit functionslinear fit functions..
8/13/2019 Siti Zaiton - Fuzzy1
20/48
20
Representation of crisp andRepresentation of crisp and
fuzzy subsetsfuzzy subsets
The above figure can be represented as aThe above figure can be represented as a fitfit--vectorvector::
tall mentall men = (0/180, 0.5/185, 1/190)= (0/180, 0.5/185, 1/190)
average menaverage men = (0/165, 1/175, 0/185)= (0/165, 1/175, 0/185)
short menshort men = (1/160, 0.5/165, 0/170)= (1/160, 0.5/165, 0/170)
8/13/2019 Siti Zaiton - Fuzzy1
21/48
21
Linguistic variablesLinguistic variables
At the root of fuzzy set theory lies the idea ofAt the root of fuzzy set theory lies the idea of
linguistic variables.linguistic variables.
A linguistic variable is a fuzzy variable.A linguistic variable is a fuzzy variable.
For example, the statement John is tall impliesFor example, the statement John is tall impliesthat the linguistic variablethat the linguistic variableJohnJohn takes thetakes the
linguistic valuelinguistic value talltall..
8/13/2019 Siti Zaiton - Fuzzy1
22/48
22
In fuzzy expert systems, linguistic variables are usedIn fuzzy expert systems, linguistic variables are used
in fuzzy rules. For example:in fuzzy rules. For example:
IFIF wind is strongwind is strong
THENTHEN sailingsailing isis goodgood
IFIF project_durationproject_duration isis longlong
THENTHEN completion_riskcompletion_risk isis highhigh
IFIF speedspeed isis slowslow
THENTHEN stopping_distancestopping_distance isis shortshort
Linguistic variablesLinguistic variables
8/13/2019 Siti Zaiton - Fuzzy1
23/48
23
The range of possible values of a linguistic variableThe range of possible values of a linguistic variable
represents the universe of discourse of that variable.represents the universe of discourse of that variable.
For example, the universe of discourse of theFor example, the universe of discourse of the
linguistic variablelinguistic variable speedspeedmight have the rangemight have the rangebetween 0 and 220 km/h and may include suchbetween 0 and 220 km/h and may include such
fuzzy subsets asfuzzy subsets as very slowvery slow,, slowslow,, mediummedium,,fastfast, and, and
very fastvery fast..
Linguistic variablesLinguistic variables
8/13/2019 Siti Zaiton - Fuzzy1
24/48
24
A linguistic variable carries with it the concept ofA linguistic variable carries with it the concept of
fuzzy set qualifiers, calledfuzzy set qualifiers, called hedgeshedges..
Hedges are terms that modify the shape of fuzzyHedges are terms that modify the shape of fuzzy
sets. They include adverbs such assets. They include adverbs such as veryvery,,somewhatsomewhat,, quitequite,,more or lessmore or less andandslightlyslightly..
Hedges in Fuzzy LogicHedges in Fuzzy Logic
8/13/2019 Siti Zaiton - Fuzzy1
25/48
25
Fuzzy sets with the hedgeFuzzy sets with the hedge veryvery
Short
Very Tall
ShortTall
Degree ofMembership
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160 170
Height, cm
Average
TallVery Short Very Tall
8/13/2019 Siti Zaiton - Fuzzy1
26/48
26
Representation of hedges inRepresentation of hedges in
fuzzy logicfuzzy logic
Hedge MathematicalExpression
A little
Slightly
Very
Extremely
Hedge MathematicalExpression
Graphical Representation
[A(x)]1.3
[A(x)]1.7
[A
(x)]2
[A(x)]3
8/13/2019 Siti Zaiton - Fuzzy1
27/48
27
Representation of hedges inRepresentation of hedges in
fuzzy logic (continued)fuzzy logic (continued)
Hedge MathematicalExpressionHedge MathematicalExpression Graphical Representation
Very very
More or less
Indeed
Somewhat
2 [A(x)]2
A(x)
A(x)
if 0 A0.5
if 0.5 < A1
1 2 [1 A(x)]2
[A(x)]4
8/13/2019 Siti Zaiton - Fuzzy1
28/48
Operations of fuzzy setsOperations of fuzzy sets
The classical set theory developed in the late 19thThe classical set theory developed in the late 19thcentury by Georg Cantor describes how crisp sets cancentury by Georg Cantor describes how crisp sets can
interact. These interactions are calledinteract. These interactions are called operationsoperations..
8/13/2019 Siti Zaiton - Fuzzy1
29/48
29
Cantors setsCantors sets
Intersection Union
Complement
Not A
A
Containment
AA
B
BA BAA B
8/13/2019 Siti Zaiton - Fuzzy1
30/48
30
CrispCrisp SetsSets:: WhoWho doesdoes notnot belongbelong toto thethe set?set?FuzzyFuzzy SetsSets:: HowHow muchmuch dodo elementselements notnot belongbelong toto thethe set?set?
The complement of a set is an opposite of this set.The complement of a set is an opposite of this set.
For example, if we have the set ofFor example, if we have the set of tall mentall men, its complement, its complement
is the set ofis the set ofNOT tall menNOT tall men. When we remove the tall men. When we remove the tall men
set from the universe of discourse, we obtain theset from the universe of discourse, we obtain thecomplement.complement.
IfIfAA is the fuzzy set, its complementis the fuzzy set, its complement AA can be found ascan be found as
follows:follows:
AA((xx)) == 11 AA((xx))
QuestionQuestion:: IfIf thethe fuzzyfuzzy setset ofoftalltall menmen isis asas follows,follows, whatwhat isis itsits
complement?complement?
talltall menmen == ((00//180180,, 00..2525//182182..55,, 00..55//185185,, 00..7575//187187..55,, 11//190190))
ComplementComplement
8/13/2019 Siti Zaiton - Fuzzy1
31/48
31
CrispCrisp SetsSets:: WhichWhich setssets belongbelong toto whichwhich otherother sets?sets?FuzzyFuzzy SetsSets:: WhichWhich setssets belongbelong toto otherother sets?sets?
A set can contain other sets. The smaller set is called theA set can contain other sets. The smaller set is called the
subsetsubset..
For example, the set ofFor example, the set of tall mentall men contains all tall men;contains all tall men; veryvery
tall mentall men is a subset ofis a subset of tall mentall men. However, the. However, the tall mentall men set isset isjust a subset of the set ofjust a subset of the set of menmen..
In crisp sets, all elements of a subset entirely belong to a largerIn crisp sets, all elements of a subset entirely belong to a larger
set.set.
In fuzzy sets, however, each element can belong less to theIn fuzzy sets, however, each element can belong less to the
subset than to the larger set. Elements of the fuzzy subset havesubset than to the larger set. Elements of the fuzzy subset havesmaller memberships in it than in the larger set.smaller memberships in it than in the larger set.
QuestionQuestion: If the set of: If the set of tall mentall men is as follows, which setsis as follows, which sets
belong tobelong to very tall menvery tall men ?
talltall menmen == ((00//180180,, 00..2525//182182..55,, 00..55//185185,, 00..7575//187187..55,, 11//190190
ContainmentContainment
8/13/2019 Siti Zaiton - Fuzzy1
32/48
32
CrispCrisp SetsSets:: WhichWhich elementelement belongsbelongs toto bothboth sets?sets?FuzzyFuzzy SetsSets::HowHow muchmuch ofof thethe elementelement isis inin bothboth sets?sets?
In classical set theory, an intersection between two setsIn classical set theory, an intersection between two sets
contains the elements shared by these sets.contains the elements shared by these sets.
For example, the intersection of the set ofFor example, the intersection of the set of tall mentall men and theand the
set ofset offat menfat men is the area where these sets overlap.is the area where these sets overlap.
In fuzzy sets, an element may partly belong to both sets withIn fuzzy sets, an element may partly belong to both sets with
different memberships. A fuzzy intersection is the lowerdifferent memberships. A fuzzy intersection is the lower
membership in both sets of each element.membership in both sets of each element.
The fuzzy intersection of two fuzzy setsThe fuzzy intersection of two fuzzy setsAA andandBB ononuniverse of discourseuniverse of discourseXX::
AABB((xx) =) =minmin [[AA((xx),), BB((xx)] =)] = AA((xx)) BB((xx)),,wherewherexxXX
IntersectionIntersection
8/13/2019 Siti Zaiton - Fuzzy1
33/48
33
QuestionQuestion: Consider, the set of: Consider, the set of talltall andand average manaverage man are asare asfollows, what is the intersection of these two setsfollows, what is the intersection of these two sets?
tall men =tall men = (0/165, 0/175, 0/180, 0.25/182.5, 0.5/185, 1/190)(0/165, 0/175, 0/180, 0.25/182.5, 0.5/185, 1/190)
Average men =Average men = ((0/165, 1/175, 0.5/180, 0.25/182.5, 0/185,0/165, 1/175, 0.5/180, 0.25/182.5, 0/185,
0/1900/190))
IntersectionIntersection
8/13/2019 Siti Zaiton - Fuzzy1
34/48
34
CrispCrisp SetsSets:: WhichWhich elementelement belongsbelongs toto eithereither set?set?Fuzzy SetsFuzzy Sets::How much of the element is in either set?How much of the element is in either set?
The union of two crisp sets consists of every element that fallsThe union of two crisp sets consists of every element that falls
into either set.into either set.
For example, the union ofFor example, the union of tall mentall men andandfat menfat men contains allcontains all
men who are tallmen who are tall OROR fat.fat. In fuzzy sets, the union is the reverse of the intersection. That is,In fuzzy sets, the union is the reverse of the intersection. That is,
the union is the largest membership value of the element inthe union is the largest membership value of the element in
either set.either set.
The fuzzy operation for forming the union of two fuzzy setsThe fuzzy operation for forming the union of two fuzzy sets
AA andandBB on universeon universeXXcan be given as:can be given as:
AABB((xx) =) =maxmax [[AA((xx),), BB((xx)] =)] = AA((xx)) BB((xx)),,wherewherexxXX
UnionUnion
8/13/2019 Siti Zaiton - Fuzzy1
35/48
35
QuestionQuestion: Consider, the set of: Consider, the set of talltall andand average manaverage man are asare asfollows, what is the union of these two setsfollows, what is the union of these two sets?
tall men =tall men = (0/165, 0/175, 0/180, 0.25/182.5, 0.5/185, 1/190)(0/165, 0/175, 0/180, 0.25/182.5, 0.5/185, 1/190)
Average men =Average men = ((0/165, 1/175, 0.5/180, 0.25/182.5, 0/185,0/165, 1/175, 0.5/180, 0.25/182.5, 0/185,
0/1900/190))
UnionUnion
8/13/2019 Siti Zaiton - Fuzzy1
36/48
36
Fuzzy Logical OperationsFuzzy Logical Operations
FuzzyFuzzy logicallogical reasoningreasoning isis aa supersetsuperset ofof standardstandard BooleanBoolean logiclogic.. InIn otherother words,words, ifif wewe keepkeep thethe fuzzyfuzzy valuesvalues atat theirtheir extremesextremes ofof
11 (completely(completely true),true), andand 00 (completely(completely false),false), standardstandard logicallogical
operationsoperations willwill holdhold..
The standard logical operations:
8/13/2019 Siti Zaiton - Fuzzy1
37/48
37
Fuzzy Logical OperationsFuzzy Logical Operations
InIn FuzzyFuzzy logiclogic thethe truthtruth ofof anyany statementstatement cancan bebe realreal numbersnumbersbetweenbetween 00 andand 11..
QuestionQuestion:: HowHow willwill thesethese truthtruth tablestables bebe altered?altered? WhatWhat
functionfunction willwill preservepreserve thethe resultsresults ofof thethe truthtruth tablestables andand alsoalso
extendextend toto allall realreal numbersnumbers betweenbetween 00 andand 11??
8/13/2019 Siti Zaiton - Fuzzy1
38/48
38
Fuzzy Logical OperationsFuzzy Logical Operations
TheThe truthtruth tablestables isis unchangedunchanged byby thisthis substitutionsubstitution::
8/13/2019 Siti Zaiton - Fuzzy1
39/48
39
Fuzzy sets andFuzzy sets and
Logical OperationsLogical Operations
8/13/2019 Siti Zaiton - Fuzzy1
40/48
40
Fuzzy rulesFuzzy rules
In 1973,In 1973, Lotfi ZadehLotfi Zadehpublished his second mostpublished his second mostinfluential paper. This paper outlined a new approachinfluential paper. This paper outlined a new approach
to analysis of complex systems, in which Zadehto analysis of complex systems, in which Zadeh
suggested capturing human knowledge in fuzzy rules.suggested capturing human knowledge in fuzzy rules.
8/13/2019 Siti Zaiton - Fuzzy1
41/48
41
What is a fuzzy rule?What is a fuzzy rule?
A fuzzy rule can be defined as a conditionalA fuzzy rule can be defined as a conditionalstatement in the form:statement in the form:
IFIF xx isisAA
THENTHENyy isisBB
wherewherexx andandyy are linguistic variables; andare linguistic variables; andAA andandBB
are linguistic values determined by fuzzy sets on theare linguistic values determined by fuzzy sets on the
universe of discoursesuniverse of discoursesXXandand YY, respectively., respectively.
8/13/2019 Siti Zaiton - Fuzzy1
42/48
42
What is the difference betweenWhat is the difference between
classical and fuzzy rules?classical and fuzzy rules?
A classical IFA classical IF--THEN rule uses binary logic, forTHEN rule uses binary logic, for
example,example,
Rule: 1Rule: 1
IFIF speed speed isis >> 100100THENTHEN stopping_distancestopping_distance isis longlong
Rule: 2Rule: 2
IFIF speed speed isis
8/13/2019 Siti Zaiton - Fuzzy1
43/48
43
We can also represent the stopping distance rules in aWe can also represent the stopping distance rules in afuzzy form:fuzzy form:
RuleRule:: 11
IFIF speed speed isis fastfast
THEN stopping_distance is longTHEN stopping_distance is long
Rule: 2Rule: 2
IFIF speed speed isis slowslow
THEN stopping_distance is shortTHEN stopping_distance is short
In fuzzy rules, the linguistic variableIn fuzzy rules, the linguistic variable speedspeedalso hasalso has
the range (the universe of discourse) between 0 andthe range (the universe of discourse) between 0 and
220 km/h, but this range includes fuzzy sets, such as220 km/h, but this range includes fuzzy sets, such as
slowslow,, mediummedium andandfastfast. The universe of discourse of. The universe of discourse ofthe linguistic variablethe linguistic variable stopping_distancestopping_distance can becan be
between 0 and 300 m and may include such fuzzybetween 0 and 300 m and may include such fuzzy
sets assets as shortshort,, mediummedium andand longlong..
8/13/2019 Siti Zaiton - Fuzzy1
44/48
44
Fuzzy rules relate fuzzy sets.Fuzzy rules relate fuzzy sets.
In a fuzzy system, all rules fire to some extent,In a fuzzy system, all rules fire to some extent,
or in other words they fire partially.or in other words they fire partially.
If the antecedent is true to some degree ofIf the antecedent is true to some degree ofmembership, then the consequent is also true tomembership, then the consequent is also true to
that same degreethat same degree.
IF speed is fast THEN stopping_distance is longIF speed is fast THEN stopping_distance is long
IF speed is slow THEN stopping_distance is shortIF speed is slow THEN stopping_distance is short
antecedent consequent
8/13/2019 Siti Zaiton - Fuzzy1
45/48
45
Tall men Heavy men
180
Degree of
Mem bership
1.0
0.0
0.2
0.4
0.6
0.8
Height , cm
190 200 70 80 100160
Weight, kg
120
Degree of
Mem bersh ip
1.0
0.0
0.2
0.4
0.6
0.8
Fuzzy sets ofFuzzy sets oftalltallandandheavyheavy menmen
These fuzzy sets provide the basis for a weight estimationThese fuzzy sets provide the basis for a weight estimation
model. Consider the model that is based on a relationshipmodel. Consider the model that is based on a relationship
between a mans height and his weight:between a mans height and his weight:
IFIF heightheight isistalltall
THENTHEN weightweight isisheavyheavy
8/13/2019 Siti Zaiton - Fuzzy1
46/48
46
The value of the output or a truth membership gradeThe value of the output or a truth membership gradeof the rule consequent can be estimated directly from aof the rule consequent can be estimated directly from a
corresponding truth membership grade in thecorresponding truth membership grade in the
antecedent. This form of fuzzy inference uses aantecedent. This form of fuzzy inference uses a
method calledmethod called monotonic selectionmonotonic selection..
Tall menHeavy men
180
Degree ofMembership
1.0
0.0
0.2
0.4
0.6
0.8
Height, cm
190 200 70 80 100160
Weight, kg
120
Degree ofMembership
1.0
0.0
0.2
0.4
0.6
0.8
Monotonic Selection ofMonotonic Selection of
Fuzzy inferenceFuzzy inference
8/13/2019 Siti Zaiton - Fuzzy1
47/48
47
A fuzzy rule can have multiple antecedents, forA fuzzy rule can have multiple antecedents, forexample:example:
IFIF project_durationproject_duration isis longlong
ANDAND project_staffingproject_staffing isis largelargeANDAND project_fundingproject_funding isis inadequateinadequate
THENTHEN riskrisk isis highhigh
IFIF serviceservice isis excellentexcellentOROR food food isis deliciousdelicious
THENTHEN tiptip isis generousgenerous
Multiple antecedents ofMultiple antecedents of
Fuzzy rulesFuzzy rules
8/13/2019 Siti Zaiton - Fuzzy1
48/48
48
The consequent of a fuzzy rule can also includeThe consequent of a fuzzy rule can also includemultiple parts, for instance:multiple parts, for instance:
IFIF temperaturetemperature isis hothot
THENTHEN hot_waterhot_water isis reducedreduced;;
cold_watercold_water isis increasedincreased
Multiple consequents ofMultiple consequents of
Fuzzy rulesFuzzy rules
Top Related