Experimental Application of Partitioned Model-Based Control to pH Neutralization

Experimental Application of Partitioned Model-Based Control to pH Neutralization

Copyright © IFAC Dynamics and Control of Process Systems, Corfu, Greece, 1998 EXPERIMENTAL APPLICATION OF PARTITIONED MODELBASED CONTROL TO pH NEUTRA...

1MB Sizes 0 Downloads 51 Views

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

EXPERIMENTAL APPLICATION OF PARTITIONED MODELBASED CONTROL TO pH NEUTRALIZATION Alisher Maksumov*, Kenneth R. Harrist, and Ahmet Palazoglut *Department o/Technological Process Automation Tashkent State Technical University, Uzbekistan 'Department o/Chemical Engineering and Materials Science University o/California. Davis. USA

Abstract: A nonlinear control law is applied to an experimental pH neutralization process. A partitioned model is used to capture the dynamic behavior of the process, consisting of a linear ARX model and a nonlinear neural network model. When integrated into the internal model control scheme, the resulting controller is shown to have better performance compared to the linear controller for the pH neutralization process. Copyright © 1998IFAC Keywords: pH neutralization, nonlinear control, neural network

1. INTRODUCTION

Several nonlinear IMC schemes for NN models have recently been proposed (Nahas, ) 992; Hunt and Sbarbaro, ) 99) ; Aoyama et aI., 1995) for chemical process applications. Commonly a NN is trained to learn the inverse dynamics of the process and is employed as the nonlinear controller. As the process itself is modeled with separate NN, the controller may not accurately invert the steady-state gain of the model and the offset may not be eliminated. Moreover, these control schemes do not provide a tuning parameter that can be adjusted to account for plant-model mismatch. Another approach uses NlMC strategy, which includes timedelay compensation in the form of a Smith predictor, and a controller based on the NN model inverse. This approach guarantees offset-free performance, but is restricted to process with stable inverses (Nahas et aI., 1992).

Due to inherent nonlinearities in chemical processes, linear control systems can yield suboptimal dynamic performance, having significant economic impact. In recent years, various model-based controller design techniques have been proposed to explicitly deal with process nonlinearities (Bequette, 1991; Doyle and Allgower, 1996), hence improving the region of operability of such processes. The key issue in most of the approaches that rely on input/output models has been the process model structure with critical properties of parsimony and invertibility. In this realm, there has appeared a large body of literature on the use of neural network (NN) models for nonlinear process control (Nahas et aI., 1992; Saint-Donat et aI. , 1991). In typical applications, neural networks have been trained to model either the process behavior or its inverse and subsequently used in model-based control schemes including adaptive control, feedforward control, model predictive control (MPC), and internal model control (IMC).

Doyle et al. (1992) have suggested a modified non linear lMC structure where one uses a partitioned model structure to avoid inverting the non linear model directly. By utilizing this partitioned model inverse, they demonstrated that it is possible to minimize the tracking error for

553

(Hernandez and Arlcun, 1992), however, this can be computationally demanding.

nonlinear systems with unstable inverses. Shaw et al. (1997) have also employed a dynamic NN within this scheme and showed that it provides an attractive alternative for NN-based control applications. In this work, we present an experimental application of this control design strategy to a pH neutralization process. We use the recurrent neural network structure and compare the performance of the nonlinear IMC scheme with that of a linear IMC scheme that uses an ARX model. In the sequel, we first introduce the formulation of the nonlinear IMC problem, and then focus on the process identification strategy. This will be followed by the experimental results. Finally, we will present conclusions and areas of future study.

In this work, we utilize a partitioned model to achieve the model inversion . This structure has been previously used with functional expansion models such as the Volterra model (Doyle et aI., 1995), and was recently proposed for the use of NNs by Shaw et a1. (1997). Consider a nonlinear process in which a linear (L) and non linear model (N) are available. The models can be combined into a composite model M as (I)

M=L+(N-L)

It is then straightforward to show that the inverse of

this composite model is given by

2. NONLTNEAR TMC STRATEGY The extension of the popular linear internal model control (IMC) strategy (Morari and Zafiriou, 1989) to non linear systems has been addressed by a number of different approaches. The IMC structure is illustrated in Figure I, where M is the model of the process, P is the process to be controlled, and Q is the IMC controller. This structure is general enough to allow the use of a variety of process models, such as fundamental nonlinear models (Henson and Seborg, 1991), as well as NN, blackbox type models (Nahas et aI., 1992).

Note that this expression only involves the inverse of the linear model, which in general is straightforward to compute. Additionally, Doyle et al. (1995) have shown that this structure is flexible enough to allow the computation of pseudo in verses in the case of non linear systems with nonminimum phase dynamics.

u r+

N-L Figure 2. Partitioned model inverse. Figure I. General IMC structure. Here we use this structure in the IMC control scheme, with an ARX model for the linear model L, and a NN for the non linear model N. The resulting IMC controller has the structure illustrated in Figure 3, where Q is the standard linear IMC controller. FN is a second filter, which would ideally be chosen as the inverse to the !MC reference filter. However, this choice for FN amplifies noise in the controller's feedback loop. A more practical choice for FN is a lead-Iag filter of the form

The difficulty in the use of these models in the IMC strategy arises in the design of the IMC controller. Because the controller is based on the inverse of the model M, a reliable, efficient method is required to achieve this inversion. In the case of fundamental models, this inversion can be done analytically (Henson and Seborg, 1991), or numerically (Economou et aI., 1986). However, if a fundamental model of the process is not available, the problem of inverting a black-box model such as the NN is encountered. Several methods have been utilized for this inversion. One method involves training a NN directly to learn the inverse dynamics. While successful in some cases, often this approach can lead to offset because the product of the gains of the model NN and the controller NN do not necessarily yield unity. A numerical inversion technique has also been employed

(3)

where FU' is a second low pass filter with faster dynamics than F. Consequently, a second tuning parameter is introduced into the controller. As FLP approaches F, the nonlinear control law reverts to the linear IMC controller based on the linear

554

Equation 4 is commonly called the linear difference model for input/output, linear, time-invariant systems. The parameters of A and B are typically identified by a least-squares approach (Ljung 1987).

process model. Consequently, FN =1 results in linear control action , while FtFF1 results in the maximum amount of nonlinear control action. Intermediate values of FN provide a tradeoff between nonlinear control action and noise suppression.

A variety of NN architectures have been applied for the modeling of non lin ear dynamic systems. Figure 4 is a generic illustration of a recurrent dynamic neural network, with n nodes in one hidden layer and one output layer. The network is a recurrent network because past model outputs are used as inputs into the NN. Sjoberg et al. (1995) presents a unified identification strategy for nonlinear systems. Accordingly, the regressor vector for the particular NN chosen in this work is given by

r

Figure 3. IMC structure with partitioned controller.

l/J(t)

3. PROCESS IDENTIFICATION The ARX model is the linear dynamic model of the system in the form of a linear difference equation . This model is described by

= [Y(1 -11 B) ... } '(1 - na 1B)

(6)

and the predictor is given by

y(t 18) = g(l/J(t),B)

(7)

y(t)=bIU(t-nk)+b2u(t-nk -1)+ . .. +bnbu(t-nk -nh +I)-aly(t - I)-.. .

where e is the vector of weights and g is the function realized by the NN. The recurrent NN is used to facilitate the online implementation as it uses past model outputs rather than past plant outputs. The hidden layers, number of nodes, number of past outputs, and number of past inputs used in the construction of the network are all model parameters. Training of the NN can be accomplished using, among others, the LevenbergMarquardt or the recursive predi.ction error method Sjoberg et aL (1995).

(4)

-anay(t - na )

and is represented in operator form as

y(t)

B( -I)

= -q-I-U(l)

(5)

A(q- )

where A(q-I) and B(q-') are polynomials backwards shift operator q.

10

the

4. EXPERIMENT AL RESULTS 1\

y(t-nJ

The pH neutralization process is inherently nonlinear due to the nature of the titration curve, and is an excellent medium for demonstrating the merits of nonlinear control methods. The experimental setup used in this study is illustrated in Figure 5. A 0_0012 M HCI stream and a 0.002 M NaOH stream are fed to a 2.5 L constant volume CSTR., where the pH measurement is done through a sensor located directly in the CSTR The base feed stream is buffered with a sodium bicarbonate concentration of 0.0025 M. For further details of the experimental setup the reader is referred to Norquay et al. (1998). The control objective is to maintain a specified pH by manipUlating the base flowrate. The acid flowrate and concentration are considered as unmeasured disturbance variables. The nonlinear control scheme is cascaded on linear PI flow controllers. The slave controllers on the flowrates have a sample time of one second, while

y(t-n a+l)

U(t-nb-nk+/)

u(t- n b-nk+2)

u(t-n,j

Figure 4. Recursive NN architecture.

555

due to the asymmetric range of the input variables, or because of the large amount of data that must be collected to accurately capture all the possible process behaviors. In these cases, care must be taken to select an input set that will exhibit a range of relevant behaviors the closed-loop system will experience. For this pH neutralization system, the majority of the non linearity is most likely static, due of the nature of the titration curve. Consequently, the set of step inputs illustrated in Figure 7a was chosen to capture the gain and the slow dynamics accurately. In systems displaying a richer set of nonlinear behaviors, this input data set may not be adequate for identification purposes.

the master non linear control law uses a sample time of 5 seconds. The nominal operating conditions are outlined in Table I. The process measurements are interfaced to a PC for data collection and control law computation, using the Real Time Toolbox for MA TLAB by Humusoft.

RH"" AClDTANK

Q'

~_-'-----'

Figure 7b demonstrates the trained NN model fit to the data, while Figure 8a and 8b illustrate a smaller set of input/output data that was used for validation. Note that in the training data, the model essentially overlaps the output data, while in the validation set, the model fits the data well.

TO WAS TE TANK

CSTR

Figure 5. Experimental pH setup. The non linear nature of this process can readily be seen in the nominal titration curve of Figure 6. Here 50mL of the acid solution was neutralized with the buffered base solution. Figure 6 also shows the titration curve corresponding to an acid stream with a 0.0025 M concentration that will be used in disturbance experiments. Note the strong variation in the process gain over the range of operation.

9

/

./

/'

~

2r---~--~---~--~---.

.€ 2.1. ~

o

-=:g 1 2l0. 20

40

60

80

100

60 time (m) .

80

100

time (m)

-------

20

40

;'

/

~

w

~

~ ~ ~ 00 base solution added (mL)

Figure 7. Training data and model fit (- - -) for neural network.

ro

To ensure that the linear ARX model and the NN models match in the partitioned model structure, the ARX model was fit using estimation and validation data collected from the NN model. The ARX model structure consisted of using two past inputs and outputs. The NN used three past model outputs and three past inputs into a non linear hidden layer of 6 nodes, followed by a linear output layer. The Neural Network Based System Identification Toolbox (NI/Jrgaard, 1995) and MA TLAB were used to fit the neural network model.

00

Figure 6. Nominal (---) and disturbed (- --) titration curves. The non linear IMC control law was designed according to the presentation above, and will be denoted NNlMC in the sequel. For comparison purposes, the analogous linear IMC controller tuned to follow the same reference trajectory was also designed, and will be denoted simply as IMC.

Acid flowrate Base flowrate

pH

Ideally, one would like to use a random, Gaussian input for the training data (Hernandez and Arkun, 1992). However, often this is not possible, either

1.5 Urn 0.6Um 7.4

Table I. Nominal operating conditions.

556

linear controller has significant error in the gain and dynamics resulting in a sluggish closed-loop system. Additionally, the overall sum of squared error deviation from this trajectory is less as illustrated in Table 2. 10

20

30

40

50

60

70

80

90

Figure 10 demonstrates the closed-loop behavior of the controllers in the presence of a -0.5 Um pulse disturbance in the acid flowrate. Again, the linear IMC controller does not reject the disturbance as well as the NNlMC controller, and allows larger deviations from the setpoint.

time (m)

20~~--~--~--~--~~--~--~~

10

20

30

40

50

60

70

80

90

Finally, responses to disturbances in the acid concentration were investigated. Figure I1 illustrates an 8-minute pulse disturbance in the acid concentration, from the nominal concentration of 0.0012 M to 0.0025 M, while maintaining the nominal flowrate. This disturbance has the effect of shifting the titration curve as illustrated in Figure 6. The NNlMC controller excelled at rejecting this disturbance, mainly due to the highly nonlinear behavior of the titration curve. The linear controller displayed sluggish behavior and allowed higher pH deviations from the setpoint. The performance of these experiments is summarized in the SSE calculations in Table 2.

time (m)

Figure 8. Validation data and model fit (- - -) for neural network.

The identified models were integrated into the IMC structure as illustrated above, with the following filters used as tuning parameters F= (1-0.92)z FN = (1-0.67Xz-0.92)

z-0.92

(I-O.92Xz - 0.67)

(8)

IMC

5·L-______

o

~

5

______

~

______

10

~

______

15

~

20

time (m)

2

4

6

8 time (m)

10

12

14

Figure 9. Reference moves. Figure 10. Acid flowrate pulse disturbance. Figure 9 illustrates a closed-loop response of the IMC controller and the NNIMC controller, tuned to follow the same reference trajectory. Overall, the NNIMC controller follows this reference trajectory closer than the linear IMC controller. There is some evidence of overshoot in the NNIMC controller, specifically in the lower pH ranges. This is most likely due to several possible sources of error in the NN model, including lack of training data and hysteresis in the these low flow ranges of the Control valve. At the higher pH setpoint changes, the NNIMC scheme more accurately models the nonlinear gain of the system, while the

Note the overall higher quality of control achieved by the NNIMC controller is most evident in the disturbance experiments. This is due in part to the majority of the training data lying about the steady state point. Should a larger set of input/output data be utilized, spanning more regions of the operating envelope in the NN training and validation steps, the setpoint trajectory experiments would be expected to improve. This large amount of data is often not feasible in practice, as is the case here.

557

Doyle Ill, F. J., B. A. Ogunnaike, and R. K. Pearson (1995). Nonlinear Model-Based Control Using Second-Order Volterra Models. Aulomalica 31 , 697-714. Economou, C. G. , M. Morari, and B. O . Palsson (1986). Internal Model Control. 5. Extension to Nonlinear Systems. lnd. Eng. Chem. Process Des. Dev. 25, 403-411 .

o

5

10

Henson, H. A. and D. E. Seborg (1991). An Internal Model Control Strategy for Nonlinear Systems. AIChE J. 37, 1065-1O8\.

20

15

bme(m)

Hermindez, E., and Y. Arkun (1992). Study of the Control-Relevant Properties of Back Propagation Neural Network Models of Nonlinear Dynamical Systems. Comp. Chem. Eng. 16, 227-240

Figure 11 . Acid concentration disturbance

Experiment Setpoint change Acid flow dist Acid pH dist

NNIMC SSE 69 78 588

IMC SSE 114 119 1230

Hunt, K. J. and D. Sbarbaro (1991). Neural Networks for Nonlinear Internal Model Control. lEE Proc. PI D 138, 431-438. Ljung, L. (1987). System Identification - Th eory for the User. Prentice Hall, New Jersey.

Table 2. SSE for experiments. 5. CONCLUSIONS

Morari M., and E. Zafiriou (l9R9). Rohu~t Process Control. Prentice Hall, New Jersey.

An internal model control strategy utilizing a

partitioned model was applied to an experimental pH neutralization process. A partitioned model was identified from input/output data, and consisted of a recurrent neural network and a linear ARX model. The resulting nonlinear control law was shown to provide better performance, compared with the nominal linear IMC controller when the system's operation strayed away from the linear regime.

Nahas, E. P., M. A. Henson , and D. E. Seborg (1992). Nonlinear Internal Model Control Strategy for Neural Network Models. Comp. Chem. Eng. 16, 1039-1057.

Neural Nenvork Based Nergaard, M. (1995) System Identification Toolbox. Technical Report 95-E-773, Department of Automation, Technical University of Denmark.

Current efforts focus on closed-loop training of the neural network and optimization of the neural network!ARX model architecture. Additional studies are also warranted to investigate the effect and the interaction of the filter parameters.

Norquay S. J. , A. Palazoglu, and J. A. Romagnoli (1998). Model Predictive Control Based on Wiener Models. Chem. Eng. Sci., 53, 75-84.

6. REFERENCES

Saint-Donat, 1., N. Bhat, and T. 1. McAvoy (1991). Neural Net Based Model Predictive Control. 1nl. J. Control 54, 1453-1468.

Allgower, F., and F. J. Doyle III (1995). Nonlinear Process Control - Which Way to the Promise Land? Presented at CPC V.

Shaw, A. M., F. J. Doyle, and 1. S. Schwaber (1997). A Dynamic Neural Network Approach to Nonlinear Process Modeling. Comp. Ch em. Eng. 21 , 371-385 .

Aoyama, A. , F. J. Doyle III and V. Venkatasubramanian (1995). Control-affme Fuzzy Neural Network Approach for Nonlinear Process Control. J. Proc. ConI. 5, 375-386.

Sjoberg, 1., Q. Zhang, L. Ljung, A. Benveniste, B. Delyon, P. Glorennec, H. Hjalmarsson, and A. luditsky (1995). Nonlinear Black-box Modeling in System Identification: A Unified Overview. Automatica 31,1691-1724.

Bequette, B. W. (1991). Nonlinear Control of Chemical Processes: A Review. lnd. Eng. Chem Res. 30, 1391-1413.

558