Use of alternate process variables for enhancing pH control performance

Use of alternate process variables for enhancing pH control performance

PII: Chemical Engineering Science, Vol. 53, No. 17, pp. 3041—3049, 1998 ( 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain S00...

195KB Sizes 2 Downloads 65 Views

PII:

Chemical Engineering Science, Vol. 53, No. 17, pp. 3041—3049, 1998 ( 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain S0009–2509(98)00138–9 0009—2509/98/$—See front matter

Use of alternate process variables for enhancing pH control performance N. R. Lakshmi Narayanan, P. R. Krishnaswamy* and G. P. Rangaiah Department of Chemical Engineering, National University of Singapore, Singapore 119260 (Received 13 November 1997) Abstract—In pH control, the process variable that is very often used is pH itself although use of other alternate variables may provide better performance. In this paper, use of three easily implementable process variables (namely, difference in hydrogen and hydroxyl ion concentration g, hydrogen ion concentration C and process pH) are experimentally investigated in the H context of two control strategies, namely, PI control and adaptive nonlinear internal model control. Experimental results show that, in general, use of g provides superior control performance. In the case of adaptive nonlinear internal model control, significantly improved control is obtained with g as the process variable. This improvement is attributed to the reduction in process static nonlinearity on account of g. Besides, g can also be easily calculated from measured pH for any type of neutralization system. Thus, there is a strong case for using g instead of pH as the process variable in pH control. ( 1998 Elsevier Science Ltd. All rights reserved. Keywords: pH Control; process variable; PI control; adaptive internal model control.

Control of pH, particularly in the neutral range of pH equal to 6—8, has been a difficult and challenging problem due to time-varying and nonlinear characteristics of pH processes. Part of the problem is due to the use of measured pH (which is a nonlinear function of concentration of hydrogen ions) as the process variable. Several researchers have recommended alternate process variables for controlling pH. These include difference in hydrogen and hydroxyl ion concentration, g (Goodwin et al., 1982), reaction invariant (Gustafsson and Waller, 1983), strong acid equivalent, ½ (Wright and Kravaris, 1991), hydrogen ion concentration, C (Kulkarni et al., 1991 and Shukla et al., H 1993) and ionic difference (Costello, 1994). Generally speaking, these variables modify or reduce the nonlinearity involved in the pH process. Use of these variables have not been extensively studied and evaluated experimentally. Use of ½, reaction invariants and ionic difference generally require either on-line estimation (e.g. ½ estimated via a nominal titration curve of the process stream) or concentration measurement of different electrolytes in the inlet/outlet streams. In other words, only when concentration and composition are known, process variables like ½, reaction invariants and ionic difference may prove useful. However, in practical industrial applications,

such requirements are difficult to meet. Hence, a process variable that allows implementation of a given control strategy with only a knowledge of the measured pH would prove attractive. Both C and H g could be considered in this context. Wong et al. (1994) have experimentally studied pH control using an adaptive nonlinear internal model structure and C as the process variable. The results H show that use of C coupled with adaptation imH proves the robustness of the control system. Earlier, Goodwin et al. (1982) used g in their adaptive control algorithm for pH control. However, the potential of g has not been fully exploited, and pH is still commonly used as the process variable. Motivation for preferring g as the process variable comes from the fact that g can be easily calculated from pH for all neutralization systems and in addition g is identical to ½ for strong acid—strong base case. The broad objective of the present study, therefore, is to evaluate experimentally the use of g and C in controlling pH. H The performance of control based on g relative to control based on measured pH is first studied using PI control. Recently, an adaptive internal model control (IMC) strategy based on ½ has been found to be very effective through simulation (Lakshmi Narayanan et al., 1997). Use of g as the process variable in this control strategy is tested experimentally and for comparison, control using C is also implemented. H

*Corresponding author. [email protected].

A schematic sketch of the experimental set-up is shown in Fig. 1. It consists of a 1.75 l continuous

INTRODUCTION

EXPERIMENTAL SET-UP

Fax:

(65)7791936;

e-mail:

3041

3042

N. R. Lakshmi Narayanan et al.

Fig. 1. A schematic sketch of the experimental set-up.

stirred tank reactor (CSTR), supply tanks with associated piping, rotameters, motor-operated control valves, pumps, a pH electrode and a meter, signal conditioning modules, an AD/DA card and a personal computer. Two liquid streams, one an influent acid and the other a neutralizing stream, are pumped into the CSTR. An overflow arrangement ensures constant liquid volume in the CSTR and allows the effluent to flow out continuously into the drain. Agitation is provided in the reactor by means of a mechanical stirrer. Three supply tanks, each of 50 l capacity, are used for storing the required acids and the base. Two of the tanks (tanks 1 and 2) contain either a strong acid of different concentrations or a strong acid and a weak or a mixture of acids. The tanks are connected through a three-way valve to a pump. This enables introduction of a load disturbance either in acid concentration or composition. A rotameter and a control valve (range 20—280 ml/min) are installed on each of the acid and base lines for monitoring and control. While the rotameters provide visual monitoring of the respective flow rates, the acid control valve

helps to introduce step disturbances of desired magnitude in acid flow whereas the base control valve serves as the final control element. pH at the outlet of the CSTR is monitored by a pH meter through a combination-glass pH electrode. The pH meter output is sent to the personal computer via the AD/DA card. The data acquisition and control are carried out online by the computer which serves to (i) acquire and display data, (ii) introduce a step disturbance of desired magnitude at a given instant, and (iii) compute the controller output according to any of the control laws employed in this study. The nominal operating conditions chosen were 100 ml/min each for acid and base flow rate and 0.06 M each for acid and base concentration. Under this condition, with the control loop closed, the system was first brought to its set point pH of 7. The control objective (acid—base neutralization) could be achieved through base flow manipulation (via a corrective signal from the control computer). Programs for the control strategies were written in C language. A sampling period of 1 s was employed in all

Process variables for enhancing pH control performance

experiments. To minimize the effect of system noise on the controller performance, a first-order digital filter (Seborg et al., 1989) was introduced in the error calculation: E "aE #(1!a)E (1) f,n n f,n~1 where E is the error after filtering, E is the f,n f,n~1 previous filtered error, E is the current error, and a is n the weighting factor. The weighting factor chosen was 0.5 and this corresponds to a filter time constant of 1 s which is small compared to the process time constant. CONTROL STRATEGIES

Two control strategies were implemented. (i) pH control using a PI controller in the feedback loop. The process variable employed was either pH or g, and the controller realized was in discretized velocity form. (ii) Adaptive nonlinear IMC strategy. The process variables used were C and g. The model of the process H used in developing the nonlinear IMC controller was based on several assumptions such as complete mixing in the tank, strong acid—strong base system, negligible dead time and valve dynamics. These modelling assumptions are not valid for the experimental process. However, the nonlinear controller developed could still be used although the control performance might not be as good as what could be achieved through a more rigorous model. The adaptive nonlinear IMC strategy with g as the process variable is similar to that developed earlier for a monoprotic strong acid and a monohydroxyl strong base (Lakshmi Narayanan et al., 1997) using the concept of strong acid equivalent, ½, and will be presented here briefly. The equations developed earlier for strong acid—strong base neutralization in a CSTR can also be applied in the present context by simply replacing ½ with g since ½"C !C "g. Thus, the H OH process model in terms of g is 1 dg "F C !F C !F g. 1 1 2 2 T » dt

(2)

Using the process model [eq. (2)], the corresponding nonlinear IMC controller can be derived for the adaptive control strategy represented in Fig. 2. A

3043

description of this control structure may be found elsewhere (Lakshmi Narayanan et al., 1997). Derivation of the nonlinear controller involves (i) solving the model equation for the manipulated variable, F , and 2 (ii) expressing the controlled variable, (g!g ) in terms s of E, an error term defined as E"g !(g !g ). 4%5 p m The resulting controller is F (C !g !E)!» dE/dt s F " 1 1 . (3) 2 C #g #E 2 s The first derivative of the error (dE/dt) in this controller equation could be calculated using first order finite difference approximation: dE/dt"(E !E )/¹ (4) f,n f,n~1 where ¹ is the sampling period. The control strategy also involves simplified adaptation of Huberman and Lumer (1990) which, in discretized form, is C

"C #e(g !g)¹. (5) 1m,n`1 1m,n 4%5 In the ensuing experimental studies, the model, controller and adapter (Fig. 2) are given by eqs (2), (3) and (5), respectively, irrespective of whether strong, weak or mixture of acids is employed in the process. In other words, the proposed control strategy will be making use of a simple strong acid—strong base model to control buffered pH neutralization systems as well. This should be appealing to practitioners who routinely face difficult pH nonlinearities in a variety of chemical and biochemical systems. Adaptive IMC strategy with C as the process H variable was studied by Shukla et al. (1993) and Wong et al. (1994). The block diagram of their strategy is the same as in Fig. 2 except that (i) C is used as the H variable of interest instead of g and (ii) pH is used in the adaptation instead of g. The equations used and other details are available in Shukla et al. (1993). Lakshmi Narayanan et al. (1996) compared the use of g versus C as the process variable in the adaptive H control strategy (Fig. 2) for a variety of disturbances through simulation. The results show that appreciable improvement in control is achieved when g is used instead of C . Control based on ½ (Lakshmi H

Fig. 2. Block diagram of the adaptive IMC structure.

3044

N. R. Lakshmi Narayanan et al.

Narayanan et al., 1997) produces even better results. However g-based control can be more easily implemented and, as will be seen, is also quite effective.

PI control Control of pH using a conventional PI controller was tried first with pH as the process variable and then with g. The controller was initially tuned based on open-loop response data, and then fine tuned for better performance. The final controller settings were K "0.3%/% and ¹ "122.4 s. Note that the measc i ured process variable (pH) was converted into percentage (based on 0—14 pH,0—100%). Initially, the process was maintained at steady state pH of 7 with a strong acid (HNO ) stream neutralized using 3 a strong base (NaOH) stream (manipulated variable). Experimental PI responses were obtained in order to compare the relative performances of pH- and gbased control for two disturbances: (A) 40% increase in both acid flow (from 100 to 140 ml min~1) and concentration (from 0.06 to 0.084 N) and (B) changing the feed composition from a strong acid (0.06 M) to a mixture of acids (namely, 0.06 M nitric acid and 0.085 M acetic acid in the ratio of 1 : 1). The latter

disturbance affects the nonlinearity of the process significantly. The closed-loop response with pH as the process variable is shown in Fig. 3 for disturbance A. Both the process variable and manipulated variable moves are included in this and subsequent figures. The response curve reveals a dead time of about 90 s. This is due to the length of the piping between the three-way valve and the actual CSTR. Such dead time can be observed also in other response curves reported later. The process pH reached a low value of 2, stayed in that region for some time before returning to the set point of 7 after 2500 s. The poor control action could be due to the simple PI technique being applied to the nonlinear pH process. The system was also tested for a higher K of 0.4%/%, but the response c was oscillatory. Performance of the control system for disturbance B involving a weak acid is presented in Fig. 4. PI control with g as the process variable was then tested for the two disturbances. Both the measured pH and the set point pH were converted into equivalent g which were then compared to give the error. The controller settings used earlier (for the process variable pH) were used here except that K was multic plied by a factor that relates g to pH near pH"7. The

Fig. 3. Performance of PI controller for a 40% step increase in both acid flow and concentration.

Fig. 4. Performance of PI controller for a step change from strong acid to a mixture of acids.

EXPERIMENTAL RESULTS AND DISCUSSION

Process variables for enhancing pH control performance

factor used was 108,600 which is large due to the strongly nonlinear character of titration curve at pH"7. The control responses based on g for disturbances A and B are included in Figs 3 and 4 respectively. Results in Fig. 3 indicate that control based on pH is very sluggish, and it can be improved significantly by changing the variable to g. For disturbance B also, g-based control is better than that based on pH (Fig. 4). However, the improvement is not very significant, and this may be due to the buffering action of the weak acid present in the disturbance. Adaptive internal model control The adaptive control system architecture (Fig. 2) based on g was studied experimentally using the strong acid—strong base (HNO —NaOH) system in 3 the first instance. The required manipulation was estimated using the proposed control law [eq. (3)]. The model equation [eq. (2)] was solved analytically (McAvoy et al., 1972) assuming piece-wise constant changes in the manipulated variable and parameters to give F C !F C 2,s 2,s g(t)"g(t!¹) e~T@q# 1,s 1,s F (t!¹) T ](1!e~T@q)

(6)

3045

where F (t!¹ )"F #F (t!¹ ) and q"»/F T 1,4 2 T (t!¹ ). Before testing the control strategy for the disturbances, a value for the tuning parameter (e) had to be selected. This was obtained experimentally by giving a 40% step change (from 0.06 to 0.085 M) in nitric acid concentration and varying e in the range !10 to !50. The response for e"!20 was found to be very good, and was therefore used in the adaptation. To check the performance of the adaptive IMC with g as the process variable, the system was subjected to disturbance A. The response (Fig. 5) shows an excellent disturbance rejection capability by returning the system to its set point in about 800 s. The base flow (Fig. 5) has one initial sharp peak following which it reached the final value smoothly. As the disturbance included both flow and concentration changes, the initial decrease in pH due to the flow disturbance and the subsequent drop due to the concentration change (which involved a lag of about 90 s) are evident. The initial sharp drop in pH is due to the inertia of the control valve and some dead time present in the actual system which are further accentuated by the high gain and steep slope of the titration curve at the neutralization point. Use of C (instead of g) in the adaptive IMC stratH egy was tested experimentally for strong acid—strong

Fig. 5. Performance of adaptive IMC for a 40% step increase in both acid flow and concentration.

3046

N. R. Lakshmi Narayanan et al.

base by Wong et al. (1994). As this system was not previously evaluated for concentration and composition changes, a closed-loop response for disturbance A was obtained (Fig. 5). The tuning parameter (e) used was 300. The process pH reached a low value of about 2.7 and recovered to its final steady state after a lapse of over 3000 s. This is four times larger in comparison to control based on g. Besides the controller output became oscillatory when pH went below 4. This may be due to the derivative term in the controller and the logarithmic relation between C and pH. PerforH mance results in Fig. 5 clearly reveal that g-based control is very much superior to that due to C . This H could be explained by examining the variations in the adapter parameter C as recorded in Fig. 6. In the 1m case of C -based procedure the change in C is H 1. sluggish and oscillatory. In contrast, for g-based control, C changes quickly and smoothly reaches its 1m final value in a short time. These differences in the C profile contribute to a vastly improved control of 1m pH when g is employed. Figure 7 shows the closed-loop response of the gbased system for disturbance B. Despite employing an inaccurate model (the model is based on strong acid—strong base), the system performance can be seen to be good and control was achieved in about 1500 s. This signifies that even if the process dynamics are poorly understood, control based on g will be able to achieve good performance. The above experiment was repeated for adaptive IMC with C as the process H variable. Upon switching the feed to a mixture of acids, heavy oscillations (Fig. 7) exhibiting a slow decay were found to set in. Of the control schemes tested, g-based adaptive IMC provides significantly better results. To further confirm the performance of this strategy, a complete switch from strong to a weak acid accompanied by a 40% increase in weak acid concentration was carried out. The transient response (Fig. 8) illustrates the effectiveness of the control system in stabilizing the

process at the set point of 7 within about 2000 s. It may be noted that in this case, the static nonlinearity (titration curve) of the process is changed due to the variation in feed composition. Such changes in process characteristics, though not accounted for by the controller and the process model, are compensated by the adaptive mechanism. As this feed change represents a severe form of disturbance, a reversal of this disturbance (i.e. changing from weak to strong acid accompanied by a step decrease in acid concentration) was effected at 2500 s. The process pH can be seen to recover and reach its set point quickly (Fig. 8). The difference in performance between the introduction and removal of disturbance may be due to the process going to the acidic region during the introduction and to the basic region during the removal. As will be seen later (Fig. 10), g-based process gain is different in the basic and acidic regions and so the difference in control performance. One of the attractive features of the IMC strategy is that it exhibits excellent set point tracking (Williams et al., 1990). As the g-based adaptive strategy contains IMC, the system performance for set point changes

Fig. 6. Variation in C for a 40% step increase in both acid 1m flow and concentration.

Fig. 7. Performance of adaptive IMC for a step change from strong acid to a mixture of acids.

Process variables for enhancing pH control performance

Fig. 8. Performance of adaptive IMC for a step change from strong acid to weak acid with a 40% increase in weak acid concentration and vice versa.

3047

Fig. 9. Performance of adaptive IMC for set point changes from 7 to 5 and 7 to 9.

Fig. 10. Titration curves for a weak acid—strong base system.

N. R. Lakshmi Narayanan et al.

3048

can be expected to be quite effective. Fig. 9 shows the response curves obtained in two separate experiments for set point changes from 7 to 9 and from 7 to 5. The errors caused by the set point changes were instantaneously sensed by the controller and some immediate corrections to the base flow were effected. The process pH responses reveal that the settling time for either set point change is about 150 s with only a mild over/undershoot. The difference in control system performances noted above is due to a given variable affecting the static nonlinearity of the neutralization process. This is exemplified through the titration curves (Fig. 10) based on g, C , ½ and pH for a weak acid (0.015 N H CH COOH) and a strong base (0.1 N NaOH). As is 3 well known, pH-based curve is S-shaped with a region having steep slope (i.e. high process gain). The C curve has varying slope, from a large absolute H value to almost zero. The curve for ½ reveals that process gain in terms of ½ is nearly constant. The g-based curve is comparable to that due to ½ in the basic region (pH'7); however, in the acidic region (pH(7) absolute slope of the curve is much less. Evidently, ½ is the best choice in the sense that it significantly reduces process nonlinearity and contributes to good control. However, ½ requires either measurement of ions or a knowledge of the initial titration curve, both of which are difficult to achieve in practice. Thus, g provides the most effective control of those techniques which could be easily implemented through a measurement of pH. Besides g is identical to ½ for strong acid—strong base systems, but it may differ in certain regions if weak acids/bases or buffers are present. CONCLUSIONS

In the present study, control of pH by PI and adaptive IMC using different process variables (pH, C and g) is studied in a laboratory scale experimental H set-up. The adaptive control strategy incorporates the concepts of nonlinear IMC and an on-line adaptation. The IMC controller, derived from a simple strong acid—strong base process model, is used effectively to control even buffered pH systems. Experimental responses obtained for a variety of disturbances show that g renders enhanced robustness, excellent load rejection and set point tracking capabilities to the adaptive IMC. Use of C instead of g, on the other H hand, produces an inferior adaptive IMC. Even control of pH via the ubiquitous PI controller can be improved by using g instead of pH as the process variable. For certain disturbances, this improvement can be significant. To sum up, the difference in hydrogen and hydroxyl ion concentration, which is easily obtained from measured pH, can be quite effective in enhancing the control system performance. NOTATION

C 1 C 2

inlet acid concentration, N inlet base concentration, N

C H C OH E E f F 1 F 2 F T t ¹ » X 1 X 2 ½

hydrogen ion concentration, N hydroxyl ion concentration, N error input to the controller filtered error acid flow rate, l/min base flow rate, l/min total effluent flow rate, l/min time, s sampling period, s volume of CSTR, l total anion concentration of acid, N total cation concentration of base, N strong acid equivalent, N

Greek letters a filter constant (weighting factor) e tuning parameter g difference in hydrogen and hydroxyl ion concentration q time constant Subscripts m model n current value n#1 future value n!1 previous value p process s initial steady state set set point

REFERENCES

Costello, D. J. (1994) Evaluation of model-based control techniques for a buffered acid-base reaction system. ¹rans. Inst. Chem. Engng 72, 47—54. Goodwin, G. C., McInnis, B. and Long. R. S. (1982) Adaptive control algorithms for waste water treatment and pH neutralization. Optimal Control Appl. Meth. 3, 443—459. Gustafsson, T. K. and Waller, K. V. (1983) Dynamic modeling and reaction invariant control of pH. Chem. Engng Sci. 38, 389—398. Huberman, B.A. and Lumer, E. (1990) Dynamics of adaptive systems. IEEE ¹rans. Circuits Systems 37(4), 547—550. Kulkarni, B. D., Tambe, S. S., Shukla, N. V. and Deshpande, P. B. (1991) Nonlinear pH Control. Chem. Engng Sci. 46, 995—1003. Lakshmi Narayanan, N.R., Krishnaswamy, P. R. and Rangaiah G. P. (1996) Robust nonlinear control of pH. 7th APPCChE Congress. Taipei, pp. 652—657. Lakshmi Narayanan, N. R., Krishnaswamy, P. R. and Rangaiah, G. P. (1997) An adaptive internal model control strategy for pH neutralization, Chem. Engng Sci. 52, 3067—3074. McAvoy, T. J., Hsu, E. and Lowenthal, S. (1972) Dynamics of pH in controlled stirred tank reactor, Ind. Engng Chem. Process Des. Dev. 11(1), 68—70. Seborg, D. E., Edgar, T. F. and Mellichamp, D. A. (1989) Process Dynamics and Control, pp. 539—542. Wiley, New York.

Process variables for enhancing pH control performance

Shukla, N. V., Deshpande, P. B., Kumar, V. R. and Kulkarni, B. D. (1993) Enhancing the robustness of internal-model-based nonlinear pH controller. Chem. Engng Sci. 48, 913—920. Williams, G. L., Rhinehart, R. R. and Riggs, J. B. (1990) In-line process-model-based control of wastewater pH using dual base injection. Ind. Engng Chem. Res. 29, 1254—1258.

3049

Wong, Y. H., Krishnaswamy, P. R., Teo, W. K., Kulkarni, B. D. and Deshpande, P. B. (1994) Experimental ap plication of robust nonlinear control law to pH control. Chem. Engng Sci. 49, 199—207. Wright, R. A. and Kravaris, C. (1991) Nonlinear control of pH processes using the strong acid equivalent. Ind. Engng Chem. Res. 30, 1561—1572.