Nik

Dynamic Neural Network Control (DNNC): A Non-Conventional Neural Network Model
Masoud Nikravesh
EECS Department, CS Division
BISC Program
University of California
Berkeley, California
Abstract:
In this study, Dynamic Neural Network Control methodology for model identification
and control of nonlinear processes is presented. The methodology uses several
techniques: Dynamic Neural Network Control (DNNC) network structure,
neuro-statistical (neural network & non-parametric statistical technique such as
ACE; Alternative Conditional Expectation) techniques, model-based control
strategy, and stability analysis techniques such as Liapunov theory. In this
study, the DNNC model is used because it is much easier to update and adapt the
network on-line. In addition, this technique in conjunction with
References:
Levenberge-Marquardt algorithm can be used as a more robust technique for network
training and optimization purposes. The ACE technique is used for scaling the
1. M. Nikravesh, A. E. Farell, T. G. Stanford, Control of Nonisothermal CSTR with
network s input-output data and can be used to find the input structure of the
time varying parameters via dynamic neural nework control (DNNC), Chemical
network. The result from Liapunov theory is used to find the optimal neural
Engineering Journal, vol. 76, 2000, pp. 1-16.
network structure. In addition, a special neural network structure is used to
insure the stability of the network for long-term prediction. In this model, the
2. M. Nikravesh, Artificial neural networks for nonlinear control of industrial
current information from the input layer is presented into a pseudo hidden layer.
processes, " Nonlinear Model Based Process Control", Book edited by Ridvan Berber
This model minimizes not only the conventional error in the output layer but also
and Costas
minimizes the filtered value of the output. This technique is a tradeoff between
Karavaris, NATO Advanced Science Institute Series, Vol 353, 1998 Kluwer Academic
the accuracy of the actual and filtered prediction, which will result in the
Publishers, pp. 831-870
stability of the long-term prediction of the network model. Even though, it is
clear that DNNC will perform better than PID control, it is useful to compare PID
3. S. Valluri, M. Soroush, and M. Nikravesh, Shortest-prediction-horizon nonlinear
with DNNC to illustrate the extreme range of the non linearity of the processes
model-predictive control, Chemical Engineering science, Vol 53, No2, pp. 273-292,
were used in this study. The integration of the DNNC and the
1998.
shortest-prediction-horizon nonlinear model-predictive control is a great
candidate for control of highly nonlinear processes including biochemical
reactors.
Dynamic Neural Network Control (DNNC):
A Non-Conventional Neural Network Model
Masoud Nikravesh
EECS Department, CS Division
BISC Program
University of California
Berkeley, California
Dynamic Neural Network Control (DNNC)
1. Introduction
2. Theory
3. Applications and
Results
4. Conclusions
5. Future Works
ym (k)
W1(N+1)
u(k)
W11
u(k-1)
W12
B1
B2
1
1
W2
u(k-M+1)
W1M
BM
1
BN
u(k-N+1)
W1N
1
y(k+1)
IMC
d
ysp
+
w
e’
Q
u
y
+
P
+
d
P
y
+
Modified IMC, Zheng
ysp
+
d
et al. (1994)
e’
Q1
w1
+
u
w
P
+
-
-
y
+
w2
d
Q2
P
y
To address integral windup.
+
Non-linear model state-feedback control structure
d
ysp
+
e’
-
w’1
Q’1 +
w’2
w
u
y
+
P
+
d
P
Q’2
x=f(x)+g(x) u
x
h(x(t-)
-
y
+
On-Line
Adaptation
P
Controller
Pressure
Trajectory
q
Pressure
Setpoint
Model
Filter
Controller
CA
CA
Trajectory
qc
CA
Setpoint
Model
Filter
Model Predictive Control
j
y ( k  j)   ai u( k - i + j) + y* ( k  j) + d( k + j)
i 1
*
y ( k  j)  yo ( k  j) 
N

ai u( k  j  i)
i  j1
yo ( k  j)  a N u( k  N  j  1)
d( k) = y m ( k) - y ( k)
Y
ai
Time
i
k
y(k)
u(k)
d(k)
ai
N
= discrete time
= model output
= change in the input (manipulated variable) defined as u(k)- u(k-1)
= unmodelled disturbance effects on the output
= unit step response coefficients
= number of time intervals needed to describe the process dynamics (Note: )
ai  a N
for i  N
ym(k)
= current feedback measurement
y* (k+j) = predicted output at k+j due to input moves up to k.
In the absence of any additional information, it is assumed that
d( k  j)
 d( k)
u( k  1)
u( k  2)
 y( k  1)   u( k )
 y( k  2)   u( k  1)
u( k )
u( k  1)

 
 y( k  3)   u( k  2)
u( k  1)
u( k )

 




 
y( k  N ) u( k  N  1) u( k  N  2) u( k  N  3)

 




 
 y( K  P ) 
0
0
0

 
y(k + j)
 u( k  N  1) 
 u( k  N  2) 
 u( k  N  3) 




u( k )




 u( k  P  N ) 
= y(k + j) - yo (k + j)
y = U a d
1
 a1 
0 1  
a2



0 1
  a3 
0 1  
 
    
 aN 
0 1  
 
   
a
u( k  1) 1  P 1 
d( k )
(13)
The Backpropagation Neural Network
(i)
z(i) = x1 w1 +
x2
(i)
w2
+    + xN
for i = 1 ,..., P.
 x1(1)
 z (1) 
 (2)
 (2) 
z
 x1
 
 
  
  = 
 
  
 
  
 (P)
 (P) 
z
 
 x1
(1)
  
xN
(1)
(2)
   xN
(2)
x2
x2

  


  


  

x2
   xN
(P)
1

1





1
(P)
y1  F ( z ).
z = X
1
w =
X1 =
w = X
w


T
T
w | 
X

| 1
 w1 
w 
 2
  
 
  
  
 
w N 
  
 
(i)
wN + 
Comparing DMC with the neural
network, the following analogy may
be drawn,
y  z
U 1  X 1
w  ad .
The DNNC Process Model
y( k  1)  y ( k  1)  a1 (k) u( k)  d( k  1)
e( k  1)  a1 (k) u( k)
y( k  1)  a1 ( k )  u( k ) + a 2 ( k )  u( k  1) + a 3 ( k )  u( k  2)
+ ...+ a N ( k )  u( k  1  N ) + a N ( k )  u( k  N )
+ d(k + 1)
d( k  1)  y m ( k  1)  y( k  1)
d( k  1)  ( k) y m ( k) - (k) y(k)
d ( k  1)   (k) - (k) y m ( k ) + (k) d(k)
d( k  1)  ( k) y m (k) + (k) d(k).
The DNNC Process Model
y( k  1)  a1 ( k )  u ( k ) + a 2 ( k )  u ( k  1) + a 3 ( k )  u ( k  2 )
+ ...+ a N-1 (k) u(k - N + 2) + a N ( k )  u ( k  N  1)
+ ( k ) y m (k) + ( k ) d(k)
= a(k) T  uy(k) + (k) d(k)
y( k  1)  g(  uy(k),a(k))
State-Space Representation of DNNC
y( k  1)  w
( w1T  uy  B )  B
2
1
2
 uy = [u(k) u(k - 1)    u(k - N + 2) u(k - N + 1) y m (k)]T
w 1 = [ w11 w12 ... w1N
( z) 
w1N+1 ]T
e z  ez
e z  ez
y( k  1)  w 2 ( w1 uy  B1 )  B2
T
uy = [u(k) u(k -1)    u (k - N + 2) u(k - N + 1) y(k)]T
w1 = [ w11 (w12 - w11 ) ...
(w1N - w1 N-1 ) w1N+1 ]T
State-Space Representation of DNNC
x( k  1)  f ( x( k ))  g( x( k ), u( k )),


y( k )  h z 1  x( k ), u( k ) ,
y( k  1)  h( x( k ), u( k ))
x( k )   x1 ( k ) x 2 ( k )  x N 1 ( k ) x N ( k )
T
=  u(k -1) u( k  2)  u( k  N  1) y( k )
x( k  1)   x1 ( k  1) x 2 ( k  1)
=  u(k)
u( k  1)
=  u(k)
x1 ( k )
 x N 1 ( k  1) x N ( k  1)
T
 u( k  N  2) y( k  1)
T
 x N-2 ( k ) h(x( k ), u( k ))
T
T
State-Space Representation of DNNC
f ( x( k ))  0 x1 ( k ) x 2 ( k )    x N 2 ( k )
0
T
g( x( k ), u( k ))   u( k ) 0 0    0 0 h( x( k ), u( k ))
h( x( k ), u( k ))  y( k  1)  w 2 ( w1
T
uy  B1 )  B2
T
Stability of the DNNC Process Model
JY
0
0 0
1 0
0

0
0 1


 
0 0
0

0
0 0
1  2  3

0
0
0



0
0
0


0
0
0








0
0
0


1
0
0

2
  N  2  N  1 w 2  w1N  1   1  y1( k )  
y1( k )   ( w 1
T

uy  B1 )
 j  w 2  w 1, j  1  y1( k ) 2

w 1, j  w1j1  w1j
j  1,..., N - 1
 =  1  y1( k) 2 . w1N 1 w 2
DNNC Controller
 1 ( k )  B 2 

T
C
C
 - B1  (  w 1 ) uy 
  w



2
u( k ) 
w 1,1
 w1C = [ w1,1 w1,2 ... w1,N-1 w1,N1 ]T
uyC = [ u(k -1) u(k - 2) ... u(k - N + 2) u(k - N +1) y(k)]T
( k)  ( k  1)  (1  ) yset ( k)  d( k)  y( k)
d( k)  y m ( k)  y( k)
 1- z 
 ( z )  0.5 ln 
1 + z 
1
Stability of the DNNC Process Model

 1  2  3
1 0 0

0 1 0
x( k  1) =  


0 0 0

0 0 0
0 0 0
 x1 ( k ) 
 x (k) 
2


x
 3 (k) 


 +
 x N 2 ( k ) 


x
(
k
)
N

1


 x N ( k) 
j 
  N 2  N 1






0
0

0
1
0
0
0

0
0
0
 w1N 1 
w11 
0 

0 



0 

0 
0 
 R 
 0 


 0 
  
 0 


0
 set 
 ( k ) 
 w 1, j
w11
 set ( k )  B2 
 
  B1
w2


R
w11
1
Stability of the DNNC Process Model
JU

 1  2  3
1 0 0

0 1 0
=   

0 0 0

0 0 0
0 0 0
  N  2  N 1






0
0

0
1
0
0
0

0
0
0
 w1N 1 
w11 

0

0




0

0

0

N1  1  N2   2  N3       N2     N1  0
Extension of the DNNC Model
to the MIMO Case in IMC Framework
y( k  1)  w 2 F( W1 uy( k )  B1 )  B 2
uy = [ uy (1) (k) uy (2) (k) ... u (j) (k) ] T
uy ( j) = [ u (j) (k) u (j) (k) ... u (j) (k - N i + 1)
y(k + 1) = [ y (1) (k + 1)
W1
w
i, j
 w 1,1
w
2 ,1
= 
 

 w j,1
 [ w i,1
w
y (2) (k + 1)
w 1, 2
w 2, 2

w j, 2
i,2
T
y (j)
m (k) ]
. . . y (j) (k + 1) ]T
   w 1, j 
  

  

   w j, j 
. . . w i,N j
w i,N j 1 ] T
Neuro-Statistical Model


W  J J +  I

T
2
-1
W  J   J +  
T
T
T

T
J e
-1
1

 V
T
m
1
 =
V
e i  k e j k

ij
2m  1 k  m
 =  2 I
V
  W  k 
W
J  e
T
T
Max-Std(Max)
Min+Std(Min)
Mean-Std(Mean)
Mean+Std(Mean)
Distribution of
Min
Distribution of
Max
Distribution of
Mean
Max-2*Std(Max)
Min+2*Std(Min)
Mean-2*Std(Mean)
Mean+2*Std(Mean)
Distribution of
Min
Distribution of
Max
Distribution of
Mean
Neural Network Prediction
Actual
Mean
Mean+Std
Mean-Std
Upper
Lower
1.0
0.8
0.6
0.4
0.2
0.0
0.0
0.2
0.4
0.6
0.8
1.0
Upper
Lower
Actual
Neural Network Prediction
Actual
Mean
Mean+Std
Mean-Std
1.0
0.8
0.6
0.4
0.2
0.0
0
5
10
Data Points
15
20
4.5
Upper
4
3.5
3
Mean
Actual
2.5
2
MPV
1.5
Lower
1
0.5
0
0
5
10
15
20
ym (k)
W1(N+1)
u(k)
W11
u(k-1)
W12
B2
B1
F(k)
1
1
W2
F(k-1)
F(k-2)
y(k+1)
F(k-3)
nonlinear
linear
transfer function transfer function
u(k-M+1)
P(k+1)
F(k-4)
W1M
P(k)
P(k-1)
P(k-2)
u(k-N+1)
P(k-3)
P(k-4)
W1N
ym (k)
F(k)
F(k-1)
F(k-2)
F(k-3)
P(k+1)
W1(N+1)
u(k)
W11
u(k-1)
W12
B2
1
1
W2
Pc(k+1)
F(k-4)
P(k)
P(k-1)
B1
u(k-M+1)
W1M
P(k-2)
BM
1
BN
P(k-3)
P(k-4)
Z(-1)
Z(-2)
u(k-N+1)
W1N
1
Z(-3)
Z(-4)
Z(-5)
y(k+1)
F(k)
F(k-1)
F(k-2)
F(k-3)
P(k+1)
F(k-4)
P(k)
P(k-1)
P(k-2)
P(k-3)
P(k-4)
Wellhead Pressure, psi
820
800
Neural Network
Prediction
780
760
740
Actual data
720
0
250
500
Sampling Time
750
F(k)
F(k-1)
F(k-2)
F(k-3)
P(k+1)
Pc(k+1)
F(k-4)
P(k)
P(k-1)
P(k-2)
P(k-3)
P(k-4)
Z(-1)
Z(-2)
Z(-3)
Z(-4)
Wellhead Pressure, psi
Z(-5)
760
740
Solid Line: Actual
Thin Line: Network Prediction
720
0
250
500
Sampling Time
750
Typical multi-layer DNNC process model.
ym (k)
W1(N+1)
u(k)
W11
u(k-1)
W12
B1
B2
1
1
W2
u(k-M+1)
W1M
BM
1
BN
u(k-N+1)
W1N
1
y(k+1)
Alternative Conditional Expectation
X
(X)
Y
(Y)
-0.5
-0.6
0.1
-0.6
0
-0.7
-0.7
z
0.2
Phi(x)
z
-0.5
-0.8
-0.1
-0.8
-0.9
-0.2
-0.9
-1
-0.5
0
0.5
-1
1
-0.5
0.5
-0.2
1
-0.1
0
0.1
0.2
Phi(x)
x
x
-0.5
1
-0.6
0.5
-0.7
-0.8
NN Prediction
-0.9
-0.6
z
-0.5
Phi(y)
z
0
-0.7
0
-0.8
-0.5
-0.9
-1
-1
-0.5
0
0.5
1
-1
-1
-0.5
y
0
0.5
0
0.5
1
Phi(y)
y
-0.55
-0.55
Input Data for
Current Prediction
-0.6
-0.6
-0.65
-0.65
-0.7
Input-Output Data,
Prvious Information
-0.7
Prediction, Output
Phai
-0.75
ACE
-0.75
-0.8
-0.8
-0.85
Input Layer
-0.9
-0.8
-0.5
1
-0.75
-0.7
-0.65
Actual
No. Epochs: 200
No. Hidden Nodes: 10
-0.6
-0.55
Hidden Layer
Output Layer
-0.85
-0.9
-0.8
-0.75
-0.7
-0.65
Actual
No. Epochs: 5
No. Hidden Nodes: 1
-0.6
-0.55
Input Data for
Current Prediction
Input-Output Data,
Prvious Information
Prediction, Output
ACE
Phai
Input Layer
Hidden Layer
Output Layer
Typical multi-layer DNNC process model.
ym (k)
W1(N+1)
u(k)
W11
u(k-1)
W12
B1
B2
1
1
W2
u(k-M+1)
W1M
BM
1
BN
u(k-N+1)
W1N
1
y(k+1)
Controller
CA
CA
Trajectory
qc
CA
Setpoint
Model
Filter
Process Model
dC A
q
E
=
(C Af  C A )  k o C A exp(
)  (t)
dt
V
RT c
(  H ) k o C A
dT
q
E
=
( Tf  T) 
exp( 
) c (t)
dt
V
 Cp
RT




h A
q c 1  exp 
 h ( t )   ( Tcf  T)
 Cp V
 q c  C pc
 

 c C pc
h d =  h (t) h = ( 1 -  h t ) h
 E 
  (t)
k = k o exp  RT  c
c (t)= exp ( -  t ).
h(t)
c(t)
CA
qc
q
CAf
Tf
Tcf
:
:
:
:
:
:
:
:
Fouling coefficient
Deactivation coefficient
effluent concentration, the controlled variable
coolant flow rate, the manipulated variable
feed flow rate, disturbance
feed concentration
feed temperatures
coolant inlet temperature
Injection Rate, BCW/day
65
Actual
Network Prediction
LR-Injector
55
45
35
25
0
500
1000
1500
2000
Sampling Time
2500
3000
3500
Injection Rate, BCW/day
140
H-Injector
130
Actual
Network Prediction
120
110
0
500
1000
1500
2000
Sampling Time
2500
3000
3500
Conclusions
•The DNNC strategy differs from previous neural network controllers because the
network structure is very simple, having limited nodes in the input and hidden layers.
•As a result of its simplicity, the DNNC design and implementation are easier than
other control strategies such as conventional and hybrid neural networks.
• In addition to offering a better initialization of network weights, the inverse of the
process is exact and does not involve approximation error.
•DNNC’s ability to model nonlinear process behavior does not appear to suffer as a
result of its simplicity.
• For the nonlinear, time varying case, the performance of DNNC was compared to the
PID control strategy.
•In comparison with PID control, DNNC showed significant improvement with faster
response time toward the setpoint for the servo problem.
•The DNNC strategy is also able to reject unmodeled disturbances more effectively.
•DNNC showed excellent performance in controlling the complex processes in the
region where the PID controller failed.
•It has been shown that the DNNC controller strategy is robust enough to perform well
over a wide range of operating conditions.
IMC
d
ysp
+
w
e’
Q
u
y
+
P
+
d
P
y
+
Modified IMC, Zheng
ysp
+
d
et al. (1994)
e’
Q1
w1
+
u
w
P
+
-
-
y
+
w2
d
Q2
P
y
To address integral windup.
+
Non-linear model state-feedback control structure
d
ysp
+
e’
-
w’1
Q’1 +
w’2
w
u
y
+
P
+
d
P
Q’2
x=f(x)+g(x) u
x
h(x(t-)
-
y
+
Future Works
•The integration of the DNNC and the shortest-prediction-horizon nonlinear model-predictive
•No assumption regarding the uncertainty in input and output
• Use of fuzzy logic techniques.
ym (k)
W1(N+1)
u(k)
W11
u(k-1)
W12
B1
B2
1
1
W2
u(k-M+1)
W1M
BM
1
BN
u(k-N+1)
W1N
1
y(k+1)