Experimental Application of Partitioned Model-Based Control to pH

View Sections. ACS2GO © 2018. ← → → ←. loading. To add this web app to the home screen open the browser option menu and tap on Add to hom...
0 downloads 0 Views 122KB Size
744

Ind. Eng. Chem. Res. 2002, 41, 744-750

PROCESS DESIGN AND CONTROL Experimental Application of Partitioned Model-Based Control to pH Neutralization† Alisher Maksumov, Dennis J. Mulder,‡ Kenneth R. Harris,§ and Ahmet Palazoglu* Department of Chemical Engineering and Materials Science, University of California, One Shields Avenue, Davis, California 95616

A novel model-based nonlinear control strategy is demonstrated using an experimental pH neutralization process. The control strategy involves a partitioned model structure that consists of a linear ARX model and a nonlinear neural network model, in the context of internal model control (IMC). When integrated into the internal model control scheme, the resulting controller is shown to have favorable practical implications as well as superior performance when compared with a linear IMC controller. 1. Introduction Because of inherent nonlinearities in chemical processes, linear control systems can yield suboptimal dynamic performance, resulting in unfavorable plant economics. In recent years, various model-based controller design techniques have been proposed to deal explicitly with process nonlinearities,1-3 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 a process model structure with critical properties of parsimony and invertability. In this realm, a large body of literature has appeared on the use of neural network (NN) models for nonlinear process control,4-6 such as the work of Pottmann and Seborg,7 who proposed a model predictive controller based on radial basis function networks and applied it to the pH control problem. In typical applications, neural networks have been trained to model either the process behavior or its inverse and subsequently used in modelbased control schemes including adaptive control, feedforward control, model predictive control (MPC), and internal model control (IMC). The extension of the linear internal model control (IMC) strategy8 to nonlinear systems has been a popular model-based control approach.9 Several nonlinear IMC schemes for NN models have recently been proposed5,10,11 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 a separate NN, the controller might not accurately invert the steady-state gain of the model, and the offset might not be eliminated. Moreover, † A preliminary version of this work was presented at DYCOPS ’98 in Corfu, Greece. * To whom all correspondence should be addressed. Email: [email protected]. ‡ Current address: NEC Electronics Inc., Roseville, CA 95747-6565. § Current address: PDF Solutions, Inc., 333 West San Carlos St., Suite 700, San Jose, CA 95110.

Figure 1. Standard IMC structure.

these control schemes do not provide a tuning parameter that can be adjusted to account for plant-model mismatch. Another approach uses a nonlinear IMC strategy that includes time-delay 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 processes with stable inverses.5 Doyle et al.12 suggested a modified nonlinear IMC structure in which one uses a partitioned model structure to avoid inverting the nonlinear model directly. By utilizing this partitioned model inverse, they demonstrated that it is possible to minimize the tracking error for nonlinear systems with unstable inverses. Shaw et al.13 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 the first experimental application of this control design strategy to a pH neutralization process that has been used often as a benchmark process for real-time validation of nonlinear control systems.14,15 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 “autoregressive with exogenous input” (ARX) model. Our goal is simply to demonstrate the potential of a novel nonlinear control strategy using the pH process as a vehicle. 2. Nonlinear IMC Strategy The IMC structure is illustrated in Figure 1, where M is the model of the process, P is the process to be controlled, and Q is the IMC controller. This structure

10.1021/ie0003842 CCC: $22.00 © 2002 American Chemical Society Published on Web 01/17/2002

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002 745

controller, referred to as NNIMC henceforth, has the structure illustrated in Figure 3, where Q is the standard linear IMC controller

Q ) L-1FL

where FL is a low-pass filter, represented in discrete time by

Figure 2. Representation of the partitioned model inverse.

FL )

Figure 3. IMC structure with partitioned controller.

is sufficiently general to allow the use of a variety of process models, such as fundamental nonlinear models, as well as NN and black-box-type models.3 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 analytically16 or numerically.17 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. Although successful in some cases, this approach can often 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;18 however, this approach can be computationally demanding. In this work, we utilize a partitioned model to achieve the model inversion. This structure has been used previously with various functional expansion models12,19 and was recently proposed for the use of NNs by Shaw et al.13 Consider a nonlinear process in which a linear (L) and a nonlinear (N) model are available. The models can be combined into a composite model M as

M ) L + (N - L)

(1)

Using operator algebra, it is then straightforward to show that the inverse of this composite model is given by

M-1 ) [I + L-1(N - L)]-1L-1

(3)

(2)

Note that this expression, shown schematically in Figure 2, involves the inverse of only the linear model, which, in general, is straightforward to compute. Additionally, Doyle et al.12 have shown that this structure is flexible enough to allow for the computation of pseudoinverses in the case of nonlinear systems with nonminimum phase dynamics. In that case, L-1 is more generally replaced by L†, denoting the pseudo-inverse. Here, we use this structure in the IMC control scheme, with an ARX model for the linear model L and a NN for the nonlinear model N. The resulting IMC

(1 - a)z , a ∈ [0,1] z-a

(4)

The filter parameter a, as it approaches 0, demands a faster dynamic response from the closed-loop system. FN is a second filter, and its role is to provide robustness for the nonlinear IMC19 in the same spirit as in the linear IMC. FN would ideally be chosen as the inverse of FL; however, this choice for FN amplifies noise in the controller’s feedback loop that contains the nonlinear model. A more practical choice for FN is a lead-lag filter of the form

FN )

z - a (1 - b)z (1 - a)z (z - b)

(5)

where b < a. Consequently, a second tuning parameter b is introduced into the controller design. As b approaches a, the nonlinear control law reverts to the linear IMC controller based on the linear process model. Having a ) b results in linear control action, whereas b f 0 leads to “maximum” possible nonlinear control action, which needs to be balanced by noise suppression and lack of robustness in the nonlinear control loop. Remark 1. We obtain the maximum possible contribution from the nonlinear feedback loop as b f 0. This is because the filters cancel each other out, and the control action is computed with no attenuation. However, this leads to excessive noise amplification and lack of robustness. Therefore, in practice, the parameter b is set to an acceptable nonzero value. Remark 2. It should be noted that the availability of the second tuning parameter, b, provides flexibility in practical applications where the nonlinear portion of the controller can be “turned off” by setting a ) b whenever the user confidence in the nonlinear model is low or performance degrades as a result of aggressive control actions. One can essentially use the second filter parameter to tune the nonlinear contribution of the feedback loop according to the performance demands. Such multiple levels of control underscore a significant practical benefit of the partitioned model-based control. 3. Process Identification Linear Model. The ARX model is a linear input/ output model of the dynamic system in the form of a linear difference equation. This model is typically described by

y(t) ) b1u(t - nk) + b2u(t - nk - 1) + ... + bnbu(t - nk - nb + 1) - a1y(t - 1) - ... - anay(t - na) (6) where na and nb represent the number of past outputs and inputs, respectively, and nk is the input delay. The

746

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002

Figure 4. Recurrent NN architecture. Figure 7. Training data and model fit (smooth line) for neural network. (a) Base flow sequence, (b) pH response.

Figure 5. Experimental setup for the pH process.

Figure 8. Validation data and model fit (smooth line) for neural network. (a) Base flow sequence, (b) pH response. Table 1. Nominal Operating Conditions acid flow rate base flow rate pH

Figure 6. Titration curves for (a) the base case and (b) the disturbance case.

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. Sjo¨berg et al.21 presents a unified identification strategy for nonlinear systems. Accordingly, the regressor vector for the particular NN chosen in this work is given by

φ(t) ) [yˆ (t - 1|θ)...yˆ (t - na|θ), u(t - nk)...u(t - nb -

model is represented in operator form as

B(q-1) y(t) ) u(t) A(q-1)

1.5 L/m 0.5 L/m 6.8

nk + 1)]T (8) (7)

where A(q-1) and B(q-1) are polynomials in q-1, the backward shift operator.20 The parameters of A and B are typically identified by the classical least-squares approach.20 Neural Network Model. A variety of NN architectures have been applied for the modeling of nonlinear dynamic systems. Figure 4 is a generic illustration of a

and the predictor is given by

yˆ (t|θ) ) g(φ(t),θ)

(9)

where θ 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,

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002 747

Figure 9. Set-point tracking performance with the following filter parameters: (a) a ) b ) 0.92; (b) a ) 0.92, b ) 0.67; (c) a ) 0.92, b ) 0.5. Smooth line represents the reference trajectory.

Figure 10. Base flow rate for set-point tracking with the following filter parameters: (a) a ) b ) 0.92; (b) a ) 0.92, b ) 0.67; (c) a ) 0.92, b ) 0.5.

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 Levenberg-Marquardt or the recursive prediction error method.21 4. Experimental Results The pH neutralization process is inherently nonlinear because of the nature of the titration curve, and it 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.001 M HCl stream and a 0.002 M NaOH stream are fed into a 2.5-L constant-volume CSTR, where the pH measurements

are made with a sensor located directly in the CSTR. The base feed stream is buffered with a 0.003 M sodium bicarbonate solution. The control objective is to maintain a specified pH by manipulating the base flow rate. The acid concentration is considered as the unmeasured disturbance variable. The nonlinear control scheme is cascaded on linear PI flow controllers. The slave controllers on the flow rates have a sampling time of 1 s, and the master nonlinear control law uses a sampling time of 5 s. The nominal operating conditions are outlined in Table 1. The process measurements are interfaced to a PC for data collection and control law computation using the Real Time Toolbox for MATLAB by Humusoft.22

748

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002

Figure 11. Set-point tracking performance with the following filter parameters: (a) a ) b ) 0.90; (b) a ) 0.90, b ) 0.67; (c) a ) 0.90, b ) 0.5. Smooth line represents the reference trajectory.

Figure 12. Base flow rate for set-point tracking with the following filter parameters: (a) a ) b ) 0.90; (b) a ) 0.90, b ) 0.67; (c) a ) 0.90, b ) 0.5.

The nonlinear nature of this process can readily be observed in the nominal titration curve of Figure 6. Here, 50 mL of the acid solution was neutralized with the buffered base solution. Figure 6 also shows the titration curve corresponding to a new acid stream with a 0.001 M concentration that was used in the disturbance experiments. The shift in the titration curve is not exactly parallel, as the new stream buffering is also slightly different as a result of unanticipated variations in the source water. Note the strong variation in the process gain over the range of operation.

Ideally, one would like to use a random, Gaussian input for the NN training data.18 However, this is often not possible, either because of the asymmetric range of the input variables or because of the large amount of data that must be collected to accurately capture all possible process behaviors. In these cases, care must be taken to select an input set that will exhibit a range of relevant dynamics that the closed-loop system will experience. Consequently, the set of step inputs illustrated in Figure 7a was chosen. Because of the nature of the buffered base solution, the system tends to stay

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002 749

around a pH of 9.2, and once the acid exhausts the buffer, the pH quickly decreases. This can be seen in Figure 7b. Subsequently, data collection and NN training around the nominal pH of 6.8 and in the acidic range was quite problematic. This inevitably leads to some model-plant mismatch in that region and its consequences are noted later in the closed-loop runs. One of the key decisions in training the recurrent NN involves the parameters na and nb. We used the method of Lipschitz quotients23 to determine the relevant number of input and output variables. This resulted in a NN model with four past outputs (na ) 4) and four past inputs (nb ) 4), and we used a nonlinear hidden layer consisting of six nodes, followed by a linear output layer. The Neural Network Based System Identification Toolbox24 was used to fit the NN model. Figure 7b demonstrates the trained NN model fit to the data, and Figure 8a and b illustrates a smaller set of input/output data used for validation. The ARX model was fit using estimation and validation data collected from the perturbation of the NN model with a standard PRBS signal (the range of the signal was from 0.3 to 0.7 L/min, constant over an interval of 20 s). The ARX model structure consisted of four past inputs and two past outputs. The Akaike Information Criterion20 confirms the choice of the lags in this model. The resulting linear model is given by

L)

0.0677z4 - 0.0603z3 z4 - 1.4472z3 + 0.4033z2 - 0.1887z + 0.2429 (10)

Following the IMC design procedure,25 there are no nonminimum elements, and thus, the linear IMC controller becomes

Q ) L-1FL ) z4 - 1.4472z3 + 0.4033z2 - 0.1887z + 0.2429 FL 0.0677z4 - 0.0603z3 (11) where a base-case linear filter is specified by

FL )

(1 - 0.92)z z - 0.92

(12)

For the first set of experiments, we chose the second filter as

FN )

(1 - 0.67)(z - 0.92) (1 - 0.92)(z - 0.67)

(13)

This results in an excellent tradeoff between speed of response and noise amplification. First, the set-point tracking response was investigated, as illustrated in Figures 9 and 10. Figure 9a illustrates a closed-loop response of the linear IMC controller, Figure 9b and c illustrates the NNIMC with two separate values for the parameter b. The NNIMC controllers are tuned to follow the same reference trajectory as the linear IMC. The reference trajectory is simply the step response of the IMC filter. The linear IMC controller does well around pH ) 7, but the NNIMC controllers have a better overall performance. Note the slight degradation of performance in Figure 9c (the reference trajectory is not tracked as well) when the second filter parameter is decreased, thereby increasing the contribution of the

Figure 13. pH response to a change in the acid stream concentration with a ) 0.92.

nonlinear controller. This is consistent with the fact that the NN model has some mismatch around pH ) 7, and that one thus actually needs to attenuate the nonlinear feedback loop to maintain performance (see Remark 2). Another set of runs was also made with a lower linear filter parameter a. The goal here was to observe the dynamic behavior when the reference trajectory was specified to be more aggressive. In Figures 11 and 12, the benefit of the NNIMC can be seen even more strongly because the linear IMC tends to lose performance when tested in high- and low-pH regions. One still observes the slight degradation in performance when the second filter parameter is decreased. This, again, implies that, to preserve robust performance for this system, the contribution of the nonlinear feedback needs to be tuned conservatively. Responses to disturbances in the acid concentration were also investigated. Figure 13 illustrates a 15-min pulse disturbance in the acid concentration, from the nominal concentration of 0.001 to 0.002 M, while the nominal flow rate is maintained. This disturbance has the effect of shifting the titration curve, as illustrated in Figure 6. NNIMC controllers excelled at rejecting this disturbance, mainly because of the highly nonlinear behavior of the titration curve. The linear IMC controller displayed sluggish behavior and allowed higher pH deviations from the set point. It is noted that decreasing b leads to a faster response with a slight overshoot. Figure 14 displays the changes in the base flow rate to reject the disturbance with each set of tuning parameters. The NNIMC (Figure 14b and c) is more aggressive and thus more effective in rejecting the disturbance. The performance of all runs is summarized by the sum-of-the-squared-error (SSE) calculation in Table 2. The SSE is calculated as usual ∞

SSE )

[r(k) - y(k)]2 ∑ k)1

(14)

The NNIMC proves to be quite effective in set-point tracking within the whole operating region, also underscoring the loss of robust performance when the second filter parameter was further decreased. We note the overall higher quality of control achieved by the nonlinear controllers in the disturbance rejection experiments. Here, the NNIMC controllers prove to be supe-

750

Ind. Eng. Chem. Res., Vol. 41, No. 4, 2002

Figure 14. Base flow rate response to a change in the acid stream concentration with a ) 0.92 and (a) b ) 0.92, (b) b ) 0.67, (c) b ) 0.5. Table 2. Sum of the Squared Errors (SSE) Calculated for the Duration of Each Experiment experiment

IMC, a)b

NNIMC, b ) 0.67

NNIMC, b ) 0.50

set point change, a ) 0.92 set point change, a ) 0.90 acid pH dist., a ) 0.92 acid pH dist., a ) 0.90

90 109 520 464

55 97 162 159

115 188 162 130

rior across the board, even when the second filter parameter is decreased further (experiment was not shown). This observation also illustrates the well-known fact that tuning that is acceptable for one objective (disturbance rejection) does not necessarily produce acceptable performance for another objective (set-point tracking) for a one-degree-of-freedom controller. 5. Conclusions 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 in parallel. The experimental results indicate that the controller is relatively easy to implement and provides better performance over a large range of operation as compared to a linear controller. We point out that the method is sufficiently flexible to apply to a wide variety of nonlinear process problems. We also note the outstanding issues related to model-plant mismatch and the consequences of model selection within the nonlinear IMC framework. Identification of nonlinear processes remains a challenging problem and will have a significant impact on the success of model-based controllers as described here. Acknowledgment Support from the NSF (CTS-9800073) is gratefully acknowledged. We also appreciate very useful comments from the anonymous reviewers. Literature Cited (1) Allgo¨wer, F.; Doyle, F. J., III. Nonlinear Process Controls Which Way to the Promised Land? In Fifth International Conference on Chemical Process Control; Kantor, J. C., Garcia, C. E.,

Carnahan, B., Eds.; AIChE Symposium Series; AIChE: New York, 1997; Vol. 93. (2) Bequette, B. W. Nonlinear Control of Chemical Processes: A Review. Ind. Eng. Chem Res. 1991, 30, 1391. (3) Henson, H. A.; Seborg, D. E. Nonlinear Process Control; Prentice Hall: Upper Saddle River, NJ, 1997. (4) Hussain, M. A.; Kershenbaum, L. S. Simulation and experimental implementation of a neural-network-based internalmodel control strategy on a reactor system. Chem Eng. Commun. 1999, 172, 151. (5) Nahas, E. P.; Henson, M. A.; Seborg, D. E. Nonlinear Internal Model Control Strategy for Neural Network Models. Comput. Chem. Eng. 1992, 16, 1039. (6) Saint-Donat, J.; Bhat, N.; McAvoy, T. J. Neural Net Based Model Predictive Control. Int. J. Control 1991, 54, 1453. (7) Pottmann, M.; Seborg, D. E. A Nonlinear Predictive Control Strategy Based on Radial Basis Function Models. Comput. Chem. Eng. 1997, 21, 965. (8) Morari M.; Zafiriou, E. Robust Process Control; Prentice Hall: Upper Saddle River, NJ, 1989. (9) Berber, R., Kravaris, C., Eds. Nonlinear Model Based Control; NATO/ASI Series E; Kluwer Publishers: The Netherlands, 1997; Vol. 293. (10) Hunt, K. J.; Sbarbaro, D. Neural Networks for Nonlinear Internal Model Control. IEE Proc. Pt. D. 1991, 138, 431. (11) Aoyama, A.; Doyle, F. J., III; Venkatasubramanian, V. Control-Affine Fuzzy Neural Network Approach for Nonlinear Process Control. J. Process Control 1995, 5, 375. (12) Doyle, F. J., III; Ogunnaike, B. A.; Pearson, R. K. Nonlinear Model-Based Control Using Second-Order Volterra Models. Automatica 1995, 31, 697. (13) Shaw, A. M.; Doyle, F. J., III; Schwaber, J. S. A Dynamic Neural Network Approach to Nonlinear Process Modeling. Comput. Chem. Eng. 1997, 21, 371. (14) Norquay S. J.; Palazoglu, A.; Romagnoli, J. A. Application of Wiener Model Predictive Control (WMPC) to pH Neutralization Experiment. IEEE Trans. Control Syst. Technol. 1999, 7, 437. (15) Galan, O.; Palazoglu, A.; Romagnoli, J. A. Robust HInfinity Control for Nonlinear Plants Based on Multilinear Modelss An Application of a Bench-Scale Neutralization Reactor. Chem. Eng. Sci. 2000, 55, 4435. (16) Henson, H. A.; Seborg, D. E. An Internal Model Control Strategy for Nonlinear Systems. AIChE J. 1991, 37, 1065. (17) Economou, C. G.; Morari, M.; Palsson, B. O. Internal Model Control. 5. Extension to Nonlinear Systems. Ind. Eng. Chem. Process Des. Dev. 1986, 25, 403. (18) Herna´ndez, E.; Arkun, Y. Study of the Control-Relevant Properties of Back Propagation Neural Network Models of Nonlinear Dynamical Systems. Comput. Chem. Eng. 1992, 16, 227. (19) Harris, K. R.; Palazoglu, A. Studies on the Analysis of Nonlinear Processes via Functional Expansions. III: Controller Design. Chem. Eng. Sci. 1998, 53, 4005. (20) Ljung, L. System IdentificationsTheory for the User; Prentice Hall: Upper Saddle River, NJ, 1987. (21) Sjo¨berg, J.; Zhang, Q.; Ljung, L.; Benveniste, A.; Delyon, B.; Glorennec, P.; Hjalmarsson, H.; Juditsky, A. Nonlinear BlackBox Modeling in System Identification: A Unified Overview. Automatica 1995, 31, 1691. (22) Humusoft. Real Time Toolbox for Simulink and Matlab 5.3; Mathworks: Natick, MA, 1999. (23) He, X.; Asada, H. A New Method for Identifying Orders of Input-Output Models for Nonlinear Dynamic Systems. ACC Proc. 1993, 2, 2520. (24) Nørgaard, M. Neural Network Based System Identification Toolbox; Technical Report 95-E-773; Department of Automation, Technical University of Denmark: Lyngby, Denmark, 1995. (25) Prett, D. M.; Garcia, C. E. Fundamental Process Control; Butterworths: Boston, 1988.

Received for review April 5, 2000 Revised manuscript received July 16, 2001 Accepted November 27, 2001 IE0003842