Adaptive Control of Nonlinear Chemical Processes Using Neural Networks

Adaptive Control of Nonlinear Chemical Processes Using Neural Networks

Copyright © IFAC Dynamics and Control of Process Systems. Corfu, Greece, J998 ADAPTIVE CONTROL OF NONLINEAR CHEMICAL PROCESSES USING NEURAL NETWORKS ...

1MB Sizes 0 Downloads 185 Views

Copyright © IFAC Dynamics and Control of Process Systems. Corfu, Greece, J998

ADAPTIVE CONTROL OF NONLINEAR CHEMICAL PROCESSES USING NEURAL NETWORKS

Hao Wang

En Sup Yoon

Department o/Chemical Engineering. Seoul National University Seoul 151- 742. Korea

Abstract: An approach is proposed for nonlinear process mode ling and control. Within the framework presented here, neural networks are employed for adaptively mode ling nonlinear processes, on which model predictive control techniques are based. It is very difficult to provide a satisfactory representation of dynamic responses of the nonlinear processes over a wide operating region. A simple approach is proposed in which two components are used, the first component is the usual neural network which is trained to represent the steady state relationship, the second component serves as an adaptation mechanism to adaptively represent the dynamic response. The proposed approach has been demonstrated by a case study. Copyright ©19981FAC Keywords : Nonlinear systems; model-based control; neural networks.

1. INTRODUCTION

reported applications of MPC, the following assumptions are made: the process model is linear; the criterion function is quadratic (or linear). The advantages of such assumptions include: the model is simple and easy to compute; the analytical solutions can be obtained easily (if no constraints are imposed), or quadratic programming (QP) can be used to obtain the solutions (Seborg, et aI., 1989). However, as mentioned earlier, all chemical processes are essentially non linear. There are numerous model structures proposed for the identification of nonlinear systems.

In most chemical process problems, our attention has been confined to the behavior of linear processes or to the analysis of Iinearized equations representative of nonlinear processes in the vicinity of the steady state condition. While much useful information can be obtained from such an analysis, it is frequently desirable or necessary to consider nonlinearities in the process control design. It is well known that no chemical process is truly linear, particularly over a wide range of operating variables. Hence, a control design should allow for the possibility of a large deviation from steady state behavior and resulting non linear behavior.

In this study, an adaptation mechanism is proposed for modeling a class of nonlinear process dynamics using neural networks . The strategy proposed here is simple and easy to implement. By employing this strategy, some problems related to nonlinear identification can be circumvented. Once the dynamics of the non linear process has been obtained, the general MPC techniques can be used to obtain the control moves according to the specified criterion. This paper is organized as follows : the neural

Model Predictive Control (MPC) is a control method which uses a model to evaluate how control strategies will affect the future behavior of the process. After finding a good strategy according to some specified criterion, MPC pursues that strategy for one control step and then reevaluates its strategy based on the responses of processes. In most

283

network for non linear modeling and its eXlstmg problems are presented in Section 2: followed by the presentation of our proposed approach in Section 3; then in Section 4, a typical nonlinear process control problem is used to demonstrate the proposed approach ; finally concluding remarks are given .

input nodes. The behavior of the backpropagation network is determined by two things: the architecture, that is, how many input, hidden. and output nodes are to be used: and the values of the weights . The numbers of input and output nodes are usually determined by the specific application. thus are fixed . The number of hidden nodes is a variable that can be adjusted by the user. To date, this adjustment has remained pretty much of an art.

2. NEURAL NETWORKS FOR NONLINEAR MODELING AND EXISTING PROBLEMS

After the architecture is set, it is then the weight values that determine how the network performs. The process of adjusting these weight values in order to obtain a desired network performance is known as trammg the network. The advantage of back propagation network is that straightforward methods exist for adapting these weight values to approximate a given function . Further details about back propagation network and its learning algorithms can be found in any book on neural networks (e.g., Haykin, 1994), and thus omitted here .

Over the past decade, there has been a resurgence of interest into the field of artificial neural networks in such diverse areas as pattern recognition, financial forecasting and signal processing. In control engineering, this interest has focused on the modeling and control of non linear dynamic processes. A neural network can be employed to approximate the nonlinear input/output dynamics of a process based on a time history of process data. It has been recognized that neural networks are universal approximators (Haykin, I 994). Neural network models have been used to control nonlinear processes (Saint Donat, et aI., 1991; Bhat and McA voy, 1990). Many of the proposed neural control strategies incorporate a neural network model directly into the control system. Hence a valid neural network process model is the key to the performance of these control systems.

It should be pointed out that although neural networks are universal approximators, it is very difficult to generate appropriate data to train the neural networks. This difficulty arises from the following two obvious facts : first, different operating points may correspond to totally different dynamics ; second, even at the same operating point, inputs of different magnitudes have different influences on the process dynamics. In fact, both of them are characteristics which are different from the linear case. At present, the training data are usually generated by applying a PRBS (pseudo random binary sequence) signal superimposed upon the steady state value. However, as mentioned earlier, both the steady state value and the amplitude of PRBS signal are difficult to determine . In addition, with a neural network of a practical size, it is impossible to represent the dynamics of nonlinear process completely and exactly, and some rough approximation results. From the viewpoint of system identification, the problems related to non linear process identification, such as the choice of the number of inputs, the determination of excitation signal remain largely unsolved, thus it is very difficult, if not impossible, for neural networks to represent the dynamics of non linear process completely and exactly.

At present, the most widely used neural networks are backpropagation network. Typically, it consists of an input layer, a hidden layer and an output layer, as shown in figure 1. Outputs Output layer

Hidden layer

Input layer Inputs

Fig. 1. Three layer backpropagation network Usually sigmoidal activation functions are used in the hidden and output nodes, which can be expressed as:

f (x)

1

= 1+e - x

'

3. ADAPTIVE MODELING OF NONLINEAR PROCESS AND ITS CONTROL

(I)

Motivated by the above existing problems mentioned in last section, in this section, an approach is proposed in which adaptation mechanism is introduced to deal with the complexity of dynamics of nonlinear systems. First, the approach for adaptive mode ling of nonlinear processes is presented; then

where f(x) is the output of the node, x is the input of the node, which is the weighted sum of outputs of the

284

following two points. First. the neural network, even though it is trained to represent the static relationship, exhibits some kind of dynamic characteristics (called pseudo dynamic property). When the neural network is under a certain steady state. then if the manipulated variable is changed, the neural network cannot reach another steady state immediately . In other words, it will follow some path to reach the steady state, thus exhibiting some dynamic property. However, this is usually inaccurate, since dynamic data was not used in the training phase of the neural network. Furthermore, as stated before, even the dynamic data has been used to train the neural network, it cannot cover all the dynamics of the non linear processes. More specifically, when two inputs (one is for the output at previous time step and the other one is for the input at previous time step) are used, the neural network will exhibit some kind of first-order dynamics . Similarly, it will exhibit some kind of second-order dynamics in the case where four inputs are used. Second, a more accurate dynamic response can be obtained by adjusting the value of parameter G according to the most recently measured output. In control terminology, these two points are equivalent to rough adjustment and fine tuning respectively. In some sense, this adaptation algorithm can be regarded as a kind of local linearization, which is made continuously at every sampling instant. The following expression can be used to capture the adaptation mechanism:

the general MPC techniques. which can be used for controlling the non linear processes once their nonlinear models are available. are given .

3.1 Adaptive modeling of nonlinear process lIsing neural network As stated earlier, there is no established methodology for the identification of nonlinear process. When neural networks are used for this purpose, one common scheme is to adaptively adjust its weights (e.g. Mills et aI. , 1996), however, the following potential problems exist: it involves too many variables (weights), and as the size of neural networks is increased, the number of variables to be adjusted will be increased accordingly; an appropriate learning rate is difficult to determine; it is time consuming, thus not easy to be implemented on line. In addition, usually the size of neural network is not easy to determine, some trial-and-error method is required, and the experiences of researchers are useful.

Error

Input

(2)

Fig. 2. The proposed adaptive modeling of non linear process

where G(k+ 1) is the adaptation factor used to predict the future outputs at sampling instant k; y,ea/ (k ) and Ymode / (k) are measured output and predicted output at sampling instant k, respectively. Obviously, G is the only parameter to be adjusted, and the number of such parameters is determined by the number of outputs For example, in pH control problem to be studied later, the number of parameter G is one, that is, only one parameter is to be adjusted.

Our proposed structure is shown in figure 2, where ANN stands for Artificial Neural Network, and G is used to adaptively represent the dynamics of the process, together with ANN. Here G is a parameter to be adjusted continuously. It deserves mentioning that unlike widely adopted case in which a neural network is used to model the dynamics of the process, here a neural network is employed which is trained just by the static state data, namely the static relationship between inputs and outputs. However, it is important to note that such a neural network not only represents static relationship, but also provides some useful dynamic information when properly used, which is to be explained in detail later. The dynamics of process is represented by the combined action of adaptive component G and ANN . The adaptive algorithm is driven by the error between the most recently measured output and its predicted value.

This adaptive algorithm advantages, including: •

• This adaptation mechanism makes use of the

285

has

several

obvious

The problems related to non linear process identification such as the choice of the number of inputs, the determination of excitation signal, which remain unsolved, can be circumvented or lessened to some extent, since only static data is needed to train the neural network, and the dynamics is represented adaptively by using a simple adaptation mechanism . The requirement for neural network is reduced, because neural network is now required to

• •

represent only steady state relationship. In order to represent dynamic responses of some complex non linear processes, usually neural networks of large size are required, which is undesirable for its application in real plants. In our proposed approach , the neural network to be used can be greatly simplified, which, of course, is highly desirable. It is easy to understand and simple to implement. Not only the dynamic performance, but also the static performance can be improved. It is observed that, in some cases, increasing the size of neural network can not improve the performance as expected, while the introduction of adaptation mechanism can. This is very useful for the case in which there is a strict requirement on the steady state error.

small. 11 10.5 10

Solid Actua l

9.5

Dotted . A NN

~ s:r I

I

7:[

y /

,:1 500

505

510

515

525

520

Flow rate of NAOH

Fig.3. An example of oscillation in static relationship governed by a neural network

It is also important to point out the limitations of the proposed approach. As can be seen from above description, only the most recently measured output and its corresponding predicted value are used to predict the output in the future, it cannot be applied in the cases where processes have inverse characteristics. Furthermore, it is desirable that the processes do not exhibit drastic dynamics.

4. A pH CONTROL PROBLEM To demonstrate the proposed approach , a typical pH control problem is considered, as shown in figure 4, in which there are two input streams, one contains the sodium hydroxide and the other one acetic acid. Here the flow rate of HAC, F I is fixed as a constant, while the flow rate of NAOH, F2 is used to control the value of pH. More detailed description can be found in other papers (e.g., Saint Donat. et aI. , 1991). In the figures that follow, the time indicates the number of samples, where sampling time is 0.2 minutes.

Another important statement involves the stability of neural networks. In some cases, the neural networks may produce undesirable oscillation over some operating regions when they are expected to converge to the desired steady states. For some challenging processes, this kind of serious problem may arise even for a seemly good neural network, as shown in figure 3 for the pH case study when an improper neural network is adopted. It is observed that there is higher possibility of encountering such a convergence problem for neural networks with more input nodes, indicating that it is better to use neural networks with less input nodes when convergence is to be considered.

HAC

pH

3.2 MPC of nonlinear process Fig. 4 . Schematic diagram of pH CSTR

Once the non linear model of process is obtained, it can be used in MPC to control nonlinear processes. The framework of the proposed MPC is the same as those general ones, with the exception of neural network being used as nonlinear model. Unlike the linear cases, when a non linear model is employed, there is no efficient established opttmlzation algorithm (like the Quadratic Programming for linear MPC). The development of non linear optimization techniques in MPC is our next work. At present, equal interval search method is employed. Specifically, the number of control moves to be determined is set to be one. Furthermore, in order to reduce the computational burden the number of predictions to be made is chosen to be relatively

The main difficulty of control of pH problem arises from the highly nonlinear relationship between pH and F2, as shown in figure 5 for their steady state relationship. To represent this steady state relationship while providing some pseudo dynamic property, two input nodes are used, one is the value of F2 and the other one is pH . It is mentioned that this number of input nodes is the least used one, and if only F2 is used, then the neural network cannot exhibit some pseudo dynam ic property, that is, it just represents the steady state relationship. This is undesirable for our use,

286

since more dynamic information is needed to obtain better control moves. Here, in our study, one output node is employed, which is the predicted pH output based on the above two inputs. Eight hidden nodes are used. Figure 5 also shows the steady state relationship governed by the neural network.

7 .2 r - r - - - - - - - - - - - - - - - ,

I 715r I

71 f

H

I

p 705t

11

6J'-----------,..,-----~--.J

105 Solid :Actual

10[ 9.5

o

Dotted ANN

5

10

15

9

:a

85

20 Time

25

30

35

40

Fig. 6. Dynamic response of pH from 7.2 to 7.0

8 75 1 14,-----------------. 1 12 6;[ 500

11 505

510

515

520

525

Flow rate of NAOH

108 r 1 06 ~

Fig.5. Comparison between static relationship by neural network and actual one

04 G 1.

1

102 1

To test the proposed approach, two commonly used cases will be given to demonstrate it, in which the slopes of pH with respect to F2 change by a factor of about 3.0.

09~~-~5-~1~0-~1~5-~2~0-~2~5~-3~0~-3~5~~40 Time

Fig. 7. The changing trend of parameter G for the case of fig . 6

The first case is that pH set value is changed from 7.0 to 7.0, its dynamic response is shown in figure 6, and the changing trend of its corresponding parameter G is recorded in figure 7. The second case is that pH is changed from 6.5 to 6.3, whose dynamic response is shown in figure 8, and the changing trend of its corresponding parameter G is shown in figure 9.

63

Compared to the results obtained by Saint Donat, et al. (1991), the results obtained here using our approach are better. Many cases have been carried out to examine the proposed approach, for example, figures 10 and 11 show the dynamic response of pH when it is changed from 9.9 to 10.1 and the changing trend of its corresponding adaptation parameter G, respectively.

6 .250

10

15

20

25

30

3540

Time

Fig. 8. Dynamic response of pH from 6.5 to 6.3 1.6 , - - - - - - - - - - - - - - - - - - ,

It is pointed out that for some cases, for example the case shown in figure 9, the value of G can exhibit up to 50% error from its expected value 1.0 during the transient course (adaptation phase), while in some other cases, such as the case shown in figure 11, the value of G changes only within 3%. This big difference is caused by the fact that the neural network model adopted here is for a non linear process over a wide operating region. Furthermore, it is stressed that the changes of G mean that it plays an adaptive role in the mode ling approach proposed.

~~

: : : f- - - - - - : - -

· 0

10

15

20

25

30

35

40

Time

Fig. 9. The changing trend of parameter G for the case of fig . 8

287



5

10

15

20 Time

25

30

35

40

Dynamic response becomes less sensitive to the selection of input number, which is an important problem for the case in which no adaptation is adopted. This robustness is useful for dealin 0o . With complex processes. The possibility of the convergence problem of neural network, which may occur in using neural networks for controlling non linear processes, can be greatly reduced by using a neural network with less input nodes. In addition, the steady state performance of control system can be further improved through the adaptation mechanism , indicating that even the steady state requirement on neural networks can be relaxed to some extent.

Fig. 10. Dynamic response of pH from 9 .9 to 10. 1 The future work will deal with the situation where process noise is considered. Also in this work the prediction is based on only current measure~ent, which is simple, but results in some loss of dynamic information. This can be improved by using more past information appropriately.

1.00sr--~---~--~-~-~--

0.99! 0.99 G 0 .98!

Acknowledgment: This work was supported (in part) by the Korea Science and Engineering Foundation (KOSEF) through the Automation Research Center at POSTECH.

0.98 0.97! 0.970~-;::-----:';:------:::---=-~-~-~-

5

10

15

20 Time

25

30

35

40

REFERENCES

Fig. 11 . The changing trend of parameter G for the case of fig . 10

Bhat, N . and T. 1. McAvoy. (1990) . Use of neural nets for dynamic modelling and control of chemical process systems. Comput. Chem. Engng. , 14, 573-583 . Haykin, S. (1994) . Neural Networks: A Comprehensive Foundation. New Jersey : IEEE Computer Society PresslMacmillan. Mills, P. M. , A. Y . Zomaya, and M . O . Tade.

5. CONCLUSIONS In this paper, an adaptation strategy is proposed to deal with the adaptive modeling and control of nonlinear processes. It can be applied to those non linear processes which do not exhibit inverse response characteristics and drastic dynamics . Its advantages include: •



(1996) . Neuro-Adaptive Process Control: A practical Approach, John Wiley & Sons. Saint-Don at, 1., n. Bhat, and T . J . McAvoy (1991). Neural net based model predictive control. Int. J o/Control, 54 , 1453-1468. Seborg, D . E., T. F. Edgar, and D. A . Mellichamp. (1989). Process dynamics and control, John Wiley & Sons, Inc .

Training samples can be obtained without paying much efforts on the issues of identification of nonlinear processes (which remains an open problem , as mentioned earlier), since what to do now is just to collect steady state data, which is not only easy to obtain but also reliable . It is pointed out that by doing so, the whole work amount is greatly reduced, much time and efforts is saved. Structure of neural networks adopted can be significantly simplified, unlike the common cases, in our strategy, the only requirement on neural networks is that the steady state relationship between input and output of non linear process can be represented within some limited tolerance, which is relatively easy to be satisfied.

288