# Pressure Sensor Placement in Water Supply Network Based on Graph Neural Network Clustering Method

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Methodology

#### 2.1. Monitoring Partition Establishment of WSNs

- (1)
- Hydraulic characteristics and topological characteristics

**P**(which only contains nodal pressure data) obtained with extended-period simulation is used to represent the hydraulic characteristics of WSNs, where

_{Nodes×T}**T**represents the time series length and

**Nodes**represents the number of nodes in the WSN. A graph is the best way to represent topological structure information, and a WSN can be regarded as a directed graph with attribute values. Therefore, information such as whether the nodes are connected and the flow direction between nodes under normal operating conditions is used to construct the directed graph

**G**of the WSN, and the adjacency matrix

**A**of graph

_{Nodes×Nodes}**G**is used to represent the topological characteristics of WSNs. The asymmetric structure of the adjacency matrix

**A**contains not only the connection information of the nodes, but also the flow direction information of the pipes, which can be learned by the graph convolution operation of the SDCN [21] algorithm later.

_{Nodes×Nodes}- (2)
- Node clustering with SDCN algorithm

**P**and topological characteristics

_{Nodes×T}**A**of the network. The clustering result includes clusters $C=\left[{C}_{1},{C}_{2},\cdots ,{C}_{n}\right]$ (also discribed as

_{Nodes×Nodes}**n**node sets with specific features in WSNs) as well as the probability matrix

**Pro**, representing the probability that each node belongs to each cluster.

_{Nodes×n}- (3)
- Monitoring partitions

_{i}represented by each cluster ${C}_{i}$, the node set corresponding to the largest connected subgraph in G

_{i}is selected as the partition i and is represented as ${C}_{i}^{\prime}$, while the remaining nodes in ${C}_{i}$ are regarded as discrete points.

**Pro**.

_{Nodes×n}Algorithm1 Monitoring partition establishment |

Input: WDN’s graph G, SDCN’s clusters $C=\left[{C}_{1},{C}_{2},\cdots ,{C}_{n}\right]$, Pro_{Nodes×n}Output: optimized clusters ${C}^{\prime}=\left[{C}_{1}^{\prime},{C}_{2}^{\prime},\cdots ,{C}_{n}^{\prime}\right]$1: S = {} 2: for $i\in \left\{1,2,\cdots ,n\right\}$ do3: ${C}_{i}^{\prime}=\left\{nodes|nodes=largestconnectedsubgraphof{C}_{i}\right\}$ 4: S append $\left\{node|node\u03f5({C}_{i}-{C}_{i}^{\prime})\right\}$ 5: end6: repeat7: for $node\in S$ do8: for $j\in \left\{indexs=argsortofPr{o}_{node}\right\}$ do9: if {${C}_{j}^{\prime}$, node} is connected graph do10: ${C}_{j}^{\prime}$ append node11: break12: end13: end14: end15: until S is empty16: return ${C}^{\prime}=\left[{C}_{1}^{\prime},{C}_{2}^{\prime},\cdots ,{C}_{n}^{\prime}\right]$ |

#### 2.2. Pressure Sensor Arrangement

- (1)
- Pipe bursting simulation

**c**is the emitter coefficient;

**γ**is the pressure index.

**γ**= 0.5, the emitter coefficient $c=\beta \mu \sigma {A}_{D}\sqrt{2g}$ and ${Q}_{burst}$ can be calculated with leakage area ratio and node pressure accordingly.

- (2)
- Indicator tensor

**(a)****Pressure threshold:**

_{k,t}of node k is performed at the same time t on different days. The pressure value *P

_{k,t}is considered the pressure threshold of node k at time t if p(P

_{k,t}> *P

_{k,t}) = 95%.

**(b)****Perception node:**

_{i,t}of node i at time t is lower than the pressure threshold *P

_{i,t}, then node i can identify abnormal signals and is regarded as the perception node.

**(c)****Indicator matrix:**

**t**, pipe bursts at each node are simulated according to the set value of $\sigma $. With each node traversed for burst simulation, the pressure values of all nodes at time

**t**are obtained, and the pipe burst pressure matrix σt − BP

_{Nodes × Nodes}is obtained, where

**Nodes**represents the number of nodes in a WSN hydraulic model. The σt − BP

_{j,i}represents the pressure at point

**i**when the burst event occurs at node

**j**, when the time is

**t**and the leakage area ratio is

**σ**.

_{Nodes × Nodes}and pressure threshold, the indicator matrix σt − I

_{Nodes × Nodes}is defined as follows:

_{Nodes × Nodes}is a matrix containing only digits 0 and 1, σt − I

_{j,i}= 1 if and only if node

**i**is a perception node, when the time is

**t**and the leakage area ratio is

**σ**. The indicator matrix represents the information of the perception nodes in the WSN when the pipe burst event occurs.

**(d)****Indicator tensor:**

**I**is obtained under the multi-hydraulic conditions. The indicator matrix set $I=\left\{{\sigma}_{i}{t}_{j}-{I}_{Nodes\times Nodes},i=1,\cdots ,B;j=1,\cdots ,T\right\}$ is integrated into a multi-dimensional array ${I}_{B\times T\times Nodes\times Nodes}$, and ${I}_{B\times T\times Nodes\times Nodes}$ is defined as indicator tensor

**I**.

- (3)
- Pressure sensor arrangement

**i**is a set of nodes in partition, which means that when any node in the set bursts, it will cause node

**i**to produce a significant pressure drop. The partition perception rate of node

**I**represents the proportion of node

**i**’s perception domain in the entire partition. The mathematical definitions are as follows: at time

**t**and burst level

**σ**, given the monitoring partition ${C}_{l}^{\prime}$, for node i belonging to ${C}_{l}^{\prime}$, the node set ${D}_{i,\sigma t}=\left\{j\right|\sigma t-{I}_{j,i}=1,j\in {C}_{l}^{\prime}\}$ is called partition perception domain of the node i. The ${\tau}_{i,\sigma t}=\frac{\left|{D}_{i,\sigma t}\right|}{\left|{C}_{l}^{\prime}\right|}$ is called partition perception rate of node i, where $\left|{D}_{i,\sigma t}\right|$ and $\left|{C}_{l}^{\prime}\right|$ represent the size (number of nodes) of the node set ${D}_{i,\sigma t}$ and ${C}_{l}^{\prime}$.

**i**, traverse B × T operating conditions based on indicator tensor

**I**, and obtain the average partition perception rate of node

**I**in the multi-hydraulic state:

## 3. Case Studies

#### 3.1. Case 1

_{20 × 24}, and the adjacency matrix A

_{20 × 20}of the network directed graph was used as topological characteristics. SDCN algorithm was adopted to cluster all nodes into two classes. SDCN clustering result is shown in Figure 5a. All nodes were divided into two classes, and the result is highly related to the layout of the WSN, indicating that SDCN algorithm can effectively integrate the topological and hydraulic characteristics of the WSN.

_{20 × 24}was used to drive K-means algorithm for clustering all nodes into two classes. The result is shown in Figure 5b. It can be clearly seen that the clustering result was highly related to the nodal pressure layout. The nodes with a short distance from the reservoir are classified into one class, with the nodes at the end of the left and right parts of the network into another. K-means algorithm extracted the hydraulic characteristics of WSNs successfully, but topological characteristics are neglected because of the algorithm limitations. Therefore, the clustering results of K-means algorithm cannot be directly used for regional monitoring and inspection of the WSN.

#### 3.2. Case 2

^{2}service area and 16,000 m

^{3}average daily water supply.

- (1)
- Proposed method

_{86400 × 464}(with 464 nodes and 60 d × 24 h × 60 min = 86,400 records for each node).

_{464 × 464}. Considering the sparsity of the WSN topological characteristics, the number of neurons in the DNN module in the SDCN algorithm should be set larger such that the SDCN model can effectively learn the topology characteristics of the WSN. The DNN module of the SDCN algorithm is an autoencoder composed of seven linear layers, and a number of autoencoder neurons is set to 512, 256, 256, 128, 256, 256, 128 through continuous manual tuning. The other hyper-parameters are set as follows: learning rate set to 0.001, parameters optimization method set to Adam, epoch set to 360.

**σ**is set to 0.25, 0.5, 0.75, 1.0, and time

**t**is set to 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 in a day, respectively. The indicator tensor

**I**is calculated based on the burst data and the pressure threshold.

- (2)
- K-means Clustering method

**Coverage rate:**The coverage rate indicates the ratio of the number of nodes that can be detected by the monitoring system to the number of nodes in the entire WSN, it can evaluate the monitoring performance of the monitoring system. The mathematical definition is as follows: at time

**t**, the coverage rate of pressure sensors is defined as the ratio of |D| and |WDN|. |D| represents the number of elements in $D={D}_{{m}_{1},t}{\displaystyle \bigcup}{D}_{{m}_{2},t}{\displaystyle \cup}\cdots {\displaystyle \cup}{D}_{{m}_{m},t}$, and ${D}_{{m}_{m},t}$ represents perception domain of pressure sensor ${m}_{m}$. The symbol

**m**means the number of pressure sensors, |WDN| is the total number of nodes in the network model. The mathematical expression of coverage rate $\rho $ is as follows.

- (3)
- Comparison and analysis of results

- (4)
- Discussion

**I**and coverage rate to evaluate the performance of the monitoring system. This section discusses the influence on the coverage rate of the monitoring system with different numbers of sensors and different levels of pipe bursts.

**σ**was set at 0.2, 0.3, 0.4, 0.5, 0.6, and pipe burst time

**t**was set at 14:00 p.m., 12:00 p.m., 1:00 a.m. (corresponding to average flow, maximum flow and minimum flow during one-day duration, respectively) to obtain the indicator tensor under 5 × 3 = 15 different operating conditions. The coverage rate of monitoring schemes with different number of monitors was calculated according to Equation (6), and the results are shown in Figure 10.

**σ**is 0.3, the coverage rate of the six sensors is 0.76. When sensors increase to eight, the coverage rate increases to 0.87. When sensors increase to 12, the coverage rate also increases to 0.89.

## 4. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Azevedo, B.; Saurin, T.A. Losses in Water Distribution Systems: A Complexity Theory Perspective. Water Resour. Manag.
**2018**, 32, 1–18. [Google Scholar] [CrossRef] - Frances-Chust, J.; Brentan, B.M.; Carpitella, S.; Izquierdo, J.; Montalvo, I. Optimal Placement of Pressure Sensors Using Fuzzy DEMATEL-Based Sensor Influence. Water
**2020**, 12, 493. [Google Scholar] [CrossRef][Green Version] - Meier, R.W.; Barkdoll, B.D. Sampling design for network model calibration using genetic algorithms. J. Water Resour. Plan. Manag.
**2000**, 126, 245–250. [Google Scholar] [CrossRef] - Deschaetzen, W.; Walters, G.A.; Savic, D.A. Optimal sampling design for model calibration using shortest path, genetic and entropy algorithms. Urban Water
**2000**, 2, 141–152. [Google Scholar] [CrossRef] - Kang, D.; Pasha, M.; Lansey, K. Approximate methods for uncertainty analysis of water distribution systems. Urban Water J.
**2009**, 6, 233–249. [Google Scholar] [CrossRef] - Kang, D.; Lansey, K. Optimal Meter Placement for Water Distribution System State Estimation. J. Water Resour. Plan. Manag.
**2010**, 136, 337–347. [Google Scholar] [CrossRef] - Zhou, X.; Tang, Z.; Xu, W.; Meng, F.; Chu, X.; Xin, K.; Fu, G. Deep learning identifies accurate burst locations in water distribution networks. Water Res.
**2019**, 166, 115058. [Google Scholar] [CrossRef] - Cheng, W.; Chen, Y.; Xu, G. Optimizing Sensor Placement and Quantity for Pipe Burst Detection in a Water Distribution Network. J. Water Resour. Plan. Manag.
**2020**, 146, 04020088. [Google Scholar] [CrossRef] - Sousa, J.; Ribeiro, L.; Muranho, J.; Marques, A.S. Locating Leaks in Water Distribution Networks with Simulated Annealing and Graph Theory. Procedia Eng.
**2015**, 119, 63–71. [Google Scholar] [CrossRef][Green Version] - Afsar, M.M.; Tayarani-N, M.-H. Clustering in sensor networks: A literature survey. J. Netw. Comput. Appl.
**2014**, 46, 198–226. [Google Scholar] [CrossRef] - Jun, S.; Kwon, H.J. The Optimum Monitoring Location of Pressure in Water Distribution System. Water
**2019**, 11, 307. [Google Scholar] [CrossRef][Green Version] - Starczewska, D.; Collins, R.; Boxall, J. Transient Behavior in Complex Distribution Network: A Case Study. Procedia Eng.
**2014**, 70, 1582–1591. [Google Scholar] [CrossRef][Green Version] - Cheng, L.; Du, K.; Tu, J.P.; Dong, W.X. Optimal Placement of Pressure Sensors in Water Distribution System Based on Clustering Analysis of Pressure Sensitive Matrix. Procedia Eng.
**2017**, 186, 405–411. [Google Scholar] [CrossRef] - Likas, A.; Vlassis, N.; Verbeek, J.J. The global k-means clustering algorithm. Pattern Recognit.
**2003**, 36, 451–461. [Google Scholar] [CrossRef][Green Version] - Wu, Y.; Liu, S.; Wu, X.; Liu, Y.; Guan, Y. Burst detection in district metering areas using a data driven clustering algorithm. Water Res.
**2016**, 100, 28–37. [Google Scholar] [CrossRef] [PubMed] - Wang, J.; Sun, H. Optimal Algorithm of Pressure Measurement Node Layout in Water Distribution Network. J. Beijing Inst. Civ. Eng. Archit.
**2005**, 21, 51–54. [Google Scholar] - Dong, L.; Xue, H.; Zhang, W. Optimal layout method of water pressure monitoring points for water supply network based on fault diagnosis. J. Civ. Archit. Environ. Eng.
**2018**, 40, 53–61. [Google Scholar] - Farley, B.; Mounce, S.; Boxall, J. Field testing of an optimal sensor placement methodology for event detection in an urban water distribution network. Urban Water J.
**2010**, 7, 345–356. [Google Scholar] [CrossRef] - Xu, K.; Hu, W.; Leskovec, J.; Jegelka, S. How powerful are graph neural networks? arXiv
**2018**, arXiv:1810.00826. [Google Scholar] - Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; Philip, S.Y. A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst.
**2020**, 32, 4–24. [Google Scholar] [CrossRef] [PubMed][Green Version] - Bo, D.; Wang, X.; Shi, C.; Zhu, M.; Lu, E.; Cui, P. Structural deep clustering network. In Proceedings of the Web Conference, Taipei, Taiwan, 20–24 April 2020; pp. 1400–1410. [Google Scholar]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv
**2016**, arXiv:1609.02907. [Google Scholar] - Atwood, J.; Towsley, D. Diffusion-convolutional neural networks. In Proceedings of the Advances in Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; pp. 1993–2001. [Google Scholar]
- Wagner, J.M.; Shamir, U.; Marks, D.H. Water distribution reliability: Simulation methods. J. Water Resour. Plan. Manag.
**1988**, 114, 276–294. [Google Scholar] [CrossRef][Green Version] - Kittel, T.; Heitzig, J.; Webster, K.; Kurths, J. Timing of transients: Quantifying reaching times and transient behavior in complex systems. New J. Phys.
**2017**, 19, 83005. [Google Scholar] [CrossRef] - He, P.; Tao, T.; Xin, K.; Li, S.; Yan, H. Modelling Water Distribution Systems with Deficient Pressure: An Improved Iterative Methodology. Water Resour. Manag.
**2016**, 30, 593–606. [Google Scholar] [CrossRef] - Lambert, A. What do we know about pressure: Leakage relationships in distribution systems? In Proceedings of the IWA System Approach to Leakage Control and Water Distribution Systems Management, Brno, Czech Republic, 16–18 May 2001. [Google Scholar]

**Figure 1.**The framework of pressure sensor placement based on graph neural network clustering method.

**Figure 9.**Coverage rates of different sensor placement schemes. The abscissa of the chart represents the level of pipe burst, the ordinate represents the coverage rate, the red curve represents the proposed method, and the blue curve represents the K-means clustering method. (

**a**–

**c**) represent the coverage rates of different monitoring schemes at average flow, maximum flow and minimum flow, respectively.

**Figure 10.**Coverage rate of pressure sensors under different operating conditions. (

**a**–

**c**) represent the coverage rates at average flow, maximum flow and minimum flow, respectively.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Peng, S.; Cheng, J.; Wu, X.; Fang, X.; Wu, Q.
Pressure Sensor Placement in Water Supply Network Based on Graph Neural Network Clustering Method. *Water* **2022**, *14*, 150.
https://doi.org/10.3390/w14020150

**AMA Style**

Peng S, Cheng J, Wu X, Fang X, Wu Q.
Pressure Sensor Placement in Water Supply Network Based on Graph Neural Network Clustering Method. *Water*. 2022; 14(2):150.
https://doi.org/10.3390/w14020150

**Chicago/Turabian Style**

Peng, Sen, Jing Cheng, Xingqi Wu, Xu Fang, and Qing Wu.
2022. "Pressure Sensor Placement in Water Supply Network Based on Graph Neural Network Clustering Method" *Water* 14, no. 2: 150.
https://doi.org/10.3390/w14020150