Professional Documents
Culture Documents
Fuzzy inference
Mamdani fuzzy inference Sugeno fuzzy inference Case study Summary
Fuzzy inference
The most commonly used fuzzy inference technique is the so-called Mamdani method. In 1975, soProfessor Ebrahim Mamdani of London University built one of the first fuzzy systems to control a steam engine and boiler combination. He applied a set of fuzzy rules supplied by experienced human operators.
fuzzification of the input variables, rule evaluation; aggregation of the rule outputs, and finally defuzzification.
Step 1: Fuzzification
The first step is to take the crisp inputs, x1 and y1 (project funding and project staffing), and determine staffing), the degree to which these inputs belong to each of the appropriate fuzzy sets.
Crisp Input x1
1 0.5 0.2 0 1 0.7 0.1 0
Crisp Input y1
B1 B2
A1
A2
A3
x1
y1
To evaluate the disjunction of the rule antecedents, we use the OR fuzzy operation. Typically, fuzzy expert operation. systems make use of the classical fuzzy operation union: union: QAB(x) = max [QA(x), QB(x)] Similarly, in order to evaluate the conjunction of the rule antecedents, we apply the AND fuzzy operation intersection: intersection: QAB(x) = min [QA(x), QB(x)]
A3
0.0 0 x1 X 0
B1
0.1 y1 Y OR (max) 0.1 0
C1
C2
C3
Z
Rule 1: IF x is A3 (0.0)
1
OR
1
y is B1 (0.1)
0.7
THEN
1 AND (min) Y 0.2 0
z is C1 (0.1)
C1 C2 C3
Z
A2
0 x1 X
0.2 0 y1
B2
THEN
z is C2 (0.2)
1 0.5 C1
A1
0.5
C2
C3
x1
Rule 3: IF x is A1 (0.5)
Negnevitsky, Pearson Education, 2002
THEN
z is C3 (0.5)
8
Now the result of the antecedent evaluation can be applied to the membership function of the consequent. The most common method of correlating the rule consequent with the truth value of the rule antecedent is to cut the consequent membership function at the level of the antecedent truth. This method is called clipping. Since the top of the clipping. membership function is sliced, the clipped fuzzy set loses some information. However, clipping is still often preferred because it involves less complex and faster mathematics, and generates an aggregated output surface that is easier to defuzzify.
9
While clipping is a frequently used method, 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.
10
0.2 0.0
0.2 0.0
11
12
C1
Z
1 0.2 0
C2
Z
1 0.5 0
C3
0.5 0.1
0.2 0 Z
z is C 1 (0.1)
z is C 2 (0.2)
z is C 3 (0.5)
13
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.
14
There are several defuzzification methods, but probably the most popular one is the centroid technique. 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
Q A x
x dx
a b
COG !
Q A x
dx
15
a
Negnevitsky, Pearson Education, 2002
Centroid defuzzification method finds a point representing the centre of gravity of the fuzzy set, A, on the interval, ab. ab. A reasonable estimate can be obtained by calculating it over a sample of points.
Q(x ) 1.0 0.8 0.6 0.4 0.2 0.0 150 a 160 170 180 190 200 b 210
16
17
MamdaniMamdani-style inference, as we have just seen, requires us to find the centroid of a two-dimensional twoshape by integrating across a continuously varying function. In general, this process is not computationally efficient. Michio Sugeno suggested to use a single spike, a singleton, singleton, as the membership function of the rule consequent. A singleton, or more precisely a fuzzy singleton, singleton, 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.
18
Sugeno-style fuzzy inference is very similar to the SugenoMamdani method. Sugeno changed only a rule consequent. Instead of a fuzzy set, he used a mathematical function of the input variable. The format of the Sugeno-style fuzzy rule is SugenoIF 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. y)
Negnevitsky, Pearson Education, 2002
19
The most commonly used zero-order Sugeno fuzzy zeromodel applies fuzzy rules in the following form: IF x is A AND y is B THEN z is k where k is a constant. In this case, the output of each fuzzy rule is constant. All consequent membership functions are represented by singleton spikes.
20
A3
0.0 0 x1 X 0
B1
0.1 y1 Y OR (max) 0.1 0 k1 Z
Rule 1: IF x is A3 (0.0)
1
OR y is B1 (0.1)
1 0.7
THEN
1 AND (min) Y 0.2 0
z is k1 (0.1)
A2
0 x1 X
0.2 0 y1
B2
k2
THEN
1 0.5
z is k2 (0.2)
A1
0.5
x1
k3
Rule 3: IF x is A1 (0.5)
THEN
z is k3 (0.5)
21
z is k1 (0.1)
z is k2 (0.2)
z is k3 (0.5)
22
SugenoSugeno-style defuzzification
z1
Crisp Output z1
23
Mamdani method is widely accepted for capturing expert knowledge. It allows us to describe the expertise in more intuitive, more human-like humanmanner. However, Mamdani-type fuzzy inference Mamdanientails a substantial computational burden. On the other hand, Sugeno method is computationally effective and works well with optimisation and adaptive techniques, which makes it very attractive in control problems, particularly for dynamic nonlinear systems.
24
A service centre keeps spare parts and repairs failed ones. A customer brings a failed item and receives a spare of the same type. Failed parts are repaired, placed on the shelf, and thus become spares. The objective here is to advise a manager of the service centre on certain decision policies to keep the customers satisfied.
25
26
27
28
29
30
31
32
33
34
35
s
S S S M M M L L L
V
L L L L L L L L L
n
VS VS VS VS VS VS S S VS
Rule 10 11 12 13 14 15 16 17 18
m
VS S M VS S M VS S M
s
S S S M M M L L L
V
M M M M M M M M M
n
S VS VS RS S VS M RS S
Rule 19 20 21 22 23 24 25 26 27
m
VS S M VS S M VS S M
s
S S S M M M L L L
V
H H H H H H H H H
n
VL L M M M S RL M RS
36
Rule Base 1
1. If (utilisation_factor is L) then (num ber_of_spares is S ) 2. If (utilisation_factor is M ) then (num ber_of_spares is M ) 3. If (utilisation_factor is H ) then (num ber_of_spares is L) 4. If (m ean_delay is V S ) and (num ber_of_servers is S ) then (num ber_of_spares is V L) 5. If (m ean_delay is S ) and (num ber_of_servers is S ) then (num ber_of_spares is L) 6. If (m ean_delay is M ) and (num ber_of_servers is S ) then (num ber_of_spares is M ) 7. If (m ean_delay is V S ) and (num ber_of_servers is M ) then (num ber_of_spares is R L) 8. If (m ean_delay is S ) and (num ber_of_servers is M ) then (num ber_of_spares is R S ) 9. If (m ean_delay is M ) and (num ber_of_servers is M ) then (num ber_of_spares is S ) 10. If (m ean_delay is V S ) and (num ber_of_servers is L) then (num ber_of_spares is M ) 11. If (m ean_delay is S ) and (num ber_of_servers is L) then (num ber_of_spares is S ) 12. If (m ean_delay is M ) and (num ber_of_servers is L) then (num ber_of_spares is V S )
37
s
L M RL M VL VS M RS S VS S VS VS VS S VS VS S VS VS VS M L RS S VS S S VS VS M M M M L S RS S M M H
V s
L M S
s
L M S
m
Negnevitsky, Pearson Education, 2002
38
Step 4: Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system
To accomplish this task, we may choose one of two options: to build our system using a programming language such as C/C++ or Pascal, or to apply a fuzzy logic development tool such as MATLAB Fuzzy Logic Toolbox or Fuzzy Knowledge Builder.
39
40
nu m be r_ of_spares
0.5
0.4
0.3
0.2
m ea n _ de lay
0.6
n u m b e r_ o f_ sp a res
0.5
0.4
0.3
m e a n _ d e la y
n u m b e r_ o f_ sp a res
0.3
0.2 5
0.2
m e a n _ d ela y
n u m b e r_ o f_ se rve rs 43
n u m b e r_ o f_ sp a res
0.4
0.3
0.2
m e a n _ d ela y
However, even now, the expert might not be satisfied with the system performance. To improve the system performance, we may use additional sets Rather Small and Rather Large on the universe of discourse Number of Servers, Servers, and then extend the rule base.
45
46
s
L L M M M RL L S RS RS S RS M M H
RL RL M M
s V
L RL M RS M M RS S S VS RS RS S VS VS S S S VS VS VS M
RS VL S VL VS
m s
L RL M RS S S S VS VS VS VS S S VS VS VS S VS VS VS VS VS M L
47
0.3
n u m b e r_ o f_ sp a res
0.25
0.2
m e a n _ d ela y
n u m b e r_ o f_ se rve rs 48
n u m b e r_ o f_ sp a re s
0.4
0.3
0.2
m e a n _ d ela y
4. Review the existing rules, and if required add new rules to the rule base. 5. Examine the rule base for opportunities to write hedge rules to capture the pathological behaviour of the system. 6. Adjust the rule execution weights. Most fuzzy logic tools allow control of the importance of rules by changing a weight multiplier. 7. Revise shapes of the fuzzy sets. In most cases, fuzzy systems are highly tolerant of a shape approximation.
Negnevitsky, Pearson Education, 2002
51