A water supply network leakage noise detection method, system and medium
By constructing a physical model of leakage noise and generating simulation data, combining feature quantization and dynamic STFT processing, optimizing time-frequency images, and using a CNN classification model, pure acoustic end-to-end detection of leakage noise in water supply networks was achieved. This solves the problems of data scarcity and hardware dependence in existing technologies, and improves detection accuracy and efficiency.
Patent Information
- Application Number
- CN202510998412.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-21
AI Technical Summary
Existing water supply network leakage detection technologies suffer from problems such as data scarcity, complex environmental noise interference, insufficient time-frequency analysis, and inadequate model robustness, resulting in low detection efficiency and reliance on additional hardware, which increases costs.
A physical model of leakage noise is constructed based on fluid mechanics and sound propagation laws to generate simulation data. Feature quantization and dynamic short-time Fourier transform are performed in combination with measured data, time-frequency images are optimized, and a CNN classification model is used for pure acoustic end-to-end detection.
It achieves high-precision and low-cost detection of leakage noise in water supply networks, eliminates hardware dependence, improves detection efficiency and accuracy, and overcomes cognitive biases in multimodal data fusion.
Smart Images

Figure CN120508913B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pipe network acoustic detection, in particular to a water supply pipe network leakage noise detection method, system and medium. BACKGROUND
[0002] Water supply pipe network leakage detection is a key link to ensure the sustainable use of urban water resources, directly related to infrastructure safety, and accurate detection of water supply pipe network leakage helps to prevent secondary disasters such as foundation collapse and pipe network burst, reduces energy consumption of pump invalid pressurization, and avoids water waste through rapid repair, which is a key technical support for smart water to achieve water saving and emission reduction and improve urban resilience.
[0003] In order to accurately identify the city water supply pipe network noise collected by the noise recorder, judge whether there is a leakage situation, and improve the big data interpretation efficiency of technical personnel, the traditional water supply pipe network noise leakage detection technology usually adopts manual listening, noise recording, etc., with high misjudgment rate and low efficiency. Later, machine learning methods based on sound spectrum analysis gradually appeared, but they were often limited to manual feature (MFCC, energy spectrum) extraction, and still had the following technical problems at the detail level:
[0004] 1. Data level: The actual leakage data is scarce, the sample is insufficient in extreme scenarios (such as micro-leakage and high-pressure pipes), and the environmental noise interference is complex, resulting in poor model generalization and low recognition rate for small leakage holes and low signal-to-noise ratio samples;
[0005] 2. Preprocessing level: General filtering (such as band-pass filtering) cannot remove environmental noise interference overlapping with the leakage frequency band, resulting in low signal-to-noise ratio of time-frequency images and effective features being hidden;
[0006] 3. Time-frequency analysis level: Existing technologies generally believe that dynamically adjusting STFT parameters will increase computational complexity, but fixed STFT parameters cannot balance low-frequency resonant peaks and high-frequency transient pulses, resulting in fuzzy time-frequency structure of weak signals, incomplete leakage feature extraction, and difficulty in balancing computational complexity and feature information loss;
[0007] 4. Classification model level: Existing manual features (MFCC, i.e. Mel frequency cepstral coefficient) rely on prior knowledge and are difficult to capture nonlinear time-frequency patterns, resulting in high false positive rate in complex scenarios and insufficient model robustness.
[0008] The above technical problems form a vicious cycle, i.e. low-quality data + inefficient feature extraction leads to inevitable performance bottlenecks of the classification model.
[0009] To this end, Chinese patent CN119123338A, a method for monitoring leakage of urban and rural water supply network based on large model, proposes a technical route of "audio signal → spectrum heat map → CNN large model → phosphorus shrimp swarm algorithm positioning", which has made some improvements, but still has the following core problems:
[0010] 1. Data level: In order to make up for the problem of lack of extreme scene sample data, the patent relies on high-density sensor layout, collects water pressure data by adding multiple sub-monitoring points in the target pipeline, and constructs a target function by simulating leakage conditions. This is essentially a lack of acoustic detection accuracy, which requires additional hardware compensation, resulting in high cost, which violates the original intention of reducing hardware dependence in acoustic leak detection technology;
[0011] 2. Preprocessing level: Direct conversion of audio signal to spectrum heat map is easily disturbed by external noise. Although the patent uses pre-emphasis processing, there is no optimization measure specifically for environmental noise interference. Therefore, this general preprocessing operation still cannot effectively remove environmental noise, resulting in low signal-to-noise ratio of spectrum heat map;
[0012] 3. Time-frequency analysis level: The patent still uses fixed STFT parameters for conversion (such as pre-emphasis coefficient α in (0.9, 1)), which cannot balance low and high frequency characteristics, resulting in weak signal feature ambiguity and affecting the detection accuracy of subsequent CNN large model and phosphorus shrimp swarm positioning;
[0013] 4. Classification model level: Although the patent uses CNN large model for audio signal classification, model training relies on historical audio data, and the extreme scene samples of historical data are still scarce, resulting in poor generalization of the trained model. In addition, the phosphorus shrimp swarm algorithm positioning part still relies on the joint positioning of water pressure data and audio data, which has the cognitive bias of "leakage positioning must be multi-modal data fusion", which undoubtedly further increases the hardware layout demand and detection complexity. SUMMARY
[0014] In view of the above technical problems, the present application provides a water supply network leakage noise detection method, system and medium, aiming to improve the detection accuracy of water supply network leakage noise and eliminate hardware dependence, and realize efficient pure acoustic end-to-end pipe network leakage detection.
[0015] In a first aspect, the present application provides a water supply network leakage noise detection method, comprising the following steps:
[0016] A physical model of leakage noise is constructed based on fluid mechanics and sound propagation rules, which is used to simulate noise signals under different physical conditions;
[0017] Based on the physical model of the leakage noise, parametric simulation leakage noise data is generated to simulate the leakage noise data under extreme physical conditions;
[0018] The measured leakage noise data is obtained, and the measured leakage noise data and the set of simulated leakage noise data are taken as leakage noise sample data;
[0019] Based on the leakage noise sample data, the time domain statistical features and the frequency domain statistical features of the signal are quantified;
[0020] Based on the time domain statistical features and the frequency domain statistical features of the signal, the window function parameters are dynamically adjusted and short-time Fourier transform processing is performed to obtain a resolution-optimized time-frequency image;
[0021] A CNN classification model is constructed, and the CNN classification model is trained based on the resolution-optimized time-frequency image;
[0022] The measured leakage noise data is converted into a time-frequency image, input into the trained CNN classification model, and the prediction probability of the leakage noise and the environmental noise is output.
[0023] The technical concept of the present application is that physical modeling, parametric data generation, feature quantification, dynamic short-time Fourier transform adjustment and CNN training are deeply integrated. First, a leakage noise physical model is constructed based on fluid mechanics and sound propagation rules, parametric simulation leakage noise data covering extreme scenarios is generated, then high-quality samples are formed in combination with measured data, then the time domain statistical features and the frequency domain statistical features of the signal are quantified to accurately capture the signal characteristics, then the window function parameters (such as window type, window length and overlap rate) are dynamically adjusted to match the signal dynamics and perform short-time Fourier transform processing, thereby optimizing the time-frequency image resolution to completely extract low-frequency resonance peak and high-frequency transient pulse features, then a CNN classification model is trained based on the resolution-optimized time-frequency image to improve the model's ability to capture nonlinear time-frequency patterns, and finally, the measured leakage noise data is classified and predicted purely acoustically, abandoning the inertia of water pressure joint positioning and breaking the cognitive bias that "leakage positioning must be multi-modal data fusion".
[0024] In some embodiments, a physical model of the leakage noise is constructed based on fluid mechanics and sound propagation rules, including:
[0025] Obtain the pipe material parameters, leakage aperture and fluid pressure in the pipe of the water supply network;
[0026] Based on the pipe material parameters, leakage aperture and fluid pressure in the pipe of the water supply network, determine the reference amplitude of the leakage noise, and generate fluid turbulence simulation values;
[0027] Based on the pipe material parameters of the water supply network, determine the band-pass filter impulse response to simulate the frequency response characteristics of different pipe materials;
[0028] A physical model of the leak noise is constructed based on the reference amplitude of the leak noise, the fluid turbulence simulation value, and the band-pass filter impulse response.
[0029] In some embodiments, based on the physical model of the leak noise, simulation leak noise data is generated parametrically, including:
[0030] Adjusting the leak aperture and the fluid pressure in the pipeline parameters, generating enhanced parameters under extreme physical conditions based on the parametric generation rules;
[0031] Substituting the enhanced parameters into the physical model of the leak noise to obtain simulation leak noise data.
[0032] In some embodiments, the time domain statistical features include kurtosis, and based on the leak noise sample data, the time domain statistical features of the signal are quantified, including:
[0033] ,
[0034] Where Kurt represents the kurtosis of the signal, x(n) represents the signal, μ represents the mean of the signal, σ represents the standard deviation of the signal, and E represents the expectation operator;
[0035] The frequency domain statistical features include spectral centroid, and based on the leak noise sample data, the frequency domain statistical features of the signal are quantified, including:
[0036] Frame and window processing is performed on the leak noise sample data;
[0037] Discrete Fourier transform calculation is performed on each frame after window processing to obtain the amplitude of the signal at each frequency component;
[0038] The spectral centroid is calculated based on the amplitude of the signal at each frequency component.
[0039] In some embodiments, based on the time domain statistical features and the frequency domain statistical features of the signal, the window function parameters are dynamically adjusted and short-time Fourier transform processing is performed to obtain a resolution-optimized time-frequency image, including:
[0040] The kurtosis of the signal is compared with a preset kurtosis threshold in real time, if the kurtosis of the signal is greater than the preset kurtosis threshold, the window type is adjusted to Hamming window, if the kurtosis of the signal is less than or equal to the preset kurtosis threshold, the window type is adjusted to Hann window;
[0041] The spectral centroid is divided into a plurality of first frequency intervals, and the window length is adjusted according to the first frequency interval in which the spectral centroid of the signal is located, so that the spectral centroid value is inversely proportional to the selected window length;
[0042] The spectrum centroid is divided into a plurality of second frequency intervals, and the overlap rate is adjusted according to the second frequency interval in which the spectrum centroid of the signal is located, so that the spectrum centroid value is proportional to the selected overlap rate.
[0043] Based on the dynamically adjusted window type, window length and overlap rate, the signal is subjected to short-time Fourier transform processing to obtain a resolution-optimized time-frequency image.
[0044] In some embodiments, further comprising:
[0045] The leak loss noise sample data is subjected to a delay operation to obtain a delayed signal;
[0046] The delayed signal is input into an adaptive filter for filtering, and the filter weight is iteratively updated using an LMS algorithm.
[0047] The signal output by the filter is subjected to coherent accumulation to obtain a coherently accumulated output signal as preprocessed leak loss noise sample data.
[0048] In some embodiments, the signal output by the filter is subjected to coherent accumulation to obtain a coherently accumulated output signal, and the expression is:
[0049]
[0050] wherein m represents the number of accumulations, y(n) represents the signal output by the adaptive filter, i represents the total number of signals selected for coherent accumulation, and Δti represents a small delay increment of the ith signal. i
[0051] In some embodiments, the CNN classification model uses a ResNet network architecture.
[0052] In a second aspect, the present application provides a water supply network leak noise detection system, comprising:
[0053] A physical model construction module is configured to construct a physical model of leak noise based on fluid mechanics and sound propagation rules, and the physical model is used to simulate noise signals under different physical conditions.
[0054] A simulation data generation module is configured to generate parametric simulation leak noise data based on the physical model of leak noise to simulate leak noise data under extreme physical conditions.
[0055] A sample data integration module is configured to obtain measured leak noise data and integrate the measured leak noise data and the simulation leak noise data as leak noise sample data.
[0056] A statistical feature quantification module is configured to quantitatively obtain time-domain statistical features and frequency-domain statistical features of signals based on the leak noise sample data.
[0057] a time-frequency image optimization module, configured to dynamically adjust window function parameters and perform short-time Fourier transform processing based on time-domain statistical features and frequency-domain statistical features of the signal, to obtain a resolution-optimized time-frequency image;
[0058] a classification model construction module, configured to construct a CNN classification model and train the CNN classification model based on the resolution-optimized time-frequency image;
[0059] a leakage and loss noise detection module, configured to convert measured leakage and loss noise data into a time-frequency image, input the trained CNN classification model, and output predicted probabilities of leakage and loss noise and environmental noise.
[0060] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the water supply network leakage and loss noise detection method according to the foregoing.
[0061] The present application has at least the following beneficial technical effects:
[0062] 1. The water supply network leakage and loss noise detection method, system and medium, by deeply integrating physical modeling, parameterized data generation, feature quantization, dynamic short-time Fourier transform adjustment and CNN training, realize pure acoustic end-to-end classification prediction of measured leakage and loss noise data. Specifically, the physical modeling of leakage and loss noise ensures that the simulation data in extreme scenarios conforms to the real fluid mechanics and acoustic laws, and combines with the measured data to form high-quality leakage and loss noise sample data, so that the time-domain statistical features and frequency-domain statistical features of the sample data can be more accurately quantified, and the window function parameters of the short-time Fourier transform are dynamically adjusted to generate higher resolution time-frequency images, providing high-robustness input for the CNN classification model. The parameters of each link are automatically derived from physical properties, thereby breaking the vicious cycle of "data scarcity-feature ambiguity-model generalization difference" globally and collaboratively, abandoning the inertia of water pressure joint positioning, breaking the cognitive bias of "leakage and loss positioning must be multi-modal data fusion", effectively solving the problems of insufficient extreme scenario samples, large environmental noise interference, imbalance between computational complexity and feature information loss, and high cost caused by high dependence on additional hardware (such as water pressure sensors) in the prior art, significantly improving the detection accuracy of water supply network leakage and loss noise, eliminating hardware dependence, and realizing efficient pure acoustic end-to-end classification;
[0063] 2、The application is based on the laws of fluid mechanics and sound propagation to construct a physical model of leakage noise. On the basis of the physical model of leakage noise, extreme scene simulation noise signal samples conforming to the physical laws are directly generated by adjusting the relevant parameters of the pipeline, effectively solving the technical problems of scarcity and uneven distribution of measured data. At the same time, the idea of combining physical modeling and data enhancement in the application is not simply generating data with existing GANs, but simulating the leakage acoustic characteristics of different pipe materials and pressures based on fluid mechanics and sound propagation laws, making the subsequent analysis steps closer to the real scene, and laying a good data foundation for eliminating the need for water pressure sensors through pure acoustic methods;
[0064] 3、The frequency distribution of environmental noise is relatively dispersed, and the energy distribution of the main frequency band of part of the signal exists bending and low frequency phenomenon; while the main frequency band energy of leakage noise is relatively continuous and concentrated, and the frequency range is moderate. Therefore, according to the characteristic difference between leakage noise and environmental noise, the adaptive filtering strategy of optimizing the STFT parameters of the time-frequency characteristics of leakage noise is designed. Specifically, according to the time domain statistical characteristics of the signal waveform, the optimal scheme of spectrum leakage control and resolution enhancement (window function and kurtosis linkage) is adaptively selected, according to the distribution characteristics of signal energy in frequency domain, the balance point of time resolution and frequency resolution (window length and spectral centroid linkage) is adaptively adjusted, according to the signal frequency characteristics, the time-frequency grid density is optimized twice to ensure the continuity of the characteristics while improving the calculation efficiency (overlap rate and spectral centroid linkage twice), so as to better suppress the environmental noise in the leakage noise, but retain the inherent characteristics of the environmental noise, providing a good classification basis for the training of the subsequent CNN classification model. At the same time, existing technologies generally believe that dynamically adjusting parameters will increase the calculation complexity, so they usually use fixed STFT parameters. However, through the lightweight calculation of the statistical characteristics of the signal (i.e. kurtosis and spectral centroid), the application can realize the real-time adaptive adjustment of the window function parameters (window type, window length, overlap rate), thereby generating resolution-optimized time-frequency images, realizing parameterized adaptive STFT time-frequency analysis, avoiding information loss of manual features, completely capturing leakage characteristics, effectively improving time-frequency feature clarity, high-frequency transient positioning accuracy and low-frequency calculation efficiency, so that the time-frequency representation always matches the physical characteristics of the current signal, which helps to improve the micro-leakage detection rate of the water supply network;
[0065] 4、Traditional band-pass filter cannot separate environmental noise interference overlapping with leakage frequency band, and the statistical characteristics of environmental noise and leakage signal are similar, so conventional filtering will cause signal distortion, and there is a technical problem of insufficient non-stationary noise suppression, and the signal-to-noise ratio of micro-leakage is usually lower than-10dB, and the existing technical method is difficult to effectively extract weak signal, such as the signal-to-noise ratio of the spectrum thermodynamic diagram is low, which will cover the effective features. Therefore, the present application utilizes the wide frequency correlation of the leakage signal (environmental noise is not correlated), destroys the correlation of the interference signal by delay J, and then uses the current input x(n) as the expected output, forcing the filter to track the signal changes, without presetting the reference signal, which can adapt to non-stationary environment, and then utilize the periodicity of the leakage signal (such as pipe resonance), and realize coherent enhancement through phase fine tuning Di, separate the same frequency noise, effectively improve the signal-to-noise ratio, provide high signal-to-noise ratio input signal for subsequent time-frequency analysis, reduce the calculation error of spectrum centroid / peakness, and further optimize the selection of STFT parameters, and avoid the parameter selection error caused by environmental noise interference.
[0066] Other features and advantages of the present application will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0067] The present application will be further described below in combination with the drawings:
[0068] Figure 1 The flow chart of the water supply network leakage noise detection method of the first embodiment of the present application.
[0069] Figure 2 The pre-and post-processing comparison diagram of the second embodiment of the present application.
[0070] Figure 3 The structure schematic diagram of the water supply network leakage noise detection system of the third embodiment of the present application. DETAILED DESCRIPTION
[0071] The technical solutions of the embodiments of the present application will be explained and described below in combination with the drawings of the embodiments of the present application, but the following embodiments are only preferred embodiments of the present application, not all. Based on the embodiments in the embodiments, other embodiments obtained by those skilled in the art without creative labor all belong to the protection scope of the present application.
[0072] In the following description, the appearance of terms such as "in", "out", "up", "down", "left", "right" and the like indicates the orientation or positional relationship only for the convenience of describing the embodiments and simplifying the description, and does not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore cannot be understood as a limitation of the present application.
[0073] Embodiment one:
[0074] Please refer to the attached Figure 1 , Figure 1 A flowchart of a water supply network leakage noise detection method provided by an embodiment of the present specification is shown.
[0075] As Figure 1 shown, the water supply network leakage noise detection method can at least include the following steps:
[0076] S1, a physical model of leakage noise is constructed based on fluid mechanics and sound propagation rules, and the physical model is used to simulate noise signals under different physical conditions.
[0077] Specifically, according to the leakage noise characteristics and prior information, in this embodiment, the physical model of leakage noise is constructed based on fluid mechanics and sound propagation rules, including:
[0078] S11, obtaining pipe material parameters, leakage aperture and fluid pressure in the pipe of the water supply network;
[0079] S12, determining the reference amplitude A0 of the leakage noise based on the pipe material parameters, the leakage aperture d and the fluid pressure P in the pipe of the water supply network, and generating a fluid turbulence simulation value ΔA·ξ(n).
[0080] It can be understood that the reference amplitude A0 represents the average energy of the leakage noise, which is used to establish the physical correlation of pressure-aperture-sound energy, and can be pre-designed according to the actual leakage scene of the water supply network, which is not limited in this embodiment. For example:
[0081] ,
[0082] where ΔA is the empirical fluctuation intensity (for example, ΔA=0.3A0), represents a Gaussian white noise, and the fluid turbulence simulation value ΔA·ξ(n) is used to simulate the random fluctuation characteristics of fluid turbulence.
[0083] S13, determining the band-pass filter impulse response h(n) based on the pipe material parameters of the water supply network, so as to simulate the frequency response characteristics of different pipe materials, such as 2 kHz for steel and 800 Hz for PVC.
[0084] S14, based on the reference amplitude of the leakage noise, the fluid turbulence simulation value and the band-pass filter impulse response, a physical model of the leakage noise is constructed, which can be represented as:
[0085] ,
[0086] wherein, represents a slowly varying random amplitude, A0 is the reference amplitude, ΔA is the empirical fluctuation intensity (for example, ΔA=0.3A0), wherein, ΔA·ξ(n) represents a fluid turbulence simulation value, g(n) represents a Gaussian white noise, h(n) represents a band-pass filter impulse response, and n represents a time variable.
[0087] S2, based on a physical model of leak noise, parameterized simulation leak noise data is generated to simulate leak noise data under extreme physical conditions.
[0088] For example, the extreme scenarios include, but are not limited to, a small leak hole (d<5mm), a high pressure working condition (P>0.5MPa), and the like.
[0089] Specifically, in the embodiment, based on the physical model of leak noise, the parameterized simulation leak noise data is generated, including:
[0090] S21, adjusting the leak hole diameter and the fluid pressure in the pipeline, and generating enhanced parameters under extreme physical conditions based on the parameterized generation rule.
[0091] The parameterized generation rule can be pre-designed according to the scarce extreme scenarios, which is not limited in the embodiment. For example, the parameterized generation rule can include enhanced parameters under a high pressure pipeline (P>0.5MPa) working condition, which is represented as:
[0092]
[0093] That is, by shifting the angular frequency to low frequency, the pipe wall resonance effect caused by high pressure is simulated.
[0094] S22, substituting the enhanced parameters into the physical model of leak noise to obtain the simulation leak noise data.
[0095] Further, the simulation leak noise data can also be combined with background environmental noise (such as pink noise with 1 / f attenuation in urban environment, white noise + fan harmonics in suburban environment) and interference pulses or instrument vibration to obtain a synthesized signal as the final simulation noise data, which is not limited in the embodiment.
[0096] It can be understood that traditional data enhancement (such as noise addition, time shift) cannot generate acoustic characteristics conforming to the laws of fluid mechanics, and the embodiment constructs a physical model of leakage noise based on the laws of fluid mechanics and sound propagation. On the basis of the physical model of leakage noise, extreme scene simulation noise signal samples conforming to the physical law are directly generated by adjusting the related parameters of the pipeline, effectively solving the technical problems of scarcity and uneven distribution of measured data. At the same time, the idea of combining physical modeling and data enhancement in the embodiment is not simply generating data with existing GANs, but simulating leakage acoustic characteristics of different pipe materials and pressures based on the laws of fluid mechanics and sound propagation, making the subsequent analysis steps closer to the real scene, and laying a good data foundation for eliminating the need for water pressure sensors through pure acoustic methods.
[0097] S3, obtaining measured leakage noise data, and taking the measured leakage noise data and the set of simulated leakage noise data as leakage noise sample data.
[0098] S4, quantifying the time domain statistical characteristics and frequency domain statistical characteristics of the signal based on the leakage noise sample data.
[0099] Specifically, in the embodiment, the time domain statistical characteristics include kurtosis, and the time domain statistical characteristics of the signal are quantified based on the leakage noise sample data, including:
[0100] ,
[0101] Where Kurt represents the kurtosis of the signal, x(n) represents the signal, μ represents the mean of the signal, σ represents the standard deviation of the signal, and E represents the expectation operator.
[0102] It can be understood that the preferred embodiment adopts kurtosis as a time domain statistical characteristic to evaluate the non-stationarity and frequency distribution of the signal, which helps to capture high-frequency transient pulses.
[0103] Specifically, in the embodiment, the frequency domain statistical characteristics include spectral centroid, and the frequency domain statistical characteristics of the signal are quantified based on the leakage noise sample data, including:
[0104] S41, frame and window processing is performed on the leakage noise sample data.
[0105] Where frame indicates that the signal x[n] is divided into short-time frames with a length of M, and window indicates that a window function is applied to reduce spectral leakage, that is, the sampling signal x win [n] after window processing is x[n]·w[n].
[0106] S42, discrete Fourier transform (DFT) calculation is performed on each frame after window processing to obtain the amplitude X(f) of the signal at each frequency component;
[0107] S43, the spectral centroid is calculated based on the amplitude of the signal at each frequency component, which can be expressed as:
[0108]
[0109] where f k represents the physical frequency (Hz) corresponding to the kth frequency component, fs represents the sampling rate, and M represents the length of the signal x win [n], and the influence of uniformly distributed noise is automatically weakened by the denominator.
[0110] Further, the calculated spectral centroid can also be normalized to facilitate subsequent uniform threshold judgment.
[0111] It can be understood that the fixed frequency band energy used in traditional leakage detection cannot adapt to the acoustic characteristics of different pipe materials (steel / PVC), but the actual leakage frequency will shift due to changes in pressure and pipe material, resulting in unstable features. The conventional spectral analysis easily ignores the low-frequency sound waves generated by the high-pressure pipeline leakage, and the high-frequency characteristics of the micro-leakage are easily masked by noise, which has poor working condition adaptability. Therefore, the embodiment preferably uses the spectral centroid, which is a frequency domain statistical feature related to the fundamental frequency of the pipeline vibration, to dynamically reflect the main frequency position.
[0112] S5, based on the time domain statistical features and frequency domain statistical features of the signal, dynamically adjusting the window function parameters and performing short-time Fourier transform processing to obtain a resolution-optimized time-frequency image.
[0113] Specifically, in the embodiment, based on the time domain statistical features and frequency domain statistical features of the signal, the window function parameters are dynamically adjusted and short-time Fourier transform processing is performed to obtain a resolution-optimized time-frequency image, including:
[0114] S51, the kurtosis of the signal is compared with the preset kurtosis threshold in real time, if the kurtosis of the signal is greater than the preset kurtosis threshold, the window type is adjusted to Hamming window, if the kurtosis of the signal is less than or equal to the preset kurtosis threshold, the window type is adjusted to Hann window.
[0115] For example, the preset kurtosis threshold is 5, which is obtained by statistical analysis of historical noise data.
[0116] It can be understood that, considering that high-kurtosis signals usually contain sharp burst components, therefore, the Hamming window with lower sidelobes is selected in the embodiment, which helps to suppress spectral leakage; low-kurtosis signals are relatively stable, therefore, the Hann window is selected in the embodiment, which can provide slightly higher main lobe resolution.
[0117] S52, divide the spectral centroid into a plurality of first frequency intervals, and adjust the window length according to the first frequency interval in which the spectral centroid of the signal is located, so that the spectral centroid value is inversely proportional to the selected window length.
[0118] For example, the normalized spectral centroid C∈[0,1] is discretely mapped to the preset window length L set {256, 512, 1024, 2048}, which can be represented as:
[0119] ,
[0120] It can be understood that in the embodiment, when the signal energy is concentrated in the high frequency band (C is larger), a short window (256 or 512) is used to improve the time resolution and accurately capture the weak transient characteristics of rapid changes; when the energy is low frequency (C is smaller), a long window (1024 or 2048) is used to reduce the frequency sampling interval and improve the frequency resolution.
[0121] It can be understood that in the embodiment, the extreme scene characteristics (such as low-frequency resonance of high-pressure pipeline) in the simulation data generated by the physical model can trigger the long window mode to ensure complete representation of the time-frequency image.
[0122] S53, divide the spectral centroid into a plurality of second frequency intervals, and adjust the overlap rate according to the second frequency interval in which the spectral centroid of the signal is located, so that the spectral centroid value is proportional to the selected overlap rate.
[0123] For example, based on the normalized spectral centroid C∈[0,1] for discrete selection, the overlap rate O can be represented as:
[0124] ,
[0125] It can be understood that in the embodiment, when there are more high-frequency components (C is high), a larger overlap rate is used to ensure the smoothness of the slices between consecutive frames, that is, to ensure the time-frequency continuity of the high-frequency transient signal and avoid loss of information between frames; when the low frequency is dominant, the change is slow, and the overlap rate is reduced to reduce the redundant calculation amount.
[0126] S54, based on the dynamically adjusted window type, window length and overlap rate, the signal is subjected to short-time Fourier transform processing to obtain a resolution-optimized time-frequency image. The spectral value of the resolution-optimized time-frequency image at time index m and frequency f can be represented as:
[0127] ,
[0128] Wherein, L represents the dynamically adjusted window length, O represents the dynamically adjusted overlap rate, represents the dynamically adjusted window function, n m represents the starting missing noise sample of the mth frame.
[0129] It can be understood that the frequency distribution of the environmental noise is relatively dispersed, and the main frequency band energy distribution of part of the signal exists bending and low frequency phenomenon; and the main frequency band energy of the leakage noise is relatively continuous and concentrated, and the frequency range is moderate. Therefore, according to the characteristic difference between the leakage noise and the environmental noise, an adaptive filtering strategy of optimizing the STFT parameters of the time-frequency characteristics of the leakage noise is designed. Specifically, according to the pulse characteristics of the signal waveform, the optimal scheme of spectrum leakage control and resolution enhancement (window function and kurtosis linkage) is adaptively selected, according to the distribution characteristics of the signal energy in the frequency domain, the balance point of the time resolution and the frequency resolution (window length and spectral centroid linkage) is adaptively adjusted, and the time-frequency grid density is optimized according to the signal frequency characteristics, so as to ensure the continuity of the characteristics and improve the calculation efficiency (secondary linkage of overlap rate and spectral centroid), thereby better suppressing the environmental noise in the leakage noise, but retaining the inherent characteristics of the environmental noise, and providing a good classification basis for the training of the subsequent CNN classification model.
[0130] It can be understood that although the STFT generates a time-frequency diagram, which is a common operation in signal processing, the dynamic optimization of the STFT parameters according to the time-frequency characteristics of the leakage noise to balance the low-frequency resolution and the high-frequency response is the innovative design of the embodiment. For example, weak transient signal capture (short window STFT), low-frequency resonance separation (long window STFT), etc. are customized for the acoustic characteristics of the pipe network. At the same time, the prior art generally considers that dynamic adjustment of parameters will increase the calculation complexity, so fixed STFT parameters are usually used. However, through the lightweight calculation of the statistical characteristics (i.e. kurtosis and spectral centroid) of the signal, the real-time adaptive adjustment of the window function parameters (window type, window length, overlap rate) can be realized, so as to generate a resolution-optimized time-frequency image, realize parameterized adaptive STFT time-frequency analysis, avoid information loss of manual features, completely capture the leakage characteristics, effectively improve the time-frequency feature clarity, high-frequency transient positioning accuracy and low-frequency calculation efficiency, so that the time-frequency representation always matches the physical characteristics of the current signal, which helps to improve the micro-leakage detection rate of the water supply pipe network.
[0131] S6, constructing a CNN classification model, training the CNN classification model based on the resolution-optimized time-frequency image.
[0132] In the embodiment, the specific architecture of the CNN classification model is not limited, as long as the classification and discrimination of the time-frequency image can be realized.
[0133] The implementation manner of training the CNN classification model based on the resolution-optimized time-frequency image is: according to the leak loss noise and the environmental noise type in the leak loss noise sample data, the resolution-optimized time-frequency image is labeled, a data set for training is prepared, the data set is divided into a training set and a verification set, and then input to the CNN classification model for training, and the trained CNN classification model is saved, and the model precision is evaluated according to the accuracy, F1 score and the like.
[0134] It can be understood that, by means of physical modeling data enhancement, the CNN classification model can effectively learn the extreme scene mode, and the model generalization is improved. On the basis of the physical modeling enhanced data, the high-resolution time-frequency image generated by dynamically optimizing the STFT parameter according to the time-frequency characteristics of the leak loss noise is provided as the high-quality input of the CNN classification model, the information loss of the manual features is avoided, the CNN deep learning model is used to learn the high-resolution time-frequency image features, the binary classification discrimination of the leak loss noise and the environmental noise is provided, the additional hardware dependence (without water pressure sensor and the like for auxiliary positioning) is eliminated, the efficient pure acoustic end-to-end pipe network leak loss detection is realized, and the acoustic detection precision is improved.
[0135] Preferably, in the embodiment, the CNN classification model adopts the ResNet network architecture.
[0136] It can be understood that, in the ResNet:
[0137] 1. Shallow convolution: extract edge / texture features (such as the horizontal stripe in the time-frequency image corresponding to the periodic interference);
[0138] 2. Deep convolution: capture abstract pattern structure (such as the combination feature of low-frequency continuous spectrum + high-frequency sparse pulse).
[0139] It can be understood that, the embodiment further utilizes the residual skip connection of the ResNet to solve the gradient vanishing problem of the deep network, retains the multi-scale features of the adaptive STFT output, and avoids the feature attenuation of the deep network to the weak signal (such as the low-frequency leakage), that is, the adaptive STFT and the ResNet cooperatively solve the contradiction between the time-frequency resolution and the feature loss problem.
[0140] S7, converting the measured leak loss noise data into a time-frequency image, inputting the trained CNN classification model, and outputting the prediction probability of the leak loss noise and the environmental noise as the leak loss noise detection result of the water supply pipe network.
[0141] Further, the leak loss result can also be determined according to the output prediction probability of the leak loss noise and according to the preset decision rule. For example, the prediction probability of the leak loss noise > 0.85→determine the leak loss.
[0142] In summary, the water supply network leakage noise detection method provided by the embodiment realizes pure acoustic end-to-end classification prediction of measured leakage noise data by deeply integrating physical modeling, parameterized data generation, feature quantization, dynamic short-time Fourier transform adjustment, and CNN training. Specifically, the physical modeling of leakage noise ensures that the simulation data in extreme scenarios conforms to the real fluid mechanics and acoustic laws, and combines with the measured data to form high-quality leakage noise sample data, thereby more accurately quantizing the time domain statistical features and frequency domain statistical features of the sample data, and driving the dynamic adjustment of the window function parameters of the short-time Fourier transform to generate higher resolution time-frequency images, providing a high-robustness input for the CNN classification model. The parameters of each link are automatically derived from the physical properties, thereby breaking the vicious cycle of "data scarcity-feature ambiguity-model generalization difference" globally and collaboratively, abandoning the inertia of water pressure joint positioning, breaking the cognitive bias that "leakage positioning must be multi-modal data fusion", effectively solving the problems of insufficient extreme scenario samples, high environmental noise interference, imbalance between computational complexity and feature information loss, and high cost caused by high dependence on additional hardware (such as water pressure sensors) in the prior art, and significantly improving the detection accuracy of water supply network leakage noise, eliminating hardware dependence, and realizing efficient pure acoustic end-to-end classification.
[0143] Embodiment Two:
[0144] The embodiment only describes the part that is different from Figure 1 The technical concept of the rest of the design is similar to that of Embodiment One, and will not be described here again.
[0145] In order to avoid the influence of environmental noise (such as vehicle vibration and water pump harmonic) on the calculation of kurtosis and spectral centroid, and to enable it to stably guide the subsequent window function parameter optimization, a specific noise suppression link is designed. Specifically, in the embodiment, after S3 "collecting the measured leakage noise data and the simulated leakage noise data as leakage noise sample data", before S4, it further includes:
[0146] A1, delaying the leakage noise sample data x(n) to obtain a delayed signal.
[0147] Specifically, the delayed signal vector X(n-J) = [x(n-J), x(n-J-1), …, x(n-J-N+1)] T , where N represents the adaptive filter order, J represents the delay length, which can be determined according to the signal sampling rate fs and the noise correlation time, for example, J = fs / 2f min , f min is the lowest frequency of the leakage signal.
[0148] A2, input the delayed signal into the adaptive filter for filtering, and update the filter weight iteratively using the LMS algorithm.
[0149] Specifically, it can be expressed as:
[0150] ,
[0151] ,
[0152] ,
[0153] wherein y(n) represents an output signal of the adaptive filter, W(n) represents a weight vector of the adaptive filter, e(n) represents an error, the current time signal x(n) is used as an expected output, the filter weight is adjusted through adaptive error feedback, the technical problem of overcoming non-stationary noise interference is solved, μ represents an update step factor of the LMS algorithm, W(n+1) represents updating the weight in the negative gradient direction, and LMS light iteration is realized.
[0154] A3, coherently accumulating the signal output by the filter to obtain a coherently accumulated output signal as the preprocessed leakage and loss noise sample data.
[0155] Specifically, it can be expressed as:
[0156] ,
[0157] wherein m represents the number of coherent accumulations, y(n) represents the signal output by the adaptive filter, i represents the total number of signals selected for coherent accumulation, Δ i represents a small delay increment of the i-th signal.
[0158] It can be understood that, in the embodiment, the coherent accumulation of the signal output by the filter is to superimpose through phase alignment of multiple signals, to enhance the coherent component of the leakage and loss signal, and to solve the technical problem of low weak signal energy.
[0159] Please refer to the accompanying Figure 2 , Figure 2 Fig. 2 shows a comparison diagram before and after preprocessing provided by an embodiment of the present specification. As shown in Figure 2 , Figure 2 Fig. 2(a) is a time-frequency image before filtering, Figure 2 Fig. 2(b) is a time-frequency image after filtering using the preprocessing scheme provided by the embodiment, it can be seen that, Figure 2 Fig. 2(a) has strong environmental noise interference, and the frequency band of the leakage and loss noise cannot be clearly distinguished; while Figure 2It can be clearly distinguished from the 2(b) that the leakage noise is mainly concentrated in the frequency band near the center frequency 900Hz, so it shows that after the preprocessing scheme provided by the embodiment is adaptively filtered, the environmental noise interference can be effectively suppressed, the leakage noise can be accurately extracted, and good signal data basis is provided for subsequent time-frequency analysis and deep learning model training, which helps to improve the detection accuracy.
[0160] It can be understood that the conventional band-pass filter cannot separate the environmental noise interference overlapping with the leakage frequency band, and the environmental noise and the leakage signal have similar statistical characteristics. The conventional filtering will cause signal distortion, and there is a technical problem of insufficient non-stationary noise suppression. Moreover, the signal-to-noise ratio of the micro-leakage is usually lower than -10dB, and the prior art method is difficult to effectively extract the weak signal. For example, the signal-to-noise ratio of the spectrum thermodynamic diagram is low, which will cover the effective features. Therefore, the embodiment utilizes the wide frequency correlation of the leakage signal (environmental noise is not correlated), destroys the correlation of the interference signal by delaying J, and then uses the current input x(n) as the expected output to force the filter to track the signal changes without presetting the reference signal. The adaptive non-stationary environment is followed by the periodic repetition of the leakage signal (such as pipeline resonance), and the phase fine-tuning Δ i The coherence enhancement is realized, the same frequency noise is separated, the signal-to-noise ratio is effectively improved, the high signal-to-noise ratio input signal is provided for subsequent time-frequency analysis, the calculation error of the spectrum centroid / peak degree is reduced, and then the STFT parameter selection is optimized to avoid the parameter misselection caused by the environmental noise interference.
[0161] Embodiment three:
[0162] Please refer to the accompanying Figure 3 , Figure 3 A structure schematic diagram of a water supply network leakage noise detection system provided by an embodiment of the present specification.
[0163] As Figure 3 shown, the water supply network leakage noise detection system can at least include:
[0164] A physical model construction module 1 for constructing a physical model of leakage noise based on fluid mechanics and sound propagation rules, the physical model being used to simulate noise signals under different physical conditions;
[0165] A simulation data generation module 2 for generating simulation leakage noise data based on the physical model of the leakage noise to simulate leakage noise data under extreme physical conditions;
[0166] A sample data integration module 3 for acquiring measured leakage noise data and integrating the measured leakage noise data and the simulation leakage noise data as leakage noise sample data;
[0167] The statistical feature quantification module 4 is configured to quantize time-domain statistical features and frequency-domain statistical features of the signal based on the leak loss noise sample data.
[0168] The time-frequency image optimization module 5 is configured to dynamically adjust window function parameters and perform short-time Fourier transform processing based on the time-domain statistical features and the frequency-domain statistical features of the signal, to obtain a resolution-optimized time-frequency image.
[0169] The classification model construction module 6 is configured to construct a CNN classification model and train the CNN classification model based on the resolution-optimized time-frequency image.
[0170] The leak loss noise detection module 7 is configured to convert the actually measured leak loss noise data into a time-frequency image, input the trained CNN classification model, and output predicted probabilities of the leak loss noise and the environmental noise.
[0171] It can be understood that the technical concept of the water supply network leak loss noise detection system provided in the embodiment is similar to the technical concept of the water supply network leak loss noise detection method described above, and thus the embodiment will not be described here.
[0172] Embodiment Four
[0173] Yet another embodiment of the present specification provides a computer-readable storage medium having instructions stored therein, which, when executed on a computer or a processor, cause the computer or the processor to perform the steps of one or more of the above-described embodiments. The constituent modules of the above-described electronic device, if realized in the form of software function units and used as independent downstream task prediction or use, can be stored in the computer-readable storage medium.
[0174] In the embodiments described above, all or some of the operations can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the operations can be implemented in the form of one or more computer programs. The computer program is stored in a computer readable medium, which can be any data storage device that can store data which can be accessed by a computer. The computer readable medium includes one or more of a floppy disk, a compact disk, a DVD, a Blu-ray disk, a hard disk drive, a solid state drive, a magnetic tape, a RAM, a ROM, a PROM, an EPROM, a FLASH, a digital versatile disk (DVD), a memory stick, a memory card, a register, and the like. The computer program is downloaded to the computer from an external computer or websites. The computer program can also be stored in the computer readable medium of the computer, which can be a server, a client, a computer or the like. The computer program instructs the computer to perform the operations according to the computer program. The computer program can be executed by one or more computers, which can be a single processor system or a multiple processor system. The computer program can be distributed over networks coupled to the computers.
[0175] The above description is merely the preferred embodiments of the present disclosure and the technical principles used by the present disclosure. It should be understood by those skilled in the art that the protection scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and also covers other technical solutions formed by the combinations of the above technical features or equivalent features thereof without departing from the above disclosed concept. For example, the technical solutions formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0176] In addition, although each operation is depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.
Claims
1. A method for detecting leaks in a water distribution network, characterized in that, The method comprises the following steps: obtaining pipe material parameters, leakage aperture and fluid pressure in the pipe of the water supply network; determining a reference amplitude of the leakage noise and generating a fluid turbulence simulation value based on the pipe material parameters, the leakage aperture and the fluid pressure in the pipe of the water supply network; determining a band-pass filter impulse response based on the pipe material parameters of the water supply network to simulate the frequency response characteristics of different pipe materials; constructing a physical model of the leakage noise based on the reference amplitude of the leakage noise, the fluid turbulence simulation value and the band-pass filter impulse response, the physical model being used to simulate noise signals under different physical conditions; generating enhanced parameters under extreme physical conditions based on parameterization generation rules by adjusting the leakage aperture and the fluid pressure in the pipe; obtaining simulation leakage noise data by substituting the enhanced parameters into the physical model of the leakage noise; obtaining measured leakage noise data and taking the set of the measured leakage noise data and the simulation leakage noise data as leakage noise sample data; quantifying time domain statistical features and frequency domain statistical features of the signal based on the leakage noise sample data; dynamically adjusting window function parameters and performing short-time Fourier transform processing based on the time domain statistical features and the frequency domain statistical features of the signal to obtain a resolution-optimized time-frequency image; constructing a CNN classification model and training the CNN classification model based on the resolution-optimized time-frequency image; converting the measured leakage noise data into a time-frequency image and inputting the time-frequency image into the trained CNN classification model to output prediction probabilities of the leakage noise and environmental noise.
2. The leakage noise detection method for the water supply network according to claim 1, wherein the time domain statistical features include kurtosis, and the time domain statistical features of the signal are quantified based on the leakage noise sample data, including: wherein Kurt represents the kurtosis of the signal, x(n) represents the signal, μ represents the mean of the signal, σ represents the standard deviation of the signal, and E represents an expectation operator. The frequency domain statistical features include spectral centroid, and the frequency domain statistical features of the signal are quantified based on the leakage noise sample data, including: , frame and window processing are performed on the leakage noise sample data; discrete Fourier transform calculation is performed on each frame after the window processing to obtain the amplitude of the signal at each frequency component; the spectral centroid is calculated based on the amplitude of the signal at each frequency component.
3. The leakage noise detection method for the water supply network according to claim 2, wherein the resolution-optimized time-frequency image is obtained by dynamically adjusting the window function parameters and performing short-time Fourier transform processing based on the time domain statistical features and the frequency domain statistical features of the signal, including: the kurtosis of the signal is compared with a preset kurtosis threshold in real time, if the kurtosis of the signal is greater than the preset kurtosis threshold, the window type is adjusted to a Hamming window, if the kurtosis of the signal is less than or equal to the preset kurtosis threshold, the window type is adjusted to a Hann window; the spectral centroid is divided into a plurality of first frequency intervals, and the window length is adjusted according to the first frequency interval in which the spectral centroid of the signal is located, so that the spectral centroid value is inversely proportional to the selected window length. The spectrum centroid is divided into a plurality of second frequency intervals, and the overlap rate is adjusted according to the second frequency interval in which the spectrum centroid of the signal is located, so that the spectrum centroid value is proportional to the selected overlap rate; Based on the dynamically adjusted window type, window length and overlap rate, the signal is subjected to short-time Fourier transform processing to obtain a resolution-optimized time-frequency image.
4. The water supply network leakage noise detection method of claim 1, further comprising: delaying the leakage noise sample data to obtain a delayed signal; inputting the delayed signal into an adaptive filter for filtering, and iteratively updating filter weights using an LMS algorithm; coherently accumulating the signal output by the filter to obtain a coherently accumulated output signal as the preprocessed leakage noise sample data.
5. The water supply network leakage noise detection method of claim 4, wherein the coherently accumulated output signal is expressed as:
6. The water supply network leakage noise detection method of claim 1, wherein the CNN classification model uses a ResNet network architecture. comprising: , where m represents the number of accumulations, y(n) represents the signal output from the adaptive filter, Δ i represents the small delay increment of the i-th signal. a physical model construction module configured to obtain pipe material parameters, a leakage aperture, and fluid pressure in a pipe of a water supply network, determine a reference amplitude of leakage noise based on the pipe material parameters, the leakage aperture, and the fluid pressure in the pipe of the water supply network, generate a fluid turbulence simulation value, determine a band-pass filter impulse response based on the pipe material parameters to simulate frequency response characteristics of different pipe materials, and construct a physical model of the leakage noise based on the reference amplitude of the leakage noise, the fluid turbulence simulation value, and the band-pass filter impulse response, the physical model being used to simulate noise signals under different physical conditions; a simulation data generation module configured to adjust the leakage aperture and the fluid pressure in the pipe, generate enhanced parameters under extreme physical conditions based on a parameterization generation rule, and substitute the enhanced parameters into the physical model of the leakage noise to obtain simulation leakage noise data; 7. A water distribution network leak noise detection system, characterised in that, a sample data integration module configured to obtain measured leakage noise data and integrate the measured leakage noise data and simulation leakage noise data as leakage noise sample data; a statistical feature quantization module configured to quantize time-domain statistical features and frequency-domain statistical features of the signal based on the leakage noise sample data; a time-frequency image optimization module configured to dynamically adjust window function parameters and perform short-time Fourier transform processing based on the time-domain statistical features and the frequency-domain statistical features of the signal to obtain a resolution-optimized time-frequency image; a classification model construction module configured to construct a CNN classification model and train the CNN classification model based on the resolution-optimized time-frequency image; a leakage noise detection module configured to convert the measured leakage noise data into a time-frequency image, input the time-frequency image into the trained CNN classification model, and output predicted probabilities of leakage noise and environmental noise. The computer program, when executed by a processor, implements the water supply network leakage noise detection method of any one of claims 1 to 6. 8. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Large model-based urban and rural water supply pipe network leakage monitoring method
CN119123338A
Gas pipeline leakage identification method based on convolution neural network
CN110185939A
Motor signal processing method and device, equipment and medium
CN117690452A
Civil air defense construction concealed conduit leakage positioning method based on acoustic characteristics
CN120176033A