Académique Documents
Professionnel Documents
Culture Documents
Lecture
Lecture
08
08 1
Fuzzy Expert Systems
Fuzzy Expert Systems
Lecture 8
Lecture 8
(Fuzzy Systems)
(Fuzzy Systems)
Soft Computing is an emerging approach to computing
which parallels the remarkable ability of the human mind
to reason and learn in an environment of uncertainty and
imprecision
(Lotfi A. Zadeh, 1992)
Fall 2002 Fall 2002
Lecture
Lecture
08
08 2
Fuzzy Inference
Engine
Fuzzy Rule Base
Fuzzifier
Defuzzifier
Fuzzy Reasoning
The Whole Fuzzy System
The Whole Fuzzy System
Fall 2002 Fall 2002
Lecture
Lecture
08
08 3
In general, both the Inputs and outputs of a
Fuzzy Inference Engine are Fuzzy Variables
A A
(x)
(x) and
B B
(y)
(y)
However, in the real world, it is usually desired
to have a system with crisp inputs and outputs.
So the Fuzzifier and Defuzzifier blocks are
needed to accept crisp inputs and produce crisp
outputs.
Fuzzifier and Defuzzifier
Fuzzifier and Defuzzifier
Fall 2002 Fall 2002
Lecture
Lecture
08
08 4
Fuzzifier
Fuzzifier
The
The
fuzzifier
fuzzifier
is actually a mapping. It maps a
is actually a mapping. It maps a
real
real
-
-
valued crisp point x
valued crisp point x
* *
U to a fuzzy set A
U to a fuzzy set A
in
in
U. So it can be defined with a fuzzy membership
U. So it can be defined with a fuzzy membership
function
function
A A
(x)
(x)
as a function of
as a function of
x
x
* *
Fuzzifier
x
x
*
*
A
A
(x)=
(x)=
f
f
(
(
x*)
x*)
Fall 2002 Fall 2002
Lecture
Lecture
08
08 5
x
x
*
*
A
A
(x)
(x)
x
x
1
1
A
A
(x
(x
1
1
)
)
The Fuzzifier
The output of the fuzzifier is not a membership
value, it is a membership function
Fall 2002 Fall 2002
Lecture
Lecture
08
08 6
Fuzzifier produces membership functions which can
Fuzzifier produces membership functions which can
be regarded as fuzzy inputs to fuzzy inference engine.
be regarded as fuzzy inputs to fuzzy inference engine.
Fuzzifier
x
x
A
A
(x)
(x)
X
A
X
w
A
B
Y
A
A
(x)
(x)
x x* *
Fall 2002 Fall 2002
Lecture
Lecture
08
08 7
1. Since the fuzzy variable
1. Since the fuzzy variable
A A
(x)
(x) is used as the input
instead of
x*
x*
,
,
intuitively, it should be selected such
intuitively, it should be selected such
that t
that t
he actual crisp value
he actual crisp value
x* has a large membership
x* has a large membership
value in A
value in A
.
.
2. If the input to a fuzzy system is corrupted by noise,
2. If the input to a fuzzy system is corrupted by noise,
it is desirable that the
it is desirable that the
fuzzifier
fuzzifier
should help to suppress
should help to suppress
the noise.
the noise.
3. Practically, It is better to select the
3. Practically, It is better to select the
fuzzifier
fuzzifier
such
such
that it simplifies the computations (particularly
that it simplifies the computations (particularly
computation of
computation of
Sup
Sup
x x U U
)
)
How to design a Fuzzifier ?
How to design a Fuzzifier ?
Fall 2002 Fall 2002
Lecture
Lecture
08
08 8
Fuzzifier Examples
Fuzzifier Examples
Singleton Fuzzifier:
Singleton Fuzzifier:
(most commonly used)
(most commonly used)
The singleton fuzzifier is defined as:
=
=
otherwise
if
A
0
1
) (
*
'
x x
x
) ,..., , (
2 1 n
x x x = x
Fall 2002 Fall 2002
Lecture
Lecture
08
08 9
Singleton Fuzzifier
Singleton Fuzzifier
Singleton
Fuzzifier
x*
x*
X
A
A
(x)
(x)
X
x*
x*
It greatly simplifies the computation of
Sup
Sup
x x U U
(Actually it omits the
Sup
Sup
x x U U
and reduces it to
and reduces it to
x=x
x=x
* *
)
)
Fall 2002 Fall 2002
Lecture
Lecture
08
08 10
Gaussian Fuzzifier:
Gaussian Fuzzifier:
2
*
2
1
*
1 1
) ( ) (
'
) (
n
n n
a
x x
a
x x
A
e e
= L x
norm t any is and x x x
n
= ) ,..., , (
2 1
x
Gaussian
and
Triangular
Fuzzifiers
suppress
the noise
x*
x*
Gaussian
Fuzzifier
x*
x*
X
A
A
(x)
(x)
X
Fall 2002 Fall 2002
Lecture
Lecture
08
08 11
Triangular Fuzzifier:
Triangular Fuzzifier:
>
=
0
0
) 1 ( ) 1 (
) (
*
1
*
1 1
'
i
n
n n
A
b
otherwise
b
x x
b
x x
L
x
Trinagular
Fuzzifier
x*
x*
X
A
A
(x)
(x)
X
Fall 2002 Fall 2002
Lecture
Lecture
08
08 12
Conceptually, the task of the defuzzifier is to specify
a crisp point in output space V that best represents
the fuzzy set C
Defuzzifier
Defuzzifier
(Defuzzification Method)
(Defuzzification Method)
c
c
(x)
(x)
X
Defuzzifier
x*
x*
Fuzzy Variable C
Crisp Variable X
*
Fall 2002 Fall 2002
Lecture
Lecture
08
08 13
Plausibility:
Plausibility:
the crisp point
the crisp point
y
y
* *
should represent C
should represent C
=
Z
C
Z
C
COG
dz z
zdz z
z
) (
) (
'
'
where is
aggregated output MF
) (
'
z
C
BOA
BOA
z
A
z
A
dz z dz z ) ( ) (
where
} | min{ Z z z = } | max{ , Z z z =
Bisector of Area:
Bisector of Area:
BOA
Fall 2002 Fall 2002
Lecture
Lecture
08
08 16
Mean of Maximum:
Mean of Maximum:
=
Z
Z
MOM
dz
zdz
z
Average of the maximizing
z at which the MF reach a
maximum , where
*
} ) ( | { '
*
= = z z z
A
MOM
Fall 2002 Fall 2002
Lecture
Lecture
08
08 17
Smallest of Maximum:
Smallest of Maximum:
z
z
SOM
SOM
is the minimum (in terms of magnitude)
is the minimum (in terms of magnitude)
of the maximizing z
of the maximizing z
Largest of Maximum:
Largest of Maximum:
z
z
LOM
LOM
is the maximum of the maximizing z
is the maximum of the maximizing z
SOM LOM
Fall 2002 Fall 2002
Lecture
Lecture
08
08 18
Center Average
Center Average
=
=
=
M
l
l
M
l
l
l
CA
w
w y
z
1
1
Center Average is the weighted
Center Average is the weighted
average of the
average of the
centers
centers
of the M
of the M
fuzzy sets, with the weights equal
fuzzy sets, with the weights equal
the heights of the corresponding
the heights of the corresponding
fuzzy sets. Let be the center of
fuzzy sets. Let be the center of
the
the
l
l
th
th
fuzzy set and
fuzzy set and
w
w
l l
be its
be its
height, then :
height, then :
l
y
w
l
l
y
Fall 2002 Fall 2002
Lecture
Lecture
08
08 19
Example of the
Center Average
(CA)
0
1
= y
w
1
w
2
1
2
= y
2 1
2
*
w w
w
y
+
=
The Center average method is most commonly used
The Center average method is most commonly used
defuzzifier
defuzzifier
in fuzzy systems and fuzzy control. It is
in fuzzy systems and fuzzy control. It is
computationally simple
computationally simple
and intuitively plausible. also
and intuitively plausible. also
small changes in and
small changes in and
w
w
l l
result in small change in y
result in small change in y
* *
l
y
Fall 2002 Fall 2002
Lecture
Lecture
08
08 20
Various Defuzzification Schemes
-10 -8 -6 -4 -2 0 2 4 6 8 10
0
0. 2
0. 4
0. 6
0. 8
1
ce ntroi d
bi se ctor
mom
som l om
-10 -8 -6 -4 -2 0 2 4 6 8 10
0
0. 2
0. 4
0. 6
0. 8
1
ce ntroi d
bi se ctor
mom
som l om
Fall 2002 Fall 2002
Lecture
Lecture
08
08 21
Fuzzy Systems Types
Fuzzy Systems Types
THEN y is C
THEN y is C
where
where
A , B
A , B
,
,
. And
. And
C
C
are fuzzy sets
are fuzzy sets
This type of fuzzy systems are used in applications
This type of fuzzy systems are used in applications
where the fuzzy rules are direct consequence of
where the fuzzy rules are direct consequence of
the human expert advice expressed in the form of
the human expert advice expressed in the form of
fuzzy rules.
fuzzy rules.
The output of a MAMDANI fuzzy system is a fuzzy
variable
Fall 2002 Fall 2002
Lecture
Lecture
08
08 23
TSK fuzzy systems are fuzzy systems having if
then rules in the following form:
If x is A and y is B THEN z = f (
If x is A and y is B THEN z = f (
x,y
x,y
)
)
where
where
A
A
and
and
B
B
are fuzzy set in the antecedent,
are fuzzy set in the antecedent,
while
while
z=f
z=f
(
(
x
x
,
,
y
y
) is a crisp function in the
) is a crisp function in the
consequent
consequent
2. Sugeno Fuzzy Systems
2. Sugeno Fuzzy Systems
TSK (Takagi Sugeno)
TSK (Takagi Sugeno)
Fall 2002 Fall 2002
Lecture
Lecture
08
08 24
Usually,
Usually,
z=
z=
f(x,y
f(x,y
)
)
is a polynomial in x and y.
is a polynomial in x and y.
the order of this polynomial is defined as the
the order of this polynomial is defined as the
order of TSK model. So in zero
order of TSK model. So in zero
-
-
order TSK
order TSK
models, z is a constant.
models, z is a constant.
Sugeno Type 1
Sugeno Type 1
If
If
X
X
is small and
is small and
Y
Y
is small, then
is small, then
z
z
=
=
-
-
x
x
+
+
y
y
+ 1
+ 1
Sugeno Type 0
Sugeno Type 0
If
If
X
X
is small and
is small and
Y
Y
is small, then
is small, then
z
z
= 5
= 5
Center Average
Center Average
defuzzifier
defuzzifier
is used in Sugeno
is used in Sugeno
fuzzy systems
fuzzy systems
Fall 2002 Fall 2002
Lecture
Lecture
08
08 25
An Example of a TSK system
An Example of a TSK system
Example of Two
Example of Two
-
-
input single
input single
-
-
output TSK system
output TSK system
If
If
X
X
is small and
is small and
Y
Y
is small, then
is small, then
z
z
=
=
-
-
x
x
+
+
y
y
+ 1
+ 1
If
If
X
X
is small and
is small and
Y
Y
is large, then
is large, then
z
z
=
=
-
-
y
y
+ 3
+ 3
If
If
X
X
is large and
is large and
Y
Y
is small, then
is small, then
z
z
=
=
-
-
x
x
3
3
If
If
X
X
is large and
is large and
Y
Y
is large then
is large then
z
z
=
=
x + y + 2
x + y + 2
-5 -4 -3 -2 -1 0 1 2 3 4 5
0
0.2
0.4
0.6
0.8
1
X
M
e
m
b
e
r
s
h
i
p
G
r
a
d
e
s
Small Large
-5 -4 -3 -2 -1 0 1 2 3 4 5
0
0.2
0.4
0.6
0.8
1
Y
M
e
m
b
e
r
s
h
i
p
G
r
a
d
e
s
Small Large
Fall 2002 Fall 2002
Lecture
Lecture
08
08 26
A1 B1
A2
B2
x=3
X
X
Y
Y
y=2
w1
w2
z1 =
p1x+q1y+r1
z =
z2 =
p2x+q2y+r2
w1+w2
w1z1+w2z2
Min or
Product
Graphical Demonstration of a type
Graphical Demonstration of a type
-
-
1
1
Sugeno Fuzzy Systems
Sugeno Fuzzy Systems
Fall 2002 Fall 2002
Lecture
Lecture
08
08 27
3. Tsukamoto Fuzzy Systems
3. Tsukamoto Fuzzy Systems
In this case, the consequent part of each fuzzy
In this case, the consequent part of each fuzzy
if
if
-
-
then rule is represented by a fuzzy set with a
then rule is represented by a fuzzy set with a
monotonical
monotonical
MF. The inferred output of each rule
MF. The inferred output of each rule
is defined as a crisp value induced by the rule
is defined as a crisp value induced by the rule
firing strength. The
firing strength. The
overal
overal
output is taken as the
output is taken as the
weighted average of each rule
weighted average of each rule
s output.
s output.
Tsukamoto fuzzy model aggregates each rule
Tsukamoto fuzzy model aggregates each rule
s
s
output by the method of weighting average.
output by the method of weighting average.
Fall 2002 Fall 2002
Lecture
Lecture
08
08 28
Graphical Demonstration of a Tsukamoto
Graphical Demonstration of a Tsukamoto
Fuzzy Systems
Fuzzy Systems
The Tsukamoto fuzzy model
Fall 2002 Fall 2002
Lecture
Lecture
08
08 29
Control Surface
Control Surface
The relationship
The relationship
between each pair
between each pair
of the input
of the input
variables and each
variables and each
of the output
of the output
variables is usually
variables is usually
called
called
surface
surface
or
or
control surface
control surface
of
of
the fuzzy system.
the fuzzy system.
Fall 2002 Fall 2002
Lecture
Lecture
08
08 30
Building a fuzzy system
Building a fuzzy system
1
1
Domain Knowledge
Domain Knowledge
: the knowledge about
: the knowledge about
the fuzzy if
the fuzzy if
-
-
then rules, membership functions,
then rules, membership functions,
2
2
Meta Knowledge
Meta Knowledge
: the knowledge about how
: the knowledge about how
to treat with domain knowledge including the
to treat with domain knowledge including the
type of t
type of t
-
-
norm, s
norm, s
-
-
norm, implication and
norm, implication and
inference engine, method of
inference engine, method of
defuzzification
defuzzification
,
,
2
1
(i)
n
y
:
y
y
(
(
(
(
2
1
i=1,2,..,N
Fuzzy System
2. Modeling by Observation (Learning from
Examples)
Fall 2002 Fall 2002
Lecture
Lecture
08
08 34
There are many methods for learning from examples
such as Table Look-Up scheme, Fuzzy Clustering,
ANFIS, ... These methods are different in degree of
accuracy, computational complexity and noise
cancellation ability.
Modeling or learning by observation means to build a
fuzzy system using a set of input-output data pairs
relating to an unknown system which should be
modeled. The resulting fuzzy system can be used as
fuzzy model of the main system and thus is expected
to have the same input/output mapping.
Fall 2002 Fall 2002
Lecture
Lecture
08
08 35
3. Automatic optimization methods
Designing a fuzzy system is actually a search and
optimization problem in which the objective is to
search and find the most appropriate knowledge
including fuzzy membership functions and fuzzy rules.
This can be done using many of the evolutionary
optimization methods such as Genetic Algorithms and
Genetic Programming. A design criteria and a fitness
function are used and the optimization problem looks
for the best solution (fuzzy system) which maximize the
fitness function.
Fall 2002 Fall 2002
Lecture
Lecture
08
08 36
Domains of applications for fuzzy systems:
Domains of applications for fuzzy systems:
Modeling, Learning.
Modeling, Learning.
Control
Control
(Feedback control of dynamical
(Feedback control of dynamical
systems)
systems)
etc,
etc,
Neoro
Neoro
-
-
Fuzzy
Fuzzy
and Soft Computing
and Soft Computing