Professional Documents
Culture Documents
Adaptive Neural Fuzzy Inference Systems (ANFIS) : Analysis and Applications
Adaptive Neural Fuzzy Inference Systems (ANFIS) : Analysis and Applications
1
©Copyright 2002 by Piero P. Bonissone
Outline
• Objective
• Fuzzy Control
– Background, Technology & Typology
• ANFIS:
– as a Type III Fuzzy Control
– as a fuzzification of CART
– Characteristics
– Pros and Cons
– Opportunities
– Applications
– References
2
©Copyright 2002 by Piero P. Bonissone
ANFIS Objective
• To integrate the best features of Fuzzy
Systems and Neural Networks:
– From FS: Representation of prior knowledge into
a set of constraints (network topology) to reduce
the optimization search space
– From NN: Adaptation of backpropagation to
structured network to automate FC parametric
tuning
• ANFIS application to synthesize:
– controllers (automated FC tuning)
– models (to explain past data and predict future
behavior)
3
©Copyright 2002 by Piero P. Bonissone
FC Technology & Typology
• Fuzzy Control
– A high level representation language with
local semantics and an interpreter/compiler
to synthesize non-linear (control) surfaces
– A Universal Functional Approximator
• FC Types
– Type I: RHS is a monotonic function
– Type II: RHS is a fuzzy set
– Type III: RHS is a (linear) function of state
4
©Copyright 2002 by Piero P. Bonissone
FC Technology (Background)
• Fuzzy KB representation
– Scaling factors, Termsets, Rules
• Rule inference (generalized modus ponens)
• Development & Deployment
– Interpreters, Tuners, Compilers, Run-time
– Synthesis of control surface
• FC Types I, II, III
5
©Copyright 2002 by Piero P. Bonissone
FC of Type II, III, and ANFIS
6
©Copyright 2002 by Piero P. Bonissone
ANFIS Network
ω1 ω1
& N
Input 1 x1
& N
Σ Output
& N
Input 2 x2
& N
Layers: 0 1 2 3 4 5
7
©Copyright 2002 by Piero P. Bonissone
ANFIS Neurons: Clarification note
8
©Copyright 2002 by Piero P. Bonissone
ANFIS as a generalization of CART
Gini(c) = 1 − ∑ p 2j
j
where:
• pj is the probability of class j in node c
• Gini(c) measure the amount of “impurity” (incorrect
classification) in node c
9
©Copyright 2002 by Piero P. Bonissone
CART Problems
• Discontinuity
• Lack of locality (sign of coefficients)
10
©Copyright 2002 by Piero P. Bonissone
CART: Binary Partition Tree and
Rule Table Representation
x1 x1 x2 y
a1 ≤ x1 a1 > x1
a1 ≤ a2 ≤ f1(x1,x2)
x2 x2
a1 ≤ > a2 f2(x1,x2)
a2 ≤ x2 a2 > x2
a2 ≤ x2 a2 > x2 a1 > a2 ≤ f3(x1,x2)
11
©Copyright 2002 by Piero P. Bonissone
Discontinuities Due to Small Input Perturbations
x1
y3= f3(x11, . )
x1 ≤ a1 a1 > x1
x2 x2
x2≤ a2 a2 > x2
y1= f1(x11, . )
a2 ≤ x2 a2 > x2
X1
µ(a ≤ )(x1)
1
1
Let's assume two inputs: I1=(x11,x12), and I2=(x21,x22) such that:
x11 = ( a1- ε )
x21 = ( a1+ ε )
x12 = x22 < a2
Then I1 is assigned f1(x11,x12) while I2 is assigned f3(x1,x2)
0
X1
x11 a1 x21 12
©Copyright 2002 by Piero P. Bonissone
Takagi-Sugeno (TS) Model
• Combines fuzzy sets in antecedents with crisp
function in output:
• IF (x1 is A) AND (x2 is B) THEN y = f(x1,x2)
IF X is small
THEN Y1=4
IF X is medium
THEN Y2=-0.5X+4
IF X is large
THEN Y3=X-1
n
∑Y w
j =1
j j
Y = n
∑w
j =1
j
13
©Copyright 2002 by Piero P. Bonissone
ANFIS Characteristics
• Adaptive Neural Fuzzy Inference System
(ANFIS)
– Algorithm defined by J.-S. Roger Jang in 1992
– Creates a fuzzy decision tree to classify the data
into one of 2n (or pn) linear regression models to
minimize the sum of squared errors (SSE):
SSE = ∑ e2j
j
where:
• ej is the error between the desired and the actual output
• p is the number of fuzzy partitions of each variable
• n is the number of input variables
14
©Copyright 2002 by Piero P. Bonissone
ANFIS as a Type III FC
• L0: State variables are nodes in ANFIS inputs layer
• L1: Termsets of each state variable are nodes in
ANFIS values layer, computing the membership
value
• L2: Each rule in FC is a node in ANFIS rules layer
using soft-min or product to compute the rule
matching factor ωi
• L3: Each ωi is scaled into ωi in the normalization layer
• L4: Each ωi weighs the result of its linear regression fi
in the function layer, generating the rule output
• L5: Each rule output is added in the output layer
15
©Copyright 2002 by Piero P. Bonissone
ANFIS Architecture
Rule Set:
IF ( x 1 is A 1 ) AND (x 2 is B 1 ) THEN f 1 = p 1 x 1 + q 1 x 2 + r1
IF ( x 1 is A 2 ) AND (x 2 is B 2 ) THEN f 2 = p 2 x 1 + q 2 x 2 + r2
...
x1 x2
A1
Π ω1 N ω1
x1 ω1 f1
A2
Σ y
B1 Π ω N
x2
2 ω2 ω2 f2
B2
x1 x2
Layers: 0 1 2 3 4 5 16
©Copyright 2002 by Piero P. Bonissone
ANFIS-Visualized (Example for n =2)
where A1: Medium; A2: Small-Medium
B1: Medium; B2: Small-Medium
• Fuzzy reasoning
A1 B1 y1 =
w1
p1*x1 +q1*x2+r1
w1*y1+w2*y2
z= w1+w2
A2 B2 y2 =
w2
p2*x1+q2* x2 +r2
x y
• ANFIS (Adaptive Neuro-Fuzzy Inference System)
A1
w1 w1*y1
x Π
Σ Σwi*yi
A2
B1
Π w2*y2 / Y
y Σwi
B2 w2 Σ
17
©Copyright 2002 by Piero P. Bonissone
Layer 1: Calculate Membership Value for
Premise Parameter
µ A ( x1 ) =
1
2b
x1 − c i
1+
ai
1 1
0.8 0 .8
0.6 0 .6
0.4 0 .4
0.2 0 .2
1
µA (x) =
0 0
-10 -5 0 5 10 -1 0 -5 0 5 10
2b
x −ci (c ) C h a n ging 'c ' (d ) C ha ngin g 'a ' a n d 'b '
1+
ai
1 1
0.8 0 .8
0.6 0 .6
0.4 0 .4
0.2 0 .2
0 0
-10 -5 0 5 10 -1 0 -5 0 5 10
19
©Copyright 2002 by Piero P. Bonissone
Layer 2: Firing Strength of Rule
O2 ,i = wi = µ Ai (x1 )µ Bi (x2 )
(for i=1,2)
wi
O 3 ,i = wi =
w1 + w 2
(for i=1,2)
O4,i = wi fi = wi ( pi x1 + qi x2 + ri )
∑w f i i
O 5 ,1 = ∑ wi fi = i
i ∑w i
i
• Note:
– Output is linear in consequent parameters p,q,r:
w1 w2
= f1 + f2
w1 + w 2 w1 + w 2
= w 1 ( p 1 x 1 + q 1 x 2 + r1 ) + w 2 (p 2 x1 + q 2 x 2 + r2 )
( ) ( ) ( ) (
= w 1 x 1 p 1 + w 1 x 2 q 1 + w 1 r1 + w 2 x 1 p 2 + w 2 x 2 q 2 + w ) ( ) ( )r
2 2
ω1 ω1
& N
Input 1 x1
& N
Σ Output
& N
Input 2 x2
& N
Layers: 0 1 2 3 4 5
24
©Copyright 2002 by Piero P. Bonissone
ANFIS Computational Complexity
25
©Copyright 2002 by Piero P. Bonissone
ANFIS Parametric Representation
• ANFIS uses two sets of parameters: S1 and S2
– S1 represents the fuzzy partitions used in the
rules LHS
{
S1= {a11,b11,c11},{a12,b12,c12},...,{a1p ,b1p ,c1p },...,{anp,bnp,cnp} }
– Backward pass:
• S2 is fixed and S1 is computed using a gradient
descent algorithm (usually Back-propagation)
27
©Copyright 2002 by Piero P. Bonissone
Structure ID & Parameter ID
where: X 0 = 0,
S 0 = γ I , (where γ is a large number )
a Ti = i th line of matrix A
b Ti = i th element of vector B
X * = Xk
30
©Copyright 2002 by Piero P. Bonissone
ANFIS Back-propagation
• Error measure Ek
(for the kth (1≤k≤K) entry of the training data)
N ( L)
Ek = ∑ i L ,i
( d
i =1
− x ) 2
where :
where :
κ
η= 2
is the learning rate
∂E
∑i ∂α
i
κ is the step size
∂ +E
is the ordered derivative
∂α i
32
©Copyright 2002 by Piero P. Bonissone
ANFIS Pros and Cons
33
©Copyright 2002 by Piero P. Bonissone
ANFIS Pros
Characteristics Advantages
Induced partial-
Smaller size
order is usually
training set +++
preserved
34
©Copyright 2002 by Piero P. Bonissone
ANFIS Cons
Characteristics Disadvantages
Translates prior
Surface oscillations
knowledge into Sensitivity to
around points (caused
network topology initial number
by high partition --
& initial fuzzy of partitions " P"
number)
partitions
35
©Copyright 2002 by Piero P. Bonissone
ANFIS Pros (cont.)
Characteristics Advantages
Uses LMS algorithm Uses fuzzy
to compute partitions to
polynomials discount outlier
coefficients effects
Automatic FLC
parametric +++
tuning
36
©Copyright 2002 by Piero P. Bonissone
ANFIS Cons (cont.)
Characteristics Disadvantages
Uses LMS algorithm Not possible to
Batch process
to compute represent known
disregards previous
polynomials
state (or IC) monotonic -
coefficients relations
37
©Copyright 2002 by Piero P. Bonissone
ANFIS Opportunities
• Changes to decrease ANFIS complexity
– Use “don’t care” values in rules (no connection
between any node of value layer and rule layer)
– Use reduced subset of state vector in partition tree
while evaluating linear functions on complete state
X = ( X r U X (n−r) )
39
©Copyright 2002 by Piero P. Bonissone
ANFIS Applications at GE
40
©Copyright 2002 by Piero P. Bonissone
ANFIS References
• “ANFIS: Adaptive-Network-Based Fuzzy Inference System”,
J.S.R. Jang, IEEE Trans. Systems, Man, Cybernetics,
23(5/6):665-685, 1993.
• “Neuro-Fuzzy Modeling and Control”, J.S.R. Jang and C.-T.
Sun, Proceedings of the IEEE, 83(3):378-406
• “Industrial Applications of Fuzzy Logic at General Electric”,
Bonissone, Badami, Chiang, Khedkar, Marcelle, Schutten,
Proceedings of the IEEE, 83(3):450-465
• The Fuzzy Logic Toolbox for use with MATLAB, J.S.R. Jang
and N. Gulley, Natick, MA: The MathWorks Inc., 1995
• Machine Learning, Neural and Statistical Classification
Michie, Spiegelhart & Taylor (Eds.), NY: Ellis Horwood 1994
• Classification and Regression Trees, Breiman, Friedman,
Olshen & Stone, Monterey, CA: Wadsworth and Brooks, 1985
41
©Copyright 2002 by Piero P. Bonissone