r1093,25943 2137~06 PCr/US93/05596 RESIDUAL ACTIVATION N~URAL NETWORK
TECHNICAL EIEI~ OF T~ INVENIION
The presen~ invention pertains in general to neural networks, and more particularly to a method and apparatus for improving performance and accuracy inneural networks by u~lizing the residual activadon in subnetworks.
wO 93/25943 2 1 3 7 8 0 6 PCI/US93/0~6 BACKGROUND OF TEIE INVENTION
Neural networks are generally utilized to predict, control and optimize a process. The neural network is generally operable to learn a non-linear model of a system and store the representation of that non-linear model. Therefore, the neural S network must first learn the non-linear model in order to op~mize/control thatsystem wi~ that non-linear model. In ~e first stag~ of building the model, the neu~l network performs a prediction or forecast function. l;or example, a neural network eould be utiliĉd to predict ~uture behavior of a chemical plant frorn the past histoncal data of the process valiables. Initially, the networlc has no knowledge 10 of the model type that is applicable to the chemical plant. However, the neural network "lea~ns" the non-linear model by training the network on historical d~ta of the chemical plant. This training is effected by a number of classic training techniques, such as back propagation, radial basis functions with clustering, non-radial basis functions, nearest-neighbor approximations, etc. After the network is 15 finished lean~ing on the input data set, some of the his$orical data of the plant that was pu~posefully deleted from the training data is then input into the network to dgtermine how accurately it predicts on this new data. If the prediction is accurate, then the network is said to have "generalized" on the data. If the generalization level is high, then a high degree of confidenc~ exists ~at the prediction network has 20 captured useful properties of the plant dynarnics.
In order to train the network, historical data is typically provided as a training set, which is a set of patterns that is taken from a time series in the form of a vector, x(t) representing the various input vectors and a vector, y(t) representing the actual outputs as a function of time for t--1, 2, 3 ... M, where 21:~780~
rVOs3/25943 ~ PCr/US93/~5~96 M is the number of t~aining patterns. These inputs could be temperatures, pressures, flow-rates, etc., and the outputs could ~e yield, impurity levels, variance, etc. The overall goal is to learn this ~aining data and then generalize to new patterns.
With the tIaining set of inputs and outputs, it is then possible to construct a ~unction that is imbedded in the neural network as follows:
o(t) = ~(~(t),P) ~1) Where o(t) is an output vector and P is a vector or parameters ("weights"~ that are v ariable dunng the learning stage. The goal is to minimize the Total-Sum-Squ~re-Error function:
( t) -;3t t) ) Z (2) The Tot~l-Sum-Squ~re-Error function is minimized by changing the parameters P ofthe function f. This is done by the back propagaticn or gradient descent method in the preferred embodiment. This is described in numerous articles, and is well known. Therefore, the neural network is essentially a parameter fitting scheme that can be viewed as a class of statistical algorithms for fitting probability distributions.
Alterna~vely, the neural network can be viewed as a functional approximator thatfits the input-output data with a high-dimensional surface. The neural network u~liĉs a very simple, almost ~ivial function (typically sigmoids), in a multi-layer nested structure. The general advantages provided by neural networks over other functional appro~cimation techniques is that the associated neural network algorithm accommodates many different systems, neural net~vorks provide a non-linear dependence on parameters, i.e~, they generate a non-linear model, they utilize the computer to perfonn most of the lean2ing, and neural networks perform much better than traditional mle-based e~pert systems, since rules are generally difficult to discern, or the number of rules or the combination of rules can be overwheln~ing.
However, neural networks do have some disadvantages in that it is somewhat .
wO 93/2S943 7 8 0 6 Pcr/US93/~ 6 difficult to incorpora~e conseraints or other knowledge about ehe system into the neural networks, such as thermodynamic pressure/temperature relations, and neural networks do not yield a simple explanation of how they actually solve problems.
In practice, the general disadvantages realized with neural networks are 5 seldom important. When a neural network is used in part for optimizing a system, it is typically done under supenrision. In this type of optirr~ization, the neural network as the ~ptimizer makes suggestions on how to change the operating parameters. The operaeor then makes the final decision of how to change these parameters.
Therefore, this type of system usually requires an "expert" at each plant that knows 10 how to change control parameters to make the plant run smoothly. However, this expert often has trouble giving a good reason why he is changing the parameters and the method that he chooses. This kind of expertise is very difficult to incorporate into classical models for rule-bĉed systems, but it is readily learned from historical data by a neural network.
The general problem in developing an accurate prediction is the problem in developing an accurate model. In prediction files, there often exist variables that contain very different frequency components, or have a modulation on top of the slow drift. For example, in electronics, one may have a signal on top of a slowly varying wave of a much lower frequency. As another example, in economics, there 20 is often an underlying slow upward drift accompanied by very fast fluctuatingdynamics. In manufacturing, sensors often drift slowly, but the sensory values can change quite quickly. This results in an error in the prediction process. Although this eITor could be predicted given a s~phishcated enough neural network and a sufficient arnount of ~aining data on which the model can be built, these are seldom practical neural network systems. As such, this error is typically discarded. This ``
error is generally the type of error that is predictable and should be distinguished from random "noise" that is generally impossible to predict. This predictable error that is discarded in conventional systems is referred to as a "residualn.
: ' ' - ,, ' .
In addition to the loss of the residual prediction from the actual prediction, 3û another aspect of the use of a neural network is that of providing optimization/control. Once a prediction has been made, it is then desirable to .
;~0 93/2s943 - PCI /US93/05596 actually manipulate input variables which are referred to as the control variables, these being independent variables, to manipulate control input paIameters to a specific set point. For example, valve positions, tank level-controllers, the accelerator pedal on a car, etc., are all control variables. In contrast, another set of S variables referred to as state variables are measured, not manipulated variables, from sensors such as thermometers, flow meters, pressure gauges, speedometers, etc.
For cxample, a control valve on a furnace would constitute the control variable,whereas a thermometer reading would constitute a state variable. If a predictionneural network were built to model a plant process b~sed on these input variables, 10 the same predicted accuracy would be obtained based on either the control variable or the state variable, or a combination of both.
Whenever the network is trained on input patterns, a problem occurs due to the r~lationship between the control valve and the thermometer reading. The reason for this is that the network will typically learn to pay attention to the temperature or 15 the con~ol or both. If it only pays attention to the temperature, ~e network's control answer is of the for n "make the temperature higher" or, "make the temperature lowern. As the thermometer is not a variable that can be manipulateddirectly, this informa'don has to be related bac~ to information as to how to change the controller. If the relationship between the valve and the temperature reading 20 were a di~ect relationship, t}~is might be a simple problem. However, the situations that exist in practice are typically more complex in that the state variable dependencies on the control variables are not obvious to discern; they may be multivariant non-linear functions of the controls. In order to build a proper predicted con~ol model to perform on-line control with no human in the loop, it is 25 necessary for the network to account for the relationship between the control variables and the state variables.
213780fi - ~ !
WO 93~25943 PC~/VS93/D~
SUMM~RY OF T~ INYENTION
The present invention disclosed and claimed herein comprises a ~ontrol network for controlling a plant having plant control inputs for receiving control variables~ associated plant state variables and one or more controlled plant outputs.
5 Each plant output is a fu~iction of dependencies of the plant state variables on the plant control variables. A control input is provided for receiving as network inputs the current plant control variables, the current plant state variables, and a desired plant outputs. A control network output is provided for gènerating predicteti plant control variables corresponding to the desired plant outputs. A processing system 10 processes the received plant control variables and plant state variables through a local inverse representation of the plant that represents the dependencies of the plant output on the plant control varia~les to provide the predicted plant control variables ne~ess-ary to achieve the desired plant outputs. An interface device is provided for inputting the predicted plant variables to the plant such that the output of the plant 15 will be the desired outputs.
In another aspect of the present invention, the processing system is comprised of a first intermediate processing system having a first intermediate output to provide a predictive plant output. The first intermediate processing system is operable to receive the plant control variables and state variables from the control network input 20 for processing through a predictive model of the plant to generate a predicted plant output. The predicted plant output is output from the first intermediate output and then to an OEror device for! companng the predicted plant output to the desired plant output and then generating an error representing the difference therebetween. A
second intermediate processing system is provided for processing the error through a 25 local inverse representation of the plant that represents the dependencies of the plant output on the plant control variables to provide the predicted plant control variables necessary to achieve the desired plant outputs.
In a further aspect of the present invention, the processing system is comprised of a residual activation neural network and a main neural network. The30 residual activation neural network is operable to receive the plant control variables ~ 213780~ ~
0 93/2s943 PCr/US93/05596 and the state variables and generate residual states that estimate the ~ternal 5 variances that affect plant operation. The residual activation neural network comprises a neural network having an input layer for receiving the plant controlva~iables, an output layer for providing predicted state variables as a funetion of the S control inputs and a hidden layer for mapping the input layer to the output layer tnrough a representation of ~e dependency of the plant control vanables on the state vanables. A residual layer is provided ~or generating the difference between thepredicted state variable and the actual plant state va~iables, this cons~tu~ng aresidual. The main neural net~ork is comprised of a hidden layer for reeeiving the 10 plant control var~ables and the residual, and an output layer for providing a predicted plant output. The main neural network has a hidden layer for mapping the input layer to the output layer with a representation of the plant output as a function of the control inputs and the residual. The main neural network is operable in an inve~se mode to provide the local inverse representa~on of the plant with the dependencies 15 of ~e control variables and the state variables projected out by ~e residual a~tiva~on network.
WO 93/25943 ~ 1~3 7 ~ ~ 6 PCl`/US93/0l: .6 BRIEF DESCRIPIION OF TE~ DRAW~GS
For a more comple~ understanding of the present invention and the advantages thereof, reference is now made to the following descriptio~l taken inconjunction with the accompanying Drauings in which:
S FIGURE 1 illus~ates a general diagram of the neural network model of a plant;
FIGURE 2 illustrates a schematic view of a neural network representing a single hidden layer;
FIGURE 3 illustrates a time-series output represen~ng the first level of predichon;
FIGURE 4 illustrates the first residual from the first prediction with ~e second predic~on of the residual;
FIGURE 5 illustrates a diagrammatic view of the neural nehvork for generating the prediction utilizing residuals;
FIGURE 6 illustrates the residual activation networks utilized for predicting the 'dme series y(t);
FIGURES 7a and 7b illustrate a block diagram of a control system for optimiza~on/control of a plant's operation;
FIGURE 7c illustrates a con~ol network utilized to generate the new control variables;
PIGURE 8 illustrates a block diagram of a simplified plant that is operable to estimate the value and give proper control signals to keep the output at the desired state;
PIGURE 9 illustrates a straightforward neural network having three input nodes, each for receiving the input vectors;
FIGURE 10 illustrates the first step of building the neural network;
FIGURE 11 illustrates the next step in building the residual activation network;
FIGURE 12 illustrates the next step in building the network, wherein the overall residual network is built;
FIGURE 13 illustrates a block diagram of a chaotic plant;
'O 93~25943 ~ ' Pcr/uss3/û~s~6 PIGURE 14 illustrates a block diagD of ~e residual activation net-vork for con~olling the plant of FIGURE 13; and FIGURE 15 illustrates a diagrarnmatic view of a generalized residual ac~vation network.
wo g3/25943 2 1 3 7 8 0 Ç; Pcr/US93/a~ ~6 DETAILED DESCRIPIION OF T~ INVENTION
Referring now to FIGURE 1, there is illus~˘ated a diagrarnmatic view of a predicted model 10 of a plant 12. The plant 12 is any type of physical, chemical, biological, electronic or economic process with inputs and outputs. The predicted S model is a neural network which is generally comprised of an input layer compnsing a plurality of input nodes 14, a hidden layer comprised of a plurality of hiddennodes 16, and an output layer comprised of a plurality of output nodes 18. The input nodes 14 are connected to the hidden layer node 16 through an interconnection scheme that provides a non-linear interconnection. Similarly, the hidden nodes 16 ~-10 are connected to the output nodes 18 through a similar interconnection scheme that is also non-linear. The input of the model 10 is comprised of an input vector 20 of known plant inputs, which inputs comprise in part manipulated variables referred to as "control" variables, and in part measured or non-manipulated variables referred to as "st~teN variables. The control variables are the input to the plant 12. When the 15 inputs are applied to the plant 12, an actual output results. By comparison, the output of the model 10 is a predicted output. To the extent that the model 10 is an a~curate model, the actual output and the predicted output will be essentially identical. However, whenever the actual output is to be varied to a set point, the plant control inputs must be varied. This is effected through a control block 22 that 20 is controlled by a control/optimizer block 24. The control/optimizer block receives the outputs from the predicted model 10 in addition to a desired output signal and changes the plant inputs. This allows the actual o~tput to be moved to the setpoint without utilizing the actual output of the plant 12 itself.
In addition to the control inputs~ the plant 12 also has some unmeasured 25 unknown plant inputs, referred to as "external disturbances", which representunknown relationships, etc. that may exist in any given plant such as humidity, feed-stock variations, etc. in a manufacturing plant. These unknown plant inputs or . external disturbances result in some minor errors or variations in the actual output as compared to the predicted output, which errors are part of the residual. This will 30 result in an error between the predicted output and the actual output.
21373~6 ~` ~o 93/2s943 ~ Pcrfuss3/o5596 Refe~ing now to FIGURE 2, there is illustrated a detailed diagram of a conven~onal neu~al network comprised of the input nodes 14, the hidden nodes 16 and ~e ou~Lput nodes 18. The input nodes 14 are comprised of N nodes labelled xl, X2, ~D XN, which are operable to receive an input vector x(t) compAsed of a plurality S of inputs, INPl(t), INP2(t), INPN(t). Similarly, ~e output nodes 18 are labelled 1~ 2~ which are opesable to generate an outputvector o~t), which is comprised of the output Ol~l(t), OUT2(t), . O. OI~K~t). The input nodes 14 are interconnected with the hidden nodes 16, hidden nodes 16 being labelled a" a2~
through an interconnection network where each input node 14 is interconnected ~th each of the hidden nodes 16. However, s~me interconnection schemes do not require full interconnect. Each of the interconnects has a weight Wjj~. Each of the hidden nodes 16 has an output o; with a function g, the output of each of the hidden nodes defined as follows:
aj = g(~Wil~ x7 + b~) (3) Similarly, the output of each of the hidden nodes7 16 is interconnected with substan~ally all of the output nodes 18 through an intercoMect network, each~of the interconnects having a weight W~' associated therewith. The output of each of the output nodes is defined as follows:
0~ = g(~ W,k aj ~ bk) This neural network is then ~ained to learn the function f( ) in Equation 1 from the input space to the output space as examples or input patterns are presented to it, and the Total-Sum-Square-Error function in E~uation 2 is n~inimized through use of agradient descent on the parameters W$2, W"l,b'J, b2".
The neural network described above is just one example. Other types of neural networks that may be utilized are these using multipie hidden layers, radial basis ~nctions, gaussian bars ~as described in U.S. Patent No. 5,113,483, issuedMay 12, 1992, which is incorporated herein by reference), and any other type of W(~ 93/25943 2 1 ~ 7 8 0 fi P~/US93/0~ 6 general neural networl~. In the preferred embodiment, the neural network utilized is of the type referred to as a multi-layer perception.
Prediction with Residual Acti~ation Networlc Refe~ing now to FIGURE 3, there is illustrated an example of a time series that is composed of underlying signals with seve~al different frequencies. Often, it is difficult to discern what frequencies are important, or what scales are i nportant when a problem is encountered. But, for this time series, there is a semi-linearcomponent, a sign-waYe component, and a high-frequency component. The time series is represented by a solid line with the ~ cis representing samples over a10 period of time, and the y-axis representing magnitude. Ille time series represents the actual output of a plant, which is referred to as y(t). As will be described in more detail hereinbelow, a first net~ork is provided for making a first prediction, and then the dif~erence betwee~ that prediction and the actual output y(t) is then determined to define a second time series representing the residual. In FIGURE 3, 15 the first prediction is represented by a dashed line.
Refemng now to FIGURE 4, there is illustrated a plot of the residual of the time series of PIGURE 3, with the first prediction subtracted fr~m y(t). As willalso be described hereinbelow, a second separate neural network is provided, which network contains a representation of the residual after the first prediction is 20 subtracted from y(t). By adding the prediction of this s~cond neural network with the prediction output by the neural network of FIGURE 3, a more accurate overallprediction can be made. The residual in FIGURE 4 is illustrated with a solid line, whereas the prediction of the resiqual network is represented in a dashed line.
Refernng now to FIGURE 5, there is illus~ated a diagrammatic view of the 25 overall network representing the valious levels of the residual activation network.
As described above, each level of the network contains a representation of a portion of the prediction, with a first ne~vork NET 1 providing the primary prediction and a plurality of residual activation networks, NET 2 - NEI K, that each re~resent a successively finer portion of the prediction. The output of each of these networks is 30 added together. FIGURE S illustrates K of these networks, with each network being comprised of an input layer, one or more hidden layers, and an output layer 52.
f o 93/2s943 PCr/US93/05~96 Each of the outpu~ layers is summed together in a single output layer 52 with a linear interconnect pattern.
The input layer of all of the networks NET 1 - NET K is represented by a single input layer 30 that receives the input vector x(t). Multiple input layers could be utili~ed, one for each network. However, sinc the same input variables are utiliĉd, ~e number of input nodes is constant. It is only the weights in the interconnect layers ~at will vary. Each network has the representation of the model stored in the associated hidden layers and the associated weights connecting thehidden layer to the input layer and the output layer. The primary networl~ NET 1 is 10 represented by a hidden layer 32, which represents the gross prediction. The hidden layer 32 is interconnected to an output layer 34 representing the output vector o'(t).
An interconnect layer 36 interconnects the input layer 30 to the hiddell layer 32 with an interconnect layer 38 connecting the hidden layer 32 to ~he OUtpllt layer 34. The interconnection 36, hidden layer 32 and the interconnect 38 provide the non-linear 15 mapping func~on from the input space defined by ~e input layer 30 to the output space defined by the output layer 34. Ihis mapping function provides the non-linear model of the system at the gross prediction level, as will be described hereinbelow.
There are K-l remaining residual networks, each having a hidden layer 40 with output layers 42 representing output vectors o2(t) through o~(t). The input20 layer 30 is connected to each of the hidden layers 40 through a separate set of interconnects 46 and the output layers 42 are each connected to the respective hidden layer 40 through a separate set of interconnects 50. Each of the hidden layers 40 and their associated interconnects 42 and 46 provide a non-linear representation or model of the residual as compared to the preceding prediction. For e~ample, the 25 first residual ne~vork, labelled "NET 2n, represents the residual of the predictcd output o'(t) in layer 34 as compared to the actual output y(t). In a similar maMer, ea~h successive residual network represents the residue of the prediction from the output layer prediction of the previous layers subtracted &om y(t). Each of the models represented by the networks between the input layer 30 and each of the - 30 output layers 34 and 42 provide a non-linear mapping function. Each of the output layers 34 and 42 are then mapped into a single output layer 52, representing thepredicted output oP(t), which is a linear mapping function, such that each output WO 93/2s943 Pcr/US93/ol~ 6 node in each of the output layers 34 and 42 is directly mapped into a corresponding node in layer 52 with a weight of n + 1~. This is a simple sumlI~ng function.
Refemng now to FIGU3~ 6, there is illustrated a block diagram of the procedure for traiI~ing the networks and stonng a representaLion in the respective S hidden layers and associated interconnection ne~vorks. Initially, ~he pattern y(t) is provided as a time series ou~tput of a plant for a time series isput X(t). The first network, labelled "NET 1" is trained on the pattern y(t) as target values and then ~e weights therein ~xed. This pattern is represented in a layer 60 with an arrow directed toward the hidden layer 32, representing that the hidden layer 32 is trained 10 on this pattern as the target. Once trained, the weights in hidden layer 32 and associated interconnect layers 36 and 38 are frczen. The first network NE,T 1 is run by exercising the net~ork with ~he ~me series x(t) to generate a predicted output o'(t). The output layer 34 is interconnected to a first residual layer 62 through a linear interconnect layer 64 having fi~ed weights of '~-ln. Similarly, the block 60 15 represents an input layer to the residual output layer 62 with an interconnect layer 66 providing interconnection and having a fixed weight of n + 1 n . Of course, any other fLxed weights could be utilized. Therefore, the residual output layer 62 represents the first residue output rl(t) that constitutes the difference between the predicted output o'(t) of the first network NET 1 and the target output y(t) or:
r?(t) = y(t) - o1(t) ~5) 20 which could be stated as:
*k(t~ = o~-l(t) -- ok(t) whe*e: o = y(t) (6) Equations 5 and 6 represent the residual e~or. The residual of the ~
network is used to train the ~+1) network, which residue is utilized to train the second network, labelled "NET 2n. In th~ training procedure, the value of r'(t) is utiLized as a target value with the input exercised with x(t~. Once trained, theweights in the hidden layer 40 and associated interconnect layers 46 and 50 are frozen and then the network exercised with x(t) to provide a predicted output o2(t).
(~ VO 93/7~943 2 1 ~ 7 8 0 6 PCI/IJS93/05596 li 15 l-This training continues with the next residual networ~ being trained on the residual of the previous network as a target value. In this example, a residual r2(t) would first be deterrnined in a second residual layer 64, which has as its inputs the values in the residual layer 62 interconnected to the second residual layer 64 through an 5 interconnect layer 68, having fixed weights of n + 1~ and also the output of the output layer 42 interconnected through an interconnection layer 70, having fi~ced weights of n-l n . The residual2~ woul~1 (b~ defi~@d(ats) follows: ~ 7 ) This residual in the second residual layer 64, would then be utiliĉd to train the next network illustrated in FIGURE 5. This would continue until sufficient resolution1~ had been obtained. Once the network is trained, they are interconnected in accordance with the structure of FIGURE 5, wherein the predicted output of all of the networks would be added together in the layer 52.
During ~aining, t~ically, only a limited set of patterns is a~ailable. The network is trained on only a portion of those patterns, with ~e remainder utilized 15 for generaliza~on of the network. By way of example, assume that 1000 input/ou~put patterns are available for training. During training of the first network, only patterns representing time samples from 1 to 800 are utilized in the training procedure, with patterns from 8û1 through 1000 utilized to test generalization of the network to determine how accurate the prediction is. Whether or not the available 20 set of patterns is limited to reserve some for the purpose of generalizadon, pat~erns not in the set are used to determine how accurate the predicdon is. Table 1 illustrates the ~aining procedure wherein the network labelled NET 1 is trained on the actual output y(t). From this network, a predicted output can then be obtained after the weights are fixed and then a residual calculated.
wo 93/25943 2 1 3 7 ~ 0 6 Pcr/US93/O~ ~ ~
INPIJT TARGET PREDICTEDy(t) - o(t) T~E x(t~ y(t) OUT~ o(t)= r~(t) l x" x2, Yl, Y2, - Y~ ol" o'2, .. Olm r'" rl2, .. r'm -- Xn 2 x" x2, Yl, Y2, -- Ym ol" '2, .. ol~, rl" r'~, .. r'~, 3 xl, x2, Yl, Y2, -- Ym O 1~ 2~ -- m r ~, r 2? .--r m ... x~, 4 xl, x2, Yl, Y2, -- Y~ ll, '2, .. lm r~" r'2, ... r'm ... Xn 800 x" X2~ Yl~ Y2, -- Ym O 1~ 0 2. --- m r " r 2, .. r m 1000 x~, x2, -- x~Yl, Y2, - Ym 1l7 ol2~ --lul r~l, rl2, --r',~_ _ _ _ _ _ Table 2 illustrates the second step for training the network labelled NET 2, representing the network trained on the first residual layer r~(t). Tl~is will result in the predicted output o2(t). The residual of t'nis networ~ will be r2(t), wnich is calculated by the difference between tne predicted output and the target output.
. . 2137806.,..... ,, i.
NO 93/~943 PCr/USg3/05596 17 -'~
TIME lNPUT TARGET PREDICTED RESIDUAL
r(t) OUT~UT r(t) ~ o(t) =
S (b) x" X2, ' 02l, o22, ,.. o2~ r2l, r22, . r2m ~-~ Xn ... r m 2 xl, x2, rl~, ri2, o2 022 .,o2~ r2l, r22, .,,r2~ , ... x~ ... rlm 3 x,j x2, rll, r~2~ o2 022 ~2m r2" r22, .. r2m ~' ... ~ - r'm 4 xl, x2, r'" rl2, o2 022 .. ,2m ~l, r22, .,,r2m - Xn ... rlm .
800 x" x2, r'" r'2~ o2 022 ~O2m r2" r22, ,.. r2m - Xn ... r m ' 1000 xl, x2, r'l. r'2, o2l 022 .. 2m r2" r22, ... -r2m ... Xn .. !
Plant Optimization/Control Using a Residual-Activation Net~vork Refe~ing now to,FIGURE 7a, there is illustrated a block diagram of a control system for opdmizadon/control of a plant's operadon in accordance with the weights of the present invendon. A plant is generally shown as a block 72 havingan input for receiving the control inputs c(t) and an output,for providing the actual 30, output y(t) with the internal state variables s(t) being associated therewith. As will be described hereinbelow, a plant predictive model 74 is developed with a neuralnetwork to accurately model the plant in accordance ~,vith the function f(c(t)js(t)) to provide an output oP(t), which represents the predic~ed output of plant predictive model 74. The inputs to the plant model 74 are the control inputs c(t) and the state 35 variables s(t). For purposes of optimization/control, the plant model 74 is deemed WO 93/25943 2 1 3 7 ~ 0 6 PCr/US93/o~S
to be a relatively accurate model of the operation of the plant 72. In an optimization/control procedure, an operator independently generates a desired output value od(t) for input to an operation block 78 that also receives the predicted output oP(t). An error is generated between the desired and the predicted outputs and input 5 to an inverse plant model 76 which is identical to the neural network representing the plant predictive model 74, with the exception that it is operated by back propagating the error through the original plant model with the weights of the predictive model frozen. This back propagation of the er~or through the network is similar to an inversion of the network with the output of the plant model 76 10 representing a ~c(t+1) utiliĉd in a gradient descent operation illustrated by an iterate block 77. In operation, the value ~c(t~l) is added initially to the input value c(t~ and this sum then processed through plant predictive model 74 to provide a new predicted output oP(t) and a new error. This iteration continues until the error is reduced below a predetermined value. The final value is then output as the new 15 predicted control variables c(t~1).
This new c(t+l) value comprises the control inputs that a~e required to achieve the desired actual output from the plant 72. This is input to a control system 73, wherein a new value is presented to the system for input as the control variables c(t). The control system 73 is operable to receive a generalized control 20 input which can be varied by the distributed control system 73. As will be described in more detail hereinbelow, the original plant model 74 receives the variables s(t) and the control input c(t), but the inverse plant model for back propagating the error to determine the control v~iable determines these control va~iables independent of the state variables, since the state variables cannot be manipulated. The general 25 terminology for the back propagation of error for control purposes is "Back Propagation-to-Activation" (BPA).
In the preferred embodiment, the method u~lized to back propagate the error through the plant model 76 is to utilize a local gradient descent through the network from the output to the input with the weights froze~. The first step is to apply the 30 present inputs for both the control variables c(t) and the state variables s(t) into the plant model 74 to generate the prcdicted output oP(t). A local gradient descent is then performed on the neural network from the output to the input with the weights 213 7306 .
c) 93/25943 ` ~ ~ PCr/US93/05596 frozen by input~ng the error between the desired output o~t) and the predicted output oP(t) in ac~ordance with the following equation:
~( t) - ~( t ~ ( t) - 7~ s a~ at~ p( t) ) ~ (8) where 71 is an adjustable "ste~ size" parameter. The output is then regenerated from the new c(t), and the gradient descent procedure is iterated.
As will be described hereinbelow, the inverse plant model 76 utilizes a residual activation network for the purposes of projecting out the dependencies of the control variables on ~he state vanables. In this manner, the network 76 will payattention to ~e appropriate attention to the con~ol variables and control the plant in the proper fashion.
Refe~ing now to FIGU~ 7c, there is illustrated an alternate embodiment of the control system illustrated in ~IGURES 7a ar~d 7'o. In FIGURE 7a, the controloperation is a dynamic one; that is, the control network will receive as input the control variables and the state vanables and also a desired input and output. The control va~iables to achieve a desired output. In the illustration of ~:IGURE 7c, a conventional con~ol network 83 is utilized that is trained on a given desired input for receiving the state variables and control variables and genera~ng the control variables that are necessary to provide ~e desired outputs. The distinction between ~e con~ol ne~vork scheme of FIGURE 7b and the control network scheme of FIGURE 7a is that the weights in ~e control network 8~ of FIGURE 7b are frozen and were learned by tIaining ~e control network 83 on a given desired output. A
desired output is provided as one input for selecting between sets of weights. Each internal set of weights is learned through training with a residual activation networlc similar to ~at described above ~nth respect to l;IGURE 7a, with the desired output utiliĉd to select between the prestored and learned weights. The general operation of control nets is described in W.T. Miller, m, R.S. Sutton and P.J. Werbos, nNeural Networks for Controln, The MlT Press, 1990, which reference is incorporated herein by reference.
~0 93/2s943 2 1 3 7 8 0 6 Pcr/US93/O~
Another standard method of optimization involves a random search through the various control inputs to n~inimize the square of the difference between thepredicted outputs and the desired outputs. This is often referred to as a monte-carlo search. This search works by making random chang~s to the control inputs and S feeding these modified control inputs into the model to get the predicted output. We then compare the predicted output to the desired output and keep ~ack of ~he best set of control inputs over the entire random search. Given enough random t~ials, we will come up with a set of control variables that produces a predicted output that closely matches the desired output. Por reference on this technique and associated, 10 more sophisticated random optimization techniques, see the paper by S. Kirkpatrick, C.D. Gelatt, M.P. Vecchi, "Op~n~ization by Simulated Annealing". Sciencle, vol.
220, 671-780 (1983), which reference is incorporated herein by reference.
ReferIing now to FIGURE 8, there is illustrated a block diagram of a simplified plant that is ~pe~able to estimate the output y(t) = x~t+1) and give 1~ proper control signals at time t to the c(t) input to keep the output y(t) at the desired state, even though there is an external perturbation E(t). The network has available to it information regarding s(t~, c(t) and y(t). y(t~ is related to the control vector c(t) and the state vanable vector s(t) by an equation f( ). This is defined as follows:
~ 9 ) y(t) = f (C(t), s(t) ) (In these equations, we ignore time delays for simplicity.) 20 This will be a relatively straightforward system to design by utilizing the neural network to embody the non-linear function f( ). However, the state variable s(t) is related to the control variable vector c(t) by another function fs as follows:
S ( t) = fB ( C ( t) ) ~10) t' 0 93/25943 2 1 3 7-8 0 6 PCr/US93/05596 As such, if this functional dependency is not taken into account, the network will not possess the information to completely isolate the con~ol input from the state variable input during training, as sufficient isola~on is not inherently present in the neural network by the nature of the design of the neural network itself.
Referring now to FIGURE 9, there is illustrated a straighffo~ward neural network having three input nodes, each for receiving the input vectors y(t), s(t) and c(t) and outputting y(t+1). The three input nodes are a node 86 associated with y(t), a node 88 ass~ciated with s(t) and a node 90 associated with c(t). It should be understood that each of the nodes 8~90 could represent multiple nodes for receiving multiple inputs associated with each of the vectors input thereto. A single hidden layer is shown having an interconnection matrix between the input nodes 86-90 and a hidden layer with an output layer interconnected to the hidden layer. The output layer provides the output vector y~t+1).
During tràining of the network of FIGURE 9, no provision is made for the interdependence between s~t) and c(t) in accordance with the function f,( ), which is illustrated in a block 91 external to the network. As such, during training through such techniques as back propagation, problems can result. The reason for this isthat the inversion of the input/output function f,( ) is singular for correlatedvariables. In this training, the network is initiali7~1 with random weights, and then it randomly learns on an input pattern and a target output pattern, but this learning requires it to pay attention to either the state variables or the control variables or both. If it only pays attention to the state variable input, the network's control answer is of the form "vary the state variable". However, the state variable is~ not a variable that can be manipulated directly. It has to be related back to how to change the controllerO If this is a simple function, as defined by the function f,( ), it may be a relatively easy task to accomplish. However, if it is a more complex dependency that is not obvious to discern, there may be multi-variate non-linear functions of these control inputs. In performing on-line control twhere there is no human in the loop), it is desirable to have the state information translated automatically to control information.
WO 93/25943 PCI~US93/0~ 6 According to the present invention, the neural network is configured such that the interdependence between the control variables c(t) and the state variables s(t~ is properly modeled, with the neural network forced to pay a~ention to the control variables during the leaming stage. This is illustrated in FIGURE 9a, 5 wherein a network 89 is illustrated as having the state variables and control variables isolated. Once isolated, the BPA operation will pay maximal attention to the control variables. This is achieved by projecting out the dependencies of the control variables on the state variables.
Refer~ing now to PIGURE 10, the first step of building the neural network is 10 to model the function f"( ) as defined in Equation 10. A neural network is forrned ha~ing an input layer 96, a hidden layer 98 and an output layer 100. The input layer receives as inputs the controls c(t) in the forrn of inputs c" c2, ... c", with the output ~yer representing the predicted state variables sP(t), comprising the outputs s,P, s2P~ ... smP. The neural network of FIGURE 10 is trained by utilizing the state 15 variables as the target outputs with the control input c(t) and, with back propagation, fL~cing ~e weights in the network to provide a representation of the func~ion f,( ) of Equation 10. This, therefore represents a model of the state variables from the control va~iables which constitutes dependent or measured variables versus independent or manipulated variables. This model captures any dependencies, 20 linear, non-linear or multi-variant of the state variables on the control variables. As will be described hereinbelow, this is an intermediate stage of the network.
Although only a single hidden layer was shown, it should be understood that multiple hidden layers could be utilized.
Referring now to FIGURE 11, there is illustrated the next step in building 25 the residual activa~on network. A residual output layer 102 is provided for generating the residual states s'(t). The residual states in layer 102 are derived by a linear mapping function of the predicted states sP(t) into the residual state layer 102 with fixed weights of "-1", and also linearly mapping the input state variables s(t) from an input layer 104 into the residual layer I02, with the states in the layer 104 30 ~eing terzned the actual states s'(t)~ The linear mapping function has fixed weights of "+1"~ Therefore, the residual state layer would have the following relationship:
2137.8Ĝi~. -f Vo 93~2~943 PCr/US93/055g6 (11) ~( t) = sa( t) - sP( t) The residual s~ates s'(t) in layer 102 are calculated after the weights in the network labelled NET 1 are frczen. This network is referred to as the "state predic~on" net. The values in the residual layer 102 are referred to as the "residual activation" of the state valiables. These residuals repre~ent a good estimation of the 5 external variables that affect the plant ope~a~on. This is important additional information for the network as a whole, and it is somewhat analogous to noise es~mation in Weiner and ~ahhnan filtering, wherein the external perturbations can be viewed as noise and the residuals are the op~mal (non-linear) estimate of this noise. Howevert the Kahlman filters are the optimal linear es~mators of noise, as 10 compared to the present system which provides a non-linear estimator of external influences.
Refemng now to FIGURE 12, the~ is illus~at~ the next step in building the n~twork, wherein the overall residual network is built. The output of the residual layer 102 s'(t) represents f(E(t)), where E(t) comprises the extraneous- 15 inputs ~at cannot be measured. Such extTaneous inputs could be feed stock variations of chemical processes, etc. The ove~all residual network is comprised of a network wherein the inputs are the control inputs c(t) and the residual s'(t).Therefore, the input layer 96 and the input layer 104 are mapped into an output layer 106, with a hidden layer 108. The hidden layer 108 being interconnected to2~ the residual layer 102 through an interconnection network 110 and ;mterconnected to the input layer 96 through an interconnection networlc 112. The hidden layer 108could also be mapped to the output layer, although not shown in this embodiment.Layer 108 is mapped into output 106 through interconnection network 114.
Therefore, the mapping of both the control input layer 96 and the residual layer 102 25 to ~he output layer 106 provides a non-linear representation, with this non-linear representa~ion ~ained on a desired output pa~ with the input comprising the control input pattern c(t) and the residual states s'(t). An iinportant aspect of the present invention is that, during back propagation of the error through BPA, in accordance with the optin~ization/control configuration illustrated in FIGURE 7a, the ., . , , - :
2137806 ~ `
wO ~3/25943 PCr~US93/0C; ji network effectively ignores the state variables and only provides the c(t+1) calculation via model inversion (BPA). Since the residuals are functions that do not change when the control changes, i.e., they are external parameters, these should not change during the predic~ion operation. Therefore,when the prediction of theS control changes is made, the residual states are effectively frozen with a latch 113 that is controlled by a LATCH signal. The procedure for doing this is to initially input the control c(t) and state variables s(t) into the input layer 96 and input layer 104, respectively, to generate the predicted output oP(t). During this opera~on, the values in the residual layer 102 s'(t) are calculated. The latch is set and these values 10 are then clamped for the next operation, wherein the desired output od(t) is generated and the error between the desired output and the predicted output is then propagated back through the network in accordance with Equation 7. The back propagation of this error is then directed only toward the controls. The controls are then changed according to gradient descent, control nets, or one of the other 15 methods descIibed hereinabove with reference to FIGURE 7a, completing on cycle in the BPA process. These cycles continue with the s'(t) now latched, until the output reaches a desired output or until a given number of BPA iteradons has been achieved. This procedure must be effected for each and every input pattern and the desired output pattern.
By freezing the values in the residual state s'(t), the dependencies of the controls on the state variables have been projected out of the BPA operadon.
Therefore, the residual-activation network architecture will be assured of directing the appropriate attention to the controls during the BPA operation to generate the appropriate control values that can help provide an input to the distributed control system that controls the plant.
By way of example, if one of the controls is a furnace valve, and one of the states is a temperature, it will be appreciated that these are highly correlatedvariables, such that when the prediction of the temperature from the control in NET
1, represented by input layer 96, hidden layer 98 and output layer 100, would bequite accurate. Hence, when the actual temperature of a state variable 1 is subtracted from the predicted temperature, the residual is quite small. Thus, any control signal will go directly to the control and not to the state, constituting a 2137801~
`O 93/25943 PCr/US93/05~96 ~5 significant benefit of the present invention. Additionally, the residual is, in fact, that part of the temperature that is not directly dependent on the controls, e.g. due to the ambient air temperature, humidi~y, or other external influences. When the predietdon network is built, the outputs will now be a direct func~on of the controls 5 and possibly these external variations, with the residual activation network of the present invention compensating for external perturbations, via a non-linear estima~on of these perturbations.
Referring now to FIGURE 13, there is illustrated a block diagram of a chaotic plant. In this example, the task is to estimate y(t+1) and give the proper 10 contlol signal at time t to c(t) to keep the output x(t) at the desired state, even though there is an external perturbation E(t). However, it should be understood that the neural network model does not directly receive information about E(t). The residual activation network that reoeives the inputs c(t), s(t) and y(t) and outputs the predic~ed value y(t+l) while receiving the desired output, wi~ the error p~opagated 15 back through the network to generate the full values is illustrated in FIGURE 14.
The output variables y(t) are functions of the control vanables c(t), the measured state variables s(t) and the external influences E(t), which can be stated as follows:
~ 12) y(t) = f (c(t) ,s(t) ,E(t) ) .
The Equation f( ) is assumed to he some uncomplicated non-linear unknown function which to be modeled by the network. The task is to obtain the best approximation20 of this function f( ) by léarning from measured data. The assumption is made that the measured state variables s(t) are some other unknown function of the controls c(t) and the external perturbations E(t) which would have the following relationship:
s ( C) = f" ( c ( t), E( t) ) .
The function f,( ) represents the non-linear unknown function of the dependency of the state variables s(t) on both ~he control variables s(t) and the external WO 93/25943 Pcr/usg3/O
perturbations E(t). Without loss of generali~r, ~is function can be expanded in the follow~ng fortTI:
~ 4) fB ( C ( t~, E~ t) ) = fc ( C ( t) ) + fE~(E( C) + fCE ( ) ' ' -Where fc( ) d~nds only on c(t) and fE~ ) depends only on E(t).
It is assumed that the magnitude of f~( 3 and fE( ) are large compared to the 5 higher order tenns, f,E( ~ + ...; most of the dependencies of the states on thecontrols can be projected out by leaming the states from the controls. The sta~-variables prediction can be w~i~ten as a funetion of the controls, sP(c~t~) = fi",(c(t)).
I~ is also assumed ~at ~e external variations in the ~on~ols are not highly correl~ted, hence he leamed function, fp(c(t)) will be ~rery close to f~(c(t)), since 10 ~is is assumed ~o be ~e do~ant term in the equation. Thus, the following appro~ima~e equali~ will exist:
~15) fp8(c(t) ) = fc(c(t) ) = fc(c(t) ) + ~(c(t) ,E(t) ) where the error ~ is small compared to fE(E (t)).
Sir.ce the predicted model fp(ctt)), the residuals can then be calculated as follows:
(16) r(E(t),c(~)) = s~t) - sp(t) 15 Substitu~ng, the following is obtained:
Reducing this, the following relationship will be obtained:
2137801i ' ``~0 93125943 P~r/USg3/0559 ~7 (17 r(E(t) c(t) ) = fC(c(t) ) + fE(E(t~ ) + fcE(C(t) ,E(~
~ fC(C(t) ) - ~tclt) ,E(t) ) (18 (E(t) c~t) 3 = f~s(E(t3 ) ~ fcg(c(t) ,E(t) ~ + . . .
- ~(c~t) ,E(t)) The c~t) arld E(t) de~endencies are then grouped into a single tenn 71(c(t)? ]E(t)) as follows:
~ ~9 ) r(E(t) c(t) ) = f,3(E(t) ) + 1~ (c(t) ,E(t) ) where, by the above assump~ons, ~1(C(t)9 E~t)) is e~pected to be smallcr in magnitude as compared to ~E~E(t)).
S In the above manner, the myon~ of the dependencies of the state variables on the controls have been projected out of the ne~work operanons, but the usefulinfonnation that is captured by the measured stat~ variables, and that implicitly contains the e~ctgsnal disturbances, is not discarded. Note that since the neural network leall~ing state variable predictions can learn non-linear functions, this is a fully general non-linear projection to f(c(t)). PurthenTIore, by calculating theresiduals,.an excellent estimation of the e~cternal variations has been provided.
Ihe residuals in the above described example were calculated via a simple subtraction. However, multiplicative and higher~rder terms could exist in ~e expansion and, as such, another proje~tion operator would be required to capture 213780~
WO 93/2~943 PCr~US93/05 these terms. To achieve this, we would examine the term 7tc(t), E(t)) in a manner totally analogous to the previous t rm. That is, whereas the first-order dependencies of the control variables were subtracted, the same methodology can be applied tocapture the higher-order terms. As an example, consider the term ~ (t),E(t)) which 5 has no first-order dependencies on c~t) and E(t3, such that the next highest order is second-order. The function can be written in the following fonn:
Tl(C,E) - A~c(c)~ E) ~ B[c3; c2E; cE2; E3] ~ 20) Whereas these dependencies cannot be separated term-by-term as descnbed above, the higher-order informa~ion can be provided, for example, by dividing ~7(c(t), E(t)) by the actual states. This, together with the substraction (above), will provide two 10 independent estimates of the external perturbation, and the neural network c~n build a better model from the combination of these estimates. An e~ample of this ;
architecture is illustrated in FIGURE 15. The same higher~rder generalizations can be applied for the prediction residual acdvation networks, namely taking divisions, etc., of the activations before further modeling.
In summary, there has been provided a residual activation network that allows dependencies of the controls on the state vanables to be projec~l out. Once projected out, Back Propagation-to-Activation control can be utilized to achievecontrol and be assured that the network pays appropriate attention to the controls.
The network is compnsed of two networXs, a first network for modeling ~e 20 dependencies of the state variables on the controls and developing a residual value.
The control inputs and residual values are then input to a second network to provide a predicted output for the plant. A desired output is then determined and combined with the predicted output for a given set of input control variables in order togenerate an error. This error is back propagated through the control network with 25 . the predicted model therein frozen. Further, this back propagation of error is performed with the residual values frozen, such that only the control inputs arevaned. This procedure is iterative. The resulting control inputs are then input to ehe plant control system to effect changes in the input to the plant to achieve the desired output.
~~WO 93/25943 Pcr/us93/05596 29 .
Although ~e preferred embodiment has been desc~ibed in detail, it should be understood that various changes, substitutions and alterations can be made therein without departing from the spirit and scope of the invention as defined by the appended claims. For example, ins~ead of BPA, the residual net can be inverted via S con~ol nets as described in FIGURE 7a or via a Monte-Carlo Search through the space of control inputs un~l the desired output is achieved, or through simulated aImealing of the inputs, or any combination thereof. ;