Proceeding Paper

1

# The Dual Model under pressure: how robust is leak detection under uncertainties and model-mismatches.

2

Enrique Campbell¹*, Edo Abraham², Johannes Koslowski³, Olivier Piller⁴, and David B. Steffelbauer 5

3

4

¹ Kompetenzzentrum Wasser Berlin gGmbH (KWB); enrique.campbell@kompetenz-wasser.de;

5

² Delft University of Technology (TU Delft); E.Abraham@tudelft.nl;

6

³ Kompetenzzentrum Wasser Berlin gGmbH (KWB); johannes.koslowski@kompetenz-wasser.de;

7

⁴ INRAE, AQUA Division, UR ETTIS, 50 Av. de Verdun, F-33612 Cestas, France ; olivier.piller@inrae.fr

8

⁵ Kompetenzzentrum Wasser Berlin gGmbH (KWB); david.steffelbauer@kompetenz-wasser.de;

9

* corresponding author

10

11

† Berlin, Germany. April, 2024.

12

**Abstract:** This paper investigates the robustness of one innovative model-based method for leak detection, namely the dual model. We evaluate the algorithm's performance under various leakage scenarios in the L-Town network, despite uncertainties and model mismatches in (i) base demand, (ii) pipe roughness, (iii) number of sensors, and (iv) network topology. Our investigation results indicate that the *Dual Model* is highly sensitive to discrepancies in the first three parameters. However, the impact can be mitigated through sensor-specific calibration, such as adjusting sensor elevations. Moreover, the *Dual Model* has demonstrated robustness to minor topology mismatches, like those introduced by closed valves.

13

14

15

16

17

18

19

20

21

**Keywords:** Leak detection; Dual model; Simulation model, Robustness.

22

23

## 1. Introduction

24

Model-based methods, which integrate hydraulic models with measurement data, have emerged as an efficient alternative to conventional leakage detection techniques, offering the potential for significant reductions in labor costs through automation. Among these methods, the pressure-leak duality method [1] also known as the *Dual Model* provides a novel approach by incorporating virtual reservoirs at sensor locations and setting the reservoir head to the measured pressure levels. As a consequence, this approach converts leak-induced pressure drops into virtual leakage flows, effectively amplifying the signal of a leak, leading to strong localized signals affecting sensors close to the leak, and the sum of all virtual flows provides a good first approximation of the actual magnitude of the leak. The concept of the *Dual Model* is loosely based on linear programming. Here, a *primal* linear program can be transformed into a *dual* linear program by converting variables into constraints, and vice versa. In the *Dual Model*, mass or flow conservation constraints are relaxed by allowing virtual inflows and outflows into the virtual reservoirs. At the same time, virtual leak flows become new variables. Pressures at sensor locations, initially treated as measurement variables, become constraints in the *Dual Model*, as they are considered fixed reservoir heads. As per this tradition, we refer to the original hydraulic model without virtual reservoirs as the *Primal Model*, aligning with linear programming terminology.

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

**Citation:** To be added by editorial staff during production.

Academic Editor: Firstname
Lastname

Published: date

<figure><img src="image_1.png" /></figure>

**Copyright:** © 2024 by the authors.
Submitted for possible open access
publication under the terms and
conditions of the Creative Commons
Attribution (CC BY) license
(https://creativecommons.org/license
s/by/4.0/).
Detection and Isolation Methods (BattLeDIM) [2]. However, the BattLeDIM network (L-Town) includes a high number of pressure sensors and was very well calibrated (i.e., with respect to demand and roughness). Thus, arises two questions: what would happen if the input parameters of the model are not well known? What are the limitations of a model that violates the laws of mass conversation, as the Dual Model does, considering that there is generally no free lunch?

This work aims to stress-test the Dual Model systematically by introducing perturbations to near-ideal conditions in Area A from L-Town network. This includes: (1) uncertainties in the hydraulic model input parameters, such as variations in base demand and pipe roughness; (2) changes to network topology by opening and closing pipes; and (3) reduction in the number of available pressure sensors. The impact of these perturbations on the capacity of the Dual Model to reconstruct the inserted leakages was assessed. For that purpose, the Root Mean Squared Error (RMSE) between the leakage flow in the Primal Model ($Q_{\text{Leak}}$) and the sum of all the Virtual Flows ($Q_{\text{virtual}}$) in the Dual Model was computed.

## 2. Methodology

We created a set of 12 incipient leakage scenarios distributed across area A of the L-Town network [Start time: 2018.01.08 00:00:00, Peak time: 2018.01.22 00:00:00, Size: 0.01 mm, Peak flow: ~2.7 l/s, End time: 2018.01.31 00:00:00]. Each leakage was inserted into the Primal Model as a node in the middle of a pipe. This node was associated with a demand pattern of a 31-day period (5 minutes interval). Following the insertion of the leakage, we conducted simulations to capture pressure dynamics within the Primal Model. Pressure “readings” were then extracted from 30 representative Pressure Sensor Nodes (PSNs) over the simulation period. To construct the Dual Model, we connected Virtual Reservoirs (VRs) with a total head of 1 to each PSN through Throttle Control Valves (TCV). A head pattern corresponding to the pressure values from the previous period plus the PSN elevations was incorporated into each VR. Then, the Dual Model was simulated, and the sum of all $Q_{\text{virtual}}$ was quantified. This sum was then compared to the $Q_{\text{Leak}}$ by means of RMSE.

### 2.1. Perturbations in the Dual Model

In ideal conditions (calibrated based demand and roughness, no topological mismatches, and a large number of sensors), the sum of the $Q_{\text{virtual}}$ corresponds almost perfectly (RMSE 0.0009) with $Q_{\text{Leak}}$ (Figure 1a). In other words, the *Dual Model* is capable of resembling $Q_{\text{Leak}}$ almost to perfection. Additionally, the VRs closest to the leak, account for the highest percentage in the sum of the $Q_{\text{virtual}}$, ~91% (~22% + ~52% + ~9% + ~8%).

<figure><img src="image_2.png" /><figcaption>(a)</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>(b)</figcaption></figure>

**Figure 1.** The *Dual Model* detecting one leakage in ideal conditions. (a): the sum of all $Q_{\text{virtual}}$ resembles almost perfectly (gray and dashed line) $Q_{\text{Leak}}$. (b): the VRs closest to the leak account for the largest percentage of $Q_{\text{virtual}}$.

The following perturbations were tested: *Variation of base demand and roughness*: both parameters were increased by 0.1%, 1%, and decreased by the same percentage.
**Change of topology:** shutdown of a set of 11 pipes (one at a time) with high network centrality values. For every closure, all 12 leak scenarios were evaluated. **Reduction of the number of sensors:** three scenarios were tested: (1) one with 22 sensors (sensors too close to each other were eliminated, leaving only one); (2) one with 6 sensors (close to pipes with high centrality); and (3) one with only four sensors (close to the reservoirs R1 and R2, to the pressure regulation valve of Area B, and to the entrance of Area C).

1

2

3

4

5

6

## 3. Results

7

The results indicate that variations in pressure between the Primal and Dual Model play a crucial role in the performance of the Dual Model. Perturbing base demand generates greater head loss in the pipes and reduces the pressure at the nodes. This leads to a reduction in network head compared to the VRs, resulting in $Q_{virtual}$ flows from the VRs to the network (negative flows). Figure 2(a) clearly depicts this effect. Conversely, when the base demand is reduced, the network exhibits higher hydraulic head compared to the VRs, resulting in an excessive increase in $Q_{virtual}$ from the network to the VRs, even during periods without leakage. Based on this observation, it is expected that an adjustment in the elevation to get rid of constant offsets or the pattern factors of the VRs to minimize the noise will be able to counteract this effect. For example, during leak-free periods, the factors must be adjusted in such a way that $Q_{virtual}$ becomes minimal. This would represent a highly attractive alternative to the traditional calibration of base demand and roughness, highly dependent on abundant a precise measurement data. It is worth noting that a variation of 0.1% in both parameters does not generate significant RMSE values; however, a variation of +/- 0.5% already produces substantial values of the later.

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Effect of perturbing base demand and roughness. (a): comparison of sum of $Q_{virtual}$ and $Q_{Leak}$ in different base demand perturbation scenarios. (b): comparison of sum of $Q_{virtual}$ and $Q_{Leak}$ in different roughness perturbation scenarios.</figcaption></figure>

24

25

26

<figure><img src="image_5.png" /><figcaption>**Figure 3.** RMSE comparison for 12 leakage scenarios. (a): perturbations of base demand. (b): perturbations of roughness.</figcaption></figure>

27

28

Figure 3 depicts a RMSE comparison between $Q_{Leak}$ and the sum of $Q_{virtual}$ for 12 leakages in different perturbation scenarios. It is worth noting that despite the errors being of the same order of magnitude, those generated by perturbation in base demands remain very constant, differently to the case of perturbation of roughness. This relates to the fact that

29

30

31

32
for base demand, the variations were applied directly to the demand multiplier. Which 1
means that the perturbations were applied uniformly to all nodes. In the case of 2
roughness, Monte Carlo simulation was used to generate random samples around the 3
initial roughness factors. Concerning variation in topology, for most scenarios, the RMSE 4
between $Q_{\text{Leak}}$ and the sum of $Q_{\text{virtual}}$ is near zero, apart from "leak p866", which exhibits 5
a slight increase in RMSE Figure 4(a). Regarding the reduction of the number of sensors, 6
the RMSE becomes highly significant in the scenarios with only 4 and 6 sensors Figure 7
4(b). 8

<figure><img src="image_6.png" /><figcaption>**Figure 4.** (a) Effect of shutting down a set of 11 pipes (one at a time). (b): RMSE for four "amount of sensors scenarios". 9 10</figcaption></figure>

**4. Conclusions** 11

This research systematically assessed the robustness of the Pressure-Leak Duality 12
method for detecting water leakages in water supply networks, emphasizing its 13
performance under various perturbations and uncertainties. While the *Dual Model* 14
demonstrates high accuracy under ideal conditions with well-calibrated parameters and 15
sufficient pressure sensor coverage, it exhibits high sensitivity to sensor availability and 16
mismatches in base demand and roughness. Simple changes in network topology have a 17
minor impact on detection accuracy, whereas reductions in sensor numbers significantly 18
compromise performance. Future research should focus on refining the *Dual Model* to 19
enhance its robustness to parameter uncertainties and sensor limitations, thereby 20
improving its practical utility in real-world leak detection applications. 21

**Author Contributions:** Enrique Campbell and David Steffelbauer were in charge of the methodology and conducting the tests. The rest of the authors contributed to the analysis of the results and conclusions. 22 23 24

**Funding:** This work is part of the iOLE project and receives funding from the Federal Ministry of Education and Research (BMBF) within the funding measure "Digital GreenTech – Environmental Engineering meets Digitalisation" as part of the "Research for Sustainability (FONA) Strategy" (funding code: 02WDG1689A). 25 26 27 28

**Data Availability Statement:** data supporting the conclusions will be made available on request. 29

**Conflicts of Interest:** The authors declare no conflicts of interest. 30

**References** 31

1. D.B, Steffelbauer, J. Deuerlein, D. Gilbert, E. Abraham, and O. Piller, "Pressure-Leak Duality for Leak Detection and Localization in Water Distribution Systems," *JWRPM 2022*, vol. 148. 32 33

2. S.G. Vrachimis, D.G, Eliades, R. Taormina, Z. Kapelan, A. Ostfeld, S. Liu, M. Kyriakou, P. Pavlou, M. Qiu, and M.M. Polycarpou, "Battle of the Leakage Detection and Isolation Methods", *JWRPM 2022*, vol. 148. 34 35

36
**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.