Municipal water and wastewater

On a simulated benchmark town, it read the pumps' control rules off the readings, to two centimetres

One small SCADA, an RTU reaching remote stations over radio, and an integrator who set the naming up and has since retired.

INTAKEraw waterTREATMENTdosing, filtersRESERVOIRlevel, turbidityNETWORK PUMPSpressure zonesREMOTE STATIONSRTU over radioone small SCADA · an RTU point list · one integrator, retired

The least documented site on this page, and the one the regulations now ask the hardest questions of.

What actually goes wrong

A municipal water works has the smallest engineering team and the oldest naming conventions of anything on this page. The person who set the tag names up was an integrator on a project fifteen years ago. They are not coming back, and what they knew was never written down anywhere that survived.

Two things made this urgent rather than merely untidy. The EU's NIS2, and in Norway the Digital Security Act for waterworks, put reporting obligations on operators who have no one to write the report, and the attack on the dam at Bremanger in 2025 moved OT resilience from a slide to a board question. Both ask the same first question: what have you actually got, and does it still work?

That question is answerable from tags, values and whatever paperwork survived, which is exactly what the compiler eats. This page used to say we had not run on water and were not going to pretend otherwise. We have now run on a simulated water network, not yet on a working utility.

The network is C-Town, published with the BATADAL competition under CC BY 4.0: a benchmark distribution network based on a real medium sized town, with a year of hourly SCADA readings simulated from its hydraulic model, and the model published beside it. It is not a working utility's data, and we have not yet run on one. 43 tags, 7 tanks, 11 pumps. The model file is the paperwork and the compiler never opens it. It is used to mark the answers, the way the HAI manual is on the rig page.

The ordinary result first. With no water connector at all the compiler places nothing and refuses all 43 tags, which is the same answer it gives any sector it has never seen and is the honest shape of this product. With a connector, which is a 78 line text file and not a release, it places nearly all of them, as the table below shows. Name matching also gets every machine right, because this network writes its element names into its tags, and on the quantity it beats us 100 to 93. That criterion failed and it is reported as failed.

The reason it failed is the more interesting half. The three tags we lost are F_PU3, F_PU5 and F_PU9, and all three are flat zero for every one of the 4,177 hours. They are standby pumps that never start. The compiler reads values as well as names, and a series that is nothing but zero looks exactly like an off signal, so it called them statuses. Name matching is right about them only because it never looks: it reads the F and says flow, and on a dead channel that guess happens to land.

Then the part we have not found elsewhere. Which pump fills which tank is not written in any tag name. F_PU2 and L_T1 share no character that means anything, so there is no regular expression, no dictionary and no language model reading names that can connect them. It is in the numbers: a tank that rises while a pump runs, for a year. Asked that question with the model file shut, the compiler got six of six, and the control logic written by the people who built the network agrees with every one.

One tank it should have refused and did not. T6 has no monitored pump, and the compiler named PU10 at a correlation of 0.53. That is not noise: PU10 discharges five pipes from T6 and ten from T7, the tank its controls actually name, so T6 sits on the main PU10 pumps into. The answer describes the hydraulics correctly and contradicts the control rule, and the criterion said refuse. It is written down as a failure because that is what it is.

That failure is now fixed, and fixing it produced something better than the thing it fixed. Correlation was answering the wrong question: it finds the district, and a tank a pump fills looks identical from the outside to a tank that merely sits downstream of one. But a controlled tank does something a downstream tank cannot. It commands the pump, and the command is a threshold, so at every single switch-on the commanding tank's level is at nearly the same value while every other tank's level is wherever it happens to be. The signature is not correlation, it is tightness.

Tightness recovers the number as well as the pairing. Not that PU2 is associated with T1, but that PU2 starts when T1 falls past 1.0 metres and stops at 4.5. On a file it had never seen, 5 of 5 pumps that cycle enough to test were matched to the tank that commands them, T6 was refused, and the 10 recovered thresholds came back within a median of 2 centimetres of the numbers in the network's own model. 3 of the 10 landed on the stated figure to the centimetre.

Getting there took three preregistered runs and one of them failed. The first estimator was biased, always toward the middle of the tank, because the moment a pump starts the tank stops falling and begins to rise, so the reading after the switch sits above where the tank was heading. The fix for that bias was noisier, and the same number was being used both to pick the tank and to report the threshold, so the accurate version started refusing pumps the biased one had matched. Choosing wants a steady number and reporting wants an unbiased one, and they are not the same number. Each run is written down, including the one that went backwards.

Water per zone, in the console

The console shows each metered zone of a water network: the water that still flows in at night, when almost nobody uses any, and the mean over the whole day, day by day, from the zone’s own loggers. Which logger feeds the zone, which passes water on to the next one and which is a customer with its own meter is read from the loggers’ names. When a figure rises and stays up, the console raises an alarm with the day the rise began, and the shift note says so. A day that cannot be trusted, with a logger missing in the night or stuck on one value, is left out with the reason.

What it was tested on. In a zone of one British utility it had not seen, the night flow matched the utility’s own published figure on 328 of 328 nights. On BattLeDIM, a simulated town, the fixed night flow rule found 10 of 18 leaks and a plain whole-day mean found 12, so the console shows both. Of the 8 leaks of at least 1 m3/h the night flow rule found 8; of the 10 smaller ones, 2.

An alarm the zones set on their own nights. An alarm that cries wolf gets switched off. So the night flow alarm takes its threshold from the zones’ own first year of nights, with no record of leaks, aiming at no more false alarms a year than the utility chooses (4 a zone unless it writes another number). A fast part catches a large leak in about two nights; a slow part adds up a small rise night after night against a baseline a new leak does not enter for two weeks. Tested once on 1,166 district metered areas of 3 British water companies it had not seen, with known leaks added to copies of their real night figures: it raised 4.1 alarms a zone and year in the years after the first, against the 4 asked for; a leak of 2 m3/h raised the alarm in a median of 2 nights; half a cubic metre an hour was found within four weeks in 26% of cases, against 17% for the fixed rule it replaces. In the demo the three zones set it on their first 328 nights, less than the full year it was tested on.

The smallest leak you can see in each zone. The console adds steps of growing size to a zone’s own real nights, from 36 start nights across the year, replays the same alarm rule with the same threshold, and gives the size it raised an alarm for within 28 nights in at least half of them, in plain words: leaks smaller than this can hide here. On the 3 demo zones that is 0.8 to 2.7 m3/h, about 7,000 to 24,000 m3 a year each, because their night flow moves 0.68 to 0.72 m3/h from night to night by itself; the rule raises 1.1 to 6.7 alarms a year on their own nights. A typical leak on a private service pipe is 0.07 to 0.72 m3/h (Norsk Vann rapport 305/2026). The zone where the most can hide (Zone 4 in the demo) is where a meter inside it, or splitting it, would help most. It is an estimate from the zone’s own noise, not a promise of what will be found.

When the night flow steps up. Where a zone’s night flow has stepped up and stays up, a card gives the night it began, the size with a range, the water since then and in a year if it keeps running, and the cost where the utility has written its price per m3. It says the night flow stepped up and asks for a check; it does not call it a leak. On the demo zones, at the end of their data, no card is shown.

What this does not show. That a leak is found sooner than a utility finds it today. The loggers’ names were read in one utility’s convention (IN, OUT, CUS); another utility’s names have not been tested. The demo in the console runs on three zones of that utility, published under CC BY 4.0, the zones the step was written on.

The run, on a network nobody here designed

C-Town, published with the BATADAL competition under CC BY 4.0. A year of hourly simulated SCADA on the left of the scoring line, the network's own hydraulic model on the right of it. The compiler never opens the model; it is what marks the answers.

r 0.63r 0.82r 0.90r 0.56r 0.85r 0.53r 0.64PU1PU2PU3PU4PU5PU6PU7PU8PU9PU10PU11V1V45V47V2T3T1T7T6T5T2T4

C-Town as its own model draws it: 429 mains, 7 tanks, 15 pumps and valves, at the coordinates the benchmark gives. The curved lines are the compiler's answers to which flow fills which tank, with the correlation that produced each one. Six are right. The amber one is T6, which should have been refused.

Placing the tags

setupplacedquantitymachine
nothing: no connector, no model0 of 4328%0%
no connector, but the element list11 of 4328%67%
the water connector, tags only42 of 43100%100%
the water connector and the list42 of 43100%100%
name matching, the baseline—100%100%

Scored against the element the network's model names, never against the tag text. With no water connector the compiler places nothing, which is the honest shape of a sector-blind core. The connector is 78 lines of text and no compiler code changed.

Which pump fills which tank

tankthe compiler saidthe controls say correlationverdict
T1PU2PU1 or PU20.63agrees
T2V2V20.82agrees
T3PU4PU4 or PU50.90agrees
T4PU7PU6 or PU70.56agrees
T5PU8PU80.85agrees
T6PU10nothing monitored0.53missed
T7PU10PU10 or PU110.64agrees

From the values alone, with the model file shut. 6 of 6 tanks correct on held-out data. Name matching scores zero here and cannot score otherwise, because the relationship between a pump and the tank it fills is not written in either name. T6 has no monitored pump and should have been refused; it was not, and that criterion is recorded as failed.

How far we have got

the label on this story

measured

C-Town, published with the BATADAL competition under CC BY 4.0. With no water connector it places 0 of 43 tags; the connector is a 78 line file and no compiler code changed. Four preregistered runs, each on data the one before had not seen, and the two that failed are on this page.

read next

The numbers, including the ones that missed

Four preregistered runs, each on data the one before had not seen. The reports, including the two criteria that missed and the run that went backwards, are sent on request: [email protected].