Professional Documents
Culture Documents
Classical and Fuzzy Logic Be Autonomous Latest
Classical and Fuzzy Logic Be Autonomous Latest
Classical and Fuzzy Logic Be Autonomous Latest
Dr S.Natarajan
Professor
Department of Information Science and Engineering
PESIT, Bangalore
Classical Logic
What is
LOGIC- Small part of Human body to reason
LOGIC- means to compel us to infer correct answers
What is
NOT LOGIC- Not responsible for our creativity or ability to
remember
LOGIC helps in organizing words to form words- not
context dependent
3
Fuzzy Logic
Negation (NOT)
Unary Operator, Symbol:
September 5, 2006
true
false
false
true
Conjunction (AND)
Binary Operator, Symbol:
September 5, 2006
PQ
true
true
true
true
false
false
false
true
false
false
false
false
Disjunction (OR)
Binary Operator, Symbol:
September 5, 2006
P Q
true
true
true
true
false
true
false
true
true
false
false
false
Exclusive Or (XOR)
Binary Operator, Symbol:
September 5, 2006
P Q
true
true
false
true
false
true
false
true
true
false
false
false
September 5, 2006
P Q
true
true
true
true
false
false
false
true
true
false
false
true
September 5, 2006
P Q
true
true
true
true
false
false
false
true
false
false
false
true
10
P
true
Q (P)(Q)
false
true
false true
true
true false
true
true
11
true
true
PQ (PQ) (P)(Q)
true
false
false
true
true
true
true
true
true
September 5, 2006
12
Equivalent Statements
P
true
true false
false
true
true
true
false true
true
true
true
true
true
13
Conditional (Implication)
This one is probably the least intuitive. Its only
partly akin to the English usage of if,then or
implies.
DEF: p q is true if q is true, or if p is false. In
the final case (p is true while q is false) p q
is false.
Semantics: p implies q is true if one can
mathematically derive q from p.
September 5, 2006
14
Truth Tables
P
PQ
PQ
PQ
PQ
False
False
True
False
False
True
True
False
True
True
False
True
True
False
True
False
False
False
True
False
False
True
True
False
True
True
True
True
15
September 5, 2006
16
17
TAUTOLOGIES
Tautologies Compound Propositions which are
ALWAYS TRUE , irrespective of TRUTH VALUES
of INDIVIDUAL SIMPLE PROPOSITIONS
APPLICATIONS- DEDUCTIVE REASONING,
THEOREM PROVING ,
DEDUCTIVE INFERENCING ETC.,
Example: A is a set of prime numbers given by
(A1 = 1 , A2 = 2, A3 = 3, A4 = 5, A5 = 7, A6 = 11 ) on
the real line universe X, then the proposition Ai
is not divisible by 6 is A TAUTOLOGY
18
Proof by Contradiction
19
20
Classical Logic
disjunction ()
conjunction ()
negation ()
implication ()
equivalence ()
22
Logic
Example 5.1. Let P be the proposition The
structural beam is an 18WF45 and let Q be
the proposition The structural beam is made
of steel. Let X be the universe of structural
members comprising girders, beams, and
columns;
x is an element (beam);
A is the set of all wide-flange (WF) beams; and
B is the set of all steel beams. Hence,
P : x is in A
Q : x is in B
24
1,
0,
PQ
PQ
PQ
PQ
T(1)
T(1)
F(0)
T(1)
T(1)
T(1)
T(1)
T(1)
F(0)
F(0)
T(1)
F(0)
F(0)
F(0)
F(0)
T(1)
T(1)
T(1)
F(0)
T(1)
F(0)
F(0)
F(0)
T(1)
F(0)
F(0)
T(1)
T(1)
26
Classical Logic
P : truth that x A
Q : truth that x B where truth is measured in terms of the
truth value, that is,
if x A, T (P) = 1; otherwise, T (P) = 0
if x B, T (Q) = 1; otherwise, T (Q) = 0
or, using the characteristic function to represent truth (1) and
falsity (0), the following notation results:
A(x) = 1 x A
=0 x A
A notion of mutual exclusivity arises in this calculus.
For the situation involving two propositions P and Q, where T
(P) T (Q) = , we have that the truth of P always implies the
falsity of Q and vice versa;
hence, P and Q are mutually exclusive propositions.
Logic
(P Q) : T (P Q) = 1, for T (P) = T (Q)
= 0, for T (P) T (Q)
Logic
Example 5.2. (Similar to Gill, 1976). Consider the following four
propositions:
1. if 1 + 1 = 2, then 4 > 0; conclusion is T regardless of the
Hypothesis
2. if 1 + 1 = 3, then 4 > 0; conclusion is T regardless of the
Hypothesis
3. if 1 + 1 = 3, then 4 < 0; both propositions are false but this does
not
disprove the implication
4. if 1 + 1 = 2, then 4 < 0. a true hypothesis cannot produce a false
conclusion
Hence, the classical form of the implication is true for all
propositions of P and Q except for those propositions that are in
both the truth set of P and the false set of Q
_ __ _
T (P Q) = T (P) T (Q)
Logic
__
(P Q) (A B is true) (either not in A or in B)
_
___
so that T (P Q) = T (P Q) = max(T (P), T (Q))
This expression is linguistically equivalent to the statement P
Q is true when either not A or B is true (logical or)
Graphically, this implication and the analogous set operation
are represented by the Venn diagram in Figure
Logic
B
Y
32
33
34
A entails B
35
37
38
Classical Logic
Classical Logic
Example . Prove that P Q if P = n is an integer power of 2
less than 7 and greater than zero and Q = n2 6n + 8 = 0.
Since T (P) = {2, 4} and T (Q) = {2, 4}, it follows that P Q is
an equivalence
Classical Logic
Tautologies
Modus ponens deduction, is a very common inference scheme used in
forwardchaining rule-based expert systems
It is an operation whose task is to find the truth value of a consequent in a
production rule, given the truth value of the antecedent in the rule
Modus ponens deduction concludes that given two propositions,
P and P Q, if both of which are true, then the truth of the simple
proposition Q is automatically inferred.
Modus tollens, an implication between two propositions is combined with a
second
proposition and both are used to imply a third proposition
Common Tautologies
_
B B X.
_
A X; A X X.
(A (A B)) B (modus ponens)
_
_
(B (A B)) A (modus tollens).
Fuzzy Logic
The restriction of classical propositional calculus to a twovalued logic has created many interesting paradoxes over
the ages. For example, the barber of Seville is a classic
paradox (also termed as Russells barber). In the small
Spanish town of Seville, there is a rule that all and only
those men who do not shave themselves are shaved by a
barber. Who shaves the barber?
Another example comes from ancient Greece. Does the liar
from Crete lie when he claims, All Cretians are liars? If he
is telling the truth, then the statement is false. If the
statement is false, he is not telling the truth.
Fuzzy Logic
Let
S S and S S
T(S) = T(S) = 1 T(S)
T(S) = 1/2
But for binary logic T(S) = 1 or 0
Fuzzy propositions are assigned for fuzzy sets:
T P A x
~
0 A 1
~
A X X
50
Truth table
(modus ponens)
AB
(A(AB)
(A(AB)B
O 0
O 1
51
52
54
56
Fuzzy Logic
Negation
T P 1 T P
Disjunction
P Q : x A or B
T P Q max T P , T Q
~
~ ~
~
Conjunction
P Q : x A and B
~
T P Q min T P , T Q
~
~ ~
~
PQ
~
T P Q T P Q max T P , T Q
~
~
~
~ ~
~
Fuzzy Logic
When the logical conditional implication is of the
compound form,
IF x is A~ , THEN y is B~ , ELSE y is C~
Then fuzzy relation is:
R A B A C
~
R x, y max A x B y , 1 A x C y
~
~
~
~
~
Fuzzy Logic
Rule-based format to represent fuzzy information.
Rule 1: IF x is A
, THEN y is B~ , where A
and B~ represent
~
~
fuzzy propositions (sets)
Now suppose we introduce a new antecedent, say, and we
consider the following rule
' , THEN y is B '
Rule 2: IF x is A
~
~
B ' A'R
~
Fuzzy Logic
Fuzzy Logic
Suppose we use A in fuzzy composition, can we get
B B R
~
63
64
65
If A entails B then:
R = A B = A B ( material implication)
R = A B = A (A B) (propositional calculus)
R = A B = ( A B) B
(extended propositional calculus)
66
67
Rules of Inference
Rules of inference provide the justification of
the steps used in a proof.
One important rule is called modus ponens or the
law of detachment. It is based on the tautology
(p (p q)) q. We write it in the following
way:
The two hypotheses p and p q are
p
written in a column, and the conclusion
p q below a bar, where means therefore.
____
q
Spring 2003
68
Rules of Inference
The general form of a rule of inference is:
p1
p2
.
.
.
pn
____
q
Spring 2003
CS 173
Proofs - Modus Ponens
I am Mila.
If I am Mila, then I am a great swimmer.
I am a great swimmer!
p
pq
Tautology:
(p (p q)) q
Inference
Rule:
Modus
Ponens
70
CS 173
Proofs - Modus Tollens
I am not a great skater.
If I am Erik, then I am a great skater.
I am not Erik!
q
pq
Tautology:
(q (p q)) p
Inference
Rule:
Modus
Tollens
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Fuzzy Logic
The restriction of classical propositional calculus to a twovalued logic has created many interesting paradoxes over
the ages. For example, the barber of Seville is a classic
paradox (also termed as Russells barber). In the small
Spanish town of Seville, there is a rule that all and only
those men who do not shave themselves are shaved by a
barber. Who shaves the barber?
Another example comes from ancient Greece. Does the liar
from Crete lie when he claims, All Cretians are liars? If he
is telling the truth, then the statement is false. If the
statement is false, he is not telling the truth.
92
Fuzzy Logic
Let
S S and S S
T(S) = T(S) = 1 T(S)
T(S) = 1/2
But for binary logic T(S) = 1 or 0
Fuzzy propositions are assigned for fuzzy sets:
T P A x
~
0 A 1
~
93
Fuzzy Logic
Negation
T P 1 T P
Disjunction
P Q : x A or B
T P Q max T P , T Q
~
~ ~
~
Conjunction
P Q : x A and B
~
T P Q min T P , T Q
~
~ ~
~
PQ
~
T P Q T P Q max T P , T Q
~
~
~
~ ~
~
94
Fuzzy Logic
R A B A Y
~
R x, y max A x B y , 1 A x
~
Example:
A = medium uniqueness =
~
0.6 1 0.2
2 3 4
5
2 3 4
Then
95
Fuzzy Logic
96
Fuzzy Logic
When the logical conditional implication is of the
compound form,
IF x is A~ , THEN y is B~ , ELSE y is C~
Then fuzzy relation is:
R A B A C
~
R x, y max A x B y , 1 A x C y
~
~
~
~
~
97
Fuzzy Logic
Rule-based format to represent fuzzy information.
Rule 1: IF x is A
, THEN y is B~ , where A
and B~ represent
~
~
fuzzy propositions (sets)
Now suppose we introduce a new antecedent, say, and we
consider the following rule
' , THEN y is B '
Rule 2: IF x is A
~
~
B ' A'R
~
98
Fuzzy Logic
99
Fuzzy Logic
Suppose we use A in fuzzy composition, can we get
B B R
~
101
AB
(A(AB))
.3
.2
.7
.3
.7
.3
.8
.8
.3
.8
.7
.2
.3
.3
.7
.7
.8
.8
.7
.8
(A(AB))B
Quasi tautology
AB
(A(AB))
.4
.1
.6
.4
.6
.4
.9
.9
.4
.9
.6
.1
.4
.4
.6
.6
.9
.9
.6
.9
(A(AB))B
Quasi tautology
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
133
NATURAL LANGUAGE
NATURAL LANGUAGE
Natural Language
The time interval x was the period exhibiting a 100 percent maximum of
possible values as measured along some arbitrary social scale, [and]
the interval x was the period of time exhibiting 100 percent minimum of
these values as measured along the same scale.
Crisp version of this passage is identical to that posed by the law of
excluded middle of probability theory.
The decomposition of compound rules into canonical (equivalent)
forms and the treatment of rules forms as logical propositions. The
characterization of the confidence in a particular rule is addressed
by using the truth qualifications. The expression of rules as a
collection of logical implications manipulated by inference schemes
137
138
Representation Properties
Representational Adequacy - Is it possible to
represent everything of interest ?
Inferential Adequacy - Can new information
be inferred?
Inferential Efficiency - How easy is it to infer
new knowledge?
Acquisitional Efficiency - How hard is it to
gather information (knowledge)?
140
141
142
MA
1 y 25
25
M youg y
~
y 25
y 25
145
or :
or y max y , y
and :
and y min y , y
Not : y 1 y
146
LINGUISTIC HEDGES
very = 2 = [(y)]2/y
Very, very = 4
plus =1.25
minus = 0.75
2
1-2[1-
(y)]
intensify a = =
Concentration
of A
Dilation of A
x
Intensification
of A
151
Operation
First
Hedge, not
Second
and
Third
or
Linguistic Hedges
Very
y
y
y
Very
very 4
plus 1.25
Slightly
y
y
y
Minus 0.75
2 y
Intensify
1 21 y 2
0 y 0.5
0.5 y 1
It increases contrast.
153
3
4
5
1 2
.2 .4 .6 .8 .1
2
3
4
5
1
154
155
Example (contd)
1 21 1 2 1 21 0.8 2 1 21 0.6 2
1
2
3
Intensely small =
2
2
2 0.4 2 0.2
4
5
1 0.92 0.68 0.32 0.08
2
3
4
5
1
156
Rule-based systems
Rule-based Systems
IF-THEN rule based form
Canonical Rule Forms
1. Assignment statements
x = large, x y
2. Conditional statements
If A then B,
If A then B, else C
3. Unconditional statements
stop
go to 5
unconditional can be
If any conditions, then stop
If condition Ci, then restrict Ri
158
Assignment statements
x = large
bananas color = yellow
x approx= s
Conditional statements
IF the tomato is red THEN the tomato is ripe
IF x is very hot THEN stop
Unconditional statements
go to 9
stop
divide by x
turn the pressure higher
Example
if the temperature is hot, then the pressure is
rather high.
if the temperature is cold, then the pressure is
very low.
The vague term rather high in the first statement
places a fuzzy restriction on the pressure , based
on a fuzzy hot temperature condition in the
antecedent.
Define
A A A A
~
A x min A x , , A x
163
A or or A
If x is A
or
~
~
~
then y is B
~
S
S
A A A A
~
AS x max A1 x , , A L x
S
B
IF A
THEN
~
~
165
Condition Statements
1
1
B ) decomposed into:
B
1. IF A
THEN
(
ELSE
~
~
1
1~
1
2
B
A THEN B
IF A
THEN
or
IF
NOT
~
~
~
~
1
1
2
B
A
2. IF A
(THEN
)
unless
decomposed into:
~
~
~
1
1
2
1
IF A THEN B
or
IF NOT A THEN NOT B
~
1
A THEN ( B 2 )) decomposed into:
B
3. IF A
THEN
(
ELSE
IF
~
~
1
1~
1 ~
2
2
B
A and A THEN NOT B
IF A
THEN
or
IF
NOT
~
~
~
~
~
Condition Statements
likely very likely highly likely true fairly true very true
false fairly false very false
x X
anything x 1
Let be a fuzzy truth value very true true fairly true
fairly false false
A truth qualification proposition can be expressed as:
x is A~ is
or
x is A~ is = A x
~
A x 0.5
~
168
169
170
171
A(x) = .85
A(a)
1
A(x) = .15
.96
.85
A(x) = .96
.15
a
.85
A(x) = .04
175
176
177
178
179
180
181
182
183
184
185
186
Slide 187
188
189
Slide 190
FIS: Inspiration
Slide 191
FIS: Applications
medical diagnosis
Securities
Fault diagnosis
Credit worthiness
Slide 192
FIS
Defuzzifier
Slide 193
Fuzzy Operations
A B ( x) max A , B
A B ( x) min A , B
A ( x) 1 A
Slide 194
x is A
B
X
y is B
Y
Slide 195
197
Rule: 1
x is A3 IF
project_funding is adequate
y is B1 OR
project_staffing is small
z is C1 THEN risk
is low
Rule: 2
IF
AND
THEN
Rule: 2
x is A2 IF
project_funding is marginal
y is B2 AND project_staffing is large
z is C2 THEN risk
is normal
Rule: 3 Rule: 3
IF
x is A1 IF
project_funding is inadequate
THEN z is C3 THEN risk
is high
13th October 2005
198
Step 1: Fuzzification
The first step is to take the crisp inputs, x1 and y1 (project funding and
project staffing), and determine the degree to which these inputs
belong to each of the appropriate fuzzy sets.
Crisp Input
x1
1
0.5
0.2
0
A1
A2
x1
(x = A1) = 0.5
(x = A2) = 0.2
Crisp Input
y1
1
0.7
A3
X
B1
0.1
0
Project Funding
13th October 2005
B2
y1
(y = B1) = 0.1
(y = B2) = 0.7
Project Staffing
Bogdan L. Vrusias 2005
200
201
A3
B1
0.1
0.0
0
x1
Rule 1: IF x is A3 (0.0)
OR
y1
y is B1 (0.1)
A2
0
x1
y1
A1
AND
(min)
Y
0.2
C1
C2
z is C2 (0.2)
C2
THEN
Bogdan L. Vrusias 2005
C3
1
0.5 C1
Rule 3: IF x is A1 (0.5)
C3
z is C1 (0.1)
THEN
0.5
x1
C2
B2
0
C1
THEN
0.7
0.2
X
OR
(max)
0.1
C3
Z
z is C3 (0.5)
202
203
204
205
Degree of
Membership
1.0
C2
C2
0.2
0.2
0.0
0.0
clipping
scaling
206
207
C1
C2
C3
0.5
0.2
0.1
0
z is C 1 (0.1)
0.5
0.1
z is C 2 (0.2)
z is C 3 (0.5)
0.2
0
208
Step 4: Defuzzification
The last step in the fuzzy inference process is
defuzzification.
Fuzziness helps us to evaluate the rules, but the final
output of a fuzzy system has to be a crisp number.
The input for the defuzzification process is the aggregate
output fuzzy set and the output is a single number.
209
Step 4: Defuzzification
There are several defuzzification methods, but probably
the most popular one is the centroid technique. It finds
the point where a vertical line would slice the aggregate set
into two equal masses. Mathematically this centre of
gravity (COG) can be expressed as:
b
COG
A x x dx
a
b
A x dx
a
210
Step 4: Defuzzification
Centroid defuzzification method finds a point representing
the centre of gravity of the fuzzy set, A, on the interval, ab.
A reasonable estimate can be obtained by calculating it
over a sample of points.
(x)
1.0
0.8
A
0.6
0.4
0.2
0.0
150
13th October 2005
160
170
180
190
200
X
210
211
Step 4: Defuzzification
Degree of
Membership
1.0
0.8
0.6
0.4
0.2
0.0
0
10
20
30
40
50
60
70
67.4
COG
80
90
100
Z
212
213
214
215
216
1
0.1
0
0.5
0.5
0.1
0
0.2
k1
z is k1 (0.1)
k2
z is k2 (0.2)
k3
z is k3 (0.5)
0.2
k1
k2
k3
217
k 1,2, , r
k 1,2, , r
220
221
222
A3
B1
0.1
0.0
0
x1
Rule 1: IF x is A3 (0.0)
y1
OR y is B1 (0.1)
A2
0
x1
y1
A1
z is k1 (0.1)
AND
(min)
Y
0.2
0
THEN
k2
z is k2 (0.2)
Rule 3: IF x is A1 (0.5)
k1
1
0.5
0.5
x1
B2
0
0.1
THEN
0.7
0.2
X
OR
(max)
THEN
k3
z is k3 (0.5)
223
0.5
0.5
0.1
0
0.2
k1
z is k1 (0.1)
k2
z is k2 (0.2)
k3
z is k3 (0.5)
0.2
k1
k2
k3
224
65
(k1) (k 2) (k 3)
0.1 0.2 0.5
Sugeno-style defuzzification
z1
Crisp Output
z1
225
226
227
228
229
230
231
VS
0.6
0.4
0.2
0.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mean Delay (normalised)
232
0.6
0.4
0.2
0.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Servers (normalised)
233
0.6
0.4
0.2
0.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Repair Utilisation Factor
234
VS
RS
RL
VL
0.6
0.4
0.2
0.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Spares (normalised)
235
236
VS
RL
RS
VL
VS
237
238
Rule Base 1
239
s
L
M
S
VS VS VS
VS VS VS
S
S
VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
H
VS VS VS
M
L
VS
S
M
VS
VS
VS
VS
VS
VS
VS
VS
RS
VL
VS
s
L
RS
RS
VS
VS
VS
VS
s
S
RL
240
241
242
n u m b e r_ o f_ sp a re s
0.6
0.5
0.4
0.3
0.2
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
number_of_servers
243
number_of_spares
0.6
0.5
0.4
0.3
0.2
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
utilisation_factor
244
number_of_spares
0.35
0.3
0.25
0.2
0.15
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
number_of_servers
245
number_of_spares
0.5
0.4
0.3
0.2
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
utilisation_factor
246
247
RS
RL
0.6
0.4
0.2
0.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Servers (normalised)
248
s
L
RL
M
RS
S
VS VS VS
VS VS VS
S
S
VS
VS VS VS
VS VS VS
S
S
VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
H
VS VS VS
M
L
VS
S
M
RL
s
L
RS
RL
RS
VS
M RS
VS
M VS
VS
VS
RS VS
VS
VS
S VS
VS
VS
VS
RS
VS
VS
VS
VS
VS
VS
RS
RS
RS VL
RL
RS
S VL
VS
s
S
RL RL
249
number_of_spares
0.35
0.3
0.25
0.2
0.15
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
number_of_servers
250
number_of_spares
0.5
0.4
0.3
0.2
0
0.2
0.4
0.6
mean_delay
0.2
0.4
0.6
0.8
utilisation_factor
251
252
253
input(i) = 0.35
input(j) = 55
and x2 is
then y is
, k = 1,2,..., r
x1 = input(i)
otherwise
1
0
x2 = input(i)
otherwise
255
B y max min A input i , A input j
k
k 1,2, , r
k
~1
~2
256
257
258
Summary
Fuzzy Modelling subjectivity
blessing rather than a curse
Vagueness present in the definition of the terms is consistent with the
information contained in the conditional rules developed by
the Engineer when observing some complex process
Set of linguistic variables and their meanings is compatible and
consistent with set of conditional rules used, the outcome of the
qualitative process is translated into objective and quantifiable results
Fuzzy mathematical tools and the calculus of fuzzy IF-THEN
rule provide a most useful paradigm for the automation and
implementation of an extensive body of human knowledge which are
not embodied in the quantitative modelling process
259
October 2005
260
October 2005
261
262
0< (T)<1
(T)=0
October 2005
COLD
COOL
PLEASANT
WARM
HOT
Y*
10
12.5
Y*
15
17.5
Y*
20
22.5
Y*
25
27.5
30
Y*
(T)=1
263
October 2005
264
October 2005
MINIMAL
SLOW
MEDIUM
FAST
BLAST
Y*
10
20
30
Y*
40
50
Y*
60
70
Y*
80
90
100
Y*
265
October 2005
266
October 2005
IF
IF
IF
IF
IF
temp is
temp is
temp is
temp is
temp is
cold
THEN
cool
THEN
pleasant THEN
warm THEN
hot
THEN
speed is minimal
speed is slow
speed is medium
speed is fast
speed is blast
267
October 2005
Fuzzification
Inference
Composition
Defuzzification
268
COOL(T) = T / 5 + 3.5
PLSNT(T) = T /2.5 - 6
= 16 /2.5 - 6
= 0.4
= 16 / 5 + 3.5
= 0.3
Temp=16 COLD
0
October 2005
COOL
PLEASANT
WARM
0.3
0.4
HOT
0
269
October 2005
IF
IF
IF
IF
IF
temp is
temp is
temp is
temp is
temp is
cold
THEN
cool
THEN
pleasant THEN
warm THEN
hot
THEN
speed is minimal
speed is slow
speed is medium
speed is fast
speed is blast
270
THEN
October 2005
272
273
October 2005
274
M
The problem is to balance an upright pole, with a mass m at its
head and mass M at its base. A weightless shaft connects these
two masses. The base can be moved on a horizontal axis. The
task is to determine the FORCE (F) necessary to balance the pole.
The calculation of the force F involves the measurement of the
angle and the angular velocity, of the pole .
October 2005
275
nm
nb
ns
az
ps
pb
nm
ps
pm
pb
pm
pb
pm
ns
nm
ns
ps
az
nb
ns
az
ps
ps
ns
ps
pm
nm
pb
nb
nm
pm
ns
IF
is negative medium and is approximately zero
THEN F is negative medium
October 2005
276
if
if
if
October 2005
277
(b)
Consider the case when the input variables are: = 50, = -5.
Use the rule base, execute each of the four tasks to compute
the force F necessary to balance the pole using the Centre of
Gravity in the Defuzzification task.
October 2005
278
October 2005
279
1/22.5 = /17.5
: pm
0.78
22.5
45 50
67.5
45 50
67.5
: pb
1/22.5 = /5
0.22
45
50
67.5
: az
1/11.25 = /6.25
0.56
-11.25
October 2005
-5
10
280
IF is pm AND is az THEN F is pm
The two premises in RULE 1 are conjunctive
minimum of the two: min{0.78, 0.56}=0.56
IF is pb AND is az THEN F is pb
The two premises in RULE 2 are conjunctive
minimum of the two: min{0.22, 0.56}=0.22
October 2005
281
ps
pb
Defuzzification
SoG
C
October 2005
October 2005
283
284
October 2005
285
October 2005
286
VS
0.6
0.4
0.2
0.0
0
0.1
October 2005
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mean Delay (normalised)
287
0.6
0.4
0.2
0.0
0
0.1
October 2005
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Servers (normalised)
288
0.6
0.4
0.2
0.0
0
0.1
October 2005
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Repair Utilisation Factor
289
VS
RS
RL
VL
0.6
0.4
0.2
0.0
0
0.1
October 2005
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Spares (normalised)
290
October 2005
291
October 2005
292
October 2005
293
Rule Base 1
October 2005
294
small
Sugeno style
If speed is medium then resistance = 5*speed
medium
resistance = 5*speed
By using fuzzy sets, we can formulate fuzzy if-then rules that are commonly
used in our daily expressions. Basically, we have two types of fuzzy rules.
For Mamdani style, for instance, if pressure is high then volume is small,
where high? and small are described by fuzzy sets
For Sugeno style, if the speed of a moving object is medium then the
resistance due to atmosphere is 5 times the speed. The basic difference
between these two rules is in their THEN part, where Madman style has a
fuzzy but Surgeon style has a linear equation. Madman style fuzzy rules
were first proposed in the literature; they are more appealing to human
intuition. Surgeon style fuzzy rules are proposed later, but they are more
suited for mathematical design and analysis.
In this, we concentrate on Surgeon style fuzzy if-then rules.
297
B1
C1
w1
A2
B2
C2
w2
Z
T-norm
C
x is 4.5
y is 56.8
z is zCOA
low
medium
high
.8
.3
.1
2
Rule 1: w1 = .3; r1 = 2
Rule 2: w2 = .8; r2 = 4*2
Rule 3: w3 = .1; r3 = 8*2
Speed
Resistance = (wi*ri) /
= 7.12
wi
Fuzzy reasoning
A1
B1
w1
X
A2
x=3
Y
B2
z1 =
p1*x+q1*y+r1
y=2
w2
z2 =
p2*x+q2*y+r2
z=
w1*z1+w2*z2
w1+w 2
B1
C1
w1
A2
z1
B2
C2
w2
x is 4.5
y is 56.8
z2
T-norm
z=
w1*z1+w2*z2
w1+w2
B1
C1
w1
A2
za
B2
zb
C2
w2
T-norm
zc
z=
x is 4.5
y is 56.8
zd
w1*z1+w2*z2
w1+w2
Z1={Za, Zb}
Z2={Zc, Zd}