A method for identifying water leakage sound based on water sound sensor
By VMD decomposing and feature extraction of the acoustic signals collected by the water sound sensor, combined with the classifier and CNN model, the automatic identification and judgment of water leakage sound in large-diameter main pipelines and plastic pipelines is achieved, solving the problems of identification and noise interference in the prior art, and improving the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202210992866.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-08-18
AI Technical Summary
The existing water leakage sound detection technology is difficult to identify water leakage sound in large-diameter main pipelines and plastic pipelines, and the traditional methods are relatively low in efficiency and effect. The data of the water sound sensor is easily affected by fine noise and it is difficult to distinguish noise.
The water leakage sound recognition method based on the water sound sensor is adopted, and the original sound signal is split into several IMF component signals through VMD decomposition, and the classification based on the IMF component signal is extracted. Classified using a classifier to determine the dominant IMF component signal, and the main sound signal is identified through the CNN model to determine whether it is a water leakage sound.
It effectively removes the tiny noise in the original acoustic signal, realizes automatic identification and judgment of leaky acoustic signals, and improves the accuracy and efficiency of leaky acoustic detection.
Smart Images

Figure CN115751204B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water leakage sound recognition, and in particular relates to a water leakage sound recognition method based on a water sound sensor. Background Art
[0002] In the existing field of water leakage detection, factors such as large pipe diameter and poor sound transmission of plastic materials make it difficult for traditional listening methods and noise monitors based on vibration sensors to identify water leakage. Therefore, leakage monitoring of large-diameter trunk pipelines and plastic pipelines is a recognized problem in the industry. At the same time, the valve wells of the trunk pipelines are far apart, making it difficult to deploy and analyze related instruments. The efficiency and effect of traditional manual leak listening are relatively low.
[0003] Since water leakage noise is less attenuated when propagating in water, the water sound sensor has a wider monitoring range than the vibration sensor. By installing the water sound sensor in direct contact with water for monitoring, the shortcoming of the noise monitor's small detection range in large-diameter water supply pipes and non-metallic pipe environments is compensated.
[0004] However, compared with water leakage recognition based on vibration sensors, the data of water sound sensors are more susceptible to subtle noise and are more difficult to distinguish. In addition, even if the water sound sensor solves the problem of the monitoring range of water leakage noise, a method is still needed to automatically determine whether it is a water leakage sound based on the water sound spectrum data. Summary of the invention
[0005] Based on the above-mentioned shortcomings and deficiencies in the prior art, one of the objects of the present invention is to at least solve one or more of the above-mentioned problems in the prior art. In other words, one of the objects of the present invention is to provide a water leakage sound identification method based on a water sound sensor that meets one or more of the aforementioned needs.
[0006] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0007] A method for identifying water leakage sound based on a water sound sensor comprises the following steps:
[0008] S1, collecting original sound signals;
[0009] S2, performing VMD decomposition on the original sound signal to generate several IMF component signals of the original sound signal;
[0010] S3, extracting classification basis features of several IMF component signals;
[0011] S4, using a classifier to classify the plurality of IMF component signals according to their classification characteristics, and determining a plurality of dominant IMF component signals;
[0012] S5, reconstructing several dominant IMF component signals to obtain a main sound signal;
[0013] S6. Use the CNN model to identify the main sound signal and determine whether the main sound signal is the sound of water leakage.
[0014] As a preferred solution, in step S3, the classification is based on the extraction of features, specifically extracting the signal amplitude average, kurtosis, and pulse factor of each IMF component signal based on its time domain data; extracting the bandwidth and spectral shape of each IMF component signal based on its frequency domain data; and extracting the fuzzy entropy of each IMF component signal based on its autocorrelation function.
[0015] As a further preferred solution, the fuzzy entropy is calculated using the following steps:
[0016] Calculate the autocorrelation envelope and cut off half of the data;
[0017] Divide the half-edge data into several data segments according to the specified window length;
[0018] Calculate the distance between each data segment and all the data segments;
[0019] The fuzzy membership of each data segment is calculated according to the distance, and the average value is calculated to obtain the average fuzzy membership of each data segment;
[0020] Increase the window length by 1 and calculate the average fuzzy membership of each data segment again;
[0021] The fuzzy entropy of the autocorrelation function is calculated using the twice averaged fuzzy membership.
[0022] As a preferred solution, step S4 specifically includes the following steps:
[0023] S41, normalizing all classifications of each IMF component signal according to features;
[0024] S42. Classify the IMF component signal using the normalized classification basis features.
[0025] As a preferred solution, step S6 specifically includes the following steps:
[0026] S61, performing a short-time Fourier transform on the main sound signal to obtain a time-frequency distribution image of the main sound signal;
[0027] S62. Use the CNN model to identify the time-frequency distribution image and determine whether the main sound signal is a water leakage sound.
[0028] As a further preferred solution, the CNN model is MobileNetV3.
[0029] As a further preferred solution, the CNN model is trained using the following method:
[0030] The time-frequency distribution images are respectively labeled as water leakage sound signals, and divided into training set, test set and validation set;
[0031] Train the CNN model using the training set, test set, and validation set.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The method of the present invention performs VMD decomposition on the original sound signal, effectively splits and removes the subtle noise signal in the original sound signal, and also realizes the automatic recognition and judgment of the water leakage sound signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of a method for identifying water leakage sound based on a water sound sensor according to an embodiment of the present invention;
[0035] Figure 2 is a waveform diagram and a power spectrum diagram of an embodiment of the present invention;
[0036] Figure 3 is an IMF component waveform diagram of an embodiment of the present invention;
[0037] Figure 4 is a power spectrum diagram of IMF components according to an embodiment of the present invention;
[0038] Figure 5 is an unreconstructed short-time Fourier transform diagram of an embodiment of the present invention;
[0039] Figure 6 is a reconstructed short-time Fourier transform diagram of an embodiment of the present invention;
[0040] Figure 7 It is a grayscale image of an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.
[0042] Embodiment: This embodiment provides a method for identifying water leakage sound based on a water sound sensor. The method flow chart is as follows: Figure 1 As shown, the specific steps include:
[0043] First, step S1 is performed to place a water sound sensor in a pipe so as to be in direct contact with the liquid, and then the water sound sensor is used to collect an original sound signal transmitted by the liquid in the pipe.
[0044] S2. The water sound sensor is more sensitive and has a wider detection range. There are many subtle noise signals mixed in the original sound signal. Therefore, VMD decomposition is performed on the original sound signal to remove the subtle noise signals.
[0045] VMD is an adaptive, completely non-recursive modal variation and signal processing method. This technology has the advantage of being able to determine the number of modal decompositions. Its adaptability is reflected in determining the number of modal decompositions of a given sequence according to actual conditions. In the subsequent search and solution process, it can adaptively match the optimal center frequency and limited bandwidth of each mode, and can achieve effective separation of inherent modal components, frequency domain division of signals, and obtain effective decomposition components of signals, ultimately obtaining the optimal solution to the variational problem.
[0046] Specifically, step S2 is implemented using the following method:
[0047] First, assume that the original sound signal is decomposed into k components, ensuring that the decomposition sequence is a modal component with a limited bandwidth and a center frequency, and the sum of the estimated bandwidths of each mode is minimized. The constraint condition is that the sum of all modes is equal to the original signal. The constrained variational expression is:
[0048]
[0049] Where K is the number of modes to be decomposed, {u k}、{ω k} respectively correspond to the kth modal component and center frequency after decomposition, δ(t) is the Dirac function, and * is the convolution operator;
[0050] Then VMD decomposition is performed as follows:
[0051] 1) Initialization and n = 0;
[0052] 2) n = n + 1, enter the loop;
[0053] 3) According to u k and ω k Update the update formula;
[0054] in The inner loop stops when the number of decompositions reaches K;
[0055] 4) Update λ according to the update formula of λ;
[0056] 5) Given the accuracy ε, if the stopping condition is met Then stop the loop, otherwise return to step 2) to continue the loop.
[0057] The original waveform and power spectrum of the VMD decomposition process performed by the above method are shown in Figure 2, and the waveform of the decomposed IMF component is shown in Figure 2. Figure 3 As shown, the power spectrum corresponding to the decomposed IMF component is as follows Figure 4 shown.
[0058] After the IMF component decomposition is completed, in order to find the dominant component in the subsequent step, S3 is performed after step S2 to extract the classification basis features of each IMF component signal, so as to classify each IMF component in the subsequent step S4.
[0059] Specifically, the features extracted in step S3 include time-frequency domain feature values. In the time domain, the features extracted in step S3 include:
[0060] 1) Average signal amplitude:
[0061] Used to characterize the average intensity, because only signals that meet a certain energy intensity can be considered as water leakage signals;
[0062] 2) Kurtosis:
[0063] The characteristic quantity used to characterize the height of the peak of the probability density distribution curve at the mean value, that is, the statistic of the steepness of the data distribution shape: kurtosis = 0 means that the data distribution is as steep as the normal distribution; kurtosis> 0 means that the data distribution is steeper than the normal distribution (pointed peak); kurtosis<0 means that the data distribution is flatter than the normal distribution (flat peak); as follows Figure 5 As shown, in general, the probability density of the water leakage signal is close to the normal distribution, that is, close to the normal peak;
[0064] 3) Pulse Factor:
[0065] Used to characterize the sudden change impact characteristics of water leakage sound waves. Generally, water leakage signals are stable time series signals.
[0066] The features extracted in step S3 in the frequency domain include:
[0067] 1) Bandwidth: Because water leakage sound signals all have a certain bandwidth;
[0068] 2) Spectral shape:
[0069] Since water leakage sound signals are all signals with a certain bandwidth, there will be spectral peaks with a certain height and width on the frequency spectrum.
[0070] In addition, step S3 also extracts the fuzzy entropy of the autocorrelation function according to the IMF component signal. The fuzzy entropy is used to evaluate the degree of confusion between the front and rear parts of the autocorrelation function waveform, that is, the weaker the periodicity of the autocorrelation function, the greater the fuzzy entropy value. Since the pipeline leakage signal has the characteristics of uncertainty, complexity and nonlinearity, the fuzzy entropy can be used as a characteristic indicator to measure the uncertainty of the signal state distribution and the complexity of the signal. Some special interferences such as power frequency interference, dripping sound, and animal calls are generally regular, so the autocorrelation functions of these interference signals generally have obvious periodicity.
[0071] Specifically, the fuzzy entropy is calculated as follows:
[0072] 1) Calculate the autocorrelation envelope and extract half of the data, defined as {X(i), i=1, 2, ....n};
[0073] 2) With a window length of m, divide X(i) into k=n-m+1 data segments;
[0074] 3) Calculate the distance between each data segment and all k data segments, and save the calculation results. The distance calculation formula is as follows:
[0075] d ij =max{|x i+k (t)-x j+k (t) 1}, where k = 0, 1, ... m-1;
[0076] 4) Calculate the fuzzy membership based on the distance d:
[0077]
[0078] 5) Average all memberships except itself:
[0079]
[0080] 6) Increase the window length to m+1, and return to repeat steps 2)-5);
[0081] 7) Utilize Calculating fuzzy entropy
[0082] After extracting the classification basis features of each IMF component signal in step S3, all IMF component signals can be classified according to these classification basis features, and the class with the largest proportion is found as the dominant IMF component signal. Step S4 is performed to classify several IMF component signals according to their classification basis features using a classifier to maximize the class interval, find the largest class, and determine that the IMF component signal in this class is the dominant IMF component signal.
[0083] Specifically, in order to avoid the attributes of the large numerical interval from excessively dominating the attributes of the small numerical interval, and to reduce the numerical complexity in the calculation process, step S4 is specifically divided into two steps. First, in step S41, all classification basis feature vectors in each IMF component signal are normalized, and then in step S42, the normalized classification basis is used to classify the IMF component signal.
[0084] Furthermore, this embodiment provides a method for selecting and training a classifier:
[0085] The classifier uses the support vector machine algorithm, abbreviated as SVM, which is a two-classification model. Its basic model is defined as the linear classifier with the largest interval in the feature space. The main learning strategy is to maximize the class interval and transform it into a solution to a convex quadratic programming problem.
[0086] The training of the classifier first requires the selection of a kernel function. In this embodiment, the RBF kernel (Gaussian radial basis function) is selected, and its expression is k(||xy||)=exp{-||xy|| 2 / (2σ) 2}.
[0087] Then the hyperparameters used by the classifier are calculated. Since the RBF kernel is selected, the related hyperparameters are mainly: C-the penalty factor of the objective function, σ-the width coefficient of the kernel function, and a genetic algorithm is used to search for the C and σ values with the highest classification accuracy.
[0088] Finally, the optimal C, σ and selected feature subsets are calculated, and the SVM classifier is trained using the cross-validation method to obtain the recognition model containing the optimal hyperplane, and the model is saved for the classification of IMF component signals.
[0089] The above classifier can distinguish typical noise (raindrop sound, electromagnetic interference, low-amplitude low-frequency noise) in the IMF component, and then select the component signal with higher credibility of water leakage sound, and then perform step S5 to reconstruct the dominant IMF component signal obtained by classification to obtain the main sound signal.
[0090] Specifically, the SVM classification process in this embodiment designs a threshold SVM_TH, that is, if the result value of a component signal is greater than SVM_TH, the component is considered to be the dominant component of the signal; after traversing all IMF components, the IMF (Valid_imf) that meets the conditions is retained, and then the IMF components that meet the conditions are used to reconstruct the signal. The reconstruction process is implemented using the following formula:
[0091]
[0092] The above method of decomposing and reconstructing the main sound signal has the advantages of wavelet decomposition and denoising, and also has adaptive processing capabilities. Wavelet decomposition requires human intervention to set the threshold, and the noise interference in the water leakage sound processing is diverse, so it is impossible to set a fixed threshold, which greatly limits the use of wavelet denoising methods. In addition, the use of the above decomposition and reconstruction VMD process overcomes the problems of EMD endpoint effect and modal component aliasing, can reduce the non-stationarity of time series with high complexity and strong nonlinearity, and decompose to obtain relatively stable subsequences containing multiple different frequency scales, which is suitable for non-stationary sequences.
[0093] Step S5 reconstructs and separates the main sound signal and removes the subtle noise in the original sound signal, which is more accurate when used to identify whether it is a water leak. After step S5 is completed, step S6 is performed to identify the main sound signal using the CNN model to determine whether the main sound signal is a water leak.
[0094] Specifically, step S6 includes the following steps: S61, short-time Fourier transform of the main sound signal. Since the waveform of the water leakage sound signal is extremely complex and is a combination of multiple component signals, it is a time-varying non-stationary random signal with no obvious distinguishing features intuitively, and it is difficult to characterize the water leakage sound signal with a small number of characteristic parameters; the water leakage sound signal has a wide distribution band (mainly concentrated in 100Hz~2000Hz). Since the traditional Fourier transform lacks the positioning function of time and frequency, the analysis of non-stationary signals has limitations in resolution. Therefore, in order to simultaneously obtain time domain and frequency domain information in this embodiment, a short-time Fourier transform is used: Here is a short-time Fourier transform diagram of the VMD separation and reconstruction process without the above steps S2-S5 (eg Figure 5 ), and the short-time Fourier transform image after VMD separation and reconstruction process (such as Figure 6 ), it can be seen that the signal after separation and reconstruction has filtered out most of the pulse interference signals.
[0095] After short-time Fourier transform, the obtained time-frequency distribution image is scaled to a two-dimensional feature vector image of 200*200 pixels and normalized as follows: Figure 7 The grayscale image shown is then input into the CNN model for recognition to determine whether the signal is a water leakage sound signal. In this embodiment, the CNN model preferably uses the MobileNetV3 model to achieve better recognition effect with lower computational effort.
[0096] Furthermore, the MobileNetV3 model is trained using the time-frequency distribution image obtained by short-time Fourier transform of the signal. The data set for water leakage signal recognition training is divided into training set, test set and validation set, and each time-frequency distribution image is labeled with whether it is a water leakage sound. Then the model is trained using the training set and test set, and the model is reversely optimized using the loss function through supervised learning, and the training progress of the model is verified using the validation set.
[0097] It should be noted that the above embodiments are only detailed descriptions of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, there will be changes in the specific implementation methods based on the ideas provided by the present invention, and these changes should also be regarded as the scope of protection of the present invention.
Claims
1. A water leakage sound identification method based on water sound sensor, It is characterized in that The steps include: S1, collecting original sound signals; S2, performing VMD decomposition on the original sound signal to generate a plurality of IMF component signals of the original sound signal; S3, extracting classification basis features of the plurality of IMF component signals; S4, using a classifier to classify the plurality of IMF component signals according to their classification characteristics, and determining a plurality of dominant IMF component signals; S5, reconstructing the plurality of dominant IMF component signals to obtain a main sound signal; S6. Using a CNN model to identify the main sound signal, and determining whether the main sound signal is a water leakage sound; In step S3, the classification is based on the extraction of features, specifically extracting the signal amplitude average, kurtosis, and impulse factor of each IMF component signal according to the time domain data of the IMF component signal; extracting the bandwidth and spectral shape of the IMF component signal according to the frequency domain data of each IMF component signal; extracting the fuzzy entropy of the IMF component signal according to the autocorrelation function of each IMF component signal; The step S4 specifically includes the following steps: S41, normalizing all the classifications of each of the IMF component signals according to features; S42: Classify the IMF component signal using the normalized classification basis feature.
2. A method for identifying water leakage sound based on a water sound sensor as claimed in claim 1, It is characterized in that The fuzzy entropy is calculated using the following steps: Calculate the autocorrelation envelope and cut off half of the data; Dividing the half-edge data into a plurality of data segments according to a specified window length; Calculating the distance between each of the data segments and all of the plurality of data segments; Calculating the fuzzy membership of each of the data segments according to the distance, and averaging the fuzzy membership to obtain the average fuzzy membership of each of the data segments; The window length is increased by 1, and the average fuzzy membership of each data segment is calculated again; The fuzzy entropy is calculated using twice the average fuzzy membership.
3. A method for identifying water leakage sound based on a water sound sensor as claimed in claim 1, It is characterized in that The classification uses a support vector machine.
4. A method for identifying water leakage sound based on a water sound sensor as claimed in claim 1, It is characterized in that The step S6 specifically includes the following steps: S61, performing a short-time Fourier transform on the subject sound signal to obtain a time-frequency distribution image of the subject sound signal; S62: Use a CNN model to identify the time-frequency distribution image to determine whether the main sound signal is a water leakage sound.
5. A method for identifying water leakage sound based on a water sound sensor as claimed in claim 4, It is characterized in that The CNN model is MobileNetV3.
6. A method for identifying water leakage sound based on a water sound sensor as claimed in claim 5, It is characterized in that The CNN model is trained using the following method: Assigning a label of whether the time-frequency distribution image is a water leakage sound signal to each image, and dividing the image into a training set, a test set, and a validation set; The CNN model is trained using the training set, test set, and validation set.
Citation Information
Patent Citations
Electrocardiosignal denoising method and device based on BP neural network and improved EMD method and storage medium
CN113616213A
VMD-CNN-based lung sound feature recognition and classification method and system
CN113679413A
Gesture recognition method based on variational mode decomposition and support vector machine
CN114220164A