1861
Znd. Eng. Chem. Res. 1991,30, 1561-1572
Appendix C Proof of the Theorem in Section 4.4 Sufficient condition: If the proposed processing sequence is not admissible, then the products are not ordered. Consider a system with R units and M products. A subset of the products P1, Pz, ..., P, is processed in two units A and B with the following proposed sequences: unit A: PI, Pz, Pi, Pj, ..., P, ..e,
unit B:
PI, P2, ..., Pj, Pi, ..., P,
Variables xkl and ykldenote the start and finish of processing of product 1 in unit k. According to the proposed configuration xBj < xgi. Now consider the zero-wait-proceasing (ZWP) rules unit A: x k 2 0, YAi = XAi + ?1\i
xqi Iyk, yqi = XAj + 7qi unit B:
XBi
= Yk,
XBj
= y&
The above relations lead to the condition x B ~> X B ~ . This is inconsistent, thereby showing sufficiency. Necessary condition: If the products are ordered, then the proposed processing sequence is admissible. The proposed sequence in unit A is PI, P2, ..., Pi, ..., Ps The starting times of activities are XAl, X A ~ ,...,xk, ...,xm, and the finishing times are YA1 = X A l + ?A1, yA2 = x A 2 + T u , ...,yy = X k + ?A, ..., ym = XM + According to ZWP rules xB1 YA1, xB2 = YAZ, XBi = YAi, . * * I XBa = YAS Since yA1 < y u C ... C yU-1 C ... C ym, xB1 C XBZ C ... C xBi C xB and the same sequence P1, Pp, ..., Pi, ..., PS is followed in unit B. The proof may be generalized for all R units in the system. Therefore in ZWP cases with the products fol--)
lowing the same flow pattern, the processing sequence must be the same in all units. This completes the proof. Literature Cited Baker, K. R. Introduction to Seuuencing- and Scheduling: - . Wilev: New York, NY, 1974. Birewar, D. B.; Groesmann, I. E. Incorporating Scheduling in the Optimal Desiun of Multiproduct Batch Plants. Comput. Chem. E&!.1989,1$(1/2), 1411161. Cohen. G.. D. Duboii. Quadrat. J. P.: Viot. M. Linear Svstem Theow for Discrete-Event Syeteme. 23rd Conference on becision a n i Control, Las Vegas NV; 19&1; pp 539-544. Conway, R. W.; Maxwell, W. L.; Miller, L. W. Theory of Scheduling; Addison-Wesley: Reading MA, 1967. Dutta, S. K.; Cunningham, A. A. Sequencing Two-Machine Flowshops with Finite Intermediate Storage. Manage. Sci. 1975, 21 (9),989-996. French, S. Sequencing and Scheduling: an Zntroduction to the Mathematics of the Job-Shop; Ellis Horwood Ltd: Chichester, GB, 1982. Gupta, J. N. D. Optimal Flowshop Schedules with No Intermediate Storage Space. Naval Res. Logistics Q. 1976,23, 235-243. Karimi, I. A.; Reklaitis, G. V. Intermediate Storage in Noncontinuous Processing. In Second International Conference on FOCAPD, Snowmass, CO; 1984;pp 425-472. Ku, H.M.; Rajagopalan, D.; Karimi, I. Scheduling in Batch Processes. Chem. Eng. h o g . 1987, Aug, 35-45. Modi, A. K.; Karimi, I. A. Design of Multiproduct Batch Processes with Finite Intermediate Storage. Comput. Chem. Eng. 1989,13 (1/2),127-139. Panwalker, S. S.; Iskander, W. A Survey of Scheduling Rules. Oper. Res. 1977, 25 (l),45-61. Reklaitis, G.V. Review of Scheduling of Process Operations. AIChE Symp. Ser. 1982, 78, 119-133. Rippin, D. W.T. Design and Operation of Multiproduct and Multipurpose Batch Chemical Plants. Comput. Chem. Eng. 1983,7, 463-481. Yamalidou, E. C.; Patsidou, E. P.; Kantor, J. C. Modeling DiscreteEvent Dynamical Systems for Chemical Process Control-A Survey of Several New Techniques. Comput. Chem. Eng. 1990, 3, 281-299.
Received for review February 1, 1991 Accepted February 19,1991
Nonlinear Control of pH Processes Using the Strong Acid Equivalent Raymond
A. Wright? and Costas Kravaris*
Department of Chemical Engineering, The Uniuersity of Michigan, Ann Arbor, Michigan 48109
pH control problems are characterized by their severe nonlinearity as reflected in the titration curve of the process stream. Given the general structure of the nonlinear dynamic model, consisting of material balances and chemical equilibria equations, a new approach has been developed for the design of nonlinear controllers for pH processes. It consists of defining an alternative equivalent control objective which is linear in the states and using a linear control law in terms of this new control objective. The new control objective is interpreted physically as the strong acid equivalent of the system. A minimal order realization of the full-order model has been rigorously derived, in which the titration curve of the inlet stream appears explicitly. The strong acid equivalent is the state in the reduced model and can be calculated on line from pH measurements given a nominal titration curve of the process stream. Computer simulations evaluate the performance of this control methodology in the presence of disturbances and model uncertainty. 1. Introduction
other hand, the control of pH is industrially important in several ways. Neutralization may be an integral part of The control of pH is recognized as a difficult problem the process, as in the manufacture of soaps or fatty acids in the literature due to ita highly nonlinear nature. On the (Austin, 1984). Heavy metals must be recovered from waste streams to avoid polluting the environment; one * To whom correspondence should be addressed. method frequently employed to recover heavy metals 'Present address: The Dow Chemical Co., 1400 Building, Midland, MI 48667. (Narvarte and Koch, 1985),is to control pH to minimize 0888-5885/91/2630-1561$02.50/00 1991 American Chemical Society
1562 Ind. Eng. Chem. Res., Vol. 30, No. 7, 1991
the solubility of the metals. In biological systems, the control of pH can be important to support cell growth (Bailey and Ollis, 1986). The most common pH process is the neutralization of an acidic or basic waste stream, which may be necessary for any of the following reasons (Metry, 1980): (1)to prevent corrosion and/or damage to other construction materials; (2) to protect aquatic life and human welfare; (3) as a preliminary treatment, allowing effective operation of biological treatment processes; (4) to provide neutral pH water for recycle, either as process water or as boiler feed. Many papers on pH processes have appeared in the literature, and entire books (Shinskey (1973), Moore (1978)) have been written on the subject. A straightforward method for modeling a single acid/single base pH process is developed in McAvoy et al. (1972) and McAvoy (1972). This method is rigorously derived from first principles, material balances, and chemical equilibria, and is generally accepted in the literature. This method is generalized by Gustafsson and Waller (1983) in a matrix formulation to general pH processes. Methods of controlling pH are usually based on some algorithm that is designed to account for the time varying characteristics and/or the severe nonlinearity inherent in pH processes. One way to view this nonlinearity is to consider it a linear system with time-varying gain. This view naturally leads to linear adaptive control methods. Mellichamp et al. (1966) used information from a small identification tank that received part of the actual effluent stream to solve the problem of time-varying gain. Gupta and Coughanowr (1978) adapted the parameters of a firsborder linear model to keep a constant closed-loop gain. Self-tuning regulators estimating parameters in a linear process model have been used for linear adaptive pH control. Buchholt and Kummel (1979) used optimal quadratic P I feedback control, and Bergmann and Lachmann (1980) used a self-tuning extended minimum variance controller. Methods of nonlinear pH control, both adaptive and nonadaptive, have also appeared in the literature. The motives, compared to the linear methods, are better compensation of the static nonlinearity, better robustness, and tighter control. Shinskey (1974) introduced a nonlinear controller with piecewise linear gain to compensate for the nonlinearity of the process and adapted the gain on line on the basis of the frequency of the measured pH variations. Goodwin et al. (1982) developed both a linear and a nonlinear adaptive controller for strong acid/strong base systems based on the difference between hydrogen and hydroxyl ion concentration. The nonlinear controller was shown to be superior. Pajunen (1983) used a Weiner model, which consists of a linear dynamic part followed by a static nonlinearity in the form of a piecewise-polynomial approximation, and gave two methods of system identification. Jutila (19811, Jutila and Orava (1981), and Jutila et al. (1981) developed their model along the lines of McAvoy (1972),but for hypothetical species. They then used a Kalman filter state estimator to estimate the concentrations and adapt to titration curves, and used this method for an industrial application. Gustafsson and Waller (1983) determined all sums of concentrations that are invariant under the chemical reactions. They then expressed the charge-related reaction invariant in terms of the other reaction invariants and fed this back to a controller. They estimated the reaction invariants on line through a least-squares method and used this nonlinearity to linearize the system. Gustafsson (1985) presented an experimental application of this method. Hall and Seborg (1989) and Girardot (1989) used the reaction invariant
approach with different estimation strategies and gave experimental results. In the only nonlinear and nonadaptive work, Parrish and Brosilow (1988) studied the titration of a single weak monoprotic acid by a single strong monohydroxy1 base and applied their nonlinear inferential control methodology. Their method consisted of obtaining an on-line estimate of the disturbance and feeding it to a feedforward controller. Under the assumption of a perfect model, the response was linear in pH. In this paper, the point of view is that the nonlinearities related to pH control must first be understood, and a solid and general nonadaptive control methodology to deal with them must be developed. Once this is done, the role of adaptation will be important in applications with significant time-varying characteristics; adaptive versions of well-synthesized nonlinear control laws can then be developed. Thus, this paper will be entirely in a nonlinear and nonadaptive framework. This paper is organized as follows: First, a review of the modeling method originally appearing in McAvoy et al. (1972) and generalized by Gustafsson and Waller (1983) will be given. The static part of the model will be used to illustrate the common “chemist’s type” titration. It will be shown that this leads naturally to the concept of strong acid equivalent of a mixture of electrolytes, which represents the “effective acidity” of the solution and directly determines the amount of reagent required to titrate a mixture to a desirable final pH. It will be seen that the strong acid equivalent is a much more direct measure of the state of the solution in the CSTR than is the effluent pH. The regulator problem will then be formulated using the strong acid equivalent as a dynamically equivalent output for the pH process. This formulation makes the control problem linear and nonadaptive. It will then be shown that the full-order model is neither observable nor controllable in a systems theory sense. A minimal order realization that has exactly the same input/output behavior as the full-order model will then rigorously be derived. The titration curve of the inlet stream appears explicitly in the reduced model. The strong acid equivalent appears as a state in the reduced model and can be calculated on line from feedback pH measurements using only a nominal titration curve of the inlet stream. A linear PI controller in terms of the strong acid equivalent is then used to close the loop. Computer simulations in example systems are used to evaluate the performance and robustness of the proposed control methodology. 2. Modeling the p H Process and Formulation of the p H Control Problem
In this section a general mathematical model for pH processes will be reviewed. The method used goes back to McAvoy et al. (1972), who modeled a specific single acid/single base system. Their method is rigorously derived from first principles, material balances,and chemical equilibria, and has become generally accepted in the literature. This method was generalized to systems with an arbitrary number of acids and bases in Gustafsson and Waller (1983). Although this section is only a review, a good understanding of the basic chemistry involved in pH processes is essential to follow the results of the next sections. 2.1. Process Chemistry (Statics). The pH process is characterized by the presence of acid/base reactions. These reactions frequently occur very quickly, and the overall system may usually be considered in equilibrium. The chemical equilibria and definitions of equilibrium constants for a p-protic acid (in practice, p will usually
Ind. Eng. Chem. Res., Vol. 30, No. 7, 1991 1663
C {[Hp,lA-] + 2[Hp,2A2-] + ... + pi [Apl-]) + [OH-] = C { [B(OH),,-,*l + 2[B(OH),,,2+] + ... +
U
i-acid
imbue
mi[B"i+]} + [H+] (6)
The electroneutrality constraint (6),the definition of total ion concentrations, (4) and (5), and the chemical equilibria, (1)-(3), may be combined to yield a single algebraic equation relating the hydrogen ion concentration to the total ion concentrations of each acid and base. This equation, which will be called the pH equation in this paper, can always be written as
pi
+ [H*] - Kw/[H+] = 0
?ai([H+])xi
i-1
(7)
where the ai([H+]) are given by Figure 1. Chemist's titration process.
ai([H+I) =
have the value of 1, 2, or 3) are
-
pi
W+l
+ (pi - 1)-
Kapi
[H+]Prl
+ ... + K&,Kdi...Kwi
[H+l + ... + [H+]Prl l+KaPi Ka2,Ka3i.**Kapi HP-lA- + HP2A2-
+ H+
[H + p
(8)
+ KallKa2i.-.Kapi
if i is an acid, or
Kn2 = [H+l[H,2A2-1 / [Hp-,A-l HA*')- e AP- + H+ Kap = [H+][Ap-]/[HA*l)-]
(1)
Similarly, the chemical equilibria and definitions of equilibrium constants for an m-hydroxyl base (where in practice m will usually have the value of 1, 2, or 3) are B(OH), + B(OH),-1+ + OHKbl = [B(OH)m-l+I[OH-]/ [B(OH)mI
B(OH),-1+ * B(OH),-$+ + OHKb2' [B(OH),-,2+] [OH-] / [B(OH)m-l+I BOH(m-l)+ Bm+ + OHKbm = [B"+] [OH-]/[BOH("'-l)+]
(2)
In addition to the above equilibria, the equilibrium of water must also be included:
HzO + H+ + OH-
Kw = [H+][OH-]
(3)
The notion of the total ion concentration of each acid and base will be useful in developing a general mathematical model for pH processes. The total ion concentration of the ith species is defined, if i is an acid, as the sum of all concentrations of species containing the anion of the acid, or if i is a base, as the sum of all concentrations containing the cation of the base. This may be expressed by xi
= [ H A ] + [H,,A-] + ... + [AP-] if i is an acid
xi = [B(OH),]
+ [B(OH),-,+] + ... + [Bm+] if i is a base
(4)
(5)
In addition to the chemical equilibria for each acid and base, the solution must remain electrically neutral at all times. This constraint for an arbitrary number of acids and an arbitrary number of bases results in
if i is a base, with the understanding that 1/K = 0 or l/Kbji = 0 if the jth dissociation for an acid orfase, respectively, is strong. Note that ai([H+]) = -pi if all dissociations of the acid are strong and ai([H+]) = ni if all dissociations of the base are strong. The pH equation may be more succinctly written as n
C~i(pH)xi+ A(pH) = 0
i=l
(10)
where pH = -log [H+], the ai(pH) are given by (8) or (9) by replacing [H+] by 10-pH,and A b ) = 10-PH- KWIOpH. Remark 1: The total ion concentrations, x i , are called reaction invariants in the work of Gustaffson and Waller (1983). Additionally they define a charge-related reaction invariant in terms of the total ion concentrations. This invariant is given by
xl = A(pH) + cai(pH)xi i-2
(11)
where x1 is the overall total ion concentration corresponding to the strong acids and bases present. Since x1 corresponds only to strong species, it does not appear in any equilibrium reaction and is clearly invariant under the reactions taking place. Remark 2: The dissociation constants of the acids, bases, and water do vary somewhat as a function of temperature. For applications with high-temperature process streams or with large temperature fluctuations, the temperature dependence should be taken into account. However, for the purposes of this paper, they will be viewed as constants.
1564 Ind. Eng. Chem. Res., Vol. 30, No. 7, 1991
The pH equation (10) can be used for calculations of titrations done in a chemical lab. Consider an Ehrlenmeyer flask with initial liquid volume, V,, containing a mixture of acids and/or bases of total ion concentrations xli, i = 1, 2, ..., n. This is to be titrated from a buret with a solution, possibly consisting of more than one acid or base, of total ion concentrations x2,, i = 1, 2, ..., n (see Figure 1). If the volume of the solution added from the buret is V,, the total ion concentrations after mixing will be VlXl# + v2x2, (12)
v 1 + v2
The value of the pH after mixing can be calculated from the pH equation
Hence -v2= v1
A(PH) + b i ( p H ) x i , i=l
(14)
A(pH) + ?ai(pH)x,, i=1
For a given V,, plotting pH versus V2 will result in a standard titration curve. Therefore the function n
A(pH) + Cai(pH)x,, T(pH) = -
i= 1
(15)
A(pH) + ?ai(~H)x,~ i=l
represents the titration curve rotated by 90'. This standard plot is obtained with fixed xli and x2,. However, by using the pH equation, a titration curve may be obtained for any fixed values of the total ion concentrations. Therefore, the pH equation may be considered to contain all possible titration curve plots for the system of acids and bases considered in deriving it. 2.2. Process Dynamics. The dynamic system under consideration (see Figure 2) consists of a CSTR with a process stream flowing into it. The process stream is to be neutralized by manipulating the flow rate of a titrating stream. The total ion concentrations are the quantities that are preserved. This is in agreement with their interpretation as reaction invariants in Gustafsson and Waller (1983). Assuming constant volume and perfect mixing, the material balances around the system are of the form V dxi/dt = F(c~ - xi) + (ai - X ~ ) U i = 1, ..., n (16) where xi = total ion concentration of the ith acidic or basic species in the effluent stream (state variables), F = flow rate of process stream, V = volume of CSTR, ai = total ion concentration of ith species in the titrating stream, ci = total ion concentration of ith species in process stream, and u = flow rate of titrating stream (manipulated variable). Equations 16 form the state model for the system. The state/output map is the pH equation, which was derived in the previous section: n
Cai(pH)xi + A(pH) = 0
ill
(10)
Since an arbitrary number of acids and bases were considered, eqs 16 and 10 constitute a general mathematical model for any pH process.
Figure 2. Dynamic pH process.
Remark 3: It should be noted a t this point that the control method proposed in the next sections of this paper is not restricted to the above relatively simple standard dynamic model. Mixing imperfections can be accounted for by using mixing models from the reactor engineering literature. Valve dynamics are usually neglected as being much faster than the process dynamics, although they could be modeled as second-order dynamics and incorporated. pH probes can be adequately modeled as fmtsrder plus a delay (Hougen (1964)),although more complicated models exist in the literature (Johansson and Norberg (1968), Hershkovitch et al. (1978)). The time constant and delay can be accurately determined from off-line experimenta. 2.3. Formulation of the pH Control Problem. The general regulator problem for pH processes can now be formulated as follows. Design a control law to keep the output of the system (16) and (10): pH = pH,, = constant
(P1)
in the presence of disturbances. By examining eqs 16 and 10, it should be noticed that the state equations are bilinear and, therefore, only mildly nonlinear, whereas the output map is highly nonlinear. The static nonlinearity of the output map makes the control problem severly nonlinear and therefore difficult to solve by using standard linear controllers. Two major classes of disturbances affect pH control systems. The first are variations in the process flow rate, which in industrial practice are frequently attacked by feed-forward control. The second and more difficult class are changes in feed composition. These can result in shifts of the titration curve and changes in its shape. 3. The Strong Acid Equivalent and Reformulation of the pH Control Problem Although pH is a good measure of how many actiue hydrogen ions are present in solution, the error in pH is not a good measure of how far the system is from the set point. Going from pH 3 to pH 7 will require a different amount of base when a weak acid is present than when only a strong acid is present. For a system with a weak acid, there will be undissociated acid present that will dissociate, thereby providing more hydrogen ions, during the transition from pH 3 to pH 7. It is due to this buffering action that a larger amount of base will be required. Therefore, the difference between the pH and the pH set point is not representative of the amount of titrating agent
Ind. Eng. Chem. Res., Vol. 30, No. 7, 1991 1565 required to bring the system to the set point. Consequently, it is questionable whether pH is a meaningful control objective. This difficulty was also recognized by Gustafsson and Waller (1983), who suggested controlling the chargerelated reaction invariant x1 (asgiven by (ll)),evaluated at a set of nominal conditions, xio,that are adapted on line. The error in x1
- %IO
n
= [A(PH) + Cai(~H)xiol- ~ i-2
1 0
(17)
is the left-hand side of the pH equation evaluated at the nominal conditions and therefore relates to the nonlinearity of the titration curve. In this section, a different formulation of the control problem for pH processes will be developed. First, the concept of the strong acid equivalent of a mixture of eledrolytes will be introduced based on the process statics. The regulator problem will then be reformulated into an equiualent linear control problem in terms of the strong acid equivalent. It will be shown that controlling the strong acid equivalent to ita set point (which can be expressed independently of nominal acid-base ion concentrations) will result in controlling the pH to ita set point. Finally, methods for measuring or calculating the strong acid equivalent on line in special cases will be discussed. 3.1. Definition of the Strong Acid Equivalent. Since the severe nonlinearity inherent in pH processes as reflected in the pH equation (10) is a static nonlinearity, understanding how to compensate for it naturally starts with the process statics. In the lab titration described in section 2.1, if it is desired to bring the initial pH to a set point pH value, pH,,, the required volume can easily be found from (14): A(pHip) + tai(PH,p)xli ill
v, = -v,
(18)
A(pHsp) + 2ai(PHep)xz ill
Note that the numerator of the right-hand side depends on the characteristics of the initial solution whereas the denominator depends on the characteristics of the titrating solution. As stated earlier, ai(pH) is -1 for a monoprotic strong acid and +1 for a monohydroxy1 strong base. Thus, when only these species are involved, the concentrations are directly combined, with the appropriate sign. Whenever weaker species or species with more than one dissociation are involved, ita concentration will have to be multiplied by the weighting factor, ~i(pH,~). Therefore, ai(pH,,,) can be viewed as the conversion factor relating the strength of a chemical species to a monoprotic strong acid at the desirable final pH, pH,. It is clearly the weighted sum of concentrations, which determines the necessary volume to be added. This weighted sum n
will be called the strong acid equivalent of a mixture of electrolytes. 3.2. Reformulation of the pII Control Problem. Since the strong acid equivalent directly relates to the amount of reagent that must be added in order to bring the system to the desirable level of acidity, it is therefore a more meaningful control objective than pH. It is also important to note from (10) that the pH will go to ita set point value, pH,, if and only if the states belong to the plane
kai(pH,p)xi
ill
+ A(pH,p) = 0
(19)
in state space. Consequently, if the strong acid equivalent is defined as an auxiliary output
then pH = p K p if and only if Y = A ( p W . This property may be intuitively understood as follows: At the set point value of pH, the states are forced to have a certain relationship toward one another as defined by the pH equation (10). At the set point value of the strong acid equivalent, the states are forced to have exactly the same relationship toward one another without any state being set at a specific value. This is extremely important in pH processes since there are an infinity of combinations of the state variables with the same relationship that will result in pH being equal to ita set point. Since the dynamics are the same in terms of pH and Y (the state equations remain unchanged), the strong acid equivalent is a dynamically equivalent output (see Wright (1990)) for the pH process and the following equiualent regulator problem can be defined. For the system governed by (16) and (20) design a control law to keep
Y
-
A(pH,,) =
lO-(pH.p,
- 10(P%-14) = constant
(P2)
in the presence of disturbances. One advantage immediately becomes clear in this formulation; the strong acid equivalent is linear with respect to the states. Since the state equations (16) are only d d l y nonlinear and the strong acid equivalent is linear, (P2) does not suffer from the severe nonlinearity encountered in (Pl). Since (P2) and (Pl) are equivalent, a control law for (P2) can be used for (Pl) provided that Y can be measured or computed on-line. Thus, the regulator problem (Pl) reduces to the following subproblems. measure or compute Y on line solve (P2) In summary, controlling the system in terms of the strong acid equivalent means control in terms of “effectiue’ concentrations, instead of pH. It also bypasses the logarithmic scale of pH and the fact that pH is a measure of only the active hydrogen ions present. Formulating the problem in this manner is at the same time physically meaningful and rigorous and also alleviates mathematical difficulties of the problem. 3.3. Measuring the Strong Acid Equivalent OnLine. It is possible to include additional hardware, such as an automatic titrator or ion-selective electrodes, into the control loop to obtain a direct or indirect measurement of Y. The automatic titrator (Nichols (1988)),set to titrate to an endpoint equal to the pH set point, would provide an on-line measurement of Y. From (18) it can easily be seen that Y = A(pH,p) - Pvz (21) where V , is the amount of titrating reagent used and is a constant depending on the equilibrium constants of the titrating reagent, the volume of the reaction chamber, and pH, If the time constant of the procese is slow compared to t i e sampling time of the titrator, it may be used alone. Otherwise, on-line estimates of Y (from some other source) will have to be used together with the titrator measurementa in a parallel cascade configuration. Ion-selective electrodes are available for a number of common ions. The ion concentration together with the pH
.
1666 Ind. Eng. Chem. Res., Vol. 30, No. 7, 1991
measurement and the equilibrium constants for a chemical species will provide a total ion concentration. If all ions can be measured, Y can easily be calculated from the defining equation (20). In moet applications, the economic incentive will not be strong enough to justify the additional hardware required. The strong acid equivalent must then be estimated on-line. It will be shown in the next section that Y can readily be calculated on-line from a pH measurement and titration curve information for the inlet stream. 3.4. Calculating the Strong Acid Equivalent OnLine in Special Cases. The strong acid equivalent can easily be computed on-line in certain simple and wellcharacterized pH processes. For example, in the special case of only strong acids and bases in the system, the strong acid equivalent may be directly calculated on-line from y = A(pH) = 10(-pW - lo(PH-14) (22) For the case where the process steam contains only one acid or base with known equilibrium constants, the state variables may easily be estimated on-line by using a reduced-order open-loop observer. In particular, if xn is the total ion concentration for the acid or base in the process stream V dx^,/dt = FXi + (ai- Xi)u i= 1, 2, ..., n - 1 (23)
the output map. They are treated as disturbances in the formulation of Parrish and Brosilow, and as adjustable parameters in the adaptive control algorithm of Gustafwn (1985). For a system where the chemical nature of the inlet stream is unknown, Gustafeaon lets these n - 1parameters correspond to the total ion concentrations of hypothetical chemical species that he postulated in order to control the system. An entirely different model reduction approach will be followed in this paper. The resulting reduced model will provide, for the first time, a rigorous mathematical description of the dynamic pH process in terms of titration curves. 4.1. A Minimal Order Realization. Since all state equations in (16) are uncoupled and have identical time constants, it is easy to see that the system is unobservable. In particular the observability matrix will always have rank equal to one. Consequently, the system described by (16) and (10) is not a minimal realization of the input-output behavior. Furthermore, it is not difficult to see that the system is uncontrollable. Under the assumption that the model parameters F,V, ai, and ci are not changing with time, the quantity (ci - xi(t))/(ci- ai)must obey the differential equation V d[(ci - xi)/(ci
- ai)]/dt
= u - (F + u)(c~- xi)/(ci - ai) (26)
for each i. This implies that if the system is initially at steady state, Then an on-line estimate of Y is obtained from
It is important to note that this method relies heavily on the assumption that there are no disturbances affecting the first n - 1material balances. It is under this condition that the first n - 1 states can be reconstructed via an open-loop observer. 4. Modeling the pH Process in Terms of Titration Curves The general model for pH systems presented in section 2 is uncontrollable and unobservable in a systems theory sense. If the states are not measurable, there is no reason to keep the model as is. It is much more meaningful from a control point of view to do model reduction and derive a minimal order realization that provides the same input loutput behauior and simplifies controller synthesis. The reduced model will be obtained through a rigorous mathematical derivation. The resulting model can be put in terms of the titration curve of the inlet stream, and thus the nonlinearity of the process appears as a single entity. From the minimal order realization, it becomes evident how to obtain an on-line estimate of the strong acid equivalent. This is highly advantageous for systems that are not simple or well characterized since all that is required is a nominal titration curve for the inlet stream and not specific knowledge of the chemical species involved. Previous attempts to obtain a reduced order model for pH proceeses can be found in Gustafeaon and Waller (1983) and Parrish and Brosilow (1988). In both papers, all material balances except one are discarded. The states of the discarded balances are then viewed as directly affecting
Thus, the manipulated input cannot move the states everywhere in the state space, but only along the above line in R". Therefore, in a system theoretic sense, the system is not controllable. The uncontrollability makes sense physically. The changes in the flow rate of the titrating stream cannot modify all total ion concentrations to arbitrary values. Furthermore, defining X(t) =
ci - X i ( t ) ci - ai
(26) can be written as V dX/dt = u
- (F + u)X
(29)
whereas the pH equation (10) becomes A(PH) + ?ai(pH)ci ill
=X
n
(30)
Xai(pH)(ci - ai)
ill
or, using the inverse of the titration curve of the process stream (see eq 15) A(PH) + ?ai(PH)ci T(pH) = -
ill
(31)
A(pH) + tai(pH)ai i-1
(30)can be equivalently expressed as
Equations 29 and 32 form a first-order model for the process that has exactly the same input-output behavior as the full-order model of eqs 16 and 10.
-
The state of the minimal order realization, X,and the strong acid equivalent, Y, are linearly related: X=
Y
.Y
U
PRCCESS
PI CONTROLLER
T(PH,p) 1 + T(pH,,)
Y - A(pHsp) [A(pHnJ
(33)
+ r$ai(~Hnp)ail(l + T(pHnp)) =l
It is convenient to rewrite the minimal realization with the strong acid equivalent as the state, in deviation variable form. In particular, defining Y’= Y - Yap = Y - A(pHnp) (34) U’ =
u -u , = ~ u - FT(pH,,)
1 Figure 3. Linear control stmcbure using direct measurement of the strong acid equivalent, Y. PI CONTROLLER
PROCESS
(35)
the model can be rewritten as V dY‘/dt =
ESTIMATOR n
4 1 + T(pH0p))FY’- [Y’+ A(pHnp) + Cai(pH,p)ailu’ i=l
Figure 4. Nonlinear control structure using measurement of pH and on line estimation of the strong acid equivalent.
Thus, the error in the strong acid equivalent is the state of the model, and the role of Y’ as an equivalent output that provides nearly linear dynamics becomes transparent. Also, the on-line estimation of Y is trivial from the pH measurement and the output equation of the model (36). Estimation of Y in this manner is based on a rigorously derived model, yet the method is still simple and easily applicable. If the titration curve of the process stream does not drift too much with time, accurate estimates of Y will be obtained, leading to effective control of the pH process. For most industrial applications, the titrating stream is much more concentrated than the process stream, and therefore the process flow rate is much larger than the titrating stream flow rate, Le., u