A method for locating leaks in a water supply pipe
An improved generalized cross-correlation algorithm, after variational mode decomposition and wavelet threshold denoising, solves the problems of low component screening efficiency and large positioning error in water supply pipeline leakage location, and achieves high-precision and fast leakage point location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN WATER RESOURCE & HYDROPOWER CONSULTATIVE CO OF P R CHINA
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-21
AI Technical Summary
Existing water supply pipeline leakage location technologies suffer from low component screening efficiency and poor accuracy, making it difficult to quickly distinguish between effective signals and noise. Furthermore, they exhibit large location errors in low signal-to-noise ratio environments, failing to meet the timeliness requirements for emergency leakage detection.
The acoustic signal is decomposed into multiple intrinsic mode function components using variational mode decomposition algorithm. Noise-dominant and signal-dominant components are screened by sample entropy value and correlation coefficient. After wavelet threshold denoising, an improved generalized cross-correlation algorithm is used to estimate the time delay to locate the leakage point.
It significantly improves positioning accuracy and anti-interference capability in low signal-to-noise ratio environments, adapts to various pipeline network environments, reduces positioning time, and meets the needs of emergency leak detection.
Smart Images

Figure CN121322864B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline leakage location technology, and in particular to a method for locating leakage in water supply pipelines. Background Technology
[0002] As a core infrastructure for urban water resource transportation, the operational stability of water supply pipelines directly affects water resource utilization efficiency, urban road safety, and residents' water safety. Currently, the location of leaks in water supply pipelines mainly relies on acoustic detection technology. The core principle is to collect leakage sound wave signals from both ends of the pipeline using a hydrophone, calculate the location of the leak point using the time delay estimation method, obtain the IMF component by decomposing the original infrasound signal using VMD, and then locate the leak using an improved generalized cross-correlation function. However, this method does not effectively filter the IMF components and directly uses all components in the calculation, resulting in residual noise interference and large location errors at low signal-to-noise ratios.
[0003] Furthermore, while determining the optimal VMD parameters through the sparrow optimization algorithm and then iteratively searching and filtering IMF components improves component purity, the iterative process requires repeated verification of component validity, which is time-consuming. The time required for locating a single pipeline is more than 30% longer than that of traditional methods, making it difficult to meet the timeliness requirements of emergency leak detection.
[0004] Existing noise reduction schemes mostly employ single hard or soft thresholding. While hard thresholding can preserve signal abrupt change characteristics, it leads to signal discontinuity after noise reduction and introduces false high-frequency interference. Soft thresholding, while ensuring signal smoothness, causes a constant attenuation of the effective signal amplitude, resulting in weakened leakage characteristics. In summary, existing water supply pipeline leakage location technologies suffer from low component screening efficiency and poor accuracy, making it difficult to quickly distinguish between effective signals and noise. Secondly, noise reduction is ineffective in low signal-to-noise ratio environments, leading to large time delay estimation errors. Thirdly, the location process is time-consuming and cannot be adapted to emergency leakage detection scenarios. Therefore, a new method for locating water supply pipeline leaks is urgently needed. Summary of the Invention
[0005] The purpose of this invention is to provide a method for locating leaks in water supply pipelines.
[0006] To achieve the above objectives, the present invention is implemented according to the following technical solution:
[0007] This invention includes the following steps:
[0008] S1. Hydrophones are installed at both ends of the water supply pipeline to be tested to collect the acoustic signals of the water supply pipeline to be tested, and the acoustic signals are preprocessed by bandpass filtering.
[0009] S2. The preprocessed acoustic signal is decomposed into multiple intrinsic mode function components using a variational mode decomposition algorithm.
[0010] S3. Calculate the sample entropy values of the multiple intrinsic mode function components and the correlation coefficients of the corresponding original acoustic signals; based on the sample entropy values and the correlation coefficients, divide each intrinsic mode function component into noise-dominant components and signal-dominant components.
[0011] S4. After performing wavelet threshold denoising on the selected noise dominant component, merge it with the signal dominant component to reconstruct the denoised signals at both ends.
[0012] S5. The improved generalized cross-correlation algorithm is used to process the signals at both ends of the noise reduction, and the time delay estimate is obtained by peak detection; the location of the leak point is calculated and determined based on the time delay estimate and the propagation speed of the signal in the pipeline.
[0013] Further, in step S1, the specific process of the bandpass filtering is as follows: calculate the Nyquist frequency, normalize the target frequency band, use a Butterworth type bandpass filter, obtain its transfer function coefficients by solving the difference equation, and process the original time-domain acoustic data in a zero-phase filtering manner.
[0014] Furthermore, in step S2, the variational mode decomposition algorithm decomposes the signal into a preset number of K band-limited eigenmode function components by constructing an augmented Lagrangian function and iteratively solving it using the alternating direction multiplier method.
[0015] The specific process of variational mode decomposition is as follows:
[0016] 2.1) Construct a variational model to decompose the filtered signal into multiple BIMF components;
[0017] 2.2) Obtain the one-sided spectrum of each BIMF component through Hilbert transform, modulate it to the fundamental frequency band, and construct the augmented Lagrangian function:
[0018] ,
[0019] Where α is the penalty factor and λ(t) is the Lagrange multiplier;
[0020] 2.3) The alternating direction multiplier algorithm is used to update the BIMF components and center frequency. k Iterate until the convergence condition is met, then stop iterating and output the BIMF components.
[0021] Further, in step S3, the division based on sample entropy and correlation coefficient specifically involves: determining the intrinsic mode function components with sample entropy values higher than a first threshold and correlation coefficients lower than a second threshold as noise-dominant components; and determining the intrinsic mode function components with sample entropy values lower than a third threshold and correlation coefficients higher than a fourth threshold as signal-dominant components, wherein the first threshold is 0.4, the second threshold is 0.1, the third threshold is 0.1, and the fourth threshold is 0.3.
[0022] BIMF components with a sample entropy value higher than 0.4 are considered noise-dominant components, while BIMF components with a sample entropy value lower than 0.1 are considered signal-dominant components.
[0023] The formula for calculating sample entropy is:
[0024]
[0025] Components with a correlation coefficient below 0.1 are considered noise-dominant, while those with a correlation coefficient above 0.3 are considered signal-dominant.
[0026] The Pearson correlation coefficient is used to measure the linear correlation between BIMF and the original signal:
[0027] ;
[0028] in For BIMF component samples, These are the original signal samples. The correlation coefficient of the noise-dominant component is less than 0.1, while the correlation coefficient of the signal-dominant component is greater than 0.3.
[0029] Further, in step S4, the wavelet thresholding denoising process includes: performing multi-level decomposition on the dominant noise component using the db6 wavelet basis; determining the threshold using the Stein unbiased risk estimation method; and applying a soft-hard thresholding tradeoff function to process the wavelet coefficients, wherein the soft-hard thresholding tradeoff function is:
[0030]
[0031] in, The processed wavelet coefficients, These are the original wavelet coefficients. To be the minimum risk threshold, As a regulating factor, The value range is 0.5.
[0032] Furthermore, the improved weighting function is calculated in the following manner:
[0033] (5.1.1) Perform Fourier transform on the noise reduction signals corresponding to the two hydrophones respectively to obtain the corresponding frequency domain signals;
[0034] (5.1.2) Calculate the cross power spectral density function and the respective auto-power spectral density function of the frequency domain signals;
[0035] (5.1.3) By calculating the coherence function and combining it with the self-power spectral density function and the coherence function, an improved weighting function W(ω) is obtained. The weighting function used in the improved generalized cross-correlation algorithm is:
[0036]
[0037] in, The meaning refers to the coherence function value of the two hydrophone noise reduction signals at the frequency point ω in the frequency domain. Let be the cross-power spectral density function of the noise-reduced signals corresponding to the two hydrophones. Let be the auto-power spectral density function of the noise-reduced signal corresponding to the first hydrophone; Let be the autopower spectral density function of the noise-reduced signal corresponding to the second hydrophone.
[0038] Furthermore, the time delay estimate is obtained by performing an inverse Fourier transform on the weighted cross-power spectral density function to obtain the cross-correlation function, and then solving for the time corresponding to the peak value of the cross-correlation function.
[0039] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:
[0040] This invention improves positioning accuracy in low signal-to-noise ratio environments by introducing a coherence function to enhance high coherence frequency bands and suppress low coherence frequency bands through improved time delay estimation after accurate component classification. This enhances anti-interference capabilities and adapts to various pipeline network environments. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the steps of a water supply pipeline leakage location method in an embodiment of the present invention.
[0042] Figure 2 This is an example diagram of VMD decomposition BIMF for a water supply pipeline leakage location method in an embodiment of the present invention.
[0043] Figure 3 This is a flowchart showing the steps of a water supply pipeline leakage location method before and after noise reduction in an embodiment of the present invention.
[0044] in Figure 3 A represents the noise reduction result; Figure 3 B represents the noise-reduced value; Detailed Implementation
[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0046] Reference Figure 1 As shown, the present invention provides a method for locating leaks in water supply pipelines, comprising:
[0047] Step 1: Signal acquisition and preprocessing includes the following steps:
[0048] S1.1 Raw time-domain acoustic data containing leakage signals are collected by hydrophones at both ends of the pipe, with a sampling rate of fs;
[0049] S1.2 Calculate the Nyquist frequency fn = 0.5 × fs, and perform bandpass filtering on the original time-domain acoustic data. The lower limit of the filtering frequency band is f1, and the upper limit is f2. f1 and f2 are dynamically set according to the pipe material and the characteristic frequency band of the leakage acoustic wave. The target frequency band [f1, f2] is normalized to [f1 / fn, f2 / fn]. Design a Butterworth type bandpass filter, whose transfer function coefficients are obtained by solving the difference equation. Use zero-phase filtering to process the signal and output filtered signals X(t) and Y(t).
[0050] The filtered signal output from S1.3 is used for leak location analysis.
[0051] Reference Figure 2 As shown, step 2: VMD decomposes the signal into BIMF components.
[0052] Variational mode decomposition (VMD) is used to decompose the preprocessed signal into multiple band-limited intrinsic mode functions (BIMFs). The specific steps are as follows:
[0053] S2.1 Constructing a variational model: Decomposing the signal into... BIMF components Each component satisfies the envelope. and instantaneous frequency Slowly changing conditions, namely:
[0054] S2.2 Frequency Domain Modulation and Optimization: Obtain the one-sided spectrum of each component through Hilbert transform, and introduce an exponential term. Modulate to the fundamental frequency band and construct the augmented Lagrangian function:
[0055]
[0056] in As a penalty factor, It is a Lagrange multiplier.
[0057] S2.3. Iterative Solution: The BIMF components are updated using the Alternating Direction Multiplier Algorithm (ADMM). and center frequency Iterate until the convergence condition is met.
[0058]
[0059] Ultimately, five BIMF components with different frequencies were obtained, avoiding the mode aliasing problem of Empirical Mode Decomposition (EMD). Figure 2 .
[0060] Step 3: Component screening based on sample entropy and correlation coefficient
[0061] S3.1 Sample Entropy Calculation: Calculate the sample entropy (SampEn) for each BIMF component to quantify the signal complexity.
[0062] Build 3D vector ;
[0063] Define vector distance ;
[0064] Calculation satisfies ( The proportion of the signal standard deviation The sample entropy is:
[0065]
[0066] The sample entropy value of the noise-dominant component is higher than 0.4, while the sample entropy value of the signal-dominant component is lower than 0.1.
[0067] S3.2 Correlation Coefficient Calculation: The Pearson correlation coefficient is used to measure the linear correlation between BIMF and the original signal. in For BIMF component samples, These are the original signal samples. The correlation coefficient of the noise-dominant component is less than 0.1, while the correlation coefficient of the signal-dominant component is greater than 0.3.
[0068] Component classification: Based on sample entropy and correlation coefficient, BIMF5 is classified as noise-dominant component, while BIMF0, BIMF1, and BIMF3 are classified as signal-dominant components.
[0069] Reference Figure 3 As shown, step 4: wavelet thresholding noise reduction processing
[0070] S4.1 Threshold Selection: The Stein unbiased risk threshold is adopted, and the threshold is determined by sorting the squares of the wavelet coefficients and calculating the minimum risk value. in This represents the minimum value of the squared wavelet coefficients after sorting.
[0071] S4.2 Threshold Function: A trade-off between soft and hard thresholds is chosen to balance signal feature preservation and smoothness.
[0072]
[0073] in As an adjustment factor, it balances feature preservation of hard thresholds and continuity of soft thresholds.
[0074] S4.3 Wavelet basis selection: The db6 wavelet basis is selected to balance the noise reduction effect and computational complexity. Its tight support and orthogonality are suitable for time-frequency localization analysis of pipeline leakage signals.
[0075] S4.4 Noise Reduction Process: Perform three-level wavelet decomposition on the dominant noise component, apply a threshold function to process the high-frequency coefficients, reconstruct the noise-reduced component through inverse wavelet transform, and merge it with the dominant signal component to obtain the final noise-reduced signal.
[0076] Step 5: Improved Generalized Cross-Correlation Delay Positioning
[0077] S5.1 Power Spectrum Calculation: A set of signals acquired by a hydrophone and processed by VMD algorithm and wavelet threshold noise reduction are as follows: Fourier transform converts a set of time-domain signals into frequency-domain signals.
[0078]
[0079]
[0080] Here, FFT stands for Fourier Transform.
[0081] The steps of Fourier transform are as follows:
[0082]
[0083]
[0084] Where T represents the entire time domain, This represents a time-domain signal, where j represents an imaginary number. Indicates frequency.
[0085] Calculate signal cross power spectral density function and calculate Their respective power spectral density functions .
[0086] S5.2 Improved weighting function calculation: using the cross-power spectral density function , self-power spectral density function Calculate the coherence function
[0087] ;
[0088] Then use the self-power spectral density function and coherence function The final weighting function:
[0089]
[0090] S5.3 Weighted Generalized Cross-Correlation Calculation: Calculate the weighted improved cross-power spectral density function. :
[0091]
[0092] Then, consider the above power spectral density function The cross-correlation function is obtained by performing an inverse Fourier transform.
[0093]
[0094] in This represents the inverse Fourier transform.
[0095] The steps for your Fourier transform are as follows:
[0096]
[0097] in, Representing the entire frequency domain, j is an imaginary number. For frequency, It is a time variable.
[0098] S5.4 Solve for the experimental estimate corresponding to the peak value through peak detection.
[0099]
[0100] S5.5 Calculate the leak location: based on time delay And the velocity c and the distance d between the two hydrophones, and the formulas: The distance between the final leak point and the first hydrophone can be obtained.
[0101] To verify the positioning accuracy of the water supply pipeline leakage location method of the present invention, a comparative experiment was conducted in a real water supply pipeline scenario, as follows:
[0102] The experimental subject was a DN300 cast iron water supply pipe with a total length of 350m. Piezoelectric hydrophones with a sampling rate of 10kHz were installed at both ends of the pipe (350m apart). The actual leak point was located at a distance of 176.69m from the first hydrophone at the pipe end. The experiment simulated urban traffic vibration noise (the noise amplitude was 3 times the leakage signal amplitude, and the signal-to-noise ratio was 15dB).
[0103] The leak points in the above scenarios were independently located using the cross-correlation method of the present invention and the conventional method of prior art, respectively, and the results are shown in Table 1.
[0104] Table 1
[0105]
[0106] The experimental data above show that the deviation between the positioning result of the method of the present invention and the actual leak location is 0.01m~0.24m, with an average deviation of only 0.122m; the deviation between the positioning result of the traditional cross-correlation method and the actual leak location is 0.37m~0.69m, with an average deviation of 0.482m. Compared with the traditional cross-correlation method, the positioning deviation of the method of the present invention is reduced by about 75%, which fully demonstrates that the present invention has better positioning accuracy in low signal-to-noise ratio environments.
[0107] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined in the claims, all of which should fall within the protection scope of the present invention.
Claims
1. A method for locating leaks in a water supply pipe, characterized in that, Includes the following steps: S1. Hydrophones are installed at both ends of the water supply pipeline to be tested to collect the acoustic signals of the water supply pipeline to be tested, and the acoustic signals are preprocessed by bandpass filtering. S2. The preprocessed acoustic signal is decomposed into multiple intrinsic mode function components using a variational mode decomposition algorithm. S3. Calculate the sample entropy values of the multiple intrinsic mode function components and the correlation coefficients of the corresponding original acoustic signals; based on the sample entropy values and the correlation coefficients, divide each intrinsic mode function component into noise-dominant components and signal-dominant components. S4. After performing wavelet threshold denoising on the selected noise dominant component, merge it with the signal dominant component to reconstruct the denoised signals at both ends. S5. A generalized cross-correlation operation is performed on the signals at both ends of the noise reduction using an improved weighting function, and a time delay estimate is obtained through peak detection; the location of the leak point is calculated and determined based on the time delay estimate and the signal propagation speed in the pipeline. In step S2, the variational mode decomposition algorithm constructs an augmented Lagrangian function and uses the alternating direction multiplier method to iteratively solve the problem, decomposing the signal into a preset number of K band-limited eigenmode function components. The specific process of variational mode decomposition is as follows: 2.1) Construct a variational model to decompose the filtered signal into multiple BIMF components; 2.2) Obtain the one-sided spectrum of each BIMF component through Hilbert transform, modulate it to the fundamental frequency band, and construct the augmented Lagrangian function: ; Where α is the penalty factor and λ(t) is the Lagrange multiplier; 2.3) update the BIMF components and center frequencies using the alternating direction method of multipliers k , iterate until the convergence condition is satisfied, stop the iteration and output the BIMF components; In step S3, the division based on sample entropy and correlation coefficient specifically involves: determining intrinsic mode function components with sample entropy values higher than a first threshold and correlation coefficients lower than a second threshold as noise-dominant components; and determining intrinsic mode function components with sample entropy values lower than a third threshold and correlation coefficients higher than a fourth threshold as signal-dominant components, wherein the first threshold is 0.4, the second threshold is 0.1, the third threshold is 0.1, and the fourth threshold is 0.
3. BIMF components with a sample entropy value higher than 0.4 are considered noise-dominant components, while BIMF components with a sample entropy value lower than 0.1 are considered signal-dominant components. The formula for calculating sample entropy is: ; Components with a correlation coefficient below 0.1 are considered noise-dominant, while those with a correlation coefficient above 0.3 are considered signal-dominant. The Pearson correlation coefficient is used to measure the linear correlation between BIMF and the original signal: ; wherein is the BIMF component sample, is the original signal sample, the correlation coefficient of the noise dominant component is lower than 0.1, and the correlation coefficient of the signal dominant component is higher than 0.
3.
2. A method of leak location in a water supply pipe according to claim 1 characterised in that, In step S1, the specific process of the bandpass filtering is as follows: calculate the Nyquist frequency, normalize the target frequency band, use a Butterworth type bandpass filter, obtain its transfer function coefficients by solving the difference equation, and process the original time-domain acoustic data in a zero-phase filtering manner.
3. The water supply line leak locating method of claim 1, wherein, In step S4, the wavelet thresholding denoising process includes: performing multi-level decomposition of the dominant noise component using the db6 wavelet basis; determining the threshold using the Stein unbiased risk estimation method; and applying a soft-hard thresholding tradeoff function to process the wavelet coefficients. The soft-hard thresholding tradeoff function is as follows: ; wherein, is the processed wavelet coefficient, is the original wavelet coefficient, is the minimum risk threshold, is the adjustment factor, has a value range of 0.
5.
4. The water supply line leak locating method of claim 1, wherein, The improved weighting function is calculated in the following way: (5.1.1) Fourier transform the two hydrophone corresponding de-noised signals respectively to obtain the corresponding frequency domain signals; (5.1.2) calculate the mutual power spectral density function and the respective self-power spectral density function of the frequency domain signals; (5.1.3) calculate the coherence function, and combine the self-power spectral density function and the coherence function to obtain an improved weighting function W (ω), wherein the improved generalized cross-correlation algorithm adopts the weighting function: wherein, is the coherence function value of the two hydrophone noise reduced signals at a frequency point ω in the frequency domain, is the cross power spectral density function of the two hydrophone corresponding noise reduced signals, is the auto power spectral density function of the first hydrophone corresponding noise reduced signal; is the auto power spectral density function of the second hydrophone corresponding noise reduced signal.
5. The water supply line leak locating method of claim 1, wherein, In step S5, the time delay estimation value is obtained by inversely Fourier transforming the weighted mutual power spectral density function to obtain a cross-correlation function, and solving the time corresponding to the peak value of the cross-correlation function.
Citation Information
Patent Citations
Pipeline leakage position positioning method based on acoustic signal processing
CN115234849A
Weighted improvement-based generalized cross-correlation time delay estimation method
CN118568475A
Pipeline leakage monitoring method and system
CN120596890A