Pipeline water leakage positioning method

By using a dual-channel dynamic fusion mechanism and dynamic state space modeling based on the Mamba algorithm, combined with physical sensing location coding, the problem of low positioning accuracy in existing pipeline leak detection methods is solved, achieving efficient and accurate leak location.

CN121093256APending Publication Date: 2025-12-09ZHEJIANG HAOKUO IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511161546.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-12-09

Smart Images

  • Figure CN121093256A_ABST
    Figure CN121093256A_ABST
Patent Text Reader

Abstract

The invention relates to a pipeline water leakage positioning method, which comprises the following steps of S1, installing piezoelectric accelerometer sensors at valves at two ends of a pipeline, and collecting sound signals in the pipeline; s2, performing MFCC (Mel Frequency Cepstrum Coefficient) feature extraction on the sound signals acquired by the two sensors to obtain a feature sequence corresponding to each sensor, and merging the MFCC feature sequences of the two sensors as the input of a model; s3, the merged feature sequence is input into a pipeline water leakage detection model for analysis, the water leakage detection model comprises an input projection layer, a causal convolution layer and a dynamic state space modeling layer (based on the Mama algorithm), dual-channel dynamic fusion, Mama dynamic state space and physical sensing position coding are adopted, synchronous detection and positioning are output in a multi-task joint mode, and the detection accuracy is improved. Sensitivity is improved, positioning errors are reduced, and real-time performance and multi-working-condition robustness are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline leak location, specifically a pipeline leak location method. Background Technology

[0002] Existing methods for detecting pipe leaks mainly focus on acoustic sensing and signal analysis. Utilizing piezoelectric sensors (such as piezoelectric accelerometers) to pick up acoustic vibration signals caused by pipe leaks is a common approach. For example, sensors are installed at both ends of the pipe to collect the sound of leaking water, and the leak point is located by analyzing the time difference between the arrival of the signals at the two locations. Simultaneously, signal analysis of the collected sound or pressure signals is also an important approach, including methods such as time-frequency domain feature extraction and pattern recognition. For instance, some studies have extracted features such as the Mel-frequency cepstral coefficients (MFCC) of the leaking sound and combined them with hidden Markov models or neural network models to identify whether a pipe is leaking, improving the reliability of leak detection in noisy environments. These approaches embody the leak detection principle based on piezoelectric acoustic sensing and signal analysis, determining the occurrence of a leak and estimating its location by picking up and processing the leaking sound signal.

[0003] However, existing technical solutions still have many shortcomings, as follows:

[0004] 1. Many leak detection methods rely solely on the sensor signal from a single channel, which is weak in modeling the time difference characteristics of the leakage sound wave propagating between different sensors. Furthermore, the models often cannot adapt to changes in the signal timing characteristics under different operating conditions, resulting in insufficient robustness.

[0005] 2. Many existing methods have fixed coding structures, making it difficult to incorporate physical constraint information in the sound wave propagation process. As a result, the accuracy of leak location is not high enough. Existing technologies cannot achieve efficient integration of leak detection and location. Leak judgment and location calculation often need to be performed separately, resulting in a complex process and limited accuracy. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of existing technologies, adapt to practical needs, and provide a method for locating pipeline leaks. This method addresses the problem that many current leak detection methods rely solely on single-channel sensor signals, have weak modeling capabilities for the time difference characteristics of leak sound waves propagating between different sensors, and often cannot adapt to changes in signal timing characteristics under different operating conditions, resulting in insufficient robustness. Furthermore, the coding structures of many existing methods are fixed, making it difficult to incorporate physical constraints during sound wave propagation, thus leading to insufficient leak location accuracy. Existing technologies struggle to achieve efficient integration of leak detection and location, often requiring separate execution of leak judgment and location calculation, resulting in complex processes and limited accuracy.

[0007] To achieve the objectives of this invention, the technical solution adopted is as follows: a method for locating pipe leaks is designed, comprising the following steps:

[0008] S1. Install piezoelectric accelerometer sensors at the valves at both ends of the pipeline to collect sound signals inside the pipeline;

[0009] S2. Perform MFCC (Mel-frequency cepstral coefficients) feature extraction on the sound signals collected by the two sensors to obtain the feature sequence corresponding to each sensor, and merge the MFCC feature sequences of the two sensors as the input of the model;

[0010] S3. Input the merged feature sequence into the pipeline leakage detection model for analysis. The leakage detection model includes an input projection layer, a causal convolution layer, and a dynamic state space modeling layer (based on the Mamba algorithm).

[0011] S4. In the water leakage detection model, a dual-channel dynamic fusion mechanism is used to process the feature signals of the two channels. The feature of sensor A is used as the main channel input and the feature of sensor B is used as the gated channel input to reflect the time difference of the water leakage sound wave propagating between the two sensors.

[0012] S5. The time-series state of the water leakage sound signal is modeled using a dynamic state-space modeling layer based on the Mamba algorithm, and the state transition matrix of the state-space model is adaptively adjusted according to the changes in input characteristics to realize the dynamic update of model parameters.

[0013] S6. Apply learnable physical perception location coding to the internal state of the model, combine the pre-established physical model of sound wave propagation with the dynamic interpolation mechanism, and embed the physical parameters related to the location of the leak into the model state representation.

[0014] S7. Through the multi-task output layer of the model, the probability of water leakage and the location coordinates of the leak in the pipe are output simultaneously.

[0015] Preferably, the piezoelectric accelerometer sensor is installed near the valves at both ends of the pipe to detect vibration and sound signals inside the pipe.

[0016] Preferably, the MFCC feature extraction includes preprocessing the sound signal, performing a Fourier transform, converting the spectrum to the Mel frequency scale through a Mel filter bank, and performing a discrete cosine transform on the filtered logarithmic energy spectrum to obtain the Mel frequency cepstral coefficients.

[0017] Preferably, the dual-channel dynamic fusion mechanism applies a gating signal generated from the features of sensor B to the main channel features of sensor A, and performs weighted modulation on the feature sequence of sensor A to fuse feature information from the two sensors.

[0018] Preferably, the input projection layer maps the merged dual-sensor features to a high-dimensional vector space of a preset dimension, which serves as the input to the causal convolutional layer and the dynamic state space modeling layer.

[0019] Preferably, the causal convolutional layer performs convolution operations on the feature sequence in a time-causal manner. In the convolution calculation, only the current and previous feature data are used at each time step, and information from future time steps is not used, thereby extracting time-related features and ensuring causality.

[0020] Preferably, the dynamic state space modeling layer uses a state space model to model the dynamic process of the leakage signal, including calculating the state equation of the next moment based on the state of the previous moment and the current input features, and calculating the output equation of the observed output based on the current state; the state space model is implemented based on the Mamba algorithm and can adaptively adjust the parameters of the state transition matrix according to the changes in input features to update the model state in real time.

[0021] Preferably, the physical sensing location encoding is based on a physical model of sound wave propagation in the pipe, and the hidden state of the model is encoded with location-related information; by introducing physical parameters such as the propagation speed and distance attenuation of sound waves in the pipe, and using a dynamic interpolation algorithm, the physical information related to the location of the leak is converted into a learnable vector representation and injected into the state space model.

[0022] Preferably, the multi-task output layer includes two output units: one output unit is used to output the probability value of water leakage in the pipeline, and the other output unit is used to output the location coordinates of the leak in the pipeline.

[0023] Preferably, the probability value of leakage is used to indicate the overall likelihood of leakage in the pipeline, and the leakage location coordinates are used to indicate the specific location of the leakage along the length of the pipeline.

[0024] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0025] 1. This invention introduces a dual-channel dynamic fusion mechanism to dynamically process the signals collected by two sensors through the main channel and the gated channel, adaptively modeling the arrival time difference of leakage sound waves between different sensors. This mechanism effectively enhances the model's ability to capture time difference signals, improves the sensitivity and accuracy of leakage detection in complex pipeline environments, and strengthens the feature representation's ability to characterize weak leakage signals.

[0026] 2. This invention employs a dynamic state-space model based on the Mamba algorithm to adaptively model the temporal characteristics of pipeline leakage sound signals. Compared with traditional RNN or Transformer architectures, this model has higher computational efficiency and state update speed while modeling long-term temporal dependencies. It can adjust the state transition matrix in real time according to changes in the input signal, thereby maintaining stable positioning performance under different operating conditions and noise conditions.

[0027] 3. The physical sensing location coding proposed in this invention combines the physical laws of sound wave propagation in pipes with dynamic interpolation algorithms, embedding physical information such as propagation speed and energy attenuation related to the leak location into the model's coding vector. This not only enhances the physical rationality of leak location prediction but also improves the model's interpretability, enabling it to maintain high positioning accuracy when faced with different pipe diameters, materials, and temperature and humidity conditions.

[0028] 4. This invention adopts a multi-task joint output structure, which integrates the leakage probability prediction and leakage location coordinate regression tasks into the same model framework and completes them synchronously. This avoids the delay and error accumulation caused by the separate detection and location process in traditional methods, shortens the response time of detection and location, and improves the overall efficiency and accuracy of leakage location. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the process of the present invention;

[0030] Figure 2 This is a schematic diagram of the leakage detection model of the present invention;

[0031] Figure 3 This is a schematic diagram of the multi-task output layer of the present invention. Detailed Implementation

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0033] A method for locating pipe leaks, see [link / reference] Figures 1 to 3 This includes the following steps:

[0034] S1. Install piezoelectric accelerometer sensors at the valves at both ends of the pipeline to collect sound signals inside the pipeline;

[0035] S2. Perform MFCC (Mel-frequency cepstral coefficients) feature extraction on the sound signals collected by the two sensors to obtain the feature sequence corresponding to each sensor, and merge the MFCC feature sequences of the two sensors as the input of the model;

[0036] S3. Input the merged feature sequence into the pipeline leakage detection model for analysis. The leakage detection model includes an input projection layer, a causal convolution layer, and a dynamic state space modeling layer (based on the Mamba algorithm).

[0037] S4. In the water leakage detection model, a dual-channel dynamic fusion mechanism is used to process the feature signals of the two channels. The feature of sensor A is used as the main channel input and the feature of sensor B is used as the gated channel input to reflect the time difference of the water leakage sound wave propagating between the two sensors.

[0038] S5. The time-series state of the water leakage sound signal is modeled using a dynamic state-space modeling layer based on the Mamba algorithm, and the state transition matrix of the state-space model is adaptively adjusted according to the changes in input characteristics to realize the dynamic update of model parameters.

[0039] S6. Apply learnable physical perception location coding to the internal state of the model, combine the pre-established physical model of sound wave propagation with the dynamic interpolation mechanism, and embed the physical parameters related to the location of the leak into the model state representation.

[0040] S7. Through the multi-task output layer of the model, the probability of leakage and the location coordinates of the leak in the pipe are output simultaneously.

[0041] Specifically, piezoelectric accelerometer sensors are installed near the valves at both ends of the pipeline to detect vibrations and sound signals within the pipeline.

[0042] More specifically, MFCC feature extraction includes preprocessing the audio signal, performing a Fourier transform, converting the spectrum to the Mel frequency scale using a Mel filter bank, and performing a discrete cosine transform on the filtered logarithmic energy spectrum to obtain the Mel frequency cepstral coefficients.

[0043] Furthermore, the dual-channel dynamic fusion mechanism applies a gating signal generated from the features of sensor B to the main channel features of sensor A, and then performs weighted modulation on the feature sequence of sensor A to fuse feature information from the two sensors.

[0044] Furthermore, the input projection layer maps the merged dual-sensor features to a high-dimensional vector space of a preset dimension, which serves as the input to the causal convolutional layer and the dynamic state space modeling layer.

[0045] It is worth noting that causal convolutional layers perform convolution operations on feature sequences in a temporally causal manner. In the convolution calculation, only the current and previous feature data are used at each time step, without utilizing information from future time steps, thereby extracting time-related features and ensuring causality.

[0046] It is worth noting that the dynamic state space modeling layer uses a state space model to model the dynamic process of the leakage signal, including calculating the state equation of the next time step based on the state of the previous time step and the current input features, and calculating the output equation of the observed output based on the current state. The state space model is implemented based on the Mamba algorithm and can adaptively adjust the parameters of the state transition matrix according to the changes in input features to update the model state in real time.

[0047] It is worth mentioning that the physical sensing location coding is based on the physical model of sound wave propagation in the pipe, and encodes the location-related information of the hidden state of the model. By introducing physical parameters such as the propagation speed and distance attenuation of sound waves in the pipe, and using a dynamic interpolation algorithm, the physical information related to the location of the leak is converted into a learnable vector representation and injected into the state space model.

[0048] Notably, the multi-task output layer includes two output units: one output unit outputs the probability value of pipe leakage, and the other output unit outputs the location coordinates of the leak in the pipe.

[0049] It is worth emphasizing that the probability value of leakage is used to indicate the overall likelihood of leakage in the pipeline, while the leakage location coordinates are used to indicate the specific location of the leakage along the length of the pipeline.

[0050] Example 1

[0051] Piezoelectric accelerometer sensors A and B were installed at the valves at both ends of a 50m long cast iron pipe. Five seconds of audio were collected between 1:00 AM and 5:00 AM at a sampling rate of 8000Hz. A 40-dimensional MFCC was calculated for each channel, and the main channel (A) and gated channel (B) were dynamically fused at the input to characterize the time difference of arrival (TDOA) signal. The fused features were then processed sequentially through input projection, causal convolution, Mamba-based dynamic state space modeling, and physical sensing position encoding before being fed into a multi-task output head to simultaneously provide the leakage probability and location coordinates. In tests involving 30 leak points and 10 leak-free conditions, totaling 800 samples, the detection accuracy was 96.8%, sensitivity was 97.4%, false alarm rate was 3.2%, average positioning error was 0.32m, and single-segment inference delay was ≤50ms.

[0052] Example 2

[0053] Improved sampling rate to 16000Hz

[0054] Under the piping and layout conditions of Example 1, only the sampling rate was increased to 16000Hz, while the rest of the process and hyperparameters remained the same. The high sampling rate enhanced the discernibility of high-frequency leakage details and improved robustness in micro-leakage scenarios. The test results showed a detection accuracy of 98.1%, sensitivity of 98.6%, false alarm rate of 2.1%, average location error of 0.25m, and inference delay of approximately 62ms.

[0055] Example 3

[0056] The effect of different sensor spacing was evaluated in a 100m long PVC pipe.

[0057] Two spacings, 5m and 20m, were used respectively, and the data acquisition and modeling process was the same as in Example 1. The results showed that at a spacing of 5m, the detection accuracy was 98.5%, the sensitivity was 98.9%, the false alarm rate was 1.8%, the average positioning error was 0.20m, and the delay was about 50ms; at a spacing of 20m, the detection accuracy was 96.0%, the sensitivity was 96.7%, the false alarm rate was 3.9%, the average positioning error was 0.38m, and the delay was about 50ms. This shows that even under the condition that the time difference signal-to-noise ratio decreases due to the increase in spacing, the present invention still maintains a positioning accuracy better than 0.4m.

[0058] Example 4

[0059] Evaluate the role of location coding mechanisms

[0060] Under the conditions of Example 1, the physical sensing position coding was replaced with fixed sinusoidal position coding; the detection accuracy was 96.1% with the fixed sinusoidal coding configuration, the average positioning error was 0.41m and the delay was about 49ms; when physical sensing position coding was used, the detection accuracy was improved to 96.8%, the average positioning error was reduced to 0.32m and the delay was about 50ms, which verified the effectiveness of incorporating physical priors such as propagation speed and distance attenuation and combining them with dynamic interpolation.

[0061] Comparative Example 1

[0062] Using the same audio and evaluation criteria as Example 1, the model was replaced with a traditional three-layer 1D-CNN (convolution, pooling, fully connected) without gated dual-channel fusion, Mamba layer, and physical location encoding. The input was simply a concatenation of two-channel features. The test results were: detection accuracy 91.5%, sensitivity 92.8%, false alarm rate 8.6%, average localization error 0.82m, and inference latency of about 40ms. Compared with Example 1, the accuracy was about 5.3 percentage points lower and the localization error was about 0.50m higher.

[0063] Comparative Example 2

[0064] Using the same data and settings as in Example 1, the model was replaced with a two-layer LSTM and the gated dual-channel fusion and physical location encoding were removed, with only feature concatenation as input. The test results showed a detection accuracy of 93.2%, sensitivity of 94.1%, false alarm rate of 6.5%, average localization error of 0.65m, and inference latency of approximately 120ms. Compared with Example 1, the accuracy was about 3.6 percentage points lower, the localization error was about 0.33m higher, and the latency increased by about 58%, demonstrating the limitations of traditional RNNs in long-term modeling and parallel efficiency.

[0065] The specific comparison data is shown in the table below:

[0066]

[0067]

[0068] Summarize

[0069] This invention exhibits stable and superior overall performance compared to control methods under various operating conditions. The core scheme, based on dual-channel dynamic fusion, Mamba dynamic state space, and physical sensing position encoding, achieves a detection accuracy of 96.8%, an average positioning error of 0.32m, and an inference delay of ≤50ms under conditions of 8000Hz sampling, cast iron pipe, and 50m depth. Increasing the sampling rate to 16000Hz further improves the accuracy to 98.1% and reduces the positioning error to 0.25m, with only a slight increase in latency of approximately 62ms.

[0070] In PVC pipes, although increasing the sensor spacing from 5m to 20m increased the positioning error from 0.20m to 0.38m, the overall detection accuracy remained at ≥96%, demonstrating robustness to different materials and arrangements. In comparison, the traditional 1D-CNN had an accuracy of 91.5% and an error of 0.82m, while the traditional LSTM had an accuracy of 93.2% and an error of 0.65m with a delay of about 120ms, both of which were significantly weaker than this invention. This indicates that the proposed solution has advantages in time difference modeling, long-range dependence, and real-time performance.

[0071] Furthermore, the physical sensing position coding, compared with the relatively fixed sinusoidal coding, reduced the positioning error from 0.41m to 0.32m, verifying the effectiveness of introducing the propagation mechanism and dynamic interpolation;

[0072] As can be seen from the above, the present invention achieves a better balance between accuracy, positioning precision and inference delay, and has good adaptability to changes in sampling frequency, sensor spacing and pipe material.

[0073] In addition, all components designed in this invention are general standard parts or components known to those skilled in the art. Their structure and principle can be known to those skilled in the art through technical manuals or conventional experimental methods. Those skilled in the art can fully implement them, so there is no need to elaborate. The content protected by this invention does not involve improvements to the internal structure and method.

Claims

1. A method for locating pipe leaks, characterized in that, Includes the following steps: S1. Install piezoelectric accelerometer sensors at the valves at both ends of the pipeline to collect sound signals inside the pipeline; S2. Perform MFCC feature extraction on the sound signals collected by the two sensors to obtain the feature sequence corresponding to each sensor, and merge the MFCC feature sequences of the two sensors as the input of the model; S3. Input the merged feature sequence into the pipeline leakage detection model for analysis. The leakage detection model includes an input projection layer, a causal convolutional layer, and a dynamic state space modeling layer. S4. In the water leakage detection model, a dual-channel dynamic fusion mechanism is used to process the feature signals of the two channels. The feature of sensor A is used as the main channel input and the feature of sensor B is used as the gated channel input to reflect the time difference of the water leakage sound wave propagating between the two sensors. S5. The time-series state of the water leakage sound signal is modeled using a dynamic state-space modeling layer based on the Mamba algorithm, and the state transition matrix of the state-space model is adaptively adjusted according to the changes in input characteristics to realize the dynamic update of model parameters. S6. Apply learnable physical perception location coding to the internal state of the model, combine the pre-established physical model of sound wave propagation with the dynamic interpolation mechanism, and embed the physical parameters related to the location of the leak into the model state representation. S7. Through the multi-task output layer of the model, the probability of water leakage and the location coordinates of the leak in the pipe are output simultaneously.

2. The method according to claim 1, characterized in that, The piezoelectric accelerometer sensor is installed near the valves at both ends of the pipeline to detect vibration and sound signals inside the pipeline.

3. The leak location method according to claim 1, characterized in that, The MFCC feature extraction includes preprocessing the audio signal, performing a Fourier transform, converting the spectrum to the Mel frequency scale using a Mel filter bank, and performing a discrete cosine transform on the filtered logarithmic energy spectrum to obtain the Mel frequency cepstral coefficients.

4. The leak location method according to claim 1, characterized in that, The dual-channel dynamic fusion mechanism applies a gating signal generated from the features of sensor B to the main channel features of sensor A, and then performs weighted modulation on the feature sequence of sensor A to fuse feature information from the two sensors.

5. The leak location method according to claim 1, characterized in that, The input projection layer maps the merged dual-sensor features to a high-dimensional vector space of a preset dimension, which serves as the input to the causal convolutional layer and the dynamic state space modeling layer.

6. The leak location method according to claim 1, characterized in that, The causal convolutional layer performs convolution operations on the feature sequence in a time-causal manner. In the convolution calculation, only the current and previous feature data are used at each time step, without using information from future time steps, thereby extracting time-related features and ensuring causality.

7. The leak location method according to claim 1, characterized in that, The dynamic state space modeling layer uses a state space model to model the dynamic process of the leakage signal, including calculating the state equation of the next moment based on the state of the previous moment and the current input features, and calculating the output equation of the observed output based on the current state. The state-space model is implemented based on the Mamba algorithm and can adaptively adjust the parameters of the state transition matrix according to changes in input features to update the model state in real time.

8. The leak location method according to claim 1, characterized in that, The physical sensing location encoding is based on a physical model of sound wave propagation in a pipe, and the hidden state of the model is encoded with location-related information. By introducing physical parameters such as the propagation speed and distance attenuation of sound waves in the pipe, and using a dynamic interpolation algorithm, the physical information related to the location of the leak is converted into a learnable vector representation and injected into the state space model.

9. The leak location method according to claim 1, characterized in that, The multi-task output layer includes two output units: one output unit is used to output the probability value of water leakage in the pipeline, and the other output unit is used to output the location coordinates of the leak in the pipeline.

10. The leak location method according to claim 9, characterized in that, The probability value of leakage is used to indicate the overall likelihood of leakage in the pipeline, and the leakage location coordinates are used to indicate the specific location of the leakage along the length of the pipeline.