1. Introduction
Leakage is a typical abnormality in water distribution systems (WDS) and its severity varies depending on the volume, location, and condition of the system. Background leakage, which generally involves a small leakage volume and occurs at the pipeline connections, could also cause serious socio-economical damage over time, such as sinkholes and pressure deficiency. Leakage accidents can be defined in various forms, depending on the leakage volume and whether there is a report. Furthermore, leakage increases the operating costs of the system and adversely affects its efficiency. Additionally, WDSs have the potential for an inflow of contaminants due to leakage, which can directly impact the water quality. To prevent and detect leakage in WDSs, various methods are used, with a representative method being the implementation of maintenance programs based on regular monitoring.
The water distribution system monitors and controls the observation data of the facilities installed through efficient maintenance (e.g., pressure gauge, flow meter, and tank water level meter), using a supervisory control and data acquisition (SCADA) system. This enables the real-time monitoring of the prediction errors of the system characteristic values, such as pressure and flow, to detect abnormalities [
1] One of the methods for exploring leaks in the field is phase testing [
2]. Phase testing is a method in which the control valves installed in each section are closed one by one and the fluid changes within the isolated area are analyzed to identify leaks. However, as the valves are blocked step by step to detect the leaks in phase testing, there are many constraints in this technique, depending on the position of the valves, and the shape of the pipe network also becomes a big constraint for performing the test. Another field method utilizes a leakage sound detector with a listening stick, an electronic leakage detector, and a noise logger to locate the leakage in the pipeline accurately. Research has been conducted to specify the signals from leakages precisely [
3]. However, for leakage detection in the field, the availability and recognition of the leakage is prioritized and leakage identification by reporting is the main task. Leakage identification by reporting is defined as reported burst leakage, which accounts for a very low percentage of leakages.
The majority of leakage incidents are unreported burst leakages, which account for the largest leakage volume in terms of the duration after burst and maintenance time. In addition to monitoring and solutions for the field exploration of leakages, there are various ways to improve the system’s efficiency, such as pressure management strategies for the replacement of old pipelines, an improvement in the system’s elasticity, and the use of leak detection sensors. It is difficult to obtain accurate system state estimation information only through the real-time monitoring of the water distribution system, and the analysis and interpretation of measurement data are more important factors for improving it [
4]. In conclusion, for quick detection and identification after leakage, analyzing data in real time is effective for minimizing labor and leak detection time [
5]. Among them, the effect of using modeling on detecting and reducing the abnormal conditions in the water distribution system has been proven by Karadirek et al. [
6]
Among previous studies on leak detection through data analysis, Min et al. proposed a two-step model for detecting and locating leaks, and the methodology for each step specified the location of the leaks through K-mean clustering and trial and error optimization procedures [
7]. Mounce et al. detected an abnormality from long-term time-series data on flow and pressure, estimating and detecting the leakage using support vector regression as their detection method [
8]. Jung and Lansey used a Nonlinear Kalman Filter (NKF) to estimate the state of the system and detect leaks, in order to overcome the limitations of detection methods under consistent operating conditions [
9]. Nam et al. aimed to detect leaks through a monitoring and maintenance system in a comprehensive direction, determine the optimal sensor configuration, and isolate the location of the leaks, improving the operation of existing systems through multivariate statistical analysis techniques for flow and pressure data, which it intended to improve [
10]. Ahn et al. proposed a methodology for improving the overall leak detection rate by reducing the false alarm rate and average detection time through a hybrid SPC method, combining the WECO and CUSUM methods [
11]. Lee and Yoo [
12,
13] evaluated the leakage detection performance of the deep learning model by applying an RNN-LSTM-based leakage recognition model for South Korea leakage accidents, showing more than a 90% accuracy at all the points, except for the singular points. Wang et al. [
14] proposed a deep learning framework applicable to DMA and leakage management at the DMA level through an LSTM-based model. Fang et al. performed leakage detection with an accuracy of over 90% for single and multiple leakages by conducting this leakage detection through pressure data with a CNN model [
15]. Jung et al. [
16] quantitatively evaluated the degree to which the performance of the ANN model for leakage detection varies according to the degree of uncertainty of the input data.
This study proposes a leakage detection method that can accurately identify both the volume and location of leakage after its occurrence. To simulate leakage scenarios, an emitter function was used to simulate this leakage randomly within the water distribution system. We obtained the measurement data on the leakage through a hydraulic analysis program, which allowed us to accurately determine the existence or absence of leakage and its volume and location using a deep-learning-based model. The performance of the leakage detection model was evaluated through the benchmark network. Based on the results obtained from the benchmark network, the leakage detection model was applied to a domestic medium block network to evaluate its applicability to actual networks.
2. Configuration of Simulated Leakage Accident Scenario and Detection Technique
The methodology for performing the leakage detection, taking into account a simulated leakage accident scenario, is shown in
Figure 1. The training data were constructed by combining the normal data with random accident data to configure the simulated leakage accident scenario. The WDS for the simulated leakage accident scenario was applied to the benchmark network and a real-world network to perform the leakage detection.
Figure 1 shows the flowchart for the study of the leakage volume and location determination using a leakage detection model. A hydraulic analysis program was used to apply the simulated leakage accident scenario. The maximum leakage volume was applied to the demand of each node in the water distribution system and a hyperparameter tuning of the model was performed to train it. The results of using all the measurement data to configure the pressure data for the model training were analyzed in comparison with the results of performing leakage detection using a minimum number of meters.
2.1. Configuration of Simulated Leakage Accident Scenario
In order to build the data for the leakage detection, the hydraulic analysis results according to each time and system condition are essential. The normal condition data for the leak simulation and the accident data with the leakage were analyzed using EPANET 2.2 [
17]. Using the hydraulic analysis model of the water distribution system that was calibrated, the effect of the location and size of the pipe breakage accident that the operation manager wants to check can be simulated [
1]. The emitter of the EPANET 2.2 program was used to simulate random leakage. The emitter is a function that discharges the flowrate arbitrarily, and in this study, the leakage is simulated arbitrarily and used for a quantitative evaluation according to the leakage volume. The leakage volume at the node, according to the emitter coefficient, is expressed as follows:
where,
: leakage volume, : pressure, : emitter coefficient, and : emitter exponent (0.5).
In the method for simulating the leakage using an emitter coefficient, the emitter was applied to all the nodes to generate random leakages. Approximately one third of the node’s basic demand was assumed as the maximum leakage volume. For the γ in Equation (1), a value of 0.5, which is commonly used, was applied [
18]. K-water [
2] determined a burst leakage of 0.25 m
3/h or more at pressures above 50 m. For the leakage simulation, this study adopted a pressure-driven analysis (PDA) to perform the hydraulic analysis using the EPANET 2.2 program. The commonly used demand-driven analysis (DDA) can result in unrealistic hydraulic analysis problems, such as negative pressure, when interpreting an abnormal network situation such as pipe destruction and fire [
19].
2.2. Leakage Detection Model: Deep Neural Network
A leakage detection model was constructed using a deep neural network (DNN) [
20].
Figure 2 shows a schematic of this DNN. The DNN is suitable for nonlinear data predictions and its performance can be controlled by adjusting the numbers of hidden layers and neurons. However, the DNN has a high likelihood of overfitting. This problem is directly linked to the performance of the model, and a parameter adjustment and selection of the activation function are required to prevent this overfitting [
21]. For the activation function, the rectified linear unit (ReLU) was applied, which is expressed as follows:
The ReLU converges faster than other activation functions, such as Sigmoid and Tanh, and is efficient, owing to its simple operations. However, if the input value is negative when the ReLU function is applied, a dying ReLU phenomenon may occur where the slope is 0 and the weighting update does not take place. In addition, a gradient vanishing phenomenon may occur during training, in which the differentiated gradients become excessively large or disappear. He Initialization, a weight initialization method suitable for the ReLU function, was applied to correct this. It is easy to prevent overfitting when applying weight initialization, which can correct the dying ReLU phenomenon. For the convergence of the model, adaptive moment estimation (Adam) was used for the optimum function [
22]. Equations (3)–(6) for Adam are as follows:
where,
: momentum exponential moving average (EMA)
0.9,
: RMSProp exponential moving average (EMA)
0.999,
: correction values for preventing
and
from becoming zero during the early training,
: a small value for preventing the denominator from becoming zero
10
−8, and
: learning rate
0.1–0.0001.
Mean absolute error (MAE) was used for the error function to evaluate the model’s error. The MAE is expressed as Equation (7). Additionally, root mean squared error (RMSE) was used along with MAE for a reliable discussion of the model’s performance. The RMSE is expressed as Equation (8). MinMaxScaler normalization was applied for the configured normal and accident data, which is expressed as Equation (9).
To summarize, the DNN model to be used as the current leakage detection model applied ReLU as the activation function, MAE as the error function, and Adam as the optimum function. The input layer consisted of 200 neurons, which were then passed to the hidden layer, consisting of four layers. The hidden layer also consisted of 200 neurons, the same as the input layer, and the output layer had 2 neurons. A learning rate of 0.001 was applied in this study. Pressure data were used as the learning data to be applied to the input layer, and the learning data varied depending on the applied emitter coefficient. The hydraulic analysis results, which varied depending on the emitter coefficient and location of occurrence, could indicate the volume and location of the leakage. The learning data that passed through the hidden layers then represented the leakage location and leakage volume in the two neurons that existed in the output layer.
2.3. Performance Indices (PI)
The performance of the leakage detection model is directly linked to the detection of the leakage and a reduction in the ratio of false alarms [
23]. Multiple classification models were selected as evaluation metrics for evaluating the leakage and false alarm detection performances using the model. The multi-classification model consisted of four variables: true positive (
TP), false positive (
FP), true negative (
TN), and false negative (
FN). These values were used to calculate the
Precision and
Recall, and the performance of the model was evaluated using the F1 Score. Equation (10-12) and each variable are as follows:
The F1 Score represents the harmonic mean of the recall and precision.
Figure 3 is an example of this
F1
Score. In this study, which evaluated performance with randomly selected data, the leakage volume and location were imbalanced data that did not reflect a fixed number of leakage simulation scenarios. In this case, it is possible to evaluate the performance of the model in a more balanced way than the existing arithmetic mean. Thus, it is more appropriate to assess the performance of currently developed models.
3. Application and Results
The model was applied to both a benchmark network and a real-world network, and the results were analyzed in detail. For the benchmark network, the performance of the leakage detection model was evaluated according to the leakage scenario. The leakage detection result from the pressure data obtained from all the nodes was analyzed by comparing it with the leakage detection result from the data of 10 nodes, with a high standard deviation of the pressure.
Step 1-1. Perform the leakage detection using the pressure data from all the nodes and evaluate the result.
Step 1-2. Perform the leakage detection using the pressure data from 10 nodes with a high standard deviation of pressure and evaluate the result.
In the case of the real-world network, location-based clustering of the target network was carried out to solve the limitations of the conventional model, which finds the number of nodes because it is targeted at networks larger than a medium block. Then, the results were compared in two different cases.
Step 2-1. Determine the optimal number of clusters in the real-world network.
Step 2-2. Determine the minimum number of meters in each cluster and their locations.
The real-world network was divided by the optimal number of clusters and then the minimum number of meters and the location of the meters in each cluster were determined. Subsequently, the leakage detection was performed based on the hydraulic analysis data and the performance was evaluated.
3.1. Austin Network
A simulated leakage scenario was generated for the Austin network [
24], which was modified to assess the performance of the leakage detection model, and then the leakages were detected and evaluated. The corresponding networks were all calibrated; the morphology of the Austin network is shown in
Figure 4. The Austin network consisted of 67 nodes, one reservoir, 90 pipelines, and seven pumps. The average pressure used for the training data in the network was 124.9 m, the maximum pressure was 135.6 m, the minimum pressure was 108.5 m, and the standard deviation was 5.05. Using the pressure data from all the nodes, including 45 random leakage scenarios and 55 normal scenarios for the modified Austin network, the leakage occurrence, volume, and location were determined simultaneously. The leakage volume and location were determined simultaneously to evaluate the performance of the model using the pressure data from nine nodes with large standard deviations of pressure.
3.2. Real World Network
The leakage detection model was applied to a real medium block network in South Korea to evaluate its leakage detection performance. The target network is shown in
Figure 6. P-City had 587 nodes, 648 pipelines, and a single water source. The corresponding networks were all calibrated, the average pressure used as the training data in the network was 49.89 m, the maximum pressure was 71.27 m, the minimum pressure was 31.20 m, and the standard deviation was 6.65. For P-City, we applied the emitter for which a leakage volume was assumed for all the nodes to generate leakage scenarios and evaluated the performance of the leakage detection model through approximately 500 leakage scenarios.
3.2.1. Network Clustering
To perform leakage detection on a real network, clustering was performed using the coordinates of a large network. K-means clustering based on the positions (X and Y coordinates) was performed. K-means clustering is an unsupervised machine learning technique that classifies groups based on the similar characteristics of each object.
This technique must necessarily be provided with information about K, which means the pre-defined number of clusters, and the decision of the seeds and centers of the clusters tend to have a significant influence on the formation of these clusters, depending on the data type [
25]. To solve this, we determined the optimal parameter K and performed the clustering by comparing the sum squared error (SSE), which means the sum of squares of the distances between the nodes according to K.
Figure 7 shows an example of K-means clustering. In
Figure 7, the black dots mean scattered data, and the red and green dots present the divided data into two clusters using the K-mean clustering method.
3.2.2. Determination of the Optimal Number of Clusters in a Real-World Network
The selection of K, which means the number of clusters, is important for the proper application of K-means clustering. We compared the SSE, which denotes the sum of squares of the distances between the nodes, to select K. The lower the SSE, the greater the density could be in the post-clustered cluster.
Figure 8 shows a comparison of the SSE according to K.
Figure 8 shows a sharp decrease in the SSE as the number of clusters increased to approximately 9, but the SSE decreased relatively slowly after 10 clusters. Based on the results of
Figure 8, P-City was divided into nine clusters. The result of adopting K as nine for P-City’s K-means clustering performance is shown in
Figure 7. The emitter was also applied to the demand of the node within the network, with an interval of 0.05 to 0.45.
Figure 9 shows the shape of P-City where the clustering was carried out.
3.2.3. Leakage Detection after Clustering of the Real-World Network
After the clustering, the leakage simulation was performed using the developed model in P-City and the leakage detection was realized. The performance of the leakage detection model was evaluated based on accident data, which were obtained by randomly causing leakage accidents according to 529 scenarios with random leakage volumes (emitter) and leakage locations. The values were evaluated by an independent multi-classification model for independent performance assessments of the leakage volumes and locations.
Table 4 presents the evaluation of the leakage volume detection using a multi-classification model when the leakage detection was performed using all the pressure data.
Table 5 presents the evaluation using a multi-classification model for the leakage location detection using all the pressure data.
Table 6 and
Table 7 present the multi-classification of the leakage volume and location detection results as a confusion matrix.
The scale of the highest F1 Score indicating the efficiency of the leakage volume detection performance in
Table 4 is Lev. 1. Lev. 1 denotes an emitter of 0.05, which means the lowest leakage volume. The cluster that showed the highest performance in the leakage location detection was Clust. 1, which had 11 nodes. Furthermore, the cluster that showed the lowest performance was Clust. 5, which had 129 nodes with an F1 Score of 0.821. The results obtained from
Table 5 generally showed higher performances when the number of nodes in the cluster was smaller. The precision, recall, and F1 score through the macro average of the leakage volume detection were 0.930, 0.923, and 0.926, respectively. Furthermore, the precision, recall, and F1 score through the macro average of the leakage location detection were 0.903, 0.931, and 0.911, respectively. In conclusion, the leakage volume and location detection performance through the pressure data of all the nodes corresponded to the F1 scores of 0.926 and 0.911.
Table 6 and
Table 7 are confusion matrixes based on the data in
Table 4 and
Table 5. However, installing a meter in every node and obtaining data is highly difficult to implement in a real network, thus, it requires the identification of the installation locations of the meters and the number of meters for the minimum detection performance. To solve this problem, two to seven pressure gauges with large standard deviations were installed sequentially, which are the minimum numbers that can have a correlation, and the accuracy was compared.
3.2.4. Determination of the Optimal Number of Meters in Each Cluster in the Real-World Network
Table 8 lists the leakage detection performance for each number of meters based on the F1 scores. Subsequently, the F1 score of 0.8 was assumed to be the minimum accuracy and the minimum number of meters for each cluster was selected. However, Clust. 5 and Clust. 6 failed to show the minimum performance assumed. Therefore, we selected the number of meters that showed the highest performance after performing the leakage detection. The total number of meters determined thereafter was 30 and the leakage detection was carried out using meter data, according to the number of meters.
Table 9 and
Table 10 list the results of the evaluation of the leakage detection, using 30 pressure data for the leakage volumes and locations with a multi-classification model. In P-City, we installed meters on a total of 30 nodes to build normal and accident data, corresponding to approximately 5.1% of the 587 nodes, and conducted the detection using the leakage detection model. The leakage volumes with the lowest F1 scores in
Table 9 showed the lowest detection performance in Lev. 4. The highest detection performance was shown in “Lev. 1”, which denotes the smallest leakage volume. The detection performance for the total leakage volume achieved an F1 score of 0.924 and the precision and recall results were 0.925 and 0.923, respectively. The cluster with the highest detection performance in
Table 10 was Clust. 9 with 34 nodes and the cluster that had the lowest detection performance was Clust. 6 with 31 nodes. The detection performance at all the leakage locations achieved an F1 score of 0.858 and the precision and recall were 0.864 and 0.857, respectively. The pressure meters, which corresponded to 5.1% of all the nodes, could quantify the leakage volume and also detect the location successfully when a leakage occurred.
Table 11 and
Table 12 are confusion matrixes based on the data in
Table 9 and
Table 10.
Table 13 presents a performance comparison of the model by the number of pressure meters. This comparison was performed using the F1 scores, MAE, and RMSE. As for the leakage volume detection using all the pressure meters and the leakage volume detection results using 30 pressure data, a difference of about 0.005 was shown for the precision and 0.001 for the recall. Additionally, the F1 Scores showed a difference of 0.002. The MAE showed a difference of about 0.001. Additionally, the RMSE showed a difference of 0.04. The detection performance for the leakage location showed a difference of about 0.039 for the precision, about 0.074 for the recall, and 0.053 for the F1 Score. Additionally, the MAE showed a difference of about 0.031 and the RMSE showed a difference of 0.88. In conclusion, in all the indicators, it was confirmed that, as the number of pressure meters used for the leakage detection decreased, the performance of the leakage location, rather than the leakage volume, decreased. In the case of the RMSE, the error increased by about two times compared to the existing number, but with the currently determined number of pressure meters, could satisfy the minimum F1 Score of 0.8 for the leakage detection. When the same model is used, and a similar number of pressure meters installed in other areas, such as the DMA (District Metered Area) and PMA (Pressure Management Area), can show a similar performance to the current results when leakage detection is performed.
4. Conclusions
This study proposed a simulated leakage accident scenario configuration method for leakage detection and a technique to utilize the configured data for the leakage detection. The leakage detection was performed for an Austin network to evaluate the performance of the leakage detection model. When the leakage detection was performed using pressure data on all the nodes, the DP, which refers to the detected leakages among the entire leakages, was 99%, with a 1% probability of false alarms. The DP was also 99% when the leakage detection was performed using the pressure data of nine nodes with large standard deviations of pressure. To use the pressure data of all the nodes to determine the leakage volume accurately, the emitter forecast could accurately detect the numbers of nodes that occurred in 11 of the 45 leakage scenarios. When nine nodes were used for the detection, the leakage volume and location could be accurately detected for 10 and 32 scenarios, respectively, out of 45 scenarios. However, regarding the leakage location, the errors of the number of nodes were 0.26 and 0.58, respectively. Thus, it is expected that the hyperparameter optimization of the leakage detection model will display a higher performance.
To perform the leakage detection by applying the model to a real network, where the size of the network is relatively large, location-based clustering was performed using the network’s coordinates. We selected the number of clusters by comparing the sum of squares of the distances between the nodes according to the number of clusters, and then installed meters on a total of 30 nodes, corresponding to approximately 5.1% of all the nodes in the actual network, where clustering was carried out to build normal and accident data and conduct a detection with the leakage detection model. In this case, the leakage volume could be detected with precision, recall, MAE, RMSE, and an F1 score of 0.864, 0.857, 0.048, 0.219, and 0.858, respectively. A quantitative assessment of the leakage volume in the detected leakages was possible and the quantity and optimal installation location of the meters could also be selected for the performance of the leakage detection, taking into account the simulated leakage accident scenario. Through the developed model, it seems possible to detect the leakage locations with the leakage volume, using real-time data obtained from the network.
The aforementioned RNN-LSTM-based leakage recognition model showed more than a 90% accuracy at all points except for singular points, and the deep learning framework methodology for the DMA application also detected simulated leakages at 85.71%. The leakage detection was performed with over 90% accuracy for single and multiple leakages by conducting a leakage detection through pressure data with a CNN model. In the other literature, the accuracy was generally more than 85% when only the leak location and recognition were detected through the deep learning framework. However, a clear advantage of this study was that it showed F1 scores of 0.858 and 0.924, respectively, despite detecting leakage while detecting the location of the leakage. Additionally, this study is expected to be used as basic data in various fields, such as leakage recovery and restoration priorities, in that the leakage quantity can be quantitatively evaluated.
Currently, the real medium block network is divided into nine clusters and 3.3 pressure meters are installed for each cluster, showing high F1 scores, and a simultaneous exploration of the volume and location of leakages can be successfully performed. This shows that, when leak detection is performed after acquiring data by installing pressure meters in areas such as the DMA (District Metered Area) and PMA (Pressure Management Area), performances like those in the current results can be achieved. The leakage detection methodology proposed in this study is differentiated from the other literature by detecting the location of the leakage through a certain number of pressure meters and using the amount of leakage as an index for determining the quantitative scale of the leakage accident, which means it can be used as basic data in various fields, such as leakage recovery and restoration, considering the scale. However, since the pressure data currently used for the leakage detection within the network are based on a set amount of demand and a set physical factor, a leakage scenario is generated and utilized, so these data have uncertainty. There are various factors that can affect the performance, such as errors. Additionally, it is possible to compare the performances by applying various machine learning (e.g., the random forest regression, the model tree, and support vector machine) techniques, other than the currently used DNN model, so it is expected that this will be conducted in future studies.