1660339521875 Article 509 Fig2

pH linearization lubricates waste control

Oct. 17, 2005
Learn how a simplified technique for linearizing pH can enhance control in waste treatment applications and eliminate the need for gain-adjusting techniques.

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."

An alternate approach involves linearization of pH outside the control algorithm. There are linearization strategies in the literature that take various approaches to characterize pH back to ion concentration, anywhere from piecewise titration curves to rigorous solution of charge-balance models for complex mixtures with buffers and polyprotic components 1,2. These can be difficult to apply and support effectively in plant organizations with limited process control resources. Also, piecewise linearization can have, on a smaller scale, issues with breakpoints similar to adaptive gain strategies.In each of these approaches, shifts in the influent titration curve from changing conditions may require significant alteration of the parameters in the control strategy employed, depending on its complexity. This is why it’s valuable to keep the control strategy relatively simple with few parameters to change, but adaptive enough to remain effective with changing conditions.Simplified pH Linearization
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
Modifying the logarithm base produces a titration curve that can be made to look similar to the real titration curves of complex waste streams. This allows to modified curve to be used as a simple, effective linearization algorithm for pH that’s easy to configure and maintain. Analysis and Implementation
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
To integrate 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. The overall effect is that the PID acts entirely on ion flow rate, which is linear, instead of pH. The PID block sees only effective ion flow for its setpoint, process variable, and any feedforward input. The operator interface, however, is still in pH units as far as the actual setpoint entry and process variable representation is concerned. Since the PID sees an essentially linear input, there is no longer any need for adaptive gain or gain scheduling. Also, if the pH loop is cascaded to a flow loop for neutralization, then calculation of a process gain for the loop is straightforward.The PID initialization capabilities of modern DCS systems play an important role in dealing with positional inaccuracies in the calculated titration curve. When the PID is initialized by placing it in a mode higher than manual, the integral contribution is back calculated, and assumes any prior contribution from integral action and feedforward if enabled. This results in bumpless transfer to the higher mode. Proportional action will only result from subsequent changes in setpoint or process variable, and action from any feedforward connection will only result from subsequent changes in the feedforward signal. For this reason the accuracy of the slope of the calculated titration curve is far more important than its positional accuracy.Precautions need to be taken when tuning this pH control strategy. Although gain adjustment strategies are no longer necessary, tuning needs to be in terms of the ion flow variables (or their percentage of scale) instead of pH. This would apply also to autotuners.Further Enhancements
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

The many titration curve shapes and their parameters on a spreadsheet 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. In conclusion, pH control can be made more straightforward by linearizing the pH inputs to the control strategy, which includes the process variable and a feedforward, if present. If this can be done effectively, complex and maintenance-unfriendly gain adjustment strategies can be avoided. Waste streams are often complex mixtures that don’t have the sharply defined titration curve typical of strong acid/base neutralization or the pronounced plateau typical in the titration curves of weak or polyprotic acids. For these streams, simply modifying the logarithm base in the definition of pH to give a reasonably accurate calculated titration curve can be used to linearize the pH input. This pH characterization has only one parameter to be adjusted to fit different waste stream systems.References:

  1. Shinskey, F.G., “pH and pION Control in Process and Waste Streams,” Wiley and Sons, 1973.
  2. McMillan, Gregory K. and Cameron, Robert A., “Advanced pH Measurement and Control,” 3rd Edition, ISA, 2005.
  About the Author
Robert C. Kelahan, a consultant with more than 25 years experience in process control, specializes in advanced control and dynamic simulation. He can be reached at[email protected].

Sponsored Recommendations

Make Effortless HMI and PLC Modifications from Anywhere

The tiny EZminiWiFi is a godsend for the plant maintenance engineers who need to make a minor modification to the HMI program or, for that matter, the PLC program. It's very easy...

The Benefits of Using American-Made Automation Products

Discover the benefits of American-made automation products, including stable pricing, faster delivery, and innovative features tailored to real-world applications. With superior...

50 Years of Automation Innovation and What to Expect Next

Over the past 50 years, the automation technology landscape has changed dramatically, but many of the underlying industry needs remain unchanged. To learn more about what’s changed...

Manufacturing Marvels Highlights Why EZAutomation Is a Force to Be Reckoned With

Watch EZAutomation's recent feature on the popular FOX Network series "Manufacturing Marvels" and discover what makes them a force to be reckoned with in industrial automation...