pH and Level Controller for a pH Neutralization Process - American

resulted in the robust nonlinear control law (RNCL). In many of these studies, only control of the pH variable is considered. The volume, and hence le...
0 downloads 0 Views 80KB Size
Ind. Eng. Chem. Res. 2001, 40, 3579-3584

3579

PROCESS DESIGN AND CONTROL pH and Level Controller for a pH Neutralization Process Ai-Poh Loh,* Dhruba Sankar De, and P. R. Krishnaswamy Department of Electrical & Computer Engineering, National University of Singapore, 10 Kent Ridge Crescent, Singapore 119260, Singapore

A model reference adaptive control scheme is designed for the control of both the pH and level variables in a neutralization process in a continuously stirred tank reactor. In this adaptive scheme, the control and parameter estimation laws are derived based on a reference model approach for nonlinearly parametrized systems. By suitably choosing the parameter update and control laws, the algorithms are much simplified for this pH problem. Global stability and zero tracking errors for both pH and level can be achieved with this new adaptive controller. Simulation and comparative results are given to illustrate the control scheme. Experimental results are given for the pH control. 1. Introduction Control of pH is a challenging problem and has received considerable attention because of its importance in the process industry. pH processes are difficult to control because of their inherent nonlinearity, high sensitivity at and near the neutralization point, and time-varying gains when uncertainties in flows and concentrations are present. A survey of the literature revealed that various control strategies have been applied to the pH problem. They range from linear controllers to nonlinear model-based controllers through to model-free fuzzy controllers. Linear controllers usually perform well only in the range for which they have been tuned and would become unsuitable in other ranges because of varying process gain.1,2 Both adaptive and nonadaptive schemes have been proposed to circumvent this problem.3 Nonlinear internal model control (NIMC) was used in ref 4, and its ability to control a pH process was examined. A later modification to include an adaptor was developed in ref 5, which resulted in the robust nonlinear control law (RNCL). In many of these studies, only control of the pH variable is considered. The volume, and hence level, of the mixture in the continuously stirred tank reactor (CSTR) is usually assumed to be a constant. Though the pH value of the process is often used as the process feedback variable, various other alternatives have been suggested by researchers. Some of these include the difference in hydrogen and hydroxyl ion concentrations, η,6 reaction invariants,3 strong acid equivalent, Y,7 hydrogen ion concentration, CH,4,5 and ionic difference.8 The motivation for the use of these variables is that it reduces the nonlinearity of the pH process model. The use of some of these variables, such as reaction invariants, strong acid equivalent, and ionic difference, however, proves useful only when an online estimation or concentration measurement of the differ* To whom correspondence should be addressed. Tel: (65)8742451. Fax: (65)7791103. E-mail: [email protected].

ent electrolytes in the inlet/outlet streams is available. In practical applications, such requirements are nearly impossible to meet. Thus, variables such as CH and η, which are deducible from the measured pH of the process, are preferred. In ref 9 are presented a thorough investigation and comparison of control based on the various process variables. An adaptive internal model control (AIMC) strategy based on η was studied in ref 10. The control law was derived in the same way as that for the NIMC in ref 4. The adaptation in the NIMC involved only the concentration of the process stream, while the flow rate of the stream and other disturbances are provided online to the internal model and the controller. In this paper, we show that the pH problem is a special case of a class of nonlinear dynamic systems with nonlinear parametrizations.11 Using a similar approach, a model reference adaptive scheme (MRAS) was developed, where uncertainties in both the influent flow rate and its reagent concentration were estimated using an adaptive algorithm. The control laws were then constructed based on these estimates. We show that both global stability and zero tracking error can be achieved. The effectiveness and robustness of the proposed control strategy were evaluated via simulation studies. For comparison, control using the AIMC was also simulated. Experimental results are given only for the pH control problem because of insufficient instrumentation to implement level control. 2. Process Description Consider the neutralization of a strong acid with a strong base in a CSTR, as shown in Figure 1. We note that there are three input (F1, F2, and F3) and one effluent streams in this model of the process. Of the three inputs, two (F1 and F3) are influent streams and the other (F2) is a base-titrating stream. F1 and F3 are assumed to have the same acidic constituents. F1 is an additional manipulated variable, while F3 acts as the process stream which is to be neutralized and is not

10.1021/ie000193z CCC: $20.00 © 2001 American Chemical Society Published on Web 07/14/2001

3580

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

Figure 2. Schematic of the MRAS strategy.

Because CHCOH ) KW, where KW ) 10-14 is the equilibrium constant for the ionization of water at 25 °C, we obtain the pH equation for a strong acid-strong base system, in terms of ηp, as

Figure 1. Schematic of the CSTR.

controlled. In this process, the control objectives are to regulate both the pH and level in the CSTR. The manipulated influent stream, F1, is required mainly for regulating the level of the mixture while the basetitrating stream is used for the neutralization. Without this additional input stream, the system is not completely controllable. We assume that there is instantaneous mixing in the CSTR and the mixture has a constant density and temperature throughout. Referring to Figure 1, from material balance considerations, we have

Ah˙ ) F1 + F2 + F3 - FT

(1)

FT ) Cvxh where A is the cross-sectional area of the CSTR assumed uniform, h is the level of the mixture in the CSTR, C1, C2, and C3 are the concentrations of F1, F2, and F3, respectively, and Cv is the valve constant of the output valve. F1 and F2 are manipulated variables. F3 and C3 are assumed to be unknown, while C1 and C2 are known. In a practical situation, the assumptions on F3 and C3 are reasonable because the process stream most likely comes from another subprocess upstream, and hence it is very difficult to expect a constant flow rate as well as concentration. Balancing the acidic ions in the process, we have

Ax1h˙ + Ahx˘ 1 ) F1C1 + F3C3 - Cvx1xh

(2)

x1 and x2 are the concentrations of the acid anion and base cation, respectively. Similarly, by balancing the basic ions, we have

Ax2h˙ + Ahx˘ 2 ) F2C2 - Cvx2xh

(3)

ηp ) 10-pH - KW/10-pH

Equations (1), (5), and (7) together form the nonlinear dynamic equations describing the pH process. In most practical applications, the pH process not only involves two species but may include other weak acid/ base components which enter the system as disturbances. This may cause severe changes in the pH model. In particular, the static nonlinearity in (7) will change significantly when a weak acid is present in place of a strong one. Dynamic equations for weak acid-strong base systems are available in ref 12. In this paper, our controller is based on a strong acidstrong base model described by (1), (5), and (7). Any weak acid in the influent stream is treated as a disturbance to this system. As will be evident later, the proposed control strategy based on this model is sufficiently robust to be effectively used for systems consisting of an unmodeled weak acid. Hence, our approach does not require a complete knowledge of the disturbances. 3. Control Strategy Figure 2 shows the structure of our proposed controller. It consists of the process, reference model, and controller blocks, along with an adaptor block or adjustment mechanism for estimating the unknown parameters. The desired behavior of the closed-loop system is specified by the reference model. The parameters of the controller are adjusted based on the error between the output of the closed-loop system and the reference model. Our aim here is to find a controller, such that the closed-loop system has globally bounded solutions and ηp and h track the states ηm and hm of two reference models specified respectively by

Subtracting (3) from (2) and defining

ηp ) x1 - x2 gives

A[ηph˙ + hη˘ p] ) F1C1 + F3C3 - F2C2 - Cvηpxh

(4)

When (1) is substituted into (4), it follows that

η˘ p )

ηp ) CH - COH ) x1 - x2

(8)

h˙ m ) -khhm + rh

(9)

1 h˙ ) (u1 + u2 + θ1 - Cvxh) A η˘ p )

(6)

η˘ m ) -kηηm + rη

where kη and kh > 0 and rη and rh are bounded reference inputs. rη is chosen such that the steady-state value of ηm corresponds to the desired pH value via (7). Rewriting (1) and (5) in the more familiar state-space forms, we have

1 [F C + F3C3 - F2C2 - (F1 + F2 + F3)ηp] (5) Ah 1 1

From electroneutrality, we obtain

(7)

(10)

1 {u C + θ3θ2 - u2C2 - (u1 + u2 + θ1)ηp} Ah 1 1 (11)

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001 3581

where u1 ) F1, u2 ) F2, θ1 ) F3, θ2 ) C3, and θ3 ) θ1. θi, with i ) 1-3, are the unknown parameters which will be adapted. The need to introduce a dummy parameter, θ3, will become clear later. Defining the error system as

eh ) h - hm

(12)

eη ) ηp - ηm

(13)

the error dynamics can be written as

1 e˘ h ) khhm - rh + (u1 + u2 + θ1 - Cvxh) (14) A e˘ η ) kηhm - rη +

1 {u C + θ3θ2 - u2C2 Ah 1 1 (u1 + u2 + θ1)ηp} (15)

Equations (14) and (15) lead naturally to the control laws

u1 ) A(-khh + rh) - θˆ 1 + Cvxh - u2

(16)

1 {[A(-khh + rh) + Cvxh](C1 - ηp) C1 + C2 Ah(-kηηp + rη) + θˆ 3θˆ 2 - θˆ 1(C1 - ηp) - θˆ 1ηp} (17)

u2 )

which further lead to much simplified error equations:

θ1 - θˆ 1 A

(18)

θ3θ2 - θˆ 3θˆ 2 θˆ 1 - θˆ 1 + ηp Ah Ah

(19)

e˘ h ) -kheh + e˘ η ) -kηeη +

The adaptation laws in the unknown parameters θ1, θ2, and θ3 are

eηηp h A

eh -

θˆ˙ 1 ) γ1

(20)

eη θˆ˙ 2 ) γ2 Ah

(21)

eηθˆ 2 Ah

(22)

θˆ˙ 3 ) γ3

At this point, we note that, without the introduction of the dummy variable, θ3, it is difficult to construct adaptive laws for only θ1 and θ2 which will lead to a stable design. As a summary, the proposed overall controller consists of the plant equations in (1), (5), and (7); the reference models (8) and (9); the control laws (16) and (17); and the adaptive laws (20)-(22). We next show that the closed-loop equations have bounded solutions and achieve tracking with limtf∞ eh(t), eη(t) ) 0. Proof of Stability. To prove global stability, a Lyapunov function candidate of the following form is chosen:

1 V ) (eh2 + eη2 + γ1-1θ˜ 12 + γ2-1θ˜ 22|θ3| + γ3-1θ˜ 32) 2 (23)

Figure 3. Schematic of the AIMC strategy.

where θ˜ i ) θˆ i - θi, with i ) 1-3. For boundedness, we require V˙ e 0 ∀ t. From (23),

V˙ ) -kheh2 - kηeη2 +

eη|θ3| {θ˜ 2[1 - sgn(θ3)]} (24) Ah

Because θ3 ) θ1 g 0 is a flow rate, [1 - sgn(θ3)] ) 0. Therefore,

V˙ ) -kheh2 - kηeη2 e 0, because kh and kη > 0 (25) (25) implies that V is a Lyapunov function which leads to global boundedness of eh, eη, and θ˜ i, with i ) 1-3. Also, eh, eη ∈ L2; e˘ h is bounded and therefore by Barbalat’s Lemma, limtf∞ eη(t) ) 0. It follows, therefore, that h f hm and, hence, e˘ η will be bounded and again we have limtf∞ eη(t) ) 0. For comparison, the AIMC control scheme, shown in Figure 3, was also simulated. Details of the controller design are given in ref 10. Narayanan et al. has shown that the AIMC, combining the benefits of some linearization in the ηp space, and adaptation, as in the RNCL, show superior control over various traditional PI or IMC controllers. 4. Simulation Study To test the performance of the controller, simulation studies were carried out using the following nominal values: V ) 0.6 L, A ) 75 cm2, Cv ) 1.767 cm5/2/s, F1 ) F3 ) 100 mL/min, C2 ) 0.12 M, and C1 ) C3 ) 0.06 M. These nominal values are required to establish the initial conditions of h ) 8 cm with the pH value of the mixture set at 7. For closed-loop control, the reference model was chosen as in (8) and (9) with kh ) kη ) 1. The adaptation gains were γ1 ) 0.8, γ2 ) 20, and γ3 ) 40. In the simulation of the AIMC strategy, only the concentration of the influent was adapted, while the flow rate of the influent was assumed to be available online to the controller and the internal model. This controller was tuned for satisfactory performance with a tuning parameter of  ) 20. The performance and robustness properties of the controller were tested through a variety of disturbances and set-point changes. The regulatory performance was tested by changing the flow rate, F3, and concentration, C3, of the process stream. The tracking performance was tested via set-point changes in level and pH. 4.1. Regulatory Performance. To test the regulatory performance of the proposed MRAS, a 50% step change in F3 was introduced just after t ) 0 and removed at t ) 50 s. The pH and level responses in Figure 4 show good disturbance rejection for the MRAS, with a shorter settling time than that of the AIMC. The level response in particular is significantly better, with the level restored in a very short time.

3582

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

Figure 4. pH and level response for 50% disturbance in F3. s: MRAS. - - -: AIMC.

Figure 5. Controller response for 50% disturbance in F3. s: MRAS. - - -: AIMC.

Figure 6. pH and level response for 50% disturbance in C3. s: MRAS. - - -: AIMC.

Figure 7. Controller response for 50% disturbance in C3. s: MRAS. - - -: AIMC.

The control inputs in the form of acid and base flow rates are shown in Figure 5. The results in this figure show that when F3 increased by 50% to 150 mL/min, the steady-state value of u1 ()F1) was reduced to 50 mL/ min while u2 ) F2 was maintained at approximately 100 mL/min. Recall from the initial nominal values that the total acid and base flows are required to be 200 and 100 mL/min, respectively, in order to maintain the steadystate conditions of level at h ) 8 cm and pH ) 7. The level response in the AIMC appears to be worse because the flow rate, u2, in the AIMC is significantly larger initially and that caused the level response to deviate more (from 8 cm) than in the MRAS. After t ) 20 s, both flow rates, u1 and u2, in the MRAS and AIMC are the same, and hence the level response does not return easily to the nominal level in the AIMC. The next disturbance considered is a 50% step change in the concentration, C3, from 0.06 to 0.09 M. The disturbance was removed 100 s after its introduction. Figure 6 shows both the pH and level responses. It is clear that the MRAS responses are much better with significantly shorter settling time and hardly any upsets in the level response. As in the previous case, from Figure 7, both u1 and u2 in the MRAS maintains a total flow rate of about 200 mL/min throughout the simula-

tion, whereas the AIMC responded with more level error initially, and this was difficult to restore even though the total flow rate is also about 200 mL/min. 4.2. Servo Performance. The servo performance was next tested with a series of set-point changes in the pH and level variables. In the former, the pH set point was changed from 7 to 4 and then to 9 before being returned to 7 again. The corresponding changes to the reference models were made by adjusting rη accordingly. The results of the set-point changes in pH are given in Figure 8. The MRAS responded much better for both the pH and level variables. It was somewhat surprising to see that the level response was almost perfect. On closer examination, it was found that the total net flow rate out of the CSTR was indeed close to zero throughout the simulation. The response to set-point changes in the level is considered next. This is shown in Figure 9. The level set point was changed from 8 to 8.5 cm initially and back to 8 cm at t ) 100 s. The level response to the change to 8.5 cm was comparable in both the MRAS and AIMC. The transient response in the pH loop is worse for the AIMC. When the level set point was restored to 8 cm again, the MRAS responded with a much shorter settling time for the level control. However, the tran-

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001 3583

Figure 8. pH and level response for set-point changes in pH. s: MRAS. - - -: AIMC.

Figure 9. pH and level response for set-point changes in level. s: MRAS. - - -: AIMC.

Figure 10. Response of the MRAS (left) and AIMC (right) to 50% flow change.

Figure 11. Response of the MRAS (left) and AIMC (right) to change in acid.

Figure 12. Response of the MRAS (left) and AIMC (right) to set points.

sients in the pH loop were worse than the AIMC in terms of the overshoots but comparable in terms of the settling time. 5. Experimental Study Real-time implementations of the MRAS and AIMC were carried out on a pilot plant to further confirm the stability and robustness of the controller shown by the simulation studies. However, because of a lack of instrumentation to measure level, level control was not implemented. Only pH control was attempted. A sam-

pling time of 1 s was used for all of the experiments. For the MRAS, only F1 and C1 were adapted. The control and adaptations laws were also modified accordingly and are not shown here. The gains corresponding to these two parameters are 10 and 20, respectively. For the AIMC controller,  ) 20 was also used in the experiment because it was found to give satisfactory results. As in the simulations, the first test involves a 50% increase in F3, followed by restoration of the flow rate when the process response has settled down after about

3584

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

680 s. Figure 10 shows the closed-loop performance of the MRAS and AIMC. For the AIMC strategy, the disturbance was removed only after 1100 s, because it took a much longer time to settle, compared to the MRAS. It can be seen that the overshoot is smaller for the MRAS, and the settling time for both the introduction and removal of the disturbance is also much smaller compared to those of the AIMC. The next test is a change in acid from nitric to acetic acid coupled with a 50% increase in the weak acid concentration. As seen from Figure 11, the performance of our controller is much better than that of the AIMC. The settling time for the MRAS is about 1300 s, after the introduction of the disturbance at t ) 0. When the disturbance was removed at t ) 1600 s, the MRAS took about 400 s to return to pH ) 7. On the other hand, the AIMC took approximately 1600 s to settle at pH ) 7. When the disturbance was removed at t ) 1600 s, recovery of the process pH took another 1000 s. To evaluate the servo capabilities, set-point changes from pH ) 7 to 9 and back to 7 were considered. From the response of the MRAS shown in Figure 12, a small settling time of approximately 300 s is seen for the tracking of pH ) 9, while it takes about 1000 s to settle to pH ) 7. This is because the strong acid-strong base system is much more sensitive at pH ) 7 compared to pH ) 9. In comparison, the AIMC strategy shows larger settling times and also fairly significant undershoot and overshoot at both the pH values. 6. Conclusion In this study, a newly developed nonlinear adaptive control scheme was applied to the control of both the pH and level variables in a neutralization process. The performance of the controller, as tested by simulations and experiments, illustrates its robustness, disturbance rejection, and servo capabilities. A comparative study with an adaptive internal model controller also showed

that the MRAS has a much improved performance over the AIMC. Literature Cited (1) Gustaffson, T. K.; Waller, K. V. Dynamic Modeling and Reaction Invariant Control of pH. Chem. Eng. Sci. 1983, 38, 389. (2) Hall, R. C.; Seborg, D. E. Modelling and Self-Tuning Control of a Multivariable pH Neutralization Process, Part I: Modelling and Multiloop Control. Proc. Am. Control Conf., Pittsburgh 1989, 1822. (3) Gustaffson, T. K.; Waller, K. V. Nonlinear and Adaptive control of pH. Ind. Eng. Chem. Res. 1992, 31, 2681. (4) Kulkarni, B. D.; Tambe, S. S.; Shukla, N. V.; Deshpande, P. B. Nonlinear pH Control. Chem. Eng. Sci. 1991, 46, 995. (5) Shukla, N. V.; Deshpande, P. B.; Kumar, V. R.; Kulkarni, B. D. Enhancing the Robustness of Internal-Model-Based Nonlinear pH Controller. Chem. Eng. Sci. 1993, 48, 913. (6) Goodwin, G. C.; McInnis, B.; Long, R. S. Adaptive Control Algorithms for Waste Treatment and pH Neutralization. Opt. Control Appl. Methods 1982, 3, 443. (7) Wright, R. A.; Kravaris, C. Nonlinear Control of pH Processes Using the Strong Acid Equivalent. Ind. Eng. Chem. Res. 1991, 30, 1561. (8) Costello, D. J. Evaluation of Model-Based Control Techniques for a Buffered Acid-Base Reaction System. Trans. Inst. Chem. Eng. 1994, 72, 47. (9) Narayanan, N. R. L.; Krishnaswamy, P. R.; Rangaiah, G. P. Use of Alternate Process Variables for Enhancing pH Control Performance. Chem. Eng. Sci. 1998, 53, 3041. (10) Narayanan, N. R. L.; Krishnaswamy, P. R.; Rangaiah, G. P. An Adaptive Internal Model Control Strategy for pH Neutralization. Chem. Eng. Sci. 1997, 52, 3067. (11) Annaswamy, A. M.; Skantze, F. P.; Loh, A.-P. Adaptive Control of Continuous Time Systems with Convex/Concave Parametrization. Automatica 1998, 34 (No. 1), 33. (12) McAvoy, T. J.; Hsu, E.; Lowenthal, S. Dynamics of pH in Controlled Stirred Tank Reactor. Ind. Eng. Process Des. Dev. 1972, 11 (1), 68.

Received for review February 7, 2000 Revised manuscript received September 7, 2000 Accepted May 8, 2001 IE000193Z