Method and system for positioning leakage of pressure pipe network
By setting up disturbance valves and pressure monitoring devices in the pressure pipe network, constructing a transient flow hydraulic model and using the ANN model to identify leakage points, the problem in the existing technology that it is difficult to identify small flow leakage in complex pipe networks is solved, and a high level of efficiency is achieved. Accurate and flexible leak detection.
Patent Information
- Application Number
- CN202410638582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-06
AI Technical Summary
Existing technology is difficult to quickly identify and locate small flow leaks in pressure pipe networks, especially in pipe networks with complex topology. Moreover, existing methods rely on a large number of monitoring points and long-term data, and have limited identification capabilities.
By setting disturbance valves and pressure monitoring devices on the pipeline network, a transient flow hydraulic model of the pipeline network is constructed. Fourier transform and artificial neural network (ANN) combined with genetic algorithms are used to identify and locate leakage points, and the phase of the pressure wave function is used As features, reduce the number of monitoring points and rely on long-term data.
It achieves the accurate identification and positioning of small flow leaks in complex pipe networks, improves the accuracy of leak identification and the flexibility of detection, reduces the number of monitoring points and long-term data dependence, and improves the reliability of detection results. .
Smart Images

Figure CN118607136A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of pressure transmission and distribution pipeline network engineering, and specifically relates to a method and system for locating leakage of a pressure pipeline network. Background Art
[0002] As the infrastructure of modern urban construction, pressure pipe networks are responsible for the transmission and distribution of industrial production and urban water supply. Due to reasons such as aging pipes, environmental deterioration, and poor management, pipe network leakage has long existed, which not only wastes precious water resources, but also affects the normal production and life of society in serious cases. Controlling pipe network leakage is related to the company's loss reduction and efficiency improvement, and it is also an important task for pipe network operation and maintenance. Unlike pipe bursts, pipe network leakage often has a small flow rate, and the disturbance caused has little impact on the pipe network. Whether using flow monitoring or pressure monitoring in a short period of time, it is difficult to quickly identify and locate it, resulting in long-term leakage. At present, there is no universal and mature leakage detection technology.
[0003] From the perspective of working principle, the current technology of monitoring and analyzing leakage through instruments can be roughly divided into the following three aspects:
[0004] (1) Water balance based on independent area metering (DMA): Establish DMA areas, and use flow meters (water meters) to monitor whether the water volume is balanced to determine leakage. The leakage range can also be roughly determined based on the area under the jurisdiction of the flow meter. However, it is objectively difficult to establish a complete DMA system for complex pipeline systems or old pipeline networks.
[0005] (2) Leakage identification based on pressure monitoring: Leakage is mainly determined based on abnormal fluctuations in the pressure value at the monitoring point. The pressure difference between the monitoring target in leakage and non-leakage conditions is used to determine whether a leakage has occurred; or an algorithm is used to identify abnormal values of the detected pressure wave to determine whether a leakage exists. The former requires an accurate hydraulic model and a large number of high-precision pressure sensors with high acquisition frequency. The latter can only detect leakage with a large flow rate, i.e., pipe burst, by identifying abnormal values through an algorithm.
[0006] (3) Algorithm analysis based on monitoring data: Use monitoring data to separate leakage features. In recent years, there have been some methods for identifying leakage pressure signals based on machine learning algorithms (such as ANN, isolation forest, ICA and KRR, attention mechanism and LSTM, etc.) or weighted positioning of multiple signals. It mainly uses the disturbance data of the pressure value of the monitoring point to perform statistical learning or pattern recognition of a specific pipeline network. Such algorithms are either highly dependent on long-term monitoring data or can only identify larger pipeline leakage (bursts). Moreover, with the complexity of the topological structure and water use conditions of large-scale pipeline networks, the generalization ability of models based on data statistics is weakened, and the uncertainty of pattern recognition still exists.
[0007] The existing technology, whether based on the steady flow or transient flow in the leakage, is limited to using the pressure value of the monitoring data as the leakage feature. Since the leakage of the pipeline network accounts for a very small ratio of the pipeline flow (for example, <5%), the transmission of the pressure wave is affected by the resistance along the pipeline network and attenuated, and the reflected pressure difference value of the comparison between the non-leakage and leakage conditions based on transient disturbances is very small. Even if the time domain pressure value is Fourier transformed to obtain the frequency response function, the difference between the complete leakage signal and only the reflected wave signal or only the leakage damping signal is very weak. Chinese patent 201811393693.X discloses a method for detecting burst pipes in a water supply network based on pressure disturbance extraction. When identifying burst pipes, although the high-frequency feature of the burst pressure wave signal is used, the high-frequency pressure function related to the burst pipe feature is separated by Fourier transform, and the separated pressure function is inversely Fourier transformed to obtain the time domain pressure function of the burst pipe reflection wave, and then the abnormal value is identified by the algorithm to complete the identification of the burst pipe. This method cannot identify leakage with a small flow rate. This is because the pressure of the pipeline network in reality is the superposition value of the harmonics of each disturbance source. Since the pressure wave is affected by various damping when propagating in the actual pipeline, the pressure amplitude will be attenuated. The flow rate of leakage is greatly reduced compared to the burst pipe, and it does not have significant transient flow characteristics. Even if the pressure wave generated by the sudden leakage in the pipeline network can be monitored, its pressure value will be attenuated due to the damping of the pipeline. In addition, the pressure wave transmission process is also affected by other factors such as normal water use or diversion, which produces pressure noise. These pressure interference signals and the pressure generated by the leakage with a small flow rate become difficult to distinguish after the amplitude is attenuated during transmission. Therefore, the pressure amplitude of the feedback harmonic of the leakage point is used as the leakage feature, and the recognition ability is relatively low. In summary, it is currently difficult to identify and locate leakage conveniently and flexibly through a small number of monitoring point flow sensors or pressure sensors without relying on the stable flow data of the pipeline network. Summary of the invention
[0008] One object of the present invention is to address the deficiencies of the prior art and provide a method for locating leakage in a pressure pipe network, which method can accurately identify and locate leakage even for small flow rates and pipe networks with complex topological structures.
[0009] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0010] A method for locating leakage in a pressure pipe network comprises the following steps:
[0011] Step 1, setting disturbance valves and pressure monitoring devices at a certain distance on the pipeline network to be tested;
[0012] Step 2: construct a transient flow hydraulic model of the pipeline network based on the topological structure of the pipeline network to be detected and the basic information of the pipeline, and calibrate the pipeline network information parameters of the constructed transient flow pipeline network hydraulic model according to the measured pressure and flow of the pipeline network to obtain a transient flow hydraulic model that is consistent with the actual pipeline network topological structure and damping parameters;
[0013] Step 3, randomly generate various leakage conditions that may occur in actual pipe network operation, use the pipe network transient flow hydraulic model obtained in step 2 to perform numerical simulation on the pressure of the monitoring point set for each leakage condition, and obtain the pressure change data of the monitoring point under each leakage condition over time;
[0014] Step 4: Perform Fourier transform on the pressure variation data of each leakage condition monitoring point obtained in step 3, and obtain the phase spectrum of the pressure wave function including the leakage point under each leakage condition;
[0015] Step 5, constructing an artificial neural network model ANN for leakage detection, using the phase spectrum of the pressure wave function obtained in step 4 as a training sample to train the ANN model and using a genetic algorithm GA to optimize its structure to obtain a trained ANN model;
[0016] Step 6: When detecting leakage, operate the disturbance valve opening to disturb the pipeline to be detected, and collect pressure data of the monitoring point through the pressure monitoring device. The phase spectrum of the pressure wave function of the initial segment of the disturbance in the frequency domain is obtained by Fourier transforming the pressure data of the monitoring point, and is input into the ANN model obtained in step 5 as the detection sample feature data to predict whether there is leakage in the pipeline to be detected and the leakage location.
[0017] Furthermore, the distance between the disturbance valve and the pressure monitoring device in step 1 is set to:
[0018] L ≥ c·a / f
[0019] Where: L is the distance between the pressure monitoring point and the disturbance valve, a is the wave speed, f is the sampling frequency of the pressure monitoring setting, and c is the empirical value.
[0020] Furthermore, in step 2, the topological structure of the pipe network and basic information including pipe section length, pipe diameter, resistance coefficient, wave velocity, elevation, valve and monitoring node location are input into the model building software to construct a transient flow hydraulic model of the pipe network to be tested.
[0021] Furthermore, in step 3, for each leakage condition, at least one leakage point is set in the detection network, and the network nodes are marked according to whether there is leakage. The transient flow hydraulic model of the network obtained in step 2 is used to simulate the disturbance process of the disturbance valve, and the pressure change data of the monitoring point over time is obtained.
[0022] Furthermore, according to the impact of the operating disturbance valve on the pressure in the pipeline, the opening change that does not affect the safe operation of the pipeline network and the disturbance intensity can be monitored by the monitoring point is selected, and the simulated pressure change data over time at the monitoring point at the initial stage of the valve disturbance is selected as the training sample, and the time period must cover the time period required for the pressure feedback signal of the farthest leakage point that the monitoring point can receive.
[0023] Furthermore, during the simulation, the number of training samples is increased by changing the pipe network pressure, outflow flow rate, and leakage location.
[0024] Furthermore, in step 4, the discrete Fourier transform DFT method is performed on the pressure value p(n) of the pressure monitoring point of the random leakage condition that changes with time:
[0025] For a time-domain pressure sequence p(n) of length N, its discrete Fourier transform DFT P(k) is defined as:
[0026]
[0027] Where: P(k) is the pressure wave function, k is the frequency index, k = 0, 1, 2, ..., N-1; n is the time sampling sequence index, n = 1, 2, ..., N; j is the imaginary unit, e is the base of the natural logarithm, The fundamental frequency is The periodic complex exponential function of ; the complex form of P(k), expressed in amplitude and phase form:
[0028] P(k)=A(k)·e jφ(k)
[0029] Where: A(k) is the amplitude of the kth frequency component, φ(k) is the phase of the kth frequency component;
[0030] A(k) is calculated modulo P(k):
[0031] A(k)=|P(k)|
[0032] φ(k) is obtained by phase calculation of P(k):
[0033] φ(k)=∠P(k).
[0034] Furthermore, in step 5, during training, the phase spectrum of the pressure wave function of the training sample is input into the ANN model, and the genetic algorithm GA first randomly generates a batch of ANN model individuals according to the given value range of the number of neurons in each layer of the ANN, and calls this batch of ANN models for calculation, retains the ANN model individuals with higher accuracy, and cross-combines and adjusts the number of neurons in each layer to obtain a batch of new ANN model individuals. The above process is repeated during the training process until the target accuracy is reached, and the optimal ANN model result is output.
[0035] Another object of the present invention is to provide a system for implementing the above-mentioned method for locating leakage in a pressure pipe network, comprising:
[0036] The transient flow hydraulic model construction module of the pipe network is used to construct the transient flow hydraulic model of the pipe network according to the pipe network topology and basic pipeline information, and calibrate the parameters of the pipe network hydraulic model according to the measured pressure and flow data during the operation of the pipe network, so as to obtain a transient flow hydraulic model that is consistent with the actual pipe network topology and damping parameters;
[0037] The training data generation module is used to randomly generate various leakage conditions that may occur in the actual operation of the pipeline network, and use the pipeline network transient flow hydraulic model to numerically simulate the pressure of the monitoring point set for each leakage condition to obtain the pressure change data of the monitoring point under each leakage condition over time;
[0038] A data processing module is used to perform Fourier transform on the pressure variation data of each leakage condition monitoring point over time to obtain the phase spectrum of the pressure wave function including the leakage point under each leakage condition;
[0039] An ANN model building module is used to build an artificial neural network model ANN, and use the phase spectrum of the pressure wave function obtained by the data processing module as a training sample to train the ANN model and use the genetic algorithm GA to optimize its structure to obtain the trained ANN model;
[0040] The leakage data acquisition module acquires the pressure change data of the monitoring point collected by the pressure monitoring device over time when the opening of the disturbance valve set on the pipeline network to be detected is used to disturb the pipeline network to be detected;
[0041] The leakage detection module is used to input the pressure change data of the monitoring point obtained by the leakage data acquisition module into the data processing module for Fourier transform to obtain the pressure harmonic phase spectrum in the frequency domain at the initial stage of the disturbance, and input it as the detection sample feature data into the ANN model trained by the ANN model construction module to predict whether there is leakage and the leakage location in the pipeline network to be detected.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] (1) In view of the fact that the prior art generally uses the pressure value of the monitoring point containing leakage information as the leakage feature, regardless of whether Fourier transformation is performed (p(n) before the transformation and P(k) after the transformation), for leakage with a small leakage flow, since the pressure wave is damped and attenuated in the actual pipeline propagation, the pressure wave signal directly separated from the leakage point will be very weak and difficult to identify. It has a high recognition rate only in identifying larger leakage (burst pipe) or pipe networks with simple topological structures. Therefore, the present invention proposes to use the phase φ(k) of the pressure wave function P(k) as the leakage feature. This feature is only related to the pressure wave propagation speed and propagation distance, and is not affected by the friction damping of the pipe network system or other pipe pressure noise signals. Even if the leakage flow is small and the pressure wave amplitude A(k) is small, it will not affect the phase φ(k), so the leakage can still be identified. Especially for pipe networks with complex topological structures and complex leakage conditions (various leakage flows, multiple leakages), as long as the wave velocity is not affected and the distance between the monitoring point and the leakage point is determined, this method can avoid the influence of other conventional factors on the leakage pressure characteristics and improve the versatility of the model; the present invention identifies and locates leakage by analyzing the phase spectrum (φ(k), k=0~N-1) of the pipe network pressure wave function, and the accuracy of leakage identification is higher. Its signal accuracy depends on the acquisition frequency of the pressure sensor at the monitoring point, and the positioning accuracy depends on the density of potential leakage points set by the hydraulic model, that is, both can be controlled according to engineering needs. Further, the genetic algorithm is used to optimize the ANN structure and the artificial neural network ANN is fully trained with a large sample, and its accuracy will be further improved.
[0044] (2) In actual projects, due to the hidden nature of leakage, it is generally impossible to know when a pipeline leakage occurs, or even whether a leakage occurs. For this reason, the present invention generates a disturbance signal of controllable intensity through the active opening and closing of the valve, so that the feedback pressure of the leakage point in the initial period of the disturbance is strengthened and easier to identify, and only a small number of pressure monitoring points are required to collect the pressure fluctuations in the early stage of the disturbance. Except for a small amount of measured operating data (water volume, water pressure) required for verification when timing the transient flow hydraulic model of the pipeline network, there is no need to collect pipeline operation data for a long time for leakage detection. This not only greatly reduces the dependence on the number of pipeline monitoring points and long-term monitoring data, but also greatly improves the reliability of leakage detection results and the feasibility of detection methods, and the detection methods are more flexible and rapid;
[0045] (3) The samples required for training are obtained through numerical simulation of the transient flow hydraulic model of the pipeline network. The leakage conditions can be freely set according to the actual project. The training samples are not restricted by the actual monitoring data. The data quality is high and the data samples are controllable, thus providing a sufficient number of samples for the training of the ANN model, thereby improving the accuracy of the ANN model simulation and easily obtaining the leakage detection effect expected by the project.
[0046] (4) Using artificial neural network (ANN) algorithm to build a model and genetic algorithm to optimize the ANN structure can easily and efficiently train a model that matches the complexity of the leakage detection network and improve the accuracy of ANN model prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flow chart of a method for locating leakage in a pressure pipe network provided by an embodiment of the present invention;
[0048] Figure 2 This is a principle diagram of pipeline network leakage identification based on valve disturbance pressure wave phase according to an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the structure of an ANN model for leakage phase training based on transient flow according to an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram of the pipe network topology structure of Example 1 of the present invention;
[0051] Figure 5 This is a schematic diagram of the change of valve V opening and monitoring point P1 monitoring pressure over time in the initial stage of valve V disturbance in Example 1 of the present invention;
[0052] Figure 6 is the phase spectrum of the pressure wave function at the monitoring point in Example 1 of the present invention;
[0053] Figure 7 This is a structural diagram of the ANN model after optimization by genetic algorithm GA in Example 1 of the present invention;
[0054] Figure 8 This is a schematic diagram of the pipe network topology structure of Example 2 of the present invention;
[0055] Fig. 9 This is a schematic diagram of the change of valve V opening and monitoring point P1 monitoring pressure over time in the initial stage of valve V disturbance in Example 2 of the present invention;
[0056] Fig.10 This is the structure diagram of the ANN model after optimization by genetic algorithm GA in Example 2 of the present invention. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present invention will be described clearly and completely below in combination with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0059] The present invention will be further described below in conjunction with specific embodiments, but they are not intended to be limiting of the present invention.
[0060] In view of the fact that the existing technology directly uses pressure signals or pressure amplitude information to identify leakage, there is a problem of low recognition accuracy, such as Figure 1 As shown, an embodiment of the present invention provides a method for locating leakage in a pressure pipe network, comprising the following steps:
[0061] Step 1, setting disturbance valves and pressure monitoring devices at a certain distance on the detection pipe network;
[0062] In this step, a disturbance valve may be arranged at the starting point of the pipeline of the pipe network system, and then at least one pressure monitoring sensor may be arranged on the pipeline at a certain distance from the disturbance valve, wherein the distance between the pressure monitoring sensor and the disturbance valve may be determined by formula (1):
[0063] L ≥ c·a / f (1)
[0064] Where: L is the distance between the pressure monitoring point and the disturbance valve (such as Figure 2 ), m; a is the wave speed, m / s; f is the pressure sensor sampling frequency, c is an empirical value, generally 1.5 to 2.5. Such a distance setting can ensure that the pressure monitoring sensor has enough time to collect the pressure information of the monitoring point.
[0065] Step 2: construct a transient flow hydraulic model of the pipeline network based on the topological structure of the pipeline network to be detected and the basic information of the pipeline, and calibrate the pipeline network information parameters of the constructed transient flow pipeline network hydraulic model according to the measured pressure and flow of the pipeline network to obtain a transient flow hydraulic model that is consistent with the actual pipeline network topological structure and damping parameters;
[0066] In this step, the PIPENET software is used to construct a transient flow hydraulic model of the pipe network. When constructing the transient flow hydraulic model of the pipe network, the pipe network is selected as the research object, and the pipe network topology structure, as well as the length, diameter, resistance coefficient, wave velocity, elevation, valve and monitoring node location and other basic information of the pipe segment are input into the PIPENET software, and the input end of the pipe network system is set as the pressure boundary, and the output end is set as the flow outlet.
[0067] After the construction is completed, the parameters of the transient flow hydraulic model of the pipe network are calibrated according to the measured pressure information of the monitored pipe network under the special case of stable flow operation and the corresponding flow information in the pipeline, so that the pipe network topology structure and damping parameters simulated by the calibrated transient flow hydraulic model of the pipe network are consistent with the real pipe network. The calibrated transient flow hydraulic model of the pipe network can simulate the disturbance process of the disturbance valve, so that the simulated pressure data is close to the pressure data generated by the disturbance of the disturbance valve.
[0068] Step 3, randomly generate various leakage conditions that may occur in actual pipe network operation, use the pipe network transient flow hydraulic model obtained in step 1 to perform numerical simulation on the pressure of the monitoring point set for each leakage condition, and obtain the pressure data of the monitoring point under each leakage condition;
[0069] In this step, for the pipe network system, in order to reasonably analyze the pressure fluctuation characteristics under the leakage condition, in this embodiment, one leakage point is set on each pipeline (of course, 2, 3 or more can also be set in other embodiments), and at least one monitoring node is set in the pipe network system. All pipeline nodes are randomly leaked, and sufficient training samples are obtained by changing the pipe network pressure, outflow flow rate and leakage position. For example, α pipe network pressures, β output flows, and γ node numbers are set, and a total of m (=α×β) groups of different water use conditions and l (=α×β×γ) groups of leakage conditions are obtained. Potential leakage nodes of the pipe network are marked, and "1" is leakage and "0" is no leakage.
[0070] The transient flow hydraulic model of the pipe network obtained in step 2 is used to simulate the pressure of the disturbance valve disturbance process for l groups of different leakage conditions to obtain the pressure data of the monitoring point. Then, according to the influence of the operation of the disturbance valve on the pressure in the pipeline, the opening change that does not affect the safety of the pipe network operation and the disturbance intensity can be monitored by the monitoring point is selected. Based on this, the simulated pressure change data of the monitoring point at the initial stage of the valve disturbance over time is selected as the training sample, and its time needs to cover the time period required for the pressure feedback signal of the farthest leakage point that the monitoring point can receive. In this step, enough training samples can be obtained through the digital simulation of the transient flow hydraulic model of the pipe network, thereby overcoming the problem of insufficient samples in reality.
[0071] Step 4: Perform Fourier transform on the pressure data of each leakage condition monitoring point obtained in step 3 to obtain a phase spectrum of the pressure wave function including the leakage point under each leakage condition;
[0072] In this step, the pressure value p(n) of the monitoring point of the training sample obtained under each leakage condition that changes with time is subjected to discrete Fourier transform (DFT) to obtain the leakage point response information P(k). The basic formula is:
[0073] For a time-domain pressure sequence p(n) of length N, its DFT P(k) is defined as:
[0074]
[0075] Where: P(k) is the pressure wave function, k is the frequency index, k = 0, 1, 2, ..., N-1; n is the time sampling sequence index, n = 1, 2, ..., N; j is the imaginary unit, e is the base of the natural logarithm, The fundamental frequency is The complex form of P(k) can be expressed in amplitude and phase form:
[0076] P(k)=A(k)·e jφ(k) (3)
[0077] Where: A(k) is the amplitude of the kth frequency component, φ(k) is the phase of the kth frequency component.
[0078] A(k) is calculated modulo P(k):
[0079] A(k)=|P(k)| (4)
[0080] φ(k) is obtained by phase calculation of P(k):
[0081] φ(k)=∠P(k) (5)
[0082] The phase φ(k) of the complex variable function P(k) in the frequency domain has the physical meaning of the phase of the reflected pressure wave generated by the leakage point detected by the pressure monitoring point to the valve disturbance. This phase is only related to the distance between the monitoring point and the leakage point, and has nothing to do with factors such as the propagation path damping and pipeline flow. The phase of the pressure wave function will not attenuate during the propagation process and will not be affected by other external pressure noises. It has nothing to do with the magnitude of the pressure. Therefore, the phase of the pressure wave function containing the leakage point is used as the leakage feature, which is only related to the pressure wave propagation distance, so the leakage can be located more accurately.
[0083] Step 5, constructing an artificial neural network model ANN for leakage detection, using the phase spectrum of the pressure wave function obtained in step 4 as a training sample to train the ANN model and using a genetic algorithm GA to optimize its structure to obtain a trained ANN model;
[0084] like Figure 2 As shown in the figure, an artificial neural network model ANN for leakage detection is constructed, which includes an input layer, a hidden layer, and an output layer. The phase spectrum obtained after Fourier transform of the time domain pressure data is used as the input of the neural network model, and whether the pipeline network is leaking and the leakage location are used as the output.
[0085] The phase spectra of multiple groups of pressure wave functions under different leakage conditions obtained in step 3 and step 4 and their corresponding leakage positions are used as training samples, and the training samples are randomly divided into training set, validation set and test set. The training set is input into the ANN model for training. During the training process, the genetic algorithm (GA) is used to optimize the structure of the artificial neural network (ANN): the optimization target is the leakage detection accuracy of the ANN model, and the optimization parameters are the number of ANN layers and the number of neurons in each layer; during the optimization process, GA first randomly generates a batch of initial parameters according to the given parameter value interval, and calls the ANN model for calculation, retains the parameters with higher accuracy, and cross-combines and adjusts the number of neurons in each layer to obtain a batch of new ANN model individuals. The above process is repeated during the training process until the target accuracy is achieved, and the optimal ANN model result is output. The optimized ANN model is used as a pre-training model, and the validation set is used to verify the leakage condition. When the prediction accuracy meets the engineering detection index, the test set is further used for testing to evaluate the generalization ability of the constructed ANN model, and the ANN model with the best generalization ability is selected for final use in pipeline network leakage detection.
[0086] Step 6: When detecting leakage, operate the disturbance valve opening to disturb the pipeline to be detected, and collect pressure data of the monitoring point through the pressure monitoring device. The phase spectrum of the pressure wave function of the initial segment of the disturbance in the frequency domain is obtained by Fourier transforming the pressure data of the monitoring point, and is input into the ANN model obtained in step 5 as the detection sample feature data to predict whether there is leakage in the pipeline to be detected and the leakage location.
[0087] The present invention will be further described below in conjunction with specific examples.
[0088] Example 1:
[0089] The specific implementation process is described as follows:
[0090] 1. Pipeline network modeling and valve disturbance program setting
[0091] Example 1 is an actual water supply area with flat terrain. It is modeled in the transient flow software as follows: Figure 4 , including 127 pipelines, 87 water-using buildings, a total length of 6200m, and a distance from the valve to the farthest node of 3000m. The terrain of the area is flat. In the figure, R1 and R2 are the water sources of the pipe network, and V is the disturbance signal that the valve can generate (such as Figure 5 ); P1 and P2 are pressure monitoring points. All nodes can randomly generate leakage. The location of the pressure monitoring point can be determined by formula (1).
[0092] Transient disturbances are generated by changing the valve opening. The valve disturbance program should ensure that effective pressure fluctuations can be generated while ensuring that there is no risk of water hammer caused by negative pressure and excessive pressure in the system. That is, leakage detection data collection is carried out under the premise of meeting the safe operation of the pipeline network. After calculation and comparison, a three-stage disturbance program can generally be used, such as Figure 4 That is, from 0s to 4s, the opening τ is linearly changed from τ=1 to τ=0.1, from 4s to 6s, the opening τ is kept at 0.1, and from 6s to 10s, the opening τ is changed from τ=0.1 to τ=1.
[0093] 2. Generation of random sample data
[0094] like Figure 4 In the branch network model shown in the figure, 80 potential leakage nodes are set in the whole area, and the required leakage samples can be generated according to different water use conditions. The sampling frequency of the pressure sensor is set to 50Hz, and the maximum cycle of the pressure signal feedback within the monitoring leakage range is 6s. Assuming that there is a leakage at one node in the whole network every time, the random leakage samples generated are shown in Table 1. i , (i=1,2…m) are different water use conditions, m is the water use condition number, φ(k) m,γ , (k=1,2,…512) is the phase spectrum of the pressure wave function at the monitoring point when the γth node leaks.
[0095] Table 1 Example 1 Random leakage condition settings
[0096]
[0097] Data processing of pressure monitoring points: After calculation, after the valve is disturbed, the longest feedback period of the pressure signal within the monitoring leakage range is 6s. In the simulation calculation, the pressure sampling data is taken at 50Hz. The sample data can select the initial pressure value of the disturbance greater than 6s. Discrete Fourier transform (DFT) is performed to obtain the phase spectrum of all pressure wave functions under the leakage condition, and the position label of the leakage point ("1" indicates leakage, "0" indicates no leakage) forms a leakage training sample. The training samples of all randomly generated leakage points are collected in Table 2. The φ l,k (l=1,2,…,k=1,2,…512) is the phase spectrum of the pressure wave function of the monitoring point under the leakage condition l, and the training samples are obtained. The phase spectrum of the pressure wave function of each sample is as follows: Figure 6 shown.
[0098] Table 2 Labeling of missing training samples of Example 1
[0099]
[0100] 3. Optimization and training of ANN model structure
[0101] The number of neurons in the input layer of the neural network model is 512, and the output is 80 potential leakage point parameters; the initial model structure is set to 2 hidden layers, the number of neurons is 500 and 120 respectively, the activation function is PReLU, and the differential evolution genetic algorithm is used to optimize the model structure. The optimal number of neurons in the hidden layer of Example 1 is 490 and 150 (such as Figure 7 ). The rest of the settings of the neural network model are: the learning rate is 0.001; the training samples are divided into training set, validation set and test set in the ratio of 80%, 10% and 10%, and the batch size is 20.
[0102] It should be noted that the neural network model structure is different for pipe networks with different topological structures, so it needs to be adjusted according to the characteristics of the actual pipe network to achieve a higher detection accuracy. The training set is used to train the ANN model, the validation set is used to validate the trained ANN model, and the test set is used to evaluate the generalization of the ANN model.
[0103] 4. Leakage identification and location
[0104] When the model reaches a satisfactory accuracy, it can be applied to leakage identification and location of the pipeline network. The ANN model obtained after evaluation is applied to leakage detection of the pipeline network. When the leakage training sample capacity is 800, Example 1 ( Figure 4 )'s P1 and P2 monitoring points were both 75% accurate; when the sample size increased to 8000, the P1 monitoring point accuracy was 85%, and P2 was 84%; after the genetic algorithm continued to optimize the ANN structure, the P1 monitoring point accuracy reached 88%, and P2 reached 85%.
[0105] Example 2:
[0106] 1. Pipeline network modeling and valve disturbance program setting
[0107] Example 2 is an actual water supply area with undulating terrain, which is modeled in the transient flow software as follows: Figure 8 , including 136 water-using buildings, with a total length of 15,000 m, and a distance of 6,000 m from the valve to the farthest node. R1, R2, and R3 are the water sources of the pipe network; V is the disturbance gate, and P1 and P2 are pressure monitoring points. 125 potential leakage points are set in the whole area, and all nodes generate leakage randomly. The position of the pressure monitoring point at the starting point can be determined by formula (1).
[0108] Transient disturbances are generated by changing the valve opening. The valve disturbance program should ensure that effective pressure fluctuations can be generated while ensuring that there is no risk of water hammer caused by negative pressure and excessive pressure in the system. That is, leakage detection data collection is carried out under the premise of meeting the safe operation of the pipeline network. After calculation and comparison, a three-stage disturbance program is adopted, such as Fig. 9That is, from 0s to 4s, the opening τ is linearly changed from τ=1 to τ=0.1, from 4s to 6s, the opening τ is kept at 0.1, and from 6s to 10s, the opening τ is changed from τ=0.1 to τ=1.
[0109] 2. Generation of random sample data
[0110] like Figure 8 In the branch pipe network model shown in the figure, 125 potential leakage nodes are set in the whole area. The model can generate the required leakage samples according to different water use conditions. The sampling frequency of the pressure sensor is set to 50Hz, and the maximum period of pressure signal feedback within the monitoring leakage range is 12s. The leakage samples randomly generated are shown in Table 3. For each leakage condition, the pressure monitoring data at the initial stage of the disturbance (greater than 12s), the input of the neural network model, and the number of the leakage node are taken as labels ("1" indicates leakage, "0" indicates no leakage) to form a training sample. The training samples of single-point leakage and two-point leakage are shown in Tables 4 and 5, respectively, where the symbols in Tables 3, 4, and 5 have the same meanings as Tables 1 and 2).
[0111] Table 3 Leakage condition settings for Example 2
[0112]
[0113] Table 4 Training sample labels for setting one leakage point for each leakage condition in Example 2
[0114]
[0115] Table 5 Training sample labels for setting two leakage points for each leakage condition in Example 2
[0116]
[0117] 3. Optimization and training of ANN model structure
[0118] The number of neurons in the input layer of the neural network model is 512, and the output is 125 potential leakage point parameters. The model structure is optimized using the differential evolution genetic algorithm. The results are as follows: Fig.10 The optimal neural network model is 2 hidden layers, the number of neurons is 485 and 220 respectively, and the activation function is PReLU. The learning rate is 0.001; the training samples are divided into training set, validation set and test set in the ratio of 80%, 10% and 10%, and the batch size is 20.
[0119] It should be noted that the neural network model structure is different for pipe networks with different topological structures, so it needs to be adjusted according to the characteristics of the actual pipe network to achieve a higher detection accuracy. The training set is used to train the ANN model, the validation set is used to validate the trained ANN model, and the test set is used to evaluate the generalization of the ANN model.
[0120] 4. Leakage identification and location
[0121] When the model reaches a satisfactory accuracy, it can be applied to leakage identification and location of the pipe network. When the leakage training sample capacity is 1250, this embodiment ( Figure 8 ) The accuracy of P1 monitoring point is 76%, and that of P2 is 72%; when the sample size increases to 12,500, the accuracy of P1 is 82%, and that of P2 is 78%; after genetic algorithm optimization, the accuracy of P1 reaches 85%, and that of P2 reaches 82%. Under the same sample size, after genetic algorithm optimization, the accuracy of identifying and locating two leak points is 72%, which is lower than the detection accuracy of a single leak point. Therefore, for more complex leakage conditions, it is necessary to improve the accuracy of leakage detection through more reasonable model settings and larger sample sizes.
[0122] To further illustrate the beneficial effects of the embodiments of the present invention, at the same detection point and under the same leakage condition in the same pipe network, the simulation results of the leakage condition are obtained through the transient flow hydraulic model based on valve disturbance, and the time domain pressure p(n) simulated at the pressure monitoring point, the modulus A(k) of the frequency domain pressure function P(k) and the phase φ(k) of the pressure wave function are used as training samples to train the ANN model. The prediction accuracy of the trained ANN model is 34%, 40% and 82% respectively. It can be seen that under the same conditions, using the phase of the pressure wave function as a characteristic parameter for training significantly improves the accuracy of the ANN model.
[0123] The embodiment of the present invention further provides a system for implementing the above-mentioned method for locating leakage in a pressure pipe network, comprising:
[0124] The transient flow hydraulic model construction module of the pipe network is used to construct the transient flow hydraulic model of the pipe network according to the pipe network topology and basic pipeline information, and calibrate the parameters of the pipe network hydraulic model according to the measured pressure and flow data during the operation of the pipe network, so as to obtain a transient flow hydraulic model that is consistent with the actual pipe network topology and damping parameters;
[0125] The training data generation module is used to randomly generate various leakage conditions that may occur in the actual operation of the pipeline network, and use the pipeline network transient flow hydraulic model to numerically simulate the pressure of the monitoring point set for each leakage condition to obtain the pressure change data of the monitoring point under each leakage condition over time;
[0126] A data processing module is used to perform Fourier transform on the pressure variation data of each leakage condition monitoring point over time to obtain the phase spectrum of the pressure wave function including the leakage point under each leakage condition;
[0127] An ANN model building module is used to build an artificial neural network model ANN, and use the phase spectrum of the pressure wave function obtained by the data processing module as a training sample to train the ANN model and use the genetic algorithm GA to optimize its structure to obtain the trained ANN model;
[0128] A leakage data acquisition module is used to acquire the pressure data of the monitoring point collected by the pressure monitoring device when the opening of the disturbance valve set on the pipeline network to be detected is used to disturb the pipeline network to be detected;
[0129] The leakage detection module is used to input the monitoring point pressure data obtained by the leakage data acquisition module into the data processing module for Fourier transform to obtain the pressure harmonic phase spectrum in the frequency domain at the initial stage of the disturbance, and input it as the detection sample feature data into the ANN model trained by the ANN model construction module to predict whether there is leakage and the leakage location in the pipeline network to be detected.
[0130] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of the specification of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for locating leakage in a pressure pipe network, characterized in that: The steps include: Step 1, setting disturbance valves and pressure monitoring devices at a certain distance on the pipeline network to be tested; Step 2: construct a transient flow hydraulic model of the pipeline network based on the topological structure of the pipeline network to be detected and the basic information of the pipeline, and calibrate the pipeline network information parameters of the constructed transient flow pipeline network hydraulic model according to the measured pressure and flow of the pipeline network to obtain a transient flow hydraulic model that is consistent with the actual pipeline network topological structure and damping parameters; Step 3, randomly generate various leakage conditions that may occur in actual pipe network operation, use the pipe network transient flow hydraulic model obtained in step 2 to perform numerical simulation on the pressure of the monitoring point set for each leakage condition, and obtain the pressure change data of the monitoring point under each leakage condition over time; Step 4: Perform Fourier transform on the pressure variation data of each leakage condition monitoring point obtained in step 3, and obtain the phase spectrum of the pressure wave function including the leakage point under each leakage condition; Step 5, constructing an artificial neural network model ANN for leakage detection, using the phase spectrum of the pressure wave function obtained in step 4 as a training sample to train the ANN model and using a genetic algorithm GA to optimize its structure to obtain a trained ANN model; Step 6: When detecting leakage, operate the disturbance valve opening to disturb the pipeline to be detected, and collect pressure data of the monitoring point through the pressure monitoring device. The phase spectrum of the pressure wave function of the initial segment of the disturbance in the frequency domain is obtained by Fourier transforming the pressure data of the monitoring point, and is input into the ANN model obtained in step 5 as the detection sample feature data to predict whether there is leakage in the pipeline to be detected and the leakage location.
2. The method for locating leakage of a pressure pipe network according to claim 1, characterized in that: The distance between the disturbance valve and the pressure monitoring device in step 1 is set to: L ≥ c·a / f Where: L is the distance between the pressure monitoring point and the disturbance valve, a is the wave speed, f is the sampling frequency of the pressure monitoring setting, and c is the empirical value.
3. The method for locating leakage of a pressure pipe network according to claim 1, characterized in that: In step 2, the topological structure of the pipe network and basic information including pipe length, pipe diameter, resistance coefficient, wave velocity, elevation, valve and monitoring node location are input into the model building software to construct a transient flow hydraulic model of the pipe network to be tested.
4. The method for locating leakage in a pressure pipe network according to claim 1, characterized in that: In step 3, for each leakage condition, at least one leakage point is set in the detection network, and the network nodes are marked according to whether there is leakage. The transient flow hydraulic model of the network obtained in step 2 is used to simulate the disturbance valve disturbance process to obtain the data of the pressure change over time at the monitoring point.
5. The method for locating leakage of a pressure pipe network according to claim 4, characterized in that: According to the impact of the operation of the disturbance valve on the pressure in the pipeline, the opening change that does not affect the safe operation of the pipeline network and the disturbance intensity can be monitored by the monitoring point is selected. Based on this, the simulated pressure change data over time at the monitoring point at the initial stage of the disturbance of the disturbance valve is selected as the training sample, and the time period must cover the time period required for the pressure feedback signal of the farthest leakage point that the monitoring point can receive.
6. The method for locating leakage in a pressure pipe network according to claim 4, characterized in that: During simulation, the number of training samples is increased by changing the pipe network pressure, outflow flow, and leakage location.
7. The method for locating leakage in a pressure pipe network according to claim 1, characterized in that: In step 4, the discrete Fourier transform DFT method is used to perform the pressure value p(n) of the pressure monitoring point under the random leakage condition over time: For a time-domain pressure sequence p(n) of length N, its discrete Fourier transform DFT P(k) is defined as: Where: P(k) is the pressure wave function, k is the frequency index, k = 0, 1, 2, ..., N-1; n is the time sampling sequence index, n = 1, 2, ..., N; j is the imaginary unit, e is the base of the natural logarithm, The fundamental frequency is The periodic complex exponential function of ; the complex form of P(k), expressed in amplitude and phase form: P(k)=A(k)·e jφ(k) Where: A(k) is the amplitude of the kth frequency component, φ(k) is the phase of the kth frequency component; A(k) is calculated modulo P(k): A(k)=|P(k)| φ(k) is obtained by phase calculation of P(k): φ(k)=∠P(k).
8. The method for locating leakage in a pressure pipe network according to claim 1, characterized in that: In step 5, during training, the phase spectrum of the pressure wave function of the training sample is input into the ANN model. The genetic algorithm GA first randomly generates a batch of ANN model individuals according to the given value range of the number of neurons in each layer of the ANN, and calls this batch of ANN models for calculation. The ANN model individuals with higher accuracy are retained, and the number of neurons in each layer is cross-combined and adjusted to obtain a batch of new ANN model individuals. The above process is repeated during the training process until the target accuracy is reached, and the optimal ANN model result is output.
9. A system for implementing the method for locating leakage in a pressure pipe network as claimed in any one of claims 1 to 8, characterized in that: include: The transient flow hydraulic model construction module of the pipe network is used to construct the transient flow hydraulic model of the pipe network according to the pipe network topology and basic pipeline information, and calibrate the parameters of the pipe network hydraulic model according to the measured pressure and flow data during the operation of the pipe network, so as to obtain a transient flow hydraulic model that is consistent with the actual pipe network topology and damping parameters; The training data generation module is used to randomly generate various leakage conditions that may occur in the actual operation of the pipeline network, and use the pipeline network transient flow hydraulic model to numerically simulate the pressure of the monitoring point set for each leakage condition to obtain the pressure change data of the monitoring point under each leakage condition over time; A data processing module is used to perform Fourier transform on the pressure variation data of each leakage condition monitoring point over time to obtain the phase spectrum of the pressure wave function including the leakage point under each leakage condition; An ANN model building module is used to build an artificial neural network model ANN, and use the phase spectrum of the pressure wave function obtained by the data processing module as a training sample to train the ANN model and use the genetic algorithm GA to optimize its structure to obtain the trained ANN model; A leakage data acquisition module is used to acquire the pressure data of the monitoring point collected by the pressure monitoring device when the opening of the disturbance valve set on the pipeline network to be detected is used to disturb the pipeline network to be detected; The leakage detection module is used to input the monitoring point pressure data obtained by the leakage data acquisition module into the data processing module for Fourier transform to obtain the pressure harmonic phase spectrum in the frequency domain at the initial stage of the disturbance, and input it as the detection sample feature data into the ANN model trained by the ANN model construction module to predict whether there is leakage and the leakage location in the pipeline network to be detected.
Citation Information
Cited By
Detection and positioning method for coping with leakage of multiple pipelines of water supply network
CN121980409A
