How AI Is Solving One of Water's Toughest Problems: Chlorine Control

Keeping drinking water safe requires a delicate balance of chlorine that's nearly impossible to manage manually across large networks. Researchers at Cognizant AI Lab have developed a new approach using evolutionary artificial intelligence combined with learned system models to optimize chlorination control in water distribution systems, addressing a problem that has challenged engineers for decades .

Why Is Chlorine Control So Difficult in Water Systems?

Water distribution networks face a complex control problem that most people never think about. Chlorine must be carefully maintained within a narrow range: too little allows harmful microorganisms to persist, while too much creates chemical byproducts linked to serious health risks, including cancers and cardiovascular disease . The challenge intensifies because chlorine levels cannot be set once and forgotten. As water moves through the network, changing demand and flow conditions continuously alter how chlorine spreads, decays, and reacts with organic matter. This means the concentration at any given point depends not just on current conditions, but on decisions made earlier and elsewhere in the system .

Traditional control methods rely on simplified assumptions that struggle to capture these dynamics, while reinforcement learning approaches often face instability, noisy objectives, and challenges in balancing competing goals. The fundamental bottleneck is practical: you cannot experiment directly on a live water system. Water distribution networks are critical infrastructure, so testing new control strategies in the real world is not feasible .

How Does the New AI Framework Solve This Problem?

The research introduces a unified framework called the Evolutionary Surrogate-Assisted Prescription (ESP) loop, which combines a learned model of the system with evolutionary optimization. At the core is a surrogate model that approximates the behavior of the water distribution system using a neural network, allowing candidate strategies to be evaluated efficiently without relying on the full simulator for every evaluation .

The framework operates through several interconnected components working together:

  • Surrogate Model: A neural network trained to predict how flows and chlorine concentrations evolve over time, enabling rapid evaluation of control strategies without the computational overhead of full simulation
  • Neuroevolution (NEAT): Neural network controllers are evolved to determine how chlorine should be injected across the network, taking observations such as flow and concentration measurements as input and outputting control decisions at each timestep
  • Multi-Objective Optimization (NSGA-II): The system balances multiple competing objectives simultaneously, including keeping chlorine within safe bounds, maintaining consistent concentrations, minimizing total chemical usage, and ensuring stable injection patterns over time
  • Iterative Learning Loop: The surrogate model is used to rapidly evaluate candidate controllers, with the best-performing strategies tested on the full simulator to generate new data that refines the surrogate, creating a feedback cycle where both the model and control strategies improve together

Rather than collapsing competing objectives into a single reward, the framework uses multi-objective optimization to discover a range of viable tradeoffs. This is particularly important in real-world settings, where different operating conditions may require different tradeoffs .

What Results Did the Research Achieve?

The results highlight significant differences from traditional methods. Reinforcement learning, specifically a technique called PPO (Proximal Policy Optimization), struggled to produce effective control strategies in this environment. The combination of delayed effects, noisy dynamics, and competing objectives made it difficult to define a stable learning signal, and PPO often converged to trivial or ineffective behaviors, failing to meaningfully control chlorine injection .

In contrast, the evolutionary framework consistently identified solutions that balanced multiple objectives more effectively. Rather than optimizing a single reward, it explored a range of tradeoffs, allowing it to find strategies that maintained safe chlorine levels while reducing cost and improving stability. The approach produces stronger tradeoffs across objectives than baseline strategies and reinforcement learning in this setting .

The surrogate model demonstrated strong accuracy in predicting system behavior. When compared against the true simulator values, the neural network surrogate successfully tracked system dynamics, validating the approach of using a learned model to accelerate the optimization process .

Steps to Implement AI-Driven Water System Optimization

  • Build a Surrogate Model: Train a neural network to approximate the behavior of your water distribution simulator, reducing computational costs and enabling rapid evaluation of control strategies without running expensive full simulations
  • Define Multiple Objectives: Identify all competing goals your system must balance, such as safety bounds, spatial consistency, cost reduction, and operational smoothness, rather than collapsing them into a single metric
  • Evolve Control Strategies: Use evolutionary algorithms to explore diverse control approaches that take real-time observations as input and generate injection decisions, allowing the system to discover novel solutions humans might not consider
  • Validate Against Full Simulation: Test the best-performing evolved strategies on your full simulator to generate new data, then use this feedback to iteratively refine both the surrogate model and the control strategies

The framework provides a practical way to optimize complex, high-stakes systems where real-world experimentation is not possible and simulation is computationally expensive . This approach opens new possibilities for improving critical infrastructure systems and supporting the safe, reliable delivery of drinking water at scale.

The research demonstrates that evolutionary AI methods can outperform traditional machine learning approaches when dealing with systems that have delayed effects, multiple competing objectives, and high computational costs. As water utilities face increasing pressure to maintain safety while reducing chemical usage and operational costs, this technology offers a data-driven pathway to better decision-making without the risks of real-world experimentation.