Tải bản đầy đủ (.ppt) (26 trang)

fuzzy expert systems

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (994.92 KB, 26 trang )

October 14, 2004
1
Demola Popoola
Department of Computing
University of Surrey
Fuzzy Expert Systems
Fuzzy Expert Systems
CS364 Artificial Intelligence
October 14, 2004
2

Introduction

Mamdani fuzzy inference

Sugeno fuzzy inference

Summary
Fuzzy Expert Systems
Fuzzy Expert Systems
October 14, 2004
3

Introduction

Mamdani fuzzy inference

Sugeno fuzzy inference

Summary
Fuzzy Expert Systems


Fuzzy Expert Systems
October 14, 2004
4
The operation of a fuzzy expert system depends on
the execution of FOUR major tasks:
Introduction
Introduction

Fuzzification of input variables

Inference/rule evaluation

Composition/Aggregation

Defuzzification
October 14, 2004
5
Introduction
Introduction

Fuzzification: definition of fuzzy sets, and
determination of the degree of membership of crisp
inputs in appropriate fuzzy sets.

Inference: evaluation of fuzzy rules to produce
an output for each rule.

Composition: aggregation or combination of
the outputs of all rules.


Defuzzification: computation of crisp output
October 14, 2004
6

Introduction

Mamdani fuzzy inference

Sugeno fuzzy inference

Summary
Fuzzy Expert Systems
Fuzzy Expert Systems
October 14, 2004
7
Mamdani fuzzy inference
Mamdani fuzzy inference
Example:

a simple two-input one-output problem with
three rules.

Rule: 1 Rule: 1
IF x is A3 IF project_funding is adequate
OR y is B1 OR project_staffing is small
THEN z is C1 THEN risk is low
Rule: 2 Rule: 2
IF x is A2 IF project_funding is marginal
AND y is B2 AND project_staffing is large
THEN 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
October 14, 2004
8
Mamdani fuzzy inference
Mamdani fuzzy inference
Crisp Input
y1
0.1
0.7
1
0
y1
B1
B2
Y
Crisp Input
0.2
0.5
1
0
A1
A2
A3
x1
x1
X
µ


(x = A1)
= 0.5
µ

(x = A2)
= 0.2
µ

(y = B1)
= 0.1
µ

(y = B2)
= 0.7
Fuzzification: determine degree of membership of crisp
inputs x1 and y1 in appropriate fuzzy sets
October 14, 2004
9
Mamdani fuzzy inference
Mamdani fuzzy inference
Inference: apply fuzzified inputs, µ(x=A1) = 0.5,
µ(x=A2) = 0.2, µ(y=B1) = 0.1 and µ(y=B2) = 0.7, to the
antecedents of the fuzzy rules.


For fuzzy rules with multiple antecedents, the
fuzzy operator (AND or OR) is used to obtain a
single number that represents the result of the
antecedent evaluation. This number (the truth value)
is then applied to the consequent membership

function.
October 14, 2004
10
Mamdani fuzzy inference
Mamdani fuzzy inference
Inference: to evaluate

i) the disjunction of rule antecedents, we use the OR
fuzzy operation, typically defined by the classical fuzzy
operation union:
µA∪B(x) = max [µA(x), µB(x)]
ii) the conjunction of rule antecedents, we apply the
AND fuzzy operation intersection:
µA∩B(x) = min [µA(x), µB(x)]
October 14, 2004
11
Mamdani fuzzy inference
Mamdani fuzzy inference
A3
1
0
X
1
y1
0
Y
0.0
x1
0
0.1

C1
1
C2
Z
1
0
X
0.2
0
0.2
C1
1
C2
Z
A2
x1
Rule 3:
A1
1
0
X
0
1
Z
x1
THEN
C1
C2
1
y1

B2
0
Y
0.7
B1
0.1
C3
C3
C3
0.5
0.5
OR
(max)
AND
(min)
OR
THEN
Rule 1:
AND
THEN
Rule 2:
IF x is A3 (0.0)
y is B1 (0.1)
z is C1 (0.1)
IF x is A2 (0.2)
y is B2 (0.7)
z is C2 (0.2)
IF x is A1 (0.5)
z is C3 (0.5)
October 14, 2004

12
Mamdani fuzzy inference
Mamdani fuzzy inference
Inference: Two general methods of applying the
result of the antecedent evaluation to the membership
function of the consequent:

Clipping (alpha–cut): This is the most common
method. It involves cutting the consequent
membership function at the level of the antecedent
truth. Since the top of the membership function is
sliced, the clipped fuzzy set loses some
information. However, it is often preferred because
it involves less complex and faster mathematics,
and generates an aggregated output surface that is
easier to defuzzify.
October 14, 2004
13
Mamdani fuzzy inference
Mamdani fuzzy inference

Scaling: Offers a better approach for preserving
the original shape of the fuzzy set. The original
membership function of the rule consequent is
adjusted by multiplying all its membership degrees
by the truth value of the rule antecedent. This
method, which generally loses less information, can
be very useful in fuzzy expert systems.
October 14, 2004
14

Mamdani fuzzy inference
Mamdani fuzzy inference
Degree of
Membership
1.0
0.0
0.2
Z
Degree of
Membership
Z
C
2
1.0
0.0
0.2
C
2

clipped scaled
October 14, 2004
15
Mamdani fuzzy inference
Mamdani fuzzy inference
Composition: aggregation of clipped (or scaled)
outputs of all rules into a single fuzzy set.
0
0.1
1
C

1
C
z
is 1 (0.1)
C
2
0
0.2
1
C
z
is 2 (0.2)
0
0.5
1
C
z
is 3 (0.5)
Z
Z
Z
0.2
Z
0

C
3
0.5
0.1
October 14, 2004

16
Mamdani fuzzy inference
Mamdani fuzzy inference
Defuzzification: conversion of fuzzy set produced
by composition stage into a crisp value.
Several defuzzification methods exist, but probably the
most popular one is the centroid technique. It finds
the centre of gravity (COG) of the aggregate set:
( )
( )


µ
µ
=
b
a
A
b
a
A
dxx
dxxx
COG



October 14, 2004
17
Mamdani fuzzy inference

Mamdani fuzzy inference
Centre of gravity (COG): In practice, a reasonable
estimate is obtained by calculating it over a sample of
points:
4.67
5.05.05.05.02.02.02.02.01.01.01.0
5.0)100908070(2.0)60504030(1.0)20100(
=
++++++++++
×++++×++++×++
=
COG
1.0
0.0
0.2
0.4
0.6
0.8
0
20
30
40
50
10
70
80
90
100
60
Z

Degree of
Membership
67.4
October 14, 2004
18

Introduction

Mamdani fuzzy inference

Sugeno fuzzy inference

Summary
Fuzzy Expert Systems
Fuzzy Expert Systems
October 14, 2004
19
Sugeno fuzzy inference
Sugeno fuzzy inference
Mamdani-style inference is, in general, not
computationally efficient. This is because it involves
finding the centroid of a two-dimensional shape by
integrating across a continuously varying function.
Michio Sugeno suggested the use of a single spike -
a singleton - as the membership function of the rule
consequent. A fuzzy singleton is a fuzzy set with a
membership function that is unity at a single particular
point on the universe of discourse and zero
everywhere else.


October 14, 2004
20
Sugeno fuzzy inference
Sugeno fuzzy inference
Sugeno- and Mamdani-style fuzzy inference are
similar. The only difference is in the rule consequent.
Instead of a fuzzy set, Sugeno used a mathematical
function of the input variable:
IF x is A
AND y is B
THEN z is f(x, y)
where x, y and z are linguistic variables; A and B are
fuzzy sets on universe of discourses X and Y,
respectively; and f(x, y) is a mathematical function.
October 14, 2004
21
Sugeno fuzzy inference
Sugeno fuzzy inference
The zero-order Sugeno fuzzy model, in which the
output of each fuzzy rule is constant, is most
commonly used. Here, the function f(x, y) = k and all
consequent membership functions are represented by
singleton spikes:
IF x is A
AND y is B
THEN z is k
where k is a constant.
October 14, 2004
22
Sugeno fuzzy inference

Sugeno fuzzy inference
A3
1
0
X
1
y1
0
Y
0.0
x1
0
0.1
1
Z
1
0
X
0.2
0
0.2
1
Z
A2
x1
IF x is A1 (0.5)
z is k3 (0.5)
Rule 3:
A1
1

0
X
0
1
Z
x1
THEN
1
y1
B2
0
Y
0.7
B1
0.1
0.5
0.5
OR
(max)
AND
(min)
OR
y is B1 (0.1)
THEN
z is k1 (0.1)
Rule 1:
IF x is A2 (0.2)
AND
y is B2 (0.7)
THEN

z is k2 (0.2)
Rule 2:
k1
k2
k3
IF x is A3 (0.0)
Rule evaluation
October 14, 2004
23
Sugeno fuzzy inference
Sugeno fuzzy inference
Composition
z is k1 (0.1)
z is k2 (0.2)
z is k3 (0.5)

0
1
0.1
Z
0
0.5
1
Z
0
0.2
1
Z
k1
k2

k3
0
1
0.1
Z
k1
k2
k3
0.2
0.5
October 14, 2004
24
Sugeno fuzzy inference
Sugeno fuzzy inference
Defuzzification
0
Z
Crisp Output
z1
z1
65
5.02.01.0
805.0502.0201.0
)3()2()1(
3)3(2)2(1)1(
=
++
×+×+×
=
µ+µ+µ

×µ+×µ+×µ
=
kkk
kkkkkk
WA
Weighted average (WA):
October 14, 2004
25
Mamdani or Sugeno?
Mamdani or Sugeno?
Mamdani method

widely accepted for capturing expert knowledge - it
allows us to describe the expertise in more intuitive,
more human-like manner.

entails a substantial computational burden.
Sugeno method

computationally effective and works well with
optimisation and adaptive techniques, which makes it
very attractive in control problems, particularly for
dynamic nonlinear systems.

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×