A method for detecting burst pipes in water supply networks based on a simple lightweight neural network

By applying a simple and lightweight neural network in the water supply pipeline network, combining hydraulic simulation and frequency domain analysis, real-time monitoring data of the water supply pipeline network and perform abnormal detection, the problems of insufficient detection accuracy of the water supply pipeline network and false alarms in the existing technology are solved, and more efficient and accurate detection of the pipe burst is achieved.

CN117874667BActive Publication Date: 2025-03-14YANGTZE ECOLOGY & ENVIRONMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311614832.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-03-14
Estimated Expiration
2043-11-27

AI Technical Summary

Technical Problem

The prior art has problems of false alarms and insufficient detection accuracy in the detection of explosive pipes in the water supply pipeline network, especially the prediction-based methods are greatly affected by the prediction accuracy, resulting in inaccurate detection.

Method used

The water supply pipeline explosion detection method based on a simple and lightweight neural network is adopted. Real-time monitoring data is obtained through the historical monitoring data prediction of the water supply pipeline under normal working conditions, and the pipe explosion event is identified through abnormal detection. The method includes steps such as hydraulic simulation, feature selection, frequency domain analysis and neural network prediction.

Benefits of technology

It improves the accuracy and efficiency of explosive pipe detection, reduces false alarms, and significantly improves the accuracy of explosive pipe detection in the water supply pipeline network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117874667B_ABST
    Figure CN117874667B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting pipe bursts in a water supply network based on a simple lightweight neural network. Pipe bursts are very likely to occur in water supply networks, resulting in a large amount of water resource waste. Various data-driven methods have been widely used in pipe burst detection, especially prediction-based methods, but existing prediction-based methods occupy a lot of memory. To this end, the present invention proposes a method for detecting pipe bursts in a water supply network based on a simple lightweight neural network. The method uses historical monitoring data of the water supply network under normal working conditions to predict real-time monitoring data of the water supply network, and detects various pipe burst events by performing anomaly detection on the real-time monitoring data of the water supply network. In order to improve the accuracy and efficiency of pipe burst detection, the present invention uses the K-S test to screen the features of the training data and the test data, so as to find more stable features of the training data and the test data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of urban water supply pipe network burst detection, and particularly relates to a water supply pipe network burst detection method based on a simple lightweight neural network. Background Art

[0002] Pipe burst is a major form of water loss in the water supply system. Although it lasts for a short time, the amount of water loss is large. Pipe burst not only causes a large amount of water waste, but also causes the pressure of the pipe network to drop, affecting the normal water supply. In addition, after the pipe bursts, pollutants are easily invaded, thus affecting the quality of drinking water. Pipe burst detection methods can help water supply companies detect pipe bursts in time, so as to repair the pipe bursts and reduce the harm of pipe bursts.

[0003] Researchers have proposed various methods for pipe burst detection. Due to the extensive use of data acquisition and supervisory control (SCADA) systems, data-driven methods have been widely used. According to the detection principle, they can be divided into classification-based methods, prediction-based methods, and statistics-based methods. Classification-based methods use historical pipe burst data to train the model and then detect pipe bursts, but this method requires a large amount of historical pipe burst data. Prediction-based methods use normal monitoring data to train the model, and then use the model prediction value to detect whether the real-time monitoring data is abnormal. Statistics-based methods compare historical monitoring data with real-time monitoring data, and alarm if the real-time monitoring data exceeds the threshold. Considering that the prediction-based method is affected by the prediction accuracy, false alarms may occur. The statistics-based method only uses the existing data features to detect pipe bursts, omitting the prediction process and significantly improving the detection accuracy of pipe bursts. Various statistics-based methods have been widely used, such as detecting pipe bursts by using the similarity (or dissimilarity) between the flow monitoring data of multiple sensors in the water supply network. This method converts the flow monitoring data of different sensors into vectors, and uses the low similarity between the vector induced by pipe bursts and other normal vectors to identify pipe bursts. In addition, similarity-based methods eliminate the impact of non-stationary conditions (such as weather, festivals, and seasonal changes) on detection performance. Compared with the expensive price of flow sensors, pressure sensors are widely used in water supply networks. When a pipe bursts in a pipe network, it usually causes a sudden drop in pressure at each node of the pipe network. Therefore, most studies monitor pipe bursts based on abnormal values ​​in pressure monitoring values. Once the monitoring value of the pressure sensor is found to be significantly lower than the historical data of the same period, a pipe burst warning is issued. For example, interference extraction and independent forest integration techniques are used to extract pipe burst features from existing pressure monitoring data.

[0004] In summary, it is necessary to design a water supply pipe burst detection method based on a simple lightweight neural network to solve the above problems. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a water supply pipe burst detection method based on a simple lightweight neural network. The method uses historical monitoring data of the water supply pipe network under normal working conditions to predict real-time monitoring data of the water supply pipe network, and detects various pipe burst events by performing abnormal detection on the real-time monitoring data of the water supply pipe network.

[0006] To achieve the above design, the technical solution adopted by the present invention is: a water supply pipe burst detection method based on a simple lightweight neural network, comprising the following steps:

[0007] S1, hydraulic simulation of water supply network, to simulate and obtain the pressure monitoring data of the network under normal and abnormal conditions;

[0008] S2, using simple lightweight neural networks to build a burst detection and identification framework for water supply networks;

[0009] S3, prepare training data and determine the detection thresholds of each module of the burst pipe detection and identification framework;

[0010] S4, burst pipe detection and identification is performed using the proposed simple lightweight neural network burst pipe detection and identification framework.

[0011] Furthermore, the step S1 specifically includes:

[0012] Step S101, use EPANET to perform hydraulic simulation on the water supply network to obtain pressure monitoring data of each pressure monitoring point under normal working conditions of the water supply network, as shown in the following formula:

[0013] ;

[0014] In the formula, Indicates the pressure monitoring point under normal working conditions of the pipeline network On Day 0 Real-time pressure monitoring data, Indicates the pressure monitoring point under normal working conditions of the pipeline network In the sky Real-time pressure monitoring data.

[0015] Step S102, using EPANET to perform hydraulic simulation on the situation where each pipe in the pipe network bursts, and obtain the pressure monitoring data of each pressure monitoring point when the pipe network bursts, as shown in the following formula:

[0016] ;

[0017] In the formula, Represents the pipe network Pressure monitoring point after pipe burst exist Real-time pressure monitoring data.

[0018] Preferably, step S2 comprises:

[0019] S201, using KS test to perform feature selection on water supply network pressure monitoring data so that the training data can accurately represent the test data;

[0020] Furthermore, the burst detection accuracy of the burst detection method proposed in the present invention depends on the ability to model and predict the behavior of the water supply network system. Obviously, the pressure monitoring data must meet the following requirements, that is, the training data must represent the test data, specifically, the training data should contain all states and transitions between states that appear in the test data.

[0021] Existing pipe burst detection methods usually assume that the training and test data have the same probability distribution. However, in practice, due to uncertain factors such as seasonal changes or changes in the characteristics of the water supply network itself, the probability distributions of training and test data are usually different. In order to find more stable features so that the proposed method can detect pipe bursts with higher accuracy, the present invention uses the KS test) as a quantitative measure of the similarity between the probability distributions of training and test data. The KS test is non-parametric and is not based on any assumptions about the probability distribution of the tested data. Compared with other feature selection methods such as t-test, mean and standard deviation, the KS test is more sensitive to feature changes and is applicable to multimodal and non-normal distributions. Feature selection of pressure monitoring data aims to determine the stable features of training and test data in order to obtain better pipe burst detection performance.

[0022] S202, performing frequency domain and time domain transformation on the pressure monitoring data to obtain a frequency domain signal of the pressure monitoring data;

[0023] Furthermore, a large number of pressure sensors are arranged in the water supply network to collect pressure monitoring data of key nodes of the water supply network. These pressure monitoring data can accurately reflect the changes in the real-time operating status of the water supply network and timely detect abnormal working conditions of the water supply network, such as pipe bursts. The pressure monitoring data of the water supply network reflects the changing characteristics of the water supply network in the time domain. Although in most pipe burst detection methods, the pressure monitoring data is directly used for pipe burst detection, better results can be achieved by performing frequency domain analysis in signal processing. To this end, the present invention performs frequency domain analysis on the pressure monitoring data when performing pipe burst detection; frequency domain analysis has the following advantages: frequency domain analysis provides a more compact representation of the main signal components of the pressure monitoring data; it can detect rapid changes in the operating conditions of the water supply network, such as pipe bursts; slow attacks that usually evade time domain detection methods will stand out in frequency analysis, but fast attacks will be difficult to detect in the frequency domain.

[0024] S203, constructing a simple lightweight neural network, and using the historical monitoring data of each monitoring point in the pipeline network to predict and obtain the real-time monitoring data of the pipeline network;

[0025] Furthermore, the water supply network follows the same operating rules under normal operating conditions, and the pressure monitoring data at each pressure monitoring point presents the same change rule. Once the operating conditions of the water supply network change, such as a pipe burst, the real-time pressure monitoring data at each pressure monitoring point of the water supply network will change. Compared with the pressure monitoring data of the water supply network under normal operating conditions, these changed pressure monitoring data can be regarded as abnormal values. The data-driven pipe burst detection method detects pipe bursts through abnormal detection. Therefore, when performing pipe burst detection, it is necessary to use the historical monitoring data at each monitoring point to predict the real-time monitoring data of the water supply network under normal operating conditions. In order to improve computational efficiency, the present invention proposes a simple lightweight neural network for predicting water supply network pressure monitoring data.

[0026] Furthermore, in order to better predict the pressure monitoring data of the water supply network, the present invention constructs a simple lightweight neural network based on the variational autoencoder, and modifies the network structure of the variational autoencoder:

[0027] An optional corruption layer that applies Gaussian noise to the input sequence;

[0028] Adjust the fully connected layer with ReLU or tanh activation function to inflate the input; the purpose of this layer is to expand the hypothesis space;

[0029] Modify the encoding layer, which flattens the input and produces its compact representation using a fraction of the input size; in our experiments, using a compact representation of 50% of the input size achieved the best results;

[0030] A decoding layer that reconstructs the original sequence from its compact representation;

[0031] NN or PCA is used to predict the future values ​​of data features based on previous values ​​(in time or frequency domain); therefore, the network performs the following functions

[0032] ;

[0033] in and denote the input and output sequence lengths respectively, The present invention allows predicting any length of future sequences within a specified time range, for example, predicting 256 time steps starting from the fifth time step of the last input time.

[0034] S204, collecting real-time pressure monitoring data at each pressure monitoring point in the water supply network, and comparing it with the predicted pressure monitoring data at each monitoring point, and determining whether a pipe burst has occurred in the water supply network by performing anomaly detection on the real-time pressure monitoring data.

[0035] Preferably, step S3 comprises:

[0036] S301, preparing pressure monitoring data of each monitoring point under normal and abnormal working conditions of the pipeline network;

[0037] S302, preparing pressure monitoring data of each monitoring point under normal working conditions of the pipeline network, and using a simple lightweight neural network to predict and obtain predicted pressure monitoring data of each pressure monitoring point under normal working conditions of the pipeline network;

[0038] S303, comparing the predicted pressure monitoring data, the pressure monitoring data under normal working conditions of the pipeline network, and the pressure monitoring data under abnormal working conditions of the pipeline network to determine a pipe burst detection threshold;

[0039] S304, based on the maximum score method, the burst pipe detection performance of the proposed method is evaluated. The residual is normalized by dividing the residual by the maximum residual of each feature of the validation set data, and the maximum value of the normalized residual is compared with the threshold Make a comparison.

[0040] Preferably, step S4 comprises:

[0041] S401, using the proposed method to detect the normal working condition of the pipeline network and the situation where the pipeline network has burst, and obtain the detection results under various working conditions;

[0042] S402, evaluating the pipe burst detection performance of the proposed method according to the detection and identification results of various pipe burst events;

[0043] Preferably, in step S402, the evaluation mainly includes three aspects:

[0044] The burst detection delay time is the time from when the burst event occurs to when it is detected.

[0045] The pipe burst event detection rate is the ratio of the number of detected pipe burst events to the total number of pipe burst events;

[0046] The false alarm rate of pipe burst events is the ratio of the number of events when the pipeline network is in normal operating conditions to the total number of events that issue pipe burst alarms.

[0047] Preferably, step S201 includes:

[0048] S2011, using the pressure monitoring data of the water supply network under normal working conditions obtained by simulation, divided it into two groups: training data and test data, calculated the empirical cumulative distribution function of the training data and the test data, and used the maximum difference between the empirical cumulative distribution function of the training data and the test data to express the KS test statistic:

[0049] ;

[0050] In the formula, and is the empirical cumulative distribution function of the training and test data; the empirical cumulative distribution function can be calculated by the following formula:

[0051] ;

[0052] In the formula, ; Indicates i training data or test data, Indicates the maximum value of training data or test data;

[0053] S2012, the KS test was modified: when the mean of the distribution is slightly shifted on the x-axis, using the maximum value as the statistic makes the KS test very sensitive to small differences in the cumulative distribution function, which is used to obtain a concise measure for filtering features that are not suitable for modeling;

[0054] The KS test statistics of the training and test data are calculated using the area between the cumulative distribution functions of the training data and the test data to improve the robustness of the KS test. The formula is as follows:

[0055] ;

[0056] In the formula, Represents statistics of training data and test data.

[0057] Preferably, step S202 includes:

[0058] S2021, using a discrete fast Fourier transform to determine the dominant frequency of each signal, i.e., the frequency with the highest energy;

[0059] S2022, determining a short-time Fourier transform window based on the main frequency period, wherein the optimal window is between one and two periods of the main frequency;

[0060] S2023, converting the pressure monitoring data into a frequency representation;

[0061] Preferably, in step S2023, the method for converting the pressure monitoring data into frequency representation is:

[0062] The entire signal is divided into overlapping windows; a short-time Fourier transform is performed on each window; the entire short-time Fourier transform spectrum is binarized into multiple bins, and the total energy value of the signal in each bin is calculated; and at least one bin with the largest energy is selected, and the energy value represents the frequency domain characteristics of the corresponding time window.

[0063] Preferably, step S304 includes:

[0064] S3041, normalize the pressure residuals at each pressure monitoring point in the water supply network by dividing the residuals by the maximum residual of each feature in the validation set data, and compare the maximum value of the normalized residuals with the threshold For comparison:

[0065] ;

[0066] In the formula, represents the normalized value of the residual of the time series monitoring data, represents the residual of time series monitoring data, Represents the maximum residual of time series monitoring data;

[0067] S3042, determine the time of each pressure monitoring point in the water supply network Abnormal alarm :

[0068] To prevent false alarms of short-term deviations, the residual exceeds the threshold for at least a specified time window w; Abnormal alarm Determined by the following formula:

[0069] ;

[0070] S3043, determining the hyperparameter by setting the maximum acceptable false alarm rate of the verification data at each pressure monitoring point in the water supply network and :

[0071] ;

[0072] In the formula, and are the threshold and the window value normalized to the range of (0, 1), respectively. is a set of anomalies detected using a specific threshold and window value, is the maximum number of false alarms allowed in the validation data.

[0073] Preferably, in step S3043, the hyperparameter value does not generate more than the allowed number of false alarms while minimizing the sum of its normalized values.

[0074] The beneficial effects of the present invention are as follows:

[0075] The present invention uses historical monitoring data of the water supply network under normal working conditions to predict the real-time monitoring data of the water supply network, and discovers various pipe burst events by performing abnormal detection on the real-time monitoring data of the water supply network. In order to improve the accuracy and efficiency of pipe burst detection, the present invention uses the KS test to screen the features of the training data and the test data, so as to find more stable features of the training data and the test data. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a schematic diagram of a flow chart of the present invention;

[0077] Figure 2 A schematic diagram of the topological structure of the pipe network and the layout of monitoring points of the exemplary pipe network hydraulic model Net3 in the second embodiment of the present invention;

[0078] Figure 3 This is a schematic diagram of a simple lightweight neural network structure in Embodiment 2 of the present invention;

[0079] Figure 4 This is a time series curve diagram of pressure monitoring data in the second embodiment of the present invention; (a) in the figure shows the normal working condition of the pipe network; (b) shows the pipe network bursting;

[0080] Figure 5 This is a schematic diagram of pressure monitoring data prediction in Embodiment 2 of the present invention;

[0081] Figure 1 It is divided into four parts: hydraulic simulation of the water supply network to obtain the pressure monitoring data of the normal working conditions of the network and when a pipe burst occurs; a water supply network pipe burst detection and identification framework based on a simple lightweight neural network is proposed; training data is prepared to train the pipe burst detection and identification framework and determine the threshold of each module; and the trained pipe burst detection and identification framework is used to effectively detect and identify various working conditions of the network. DETAILED DESCRIPTION

[0082] Embodiment 1:

[0083] like Figure 1 In the present invention, a method for detecting burst pipes in a water supply network based on a simple lightweight neural network comprises the following steps:

[0084] S1, hydraulic simulation of water supply network, to simulate and obtain the network pressure monitoring data under normal and abnormal conditions;

[0085] S2, using simple lightweight neural networks to build a burst detection and identification framework for water supply networks;

[0086] S3, prepare training data and determine the detection thresholds of each module of the burst pipe detection and identification framework;

[0087] S4, burst pipe detection and identification is performed using the proposed simple lightweight neural network burst pipe detection and identification framework.

[0088] Furthermore, the step S1 specifically includes:

[0089] Step S101, use EPANET to perform hydraulic simulation on the water supply network to obtain pressure monitoring data of each pressure monitoring point under normal working conditions of the water supply network, as shown in the following formula:

[0090] ;

[0091] In the formula, Indicates the pressure monitoring point under normal working conditions of the pipeline network On Day 0 Real-time pressure monitoring data, Indicates the pressure monitoring point under normal working conditions of the pipeline network In the sky Real-time pressure monitoring data.

[0092] Step S102, using EPANET to perform hydraulic simulation on the situation where each pipe in the pipe network bursts, and obtain the pressure monitoring data of each pressure monitoring point when the pipe network bursts, as shown in the following formula:

[0093] ;

[0094] In the formula, Represents the pipe network Pressure monitoring point after pipe burst exist Real-time pressure monitoring data.

[0095] Preferably, step S2 comprises:

[0096] S201, using KS test to perform feature selection on water supply network pressure monitoring data so that the training data can accurately represent the test data;

[0097] Furthermore, the burst detection accuracy of the burst detection method proposed in the present invention depends on the ability to model and predict the behavior of the water supply network system. Obviously, the pressure monitoring data must meet the following requirements, that is, the training data must represent the test data, specifically, the training data should contain all states and transitions between states that appear in the test data.

[0098] Existing pipe burst detection methods usually assume that the training and test data have the same probability distribution. However, in practice, due to uncertain factors such as seasonal changes or changes in the characteristics of the water supply network itself, the probability distributions of training and test data are usually different. In order to find more stable features so that the proposed method can detect pipe bursts with higher accuracy, the present invention uses the KS test) as a quantitative measure of the similarity between the probability distributions of training and test data. The KS test is non-parametric and is not based on any assumptions about the probability distribution of the tested data. Compared with other feature selection methods such as t-test, mean and standard deviation, the KS test is more sensitive to feature changes and is applicable to multimodal and non-normal distributions. Feature selection of pressure monitoring data aims to determine the stable features of training and test data in order to obtain better pipe burst detection performance.

[0099] S202, performing frequency domain and time domain transformation on the pressure monitoring data to obtain a frequency domain signal of the pressure monitoring data;

[0100] Furthermore, a large number of pressure sensors are arranged in the water supply network to collect pressure monitoring data of key nodes of the water supply network. These pressure monitoring data can accurately reflect the changes in the real-time operating status of the water supply network and timely detect abnormal working conditions of the water supply network, such as pipe bursts. The pressure monitoring data of the water supply network reflects the changing characteristics of the water supply network in the time domain. Although in most pipe burst detection methods, the pressure monitoring data is directly used for pipe burst detection, better results can be achieved by performing frequency domain analysis in signal processing. To this end, the present invention performs frequency domain analysis on the pressure monitoring data when performing pipe burst detection; frequency domain analysis has the following advantages: frequency domain analysis provides a more compact representation of the main signal components of the pressure monitoring data; it can detect rapid changes in the operating conditions of the water supply network, such as pipe bursts; slow attacks that usually evade time domain detection methods will stand out in frequency analysis, but fast attacks will be difficult to detect in the frequency domain.

[0101] S203, constructing a simple lightweight neural network, and using the historical monitoring data of each monitoring point in the pipeline network to predict and obtain the real-time monitoring data of the pipeline network;

[0102] Furthermore, the water supply network follows the same operating rules under normal operating conditions, and the pressure monitoring data at each pressure monitoring point presents the same change rule. Once the operating conditions of the water supply network change, such as a pipe burst, the real-time pressure monitoring data at each pressure monitoring point of the water supply network will change. Compared with the pressure monitoring data of the water supply network under normal operating conditions, these changed pressure monitoring data can be regarded as abnormal values. The data-driven pipe burst detection method detects pipe bursts through abnormal detection. Therefore, when performing pipe burst detection, it is necessary to use the historical monitoring data at each monitoring point to predict the real-time monitoring data of the water supply network under normal operating conditions. In order to improve computational efficiency, the present invention proposes a simple lightweight neural network for predicting water supply network pressure monitoring data.

[0103] Furthermore, in order to better predict the pressure monitoring data of the water supply network, the present invention constructs a simple lightweight neural network based on the variational autoencoder, and modifies the network structure of the variational autoencoder:

[0104] An optional corruption layer that applies Gaussian noise to the input sequence;

[0105] Adjust the fully connected layer with ReLU or tanh activation function to inflate the input; the purpose of this layer is to expand the hypothesis space;

[0106] Modify the encoding layer, which flattens the input and produces its compact representation using a fraction of the input size; in our experiments, using a compact representation of 50% of the input size achieved the best results;

[0107] A decoding layer that reconstructs the original sequence from its compact representation;

[0108] NN or PCA is used to predict the future values ​​of data features based on previous values ​​(in time or frequency domain); therefore, the network performs the following functions

[0109] ;

[0110] in and denote the input and output sequence lengths respectively, The present invention allows predicting any length of future sequences within a specified time range, for example, predicting 256 time steps starting from the fifth time step of the last input time.

[0111] S204, collecting real-time pressure monitoring data at each pressure monitoring point in the water supply network, and comparing it with the predicted pressure monitoring data at each monitoring point, and determining whether a pipe burst has occurred in the water supply network by performing anomaly detection on the real-time pressure monitoring data.

[0112] Preferably, step S3 comprises:

[0113] S301, preparing pressure monitoring data of each monitoring point under normal and abnormal working conditions of the pipeline network;

[0114] S302, preparing pressure monitoring data of each monitoring point under normal working conditions of the pipeline network, and using a simple lightweight neural network to predict and obtain predicted pressure monitoring data of each pressure monitoring point under normal working conditions of the pipeline network;

[0115] S303, comparing the predicted pressure monitoring data, the pressure monitoring data under normal working conditions of the pipeline network, and the pressure monitoring data under abnormal working conditions of the pipeline network to determine a pipe burst detection threshold;

[0116] S304, based on the maximum score method, the burst pipe detection performance of the proposed method is evaluated. The residual is normalized by dividing the residual by the maximum residual of each feature of the validation set data, and the maximum value of the normalized residual is compared with the threshold Make a comparison.

[0117] Preferably, step S4 comprises:

[0118] S401, using the proposed method to detect the normal working condition of the pipeline network and the situation where the pipeline network has burst, and obtain the detection results under various working conditions;

[0119] S402, evaluating the pipe burst detection performance of the proposed method according to the detection and identification results of various pipe burst events;

[0120] Preferably, in step S402, the evaluation mainly includes three aspects:

[0121] The burst detection delay time is the time from when the burst event occurs to when it is detected.

[0122] The pipe burst event detection rate is the ratio of the number of detected pipe burst events to the total number of pipe burst events;

[0123] The false alarm rate of pipe burst events is the ratio of the number of events when the pipeline network is in normal operating conditions to the total number of events that issue pipe burst alarms.

[0124] Preferably, step S201 includes:

[0125] S2011, using the pressure monitoring data of the water supply network under normal working conditions obtained by simulation, divided it into two groups: training data and test data, calculated the empirical cumulative distribution function of the training data and the test data, and used the maximum difference between the empirical cumulative distribution function of the training data and the test data to express the KS test statistic:

[0126] ;

[0127] In the formula, and is the empirical cumulative distribution function of the training and test data; the empirical cumulative distribution function can be calculated by the following formula:

[0128] ;

[0129] In the formula, ; Indicates i training data or test data, Indicates the maximum value of training data or test data;

[0130] S2012, the KS test was modified: when the mean of the distribution is slightly shifted on the x-axis, using the maximum value as the statistic makes the KS test very sensitive to small differences in the cumulative distribution function, which is used to obtain a concise measure for filtering features that are not suitable for modeling;

[0131] The KS test statistics of the training and test data are calculated using the area between the cumulative distribution functions of the training data and the test data to improve the robustness of the KS test. The formula is as follows:

[0132] ;

[0133] In the formula, Represents statistics of training data and test data.

[0134] Preferably, step S202 includes:

[0135] S2021, using a discrete fast Fourier transform to determine the dominant frequency of each signal, i.e., the frequency with the highest energy;

[0136] S2022, determining a short-time Fourier transform window based on the main frequency period, wherein the optimal window is between one and two periods of the main frequency;

[0137] S2023, converting the pressure monitoring data into a frequency representation;

[0138] Preferably, in step S2023, the method for converting the pressure monitoring data into frequency representation is:

[0139] The entire signal is divided into overlapping windows; a short-time Fourier transform is performed on each window; the entire short-time Fourier transform spectrum is binarized into multiple bins, and the total energy value of the signal in each bin is calculated; and at least one bin with the largest energy is selected, and the energy value represents the frequency domain characteristics of the corresponding time window.

[0140] Preferably, step S304 includes:

[0141] S3041, normalize the pressure residuals at each pressure monitoring point in the water supply network by dividing the residuals by the maximum residual of each feature in the validation set data, and compare the maximum value of the normalized residuals with the threshold For comparison:

[0142] ;

[0143] In the formula, represents the normalized value of the residual of the time series monitoring data, represents the residual of time series monitoring data, Represents the maximum residual of time series monitoring data;

[0144] S3042, determine the time of each pressure monitoring point in the water supply network Abnormal alarm :

[0145] To prevent false alarms of short-term deviations, the residual exceeds the threshold for at least a specified time window w; Abnormal alarm Determined by the following formula:

[0146] ;

[0147] S3043, determining the hyperparameter by setting the maximum acceptable false alarm rate of the verification data at each pressure monitoring point in the water supply network and :

[0148] ;

[0149] In the formula, and are the threshold and the window value normalized to the range of (0, 1), respectively. is a set of anomalies detected using a specific threshold and window value, is the maximum number of false alarms allowed in the validation data.

[0150] Preferably, in step S3043, the hyperparameter value does not generate more than the allowed number of false alarms while minimizing the sum of its normalized values.

[0151] Embodiment 2:

[0152] In this embodiment, a water supply network network attack detection method based on a simple lightweight neural network includes the following steps:

[0153] Step (1), hydraulic simulation of the water supply network, simulating and obtaining the network pressure monitoring data under normal and abnormal working conditions of the water supply network; the step (1) specifically comprises:

[0154] Step (1.1), using the Net 3 pipe network model of the embodiment to perform hydraulic simulation, to obtain the pressure monitoring data time series at each pressure monitoring point of the Net 3 pipe network under normal working conditions.

[0155] like Figure 2~Figure 5 As shown, the present invention adopts the example pipe network model Net 3 as an embodiment. Assuming that three pressure monitoring points are arranged in the example pipe network model, namely monitoring point 169, monitoring point 204 and monitoring point 275, the pressure monitoring data of the pipe network under normal working conditions is simulated; therefore, the time series of pressure monitoring data at pressure monitoring points 169, 204 and 275 of the Net 3 pipe network under normal working conditions is derived;

[0156] Step (1.2), using EPANET to simulate the pipe burst of each pipe in the Net 3 pipe network, obtain the pressure data of each node of the Net 3 pipe network under various scenarios, and export the pressure data at nodes 169, 204 and 275 as pressure monitoring points 169, 204 and 275 as pressure monitoring data after the water supply pipe network bursts.

[0157] Step (2): Use a simple lightweight neural network to build a water supply network burst detection and identification framework, use the historical monitoring data of each monitoring point to predict the predicted monitoring data of each monitoring point in the network, and compare it with the real-time monitoring data of each monitoring point to detect whether there is a burst in the network. The specific implementation process of step (2) is as follows:

[0158] Step (2.1), obtain the pressure monitoring data of the three pressure monitoring points 169, 204 and 275, and use KS detection to select features of the pressure monitoring data. The pressure monitoring data at the three pressure monitoring points 169, 204 and 275 are divided into two parts: training data and test data, and the empirical cumulative distribution functions of the training data and the test data are calculated and used respectively. and Represented by. And the following formula is used to select the features of training data and test data:

[0159] ;

[0160] After the KS test, select the training data that can accurately reflect the regular changes in the characteristics of the test data.

[0161] Step (2.2), use frequency domain and time domain transformation to process the pressure monitoring data of the three pressure monitoring points 169, 204 and 275. Use discrete fast Fourier transform (DFFT) to determine the main frequency (frequency with the largest energy) of the pressure monitoring data of the three pressure monitoring points 169, 204 and 275, determine the window of short-time Fourier transform (STFT) based on the main frequency period, and convert the pressure monitoring data into its frequency representation, including: (a) dividing the entire signal into overlapping windows; (b) performing STFT on each window; (c) binarizing the entire STFT spectrum into multiple bins and calculating the total energy value of the signal in each bin; (d) selecting a small number of bins with the largest energy; the energy value will represent the frequency domain characteristics of the corresponding time window.

[0162] Step (2.3), using the proposed method to detect various working conditions of the pipeline network;

[0163] Step (3), using the example pipe network model Net 3 to simulate and obtain the pressure monitoring data of the three pressure monitoring points 169, 204 and 275 under normal working conditions and pipe burst conditions, and determine the thresholds of each detection module of the method proposed in the present invention; the specific implementation process of step (3) is as follows:

[0164] Step (3.1), prepare the pressure monitoring data of three pressure monitoring 169, 204 and 275 under normal working condition of the pipeline network and after the pipeline network bursts;

[0165] Step (3.2), prepare the pressure monitoring data of the three pressure monitoring points 169, 204 and 275 under normal working conditions of the pipeline network, and use a simple lightweight neural network to predict the predicted pressure monitoring data of the three pressure monitoring points under normal working conditions;

[0166] Step (3.3), comparing the predicted pressure monitoring data, the pressure monitoring data under normal working conditions of the pipeline network, and the pressure monitoring data under abnormal working conditions of the pipeline network to determine the pipe burst detection threshold;

[0167] Step (3.4), based on the maximum score method, the burst pipe detection performance of the proposed method is evaluated. The residual is normalized by dividing the residual by the maximum residual of each feature of the validation set data, and the maximum value of the normalized residual is compared with the threshold For comparison:

[0168] Step (4), considering the pipe burst and normal working conditions of the pipe network, the proposed method is used to detect various working conditions of the pipe network to determine the pipe burst detection performance of the method; the specific implementation process of step (4) is as follows:

[0169] Step (4.1), using the proposed method to detect the normal working condition of the pipeline network and the pipe burst situation of the pipeline network. First, the alarm conditions at the three pressure monitoring points 169, 204 and 275 are obtained, and then the alarm conditions of the three pressure monitoring points are combined to obtain the detection results under various working conditions;

[0170] Step (4.2), based on the burst detection and identification results of the three pressure monitoring points 169, 204 and 275, the detection performance of the proposed method is evaluated. It mainly includes three aspects: (a) burst detection delay time, that is, the time from the occurrence of the burst event to the detection of the burst event; (b) burst event detection rate, that is, the ratio of the number of detected burst events to the total number of burst events; (c) burst event false alarm rate, that is, the ratio of the number of events under normal working conditions of the pipeline network to the total number of burst alarm events.

Claims

1. A water supply pipe burst detection method based on a simple lightweight neural network, characterized in that: The following steps are involved: S1, hydraulic simulation of water supply network, to simulate and obtain the pressure monitoring data of the network under normal and abnormal conditions; S2, using a simple lightweight neural network to build a water supply network burst detection and identification framework, including: S201, using KS test to perform feature selection on water supply network pressure monitoring data so that the training data can accurately represent the test data; S202, performing frequency domain and time domain transformation on the pressure monitoring data to obtain a frequency domain signal of the pressure monitoring data; S203, constructing a simple lightweight neural network, and using the historical monitoring data of each monitoring point in the pipeline network to predict and obtain the real-time monitoring data of the pipeline network; S204, collecting real-time pressure monitoring data at each pressure monitoring point in the water supply network, and comparing it with the predicted pressure monitoring data at each monitoring point, and determining whether a pipe burst has occurred in the water supply network by performing anomaly detection on the real-time pressure monitoring data; S3, prepare training data and determine the detection thresholds of each module of the burst pipe detection and identification framework, including: S301, preparing pressure monitoring data of each monitoring point under normal and abnormal working conditions of the pipeline network; S302, preparing pressure monitoring data of each monitoring point under normal working conditions of the pipeline network, and using a simple lightweight neural network to predict and obtain predicted pressure monitoring data of each pressure monitoring point under normal working conditions of the pipeline network; S303, comparing the predicted pressure monitoring data, the pressure monitoring data under normal working conditions of the pipeline network, and the pressure monitoring data under abnormal working conditions of the pipeline network to determine a pipe burst detection threshold; S304, based on the maximum scoring method, the burst pipe detection performance of the proposed method is evaluated by dividing the residual by the maximum residual of each feature of the validation set data, normalizing the residual, and comparing the maximum value of the normalized residual with the threshold Make comparisons; S4, burst pipe detection and identification is performed using the proposed simple lightweight neural network burst pipe detection and identification framework.

2. According to claim 1, a water supply pipe burst detection method based on a simple lightweight neural network is characterized in that: The step S4 comprises: S401, using the proposed method to detect the normal working condition of the pipeline network and the situation where the pipeline network has burst, and obtain the detection results under various working conditions; S402, evaluating the pipe burst detection performance of the proposed method according to the detection and identification results of various pipe burst events.

3. According to claim 2, a method for detecting burst pipes in water supply networks based on a simple lightweight neural network is characterized in that: In step S402, the evaluation mainly includes three aspects: The burst detection delay time is the time from when the burst event occurs to when it is detected. The pipe burst event detection rate is the ratio of the number of detected pipe burst events to the total number of pipe burst events; The false alarm rate of pipe burst events is the ratio of the number of events when the pipeline network is in normal operating conditions to the total number of events that issue pipe burst alarms.

4. According to claim 1, a method for detecting burst pipes in a water supply network based on a simple lightweight neural network is characterized in that: The step S201 includes: S2011, using the pressure monitoring data of the water supply network under normal working conditions obtained by simulation, divided it into two groups: training data and test data, calculated the empirical cumulative distribution function of the training data and the test data, and used the maximum difference between the empirical cumulative distribution function of the training data and the test data to express the KS test statistic: ; In the formula, and is the empirical cumulative distribution function of the training and test data; the empirical cumulative distribution function can be calculated by the following formula: ; In the formula, ; Indicates i training data or test data, Indicates the maximum value of training data or test data; S2012, the KS test was modified: when the mean of the distribution is slightly shifted on the x-axis, using the maximum value as the statistic makes the KS test very sensitive to small differences in the cumulative distribution function, which is used to obtain a concise measure for filtering features that are not suitable for modeling; The KS test statistics of the training and test data are calculated using the area between the cumulative distribution functions of the training data and the test data to improve the robustness of the KS test. The formula is as follows: ; In the formula, Represents statistics of training data and test data.

5. According to claim 1, a method for detecting burst pipes in water supply networks based on a simple lightweight neural network is characterized in that: The step S202 includes: S2021, using a discrete fast Fourier transform to determine the dominant frequency of each signal, i.e., the frequency with the highest energy; S2022, determining a short-time Fourier transform window based on the main frequency period, wherein the optimal window is between one and two periods of the main frequency; S2023, convert the pressure monitoring data into frequency representation.

6. A method for detecting burst pipes in a water supply network based on a simple lightweight neural network according to claim 5, characterized in that: In step S2023, the method for converting the pressure monitoring data into frequency representation is: The entire signal is divided into overlapping windows; a short-time Fourier transform is performed on each window; the entire short-time Fourier transform spectrum is binarized into multiple bins, and the total energy value of the signal in each bin is calculated; and at least one bin with the largest energy is selected, and the energy value represents the frequency domain characteristics of the corresponding time window.

7. The method for detecting burst pipes in water supply networks based on a simple lightweight neural network according to claim 1, characterized in that: The step S304 includes: S3041, normalize the pressure residuals at each pressure monitoring point in the water supply network by dividing the residuals by the maximum residual of each feature in the validation set data, and compare the maximum value of the normalized residuals with the threshold For comparison: ; In the formula, represents the normalized value of the residual of the time series monitoring data, represents the residual of time series monitoring data, Represents the maximum residual of time series monitoring data; S3042, determine the time of each pressure monitoring point in the water supply network Abnormal alarm : To prevent false alarms of short-term deviations, the residual exceeds the threshold for at least a specified time window w; Abnormal alarm Determined by the following formula: ; S3043, determining the hyperparameter by setting the maximum acceptable false alarm rate of the verification data at each pressure monitoring point in the water supply network and : ; In the formula, and are the threshold and the window value normalized to the range of (0, 1), respectively. is a set of anomalies detected using a specific threshold and window value, is the maximum number of false alarms allowed in the validation data.

8. A water supply pipe burst detection method based on a simple lightweight neural network according to claim 7, characterized in that: In step S3043, the hyperparameter value will not generate more than the allowed number of false alarms, while minimizing the sum of its normalized values.

Citation Information

Patent Citations

  • Water supply network pipe burst detection and identification method based on unsupervised superposition integration

    CN117057150A