8/12/2019 SBI Materials Fuzzy-Inference Engines
1/39
Fuzzy Inference EnginesComposition and Individual-Rule BasedComposition, Non-Linear Mappings
Olaf Wolkenhauer
Control Systems Centre
UMIST
www.csc.umist.ac.uk/people/wolkenhauer.htm
mailto:[email protected]://www.csc.umist.ac.uk/people/wolkenhauer.htmhttp://www.csc.umist.ac.uk/people/wolkenhauer.htmmailto:[email protected]8/12/2019 SBI Materials Fuzzy-Inference Engines
2/39
2
Contents
1 Approximate Reasoning 41.1 Modus Ponens . . . . . . . . . . . . . . . . . . . . . . 61.2 Compositional Rule of Inference . . . . . . . . . . . . . 71.3 Fuzzy Implication Operators . . . . . . . . . . . . . . 9
2 Composition-Based Inference 112.1 The Algorithm . . . . . . . . . . . . . . . . . . . . . . 12
3 Individual-Rule Based Inference 133.1 The Algorithm . . . . . . . . . . . . . . . . . . . . . . 143.2 Example: Individual-Rule Based Inference . . . . . . . 163.3 Minimum Inference Engine . . . . . . . . . . . . . . . 173.4 Product Inference Engine . . . . . . . . . . . . . . . . 183.5 Singleton Inputs . . . . . . . . . . . . . . . . . . . . . 193.6 Dienes-Rescher Inference Engine . . . . . . . . . . . . 213.7 Zadeh Inference Engine . . . . . . . . . . . . . . . . . 22
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
3/39
3
3.8 Lukasiewicz Inference Engine . . . . . . . . . . . . . . 233.9 Singleton Input . . . . . . . . . . . . . . . . . . . . . . 24
4 Fuzzy Systems as Nonlinear Mappings 254.1 Defuzzication . . . . . . . . . . . . . . . . . . . . . . 264.2 Product Inference Engine with Singleton Input Data . 28
5 Comparison of Inference Engines 31
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
4/39
Section 1: Approximate Reasoning 4
1. Approximate ReasoningLet proposition take the form
x is A
with fuzzy variable x taking values in X and A modelled by a fuzzyset dened on the universe of discourse X by membership function : X [0, 1].
A compound statement ,
x is A AND y is B
is a fuzzy set A B in X Y with
A B (x, y ) = T A (x), B (y)
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
5/39
Section 1: Approximate Reasoning 5
For the sake of simplicity we consider a single rule of type
IF x is A, THEN y is B
which can be regarded as a fuzzy relation
R : X Y [0, 1](x, y ) R(x, y )
where R(x, y ) is interpreted as the strength of relation between x andy. Viewed as a fuzzy set, with
R (x, y ) .= R(x, y )
denoting the degree of membership in the (fuzzy) subset R , R (x, y )is computed by means of a fuzzy implication .
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
6/39
Section 1: Approximate Reasoning 6
1.1. Modus Ponens
The (generalised) modus ponens provides a mechanism for inference :
Implication: IF x is A, THEN y is B .Premise: x is A .
Conclusion: y is B .
In terms of fuzzy relations the output fuzzy set B is obtained as therelational sup- t composition , B = A R .
The computation of the conclusion B (y) is realised on the basis
of what is called the compositional rule of inference .
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
7/39
Section 1: Approximate Reasoning 7
1.2. Compositional Rule of Inference
Given A (x), and R (x, y ), B (y) is found by generalising the crisprule (from functions to relations..)
IF x = a AND y = f (x ), THEN y = f (a )
The inference can be described in three steps :
1. Extension of A to X Y , i.e A ext (x, y ) = A (x ).2. Intersection of A ext with R , i.e
A ext R (x, y ) = T A ext (x, y ), R (x, y ) (x, y )
3. Projection of A ext R on Y , i.eB (y) = sup
x XA ext R (x, y )
= supx X
T A ext (x, y ), R (x, y ) (1)
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
8/39
Section 1: Approximate Reasoning 8
0
1
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
9/39
Section 1: Approximate Reasoning 9
1.3. Fuzzy Implication Operators
Dienes-Rescher implication:
R (x, y ) = max 1 A (x), B (y) . (2)
Zadeh implication:
R (x, y ) = max min A (x ), B (y) , 1 A (x) . (3)
Lukasiewicz implication:
R (x, y ) = min 1, 1 A (x) + B (y) (4)
G odel implication:
R (x, y ) = 1 if A (x) B (y),B (y) otherwise.
(5)
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
10/39
Section 1: Approximate Reasoning 10
Minimum implication:
R (x, y ) = min A (x ), B (y) (6)
Product implication:
R (x, y ) = A (x ) B (y) (7)
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
11/39
Section 2: Composition-Based Inference 11
2. Composition-Based InferenceThe way rules are combined, depends on the interpretation for whata set of rules should mean. If rules are viewed as independent con-ditional statements , then a reasonable mechanism for aggregating nRindividual rules R i (fuzzy relations ) is the union :
R .=n R
i =1
R i
= S R 1 (x , y), . . . , R nR (x , y) . (8)
On the other hand, if rules are seen as strongly coupled conditional statements , their combination should employ an intersection opera-tor :
R .=n R
i =1
R i
= T R 1 (x , y ), . . . , R nR (x , y ) . (9)
Back View
d f
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
12/39
Section 2: Composition-Based Inference 12
2.1. The Algorithm
For the nR fuzzy if-then rules of the conjunctive linguistic model
R i : IF x1 is Ai 1 AND x2 is Ai 2 . . . AND xr is Air , THEN y is B i
Step 1: Determine the fuzzy set membership functions
A i 1 A ir (x1 , . . . , x r ) .= T A i 1 (x1 ), . . . , A ir (x r ) .(10)
Step 2: R i (x , y ), i = 1 , . . . , n R , is calculated according to any fuzzyimplication ( 2)-(7).
Step 3: R (x , y ) is determined according to ( 8) or (9).
Step 4: Finally, for an input A , the output B is
B (y) = supx X
T A (x ), R (x , y ) . (11)
Back View
S i 3 I di id l R l B d I f 13
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
13/39
Section 3: Individual-Rule Based Inference 13
3. Individual-Rule Based InferenceGiven input fuzzy set A in X , the fuzzy set B i in Y is given by thegeneralised modus ponens ( 1), i.e
B i (y) = supx X
T A (x ), R i (x , y) i = 1 , . . . , n R (12)
The output of the fuzzy inference engine from the unionB (y) = S B 1 (y), . . . , B r (y) (13)
or intersection
B (y) = T B1(y), . . . , B
r(y) (14)
of the individual output fuzzy sets B1 , . . . , B r .
Back View
S ti 3 I di id l R l B d I f 14
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
14/39
Section 3: Individual-Rule Based Inference 14
3.1. The Algorithm
Step 1: Determine the fuzzy set membership functions
A i 1 A ir (x1 , . . . , x r ) .= T A i 1 (x1 ), . . . , A ir (x r ) .(10)
Step 2: Equation ( 10) is viewed as the fuzzy set A in the fuzzy im-
plications ( 2)-(7) and R i (x , y), i = 1 , . . . , n R , is calculatedaccording to any of the implications.
Step 3: For a given input fuzzy set A in X , determine the outputfuzzy set B i in Y for each rule R i according to the generalisedmodus ponens ( 1), i.e
B i (y) = supx X
T A (x ), R i (x , y ) (12)
for i = 1 , . . . , n R .
Back View
Section 3: Individual Rule Based Inference 15
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
15/39
Section 3: Individual-Rule Based Inference 15
Step 4: The output of the fuzzy inference engine is obtained fromeither the union
B (y) = S B 1 (y), . . . , B r (y) (13)or intersection
B (y) = T B 1 (y), . . . , B r (y) (14)
of the individual output fuzzy sets B1 , . . . , B r .
Back View
Section 3: Individual Rule Based Inference 16
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
16/39
Section 3: Individual-Rule Based Inference 16
3.2. Example: Individual-Rule Based Inference
Minimum inference.
Singleton input.
Union intersection.
R i : IF x1 isZ
1 0 +1
AND x2 isP
1 0 +1
x 1 x2
minT (
)
w (6)
w (6) THENY
B 6
y (6)0
for all R i ,...Y
B 6
y
B
Back View
Section 3: Individual Rule Based Inference 17
http://lastpage/http://prevpage/http://nextpage/http://goback/http://fullscreen/http://fullscreen/http://goback/http://nextpage/http://prevpage/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
17/39
Section 3: Individual-Rule Based Inference 17
3.3. Minimum Inference Engine
Individual-rule based inference.
Union combination (13).
Fuzzy implication ( 6).
Max. for all the t-conorm operators.
Using (6) and the min for for all t-norm operators.
We obtain from ( 12) and ( 13) :
B (y) = maxi =1 ,... ,n R supx X min A (x ), A i 1 (x 1), . . . , A ir (x r ), B i (y)(15)
Back View
Section 3: Individual-Rule Based Inference 18
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
18/39
Section 3: Individual-Rule Based Inference 18
3.4. Product Inference Engine
Individual-rule based inference.
Union combination (13).
Fuzzy implication ( 7).
Max. for all the t-conorm operators.
Using (7) and the algebraic product for all t-norm operators
We obtain from ( 12) and ( 13) :
B (y) = maxi =1 ,... ,n R supx X A (x )
r
k =1A ik (x k ) B i (y) (16)
Back View
Section 3: Individual-Rule Based Inference 19
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
19/39
Section 3: Individual Rule Based Inference 19
3.5. Singleton Inputs
Let the fuzzy set A is a singleton , that is, if we consider crisp inputdata,
A (x ) = 1 if x = x0 otherwise,
(17)
where x is some point in X . Substituting ( 17) in (15) (Minimum Inference Engine ) and
(16) (Product Inference Engines ),
we nd that the maximumsup
x X
is achieved at
x =
x .
Back View
Section 3: Individual-Rule Based Inference 20
http://lastpage/http://prevpage/http://nextpage/http://goback/http://fullscreen/http://fullscreen/http://goback/http://nextpage/http://prevpage/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
20/39
Section 3: Individual Rule Based Inference 20
Hence, the Minimum Inference Engine (15) reduces to,
B (y) = maxi=1
,... ,n Rmin A i 1 (x1), . . . , A ir (x r ), B i (y) (18)
and the Product Inference Engine (16) reduces to
B (y) = maxi =1 ,... ,n R
r
k =1
A ik (x k ) B i (y) (19)
A disadvantage of the minimum and product inference enginesis that
for some x X , A i k (x k ) is very small,
then B (y) obtained from ( 15) and (16) will be very small.
Back View
Section 3: Individual-Rule Based Inference 21
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
21/39
3.6. Dienes-Rescher Inference Engine
Using individual-rule based inference.
Intersection combination (14).
Implication ( 2).
Using the min t-norm in ( 14) and ( 10).
We obtain from ( 12) :
B (y) = mini =1 ,... ,n R
supx X
min A (x ),
max 1 mink =1 ,... ,r A ik (x k ) , B i (y)
(20)
Back View
Section 3: Individual-Rule Based Inference 22
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
22/39
3.7. Zadeh Inference Engine
Using individual-rule based inference.
Intersection combination (14).
Implication ( 3).
Using t-norm min in ( 14) and ( 10).
We obtain from ( 12) :
B (y) = mini =1 ,... ,n R
supx X
min A (x ), max
min A i 1 (x 1), . . . , A ir (x r ), B i (y) ,
1 mink =1 ,... ,r
A ik (x k ) (21)
Back View
Section 3: Individual-Rule Based Inference 23
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
23/39
3.8. Lukasiewicz Inference Engine
Using individual-rule based inference.
Intersection combination (14).
Implication ( 4).
Using the min t-norm in ( 14) and ( 10).
We obtain from ( 12) :
B (y) = mini =1 ,... ,n R
supx X
min A (x ),
min 1,1
mink =1 ,... ,r
A ik (
xk ) +
B i (
y)
= mini =1 ,... ,n R
supx X
min A (x ),
1 mink =1 ,... ,r
A ik (x k ) + B i (y) (22)
Back View
Section 3: Individual-Rule Based Inference 24
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
24/39
3.9. Singleton Input
If the fuzzy set A is a singleton, substituting ( 17) into the equationsof the inference engines ( 20)-(22), the sup x X is obtained at x = x ,leading to the following singleton input inference engines :
From the Dienes-Rescher Inference Engine ( 20) :
B (y) = mini =1 ,... ,n R
max 1 mink =1 ,... ,r
A ik (xk) , B i (y)
From the Zadeh Inference Engine ( 21) :
B (y) = mini =1 ,... ,n R
max min A i 1 (x 1), . . . ,
A ir (x r ), B i (y) , 1 mink =1 ,... ,r A ik (x i )
From the Lukasiewicz Inference Engine ( 22) :
B (y) = mini =1 ,... ,n R
1, 1 mink =1 ,... ,r
A ik (x i ) + B i (y)
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 25
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
25/39
4. Fuzzy Systems as Nonlinear Mappings
Linguistic model:R i : IF x1 is Ai 1 AND x2 is Ai 2 . . . AND xr is Air , THEN y is B i
Let the input data be crisp, i.e substituting ( 17) into the productinference engine (16), we have
B (y) = maxi =1 ,...,n R
r
k =1
A ik (x k ) B i (y) . (23)
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 26
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
26/39
4.1. Defuzzication
A defuzzier is a mapping from the fuzzy set B in Y to a pointy in Y .
To obtain a single-valued numerical output from the inferenceengines, one has to somehow capture the information given inB (y) by a single number.
The centre of gravity defuzzier determines y as the centre of the area under the membership function B (y) :
y .=
Y B (y) y dy
Y B (y) dy
(24)
The main problem with this defuzzier is the calculation of theintegral for irregular shapes of B (y).
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 27
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
27/39
Since the fuzzy set B is the union or intersection of nR fuzzysets, the weighted average of the centres of the nR fuzzy setsprovides a reasonable approximation of ( 24).
Let y( i )0 be the centre of the ith fuzzy set and w(i ) be its height,
the center average defuzzier calculates y as
y .=
n R
i =1y( i )0 w
( i )
n R
i =1w( i )
. (25)
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 28
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
28/39
4.2. Product Inference Engine with Singleton Input Data
Use the centre average defuzzier ( 25).
The centre of the fuzzy set A ik (x k ) B i (y) determines thecentre of B i , denoted y(
i )0 in (25).
The height of the ith fuzzy set in (23) isr
k =1
A ik (x k ) B i (y( i )0 ) =r
k =1
A ik (x k )
and equals w( i ) in (25).
This reduces the fuzzy system to
y =
n R
i =1y( i )0
r
k =1A ik (x k )
n R
i =1
r
k =1A ik (x k )
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 29
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
29/39
... or in general, we nd that the fuzzy system is a nonlinearmapping
f : X Y x f (x )
where x X R r maps to f (x ) Y R , a weighted average of theconsequent fuzzy sets :
f (x ) =
n R
i =1y( i )0
r
k =1A ik (x k )
n R
i =1
r
k =1A ik (x k )
. (26)
Back View
Section 4: Fuzzy Systems as Nonlinear Mappings 30
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
30/39
Similar to ( 26), we obtain for a fuzzy system, with
minimum inference engine ( 15),
singleton input ( 17) and
centre average defuzzier ( 25),
f (x ) =
n R
i =1y( i )0
r
mink =1 A ik (x k )n R
i =1
rmink =1
A ik (x k ). (27)
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
31/39
Section 5: Comparison of Inference Engines 32
8/12/2019 SBI Materials Fuzzy-Inference Engines
32/39
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
Figure 1: Gaussian and trapecoidal input fuzzy sets.
Back View
Section 5: Comparison of Inference Engines 33
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
33/39
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
Figure 2: Gaussian and trapecoidal outputs sets B i .
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
34/39
Section 5: Comparison of Inference Engines 35
8/12/2019 SBI Materials Fuzzy-Inference Engines
35/39
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1
x1
x2
Y
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1
x1
x2
Y
Figure 4: Minimimum inference with Gaussian and trapecoidal sets.
Back View
Section 5: Comparison of Inference Engines 36
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
36/39
1 0.5 0 0.5 1 1
0.5
0
0.5
1
x1
x 2
1 0.5 0 0.5 1 1
0.5
0
0.5
1
x1
x 2
Figure 5: Contourplots for minimum inference (left) vs product inference (right).
Back View
Section 5: Comparison of Inference Engines 37
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
37/39
1 0.5 0 0.5 1 1
0.5
0
0.5
1
x1
x 2
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1
x1
x2
Y
Figure 6: Minimum inference with input fuzzy partition that does not have fully overlapping fuzzy sets.
Back View
Section 5: Comparison of Inference Engines 38
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
38/39
1 0.5 0 0.5 1 1
0.5
0
0.5
1
x1
x 2
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1
x1
x2
Y
Figure 7: Product inference with non-overlapping input fuzzy partition.
Back View
Section 5: Comparison of Inference Engines 39
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/8/12/2019 SBI Materials Fuzzy-Inference Engines
39/39
References[1] Kruse, R., Gebhardt, J. and Klawonn, F. : Foundations of Fuzzy
Systems. Wiley, 1994.[2] Wang, L.-X. : A Course in Fuzzy Systems and Control.
Prentice Hall, 1997.
Back View
http://lastpage/http://fullscreen/http://fullscreen/http://lastpage/Top Related