VIP Kolkata Call Girl Lake Gardens 👉 8250192130 Available With Room
ANFIS Model for Sinc Function
1. IMAT3406 Fuzzy Logic
Week 8
ANFIS
Adaptive Neuro-Fuzzy
Inference System
• See lecture notes 2 for further details
• Recommended book for adaptive fuzzy systems:
Neuro-Fuzzy and Soft Computing: A
Computational Approach to Learning and
Machine Intelligence
by Jang, Sun, & Mizutani
2. ANFIS
Adaptive neuro-fuzzy inference system
Layer 1 Layer 2 Layer 3 Layer 4 Layer 5
w1 w1 w 1f 1
A1
X ∏ N
A2
∑ O5,i = ∑ wi f i =
F
∑iwi f i
B1 ∏ N
i ∑iwi
Y w2 w2 w 2f2
B2
First-order Sugeno fuzzy model (2 inputs and 2 rules)
Rule 1: IF x is A1 AND y is B1 THEN f1=p1x+q1y+r1
Rule 2: IF x is A2 AND y is B2 THEN f2=p2x+q2y+r2
3. Layer 1 ANFIS
Premise parameters
O1,i = µ A ( x)
i
for i = 1,2
O1,i = µ Bi−2 ( y ) for i = 3,4
1 1
µ A ( x) = µ B ( y) = 2 bi
2 bi
x − ci y − ci
1+ 1+
ai ai
4. ANFIS
Layer 2
T-norm operator
O2,i = wi = µ Ai ( x) µ Bi ( y ), i = 1,2
T-norm operator that perform fuzzy AND
For j=1,2, ..n (n: # of inputs)
n
O = ∏ µ ( x j ) = µ ( x1 ).µ ( x2 ).....µ ( x j )....µ ( xn )
j =1
5. ANFIS
Layer 3
Outputs of the layer 3 are normalised firing strengths
wi
O3,i = w i =
w1 + w2
8. ANFIS
Two passes in the hybrid learning procedure
Forward Pass Backward Pass
Premise Fixed Gradient
Parameters descent
(nonlinear)
Consequent Least-square Fixed
parameters estimator
(linear)
Signals Node outputs Error signals
9. Gradient Descent learning for ANFIS
F = ∑ wi f i =
∑wf i i i
i=1,2,3, …R # of rules
i ∑w i i F is the calculated/estimated
output value (by ANFIS)
Error = e = (F – AO)2 AO = Actual/Real Output
∂e Gradient of ANFIS’s output:
0=
∂ ( x, y,....) Making ANFIS’s output (O)
closer to actual output (AO)
∂e This can be done by updating
a (t ) = a (t − 1) − η
∂a values of the parameters (e.g., a,
c,…) over t (iteration/step)
η = learning rate
10. Example
(Jang et al., Neuro-Fuzzy and Soft Computing, Prentice Hall, 1997)
ANFIS is used to model a two-dimensional sinc equation
defined by
sin( x) sin( y )
z = sin c( x, y ) =
xy
x and y are in the range [-10,10]
Number of membership functions for each input :4
Number of rules : 16
11. x y
Initial
membership
functions
Final
(trained)
membership
functions
after 100
epochs
12.
13. Example ANFIS
Rule 1: IF x is small (A1) AND y is small (B1) THEN f1=small
Rule 2: IF x is large (A2) AND y is large (B2) THEN f2=large
1 1
A1: µ A1 ( x) =
x −1
2 B1: µ B1 ( y ) = 2
f 1 = 0.1x + 0.1y + 0.1
1+ y−2
2 1+
2
1 B2: 1
A2: µ A 2 ( x) = µ B 2 ( y) = 2 f 2 = 10 x + 10 y + 10
x−9
2
y − 14
1+ 1+
2 2
Given the trained fuzzy system above and
input values of x=3 and y=4, find output of
the Sugeno fuzzy system