Sie sind auf Seite 1von 29

Fuzzy Logic

The restriction of classical propositional calculus to a two-


valued 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: the barber shaves himself
S: he does not
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:
( ) ( )
1 0
~
~
~
s s
=
A
A
x P T


Fuzzy Logic
( ) ( )
~ ~
1 P T P T =
( )
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
v
v
~
~
~
~
~ ~
~
~
, max
:
Q T P T Q P T
B or A x Q P
( )
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
.
.
~
~
~
~
~ ~
~
~
, min
:
Q T P T Q P T
B and A x Q P
( )
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
v =
|
.
|

\
|

~
~
~
~
~
~
~
~
, max Q T P T Q P T Q P T
Q P
Negation

Disjunction

Conjunction

Implication [Zadeh, 1973]
Fuzzy Logic
( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) | | x y x y x
Y A B A R
A B A R
~ ~ ~ ~
1 , max ,
~ ~ ~ ~
. =
=
Example:
= medium uniqueness =

= medium market size =

Then
)
`

+ +
4
2 . 0
3
1
2
6 . 0
)
`

+ + +
5
3 . 0
4
8 . 0
3
1
2
4 . 0
~
A
~
B
Fuzzy Logic
Fuzzy Logic
When the logical conditional implication is of the
compound form,
IF x is , THEN y is , ELSE y is
Then fuzzy relation is:

whose membership function can be expressed as:
~
A
~
B
~
C
( ) ( )
~ ~ ~ ~ ~
C A B A R =
( ) ( ) ( ) ( ) ( ) ( ) ( )
(

|
.
|

\
|
. . = y x y x y x
C A B A R
~ ~ ~ ~ ~
1 , max ,
Fuzzy Logic
Rule-based format to represent fuzzy information.
Rule 1: IF x is , THEN y is , where and represent
fuzzy propositions (sets)
Now suppose we introduce a new antecedent, say, and we
consider the following rule
Rule 2: IF x is , THEN y is
~
A
~
B
~
B
~
A
'
~
A '
~
B
R A B ' '
~ ~
=
Fuzzy Logic
Fuzzy Logic
Suppose we use A in fuzzy composition, can we get

The answer is: NO
Example:
For the problem in pg 127, let
A = A
B = A R
= A R
= {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} B
R B B
~ ~
=
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
The extension of truth operations for tautologies,
contradictions, equivalence, and logical proofs is no
different for fuzzy sets; the results, however, can differ
considerably from those in classical logic. If the truth
values for the simple propositions of a fuzzy logic
compound proposition are strictly true (1) or false (0), the
results follow identically those in classical logic. However,
the use of partially true (or partially false) simple
propositions in compound propositional statements results
in new ideas termed quasi tautologies, quasi
contradictions, and quasi equivalence. Moreover, the idea
of a logical proof is altered because now a proof can be
shown only to a matter of degree. Some examples of
these will be useful.
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
Truth table (approximate modus ponens)
A B AB (A.(AB)) (A.(AB))B
.3 .2 .7 .3 .7
.3 .8 .8 .3 .8 Quasi tautology
.7 .2 .3 .3 .7
.7 .8 .8 .7 .8
Truth table (approximate modus ponens)
A B AB (A.(AB)) (A.(AB))B
.4 .1 .6 .4 .6
.4 .9 .9 .4 .9 Quasi tautology
.6 .1 .4 .4 .6
.6 .9 .9 .6 .9
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
The following form of the implication operator show
different techniques for obtaining the membership function
values of fuzzy relation defined on the Cartesian product
space X Y:
~
R
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
The following common methods are among those proposed
in the literature for the composition operation , where
is the input, or antecedent defined on the universe X, is
the output, or consequent defined on the universe Y, and
is a fuzzy relation characterizing the relationship between
specific inputs (x) and specific outputs (y):



Refer fig on next slide
~ ~ ~
R A B =
~
A
~
B
~
R
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
where f(.) is a logistic function (like a sigmoid or step function)
that limits the value of the function within the interval [0,1]
Commonly used in Artificial Neural Networks for mapping
between parallel layers of a multi-layer network.
Fuzzy Rule-based systems
Using fuzzy sets as a calculus to interpret natural
language. It is vague, imprecise, ambiguous and fuzzy.
Fundamental terms atoms
Collection of atomic terms composite or set of terms
An atomic term (a linguistic variable) can be interpreted
using fuzzy sets.
An atomic term o in the universe of natural language, X.
Define a fuzzy set in the universe of interpretations or
meanings, Y as a specific meaning of o.
~
A
Fuzzy Rule-based systems
o
~
A
X Y
( )
~ ~
A M o
Mapping of a linguistic atom o to a cognitive interpretation
~
A
( ) ( )
( ) ( )

s
>
|
|
.
|

\
|
|
.
|

\
|

+
=
=

25 1
25
25
25
1
,
1
2
~
~ ~
y
y
y
y youg
y y
M
A M

o
Fuzzy Rule-based systems
Composite
( ) ( ) ( ) { }
( ) ( ) ( ) { }
( ) ( ) y y Not
y y y
and
y y y
or
and
or
o
o
| o | o
| o | o
o o

| o

| o
= =
=
=
1 :
, min
:
, max
:
Linguistic Hedges
( )
(
( )
(
( ) ( )
( ) | | ( )

s s
s s
=
=
= =
=
=
=
=
=
}
}
1 5 . 0 1 2 1
5 . 0 0 2
2
2
75 . 0
5
2
1
2
1
25 . 1
4
2
2
y y
y y
Intensif y
Minus
y
y
Slightly
plus
very Very
y
y
Very
y
y
o o
o o
o
o


o
o o

o o
o o
o o
o o

o o
It increases contrast.
Precedence of the Operations
1 Hedge, not
2 and
3 or
Example:
Suppose we have a universe of integers, Y = {1,2,3,4,5}.
We define the following linguistic terms as a mapping onto
Y:
small =
large =
)
`

+ + + +
)
`

+ + + +
5
1 .
4
8 .
3
6 .
2
4 .
1
2 .
5
2 .
4
4 .
3
6 .
2
8 .
1
1
Example (contd)
Then we construct a phrase, or a composite term:
o = not very small and not very, very large
which involves the following set-theoretic operations:
|
.
|

\
|
+ + =
|
.
|

\
|
+ + +
|
.
|

\
|
+ + + =
4
6 .
3
64 .
2
36 .
4
6 .
3
9 .
2
1
1
1
5
96 .
4
84 .
3
64 .
2
36 .
o
Suppose we want to construct a linguistic variable
intensely small (extremely small); we will make use of the
equation defined before to modify small as follows:
Example (contd)
Intensely small =
| | | | | |
| | | |
)
`

+ + + + =

+ +

+

+

5
08 . 0
4
32 . 0
3
68 . 0
2
92 . 0
1
1
5
2 . 0 2
4
4 . 0 2
3
6 . 0 1 2 1
2
8 . 0 1 2 1
1
1 1 2 1
2 2
2 2 2
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 C
i
, then restrict R
i

Decomposition of Compound Rule
Any compound rule structure can be decomposed and
reduced to a number of simple canonical rules.
The most commonly used techniques
Multiple Conjunctive Antecedents
If x is and , then y is
Define
~
A
L
A A
~
2
~

S
B
~
L S
A A A A
~
2
~
1
~ ~
. . . =
( ) ( ) ( )
(

= x x x
L S
A A A
~
1
~ ~
, , min
The rule can be rewritten.
IF THEN
S
A
~
S
B
~
Multiple Disjunctive Antecedents
If x is or or or
then y is
1
~
A
2
~
A
L
A
~
S
B
~
( ) ( ) ( ) | | x x x
A A A A
L S
A A A
L S
, , max
1
~
2
~
1
~ ~

=
=
IF THEN
S
A
~
S
B
~
Condition Statements
1. IF THEN ( ELSE ) decomposed into:
IF THEN or IF NOT THEN

1
~
A
~
1
B
2
~
B
1
~
A
1
~
B
1
~
A
2
~
B
2. IF (THEN ) unless decomposed into:
IF THEN or IF NOT THEN NOT
1
~
A
~
1
B
2
~
A
1
~
A
1
~
B
2
~
A
1
~
B
3. IF THEN ( ELSE IF THEN ( )) decomposed into:
IF THEN or IF NOT and THEN NOT
1
~
A
~
1
B
2
~
A
1
~
A
1
~
B
1
~
A
2
~
B
~
2
B
2
~
A
4. Nested IF-THEN rules
IF THEN (IF , THEN ( )) becomes
IF and THEN
Each canonical form is an implication, and we can reduce
the rules to a series of relations.
1
~
A
2
~
A
1
~
B
1
~
A
2
~
A
1
~
B
Condition Statements
likely very likely highly likely true fairly true very true
false fairly false very false
( ) 1 =
e
x
X x
anything

Let t be a fuzzy truth value very true true fairly true


fairly false false
A truth qualification proposition can be expressed as:
x is is t
or
x is is t =
~
A
~
A
( )
( ) 5 . 0
~
~
= x
x
A
A

Aggregation of fuzzy rule


The process of obtaining the overall consequent
(conclusion) from the individual consequent contributed by
each rule in the rule-base is known as aggregation of
rules.
Conjunctive System of Rules:

( ) ( ) ( ) ( ) Y y y y y
y y y y
r
y y
y
r
e =
. . . =
, , min
1
2 1

Disjunctive System of Rules:


( ) ( ) ( ) ( ) Y y y y y
y y y y
r
y y
y
r
e =
v v v =
, , max
1
2 1

Graphical Technique of Inference


If x
1
is and x
2
is then y is , k = 1,2,..., r
Graphical methods that emulate the inference process and
make manual computations involving a few simple rules.
Case 1: inputs x
1
, and x
2
are crisp.
Memberships
1 x
1
= input(i)
(x
1
) = o(x
1
input(i)) =
0 otherwise
1 x
2
= input(i)
(x
2
) = o(x
2
input(i)) =
0 otherwise
Graphical Technique of Inference
For r disjunctive rules:


A
11
refers to the first fuzzy antecedent of the first rule.
A
12
refers to the second fuzzy antecedent of the first rule.
( ) ( ) ( ) ( ) ( )
r k
j input i input y
k k k
A A
k
B
, , 2 , 1
, min max
2 ~ 1 ~ ~
=
(

Das könnte Ihnen auch gefallen