Pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks
By combining the variational mode decomposition optimized by Gray Wolf and the bidirectional long short-term memory network, the characteristics of the leakage signal in the pressurized water pipeline are extracted, which solves the problem of difficulty in extracting the leakage signal in the existing technology and realizes the analysis of the pressured water pipeline. Accurate positioning of leakage locations in pipelines and adaptability to multiple working conditions.
Patent Information
- Application Number
- CN202410181357.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-18
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-02-18
AI Technical Summary
It is difficult to effectively extract and classify leakage signals in pressurized water pipelines with existing technology, resulting in difficulty in locating leaks, especially in the presence of noise interference and nonlinear signals.
A pipeline leakage location method based on variational mode decomposition (VMD) and bidirectional long short-term memory network (BiLSTM) is adopted. The gray wolf algorithm is used to optimize the VMD algorithm to remove noise, extract leakage features, and use the BiLSTM model to build a leakage location model.
It achieves effective extraction and accurate location of leakage signals in pressurized water pipelines, improves the accuracy and generalization of the leakage location model, and is suitable for a variety of working conditions.
Smart Images

Figure CN118094147B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pipeline leakage detection, and in particular relates to a pipeline leakage positioning method based on variational mode decomposition (VMD) and a bidirectional long short-term network (BiLSTM). Background Art
[0002] Pipeline transportation is an economical, safe and efficient mode of transportation, which is widely used in water conservancy projects, petrochemicals, energy and power and other fields (Main engineering problems and countermeasures in ultra-long-distance rock pipe jacking project: Water pipeline case study in Chongqing [J]. Tunnelling and Underground Space Technology, 2022, 123: 104420; Review on the transport capacity management of oil and gas pipeline network: Challenges and opportunities of future pipeline transport [J]. Energy Strategy Reviews, 2022, 43: 100933.). In recent years, with the increasing demand for industrial production automation and the acceleration of urbanization, the demand for water resources in various regions of my country has increased significantly, resulting in a rapid increase in the number of kilometers of water pipelines laid. Therefore, it is urgent to develop high-performance pipeline leakage detection technology to reduce the pipeline leakage rate.
[0003] The existing leak detection methods are mainly proposed for high-pressure pipelines (pressure MPa level) such as oil and natural gas, and few are suitable for leak location in pressurized water pipelines. Compared with high-pressure pipelines, the operating pressure of pressurized water pipelines is lower (several atmospheres), which makes it difficult to detect leak signals (such as pressure and other measurement signals) in time, that is, it is difficult to effectively extract the leakage characteristics of the measurement signals. Therefore, to build a leak location model suitable for pressurized water pipelines, it is necessary to rely on high-performance filtering algorithms to extract the leakage characteristics of the measurement signals.
[0004] In recent years, artificial intelligence technologies such as deep learning have been gradually applied in the field of pipeline leakage detection and have achieved good results. Deep learning is a data-driven method that can adaptively mine the correlation between working condition data and obtain the characteristic change law of the data, thereby constructing a leakage detection and positioning model. However, how to extract effective leakage signals from pressurized water pipelines containing noise, so as to achieve accurate classification and positioning of the leakage position in the pressurized water pipeline, is still a technical problem in the current development of leakage models. Therefore, it is necessary to construct a leakage positioning model suitable for pressurized water pipelines based on the characteristics of pressurized water pipeline leakage accidents. Summary of the invention
[0005] The purpose of the present invention is to provide a pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks, which realizes the effective extraction of leakage characteristics in measurement signals in pressurized water pipelines and the accurate classification and location of leakage positions in pressurized water pipelines.
[0006] The technical solution adopted by the present invention is a pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks, which specifically includes the following steps:
[0007] Step 1: In a pressurized water pipeline system equipped with a water pump, a high-frequency pressure sensor, and a liquid flow meter, obtain experimental test data by installing leakage test points;
[0008] Step 2: Conduct a leakage test study in the pressurized water pipeline system of step 1, obtain experimental test data of leakage / non-leakage states and different leakage locations, and set corresponding labels;
[0009] Step 3: Construct the Grey Wolf Algorithm Optimized Variational Mode Decomposition (GWO-VMD) algorithm, then perform mode decomposition and signal reconstruction on the experimental test data obtained in step 2, and filter the experimental test data;
[0010] Step 4: Based on the bidirectional long short-term memory network (BiLSTM) model, use the data obtained in step 3 to train the model, build a leakage location model, train the leakage location model, and verify the model training accuracy.
[0011] The present invention is also characterized in that:
[0012] In step 1, the installation requirements of the high-frequency pressure sensors and leakage test points in the pressurized water pipeline are as follows: a high-frequency pressure sensor is installed every 10m to 500m, with a sampling frequency of 500 to 10,000Hz; 2 to 10 leakage test points are set between every two high-frequency pressure sensors, and a solenoid valve is installed at each leakage test point to simulate pipeline leakage accidents by switching the solenoid valve; a water pump is used to transport fluids of a specific flow rate; and a liquid flow meter is used to measure the fluid flow rate.
[0013] In step 2, the method for obtaining experimental test data is as follows:
[0014] The first step is to turn on the water pump and set the flow rate. There is no limit on the flow rate.
[0015] The second step is to wait until the pressure and flow are stable, that is, the change amplitude of the average flow and pressure in 1 second is less than 1%, and record a set of high-frequency pressure signal data X under non-leakage conditions. i , the acquisition time is 10 to 60 seconds, i represents the i-th group of high-frequency pressure signal data, X i =[x1,x2,...,x m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system; the third step is to record a set of high-frequency pressure signal data X under leakage conditions i , during the recording process of the leakage condition, when the recording time reaches half of the collection time, open the solenoid valve on a leakage test point and simulate the leakage, and record until the end. After completing the data recording of the leakage condition, close the solenoid valve; the fourth step, after the pressure and flow are stable, apply the third step to the new leakage test point until all leakage test points complete the third step; the fifth step, change the fluid flow through the water pump, and repeat the second to fourth steps; the sixth step, after completing 3 to 10 steps of the fifth step, turn off the water pump and end the experimental test work. Set corresponding labels for the experimental test data of the leakage / non-leakage state and different leakage positions. The labels include non-leakage, 1-point leakage, 2-point leakage,..., v-point leakage, where v represents the number of point leakage points.
[0016] Step 3 is as follows:
[0017] Step 3.1: Initialize the parameters of the Gray Wolf Algorithm (GWO), randomly generate the positions of individuals in the wolf pack, and the individual positions correspond to the [K, α] parameter combination; among them, the GWO parameter settings are: population size is 10-50, the maximum number of iterations is 50-500; the parameter settings of sample entropy are: matching order is 2, and tolerance is 0.1;
[0018] Step 3.2: For each set of high-frequency pressure signal data X obtained in step 2 i =[x1,x2,...,x m ] in the pressure signal data x m The mean removal operation is performed to reduce the influence of the DC component and obtain the high-frequency pressure signal data Y after the mean removal. i =[y1,y2,...,y m ], where y m The expression is as follows:
[0019]
[0020] in, Represents signal data x m The average value of
[0021] Step 3.3: For Y i Perform VMD decomposition, and after decomposition, Y i Each signal data y m K IMF components and a residual term will be obtained, and the IMF components are named IMF 1, IMF 2, ..., IMF K in sequence; then, the sample entropy SE of IMF K is used as the loss function, and the GWO algorithm is used to optimize the [K, α] combination. The smaller the sample entropy value, the better the [K, α] combination; the parameter optimization range of VMD is: the number of modal decompositions K is 2 to 20, and the penalty factor α is 200 to 4000;
[0022] Step 3.4: During the optimization process, use the [K, α] obtained in this optimization to optimize the high-frequency pressure signal data Y i Perform VMD decomposition. After decomposition is completed, calculate the signal data y m , the signal energy E of each IMF component and residual term, and calculate the relative energy E of each IMF component and residual term RE , with signal energy E and relative energy E RE As the judging criteria. Signal energy E and relative energy E RE The expression is as follows:
[0023]
[0024]
[0025] Where N is the length of the signal or the total number of sampling points of the signal; y(j) represents the value of the signal at the jth sampling point, j=1,...,N; E1,...,E K represents the signal energy of the Kth IMF component, E K+1 represents the signal energy of the residual term; n=1, ..., K+1;
[0026] If the E of each IMF component RE The sum is less than 0.92 or the relative energy E of each IMF component and the residual term RE If it is greater than 1, the optimization result is discarded. The former means under-decomposition, and the latter means over-decomposition.
[0027] Step 3.5: Update the parameter combination of [K, α] according to the sample entropy value; repeat steps 3.1 to 3.3 until the algorithm process is completed after the stop condition is met, that is, when the number of iterations reaches the maximum number of iterations set in step 3.1, stop searching for the best parameter combination [K, α] and use this [K, α] combination to optimize Y i =[y1,y2,...,y m ] to filter and obtain the filtered data Z i =[z1,z2,...,z m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system, and i represents the i-th group of data.
[0028] Step 4 is as follows:
[0029] Step 4.1: Data Z i The labels corresponding to the data are divided into three parts: training set, validation set and test set in a ratio of 9:0.5:0.5;
[0030] Step 4.2: Construct a leakage detection and positioning model. The structure of the leakage detection and positioning model includes input layer, BiLSTM layer, drop layer, BiLSTM layer, drop layer, fully connected layer, Softmax layer and output layer in sequence; the number of neurons in the BiLSTM layer is 10 to 200; the drop rate of the drop layer is 10 to 40%; the training goal is that the training rounds reach the set maximum iteration rounds: 500 to 2000, or the accuracy of the training set and the verification set reaches the expected goal: accuracy ≥ 99%; in each training process, some neurons are not updated with weights and thresholds according to the drop rate, and the drop rate is the proportion of neurons that do not update weights and thresholds to the total neurons;
[0031] Step 4.3: Initialize the leakage localization model, and import the training set and test set data into the input layer of the leakage localization model for training; during each training process, the data will pass through the BiLSTM layer, the drop layer, the BiLSTM layer, the drop layer, the fully connected layer and the Softmax layer in turn, and complete a model training; then output the prediction result in the output layer, and compare the difference between the prediction result and the actual result; then, based on the difference between the prediction result and the actual result, iterate the weights and thresholds of the neurons in each layer according to the negative feedback algorithm until the training target set in step 4.2 is reached, and then output the trained leakage localization model;
[0032] Step 4.4: Input the test set data into the leakage localization model trained in step 4.3 to verify the training accuracy of the model; after verification, output the results and save the leakage localization model; if the leakage localization model performs poorly in the test set, that is, the accuracy is less than 95%, repeat steps 4.3 to 4.4 to ensure the generalization of the model.
[0033] The beneficial effects of the present invention are:
[0034] (1) The measurement signal has the characteristics of strong nonlinearity, susceptibility to outliers, and a lot of noise interference, which makes it difficult to directly apply it to the construction of leakage detection models. The method of the present invention is a water pipeline leakage location method based on variational mode decomposition (VMD) and bidirectional long short-term network (BiLSTM) optimized by the Grey Wolf Algorithm (GWO); the method of the present invention uses VMD to filter the measurement signal, which can remove noise interference and extract effective leakage features, laying a foundation for the establishment of a leakage location model.
[0035] (2) When using pressure signals for leak location, due to the low difference in pressure values under different working conditions, there is an obvious DC component in the spectrum, which will affect the VMD decomposition effect. To this end, the method of the present invention performs a mean removal operation on the data before VMD decomposition to reduce the influence of the DC component, thereby improving the VMD decomposition effect and helping to improve the prediction accuracy of the leak location model.
[0036] (3) When performing VMD decomposition, it is necessary to manually set the modal decomposition number K and the penalty factor α. Too large a value will lead to over-decomposition, while too small a value will lead to under-decomposition. To this end, the method of the present invention uses sample entropy as the loss function and the relative energy of the signal as the evaluation criterion, adopts the Grey Wolf Optimization Algorithm (GWO) to optimize VMD, constructs the GWO-VMD algorithm, and reasonably selects K and α, which can effectively avoid over-decomposition and under-decomposition, thereby improving the VMD decomposition effect.
[0037] (4) Bidirectional long short-term memory neural network (BiLSTM) is a bidirectional LSTM model composed of forward LSTM and backward LSTM. It can obtain the global characteristics of data by comparing the correlation between the previous data and the subsequent data, and is suitable for classification and prediction of time series data. The measurement signal of the pressurized water pipeline is a typical time series signal. Therefore, it is suitable to build a leak location model based on the BiLSTM model.
[0038] (5) The method of the present invention divides the experimental data set into three parts: training set, validation set and test set in a ratio of 9:0.5:0.5. Among them, the training set and validation set data are used to train the leakage location model, and the test set data does not participate in the model training, but is only used to verify the generalization of the leakage location model obtained by training. This method can effectively ensure the generalization of the model, ensure that the model has good promotion and application value, and can be applied to leakage location in various working conditions.
[0039] (6) The pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks of the present invention has good scalability. By increasing the dimension and quantity of model training data, it can not only improve the leakage location accuracy of the model, but also continuously broaden the application scope of the model.
[0040] (7) The pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks of the present invention can accurately distinguish pipeline leakage from normal operating conditions and locate the leakage position, and is suitable for leak detection and location in pressurized water pipelines. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of the GWO-VMD algorithm in the method of the present invention;
[0042] Figure 2 It is the algorithm flow corresponding to the leakage location model used in the method of the present invention;
[0043] Figure 3 is a schematic diagram of the structure of the experimental circuit in Example 1;
[0044] Figure 4 is a schematic diagram of leakage signals of four high-frequency pressure sensors in a leakage condition in Example 1;
[0045] Figure 5 is the confusion matrix of the prediction results of the leakage location model for all data in Example 1;
[0046] Figure 6 It is the confusion matrix of the prediction results of the leakage location model in Example 1 for the prediction set data.
[0047] In the figure, 1. water tank, 2. water pump, 3. check valve, 4. first ball valve, 5. first electromagnetic flowmeter, 6. first leakage point, 7. first high-frequency pressure sensor, 8. second leakage point, 9. second high-frequency pressure sensor, 10. third leakage point, 11. third high-frequency pressure sensor, 12. fourth leakage point, 13. fifth leakage point, 14. sixth leakage point, 15. fourth high-frequency pressure sensor, 16. air valve, 17. second electromagnetic flowmeter, 18. second ball valve, 19. data acquisition system. DETAILED DESCRIPTION
[0048] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] The present invention provides a pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks, which specifically includes the following steps:
[0050] Step 1: In a pressurized water pipeline system equipped with a water pump, a high-frequency pressure sensor, and a liquid flow meter, obtain experimental test data by adding leakage test points; the installation requirements of the high-frequency pressure sensor and the leakage test points in the pressurized water pipeline are as follows: a high-frequency pressure sensor is installed every 10m to 500m, and the sampling frequency is 500 to 10000Hz; 2 to 10 leakage test points are set between every two high-frequency pressure sensors, and a solenoid valve is installed at each leakage test point, and a pipeline leakage accident is simulated by switching the solenoid valve; the water pump is used to transport a fluid with a specific flow rate; the liquid flow meter is used to measure the fluid flow rate.
[0051] Step 2: Conduct a leakage test study in the pressurized water pipeline system of step 1, obtain experimental test data of leakage / non-leakage states and different leakage locations, and set corresponding labels, including non-leakage, 1-point leakage, 2-point leakage, ..., v-point leakage, where v represents the number of leakage points;
[0052] The specific experimental test data acquisition method is as follows: the first step is to turn on the water pump and set the flow rate, and the flow rate is not limited; the second step is to wait until the pressure and flow rate are stable, that is, the change amplitude of the average flow rate and pressure in 1 second is less than 1%, and record a set of high-frequency pressure signal data X under non-leakage conditions. i , the acquisition time is 10 to 60 seconds, i represents the i-th group of high-frequency pressure signal data, X i =[x1,x2,...,x m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system; the third step is to record a set of high-frequency pressure signal data X under leakage conditions i , during the recording process of the leakage condition, when the recording time reaches half of the collection time, open the solenoid valve on a leakage test point and simulate the leakage, and record until the end. After completing the data recording of the leakage condition, close the solenoid valve; the fourth step, after the pressure and flow are stable, apply the third step to the new leakage test point until all leakage test points complete the third step; the fifth step, change the fluid flow through the water pump, and repeat the second to fourth steps; the sixth step, after completing 3 to 10 steps of the fifth step, turn off the water pump and end the experimental test work. Set corresponding labels for the experimental test data of the leakage / non-leakage state and different leakage positions. The labels include non-leakage, 1-point leakage, 2-point leakage,..., v-point leakage, where v represents the number of point leakage points.
[0053] Step 3: Initialize the parameters of the Grey Wolf Algorithm (GWO), and use the individual positions of the wolves in the GWO algorithm as the parameter combination of [K, α] to perform adaptive iterative optimization on the key parameters of the variational mode decomposition (VMD), namely, the number of mode decompositions K and the penalty factor α, so as to complete the construction of the GWO-VMD algorithm. In the optimization process, the sample entropy SE is used as the loss function, and the signal relative energy E is used as the loss function. RE After the optimization is completed, the high-frequency pressure signal data X obtained in step 2 is analyzed using the K and α obtained in step 2. i Perform modal decomposition and reconstruct the signal to achieve high-frequency pressure signal data X i Filtering, get the filtered data Z i , Z i =[z1,z2,...,z m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system, and i represents the i-th group of data. The program flow chart of the GWO-VMD algorithm is shown in Figure 1 As shown, the detailed calculation process of the program is as follows:
[0054] Step 3.1: Initialize GWO parameters and randomly generate the positions of individuals in the wolf pack. The individual positions correspond to the [K, α] parameter combination.
[0055] Among them, the GWO parameter settings are: population size is 10-50, the maximum number of iterations is 50-500; the sample entropy parameter settings are: matching order is 2, tolerance is 0.1;
[0056] Step 3.2: For each set of high-frequency pressure signal data X obtained in step 2 i =[x1,x2,...,x m ] in the pressure signal data x m The mean removal operation is performed to reduce the influence of the DC component and obtain the high-frequency pressure signal data Y after the mean removal. i =[y1,y2,...,y m ], where y m The expression is as follows:
[0057]
[0058] in, Represents signal data x m The average value of
[0059] Step 3.3: For Y i Perform VMD decomposition. After decomposition, Y i Each signal data y mK IMF components and a residual term will be obtained. The IMF components are named IMF 1, IMF 2, ..., IMF K in sequence. Then, the sample entropy SE of IMF K is used as the loss function, and the GWO algorithm is used to optimize the combination of [K, α]. The smaller the sample entropy value, the better the [K, α] combination.
[0060] Among them, the parameter optimization range of VMD is: the number of modal decompositions K is 2 to 20, and the penalty factor α is 200 to 4000;
[0061] Step 3.4: During the optimization process, it is necessary to use the [K, α] obtained in this optimization to calculate the high-frequency pressure signal data Y i Perform VMD decomposition. After decomposition is completed, calculate the signal data y m , E of each IMF component and residual term, and calculate E of each IMF component and residual term RE , with signal energy E and relative energy E RE As the judging criteria. Signal energy E and relative energy E RE The expression is as follows:
[0062]
[0063]
[0064] Where N is the length of the signal or the total number of sampling points of the signal; y(j) represents the value of the signal at the jth sampling point, j=1,...,N; E1,...,E K represents the signal energy of the Kth IMF component, E K+1 represents the signal energy of the residual term; n=1, ..., K+1;
[0065] If the E of each IMF component RE The sum is too small (less than 0.92) or the relative energy E of each IMF component and the residual term RE If it is greater than 1, the optimization result is discarded. The former means under-decomposition, and the latter means over-decomposition.
[0066] Step 3.5: Update the parameter combination [K, α] according to the sample entropy value; repeat steps 3.1 to 3.3 until the algorithm process is completed after the stop condition is met, that is, when the number of iterations reaches the maximum number of iterations set in step 3.1, stop searching for the best parameter combination [K, α] and use this [K, α] combination to optimize Y i =[y1,y2,...,y m ] to filter and obtain the filtered data Z i =[z1,z2,...,z m], m is the number of high-frequency pressure sensors in the pressurized water pipeline system, and i represents the i-th group of data.
[0067] Step 4: Based on the BiLSTM model, use the data Z obtained in step 3 i Conduct model training to build a leak location model. The algorithm flow and model structure of the leak location model are as follows: Figure 2 As shown in the figure, the detailed construction process and model structure of the leakage location model are as follows:
[0068] Step 4.1: Data Z i The labels corresponding to the data are divided into three parts: training set, validation set and test set in a ratio of 9:0.5:0.5; the training set and validation set data are used to train the leakage localization model, and the test set data does not participate in the model training, but is only used to verify the generalization of the leakage localization model obtained by training;
[0069] Step 4.2: Construct a leakage detection and positioning model. The structure of the leakage detection and positioning model includes input layer, BiLSTM layer, drop layer, BiLSTM layer, drop layer, fully connected layer, Softmax layer and output layer in sequence; the number of neurons in the BiLSTM layer is 10 to 200; the drop rate of the drop layer is 10 to 40%; the training goal is that the training rounds reach the set maximum iteration rounds: 500 to 2000, or the accuracy of the training set and the verification set reaches the expected goal: accuracy ≥ 99%; in each training process, some neurons are not updated with weights and thresholds according to the drop rate, and the drop rate is the proportion of neurons that do not update weights and thresholds to the total neurons;
[0070] Step 4.3: Initialize the leakage localization model, and import the training set and test set data into the input layer of the leakage localization model for training; during each training process, the data will pass through the BiLSTM layer, the drop layer, the BiLSTM layer, the drop layer, the fully connected layer and the Softmax layer in turn, and complete a model training; then output the prediction result in the output layer, and compare the difference between the prediction result and the actual result; then, based on the difference between the prediction result and the actual result, iterate the weights and thresholds of the neurons in each layer according to the negative feedback algorithm until the training target set in step 4.2 is reached, and then output the trained leakage localization model;
[0071] Step 4.4: Input the test set data into the leakage localization model trained in step 4.3 to verify the training accuracy of the model; after verification, output the results and save the leakage localization model; if the leakage localization model performs poorly in the test set, that is, the accuracy is less than 95%, repeat steps 4.3 to 4.4 to ensure the generalization of the model.
[0072] Example 1
[0073] In order to demonstrate the practical application effect of the method of the present invention and more specific practical application steps, the present invention built a pressurized water transmission leakage detection experimental platform, obtained corresponding experimental test data according to the steps of the present invention, and successfully constructed a leakage location model. Based on Example 1, the application of the present invention is demonstrated in detail.
[0074] According to step 1, an experimental test was conducted on a pressurized water transmission leakage detection experimental platform equipped with a leakage test point, and corresponding experimental test data were obtained, and a total of 442 sets of data were obtained, each set of data containing 4-dimensional signal data. Figure 3 As shown, it includes a water tank 1, a water pump 2, a check valve 3, a first ball valve 4, a first electromagnetic flowmeter 5, a first leakage point 6, a first high-frequency pressure sensor 7, a second leakage point 8, a second high-frequency pressure sensor 9, a third leakage point 10, a third high-frequency pressure sensor 11, a fourth leakage point 12, a fifth leakage point 13, a sixth leakage point 14, a fourth high-frequency pressure sensor 15, an air valve 16, a second electromagnetic flowmeter 17, and a second ball valve 18, which are connected to the water tank 1 through a pipeline in sequence; it also includes a data acquisition system 19, and the first electromagnetic flowmeter 5, the first high-frequency pressure sensor 7, the second high-frequency pressure sensor 9, the third high-frequency pressure sensor 11, the fourth high-frequency pressure sensor 15 and the second electromagnetic flowmeter 17 are all connected to the data acquisition system 19. Among them, the distances between the first leakage point 6 and the second leakage point 8 and the first high-frequency pressure sensor 7 are 2m and 4m respectively; the distances between the second leakage point 8 and the third leakage point 10 and the second high-frequency pressure sensor 9 are 15m and 8m respectively; the distances between the third leakage point 10 and the fourth leakage point 12 and the third high-frequency pressure sensor 11 are 80m and 2m respectively; the distance between the fourth leakage point 12 and the fifth leakage point 13 is 21m; the distance between the fifth leakage point 13 and the sixth leakage point 14 is 6m; the distance between the sixth leakage point 14 and the fourth high-frequency pressure sensor 15 is 6m. The loop uses a 304 stainless steel round tube with an inner diameter of 100mm to connect the experimental components, the diameter of the leakage point is 13mm, and the sampling frequency is 2000Hz.
[0075] The experimental data acquisition method of the embodiment is the same as step 2, each group of high-frequency pressure signal data x i The sampling time is 20s, the length of each set of data is 40000, and the main working parameters are: pressure 100~400kPa, flow rate 15~55m 3 / h. 20m 3 Typical leakage signal diagram at a flow rate of / h is as follows Figure 4 As shown, Figure 4The schematic diagram of the leakage signal of four high-frequency pressure sensors in the leakage condition is shown. As can be seen from the figure, when a pipeline leaks, the pressure signal will oscillate suddenly and quickly return to the state before the leak. Figure 4 As shown, the pressurized water transmission leakage detection experimental platform constructed by the present invention can detect leakage accidents and provide assistance for the construction of leakage detection models.
[0076] According to step 3, the GWO-VMD algorithm is used to perform adaptive iterative optimization on the key parameters of variational mode decomposition (VMD), namely, the number of modal decompositions K and the penalty factor α. The optimal results are K=7 and α=1758.
[0077] According to step 4, the leakage localization model is constructed: the 442 sets of data are divided into three parts: training set, validation set and test set at a ratio of 9:0.5:0.5, including 398 sets, 22 sets and 22 sets of data respectively; the parameters of the model are set as follows: the number of neurons in the first and second BiLSTM layers are 128 and 64 respectively; the discard rate of the two discard layers is 20%; the accuracy target is 99%; the maximum number of iterations is 1500. The confusion matrix of the leakage localization model for all data and prediction set data obtained by training is as follows Figure 5 and Figure 6 As shown, the prediction accuracy is as high as 99.55% and 95.45% respectively, indicating that the leakage location model constructed by the present invention has good prediction effect and generalization. It can be seen that this method realizes the effective extraction of leakage features in the measurement signal of the pressurized water pipeline by combining the grey wolf optimization algorithm (GWO) with the variational mode decomposition (VMD); this method uses the data after feature extraction and combines the bidirectional long short-term memory network (BiLSTM) to construct a leakage location model, and realizes the accurate classification and location of the leakage position in the pressurized water pipeline.
[0078] Example 2
[0079] The pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term network specifically includes the following steps:
[0080] Step 1: In a pressurized water pipeline system equipped with a water pump, a high-frequency pressure sensor, and a liquid flow meter, obtain experimental test data by installing leakage test points;
[0081] Step 2: Conduct leakage test research in the pressurized water pipeline system of step 1, obtain experimental test data of leakage / non-leakage state and different leakage locations, and label them accordingly;
[0082] Step 3: Construct the GWO-VMD algorithm, then perform modal decomposition and signal reconstruction on the experimental test data obtained in step 2, and filter the experimental test data;
[0083] Step 4: Based on the BiLSTM model, use the data obtained in step 3 to train the model to build a leakage location model, train the leakage location model, and verify the training accuracy of the model.
[0084] Example 3
[0085] The pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term network specifically includes the following steps:
[0086] Step 1: In a pressurized water pipeline system equipped with a water pump, a high-frequency pressure sensor, and a liquid flow meter, obtain experimental test data by installing leakage test points;
[0087] In step 1, the installation requirements of the high-frequency pressure sensor and the leakage test point in the pressurized water pipeline are as follows: a high-frequency pressure sensor is installed every 10m to 500m, and the data sampling frequency is 500 to 10000Hz; 2 to 10 leakage test points are set between every two high-frequency pressure sensors, and a solenoid valve is installed on each leakage test point to simulate a leakage accident by opening or closing the solenoid valve; the water pump is used to realize the fluid delivery and set the fluid flow rate; the liquid flow meter is used to measure the fluid flow rate, and there is no requirement for the installation position;
[0088] Step 2: Conduct leakage test research in the pressurized water pipeline system of step 1, obtain experimental test data of leakage / non-leakage state and different leakage locations, and label them accordingly;
[0089] Step 3: Construct the GWO-VMD algorithm, then perform modal decomposition and signal reconstruction on the experimental test data obtained in step 2, and filter the experimental test data;
[0090] Step 4: Based on the BiLSTM model, use the data obtained in step 3 to train the model to build a leakage location model, train the leakage location model, and verify the training accuracy of the model.
Claims
1. A pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term networks, characterized in that: The specific steps include: Step 1: In a pressurized water pipeline system equipped with a water pump, a high-frequency pressure sensor, and a liquid flow meter, obtain experimental test data by installing leakage test points; Step 2: Conduct a leakage test study in the pressurized water pipeline system of step 1, obtain experimental test data of leakage / non-leakage states and different leakage locations, and set corresponding labels; In step 2, the experimental test data acquisition method is as follows: the first step is to turn on the water pump and set the flow rate, and the flow rate is not limited; the second step is to wait for the pressure and flow rate to stabilize, that is, the change amplitude of the average flow rate and pressure in 1 second is less than 1%, and record a set of high-frequency pressure signal data X under non-leakage conditions. i , the acquisition time is 10 to 60 seconds, i represents the i-th group of high-frequency pressure signal data, X i =[x1,x2,...,x m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system; the third step is to record a set of high-frequency pressure signal data X under leakage conditions i , during the recording process of the leakage condition, when the recording time reaches half of the collection time, open the solenoid valve on a leakage test point and simulate the leakage, and record until the end. After completing the data recording of the leakage condition, close the solenoid valve; the fourth step, after the pressure and flow are stable, apply the third step to the new leakage test point until all leakage test points complete the third step; the fifth step, change the fluid flow through the water pump, and repeat the second to fourth steps; the sixth step, after completing the fifth step operation 3 to 10 times, turn off the water pump, end the experimental test work, and set corresponding labels for the obtained leakage / non-leakage state and experimental test data of different leakage positions. The labels include non-leakage, 1-point leakage, 2-point leakage,..., v-point leakage, where v represents the number of point leakage points; Step 3: Construct the GWO-VMD algorithm, then perform modal decomposition and signal reconstruction on the experimental test data obtained in step 2, and filter the experimental test data; Step 3 is as follows: Step 3.1: Initialize GWO parameters and randomly generate the positions of individuals in the wolf pack. The individual positions correspond to the [K, α] parameter combination. Among them, the GWO parameter settings are: population size is 10-50, the maximum number of iterations is 50-500; the sample entropy parameter settings are: matching order is 2, tolerance is 0.1; Step 3.2: For each set of high-frequency pressure signal data X obtained in step 2 i =[x1,x2,...,x m ] in the pressure signal data x m The mean removal operation is performed to reduce the influence of the DC component and obtain the high-frequency pressure signal data Y after the mean removal. i =[y1,y2,...,y m ], where y m The expression is as follows: in, Represents signal data x m The average value of Step 3.3: For Y i Perform VMD decomposition. After decomposition, Y i Each signal data y m K IMF components and a residual term will be obtained. The IMF components are named IMF1, IMF2, ..., IMFK in sequence. Then, the GWO algorithm is used to optimize the combination of [K, α] with the sample entropy SE of IMFK as the loss function. The smaller the sample entropy value, the better the combination of [K, α]. Among them, the parameter optimization range of VMD is: the number of modal decompositions K is 2 to 20, and the penalty factor α is 200 to 4000; Step 3.4: In the optimization process, the [K, α] obtained in this optimization is used to calculate the high-frequency pressure signal data Y i Perform VMD decomposition. After decomposition is completed, calculate the signal data y m , the signal energy E of each IMF component and residual term, and calculate the relative energy E of each IMF component and residual term RE , with signal energy E and relative energy E RE As the judging criteria; signal energy E and relative energy E RE The expression is as follows: Where N is the length of the signal or the total number of sampling points of the signal; y(j) represents the value of the signal at the jth sampling point, j=1,...,N; E1,...,E K represents the signal energy of the Kth IMF component, E K+1 represents the signal energy of the residual term; n=1, ..., K+1; If the E of each IMF component RE The sum is less than 0.92 or the relative energy E of each IMF component and the residual term RE If it is greater than 1, the optimization result is discarded. The former means under-decomposition, and the latter means over-decomposition. Step 3.5: Update the parameter combination [K, α] according to the sample entropy value; repeat steps 3.1 to 3.3 until the algorithm process is completed after the stop condition is met, that is, when the number of iterations reaches the maximum number of iterations set in step 3.1, stop searching for the best parameter combination [K, α] and use this [K, α] combination to optimize Y i =[y1,y2,...,y m ] to filter and obtain the filtered data Z i =[z1,z2,...,z m ], m is the number of high-frequency pressure sensors in the pressurized water pipeline system, and i represents the i-th group of data; Step 4: Based on the BiLSTM model, use the data obtained in step 3 to train the model, build a leakage location model, train the leakage location model, and verify the model training accuracy; Step 4 is as follows: Step 4.1: Data Z i The labels corresponding to the data are divided into three parts: training set, validation set and test set in a ratio of 9:0.5:0.5; Step 4.2: Construct a leakage detection and positioning model. The structure of the leakage detection and positioning model includes input layer, BiLSTM layer, drop layer, BiLSTM layer, drop layer, fully connected layer, Softmax layer and output layer in sequence; the number of neurons in the BiLSTM layer is 10 to 200; the drop rate of the drop layer is 10 to 40%; the training goal is that the training rounds reach the set maximum iteration rounds: 500 to 2000, or the accuracy of the training set and the verification set reaches the expected goal: accuracy ≥ 99%; in each training process, some neurons are not updated with weights and thresholds according to the drop rate, and the drop rate is the proportion of neurons that do not update weights and thresholds to the total neurons; Step 4.3: Initialize the leakage localization model, and import the training set and test set data into the input layer of the leakage localization model for training; during each training process, the data will pass through the BiLSTM layer, the drop layer, the BiLSTM layer, the drop layer, the fully connected layer and the Softmax layer in turn, and complete a model training; then output the prediction result in the output layer, and compare the difference between the prediction result and the actual result; then, based on the difference between the prediction result and the actual result, iterate the weights and thresholds of the neurons in each layer according to the negative feedback algorithm until the training target set in step 4.2 is reached, and then output the trained leakage localization model; Step 4.4: Input the test set data into the leakage localization model trained in step 4.3 to verify the training accuracy of the model; after verification, output the results and save the leakage localization model; if the leakage localization model performs poorly in the test set, that is, the accuracy is less than 95%, repeat steps 4.3 to 4.4 to ensure the generalization of the model.
2. The pipeline leakage location method based on variational mode decomposition and bidirectional long-term and short-term network according to claim 1 is characterized in that: In step 1, In step 1, the installation requirements of the high-frequency pressure sensors and leakage test points in the pressurized water pipeline are as follows: a high-frequency pressure sensor is installed every 10m to 500m, and the sampling frequency is 500 to 10000Hz; 2 to 10 leakage test points are set between every two high-frequency pressure sensors, and a solenoid valve is installed at each leakage test point to simulate pipeline leakage accidents by switching the solenoid valve; the water pump is used to transport fluids with a specific flow rate; the liquid flow meter is used to measure the fluid flow rate.
