WSO2's API Vision: Unifying Control, Empowering Developers
Intelligent Process Control Using Neural Fuzzy Techniques ~陳奇中教授演講投影片
1. Intelligent Process Control
Using Neural Fuzzy Techniques
模糊類神經控制系統設計
陳奇中
Chyi-Tsong Chen
ctchen@fcu.edu.tw
Department of Chemical Engineering
Feng Chia University
逢甲大學化工系
2. Outlines
1 Introduction
2 Review on fuzzy control system:
concepts and design
3 Design of a neural fuzzy control
system for complex processes
4 Application to nonlinear chemical
process control
5 Conclusions and future prospect
3. 1 Introduction
Conventional control strategies and
limitations
• structure and design methodologies
• open-loop control
− manual control
− suitable for process whose mathematical
model is hard to characterize precisely
4. • Closed-loop control
system
− use system output error to generate control
signal
− automatic control
− widely used algorithm: PID type controller
for continuous system
⎡ 1 de ( t ) ⎤
∫0 e ( t ) dt + τ D
t
u (t ) = k c ⎢ e (t ) +
⎣ τI dt ⎥ ⎦
for discrete system
⎡ Ts k τ ⎤
u(k ) = kc ⎢e(k ) + ∑ e(i) + D (e(k ) − e(k − 1))⎥
⎣ τ I i =0 Ts ⎦
k c : proportional gain
τ I : integral time constant
τ D : derivative time constant
TS : sampling time
5. New challenges:
Extremely nonlinearities
Unmeasurable uncertainties
Unknown or imprecisely known
dynamics
Time-varying parameters
Multi-objectives
Modeling problem
Controller parameter's tuning problem
Control performance degradation
Motivation: Searching for new approaches
for complex process control
⇒ 人工智慧
Artificial Intelligence (AI)
7. 2 Conventional Fuzzy Control
System: Concept and Design
Fuzzy logic
• Fuzzy concepts and statements
Examples:
1. Ben is very tall.
2. John is a handsome boy.
3. Today is very very cold.
4. (1) Please find a man with 101 hairs and 54321
beard.
(2) Please find a bald and full beard man.
5.
⇒ Precision statement may lose meaning in some
cases.
⇒ Significance statement can reflect human's thought
and concept more naturally.
8. Classical Set Theory and Fuzzy Set
Comfortable Temperature ?
Classical Set Theory
⎧ x ∈ A, S A (x) = 1
⎨
⎩ x ∉ A, S A (x) = 0
x=15, xA(x)=1, Belongs to the set of
comfortable
x=14.9, xA(x)=0, NOT belongs to the set of
Comfortable, but belongs
to the set of cold.
⇒ Unreasonable
9. Fuzzy Set Theory (Zadeh, 1965)
Describe Fuzzy concepts and phenomena
Use membership function to represent the degree of
membership of an element in a certain fuzzy set
0 ≤ μ A (x ) ≤ 1
A: comfortable; B: cold; C: hot
μ A (15) = 0.5 degree of membership in A is 0.5
μ B (15) = 0.5 degree of membership in B is 0.5
μC (15) = 0 degree of membership in C is 0 (not belongs to)
μ A (14.9) = 0.45 degree of membership in A is 0.45
μ B (14.9) = 0.55 degree of membership in B is 0.55
μC (14.9) = 0 degree of membership in C is 0 (not belongs to)
10. Commonly used membership functions
1. Z functions
z1: μ(x,az) z2: μ(x,az,bx) z3 (Z-shape function)
2. S functions
S1: μ(x,as) S2: μ(x,as,bs) S3 (S-shape function)
13. Some typical fuzzy rules and their
reasoning methods
linguistic form formal representation
(一) If temp is high,
then add some cold water. If A then B
(二) If water level is high,
then decrease feeding rate, else
maintain the feeding rate. If A then B else C
(三) If error is large and
the error change is large,
then increase the heating rate. If A and B then C
14. Fuzzy Reasoning Methods
Type (一) If A then B
Fuzzy rule: If x=A then y=B
Now: x=A’
Conclusion: y=B’=?
B’=A’ 。(A→B)
μ B ' ( y ) = V {μ A' ( x ) ∧ [ μ A ( x ) ∧ μ B ( y )]}
x
= V {μ A' ( x ) ∧ μ A ( x )} ∧ μ B ( y )
x
= α ∧ μB ( y)
15. Type (二) If A then B else C
Fuzzy rule: If x=A then y=B else y=C
Now: x=A’
Conclusion: y=B’
"Fuzzy relation"
R = ( A × B) U ( A × C )
μ R ( x, y ) = [ μ A ( x ) ∧ μ B ( y )] ∨ [(1 − μ A ( x )) ∧ μC ( y )]
"Fuzzy implication"
B ' = A'o R
= A'o[( A × B ) U ( A × C )]
16. Type (三) If x1=A and x2=B then y=C
Fuzzy rule: If x = A and x = B then y = C
1 2
Now: x = A′ and x = B′
1 2
Conclusion: y = C ′ = ?
C ' = ( A' and B' ) o [( A and B) → C ]
μ C ' ( y) = α A ∧ α B ∧ μ C ( z )
where
α A = V ( μ A' ( x1 ) ∧ μ A ( x1 ))
x
α B = V ( μ B ' ( x2 ) ∧ μ B ( x2 ))
x
17. Multiple rules
Rule 1: If x1 = A1 and x2 = B1 then y = C1
Rule 2: If x1 = A2 and x2 = B2 then y = C2
Rule n: If x1 = An and x2 = Bn then y = Cn
Now: x1 = A′ and x2 = B′
Conclusion: y = C ′ = ?
⇒ inferring output from each rule
Ci ' = ( A' and B' ) o [( Ai and Bi ) → Ci ]
μC ' ( y ) = α A ∧ α B ∧ μC ( z )
i i i i
⇒ where
α Ai = V ( μ A' ( x1 ) ∧ μ Ai ( x1 ))
x
α B = V ( μ B ' ( x 2 ) ∧ μ B ( x 2 ))
i i
x
⇒ OUTPUT:
C ' = C1 '∪C2 '∪... ∪ Cn '
μC ' ( y ) = max(μC1 ' ( y ), μC2 ' ( y ), ..., μCn ' ( y ))
18. EXAMPLE: two rules system
μC ' ( y ) = α A ∧ α B ∧ μC ( y )
1 1 1 1
μC ' ( y ) = α A ∧ α B ∧ μC ( y )
2 2 2 2
19. Pioneer of fuzzy logical control (FLC)
E. Mamdani and S. Assilian (1974)
─ Steam Engine Control
• Input variables: pressure error (E) and the rate of pressure
error (CE)
E = P-Psp and &
CE = E
• Output variable (control input): change of heating rate (ΔU)
• Fuzzy sets: 7 linguistic terms for each variable
PB (positive big)
PM (positive medium)
PS (positive small)
ZE (zero)
NS (negative small)
NM (negative medium)
NB (negative big)
20. control rules:
extracted from operation experiences
• For examples
rule 1: IF E is PS and CE is ZE, then U is NS
rule 2: IF E is ZE and CE is ZE, then U is ZE
rule 3: IF E is PS and CE is NS, then U is NS
22. Fuzzy Control Configuration
Fuzzy Controller (模糊控制器)
+ e E
yd Inference U u
• Fuzzifier Defuzzifier plant
− e EC Engine y
(模糊化) (解模糊化) (受控系統)
de/dt (推理引擎)
Fuzzy rule Base
(規則庫)
Fuzzification
transferring crisp measured data into suitable
linguistic values (fuzzy sets)
Fuzzy rule base
store the empirical knowledge of the operation of the
process of the domain expert
Inference engine
the kernel of fuzzy logical control
simulating human decision making
Defuzzification
yield a non-fuzzy decision or control action from an
inferred fuzzy action by the inference engine
23. Features of the FLC
A model-free approach
Represent a means of
both collecting human
knowledge and expertise
Has the ability of dealing
with nonlinearities and
unknown dynamics
24. Problems of using FLC
The derivation of fuzzy rules is
often time consuming and difficult.
The system performance relies to
a great extent on so-called experts
who may not be able to transcribe
their knowledge into the requisite
rule form.
There exists no formal framework
for the choice of the parameters of
a fuzzy system.
The static fuzzy controller has no
mechanisms for adapting to real-
time plant change.
25. Motivation
⇒ Bringing the learning abilities of the
neural networks to automate and realize
the design of fuzzy logical control systems
Advantages of the combination of these
two techniques:
• The fuzzy logic systems provide a
structure framework with high-level
fuzzy IF-THEN rule thinking and
reasoning to the neural network.
• The neural networks provide the
connectionist structure (fault tolerance
and distributed representation
properties) and learning ability to the
fuzzy logical systems.
26. Comparisons of FLC, MNN and CCT
(Fukuda and Shibata, 1994)
Fuzzy N e u ra l C o n v e n tio n a l
S y s te m N e tw o rk C o n tro l
(F L C ) (M N N ) T h e o ry (C C T )
L e a rn in g A b ility B G B
K n o w le d g e G B SB
R e p r e s e n ta tio n
E x p e rt K n o w le d g e G B SB
N o n lin e a rity G G B
O p tim iz a tio n B SG SB
A b ility
F a u lt To le r a n c e G G B
Good (G); Slihtly Good (SG); Slightly Bad (SB); Bad (B)
27. Introduction to Artificial Neural
Networks
Structure of a neuron
An artificial neuron
y = f (∑ wi xi + θ )
29. A feedforward neural network
— Structure
input layer
receive signals from external environment
hidden layer
receive signals from the input layer and
transmit output signals to a subsequent layer
output layer
transmit output signals to environment
30. Operations of an artificial
neural network
1. training or learning phase
— Useinput-output data to update the
network parameters (interconnection
weights and thresholds)
2. recall phase
— Givenan input to the trained network
and then generate an output
3. generalization (prediction) phase
— Given a new (unknown) input to the
trained network and then gives a
prediction
31. Properties (advantages) of
MNN
1. It has the ability of approximating
any extremely nonlinear functions.
2. It can adapt and learn the dynamic
behavior under uncertainties and
disturbances.
3. It has the ability of fault tolerance
since the quantity and quality
informations are distributedly stored
in the weights and thresholds
between neurons.
4. It is suitable to operate in a massive
parallel framework.
32. 3 Design of a neural fuzzy
control system
Control system structure
−
yd(t) + e(t) x1 u*(t) u(t) y(t)
K3 plant
NFC +
ce(t) x2
de/dt
− ∧
y (t)
MNN
learning mechanism
34. Input-output behavior of the NFC
(1) Layer 1 (input layer)
I i(1) = xi , i = 1, 2
oi(1) = xi ,i = 1,2
(2) Layer 2 (linguistic term layer)
( xi − a i k ) 2
I ( 2)
ik =− 2
, i = 1,2; k = 1,2,L,n
bik
oi(k2) = μ Aij = exp(I i(k2) ), i = 1,2; k = 1,2,L,n
(3) Layer 3 (Rule layer)
ol( 3) = o22 ) o1 2 ) , l = 1, 2, L, n ; j = 1, 2, L, n
j
(
l
(
j
oi( 3) = μ i = I i( 3) , i = 1, 2, L , m (= n 2 )
(4) Layer 4 (Output layer)
m
I ( 4)
= ∑ o (p3) wp
p =1
I (4)
o (4)
= u∗= m
, j = 1, 2, L, m
∑ o (j3)
j =1
35. A learning algorithm for the NFC
System performance function (error function)
1
Ec = ( yd − y ) 2
2
Steepest descent algorithm
∂E
w υ ( k + 1) = w υ ( k ) − η + β Δw υ ( k )
∂ wυ
∂E
a i j ( k + 1) = a ij ( k ) − η + β Δa i j ( k )
∂ a ij
∂E
bi j (k + 1) = bi j (k ) − η + β Δbi j (k )
∂ bi j
where
∂E ∂ E ∂ y ∂ u*
=
∂ wυ ∂ y ∂ u * ∂ wυ
∂ y o (j3)
= −( y d − y )
∂ u* ∑
m
p =1
o (p3)
36. ∂E ∂ E ∂ y n
∂ u* ∂ o((3−1)n+l ∂ o1(2) ∂ I 1(2)
)
= ∑∂ o
j j j
∂ a1 j ∂ y ∂ u* l =1
( 3)
( j −1) n +l ∂ o1(2) ∂ I 1(2) ∂ a1 j
j j
∂ y 2(o1 j − a1 j ) o1 j
(w )
(1) ( 2) n
∑o ∑ o (p3) − ∑p=1 o (p3) wp ,
m m
= −( y d − y) * ( 2)
( j −1) n +l j = 1, 2, L, n
∂ u b12j (∑m o (p3) ) 2 p =1
2l
l =1
p =1
∂E ∂ y 2(o2 j − a 2 j ) o2 j
(w )
(1) ( 2) n
∑o ∑ o (3) − ∑p =1 o (p3) w p ,
m m
= −( y d − y) * ( 2)
( l −1) n + j j = 1, 2, L, n
∂ a2 j ∂ u b2 j (∑m o (p3) ) 2 p =1 p
1l
2
l =1
p =1
∂E ∂ y 2(o1 j − a1 j ) o1 j
(w )
(1) 2 (2) n
∑o ∑ o(3) − ∑p=1 o(p3) wp ,
m m
= −( yd − y) * (2)
j = 1, 2, L, n
∂ b1 j (
∂ u b3 m o(3) 2
1 j ∑p=1 p ) l =1
2l ( j −1)n+l p=1 p
And
∂E ∂ y 2(o2 j − a2 j ) o2 j
(w )
(1) 2 ( 2) n
∑o ∑ o (3) − ∑p=1 o (p3) wp ,
m m
= −( y d − y) * ( 2)
j = 1, 2, L, n
∂ b2 j (
∂ u b3 m o (3) 2
2 j ∑p =1 p ) l =1
1l ( l −1) n + j p =1 p
NOTE:
The only unknown in the learning algorithm is the
system response gradient ∂y
∂u *
⇒ MNN-based estimator
37. An MNN-based estimator (Chen and Chang, 1996)
plant
y(t)
+
u(t) −
S11
.
. j
. w2i j i
S1k .
.
. w3i
∧
S1, k +1 .
.
. y (t)
.
. MNN
.
S1, m1
Input-output behavior of the MNN
⎧ y (t − j + 1), 1≤ j ≤ k
Input layer: S1 j = ⎨
⎩u(t − j + k + 1), k + 1 ≤ j ≤ m1
m1 ~
Hidden layer: net 2i = ∑ w2i j S1 j − θ 2i ,
~ i = 1,2,L,m2
j =1
− net2i
1− e
S 2i = − net 2i
, i = 1,2,L,m2
1+ e
m2
Output layer: net3 = ∑ w3i S 2i − θ 3 ,
~
i =1
∧ ~
a (1 − e −net3 )
y=
1 + e −net3
38. A learning algorithm for the MNN-based
estimator
Error function
1 ∧
E m
= ( y − y) 2
2
Steepest descent algorithm
∧ ~ ~
~ (k + 1) = w (k ) + η ( y − y )δ w δ S + β Δ w (k )
w2ij ~ ~ ~
2ij 3 3i 2i 1 j 2ij
∧ ~ ~
~ ( k + 1) = w ( k ) + η ( y − y )δ S + β Δ w ( k )
w3i ~ ~
3i 3 2i 3i
~ ~ ∧ ~ ~
~( y − y)δ w δ + β Δθ (k )
θ 2i (k + 1) = θ 2i (k ) + η ~
3 3i 2i 2i
~ ~ ∧ ~ ~
~ ( y − y )δ + β Δ θ (k )
θ 3 (k + 1) = θ 3 (k ) + η 3 3
∧
∧
~ (k + 1) = a (k ) + η ( y − y ) y + β Δ a (k )
a ~ ~ ~ ~
~
a
where
1
δ 2i = (1 − S 2i ) (1 + S 2i )
2
∧ ∧
1~ y y
δ 3 = a (1 − ~ ) (1 + a )
~
2 a
39. System's gradient prediction
∧ ∧
∂y ∂ y ∂ y m2 ⎛ ∂ net3 ∂ S2i ∂ net2i ∂ S1, q +1 ⎞
≈
∂u
= ∑ ⎜ ∂ S ∂ net ∂ S
⎜
∂ net3 i =1 ⎝ * ⎟
⎟
∂u 1, q +1 ∂ u
* *
2i 2i ⎠
m2
= δ 3 K3 ∑ w3i δ 2i w2,i , q +1
~ ~
i =1
41. 4 Application to nonlinear process
control
An nonlinear CSTR (Ray, 1981)
Dynamic equations:
• x2
x1 = − x1 + D a (1 − x1 ) exp( )
1 + x2 / ϕ
• x2
x 2 = −(1 + δ ) x 2 + BD a (1 − x1 ) exp( ) +δu
1 + x2 / ϕ
x1 d im e n s io n le s s r e a c ta n t c o n c e n tr a tio n
x2 d im e n s io n le s s re a c to r te m p e ra tu re
u c o o lin g ja c k e t te m p e ra tu re
Da D a m k ö h le r n u m b e r
ϕ a c tiv a tio n e n e rg y
B h e a t o f re a c tio n
δ h e a t tr a n s fe r c o e ffic ie n t
Nominal system parameters (Chu et al., 1992)
Da = 0.072, ϕ = 20.0, B = 8, δ = 0.3
42. Equilibrium points
( x1 , x2 ) A = (0144,0.886)
.
(stable)
( x1 , x2 ) B = (0.445, 2.750)
(unstable)
( x1 , x2 ) c = (0.765, 4.705)
(stable)
( x1 , x2 ) A ( x1 , x2 ) B
— Control objective: →
43. Performance test and comparison
— Parameter uncertainties ( δ : 0.3 → 0.35; B :8 → 7.5)
44. — Unmeasured disturbance rejection (d=0.5)
— Handling hard input constraint ( − 2 ≤ u ≤ 2 )
46. 5 Conclusions and future
prospect
Conclusions
The advantages of the neural fuzzy control
system:
Combines the benefits of fuzzy logical system (knowledge
representation and reasoning) and neural networks (fault
tolerance and learning ability)
Provides an effective intelligent approach to complex
process control
without any a priori process knowledge
model-free direct control
be able to deal with uncertainties and nonlinearities
directly
Future prospect
stability analysis
application to multivariable process control
Self rules reduction and extraction