PROCESS DESIGN AND CONTROL Modeling of pH for Control

Feb 1, 1995 - be used as a linearizing filter transforming measured .... filter in pH-control systems. .... mated, e.g., by the recursive least-square...
0 downloads 0 Views 885KB Size
Znd. Eng. Chem. Res. 1995,34, 820-827

820

PROCESS DESIGN AND CONTROL Modeling of pH for Control Tore K. Gustafsson," Bengt 0. Skrifvars, Katarina V. Sandstram, and Kurt V. Waller Department of Chemical Engineering, Abo Akademi, FIN-20500Abo, Finland Advanced control of pH is largely a chemical modeling problem, because the modeling of the process can have a profound effect on the attainable control quality. The literature on pH control shows much confusion and misunderstanding concerning process modeling, resulting in misleading recommendations and inefficient control solutions. The present paper discusses pH modeling for control mainly from a chemical point of view, including such rarely treated situations as precipitation and formation of complexes in the system. Approximate models based on the chemistry of the system show a favorable structure, which allows adaptation to real unknown systems with a minimum of parameters.

Introduction The control of pH is not merely a control problem but also a chemical equilibrium problem and sometimes also a kinetic problem. The more difficult the control problem is, the more important is the appropriate modeling of the process. Especially advanced control of pH is largely dependent on the quality of the process model. Much has been written about pH control is past years. Nonlinear process control is a popular research topic, and pH control is a simple but demanding application. However, there is much confusion and many errors in the literature on pH and pH control. Rigorous modeling of pH from first principles has recently been treated by Gustafsson and Waller (1992) from a control engineering point of view. The present paper can be considered complementary to that paper and examines pH modeling for control from a chemical point of view. More complex situations than normally treated in papers on pH control are included, such as precipitation and formation of metal complexes. The most often treated objective in the literature on pH control is to keep the pH as close as possible to a certain pH. The underlying assumption here is that the more pH differs from the set value the more damage is done. This objective may be relevant, e.g., in systems involving microorganisms which may be roughly linearly sensitive to pH and not to the amount of acid or base present. Another example is a chemical reaction that occurs at its maximum speed at a certain pH. The second main objective of pH control is related t o the buffering capacity: although the pH may be quite far from a desired value, the amount of acid or base needed to bring the pH to this desired value may be very small. A physical situation where this may be relevant is wastewater treatment, where the treated wastewater should do as little damage as possible t o the river (or lake, etc.) to which it is let out, e.g., by changing the pH of the river as little as possible. A wellbuffered batch of wastewater having a pH close to a desired value may cause much more damage than a

* To whom

correspondence should be addressed. E-mail:

[email protected]. 0888-588519512634-0820$09.0010

6.000

0.005

0.010 mole base Figure 1. Titration curves for 0.01 mol of a number of monoprotic acids in water titrated with a strong base. The dissociation constants of the acids are given by pk, = 0, 3, 5, 7, and 9.

batch of unbuffered wastewater having a pH quite different from the desired one. This objective may be described as one of keeping low the amount of acid or base needed to reach the desired p H . When making a chemical titration, the objective is usually to determine the amount of acid (or base) in a solution. Adding a base to an acid (or vice versa) means that the acid (base) is neutralized. When the amounts of acid and base are equal, it is said that the equivalence point is reached. Generally the pH of the equivalence point is different from seven, as illustrated in Figure 1,which shows the titration curves of 0.01 mol of a number of monoprotic acids titrated with a strong base. The strongest acid (pk,= 0 ) in the figure is somewhat weaker than HC1, the acid with pk, = 5 is roughly similar to acetic acid whereas the acid with phi = 9 is very weak. If the acid and the base are both strong, the pH is 7 in the equivalence point. But if the acid is weak and the base is strong, the pH of the equivalence point is higher than 7. If the acid is strong and the base is weak, then the pM is below 7 at the equivalence point. A key difficulty in pH control is the fact that the response to the same amount of added base (or acid) may differ so much from system to system and from pH to pH: a small amount added may change the pH very much or very little, as illustrated in Figure 1. In pH control the equivalence point is usually not important, the important thing being the pH or possibly (also) the slope of the titration curve in the surroundings of (close to) the desired pH. Figure 1 shows that if the objective is to have a pH of 7, then the amount of (weak)

0 1995 American Chemical Society

Ind. Eng. Chem. Res., Vol. 34, No. 3,1995 821 12

I

1

6

4 7

k000

0.005

0.010

mole

base Figure 2. Titration curves for 0.010 mol of weak acids (pkj = 3, 5, 7, and 9) and 0.003 mol of strong acid titrated with a strong base.

0

0

2

4

8

6

101214

PH Figure 3. Buffering (buffer capacity) for a diprotic acid with pkl = 7 and pkz = 12.

acid in the solution may be much higher than the required amount of added (strong) base (e.g., to a solution of a 0.01 mol of weak acid with pki = 9 less than 0,000 15 mol of strong base need be added). Typical of a titration curve is the jump a t the equivalence point. The jump may be very pronounced, as for strong acids and bases, but it becomes less pronounced as the strength of the acid (or base) diminishes, as shown in Figure 1. The jump may be located at the neutral point of pH = 7, but also quite far from it. Figure 2 shows the titration curves of mixtures of 0.010 mol of weak acids with pki = 3, 5, 7,and 9, and 0.003 mol of a strong acid titrated by a strong base. The strong acid first reacts with the base, which in Figure 2 results in two jumps, one at 0.003 mol and the other at 0.013 mol of added base. The relative heights of the jumps depend on the strength of the weak acid. Thus, for the strongest of the weak acids, the first jump is hardly visible. The different responses shown in Figure 1 may also be expressed by the difference in buffering (buffer capacity) of the systems. Here buffering or buffer capacity is defined as the inverse slope of the titration curve, 8, = dcddpH, and treated in detail later in the paper. Figure 3 shows the buffering of a diprotic weak acid with pkl = 7 and pk2 = 12. The largest buffering at intermediate pH values is obtained at pH = pki. This also defines the so-called half-titration point, where half the amount of base needed to reach the equivalence point has been added. The buffering is always high at very low and very high pH values, as can be seen from Figure 3. Figure 3 also shows that the buffering quickly decreases when one moves away from pH = pki. Two pH units away from pH = phi, the buffering is only a few percent of the buffering at pH = pki. If the control objective is to keep pH close to a prescribed value, a solution strongly buffered at that pH is easy to control since the system is very insensitive to disturbances. The amount of acid or base needed t o reach the desired pH is, however, relatively large, and therefore the damage to the surroundings in, e.g.,

wastewater neutralization may be relatively large even if the pH is quite close to its desired value. This reasoning may also be relevant in a situation where acid or base is consumed by some chemical reaction taking place in the solution where the pH is to be controlled. Controlling the pH within an interval of, say, 6 f 1may thus have very different meaning depending on the buffering of the solution around pH = 6. The paper presents the basic chemistry of acid-base equilibrium as well as modeling of acid-base equilibrium in systems including metal complexes and solids. On the basis of the general equilibrium model, we then derive approximate models, which are to be used for pH control. It is shown that systems of monoprotic acids can describe systems of multiprotic acids exactly. On the basis of examples, it is suggested that models of systems of monoprotic acids can approximately model any acid-base equilibrium with a minimum of parameters, which is important for, e.g., adaptive nonlinear control. The last section discusses dynamic models for pH, and especially the case where precipitation and dissolution take place. The validity of simple models for such reactions is discussed on the basis of experimental observations. A dynamic model is proposed for a simple case with one solid species, but it is recognized that no simple models can be obtained from first principles with several solid species present.

Modeling of pH for Control Mathematical models of pH suitable for control purposes can be found, e.g., in Gustafsson and Waller (1983, 1992). In the present paper the modeling approach is discussed more in depth from a chemical point of view concerning a number of factors affecting the system. The acidity of a solution is expressed by the pH value. The pH is the negative logarithm of the hydrogen ion (or proton) activity: pH

-log

UH+

(1)

where aH+ denotes hydrogen ion activity (or as an approximation, concentration divided by molarity (M)). The basic principle for controlling pH of, e.g., an acidic stream is simply to add more base if the pH is too low and less base if it is too high. However, how much base should be added is not determined by pH alone; it is a highly nonlinear and often time-varying function of pH. In fact, looking a t pH alone, we cannot even be sure whether, for control, a decrease in pH requires an increase or decrease in the added base (e.g., the manipulated variable) (Gustafsson and Waller, 1986). For efficient control some kind of mathematical model of the system is therefore needed. In the mathematical modeling of acid-base systems, the most suitable starting point is Bronsted's acid-base concept, which is the following: An acid can release a proton, H+. A base can accept a proton. An ampholyte can both release and accept a proton. In all these cases the key is the shift of a proton. Therefore according to Bronsted acids and bases are also called protolytes and the process itself is called protolysis. Remark. One could also, as some authors (e.g., Wright and Kravaris (1991)),use Arrhenius' acid-base definition. Then a base is a species that can release hydroxide ions, OH-. Bronsted's concept has some

822 Ind. Eng. Chem. Res., Vol. 34, No. 3, 1995

advantages over the older Arrhenius' concept. One example is that Bronsted does not treat charged and uncharged species differently: a base has always one unit less charge than the corresponding acid. It is common t o talk about an acid-base pair or an acid and its conjugate base. NH4+ and NH3 form such a pair, and so do HC1 and C1-, as well as HzS04 and HSOI-, etc. Dissociation Constants. An acid can release its proton only if there is a base in the system that can accept it. In an aqueous solution water acts as a base. Water is an ampholyte and is both a proton acceptor

H,O

ai = fici

(2)

For an acid HA in water we have the following reactions. The acid releases a proton

HA=A-+H+ which reacts with water

H,O

+ H'

= H30f

+ H,O = H30++ A-

(3)

The corresponding thermodynamic dissociation constant is

k . = aH30+aA- - cH30+cAam

CHA

fH,O+fA-

(4) fHA

The base B reacts in the following way in water:

+ H,O = HB+ + OH-

(5)

(B accepts a proton from water and OH- is formed.) The dissociation constant for the base B is then given by 'base

(7)

In diluted solutions where the concentration of water can be considered constant and f1.1~0= 1, k, becomes

+ OH-

As a measure of the strength of an acid or a base, it is common to use the thermodynamic dissociation constant for the reaction in question. In the equations below ai is the activity of the species i, ci the molar concentration, and fi the activity factor. We have the following relation:

B

+

~ H , o + ~ o H= - kw

H,O = H+

acid

+

2H,O = H30+ OH-

+ H+ = H30f

and a proton donor

HA

pH values below about 11 calcium hydroxide behaves as a strong diacidic alkali and can be treated as one. The equilibrium constant for the reaction Ca2+ OH= CaOH+ is 101.3. According to Bronsted Ca(OH)2is a salt containing the base OH-. Ca2+,however, forms a complex CaOH+ with the stability constant When calcium hydroxide is used in pH control, practically no CaOH+ is formed at pH values below 11. The ability of water to release and accept a proton is usually expressed by the ionic product of water, k,, for the reaction

- aHB+uOH- - CHB+COH- fHSCfOHaB

CB

(6)

fB

Remark. According to Arrhenius the reaction corresponding to (5) could be written

DOH = D+

+ OH-

where DOH corresponds to B and the symbol D+ to HB+. However, e.g., ammonia contains no OH- ion. Arrhenius' explanation of the fact that ammonia is a base is that ammonia forms NH40H in water solutions and dissociates into NH4+ and OH-. Remark. In accordance with the concept of Arrhenius, Ca(OH12 is treated as a diacidic base, weak, or more correctly medium strong, in its second stage. At

aH+aOH-

= k,

(8)

Note that the product of the dissociation constants for an acid and its conjugate base is equal to the ionic product of water: 'acid'base

= aH30+aOH- = w '

(9)

By the use of eqs 4, 6, and 8 and known dissociation constants, the equilibrium of every protolyte (acid-base) system can be completely described. Most acid-base reactions in pH control systems can be considered fast, and therefore the equilibrium conditions can be used to describe the reaction itself. Remark. The notion of salt is connected to solid phases. In an aqueous solution salts are dissociated in its components, which can be bases (e.g., P043-), ampholytes (e.g., HCO3-), acids (e.g., NH4+)or components inactive in acid-base reactions (e.g., Na+). A salt plays no role in Bronsted's acid-base definition. Effect of the Ionic Strength. The tabulated thermodynamic dissociation constants are valid for an infinitely diluted solution, i.e., for the ionic strength zero. The activity factor in eq 1, fi, is a function of the ionic strength and of the charge of the ion. For an acid with positive charge, e.g., NH4+, the concentration constant (i.e., the dissociation constant expressed by concentrations) almost equals the activity constant (thermodynamic constant). For a neutral acid, such as acetic acid, the concentration constant increases with ionic strength. The concentration constant of an anion acid, such as HCOs-, increases more rapidly with ionic strength than does that of an uncharged acid. At high ionic strength (1.5-2 M) the value of the concentration constant is often close to the value at ionic strength zero. To simplify the treatment, we assume in the sequel ideal solutions, i.e., the activity factor fi = 1, and thus a1. = c.1

(10)

Temperature Effect on the Dissociation Constant. The effect of the temperature on the equilibrium constant for a reaction is given by van't Hoffs equation: (d In k)ldT = AWIRF

(11)

If the heat of reaction, W ,is constant within the

Ind. Eng. Chem. Res., Vol. 34,No. 3, 1995 823

2 I

1.5

cBcH,o+/CHB+ = k,

7.0

CH~O+COH-= k w

5 6.5 6.0

For a solution of a number of acids and bases combination of eqs 15-17 gives

40 60 8O"ClOO temperature Figure 4. Effect of temperature on the neutral point of water, defined as pHneUtd= 0.5 pk,.

0

20

where

temperature interval in question, the effect of temperature can also be calculated by the following equation:

log k2 = log k l

m 1 +-- 2.30*(T1

(12)

For most acids the effects of temperature on the dissociation constant is quite small, only about Apk

= O.O05(AT/"C)

I(

B = l 1+-

(13)

The change in pH, however, can be considerable. Figure 4 shows the effect of temperature on pH of the neutral point of water, defined as (14) At 0 "C pH neutral is about 7.4,and at 60 "C about 6.5. The commonly assumed pH neutral = 7.0 is valid a t about 23 "C.

Static Model for pH A mathematical model for fast acid-base reactions in water describing the equilibrium pH and the concentrations of the various protolytes can be derived from material balances and from the electroneutrality condition (Kolthoff et al.,1969; Gustafsson and Waller, 1983; Westerlund et al., 1985). The material balance is

x a k i n i= b, where ai is the index of the element (or element group) number 12 in the species i, ni expresses the amount of i and bk is the total amount of element number k. The electroneutrality condition is

&ni

Bj in eq 18 is for monoprotic bases given by (20)

c:;)

In the expressions above Ca,i and cbj express the total concentrations of acid i and basej, respectively, in the system. The dissociation constants ka relate to the acids and k b to the bases. Ampholytes and multiprotic bases are regarded as mixtures of the corresponding acids and a strong base, e.g., Na2HP04 (+2H20) = 2NaOH. For strong bases, such as OH-, k b is very small. For strong acids k a is very large (103-107). Consequently, for strong acids and bases A and B in eq 18 can be set t o unity. Remark. Instead of ka and CH,O+ used above, 10-pka and 10-pH are often used. The form used above makes the simplification of the expressions more perspicuous. Equations 18-20 can be used for computation of pH for a protolytic system containing several acids and bases. The equation has only one real root, as shown by Westerlund et al. (19851, who also discuss suitable numerical methods. Note that the amount of strong acid or base is explicitly given by eqs 18-20 if pH is given. This means that eqs 18-20 are well suited to be used as a linearizing filter transforming measured pH to an additive quantity. If only monoprotic acids and bases are present, expression 18 is reduced to the following form:

+

=0

where Vi expresses the charge. The dissociation constants for an acid H,A and a base B and the ionic product of water can be expressed in the following way:

Buffering. Buffering, or buffer capacity, expresses how sensitive pH is to the adding of a strong base B. For a monoprotic acid information about this can be obtained by differentiating eq 21: cakacH,O+

\

An example of /Ifor a diprotic acid is shown in Figure

3.

824 Ind. Eng. Chem. Res., Vol. 34, No. 3, 1995 12

-

,----

4L 4

2 0.00

0.01 base

0.02mole

Figure 5. Titration of 1 dm3 of 0.005 M diphosphoric acid with NaOH in the absence (dashed curve) and in the presence (solid curve) of 0.002 M CaC12.

Effect of a Metal Forming a Complex. If the system contains a metal which can react with the acid or base in the system, the apparent strength of the acid changes. It is common that the base anion forms complexes with some, usually heavy, metals. One example is copper which forms complexes with acetate. Strong effects may be obtained if there are organic acids like glycine in the system. Consider a weak acid HA in a solution containing a metal Me2+,which forms the complexes MeA+, MeA2, etc., with the base A-. Then one obtains the following reaction scheme for the protolyse reaction:

HA=H++A-

2 0.000 0.005 0.010 0.015mole base Figure 6. Titration of 1dm3 of 0.01 M H3P04 with NaOH (dashed curve) and with Ca(0H)Z (solid curve). In the former case there is no formation of solid phase, whereas in the calculations for titration with Ca(0H)Z the formation of solid CaHP04 and Cas(PO412 is taken into account.

The calcium ion forms insoluble species with many anions from acids, such as carbonate, phosphate, sulfate, etc. Figure 6 shows the titration curve when phosphoric acid is titrated with Ca(OH)2compared to titration with NaOH. In titration with NaOH no complexes or solid phases are formed. The solid curve shows the titration curve for titration with Ca(OH)2when the formation of the solid phases CaHP04 and Ca3(PO4)2 is taken into account. The breakpoints on the titration curve indicate formation of a solid phase. After the first breakpoint in Figure 6, pH around 5.5, the following reaction takes place and precipitation of CaHP04(s)occurs: Ca(OH),

A-

+ MeA'

= MeA,

The reaction of the anion, A-, formed in the protolyse reaction (i.e., the first reaction above), with the metal, Me2+,shifts the protolyse reaction to the right. Consequently the acid appears t o be stronger with complexforming metals present. Practically all anions of organic acids form (stronger or weaker) complexes with metals, the alkali metals being an exception. The static model for pH in a solution with complex formation is based on eqs 15 and 16, which contain the complex-forming metals as elements, and which are augmented with the complexes as new species. The equilibrium conditions (17) are augmented with equilibrium conditions for the complexes. This destroys partly the nice structure of eq 18, which is linear in all concentrations except the H30 concentration. Titrationcurve functions for systems involving metal complexes will contain concentrations of different species in the factors corresponding to eqs 19 and 20, and a simple general equation cannot be given. As an example Figure 5 shows the titration curve for diphosphoric acid (H4P207)titrated with NaOH in the presence of CaC12 and without it. The formation of the complex C a P ~ 0 7 is ~ -considered. (Diphosphoric acid is, however, not stable in aqueous solutions and will disintegrate into common phosphoric acid.) Formation of a Solid Phase. A special but important case is when a solid phase is formed. Then the reaction rate may decrease significantly. Further, the form of the titration curve changes. One gets breakpoints and long horizontal or nearly horizontal parts, where pH of the solution is constant or changes very little with added base (or acid). This is for instance the case when Ca(OH)2 is used t o neutralize wastewater.

+ H2P04-= CaHPO,(,) + OH- + H20 (23)

At pH about 8 the following reaction takes place: 2CaHP04(,,

+ Ca(OH), = Ca,(PO,),(,, + 2H20 (24)

Adding more base, in the form of Ca(OH)2,in this latter region means that CaHP04(s)goes into solution and is reprecipitated as Ca3(P04)2(s).Note that adding base in the latter case does not result in any change in equilibrium pH. The static model for pH is obtained, e.g., by augmenting eq 15 with solubility constants (SI.For the reactions 23 and 24 eq 15 is augmented with the following inequalities, which are strict if the respective solid is present:

CCa2+3CP033-2

SCa3(P0,),(,,

(26)

It should, however, be recognized that the solution of the equilibrium equations with several components in the solid phase can be extremely ill-conditioned. Special computer programs have been developed for this task, e.g., SOLGASWATER (Eriksson, 19791, which has been used for calculations in this paper.

Approximations of the Static Model for pH Control In principle eq 18 can be used as a static linearizing filter in pH-control systems. If one knows the protolytes present and their concentrations and dissociation constants at the conditions in question, the titration curve can be calculated. However, concentrations of protolytes change, the dissociation constants change with temperature and ionic strength and other reactions, such as

Ind. Eng. Chem. Res., Vol. 34, No. 3, 1995 825 complex forming and precipitation, occur. It is therefore unlikely that a static model entirely based on tabulated constants and concentrations of the acids andfor bases present in the stream can be successful. The information needed is rarely known and cannot be directly measured in practice. One has to rely on measurements for estimation of the parameters needed. This does not mean that the derived static model is useless for control. The model captures the essential chemical features which result in the process nonlinearities in a pH-control system. In combination with the usual measurements of the process, i.e., pH, flow, and concentration of added reagent, it is most useful. For most control applications a simple approximate form of eq 18 is well suited. One useful simplification of eq 18 is to replace the multiprotic weak acids with several monoprotic acids. The approach can be illustrated as follows. The titration curve for a diprotic acid is defined by

12

ro

4t2 i 2

0

0.01

0.02mole

base

Figure 7. Titration curve for 1dm3 of 0.005 M diphosphoric acid in the presence of 0.002 M CaClz (solid line) and the approximation given by the titration curve for a strong acid and three weak acids (dashed line). 12

! 4u

10

PH

8

6 2

0

0.005

0.01

mole

base Figure 8. Titration curve for a 0.01 M acid with pk, = 6.5 (solid line) and for two acids with pk,l = 6.0 and c1 = 0.0049 M, and p k , ~= 7.0 and cz = 0.0052 M, respectively (dashed line).

For a system of two monoprotic acids the corresponding expression is given by

To show that eq 27 can be written in the form of eq 28 we select ca,l = ~ a , 2= Ca in eq 28. It can then be written as

A comparison of eqs 27 and 29 shows that the titration curve of a diprotic acid is identical with the titration curve of two monoprotic acids with Ca,l = Ca,2 = ca and k , l = (kad2) + ka,2 = (ka1/2) If kal and ka2 have significantly (lta1/2)2- k,,K,. ifferent values, then k , 1 Ka1 and ka,2 FZ Kd. A corresponding result can be obtained for triprotic acids. The titration curve for solutions of multiprotic acids can thus be exactly modeled with a set of monoprotic acids. The formulation of the static model with monoprotic acids can be advantageous also, e.g., when a complex formation is present. Figure 7 shows how the titration curve of Figure 5 (for the system with formation of complexes) can be approximated, though not exactly described, with the titration curve for three monoprotic acids. Equations 18 and 19 contain a lot of parameters, i.e., concentrations and dissociation constants. In a situa-

9-4

7

tion where a model of this type is to be adjusted to measured data, it is hardly meaningful to maintain so many degrees of freedom. A natural way to decrease the number of adjustable parameters in such a model is to fix the dissociation constants for a number of monoprotic weak acids and to select the corresponding concentrations in such a way that the resulting titration curve as closely as possible approximates the measured data. A n illustration of how the interesting part of a titration curve can be modeled by fictitious acids is given in Figure 8. There a weak acid with pka = 6.5 (roughly equivalent to H2C03 in its first dissociation step) is 6.0 and pkaz modeled by two fictitious acids with = 7.0, and a strong acid. The approximation shown is a least-squares approximation minimizing the sum of squares of errors in the abscissa. Theoretical analysis of the validity of such approximations is cumbersome because general explicit expressions for approximation errors cannot be obtained. It is our experience that most systems can be approximated with fictitious monoprotic acids with an accuracy that is satisfactory for pH control purposes. A very useful approach for advanced pH control can be based on the results illustrated above. A number of fictitious weak monoprotic acids with suitably chosen pka values are used to model the titration curve as discussed above. In continuous pH control the (fictitious) concentrations of the weak acids are then estimated, e.g., by the recursive least-squares method, for the common case when feed composition is unknown and time varying (Gustafsson, 1985; Gustafsson and Waller, 1983, 1992). The method can approximate a vast variety of acid-base and complex-formingreactions without assuming any prior knowledge of the involved species. Similar approaches have been suggested by Wright and Kravaris (1991) and Wright et al. (1991).

Dynamic Models for Acid-Base Systems Dynamic models for reactors including acid-base reactions are usually written as linear state equations

826 Ind. Eng. Chem. Res., Vol. 34, No. 3, 1995

in “reaction-invariant” state variables, such as total ~ concentrations of acid-base systems (e.g., C H ~ C O+ C H C O ~ - cco32-)and concentration of charge (Waller and Makila, 1981; Gustafsson and Waller, 1983). pH and concentrations of individual species are obtained by solving the static eqs 18-20. The model is based on the assumption that all reactions are instantaneous, i.e., that all reaction rates are infinite. This procedure is applicable also when we consider (fast) complex-forming reactions, but in systems with precipitation and dissolution low reaction rates must be considered. Since precipitation and dissolution occur only if certain conditions are fulfilled, both static gain and dynamics can rapidly change with pH in such a system. Consider as an example a continuous stirred tank reactor (CSTR)involving acid-base reactions including precipitation and dissolution. The dynamic model can be divided into two models, one for the liquid phase and one for the solid phase. The state vector of the liquid phase is preferably chosen as a vector of reactioninvariant concentrations of the liquid phase, while the state vector of the solid phase is chosen as a vector of concentrations (amount of solid per volume of liquid) of solid species. A precipitatioddissolution rate vector connects the two models by defining the rate of transfer of materia between the two phases. The model is then

+

where w1 is the reaction-invariant state vector of the liquid phase and w, is the vector of precipitation concentrations. Subscript f refers to the feed. dwl, w,) is the precipitatioddissolution rate vector, which is a nonlinear function of both state vectors. The precipitation speed for growing crystals is often described by (Walton, 1967)

where k is a constant, n, the number of crystals, c the concentration, ce the equilibrium concentration, and x the reaction order. The reaction order equals the number of ions needed to build a neutral molecule (see example below). Using eq 31 and solubility products for, e.g., the solid components CaHP04 and Ca3(P04)2,the following structures for the precipitation speed of CaHP04 and Ca3(PO& can be derived:

where k and n are adjustable constants. The following parameter values can be calculated for an ionic strength of 0.1 M: SCaHP04(s) = M2, a1 = 19.36, a 2 = 103.5 M-’, Sca3(po4)z(s)= M5, /31 = 625, and /32 = 1020.8 M-4. Equation 31 is given for pure crystals containing only one chemical species. It should also be noted that eq 31 contains the number of crystals as a parameter. If eq 31 is to be used for practical pH control, we must assume that the crystals are pure and that the number of crystals is constant or that it can be estimated.

6

tn

J I

60 80 min t Figure 9. Simulated response for a CSTR with precipitation and dissolution of CaHP04 and Ca3(P04)2 for step changes in the Ca(0H)z concentration of the feed. 0

20

40

Experiments with precipitation of CaHPO4 indicate that a fairly constant parameter kCaHp04nCaHp04 can be estimated if no other precipitation or dissolution occurs (Sandstrom and Gustafsson, 1994). Experiments at higher pH values, where the dissolution of CaHP04 and precipitation of Ca3(PO4)2 are simultaneous, indicate that eq 31 cannot be used in systems with simultaneous dissolution and precipitation of different species. An explanation is that the precipitating species forms a layer on the crystals of the dissolving species and thus slows down the transfer of materia from the solid to the liquid phase. The conclusion from the experimental study of precipitation rates for calcium phosphates is that eq 31 can be used as a base for the rate vector r in eq 30 for simple systems with only one species in the solid phase, but not for more complex systems. The effect of precipitation and dissolution on the dynamics of a CSTR is illustrated by the simulated step responses in Figure 9, for a system with the titration curve in Figure 6. The figure shows step responses for a CSTR to which is fed 0.01 M H3P04 and 0.004 M Ca(0H)z. The retention time of the reactor is 5 min. The Ca(OH)2 concentration of the feed is at t = 10 min increased to 0.010 M, and at t = 50 min decreased back to 0.004 M. The step responses are simulated based on eq 30 and eqs 32 and 33. The value of the coefficient kcmo4ncaHpo4is, based on experimental results, chosen to be constant a t the value 0.5. The behavior can be explained by looking at the reactions 23 and 24. At pH above 5.5reaction 23 occurs and consumes half the amount of added OH- ions. At pH 7.5 also reaction 24 occurs and consumes all added OH- ions. At t = 50 min there is only a small amount of buffering phosphate in the solution and the decreasing feed of OH- ions has a rapid effect on pH. Due to the dynamics of the process with a continuous feed of phosphate, there is never chemical equilibrium in the reactor. Thus the step response cannot be constructed simply from the titration curve, as is the case for fast acid-base processes, which can always be considered to be at chemical equilibrium. The dynamics of crystal formation, precipitation, and dissolution is in many practical cases very complex, and the subject is not much discussed in the literature. A common and important process with direct relevance to pH control is dissolution of Ca(OH)2in technical lime slurry. The main problem with this process, from a modeling point of view, is the varying chemical composition of the lime slurry and the varying crystal structures. Some experimental studies of dissolution of lime slurry for pH control purpose can be found in the literature. Recently, e.g., Walsh and Perkins (1994)and Becker (1986) have treated the subject.

Ind. Eng. Chem. Res., Vol. 34,No. 3, 1995 827

Discussion Continuous control of pH is many times a simple problem which can be solved without a rigorous process model (Waller and Gustafsson, 1983). There are, however, situations where the pH control problem is diffcult and where the demands on the control quality are high. In such situations the feed composition (and with it the buffering) is usually unknown and time varying. A model that captures the essential features of the process may then be crucial. This is true especially for the estimation part of the control system. A model having a correct structure and being sufficiently rich in, but not overloaded with, parameters may then be the key to successhl control. From a chemical point of view such models have been treated in the present paper where also the effect of such rarely treated features as precipitation and formation of chemical complexes in the solution have been treated. The present paper can be considered complementary to a recent paper by Gustafsson and Waller (1992)concerned with nonlinear and adaptive pH control, e.g., in oscillating systems which are quite common in pH control practice.

Acknowledgment Financial support from the Academy of Finland is gratefully acknowledged.

Gustafsson, T. K. An Experimental Study of a Class of Algorithms for Adaptive pH Control. Chem. Erg. Sci. 1986,40,827-837. Gustafsson, T.K.; Waller, K. V. Dynamic Modeling and Reaction Invariant Control of pH. Chem. Eng. Sci. 1983,38,389-398. Gustafsson, T.K.;Waller, K. V. Myths about pH and pH Control. MChE J . 1986,32,335-337. Gustafsson, T.K.;Waller, K. V. Nonlinear and Adaptive Control of pH. Znd. Eng. Chem. Res. 1992,31,2681-2693. Kolthoff, I. M.; Sandell, E. B.; Meehan, E. J.; Bruckenstein, S. Quantitative Chemical Analysis; Macmillan: New York, 1969. Sandstrom, K. V.;Gustafsson, T. K. A Study of the Dynamics of Calcium-Phosphate Precipitation in pH-Control Systems; ReProcess Control Laboratory, Ab0 Akademi University, port 94-5; 1994. Waller, K. V.; Mlikila, P. M. Chemical Reaction Invariants and Variants and Their Use in Reactor Modeling, Simulation, and Control. Znd. Eng. Chem. Process Res. Dev. 1981,20,1-11. Waller, K. V.; Gustafsson, T. K. Fundamental Properties of Continuous pH Control. ZSA Trans. 1983,22,25-34, No. 1. Walsh, S.;Perkins, J. Application of integrated process and control system design to waste neutralisation. Comput. Chem. Eng. 1994,18,Suppi., S183-S187. Walton, A. G. The formation and properties of precipitates; John Wiley & Sons: New York, 1967. Westerlund, T.; Skrifvars, B.; Karrila, S. On the Uniqueness in pH Calculations. Chem. Eng. Sci. 1985,40,973-976. Wright, R. A,; Kravaris, C. Nonlinear Control of pH Processes Using the Strong Acid Equivalent. Znd. Eng. Chem.Res. 1991, 30,1561-1572. Wright, R. A,; Soroush, M.; Kravaris, C. Strong Acid Equivalent Control of pH Processes: An Experimental Study. Znd. Eng. Chem. Res. 1991,30,2437-2444.

Received for review April 14,1994 Revised manuscript received October 24, 1994 Accepted November 7, 1994@

Literature Cited Becker, H. The effect of stirring and diffusion on the dissolving of lime hydrates. Zement, Kalk, Gips 1986,39,222-223. Eriksson, G. A n algorithm for the computation of aqueous multicomponent, multiphase equilibria. Anal. Chim. Acta 1979, 112,375-383.

IE940248V @

Abstract published in Advance ACS Abstracts, February

1, 1995.