Drinking-water networks depend on chlorine residuals that remain within operating limits as water moves through pipes, tanks, and service areas. Forecasting these residuals can identify emerging conditions before routine monitoring confirms them. A physics-informed forecasting process combines hydraulic and chemical knowledge with time-series data, then uses a language model to prepare an incident response for operator review.

The process addresses data quality, model performance, and operational decision-making. Starting with a representative network sector, a utility can test the approach with historical measurements and controlled simulations before it becomes part of routine operations.

Define the Forecasting Problem

Consider a distribution sector supplied by one treatment plant and monitored at a storage tank and several downstream locations. The utility collects hourly chlorine-residual measurements, water temperature, flow, tank levels, and disinfectant dose. Hydraulic estimates provide the direction and approximate travel time of water through the sector.

The objective is to forecast residual concentration at selected locations over the next 24 hours. The forecast does not replace sampling or operator judgment. It provides an early indication of whether a measured trend may approach an established operational threshold.

For this worked example, assume the utility’s internal review threshold is 0.20 milligrams per liter at a designated monitoring point. This value is illustrative; each utility must use its approved limits, sampling procedures, and response protocols.

Combine Time-Series Data with Network Physics

A conventional time-series model can learn patterns in recent measurements. However, it may produce forecasts that conflict with known travel times or chemical behavior. A physics-informed model addresses this limitation by including a simplified representation of transport and chlorine decay.

For a pipe segment, a basic residual model can be written as:

Cdownstream(t) = Cupstream(t − τ) × e−kτ

Here, C is chlorine residual, τ is estimated travel time, and k is a decay coefficient. The equation represents the expected reduction in residual as water moves through the network. Temperature and water age can inform the estimate of k. Flow and hydraulic conditions can inform τ.

A practical forecasting system combines this physical estimate with a data-driven correction. The physical model supplies a baseline, while a machine-learning model learns local differences from measured history. One implementation uses a neural network to estimate the correction term and a loss function that penalizes both forecast error and violations of the transport-and-decay relationship.

The training data can include hourly residuals, flow, temperature, dose, tank level, and time since the last valid sample. Missing or suspect measurements should be flagged rather than silently treated as normal. The model should also report forecast uncertainty, since a single forecast value can hide uncertainty in sensor readings and hydraulic estimates.

Worked Example: A Declining Residual

Assume the downstream monitoring point reports a residual of 0.34 milligrams per liter at 08:00. Flow has increased, water temperature is above the recent weekly average, and the upstream residual remains stable. The physics-informed model estimates a travel time of six hours and a higher decay rate than the previous day.

The forecast indicates that the downstream residual may decline to 0.26 milligrams per liter by 16:00 and approach 0.21 milligrams per liter by 22:00. The 24-hour forecast interval is wider than usual because one downstream measurement is missing. The model therefore classifies the condition as a developing concern, not a confirmed water-quality incident.

This distinction is important for program managers and operators. The forecast gives the utility time to verify conditions, review relevant operating information, and follow established procedures. It does not establish cause, authorize a treatment change, or determine whether water is safe.

Use an LLM to Draft, Not Direct, the Response

A language model can convert a structured forecast alert into a concise response draft. It should receive only approved information, such as the affected monitoring point, forecast horizon, observed residual, uncertainty level, and applicable response procedure. It should not infer an unobserved cause or issue control commands.

For the example, the forecasting service could provide this structured record:

  • Location: Downstream monitoring point A.
  • Observed residual: 0.34 milligrams per liter at 08:00.
  • Forecast: 0.21 milligrams per liter by 22:00.
  • Confidence: Moderate; one recent measurement is missing.
  • Required action: Follow the utility’s verification and escalation procedure.

The LLM can draft a notice stating that the forecast indicates a possible approach to the internal review threshold, that confidence is moderate, and that an operator should verify the reading and consult the approved procedure. The draft should identify its data sources and timestamp. It should not state that contamination has occurred or recommend an unapproved operational change.

Operator approval remains a required step. The operator checks the forecast, confirms current measurements, edits the draft when necessary, and records the decision. The LLM assists with communication and documentation; the utility’s authorized personnel retain responsibility for response actions.

Establish Controls and Measure Performance

Before deployment, the utility should evaluate the forecasting system on historical periods that were not used for model training. Useful measures include forecast error, threshold-warning lead time, missed warnings, false alarms, and performance during missing-data conditions. Results should be reviewed by location and operating condition, not only as a network-wide average.

The LLM component requires separate controls. The system should use a fixed set of approved procedures, preserve the input data and generated draft, and prevent the model from issuing commands to operational technology. Staff should review examples of correct, incomplete, and misleading drafts before the service enters routine use.

  • Start with a pilot: Select a limited sector with reliable measurements and documented procedures.
  • Validate the physics: Compare estimated travel times and decay behavior with utility engineering knowledge.
  • Test failure conditions: Evaluate stale sensors, missing values, unusual flow, and conflicting measurements.
  • Keep approval explicit: Require operator review before any incident message or response action is accepted.

Conclusion

Physics-informed chlorine-residual forecasting combines time-series learning with transport and decay behavior. An LLM can then prepare an operator-approved incident response from a controlled set of facts and procedures. Together, these capabilities support earlier review, clearer communication, and more consistent documentation.

Utilities can begin with a bounded pilot, validate the forecast against local conditions, and retain human authority at every operational decision point. Dills Analytics LLC supports organizations developing actionable AI solutions for high-consequence domains, including water-system forecasting and governed LLM workflows.

AI generated content label