Staying in Control

Robert C Kappel Prominent Fluid Controls USA

April 4, 2022

Have you ever thought: “Why does my controller sometimes seem to add too much chemical while other times it doesn’t add enough? Why does my controller seem to be out of control? Is there a better, more predictable way of doing this?” Let’s deconstruct this complex topic and learn that yes…. there is a better, more reliable way to control your pool water chemistry.

The chemical controller lies at the heart of many swimming pool chemical feed systems. In its most basic form, a controller measures the pH, ORP or free chlorine in the water. The controller displays the sensor readings and instructs the chemical feed system when to turn on and off. It is in the on/off instructions where many of the issues with the consistency and predictability of chemical feed lie.

To better understand control strategies and introduce some terms that will be important as we move forward, let’s look at a house thermostat. A house thermostat is really just a simple controller connected to a warm air feed device. Let’s say that a temperature of 68°F is programmed into the thermostat. This temperature is called the setpoint. If the temperature is above the setpoint, the furnace remains off. If the temperature drops below the setpoint, the furnace turns on. This control strategy is called an on/off control. A chemical feed system will perform a function similar to the furnace and add chemical whenever the controller tells it to do so, however, there is one major difference to note: Warm air will mix into a room faster than a chemical will mix into water, therefore, there is a lag-time between when a chemical is injected into the water and when the change in chemistry is recognized by the controller. Another major difference between the heating system in a home and a pool system is that the heating demand of a home is fairly predictable while a swimming pool chemical demand is variable and unpredictable due to rapidly changing bather loading & weather conditions. It is easy to see that due to lag-time and unpredictable bather loading, pools need a controller that has a more sophisticated control algorithm than just a simple on/off control strategy otherwise, there can be an overfeed or underfeed of chemicals. Unfortunately, many pool operators struggle with controllers and the chemistry of their pool. So, where can one turn to find advanced control strategies? Here is where we look to PID control for help. But what is PID control?

In the early 1920’s Nicholas Minorsky was commissioned by the US Navy to develop automatic steering systems. Minorsky observed that ship helmsmen steered ships based on three things: What affect the wind, waves and current had on the ship moments ago; what affect the wind, waves and current had on the ship at that very moment and what affect the wind, waves and current will have on the ship in the moments to come. Through these observations a mathematical formula was derived and PID control was born. Most basically described in swimming pool terms, the letter P stands for proportional. Proportional is the current error- the difference between the setpoint and the actual chemical reading in the water. The letter I stands for integral. Integral is the accumulation of past errors- a look back to see how often and by how much the difference between the actual readings and set points were. The letter D stands for derivative. Derivative is the prediction of future errors- a look forward predicting the possibility of differences between setpoint and actual readings.

Most controllers can be programmed to operate in either an on/off control mode or proportional control mode. The on/off method of control is very effective at allowing the controller to reach setpoint quickly, but it also may over feed chemicals due to lag time. This lag time is the bane of operators with small bodies of water and/or very irregular loading. Proportional control mode for most of these controllers means that it utilizes only the P portion of PID as its control algorithm. The P algorithm will tell the chemical feed device to turn on and off for multiple specific time periods before the setpoint is reached. This so-called “feed-then-wait-to-see-what-happens” strategy is very effective for preventing the over feed of chemicals. The downside is that under high organic load conditions the controller will not be able to keep up and chlorine levels will continuously be low and pH high. Eventually the controller will go into a feed over time alarm and no chemicals will feed at all!

Controller manufacturers recently realized that both on/off and P-only control algorithms possess shortcomings. In response to this, another control strategy was introduced- enhanced proportional control. This strategy essentially introduced PI control to the aquatics industry. The PI algorithm utilizes the P portion of PID and adds the element of I (integral) which is a look into the past performance of meeting setpoint. Theoretically PI control helps prevent both overfeeds and underfeeds by looking at past feed events. If the controller determines that setpoint will not be reached before the time limit is exceeded, the feed times are automatically adjusted, and pauses are made shorter and on times longer. This seems like a perfect solution until a facility experiences multiple periods of heavy bather loading interspaced with times of inactivity. Of all bather loading scenarios, this is the hardest type for a controller to cope with and unfortunately, represents typical loading of many pools. It is highly likely that the controller would begin to oscillate and randomly cause both underfeeds and overfeeds throughout the day. Sound familiar? This happens because when in PI control, if the controller recognizes an underfeed situation, the feed rate ramps up. This ramp up combined with the lag time in many systems, will cause overfeed and when the controller recognizes the overfeed, it turns the feed rate down causing an underfeed. And so, the oscillations begin. How can these oscillations be prevented? Enter PID control.

Adding the D (derivative) to the PI algorithm; allowing the controller to respond with full PID control, the D value acts as a damper to keep feed oscillations to a minimum. The D value will anticipate the potential for oscillations and adjust the feed pause and feed on times accordingly. The controller is now looking at the full picture, the present (P), the past (I) and the future (D).

The controller now can adjust feed events to properly respond to rapidly varying bather loads and water conditions. One additional control strategy called “adaption” was introduced a few years ago in an attempt to emulate full PID control. Adaption essentially takes a snapshot of the lag time and uses that information to try to predict future events. The problem is that this snapshot is done when the controller is set up and typically does not represent conditions with heavy bather loads and therefore is not as accurate as a continuously adjusting PID loop.

The important news for operators is that within the past few months, aquatics controller manufacturers are now offering controllers with full PID loop control. In fact, some controllers now can even connect directly to a diaphragm pump and the controller will automatically adjust the pump stroke and speed to provide additional precision to dosing! PID control in a chemical controller will reduce costs by minimizing the potential for overfeeds and wasting of chemicals. PID control will also minimize operator headaches due to underfeed/overfeed oscillations ensuring that the pool water meets the required code parameters. We are in an exciting time when savvy operators who understand the issues and know there are solutions available, can make a choice as to what technologies will help them solve their issues. Goodbye under and over feeds!

PID theory was developed by observations of the actions of helmsmen

Posted in


Leave a Comment

You must be logged in to post a comment.