SIAM News Blog
SIAM News
Print

Optimization Techniques Maximize Real-time Management of Water Supply Systems

By Lina Sorg

In 2015, the Environmental Protection Agency (EPA) estimated that 27.4 million Americans—roughly nine percent of the population—were served by water systems with more than one health-based violation of the Safe Drinking Water Act. Harmful contaminants in the water supply—including lead and bacteria like salmonella—originate from multiple sources, such as dated infrastructure and poor quality management. Water within the treatment plant itself is typically of very high quality; when it leaves the plant, however, it is subjected to a heavy buildup of scales and biofilms within the transport pipes that harbor numerous pathogens (see Figure 1). For example, the lead contamination crisis in Flint, Mich., exposed more than 100,000 residents to extremely high levels of lead due to corroding pipes. “This issue is not just local to Flint, it actually applies to almost all big cities in the U.S.,” Ahmed Abokifa of the University of Illinois Chicago said. “The good news is that our water systems are becoming smarter, and an essential component of this smart water framework is the computational models and algorithms that we build.” 

During a minisymposium presentation at the 2024 SIAM Conference on Mathematics of Planet Earth, which took place earlier this week in Portland, Ore., Abokifa discussed multiscale modeling and optimization techniques that enable the real-time management and control of water quality in drinking water supply systems. For example, remote actuators and online sensors facilitate decision-making in real time to guarantee the efficiency, sustainability, and resilience of water systems. These systems seek to maintain adequate water quantity and optimal quality, minimize water losses and treatment and energy costs, and maximize their ability to recover from disruptive contamination events. A variety of multiscale models and frameworks support these efforts by detecting contaminants and identifying their sources (see Figure 2): 

  • Numerical models simulate the mechanistic processes that govern water quality dynamics
  • Data-driven models forecast the state of the system under different operational scenarios
  • Optimization algorithms enable real-time water quality control.

Figure 1. The deterioration of water quality typically occurs during the distribution process (after the water has left the treatment plant) due to the presence of pathogens and other contaminants within the transport pipes. Figure courtesy of Ahmed Abokifa.

Water within in a treatment plant undergoes four primary steps: (i) Coagulation and flocculation, (ii) sedimentation, (iii) filtration, and (iv) disinfection. During the final step, the addition of chlorine ensures that the water is free of bacteria, viruses, and parasites when it leaves the plant. The EPA requires the U.S. drinking water supply to maintain a minimum detectable level of chlorine that is safe for human consumption. As such, the disinfection process at treatment plants must be precise. An insufficient amount of chlorine subjects the water to contamination from the distribution pipes, where chlorine levels steadily decay due to chemical reactions with organic and inorganic material; alternatively, too much chlorine can cause the formation of toxic byproducts. The placement of chlorine boosters throughout the distribution network mitigates this issue and maintains appropriate chlorine levels. 

Current real-time contamination response includes three steps: (i) Isolate the affected zones, (ii) flush out the contaminant, and (iii) disinfect the residual contaminant with chlorine boosters. To optimize the location, amount, and dose of chlorine, Abokifa introduced a simulation-optimization framework—consisting of a simulation model and an optimization algorithm—that functions as a mass balance model. A dynamic two-dimensional convection-diffusion-reaction equation models chlorine transport and decay and accounts for accumulation, convection, diffusion, and reaction. Given the right boundary conditions (reactions that occur at the pipe’s interior wall), one can solve the partial differential equation and redistribute chlorine throughout the pipe.  Although this simulation-optimization framework yields strong results, it is also a costly black box approach. “This is very computationally expensive model to run, even though it gives pretty good results that are mostly in agreement with field measurements,” Abokifa said.

Figure 2. Multiscale models of water quality control can detect contaminants, identify their sources, incorporate chlorine boosters, and ultimately enable water quality control in real time. Figure courtesy of Ahmed Abokifa.

Although previous studies have typically relied on evolutionary algorithms, these algorithms require numerous evaluations of the objective functions. Additionally, the high computational cost of solving numerical models prohibits real-time implementation. As such, Abokifa opted for Bayesian optimization. Bayesian techniques build a probabilistic surrogate model of the black box objective, optimize a cheap acquisition function, and utilize uncertainty to balance exploration (which seeks places with high variance) with exploitation (which seeks places with a low mean). By leveraging exploration and exploitation, the acquisition function determines the next point to sample — enhancing the surrogate model as samples are collected. “After building a probabilistic surrogate model, you couple that with an acquisition function that essentially returns an expected improvement in solutions for each point along the function domain,” Abokifa said. A sequential sampling approach keeps enhancing the prediction of the function’s appearance until it converges to an optimal solution. 

Abokifa’s optimization model incorporates the cost of chlorine injection, the capital cost of the booster system, and the constraint violation penalty function. The surrogate model uses Gaussian process regression to sample four kernels within the booster optimization framework; these covariance kernels control the relationship between function evaluations at different points across the domain. “Different kernels produce different shapes and inflows of uncertainty,” Abokifa said. He also sampled four different acquisition functions. These four functions and four kernels collectively yield 16 distinct variations, all of which perform differently.

Finally, Abokifa evaluated the performance of Bayesian optimization in the context of water quality systems. “Bayesian optimization converges to the best solution very rapidly compared to the genetic algorithm and particle score optimization,” he said. Because this form of optimization requires significantly fewer evaluations of the objective function in order to converge, it is less computationally expensive than common evolutionary algorithms.


Lina Sorg is the managing editor of SIAM News.
blog comments powered by Disqus