By Robert C. Kelahan
GET REAL. It’s not the pH, it’s the ion flow. Modifying logarithm bases to help calculated titration curves match the pH range of real curves allows PID control to act based on linear ion flow rates, rather than pH, so traditional gain adjustments aren’t needed.
pH control is often studied in control literature because it presents such a unique case of nonlinearity, and nonlinearity can be very problematic in process control. With pH systems, the emphasis on pH as the control variable obscures the fact that what we’re really trying to measure and control is not pH (although the specification may be in terms of pH), but simply ion concentration or ion flow. pH is just a convenient measure of ion concentration by way of electrode potential as described by the Nernst Equation. However, the Nernst relationship between ion concentration (more correctly, activity) and electrode potential is logarithmic–hence the nonlinearity and its representation as pH.
Compensating for pH Nonlinearity
Most discussions of pH control accept pH measurement as the control variable and apply strategies to modify a part of the PID algorithm, usually the controller gain, to compensate for the nonlinearity. This can involve techniques, such as adaptive gain or gain scheduling, with a low fixed-gain region where pH is most sensitive to changes in reagent (high process gain), and with increasing gain as pH departs from this high process gain region. The result is a controller gain function with two breakpoints. In many cases, this can be reasonably effective. Success with this approach depends on how closely the controller gain maps to offset the changing process gain in the titration curve. Breakpoints must be selected, as well as the degree of gain adjustment, and some control instability can be observed around these breakpoints, even if these parameters are carefully selected.
"It’s valuable to keep the control strategy relatively simple with few parameters to change, but adaptive enough to remain effective with changing conditions." |
Chemical plant waste streams requiring neutralization often are combinations of streams from several processes brought to one location for neutralization with caustic or slaked lime. The resulting neutralization inlet stream is a complex mixture of several components. Consequently, the titration curve may not appear as a simple strong acid, weak acid, or even a polyprotic acid, but as a combined curve representing the effects of several of these. This combined curve often will be a much smoother version of its component curves, with individual plateaus and bends disappearing into the overall shape of the curve. The goal usually isn’t complete neutralization (pH near 7), but is instead partial neutralization to minimize reagent use against a low-pH (5 to 6) constraint. With partial neutralization, the acid side of the titration curve is of primary interest; transition to the base side either isn’t a likely occurrence or would result in triggering an interlock or other discrete action, overriding the main control strategy.Rigorous solution of charge balance equations for strong acid, weak acid, and more complex systems are within the capability of modern DCS systems. However, in this approach, simplifications that would be easier to implement and support are considered that don’t significantly impact accuracy for the range of pH of interest.The definition of pH in terms of hydrogen ion concentration involves the base 10 logarithm. It’s interesting to note that the shape of a calculated strong acid titration curve can be flattened to varying degrees by lowering the logarithm base in this equation. By modifying the logarithm base, the resulting “titration” curve can be made to look similar to the real titration curves of complex waste streams, at least enough to be used as an effective but simple linearization algorithm for pH that is easy to configure and maintain. (See Figure 1).
FIGURE 1: A SIMPLE ALGORITHM
A calculated titration curve with a modified logarithm base can be fitted in a spreadsheet to a real titration curve from a waste stream exhibiting the characteristics described above. For implementation in a control strategy, it’s more important that the slopes of these titration curves match over the expected range of pH than for the actual curves to match. This takes advantage of the PID initialization capabilities present in most modern DCS systems. In the system studied for this article, the Solver tool in Excel was used to adjust the logarithm base to minimize the squared error of the slopes between the real and calculated titration curves over the pH range of interest. The same technique can be used for primary influent streams that are good candidates for feedforward control.For integration with PID control, separate characterization function blocks can be set up for the setpoint and process variable of the control loop using the same parameters (Figure 2). For feedforward control using an influent stream, a separate set of parameters would be needed because this stream only represents part of the overall influent. Flow measurements for the influent streams can be used if variable, or a design rate can be used in the characterization function block for streams with flows that don’t very appreciably. FIGURE 2: PID pH CONTROL
Although the technique of linearizing pH by modifying the logarithm base can be applicable to a wide variety of complex waste streams, an enhancement was added to provide more flexibility by accounting for the presence of a single weak acid in significant concentration. This would appear as one flat part of the titration curve, even though there may already be some flattening due to the presence of other acids. Adding a weak acid to the strong acid/base charge balance model provides two additional variables: the weak acid’s fraction in the influent and the dissociation constant, to better match the slopes of more complex real titration curves. This provides some additional flexibility at the cost of a slightly more complex characterization equation in the DCS system. Some examples indicating the wide range of titration curve shapes are shown in Figure 3. In a spreadsheet, these parameters can be varied manually to observe the effect on the calculated titration curve, or a tool such as Excel’s Solver can be used to adjust all three parameters to match the titration curve slopes. FIGURE 3: EASY MODELING
- Shinskey, F.G., “pH and pION Control in Process and Waste Streams,” Wiley and Sons, 1973.
- McMillan, Gregory K. and Cameron, Robert A., “Advanced pH Measurement and Control,” 3rd Edition, ISA, 2005.
About the Author |