Escolar Documentos
Profissional Documentos
Cultura Documentos
Michael R. Berthold
Frank Hoffmann
Lotfi A. Zadeh
Fuzzy Logic
Fuzzy Sets
Fuzzy Numbers
Fuzzy Operators
Fuzzy Rules
Fuzzy Inference
Matlab Fuzzy Toolbox
Resources
Web
Fuzzy & Neuro-Fuzzy Repository at the
University of Southampton
http://www.isis.ecs.soton.ac.uk/resources/nfinfo
Journals
Fuzzy Sets & Systems
IEEE Transactions on Fuzzy Systems
Journal of Approximative Reasoning
Intelligent Data Analysis (electronic)
Resources
Software / Shareware
Xfuzzy (fuzzy system design, verification, synthesis)
NEFCON (Matlab Simulink)
UNFUZZY (C / C++)
FOOL & FOX (Xwindows)
Commercial
Matlab Fuzzy Logic Toolbox
FuzzyTECH by Inform
DataEngine by MIT
SieFuzzy by SIEMENS
Types of Uncertainty
Stochastic uncertainty
example: rolling a dice
Linguistic uncertainty
examples : low price, tall people, young age
Informational uncertainty
- example : credit worthiness, honesty
Classical Sets
young = { x P | age(x) 20 }
characteristic function:
young(x) =
young(x)
1
1 : age(x) 20
0 : age(x) > 20
A=young
x [years]
Fuzzy Sets
Classical Logic
Fuzzy Logic
A(x)
1
A(x)
A=young
x=23
A=young
x [years]
x=23
x [years]
Fuzzy Set
Definition :
Fuzzy Set A = {(x, A(x)) : x X, A(x) [0,1]}
a universe of discourse X : 0 x 100
a membership function A : X [0,1]
A(x)
=0.8
A=young
1
0
x=23
x [years]
Definitions :
Support of a fuzzy set A
supp(A) = { x X : A(x) > 0 }
A = { x X : A(x) }
(x)
1
=0.6
d x
Gaussian: N(m,s)
(x)
1
(x)
1
d x
Triangular: <a,b,b,d>
(x)
1
0
Membership functions
core: CA:={x | A(x)=1} = [b,c]
A(x)
1
d x
Fuzzy Numbers
Fuzzy Numbers have restricted fuzzy sets:
X = 1
their core is a point: 1 x : (x)=1
left and right flank of are monotonically
increasing, respectively decreasing
A+B(x)
A(x) B(x)
AB(x)
yy
f(A)
(y)
f(A)(y)
ff
A(x)
A(x)
max
x
Intersection
AB(x)=max{A(x),B(x)}
1
A(x)
B(x)
AB(x)=min{1,A(x)+B(x)}
1
0
A(x)
AB(x)=min{A(x),B(x)}
A(x) B(x)
B(x)
AB(x)=A(x) B(x)
1
A(x)
B(x)
T-Conorms or S-norms
A function S : [0,1]x[0,1] => [0,1] is called a t-conorm
or s-norm iff for any u,v,w [0,1]
1. S(u,0) = u
0 as unit
2. u v S(u,w) S(v,w)
monotonicity
3. S(u,v) = S(v,u)
commutativity
4. S(u,S(v,w)) = (S(u,v),w)
associativity
A s-norm is strict if it is strictly increasing in [0,1]x[0,1]
Examples: max(u,v)
maximum
u+v-uv
algebraic sum
min(1,u+v)
bounded sum
Complement
Negation:
A(x)= 1 - A(x)
Negation:
A(x) = 0.6
A(x) = 1 - A(x) = 0.4
AA(x) = max(0.6,0.4) = 0.6 1
AA(x) = min(0.6,0.4) = 0.4 0
De Morgan Law
S(u,v) = 1 T(1-u,1-v)
T(u,v) = 1 S(1-u,1-v)
S(u,v) = N(T(N(u),N(v)))
T(u,v) = N(S(N(u),N(v)))
: N-Dual
: N-Dual
max(u,v) = 1 min(1-u,1-v)
uv = 1 - (1-u)+(1-v) + (1-u)(1-v)
max(0,u+v-1) = 1 - min(1,1-u+1-v)
Operator - Spectrum
S-norms
(T-conorms)
T-norms
u
v
0
if v=1
if u=1
otherwise
u
v
1
if v=0
if u=0
otherwise
Cylindrical Extension
Imbed a lower dimensional fuzzy set in a higher dimensional space
fuzzy set A with universe of discourse X1 and MSF A and
additional universe X2
Definition: CX1xX2 A is called the cylindrical extension of A to
the universe X1x X2 iff
(x1,x2) X1x X2
Cartesian Product
fuzzy set A with universe of discourse X1 and MSF A and
fuzzy set B with universe of discourse X2 and MSF B and
Definition: AxB is called the cartesian product of A and B to
the universe X1x X2 iff
(x1,x2) X1x X2
Fuzzy Relations
classical relation
R X x Y defined by R(x,y) =
1 iff (x,y) R
{ 0 iff (x,y) | R
fuzzy relation
R X x Y defined by R(x,y) [0,1]
R(x,y) describes to which degree x and y are related
It can also be interpreted as the truth value of the proposition x R y
Fuzzy Relations
Example:
X = { rainy, cloudy, sunny }
Y = { sun bathing, bicycling, camping, reading }
X/Y sun bathing
rainy
cloudy
sunny
bicycling
camping
reading
0.0
0.2
0.0
1.0
0.0
0.8
0.3
0.3
1.0
0.2
0.7
0.0
cold
warm
20
hot
60
x [C]
Fuzzy Rules
causal dependencies can be expressed in
form of if-then-rules
general form:
if <antecedent> then <consequence>
example:
if temperature is cold and oil is cheap
then heating is high
linguistic variables
Fuzzy Rulebase
Heating
Oil price:
Temperature :
cold
warm
hot
cheap
high
high
medium
normal
high
medium
low
expensive
medium
low
low
Fuzzy Knowledge-Base
Fuzzy Knowledge-Base
Fuzzy Data-Base:
Definition of linguistic input and output variables
Definition of fuzzy membership functions
(x)
cold
1
0
warm
20
hot
60
x [C]
Fuzzy Rule-Base:
List of fuzzy rules
if temperature is cold and oil price is cheap
then heating is high
.
Fuzzy Inference
1. Fuzzification
Determine degree of membership for each term of an
input variable :
temperature : t=15 C
1
0.5
0
oilprice : p=$13/barrel
cold(t)=0.5
15C
1
0.3
t 0
cheap(p)=0.3
$13/barrel
oil cheap ...
Fuzzy Inference
2. Combine the terms in one degree of fulfillment for the entire
antecedent using a fuzzy AND: min-operator
1
0.5
0
cold(t)=0.5
15C
1
0.3
t 0
cheap(p)=0.3
$13/barrel
Fuzzy Inference
3. Inference step: Apply the degree of membership of the antecedent
to the consequent of the rule using a t-norm: min or prod operator
1
high(h)
consequent(h)
min-inference:
cons. = min{ante , high }
high(h)
consequent(h)
prod-inference:
cons. = ante high
Fuzzy Inference
4. Aggregate all the rules consequents using the max-operator
for union
... heating high
... heating medium
... heating low
1
0
Defuzzification
5. Determine crisp value from output membership function
for example using Center of Gravity-method:
1
consequent(h)
0
73
COG
Inference
Defuzzification
rule-base
cold warm hot
0.7
cold =0.7
temp warm
valve half
0.2
measured
temperature
temp cold
valve open
open half
close
0.7
0.2
warm =0.2
temp hot
valve close
hot =0.0
v
crisp output
for valve-setting
rulelist=[
2. If (temperature
is cold) and (oilprice is expensive) then (heating is medium) (1)
11311
3. If (temperature
is warm) and (oilprice is cheap) then
12311
first(heating
input is high) (1)
13211
4. If (temperature
is warm) and (oilprice is normal) then
(heating
is medium) (1)
second
input
21311
output
5. If (temperature is cold) and (oilprice is cheap) then
(heating is high) (1)
22211
rule
weight
6. If (temperature
is warm) and (oilprice is expensive)
then
(heating is low) (1)
23111
31211
7. If (temperature
is hot) and (oilprice is cheap) thenoperator
(heating is medium) (1)
(1=AND, 2=OR)
32311
8. If (temperature
is hot) and (oilprice is normal) then (heating is low) (1)
33311];
9. If (temperature is hot) and (oilprice is expensive) then (heating is low) (1)
fis=addrule(fis,rulelist);
showrule(fis)
gensurf(fis);
Surfview(fis);
constructive or adaptive?