Abstract

Currently, a total of 3.6 billion people live in water-deficient areas, and the population living in water-deficient areas may reach from 4.8 to 5.7 billion by 2050. Despite that, the water distribution system (WDS) loses an average of 35% of its water resources, and the leakage rates may reach even higher values in some regions. The dual pressures of the lack of water resources and severe WDS leakage become even more problematic considering that commonly used leakage detection methods are time-consuming, labour-intensive, and can only detect single-point leakages. For multiple leakage point detection, these methods often perform poorly. To solve the problem of multiple leakage point detection, this paper presents a method for multiple leakage point detection based on a convolutional neural network (CNN). A CNN can forecast the leakages from a macro-perspective. It extracts the features of the collected historical leakage data by constructing a CNN model and predicts whether the real-time data are leakage data or not based on the learning of the features that are extracted from the historical data. The experimental results show that the detection accuracies based on 21 sensors of one, two, and three leakage points are 99.63%, 98.58% and 95.25%, respectively. After the number of sensors is reduced to eight, the leakage detection accuracies of one, two, and three leakage points are 96.43%, 94.88% and 91.56%, respectively.

INTRODUCTION

According to the 2018 Water Resources Development Report issued by the United Nations, there are approximately 3.6 billion people living in water-deficient areas, and people living in water-deficient areas may reach 4.8–5.7 billion by 2050 (WWDR 2018). Statistics from the Asian Development Bank reported that an average of 35% of water resources was lost in the water distribution system (WDS), and it was even higher in some areas (Frauendorfer & Liemberger 2010).

At present, the means for detecting leakage from a water supply pipe network are still lacking (Zhang et al. 2017). Methods include the infrared thermal imager detection method, the leak detector inspection method, the tracer detection method and the acoustic detection method. Although these methods efficiently detect leakages, their shortcomings are also prominent. Notably, they are labour-intensive, and their accuracy and time consumption largely depend on user experience. If a long-term pipeline leakage is not discovered, the risk of contamination of the water in the pipeline by bacteria and contaminants will increase substantially; furthermore, it may cause local subsidence (Kang et al. 2018).

In recent years, studies on data mining and other technologies for WDS leakage detection have increased (Li & Cheng 2012). By using these methods, the accuracy of single-point leakage detection is already high, but multiple leakage point detection remains problematic (Kim 2018).

The research results of many scholars (Schwaller & van Zyl 2014; van Zyl 2014; Ghorbanian et al. 2017) have shown that the leakages from distribution systems are often considerably more sensitive to changes in the pressure. A good solution is to use the method that controls the leakage based on pressure management. Although few scholars have studied how leakage causes pressure changes in a WDS, it is common sense that a leakage can cause pressure changes in local areas of a pipe network. We can assess the pressure distribution in a pipeline network using the sensors that are distributed in different locations on the pipe network. At present, many studies (Lee et al. 2006) reviewing the pressure analysis for pipe network leakages have analysed each sensor signal separately instead of multiple sensor signals simultaneously. Is it possible to detect leakages by analysing changes in the pressure distribution of the pipe network? This paper proposes a leakage detection method that detects leakages by analysing changes in the pressure distribution of the pipe network. It is based on the convolutional neural network (CNN).

The CNN provides powerful feature extraction and good multiple classification capabilities. It is widely used in image recognition and natural language processing (Krizhevsky et al. 2012). This paper trains the CNN model by collecting the historical pressure data of a WDS in the non-leakage state and multiple leakage states. The powerful feature extraction and multiple classification capabilities of the CNN can predict whether the pipe network is leaking by extracting the real-time pipe network pressure data features. In this experiment, the detection accuracies of a single point, two points, and three points of leakage are 99.63%, 98.58%, and 95.25%, respectively, and the overall detection accuracy is 97.33%.

METHODS

The network architecture of a CNN usually includes a convolutional layer, a pooling layer, a dropout layer, a fully connected layer and a classifier at the top of the network. Generally, the operational steps of a CNN include the forward propagation operation and the error back propagation operation. Forward propagation extracts the features and conducts classification. However, the results of the feature extraction and classification will be inaccurate without training. To improve the feature extraction and classification abilities, the weights and biases of the neurons are updated using the gradient of the weight and the bias relative to the loss function, respectively. By continually adjusting the weights and biases of the neurons, the error of the network output is continually reduced, and the continual improvement of the feature extraction and classification abilities is achieved.

Convolution is an important feature extraction method. The convolutional layer extracts the features of the data. The mathematical formula is as follows: 
formula

denotes a convolutional operation; and denote the input and output of the th layer, respectively; denotes the weight matrix of the th convolutional kernel in the th layer; N denotes the number of convolutional kernels; denotes the bias of the th convolutional kernel.

Because the relationship between the input and output of the convolution layer neurons is not simply linear, an activation function that adds nonlinear factors is added to the neurons (Nair & Hinton 2010). The mathematical formula is as follows: 
formula

In contrast to the traditional activation functions such as the and functions, the function has the advantages of fast convergence and no disappearing gradient.

The Softmax classifier solves the multiple classification problem. If X represents the input data of the CNN model, K represents the number of categories in which these data need to be classified. The output of the Softmax classifier is the probability distribution that X belongs to each category. represents the probability that X belongs to each category, and satisfies the following formula: . The formula of the Softmax classifier function is as follows: 
formula
represents the number of classifications and the number of neurons in the Softmax classifier; denotes the input of the Softmax classifier and the output data of the fully connected layers.
The cross-entropy loss function determines the degree of proximity between the actual output and the expected output. The smaller the value of the cross-entropy loss function, the closer the actual output is to the desired output. Consequently, the CNN model is trained better. Compared with the use of the mean square error loss function as a loss function, the cross-entropy loss function can overcome the slowness problem that the efficiency of updating the weights of the mean square error loss function has. The mathematical formula of the cross-entropy loss function is as follows: 
formula

In the above formula, and ; a denotes the desired output; y denotes the actual output of the neuron; x denotes the data; n is the total number of samples; w denotes the weight matrix; b denotes the bias.

The gradient update algorithm is one of the essential algorithms in neural networks, and this is no exception in the CNN. The gradient update algorithm updates the weight and bias of each neuron according to their gradient relative to the cross entropy. The gradient update algorithm adjusts the weight and bias during the training process. The value of the loss function is continually reduced by iteratively adjusting the weight and bias during the training process so that the actual output is closer to the desired output. The weight and bias of the neuron update formulas are as follows: 
formula
 
formula
where and denote the weight matrix and bias, respectively, for the th training; denotes the learning rate; J denotes the value of the loss function.

EXPERIMENT

The experimental platform that simulates the WDS was built in the Anhui Province Key Laboratory of Intelligent Building and Building Energy Saving. The experimental platform covers an area of 200 m2, the length of the pipe section is 400 m, and the pipe diameter ranges from 30 cm to 50 cm. A total of 21 water pressure sensors are arranged. The topology of the experimental platform is shown in Figure 1.

Figure 1

Topological diagram of the experimental platform. Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/ws.2019.105.

Figure 1

Topological diagram of the experimental platform. Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/ws.2019.105.

Although the water demand of residents varies during different periods of every day, this change of water consumption is regular for a community or building (Xushi & Tengrui 2008). In the experiment, we simulate the change of water consumption of a community in different periods of the day by regularly adjusting the valve opening. The features of the change in pressure distribution of a pipe network which are caused by leakage or changes in user water consumption are different. The more these cases are included in the training subsets, the better the generalization ability of the trained CNN model.

As shown in Figure 1, blue points no. 1 and no. 2 correspond to the entrance of the water supply for residential areas, and they are used to simulate the water consumption behaviour of the residents in each time period by setting the discharge rate as 40–100% relative to the daily peak water demand. To simulate the behaviour of continuous and stable water consuming units, blue points no. 3 and no. 4 are set as the entrances for the continuous water supply. Red points no. 1–no. 7 represent the location of the valves that are used to simulate leakages. Green points no. 1–no. 21 correspond to the water pressure sensors that are used to collect the pressure data of the pipe network.

Experimental steps

The overview of the experimental steps is shown in Figure 2. The experimental steps are described as follows.

  • Step 1. The non-leakage, single-point leakage and multiple-point leakage data are collected, which contain a total of 13 types. Each piece of data is manually labelled and added to the data set, which is divided into a training subset and a testing subset.

  • Step 2. In this paper, several convolutional neural network models are constructed. The training subset and testing subset are normalized and fed to each CNN model for training. The model with the highest accuracy and the best generalization ability is selected as the CNN Model in our experiment. Finally, this CNN Model is saved for the validation experiment.

  • Step 3. After setting the training subset and testing subset, the verification subset is collected under the same conditions.

  • Step 4. The verification subset is normalized and fed into the CNN Model that is saved in Step 2 to obtain the experimental result.

Figure 2

Overview of the experiment.

Figure 2

Overview of the experiment.

Data collection and pre-processing

To simulate the leakage of the WDS, we set red points no. 1 to no. 7 as the leakage points. To simulate different levels of leakage, we regularly adjust the valve openings. We also take into account the regulations of China and expand the diversity of the leakage data. The amount of leakage at each point is set from 8% to 30%, and the floating frequency of the leakage change is 3% per minute. In this paper, the data set contains non-leakage data and four types of pipe network pressure data under the conditions of single-point leakages, two-point leakages, and three-point leakages. The types and locations of the leakages are summarized in Table 1.

Table 1

Types and locations of leakage points and their classification in the experiment

Leakage typePositionLabelCategory
Non-leakage – 0000 0000 0000 1 
Single-point leakage NO.1 0000 0000 0001 0 
NO.2 0000 0000 0010 0 
NO.4 0000 0000 0100 0 
NO.6 0000 0000 1000 0 
Two-point leakage NO.1 + NO.2 0000 0001 0000 0 
NO.1 + NO.6 0000 0010 0000 0 
NO.1 + NO.3 0000 0100 0000 0 
NO.2 + NO.6 0000 1000 0000 0 
Three-point leakage NO.1 + NO.2 + NO.5 0001 0000 0000 0 10 
NO.1 + NO.4 + NO.7 0010 0000 0000 0 11 
NO.1 + NO.3 + NO.6 0100 0000 0000 0 12 
NO.2 + NO.4 + NO.5 1000 0000 0000 0 13 
Leakage typePositionLabelCategory
Non-leakage – 0000 0000 0000 1 
Single-point leakage NO.1 0000 0000 0001 0 
NO.2 0000 0000 0010 0 
NO.4 0000 0000 0100 0 
NO.6 0000 0000 1000 0 
Two-point leakage NO.1 + NO.2 0000 0001 0000 0 
NO.1 + NO.6 0000 0010 0000 0 
NO.1 + NO.3 0000 0100 0000 0 
NO.2 + NO.6 0000 1000 0000 0 
Three-point leakage NO.1 + NO.2 + NO.5 0001 0000 0000 0 10 
NO.1 + NO.4 + NO.7 0010 0000 0000 0 11 
NO.1 + NO.3 + NO.6 0100 0000 0000 0 12 
NO.2 + NO.4 + NO.5 1000 0000 0000 0 13 

The brand of water pressure sensor is JOHNSON CONTROLS (P499ABS-401) and the data acquisition frequency is 5 minutes. According to the leakage types that are shown in Table 1, 3,000 data are left in each group after deleting the abnormal data. They are manually labelled. We randomly selected 1,500 data from each group and mixed and disrupted them to make the training subset. The testing subset is made by randomly selecting 500 data from the remaining 1,500 data in each type. To verify the generalization ability and practicability of the CNN model that is calibrated by the training subset, the data of the verification subset is collected at a distance of 2.5 m from the leakage points in Table 1.

In Table 1, ‘Leakage type’ divides the data into multiple types according to the number of leakage points. ‘Position’ means the position of the leakage points. ‘Label’ is an identification of an item of data and describes the category which the data belongs to. In this paper, the ‘Label’ uses a binary encoding. Because binary is not conducive to visually seeing the category which the data belongs to, ‘Category’ is used to facilitate understanding.

Data sampling

Like other artificial neural networks (May et al. 2008), the CNN needs training, testing, and validation subsets. The data set for the CNN must be divided into a training subset, a testing subset, and a validation subset. Their components and their roles in building CNN models are as follows.

  • Training subset. It includes 19,500 data and 19,500 labels. During training, the training subset is responsible for adjusting the parameters of the model.

  • Test subset. It includes 6,500 data and 6,500 labels. During training, it is used to evaluate the performance of the CNN model that is calibrated using the training subset.

  • Validation subset. It includes 6,500 data and 6,500 labels. After training, we need to evaluate the generalization ability and practicability of the trained CNN model using the verification subset.

Model selection

Because the structure of the CNN model significantly impacts the classification results, this paper develops six CNN models to perform comparative experiments. The structure and performance of the CNN models are shown in Table 2. Finally, the model that has the best performance is selected to test the verification subset in this paper.

Table 2

The configuration of the CNN models

Model 1Model 2Model 3Model 4Model 5Model 6
Structure Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1)
Covn3(64@1 × 4)
Pool3(1 × 1) 
Covn1(256@1 × 8)
Pool(1 × 1)
Dropout(0.2)
Covn2(128@1 × 6)
Pool2(1 × 1)
Dropout(0.2)
Covn3(64@1 × 5)
Pool3(1 × 1)
Dropout(0.2) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1)
Covn3(64@1 × 4)
Pool3(1 × 1)
Covn4(32@1 × 3)
Pool4(1 × 1) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Dropout(0.2)
Covn2(128@1 × 5)
Pool2(1 × 1)
Dropout(0.2)
Covn3(64@1 × 4)
Pool3(1 × 1)
Dropout(0.2)
Covn4(32@1 × 3)
Pool4(1 × 1)
Dropout(0.2) 
Covn1(360@1 × 7)
Pool1(1 × 1)
Dropout(0.2)
Covn2(256@1 × 5)
Pool2(1 × 1)
Dropout(0.2)
Covn3(128@1 × 4)
Pool3(1 × 1)
Dropout(0.2)
Covn4(64@1 × 3)
Pool4(1 × 1)
Dropout(0.2) 
ACC 90.29% 92.38% 95.54% 96.86% 97.70% 95.25% 
Time 26.4 min 33.5 min 45.5 min 48.52 min 50.5 min 130.4 min 
Model 1Model 2Model 3Model 4Model 5Model 6
Structure Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1)
Covn3(64@1 × 4)
Pool3(1 × 1) 
Covn1(256@1 × 8)
Pool(1 × 1)
Dropout(0.2)
Covn2(128@1 × 6)
Pool2(1 × 1)
Dropout(0.2)
Covn3(64@1 × 5)
Pool3(1 × 1)
Dropout(0.2) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Covn2(128@1 × 5)
Pool2(1 × 1)
Covn3(64@1 × 4)
Pool3(1 × 1)
Covn4(32@1 × 3)
Pool4(1 × 1) 
Covn1(256@1 × 7)
Pool1(1 × 1)
Dropout(0.2)
Covn2(128@1 × 5)
Pool2(1 × 1)
Dropout(0.2)
Covn3(64@1 × 4)
Pool3(1 × 1)
Dropout(0.2)
Covn4(32@1 × 3)
Pool4(1 × 1)
Dropout(0.2) 
Covn1(360@1 × 7)
Pool1(1 × 1)
Dropout(0.2)
Covn2(256@1 × 5)
Pool2(1 × 1)
Dropout(0.2)
Covn3(128@1 × 4)
Pool3(1 × 1)
Dropout(0.2)
Covn4(64@1 × 3)
Pool4(1 × 1)
Dropout(0.2) 
ACC 90.29% 92.38% 95.54% 96.86% 97.70% 95.25% 
Time 26.4 min 33.5 min 45.5 min 48.52 min 50.5 min 130.4 min 

By comparing Model 1 and Model 2, Table 2 reveals that the deep neural network structure significantly improves the test accuracy. Model 2 adds a convolutional layer and pooling layer on the basis of Model 1. Although the training time increases by 7 minutes, the test accuracy increases by 2.09%.

By comparing the experimental results of Model 2, Model 3, Model 4, and Model 5, we notice that the generalization ability of the network model improves and the test accuracy increases by increasing the dropout layer. However, when we compare the experimental results of Model 5 and Model 6, the result shows that Model 6 increases the convolutional kernel size on the basis of Model 5 at the expense of increasing the training time and decreasing the test accuracy. Finally, Model 5 is adopted as the CNN Model in this paper. It is possible to improve the accuracy by continually changing the parameters such as the number of convolutional kernels and the size of convolutional kernels, but that is not the focus of this paper.

Performance of the CNN Model during training and testing

The two diagrams in Figure 3 are the loss function curves and model accuracy rate curves generated during Model 5's training, respectively.

Figure 3

Performance of the CNN Model during training and testing: (a) loss function curves; (b) the model accuracy rate curves during training.

Figure 3

Performance of the CNN Model during training and testing: (a) loss function curves; (b) the model accuracy rate curves during training.

Experimental result

In this paper, the data of the verification subset are sequentially arranged according to the categories in Table 1. Each item of data in the verification subset is normalized and then input into the CNN Model for verification. The error distribution diagram of the verification results is shown in Figure 4.

Figure 4

The error distribution diagram of the verification results. Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/ws.2019.105.

Figure 4

The error distribution diagram of the verification results. Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/ws.2019.105.

As shown in Figure 4, the abscissa represents the amount of verification data and the ordinate denotes the category of the validation data. The blue points (*) represent the category to which the CNN Model predicts that the data belong and the red line represents the category to which the data actually belong. If the blue point coincides with the red line, it indicates that the result that is predicted by the CNN Model is accurate. Otherwise, it unsuccessfully predicts if the data belong. Figure 4 shows that although the prediction accuracy decreases as the number of leakage points increases, most blue points (*) still coincide with the red line. The prediction accuracy rate of the three-point leakage data with the worst performance is still higher than 95%.

Through multiple verification experiments, the obtained results are presented in Table 3. The detection accuracy rates of the CNN Model for one, two, and three points of leakage are 99.63%, 98.58%, and 95.25% respectively, and the detection accuracy rate of the overall validation subset is 97.33%. The average verification time per item of data is 0.003 s.

Table 3

Detection accuracies of the CNN Model based on 21 sensors for different types of leakage

Leakage typeSingle-pointTwo-pointThree-pointTotal
Accuracy 99.63% 98.58% 95.25% 97.33% 
Leakage typeSingle-pointTwo-pointThree-pointTotal
Accuracy 99.63% 98.58% 95.25% 97.33% 

As we know, the greater the number of sensors, the more comprehensive the understanding of the situation of the pressure distribution of the pipe network, and the higher the detection accuracy. In this paper, a sensor optimization placement method based on the Optics algorithm (Xie et al. 2019) is applied to optimize the number of sensors in the pipe network. Only eight sensors (No. 1, No. 2, No. 5, No. 7, No. 10, No. 12, No. 15, and No. 19) are left after the optimization experiment, but the detection accuracy of the CNN Model for leakages is not lower. Table 4 shows the detection accuracy of the CNN Model based on the eight sensors.

Table 4

Detection accuracies of the CNN Model based on eight sensors for different types of leakage

Leakage typeSingle-pointTwo-pointThree-pointTotal
Accuracy 96.43% 94.88% 91.56% 92.11% 
Leakage typeSingle-pointTwo-pointThree-pointTotal
Accuracy 96.43% 94.88% 91.56% 92.11% 

CONCLUSION

This paper presents a method for multiple leakage point detection in a WDS based on a CNN. Here, we collect the entire network's transient pressure data, and analyse the operational status of the entire pipe network from a macro-perspective by extracting the features of the entire network transient pressure of the WDS. The CNN model can predict whether the network is leaking by analysing real-time data. This method can greatly decrease the time and labour consumption for finding leakage points, and effectively reduce the total amount of leakage.

Through several experiments, this paper obtains higher detection accuracy each time. Therefore, we provide evidence that the method effectively solves the problem of multiple leakage point detection. How to apply this method to a large urban water supply pipe network is the next research direction following this paper.

For water supply managers, when the historical data (including leakage data and non-leakage data) of the WDS is lacking, it is feasible to build an accurate hydraulic model (by Epanet 2.0) to obtain data. Meanwhile, much open source software (Caffe; TensorFlow) provides convenient means for us to build deep neural networks (including CNN).

ACKNOWLEDGEMENTS

This work is supported by the following two funds: National Key Research and Development Project of China No. 2017YFC0704100 (entitled New Generation Intelligent Building Platform Techniques), Foundation of Anhui Jianzhu University No. JZ192012.

REFERENCES

REFERENCES
Frauendorfer
R.
Liemberger
R.
2010
The Issues and Challenges of Reducing Non-Revenue Water
.
Asian Development Bank, Mandaluyong City, Philippines.
Kang
J.
Park
Y. J.
Lee
J.
Wang
S. H.
Eom
D. S.
2018
Novel leakage detection by ensemble CNN-SVM and graph-based localization in water distribution systems
.
IEEE Transactions on Industrial Electronics
65
(
5
),
4279
4289
.
Krizhevsky
A.
Sutskever
I.
Hinton
G. E.
2012
ImageNet classification with deep convolutional neural networks
. In:
Proceedings of the 25th International Conference on Neural Information Processing Systems, Volume 1
(F. Pereira, C. J. C. Burges, L. Bottou & K. Q. Weinberger, eds), Curran Associates, USA, pp.
1097
1105
.
Lee
P. J.
Lambert
M. F.
Simpson
A. R.
Vitovský
J. P.
Liggett
J.
2006
Experimental verification of the frequency response method for pipeline leak detection
.
Journal of Hydraulic Research
44
(
5
),
693
707
.
Li
G.
Cheng
X.
2012
Research status and scientific thinking of big data
.
Bulletin of the Chinese Academy of Sciences
27
(
6
),
647
657
.
May
R. J.
Dandy
G. C.
Maier
H. R.
Nixon
J. B.
2008
Application of partial mutual information variable selection to ANN forecasting of water quality in water distribution systems
.
Environmental Modelling & Software
23
(
10–11
),
1289
1299
.
Nair
V.
Hinton
G. E.
2010
Rectified linear units improve restricted Boltzmann machines
. In:
Proceedings of the 27th International Conference on Machine Learning
(J. Fürnkranz & T. Joachims, eds), IMLS, pp.
807
814
.
WWDR
2018
Nature-Based Solutions for Water. UN World Water Development Report 2018, UNESCO, Paris, France. http://www.unwater.org/publications/world-water-development-report-2018/ (accessed 19 March 2018)
.
Xie
C. L.
Fang
Q. S.
Zhang
H. Y.
Zhang
J. X.
2019
Optimal layout of pressure monitoring points in water supply network based on Optics
.
E3S Web of Conferences
79
,
01015
.
Xushi
Y.
Tengrui
L.
2008
Water Supply and Drainage Network System
, 2nd edn.
China Architecture & Building Press
,
Beijing
,
China
, pp.
4
7
.
Zhang
Z.
Zhang
M.
Xie
C.
Zhang
Z.
Fang
Q.
2017
Research on leakage location of secondary water distribution networks
.
Journal of University of Science and Technology of China
47
(
4
),
336
341
.