Upload
cecily-singleton
View
254
Download
8
Embed Size (px)
Citation preview
Neural-Network-Based Fuzzy Logical Control and Decision System
主講人 虞台文
Content Introduction Basic Structure of Fuzzy Systems Connectionist Fuzzy Logic Control and
Decision Systems Hybrid Learning Algorithm Example: Fuzzy Control of Unmanned Vehicle
Neural-Network-Based Fuzzy Logical Control and Decision System
Introduction
Reference
Chin-Teng Lin and C. S. George Lee, “Neural-network-based
fuzzy logic control and decision system,” IEEE Transactions
on Computers, Volume: 40 , Issue: 12 , Dec. 1991, Pages:132
0 – 1336.
Neural-Network & Fuzzy-Logic Systems
Neural-Network Systems– Highly connected PE’s (distributive representation)– Learning capability (Learning from examples)– Learning result is hardly interpretable– Efficient in pattern matching, but inefficient in computation
Fuzzy-Logic Systems– Inference based on human readable fuzzy rules– Linguistic-variable based fuzzy rules– Fuzzy rules from experienced engineers– Fuzzification before inference– Inference using compositional rule– Defuzzification before output
Neural-Network & Fuzzy-Logic Systems
Neural-Network Systems– Highly connected PE’s (distributive representation)– Learning capability (Learning from examples)– Learning result is hardly interpretable– Efficient in pattern matching, but inefficient in computation
Fuzzy-Logic Systems– Inference based on human readable fuzzy rules– Linguistic-variable based fuzzy rules– Fuzzy rules from experienced engineers– Fuzzification before inference– Inference using compositional rule– Defuzzification before output
The construction of fuzzy rule base & the
determination of membership functions are
subjective.
The construction of fuzzy rule base & the
determination of membership functions are
subjective.
Back-propagation learning algorithm is efficient if the appropriate network structure is used.However, the determination of the appropriate network structure is difficult.
Back-propagation learning algorithm is efficient if the appropriate network structure is used.However, the determination of the appropriate network structure is difficult.
Neuro-Fuzzy Systems
NeuralNetwork + Fuzzy
LogicGood for learning.
Not good for human to interpret its internal representation.
• Supervised leaning• Unsupervised learning• Reinforcement learning
Human reasoning scheme.
Fuzzy rules and membership functions are subjective.
• Readable Fuzzy rules• Interpretable
Neuro-Fuzzy Systems
NeuralNetwork + Fuzzy
LogicGood for learning.
Not good for human to interpret its internal representation.
• Supervised leaning• Unsupervised learning• Reinforcement learning
Human reasoning scheme.
Fuzzy rules and membership functions are subjective.
• Readable Fuzzy rules• Interpretable
A neuro-fuzzy system is a fuzzy system that uses a learn
ing algorithm derived from or inspired by neural netwo
rk theory to determine its parameters by processing da
ta samples.
A neuro-fuzzy system is a fuzzy system that uses a learn
ing algorithm derived from or inspired by neural netwo
rk theory to determine its parameters by processing da
ta samples.
Neuro-Fuzzy Systems
NeuralNetwork + Fuzzy
Logic
A neuro-fuzzy system is a fuzzy system that uses a learn
ing algorithm derived from or inspired by neural netwo
rk theory to determine its parameters by processing da
ta samples.
A neuro-fuzzy system is a fuzzy system that uses a learn
ing algorithm derived from or inspired by neural netwo
rk theory to determine its parameters by processing da
ta samples.
fuzzy sets and fuzzy rules
fuzzy sets and fuzzy rules
Neural-Network-Based Fuzzy Logical Control and Decision System
Basic Structure of Fuzzy Systems
Basic Structure of Fuzzy Systems
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge Base
Fuzzifier
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge Base
FuzzifierFuzzifier
Converts the crisp input to a linguistic variable using the membership functions stored in the fuzzy knowledge base.
Inference Engine
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge Base
Inference Engine
Inference Engine
Using If-Then type fuzzy rules converts the fuzzy input to
the fuzzy output.
Defuzzifier
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge Base
Converts the fuzzy output of the inference engine to crisp using membership functions analogous to the ones used by the fuzzifier.
DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge BaseFuzzy Knowledge Base
Fuzzy Knowledge Base
Fuzzy Knowledge Base
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Information storage for1. Linguistic variables definitions.2. Fuzzy rules.
Input/Output Vectors
X Y( ) X ( ) YFuzzifierFuzzifier Inference
Engine
Inference Engine DefuzzifierDefuzzifier
Fuzzy Knowledge Base
Fuzzy Knowledge Base
2
1, ,
1 1 2, , , ,, , , ,, i
i
i
i ii i i
kx
kx x xi
ixi
pxU M MT Tx MT
X
2
1, ,
21 1, , , ,, ,, , , i i
i ii ii iil
yi yq
yi
y yylT Ty MU T M M
Y
Fuzzy Rules
2
1, ,
1 1 2, , , ,, , , ,, i
i
i
i ii i i
kx
kx x xi
ixi
pxU M MT Tx MT
X
2
1, ,
21 1, , , ,, ,, , , i i
i ii ii iil
yi yq
yi
y yylT Ty MU T M M
Y
1 2MIMO MIMO MIMO, , , nR R R R
MIMO: multiinput and multioutput.
1
1
1
IMO 1M : and and
IF
THEN
is
is
and is and is
q
pxi
y q y
p x
y T y
T xR x T
T
1 1MIMO : qp yx
ix yT TTR T
Fuzzy Rules
1 2MIMO MIMO MIMO, , , nR R R R
MIMO: multiinput and multioutput.
1
1
1
IMO 1M : and and
IF
THEN
is
is
and is and is
q
pxi
y q y
p x
y T y
T xR x T
T
1 1MIMO : qp yx
ix yT TTR T
MIMO MISO
Fuzzy Reasoning
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Fuzzy Reasoning
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Rule Firing Strengths
1
11( )xM x
1
11( )xM x
1
21( )xM x
1
21( )xM x
2
12( )xM x
2
22( )xM x
2
12( )xM x
2
22( )xM x
2
1, ,
1 1 2, , , ,, , , ,, i
i
i
i ii i i
kx
kx x xi
ixi
pxU M MT Tx MT
X
2
1, ,
21 1, , , ,, ,, , , i i
i ii ii iil
yi yq
yi
y yylT Ty MU T M M
Y
1 =
2 =
3 =
4 =
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Fuzzy Sets of Decisions
1
11( )xM x
1
11( )xM x
1
21( )xM x
1
21( )xM x
2
12( )xM x
2
22( )xM x
2
12( )xM x
2
22( )xM x
2
1, ,
1 1 2, , , ,, , , ,, i
i
i
i ii i i
kx
kx x xi
ixi
pxU M MT Tx MT
X
2
1, ,
21 1, , , ,, ,, , , i i
i ii ii iil
yi yq
yi
y yylT Ty MU T M M
Y
1 =
2 =
3 =
4 =
1 ( )yM w
2 ( )yM w
3( )yM w
4 ( )yM w
1
2
3
4
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Fuzzy Sets of Decisions
1
11( )xM x
1
11( )xM x
1
21( )xM x
1
21( )xM x
2
12( )xM x
2
22( )xM x
2
12( )xM x
2
22( )xM x
2
1, ,
1 1 2, , , ,, , , ,, i
i
i
i ii i i
kx
kx x xi
ixi
pxU M MT Tx MT
X
2
1, ,
21 1, , , ,, ,, , , i i
i ii ii iil
yi yq
yi
y yylT Ty MU T M M
Y
1 =
2 =
3 =
4 =
1 ( )yM w
2 ( )yM w
3( )yM w
4 ( )yM w
1
2
3
4
11
1 ( ) ( )y yM w M w
22
2 ( ) ( )y yM w M w
33
3( ) ( )y yM w M w
44
4 ( ) ( )y yM w M w
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Fuzzy Sets of Decisions
11
1 ( ) ( )y yM w M w
22
2 ( ) ( )y yM w M w
33
3( ) ( )y yM w M w
44
4 ( ) ( )y yM w M w
1 2 3 4( ) ( ) ( ) ( ) ( )y y y y yM w M w M w M w M w
( )yM w
1 2
1 11 21
1 is is: IF TH and N is E yx xx T x y TR T
1 2
1 21 22
2 is is: IF TH and N is E yx xx T x y TR T
1 2
2 11 23
3 is is: IF TH and N is E yx xx T x y TR T
1 2
2 21 24
4 is is: IF TH and N is E yx xx T x y TR T
X DeffuzzifierDeffuzzifier y
Defuzzification Decision Output
11
1 ( ) ( )y yM w M w
22
2 ( ) ( )y yM w M w
33
3( ) ( )y yM w M w
44
4 ( ) ( )y yM w M w
( )yM w
DeffuzzifierDeffuzzifier
or( )( )
( )( )
j y jy j
y jy j
w M wwM w dwy
M wM w dw
General Model of Fuzzy Controller and Decision Making System
Neural-Network-Based Fuzzy Logical Control and Decision System
Connectionist Fuzzy Logic Control and Decision Systems
The Architecture
Layer 1input
linguistic nodes
Layer 2input term nodes
Layer 3rule
nodes
Layer 4Output term node
Layer 5output
linguistic nodes
1x 2x nx
1y 1ymy ˆmy
1x 2x nx
1y 1ymy ˆmy
The Architecture
Layer 1input
linguistic nodes
Layer 2input term nodes
Layer 3rule
nodes
Layer 4Output term node
Layer 5output
linguistic nodes
Fuzzifier
Inference Engine
Defuzzifier
1x 2x nx
1y 1ymy ˆmy
The Architecture
Layer 1input
linguistic nodes
Layer 2input term nodes
Layer 3rule
nodes
Layer 4Output term node
Layer 5output
linguistic nodes Fully
Connected
FullyConnected
1x 2x nx
1y 1ymy ˆmy
The Architecture
Layer 1input
linguistic nodes
Layer 2input term nodes
Layer 3rule
nodes
Layer 4Output term node
Layer 5output
linguistic nodes
antecedent
consquent
Basic Structure of Neurons
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
1 1,n ,et-input ; ),( ,k kp
k kpu wuf w
Layer k
output ( )kio a f
Layer 1 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
1if u
a f1x 2x nx
1y 1ymy ˆmy
1x 2x nx
1y 1ymy ˆmy
Layer 2 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
2 2
2
( )( , )
i
i ijjx ij ij
ij
u mf M m
fa ecenter
width
1x 2x nx
1y 1ymy ˆmy
Layer 3 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
3 3 31 2min , , , pf u u u
a f
1x 2x nx
1y 1ymy ˆmy
Layer 4 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
4 4
1
p
i ii
f w u
min(1, )a f
Down-Up Mode
{0, 1}
Layer 4 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
Up-Down Mode
5 2
2
( )( , )
i
i ijjy ij ij
ij
u mf M m
fa ecenter
width
1x 2x nx
1y 1ymy ˆmy
Layer 5 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
Up-Down Mode
if ya f
1x 2x nx
1y 1ymy ˆmy
Layer 5 Neurons()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
()f
()a
1ku 2
ku kpu
kio
1kw
2kw
kpw
Down-Up Mode
5
5
( ) ij
i
i ij
ij
umf
u
a f
1x 2x nx
1y ˆmy2y ˆmy
Neural-Network-Based Fuzzy Logical Control and Decision System
Hybrid Learning Algorithm
Initialization
1 2( ) ( ) ( )nT x T x T x rule nodes
1x 2x nx
1y 1y2y 2y
1x 2x nx
1y 1ymy ˆmy
Initialization
1 2( ) ( ) ( )nT x T x T x rule nodes
Two-Phase Learning Scheme
Self-Organized Learning Phase– Unsupervised learning of the membership func
tions.– Unsupervised learning of the rulebase.
Supervised Learning Phase– Error back-propagation for optimization of the
membership functions.
Unsupervised Learning of the Membership Functions
Step 1: First estimation of the membership function’s centers using Kohonen’s learning rule.
Step 2: The widths of the membership functions are estimated from the widths using a simple mathematical formula.
Note that the membership functions calculated are far from ideal but this is only a pre-estimation in order to create the rulebase.
1x 2x nx
1y 1ymy ˆmy
1x 2x nx
1y 1ymy ˆmy
Unsupervised Learning of the Membership Functions
Step 1: First estimation of the membership function’s centers using Kohonen’s learning rule.
Step 2: The widths of the membership functions are estimated from the widths using a simple mathematical formula.
Note that the membership functions calculated are far from ideal but this is only a pre-estimation in order to create the rulebase.
1 | ( )|
( ) ( ) min ( ) ( )winner ii T x
x t m t x t m t
( 1) ( ) ( ) ( ) ( )winner winner winnerm t m t t x t m t
fo( r1) ( ) i i i winnerm t m t m m
Winner-take-all:
1x 2x nx
1y 1ymy ˆmy
Unsupervised Learning of the Membership Functions
Step 1: First estimation of the membership function’s centers using Kohonen’s learning rule.
Step 2: The widths of the membership functions are estimated from the widths using a simple mathematical formula.
Note that the membership functions calculated are far from ideal but this is only a pre-estimation in order to create the rulebase.
1
22
1
1
2nearest
ni j
i j N i
m mE r
i closesti
m m
r
N-nearest-neighbors
Minimize
1-nearest-neighbors
r : overlay parameter
Unsupervised Learning of the Rulebase
Method:• Competitive Learning + Learn-if-win• Deletion of rule nodes• Combination of rule nodes
4 3( )ij j ij iw t o w o Learn-if-win:
1x 2x nx
1y 1ymy ˆmy
1x 2x nx
1y 1ymy ˆmy
Example of Combination of Rule Nodes
Supervise Learning Phase
Error back-propagation for optimization of the membership functions.
1x 2x nx
1y 1ymy
ˆmy 21
2ˆ( ) ( )E y t y t
Ew
w
( 1) ( )E
w t w tw
LearningRate
Supervise Learning Phase
Error back-propagation for optimization of the membership functions.
212
ˆ( ) ( )E y t y t Ew
w
E E f
w f w
( 1) ( )E
w t w tw
()f
()a
wHow w effects E?
How w effects f?
How f effects E?
Supervise Learning Phase
Error back-propagation for optimization of the membership functions.
212
ˆ( ) ( )E y t y t Ew
w
E E f
w f w
( 1) ( )E
w t w tw
()f
()a
w
aE f
fa w
How f effects E?
How f effects
a?
How f effects
a?How a effects
E?
How a effects
E?
How w effects E?
How w effects f?
Supervise Learning Phase
Error back-propagation for optimization of the membership functions.
212
ˆ( ) ( )E y t y t Ew
w
E E f
w f w
( 1) ( )E
w t w tw
()f
()a
w
aE f
fa w
error backpropagation
Learning Layer 5 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
y y
1x 2x nx
, iim 55 ˆa fy
55
5
( ) ii
i i
im uf
u
5
5
5
5i i
a
a
E E f
fm m
5
5
5
5i i
a
a
E E f
f
55 5
5
5
E E a
af f
Learning Layer 5 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
5ˆ( ) ( )
a
Ey t y t
5
5
1a
f
55
5i
iii
iu
m
f
u
5
5
5 ( )i i
i
i
ii i
m u
u
a
5
5ˆ( ) ( ) ii
ii
uy t y t
u
5 5 5 5
25ˆ( ) ( )
i ii i
i
ii i
i
iu u u uy t y t
u
m m
ˆ( ) ( )y t y t
55 ˆa fy
55
5
( ) ii
i i
im uf
u
5
5
5
5i i
a
a
E E f
fm m
55 5
5
5
E E a
af f
5
5
5
5i i
a
a
E E f
f
Learning Layer 4 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
y y
1x 2x nx
4 4 4
1
p
i j jj
f w u
4 4min(1, )iia f 55
ˆ( ) ( )E
y t y tf
5
5ˆ( ) ( )
Ey t y t
f
No need to learn.
No need to learn.4 {0,1}ijw
4 {0,1}ijw Error back-propagation only:
54
4 5 4ii i
E E f
f f f
5 5
4
4
4 4ii i
if f
af f
a
5
1 or 0
5iu
5 4
45i
ii
a
u
f
f
Learning Layer 4 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
4 4 4
1
p
i j jj
f w u
4 4min(1, )iia f
Error back-propagation only:
5
5iu
1 or 0
5
55
( ) jj
j
j
j j
jm
uf
u
5
5
5
2
5
5
i j i j
j
j j
j
i jj j
ij
u
u
m
u
f m u
54
4 5 4ii i
E E f
f f f
5 5
4
4
4 4ii i
if f
af f
a
5 4
45i
ii
a
u
f
f
5
2
5
5
5
5
1
10
j jj ji j i ji j
jj j
u u
iu
i
m mu
u
5 5
52
5
5
5
0
1
1
i j i j
j
j jj j
j
i
j
ju u
iu
m m
i
u
u
1x 2x nx
Learning Layer 3 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
55
4i
4i
3 3 3 3 31 2
3min , , , , jj p jf u au u f
No need to learn.
No need to learn.
3 {0,1}jkw 3 {0,1}jkw
Error back-propagation only:3
33 33
j
jj
j j
E E a
f a f
3 4j ja u
E E
1
4ju
44
4
40ij
i
w ji
f
u
E
f
14
i
4 {0,1}ijw 4 {0,1}ijw
4
4
0ij
iw
1x 2x nx
Learning Layer 2 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
55
4i
4i
3j
3j
2
22 ( )k
kk
x mf
22 kf
ka e
, kkm
2
2
2
2k
k
k k k
ka
m m
fE E
fa
2
2
2
2k
k
k k k
ka f
fa
E E
3ku
2 3k ka u
E E
3 {0,1}jkw 3 {0,1}jkw
33
0jkw j
E
f
3
3
0jk
jw
Learning Layer 2 Neurons
212
ˆ( ) ( )E y t y t E E f
w f w
( 1) ( )E
w t w tw
aE f
fa w
2
2
2kf
k
kae
f
2
2
2( )k
k k
kf
m
x m
2
3
2( )2
k
k
k
kf x m
2
22 ( )k
kk
x mf
22 kf
ka e
2
2
2
2k
k
k k k
ka
m m
fE E
fa
2
2
2
2k
k
k k k
ka f
fa
E E
3ku
2 3k ka u
E E
33
0jkw j
E
f
3
3
0jk
jw
2
32
3
0
2( )k
jk
kfj
w k
xe
m
2
33
23
0
2( )k
jk
k
k
fj
w
x me
Neural-Network-Based Fuzzy Logical Control and Decision System
Example: Fuzzy Control of Unmanned Vehicle
The Fuzzy Car
0x 1x
2 ,x y
0x0x 1x1x
2 ,x y2 ,x y
The Fuzzy System Learned
0x0x 1x1x
2 ,x y2 ,x y
The Fuzzy Rules Learned
10 1
10
0
6
20
1IF and is is
is
and
TEHN
is
x xx
y
x T
y
xT
T
Tx10 1
10
0
6
20
1IF and is is
is
and
TEHN
is
x xx
y
x T
y
xT
T
Tx
The Membership Functions Learned
0x0x 1x1x
2 ,x y2 ,x y
The Membership Functions Learned
0x0x 1x1x
2 ,x y2 ,x y
Learning Curves
Learning rate 0.15
Error tolerance 0.01
Simulation