Method for identifying leakage of water supply network based on sound signals
Through the combination of acoustic signal recognition and optical fiber sensors, the problem of insufficient accuracy and efficiency of leakage detection in the water supply pipeline is solved, and more accurate leakage positioning and hole diameter measurement is achieved, which improves the accuracy and management level of detection.
Patent Information
- Application Number
- CN202411007055.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The existing leak detection methods for water supply pipeline networks are inaccurate and have insufficient accuracy and efficiency. The traditional methods rely on artificial leakage detection and have a long detection cycle and low accuracy, so they cannot fully understand the status of water supply pipelines.
Using acoustic signal recognition method, by collecting water flow velocity data and leaky acoustic signals, extracting features and building a leaky detection model, combining optical fiber sensors to analyze vibration signals, determine the leaky position and hole diameter, and achieve more accurate leaky detection .
It improves the accuracy and efficiency of leakage detection, can more comprehensively reflect the status of the water supply pipeline, reduces waste of materials and human resources, reduces inspection costs, realizes non-destructive inspections, and enhances management level.
Smart Images

Figure CN118896261A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water supply network detection, and in particular to a method for identifying water supply network leakage based on acoustic signals. Background Art
[0002] The water supply network is an important part of urban infrastructure. It is responsible for transporting clean water resources from the water source to various water use points to meet the needs of residents' lives, industrial production, agricultural irrigation, fire protection, etc. It refers to the network that takes water from the water source, treats it, and then transports it to users through a series of pipeline systems. Its main functions include domestic water supply, industrial water use, agricultural irrigation, etc. The water supply network is usually composed of multiple parts, including water intake structures, water treatment structures, pumping stations, water delivery channels and pipe networks, etc. Its structural forms are diverse, and the most common ones are tree structures, ring structures and mesh structures.
[0003] The leakage of water supply network is an important issue affecting the operating efficiency of urban water supply system. It will not only cause waste of water resources, but also may cause safety problems such as road collapse and secondary disasters. Traditional water supply network leakage detection methods mostly rely on manual work for leak detection, which has problems such as long detection cycle, low accuracy and high error rate. With the development of science and technology, audio leakage detection method and related leakage detection methods are widely used in water supply network leakage detection.
[0004] However, the existing detection methods still have certain shortcomings in terms of accuracy and efficiency. The audio-listening method is to judge by directly listening to the sound of water flowing through the pipes with human ears; at the same time, there are also inventions that propose deep learning technology to detect and locate water supply network leakage. There are also methods involving deep neural networks that can provide different answers to whether the water supply network is leaking from multiple angles such as pipeline pressure and flow.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] 1. Technical issues to be resolved
[0007] In view of the shortcomings of the prior art, the present invention provides a method for identifying water supply network leakage based on acoustic signals, which has the purpose of comprehensively understanding the status of the water supply network, thereby improving the accuracy of leakage detection, and further solving the problem that the existing detection methods still have certain shortcomings in accuracy and efficiency.
[0008] (II) Technical solution
[0009] In order to achieve the above-mentioned purpose of comprehensively understanding the state of the water supply network and thus improving the accuracy of leakage detection, the specific technical solutions adopted by the present invention are as follows:
[0010] A method for identifying water supply network leakage based on acoustic signals, the method for identifying water supply network leakage comprises the following steps:
[0011] S1, collecting water flow rate data and leakage sound signals at the water supply network, and extracting water flow rate features and leakage sound features respectively after preprocessing the water flow rate data and the leakage sound signals;
[0012] S2, fusing the water velocity feature with the leakage sound feature to obtain a comprehensive feature vector, and building a leakage detection model based on the feature vector and parameter combination, and setting the leakage threshold according to the output result;
[0013] S3, processing and feature extraction of the water flow rate and acoustic signal actually generated by the water supply network, and inputting them into the leakage detection model to obtain the leakage detection result, and judging the leakage probability in combination with the leakage threshold;
[0014] S4. Based on the leakage probability result, the optical fiber sensor is started to collect the vibration signal at the water supply pipeline, and the change characteristics of the vibration signal are analyzed. The leakage position of the water supply pipeline network and the diameter of the leakage hole are determined according to the change characteristics.
[0015] Preferably, the water flow velocity feature and the leakage sound feature are fused to obtain a comprehensive feature vector, and a leakage detection model is constructed based on the feature vector. Setting the leakage threshold according to the output result includes the following steps:
[0016] S21, performing a splicing operation on the water flow velocity feature and the leakage sound feature in the channel dimension to obtain a preliminary fused feature vector;
[0017] S22, using a preset dual-scale feature fusion platform to perform channel-by-channel global average pooling processing on the feature vector to obtain a feature tensor containing global information perception;
[0018] S23, using one-dimensional convolution to perform information interaction operation on the feature tensor, and obtaining a weight matrix according to the interaction operation result and the nonlinear function, and weighting the weight matrix to the feature vector to obtain a comprehensive feature vector;
[0019] S24, optimizing the support vector machine model parameters using the fireworks algorithm, and obtaining the optimal parameter combination of the support vector machine model based on the optimization result;
[0020] S25. The comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model, and an alarm rule is formulated based on the leakage threshold.
[0021] Preferably, optimizing the support vector machine model parameters using the fireworks algorithm, and obtaining the optimal parameter combination of the support vector machine model based on the optimization result includes the following steps:
[0022] S241, using the quantum bit probability amplitude to determine the encoding of the current position of the fireworks in the fireworks algorithm, and decoding the encoding into the support vector machine model parameter space for solution space conversion;
[0023] S242, based on the solution space conversion result, the position of the fireworks is updated using the quantum revolving door, and the fireworks after the position update are exploded and mutated to obtain the number of sparks generated and the mutation result;
[0024] S243, mapping the fireworks that are outside the feasible domain after mutation back to the feasible domain through mapping, and selecting a number of fireworks to form an initial group of fireworks through the roulette wheel selection principle;
[0025] S244. Improve the fireworks algorithm by iteratively making the fireworks approach the global optimal solution, and use the improved fireworks algorithm to find the optimal combination of regularization parameters and kernel function parameters of the support vector machine model.
[0026] Preferably, the comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model. Formulating an alarm rule based on the leakage threshold includes the following steps:
[0027] S251, training the comprehensive feature vector to obtain several groups of vector parameter combinations, and dividing the corresponding parameter combinations into a training set, a test set, and a validation set according to a preset ratio;
[0028] S252, using the training set as input to train a support vector machine model, and using the output result of the support vector machine model as a leakage probability value;
[0029] S253, after verifying the support vector machine model using the verification set, several groups of independent leakage detection models are obtained, and the test set is input into each leakage detection model to obtain several groups of leakage probability values;
[0030] S254, using a voting screening algorithm to perform a voting operation on a plurality of groups of leakage probability values, and selecting a leakage probability value with a number of votes greater than a threshold value as a final leakage prediction value based on the voting results;
[0031] S255: Setting a leakage threshold based on the final leakage prediction value, and generating a hydrophone control rule and an optical sensor switch control according to the leakage threshold.
[0032] Preferably, a voting operation is performed on several groups of leakage probability values by using a voting screening algorithm, and based on the voting results, a leakage probability value with a number of votes greater than a threshold is selected as the final leakage prediction value, which includes the following steps:
[0033] S2541, dividing a plurality of groups of leakage probability values into a plurality of subsets, and sending the subsets to entry nodes using a voting screening algorithm, and performing feature selection on the entry nodes using a decision tree;
[0034] S2542, counting the features selected by each entry node, defining the leakage probability value corresponding to the selected feature as one vote, and traversing all entry nodes to obtain all feature selection results;
[0035] S2543. Summarize and calculate all feature selection results, calculate the total number of votes for each group of leakage probability values in the entry node, and select the leakage probability value with a total number of votes greater than the threshold as the final leakage prediction value based on the voting results.
[0036] Preferably, based on the leakage probability result, the optical fiber sensor is started to collect the vibration signal at the water supply pipeline, and the vibration signal change characteristics are analyzed, and the leakage position of the water supply network and the diameter of the leakage hole are determined according to the change result, which includes the following steps:
[0037] S41, when the leakage probability is greater than the leakage threshold, the optical sensor is started, the light source is used to illuminate the water supply network to excite the optical fiber, and the vibration signal of the water flow passing through the water supply network is captured based on the optical sensor;
[0038] S42, after amplifying and filtering the vibration signal, determining the leakage position according to the propagation speed of the vibration signal in the optical fiber, and judging the attenuation of the vibration signal corresponding to the leakage position in the optical fiber;
[0039] S43, preliminarily estimating the size of the leakage hole based on the attenuation situation, and performing spectrum analysis on the vibration signal corresponding to the leakage position to obtain the frequency component, and determining the diameter of the leakage hole according to the frequency and the preliminary estimation result.
[0040] Preferably, after amplifying and filtering the vibration signal, determining the leakage position according to the propagation speed of the vibration signal in the optical fiber, and judging the attenuation of the vibration signal corresponding to the leakage position in the optical fiber include the following steps:
[0041] S421, using a digital amplifier to convert the vibration signal into a digital domain to perform an amplification operation, and using a filter to remove excess noise and frequency components in the vibration signal to extract signal features;
[0042] S422, defining a wave transfer function according to the vibration signal characteristics, and extracting narrowband components in the vibration signal in combination with a transformation propagation function, to obtain a propagation speed of the vibration signal in the optical fiber;
[0043] S423, establishing a vibration source positioning model according to the propagation speed and the inversion positioning principle, using the vibration source positioning model to output the leakage position, and determining the distance from the leakage position to the optical sensor;
[0044] S424. Analyze the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber.
[0045] Preferably, defining a wave transfer function according to the vibration signal characteristics, and extracting narrowband components in the vibration signal in combination with a transform propagation function, and obtaining the propagation speed of the vibration signal in the optical fiber comprises the following steps:
[0046] S4221, pre-define the abnormal sound vibration source at the leakage location from the vibration signal, and define the propagation function of the abnormal sound vibration source between any two points on the water supply network;
[0047] S4222, after simplifying the propagation function to a finite order, invert the abnormal sound vibration source to obtain a conjugate signal, and perform inverse Fourier transform processing on the conjugate signal to obtain the time domain of the abnormal sound vibration source;
[0048] S4223, simplifying the time domain of the abnormal sound vibration source into a narrowband wave inversion mathematical model, and then combining it with the transform propagation function to extract the narrowband component in the vibration signal, and replacing the vibration signal with the narrowband component for superposition operation;
[0049] S4224. Determine the time when the vibration signal arrives at the optical sensor according to the superposition result, and calculate the propagation speed of the vibration signal in the optical fiber based on the arrival time.
[0050] Preferably, the expression of the propagation function is:
[0051]
[0052] In the formula, l represents the result of the propagation function, a Am (e m , υ) represents the amplitude of the vibration signal when it propagates in a symmetrical mode, a Sm (e m , υ) represents the amplitude of the vibration signal when it propagates in an antisymmetric mode, j Am represents the wave number when the vibration signal propagates in a symmetrical mode, j Sm It represents the amplitude of the vibration signal when it propagates in a symmetrical mode, e m represents the distance between the abnormal sound vibration source and the mth optical sensor, υ represents the frequency of the vibration signal, m represents the total number of optical sensors, S represents the abnormal sound vibration source, and r represents a constant.
[0053] Preferably, analyzing the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber includes the following steps:
[0054] S4241, performing time domain analysis on the vibration signal within the distance range to obtain the time domain waveform of the vibration signal, and determining how the vibration signal changes over time based on the time domain waveform to obtain a time-varying feature;
[0055] S4242. Convert the vibration signal from the time domain to the frequency domain using a linear integral variation technique, analyze the energy of the vibration signal at different frequencies, and determine the frequency characteristics of the leakage location based on the energy analysis result;
[0056] S4243, analyzing the intensity change of the vibration signal within the distance range by using the frequency characteristics and the time-varying characteristics, and graphically displaying the complementarity of the intensity change and the distance judgment result;
[0057] S4244. Draw an attenuation curve based on the display situation to show the change of signal strength within the distance range, and obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber based on the change.
[0058] (III) Beneficial effects
[0059] Compared with the prior art, the present invention provides a method for identifying water supply network leakage based on acoustic signals, which has the following beneficial effects:
[0060] (1) The present invention collects water flow rate data and leakage sound signals and extracts corresponding features, which can comprehensively utilize multiple information sources, laying a foundation for leakage detection, so that leakage detection can more comprehensively reflect the actual situation of the water supply network. At the same time, by analyzing the changing characteristics of the vibration signal through the optical sensor, the leakage position and leakage hole diameter information can be accurately located, which is helpful to formulate a more accurate repair plan and reduce the waste of materials and human resources. In general, it has significant benefits in improving detection accuracy, enhancing timeliness, providing comprehensive information, optimizing resource utilization and improving management level.
[0061] (2) The present invention realizes the effective integration of information from different sources by performing a splicing operation on the water flow velocity characteristics and the leakage sound characteristics in the channel dimension, which helps to more comprehensively understand the status of the water supply network, thereby improving the accuracy of leakage detection. At the same time, a dual-scale feature fusion platform is used to perform global average pooling processing on a channel-by-channel basis, so that global information is integrated into the feature vector. At the same time, the fireworks algorithm is used to optimize the parameters of the support vector machine model, ensuring that the model can find the optimal parameter combination, which helps the model converge faster during the training process, while improving the generalization ability and detection performance of the model. Finally, the leakage threshold is set based on the output result of the leakage detection model, and the alarm rules are formulated accordingly, which helps to improve the accuracy, sensitivity and reliability of leakage detection.
[0062] (3) The present invention starts the optical fiber sensor to collect the vibration signal at the water supply pipe based on the leakage probability result, and analyzes the change characteristics of the vibration signal to determine the leakage position and the diameter of the leakage hole of the water supply network. By real-time capturing and analyzing the vibration signal, the leakage can be discovered and located in time, thereby reducing the loss caused by the leakage. Based on the analysis of the propagation speed and attenuation of the vibration signal in the optical fiber, the leakage position and the size of the leakage hole can be determined more accurately. At the same time, the use of optical fiber sensors allows non-destructive leakage detection without the need to dig or destroy the water supply network, thereby reducing the detection cost and reducing potential interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 is a flow chart of a method for identifying water supply network leakage based on acoustic signals according to an embodiment of the present invention;
[0065] Figure 2 is a schematic diagram of a Mel-frequency cepstral coefficient feature extraction process in a method for identifying water supply network leakage based on acoustic signals according to an embodiment of the present invention;
[0066] Figure 3 is a schematic diagram of a support vector machine model in a method for identifying water supply network leakage based on acoustic signals according to an embodiment of the present invention;
[0067] Figure 4 It is a workflow diagram of a support vector machine model in a method for identifying water supply network leakage based on acoustic signals according to an embodiment of the present invention. DETAILED DESCRIPTION
[0068] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.
[0069] According to an embodiment of the present invention, a method for identifying leakage in a water supply network based on acoustic signals is provided.
[0070] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1-Figure 4 As shown, according to a method for identifying water supply network leakage based on acoustic signals according to an embodiment of the present invention, the method for identifying water supply network leakage includes the following steps:
[0071] S1. Collect water flow rate data and leakage sound signals at the water supply network, and extract water flow rate features and leakage sound features respectively after preprocessing the water flow rate data and leakage sound signals.
[0072] It should be noted that the water flow rate data and leakage sound signals are collected by water flow velocimeters and hydrophones. Before the collection work begins, water flow velocimeters and hydrophones are installed at multiple key nodes of the water supply network (including pipeline branches, main water supply pipelines and branch pipes close to users) to collect water flow rate data and leakage sound signals (leakage sound signals are collected when leakage occurs in the water supply network).
[0073] After collecting the water velocity data and leakage sound signal, preprocessing is performed, including denoising, pre-emphasis, framing, windowing and other steps. In specific applications, the denoising process uses an adaptive filtering algorithm to improve the preprocessing effect.
[0074] When applying the adaptive filtering algorithm for denoising, the specific operations are as follows:
[0075] Initialize the filter parameters (initial weights are set to 0), then input the acoustic signal into the filter to calculate the output signal, and obtain the error signal based on the output signal, and use the update formula to update the filter coefficients. The specific update formula is: w(n+1)=w(n)+2μe(n)x(n); wherein w(n) represents the filter coefficient of the nth iteration, μ represents the step size factor, e(n) represents the error signal, and x(n) represents the input signal; repeat the output signal calculation until the error signal converges to a sufficiently small value.
[0076] When performing pre-emphasis to improve the signal-to-noise ratio of the leakage sound signal, the pre-emphasis processing formula is: y[n]=x[n]-αx[n-1]; where n represents the index of the time series; x[n] represents the input signal value, α represents the pre-emphasis coefficient; x[n-1] represents the previous value of the input signal; y[n] represents the value of the output signal, and the pre-emphasis coefficient is usually 0.95 or 0.97 (this method takes 0.97).
[0077] The leakage sound signal is divided into several short-time frames, and the signal is framed into 20-40ms frames. The standard is 25ms. If it is too short, there will not be enough sampling points to obtain reliable energy spectrum estimation. If it is too long, the signal changes too much. Then continue to perform windowing on each short-time frame. Commonly used window functions include rectangular window, Hanning window, Hamming window, etc. Specifically, the Hamming window can be used. The formula of the Hamming window is:
[0078]
[0079] Where N represents the length of the window, and n represents the index of the window function.
[0080] Apply a window function to each short time frame: Multiply the window function by each short time frame to obtain the windowed signal: x ω (n) = x(n)·ω(n), where x(n) represents the original signal, x ω (n) represents the signal after windowing. The purpose of windowing is to reduce spectrum leakage and ensure the accuracy of spectrum analysis.
[0081] And perform fast Fourier transform (FFT) on each short-time frame to obtain the power spectrum and filter it. The FFT calculation formula is:
[0082]
[0083] Among them, N represents the frame length, k represents the frequency index, j represents the imaginary unit, and n represents the time index.
[0084] At the same time, the power spectrum is calculated, the formula is: P(K) = |X(K) | 2 ,Right now:
[0085]
[0086] In the formula, X[k] represents the signal value in the frequency domain, corresponding to the frequency index k; x[n] represents the input signal value in the time domain; N represents the length of the input signal; n represents the index of the time point; and j represents the imaginary unit.
[0087] The power spectrum is filtered through a Mel filter bank. In this embodiment, the sampling rate of the leakage sound signal data is 8K, the FFT window size is 512, and the number of Mel filters is 26. Then, the output energy of the mth filter is:
[0088]
[0089] Among them, S(m) represents the output energy of the mth filter, and Hm(k) represents the filter coefficient of the mth Mel filter at frequency k (because the frequency of the sound signal is a changing process, the coefficient value cannot be fully displayed here.
[0090] Calculate the logarithmic energy logS(m) of the filter bank output:
[0091]
[0092] Extract Mel Frequency Cepstral Coefficient (MFCC) features: that is, perform discrete cosine transform (DCT) on the logarithmic energy to obtain MFCC features. The discrete cosine transform formula is:
[0093]
[0094] Where M represents the number of filter banks and n represents the MFCC coefficient index.
[0095] At the same time, two water flow features including the average flow velocity and instantaneous flow velocity are extracted from the water flow velocity data, as follows:
[0096] Ensure that there is a continuous record of water flow rate data, usually recorded as time series data, each data point represents a flow rate measurement at a specific moment, and the average flow rate is the arithmetic mean of all flow rate measurements in the selected time period, calculated as:
[0097]
[0098] Among them, v avg represents the average flow velocity, N represents the number of measurement points, v i represents the flow velocity at the i-th measurement point.
[0099] Instantaneous flow velocity usually refers to the flow velocity at a specific moment. In actual operation, the instantaneous flow velocity can be any specific measured value within the data collection interval, or an estimated value at a certain moment obtained by interpolating continuous data points.
[0100] In order to facilitate understanding of the technical solution of the present invention, the water flow velocity characteristics and leakage sound feature extraction during the actual operation of the present invention are described in detail below.
[0101] 1. Water supply network node selection: Select 5 key nodes, including pipeline branches (node 1, node 2), main water supply pipeline (node 3), and branch pipes close to users (node 4, node 5).
[0102] After the node selection is completed, a water flow velocimeter and a hydrophone are installed at each node, and the leakage sound signal data sampling rate is set to 8000 Hz, the FFT window size is 512 sample points, and the number of Mel filters is 26.
[0103] 2. Test data collection results:
[0104] (1) Water flow rate data:
[0105] Node 1 data points (recorded once per second for 10 seconds): [1.2, 1.3, 1.2, 1.4, 1.3, 1.2, 1.3, 1.4, 1.3, 1.2] m / s;
[0106] Node 2 data points: [0.8, 0.9, 0.8, 0.7, 0.9, 0.8, 0.7, 0.9, 0.8, 0.7] m / s;
[0107] Node 3 data points: [2.0, 2.1, 2.0, 2.2, 2.1, 2.0, 2.1, 2.2, 2.1, 2.0] m / s;
[0108] Node 4 data points: [0.5, 0.6, 0.5, 0.4, 0.6, 0.5, 0.4, 0.6, 0.5, 0.4] m / s;
[0109] Node 5 data points: [1.0, 1.1, 1.0, 0.9, 1.1, 1.0, 0.9, 1.1, 1.0, 0.9] m / s;
[0110] (2) Leakage sound signal data (example, actual data is a complex waveform signal):
[0111] Signal samples of node 1 (where leakage occurs) (simplified representation): [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0, 0.5, 0.2, 0.1, ...];
[0112] Node 2 (no leakage) signal samples: [0.001, 0.002, 0.001, 0.002, 0.001, 0.002, 0.001, 0.002, 0.001, 0.002, 0.001, 0.002, …];
[0113] 3. Test cases;
[0114] Case 1: Extraction of water velocity characteristics and leakage sound characteristics;
[0115] Data preprocessing;
[0116] Denoising: Apply an adaptive filtering algorithm to the leakage sound signal, set the step factor μ = 0.01, and iterate until the mean square value of the error signal e(n) is less than 0.001.
[0117] Pre-emphasis: Apply the pre-emphasis formula and set the pre-emphasis coefficient α=0.97.
[0118] Framing and Windowing: Divide the signal into 25ms frames and apply a Hamming window.
[0119] Feature extraction;
[0120] Water flow rate characteristics: The average flow rate is calculated by the average flow rate of each node within 10 seconds, and the instantaneous flow rate is the flow rate recorded at each node per second.
[0121] Leakage sound features: Perform FFT on each short-time frame, calculate the power spectrum, apply the Mel filter bank, calculate the output energy of each filter, calculate the logarithmic energy and perform discrete cosine transform, and extract MFCC features.
[0122] Results: Average flow velocity [1.28, 0.82, 2.08, 0.48, 0.98] m / s (corresponding to nodes 1 to 5); instantaneous flow velocity (taking node 1 as an example) [1.2, 1.3, 1.2, 1.4, 1.3, 1.2, 1.3, 1.4, 1.3, 1.2] m / s;
[0123] MFCC features (example): [0.123, 0.034, 0.008, 0.001, 0.0002, 0.00005…].
[0124] This test case demonstrates the complete process of collecting water flow rate data and leakage acoustic signals from a water supply network and performing preprocessing and feature extraction.
[0125] S2. The water flow velocity characteristics and the leakage sound characteristics are integrated to obtain a comprehensive feature vector, and a leakage detection model is constructed based on the combination of the feature vector and the parameters, and the leakage threshold is set according to the output result.
[0126] It should be noted that the water flow characteristics and leakage sound signal characteristics are spliced into a comprehensive feature vector, which is then input into multiple trained support vector machine (SVM) models for training. Multiple SVM models are trained using different hyperparameter combinations, and then multiple support vector machine (SVM) models are used simultaneously to identify whether the pipe network has leakage based on the extracted comprehensive feature vectors.
[0127] The working principle of the SVM model includes:
[0128] Using the feature vectors and corresponding labels in the training data set, the optimal hyperplane is constructed to maximize the interval of the classification boundary. First, the hyperplane is defined as: wc+b=0; where w represents the weight vector, b represents the bias, and x represents the extracted feature vector.
[0129] Define the support vector again, that is, for the sample wx with leaky signal (positive class) i +b=1, for the non-leakage signal (negative class) sample wx i +b=-1; In order to maximize the interval between positive and negative samples, it is necessary to minimize ||w||, and at the same time, to ensure y for correct classification i (wx i +b≥1), where y i is the label, x i + is the eigenvector (valid for any i).
[0130] The constraints ensure that all sample points are still correctly classified while maximizing the margin, thereby finding an optimal hyperplane.
[0131] The kernel function of the SVM model adopts the radial basis function (RBF), which is in the form of:
[0132] K(x i , x j )=exp(-γ||x i -x j || 2 );
[0133] Where x i and x j is the input feature vector, x j Represents any feature vector in the training data set, and x i They are used together to calculate the similarity between them. γ is the kernel function parameter, which controls the width of the Gaussian function.
[0134] The hyperparameters of the SVM model are optimized through cross-validation, including: the selection of the penalty parameter C, which is used to balance the complexity of the training error and the classification boundary; the selection of the kernel parameter γ, which is used to adjust the scope of the RBF kernel function.
[0135] In this embodiment, the water flow velocity feature and the leakage sound feature are fused to obtain a comprehensive feature vector, and a leakage detection model is constructed based on the feature vector. Setting the leakage threshold according to the output result includes the following steps:
[0136] S21. Perform a splicing operation on the water flow velocity feature and the leakage sound feature in the channel dimension to obtain a preliminary fused feature vector.
[0137] Specifically, the water velocity feature and the leakage sound feature are concatenated in the channel dimension to obtain a preliminary fused feature vector, which may include:
[0138] Get the water velocity features and the leakage sound features, make sure the two types of features have similar scales or ranges, normalize or standardize the features, and construct a separate feature vector for each type of feature. For example, the water velocity can form one feature vector, and the leakage sound features form another, and concatenate the two feature vectors in the channel dimension, which usually means putting the two feature arrays together end to end to form a longer feature vector.
[0139] It is important to check whether the dimensions of the two feature sets are consistent before concatenation. If not, you may need to adjust or resample to match the dimensions, use programming logic (for example, use the np.concatenate method of the NumPy library in Python) to perform concatenation, and check whether the concatenated feature vector reflects the key information of each type of feature.
[0140] S22. Use the preset dual-scale feature fusion platform to perform channel-by-channel global average pooling processing on the feature vector to obtain a feature tensor containing global information perception.
[0141] Specifically, using a preset dual-scale feature fusion platform to perform channel-by-channel global average pooling processing on the feature vector to obtain a feature tensor containing global information perception includes the following steps:
[0142] Start and configure the dual-scale feature fusion platform, ensure that all necessary libraries and tools are correctly installed and available, and ensure that the platform can access or load the required feature vector data, which may include multi-channel data from different sensors and data sources, and adjust the scale of the feature vector according to the platform's requirements to ensure compatibility with the global average pooling operation.
[0143] Perform global average pooling on the feature vector of each channel. Global average pooling is achieved by calculating the average value of all feature values on each channel, that is:
[0144]
[0145] In the formula, x c represents the eigenvalue in a channel, and N represents the number of eigenvalues in the channel;
[0146] x c,i Represents the i-th eigenvalue in this channel.
[0147] The global average pooling results of all channels are merged into a new feature tensor, which will contain the global information of each channel, providing a compressed and information-rich data representation for subsequent analysis and processing.
[0148] S23. Use one-dimensional convolution to perform information interaction operations on the feature tensor, obtain a weight matrix based on the interaction operation results and the nonlinear function, and weight the weight matrix to the feature vector to obtain a comprehensive feature vector.
[0149] Specifically, using one-dimensional convolution to perform information interaction operation on the feature tensor, and obtaining a weight matrix according to the interaction operation result and the nonlinear function, and weighting the weight matrix to the feature vector to obtain a comprehensive feature vector includes the following steps:
[0150] Normalize the feature tensor, set up a one-dimensional convolution layer, select the appropriate kernel size, step size and padding, use parameters to determine how information interacts between channels, and process the feature tensor through a one-dimensional convolution layer to extract and fuse cross-channel information.
[0151] Select a nonlinear activation function (including ReLU, Sigmoid, or Tanh) and apply a nonlinear activation function on the convolution output. Use the output of the convolution and activation functions to generate a weight matrix that represents the importance of each feature in the comprehensive feature vector.
[0152] Prepare the original feature vector, multiply the weight matrix by the feature vector element by element to fuse the information of different features and strengthen the key features. The weighted feature vector is the comprehensive feature vector, which combines the multi-dimensional information of the original data and highlights the most useful features.
[0153] S24. Optimize the support vector machine model parameters using the fireworks algorithm, and obtain the optimal parameter combination of the support vector machine model based on the optimization results.
[0154] Specifically, optimizing the support vector machine model parameters using the fireworks algorithm and obtaining the optimal parameter combination of the support vector machine model based on the optimization result includes the following steps:
[0155] S241, using the quantum bit probability amplitude to determine the encoding of the current position of the fireworks in the fireworks algorithm, and decoding the encoding into the support vector machine model parameter space for solution space conversion;
[0156] S242, based on the solution space conversion result, the position of the fireworks is updated using the quantum revolving door, and the fireworks after the position update are exploded and mutated to obtain the number of sparks generated and the mutation result;
[0157] S243, mapping the fireworks that are outside the feasible domain after mutation back to the feasible domain through mapping, and selecting a number of fireworks to form an initial group of fireworks through the roulette wheel selection principle;
[0158] S244. Improve the fireworks algorithm by iteratively making the fireworks approach the global optimal solution, and use the improved fireworks algorithm to find the optimal combination of regularization parameters and kernel function parameters of the support vector machine model.
[0159] S25. The comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model, and an alarm rule is formulated based on the leakage threshold.
[0160] Specifically, the comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model. The alarm rule is formulated based on the leakage threshold, including the following steps:
[0161] S251, training the comprehensive feature vector to obtain several groups of vector parameter combinations, and dividing the corresponding parameter combinations into a training set, a test set, and a validation set according to a preset ratio;
[0162] S252, using the training set as input to train a support vector machine model, and using the output result of the support vector machine model as a leakage probability value;
[0163] S253, after verifying the support vector machine model using the verification set, several groups of independent leakage detection models are obtained, and the test set is input into each leakage detection model to obtain several groups of leakage probability values;
[0164] S254, using a voting screening algorithm to perform a voting operation on a plurality of groups of leakage probability values, and selecting a leakage probability value with a number of votes greater than a threshold value as a final leakage prediction value based on the voting results;
[0165] S255: Setting a leakage threshold based on the final leakage prediction value, and generating a hydrophone control rule and an optical sensor switch control according to the leakage threshold.
[0166] The voting operation is performed on several groups of leakage probability values by using a voting screening algorithm, and the leakage probability value with a number of votes greater than a threshold is selected as the final leakage prediction value based on the voting result, including the following steps:
[0167] S2541, dividing a plurality of groups of leakage probability values into a plurality of subsets, and sending the subsets to entry nodes using a voting screening algorithm, and performing feature selection on the entry nodes using a decision tree;
[0168] S2542, counting the features selected by each entry node, defining the leakage probability value corresponding to the selected feature as one vote, and traversing all entry nodes to obtain all feature selection results;
[0169] S2543. Summarize and calculate all feature selection results, calculate the total number of votes for each group of leakage probability values in the entry node, and select the leakage probability value with a total number of votes greater than the threshold as the final leakage prediction value based on the voting results.
[0170] It should be noted that when the leakage probability exceeds a certain threshold, an alarm is triggered. When the alarm occurs, the red LED light on the hydrophone flashes. The LED indicator is equipped with a small battery (such as a lithium battery) to ensure that it can continue to flash during the leakage alarm. The algorithm module receives the signal processing results of the hydrophone and controls the LED indicator according to the leakage detection results.
[0171] In order to facilitate understanding of the technical solution of the present invention, the leakage probability identification during the actual operation of the present invention is described in detail below.
[0172] 1. Test environment setting;
[0173] Feature dimensions: 2-dimensional water flow rate features (average flow rate, instantaneous flow rate), 10-dimensional leakage sound features (MFCC features); Data set division: 70% training set, 15% validation set, 15% test set; SVM model parameters: penalty parameter C range [0.1 to 10], kernel parameter γ range [0.01 to 1]; Fireworks algorithm parameters: number of fireworks 50, number of sparks 100, number of iterations 30; Leakage threshold setting: determined based on the validation set, initially set to 0.6.
[0174] 2. Test data;
[0175] Water velocity characteristics (sample data):
[0176] Node 1: [1.28 to 1.3] (average flow velocity, instantaneous flow velocity);
[0177] Node 2: [0.82 to 0.8] (average flow velocity, instantaneous flow velocity);
[0178] Leakage sound features (MFCC features, sample data):
[0179] Node 1: [0.1, -0.2, 0.3, ..., -0.1] (10-dimensional MFCC features);
[0180] Node 2: [0.01, 0.02, -0.03, …, 0.01].
[0181] 3. Test cases;
[0182] (1) Feature Fusion:
[0183] The water flow velocity characteristics and leakage sound characteristics are spliced in the channel dimension to obtain a 12-dimensional comprehensive feature vector.
[0184] Example: The comprehensive feature vector of node 1 is [1.28, 1.3, 0.1, -0.2, 0.3, …, -0.1].
[0185] Dual-scale feature fusion: Perform global average pooling on the comprehensive feature vector to obtain a feature tensor containing global information.
[0186] Example: The result of global average pooling is a 12-dimensional vector, each element of which is the average value of the corresponding channel of the original feature vector.
[0187] (2) Information interaction and weight matrix: Use one-dimensional convolution to perform information interaction on the feature tensor, obtain the weight matrix through the ReLU activation function, and add the weight matrix to the original feature vector to obtain the weighted comprehensive feature vector.
[0188] (3) Fireworks algorithm parameter optimization: The fireworks algorithm is used to optimize the regularization parameter C and kernel function parameter γ of the SVM model. After 30 iterations, the optimal parameter combination C = 1.0, γ = 0.1 is obtained.
[0189] (4) Model training and testing: Use the training set to train the SVM model to obtain the leakage probability value. Use the validation set to validate the model to obtain several sets of independent leakage detection models. Input the test set into each model to obtain several sets of leakage probability values.
[0190] (5) Voting screening and leakage threshold setting: Use the voting screening algorithm to vote on several groups of leakage probability values, and select the leakage probability value with a number of votes greater than the threshold as the final leakage prediction value.
[0191] The leakage threshold is set to 0.6. When the leakage probability value is greater than 0.6, an alarm is triggered.
[0192] This experimental case demonstrates the complete process from feature fusion to model training and testing, and then to leakage threshold setting, verifying the effectiveness of the comprehensive feature vector and SVM model in leakage detection.
[0193] Therefore, by performing splicing operations on the water flow velocity characteristics and the leakage sound characteristics in the channel dimension, effective integration of information from different sources is achieved, which helps to more comprehensively understand the status of the water supply network, thereby improving the accuracy of leakage detection. At the same time, the dual-scale feature fusion platform is used to perform global average pooling processing on a channel-by-channel basis, so that the global information is incorporated into the feature vector. At the same time, the fireworks algorithm is used to optimize the parameters of the support vector machine model, ensuring that the model can find the optimal parameter combination, which helps the model converge faster during training, while improving the generalization ability and detection performance of the model. Finally, the leakage threshold is set based on the output results of the leakage detection model, and alarm rules are formulated accordingly, which helps to improve the accuracy, sensitivity and reliability of leakage detection.
[0194] S3. Process the water flow rate and acoustic signal actually generated by the water supply network and extract their features, then input them into the leakage detection model to obtain the leakage detection results, and judge the leakage probability in combination with the leakage threshold.
[0195] In this embodiment, the water flow rate and acoustic signal actually generated by the water supply network are processed and feature extracted, and then input into the leakage detection model to obtain the leakage detection result, and the leakage probability is judged in combination with the leakage threshold, including the following steps:
[0196] Collect water flow rate data and acoustic signal data from key nodes of the water supply network. Use instruments such as flow meters and acoustic sensors to capture this data, and clean the collected data to remove outliers and noise.
[0197] Ensure that the water velocity data and the acoustic signal data are synchronized in time to correspond to the same monitoring time point, extract features from the water velocity data, and extract features from the acoustic signal; combine the processed water velocity features and acoustic signal features into a feature vector for input into the leakage detection model, and judge the leakage probability according to the model output, indicating the possibility of leakage at the current data point, and judge whether leakage occurs according to the set leakage probability threshold. If the leakage probability output by the model exceeds the threshold, it is determined that leakage has occurred.
[0198] S4. Based on the leakage probability result, the optical fiber sensor is started to collect the vibration signal at the water supply pipeline, and the change characteristics of the vibration signal are analyzed. The leakage position of the water supply pipeline network and the diameter of the leakage hole are determined according to the change characteristics.
[0199] In this embodiment, based on the leakage probability result, the optical fiber sensor is started to collect the vibration signal at the water supply pipeline, and the vibration signal change characteristics are analyzed. According to the change result, the leakage position of the water supply network and the diameter of the leakage hole are determined, which includes the following steps:
[0200] S41. When the leakage probability is greater than the leakage threshold, the optical sensor is started, the light source is used to illuminate the water supply network to excite the optical fiber, and the vibration signal of water flowing through the water supply network is captured based on the optical sensor.
[0201] Specifically, when the leakage probability is greater than the leakage threshold, the optical sensor is started, the light source is used to illuminate the water supply network to excite the optical fiber, and the optical sensor is used to capture the vibration signal of water flowing through the water supply network, including the following steps:
[0202] The leakage probability output by the leakage detection model is monitored in real time and compared with the preset leakage threshold. Once the leakage probability is detected to exceed the threshold, the optical sensing system is automatically triggered.
[0203] Prepare and adjust the necessary light sources, use lasers to ensure the optical fibers are properly excited, and ensure the fibers are properly routed along the water distribution network to maximize coverage of potential leak areas.
[0204] By irradiating the optical fiber with a light source, it vibrates due to pressure changes when water flows through it. An optical sensor is used to capture the signal changes in the optical fiber caused by the vibration of the water flow. The signal is usually manifested by changes in light intensity or phase in the optical fiber.
[0205] S42, after amplifying and filtering the vibration signal, determine the leakage position according to the propagation speed of the vibration signal in the optical fiber, and judge the attenuation of the vibration signal corresponding to the leakage position in the optical fiber.
[0206] Specifically, after amplifying and filtering the vibration signal, determining the leakage position according to the propagation speed of the vibration signal in the optical fiber, and judging the attenuation of the vibration signal corresponding to the leakage position in the optical fiber include the following steps:
[0207] S421. Use a digital amplifier to convert the vibration signal into a digital domain to perform an amplification operation, and use a filter to remove excess noise and frequency components in the vibration signal and then extract signal features.
[0208] Specifically, the vibration signal is converted into a digital domain by using a digital amplifier to perform an amplification operation, and the signal features are extracted after removing the redundant noise and frequency components in the vibration signal by using a filter, which includes the following steps:
[0209] The captured analog signal is converted into a digital signal using an analog-to-digital converter (ADC). The parameters of the digital amplifier, such as the gain setting, are configured to ensure that the signal reaches an intensity level suitable for processing without distortion. The digital amplifier is then applied to amplify the digital signal to enhance the useful information in the signal while keeping the noise level under control as much as possible.
[0210] Design a digital filter according to the required signal processing objectives and implement digital filtering operations to remove unnecessary noise and non-target frequency components in the vibration signal, retain the useful signal part, analyze the digital signal after amplification and filtering, extract the peak value and average value as signal features, and construct a feature vector based on the extracted features.
[0211] S422. Define the wave transfer function according to the characteristics of the vibration signal, and extract the narrowband component in the vibration signal in combination with the transformation propagation function to obtain the propagation speed of the vibration signal in the optical fiber.
[0212] The following steps are included in the process of defining the wave transfer function according to the characteristics of the vibration signal, extracting the narrowband component in the vibration signal in combination with the transformation propagation function, and obtaining the propagation speed of the vibration signal in the optical fiber:
[0213] S4221, pre-define the abnormal sound vibration source at the leakage location from the vibration signal, and define the propagation function of the abnormal sound vibration source between any two points on the water supply network;
[0214] S4222, after simplifying the propagation function to a finite order, invert the abnormal sound vibration source to obtain a conjugate signal, and perform inverse Fourier transform processing on the conjugate signal to obtain the time domain of the abnormal sound vibration source;
[0215] S4223, simplifying the time domain of the abnormal sound vibration source into a narrowband wave inversion mathematical model, and then combining it with the transform propagation function to extract the narrowband component in the vibration signal, and replacing the vibration signal with the narrowband component for superposition operation;
[0216] S4224. Determine the time when the vibration signal arrives at the optical sensor according to the superposition result, and calculate the propagation speed of the vibration signal in the optical fiber based on the arrival time.
[0217] And the expression of the propagation function is:
[0218]
[0219] In the formula, l represents the result of the propagation function, a Am (e m , υ) represents the amplitude of the vibration signal when it propagates in a symmetrical mode, a Sm (e m , υ) represents the amplitude of the vibration signal when it propagates in an antisymmetric mode, j Am represents the wave number when the vibration signal propagates in a symmetrical mode, j Sm It represents the amplitude of the vibration signal when it propagates in a symmetrical mode, e m represents the distance between the abnormal sound vibration source and the mth optical sensor, υ represents the frequency of the vibration signal, m represents the total number of optical sensors, S represents the abnormal sound vibration source, and r represents a constant.
[0220] S423, establishing a vibration source positioning model according to the propagation speed and the inversion positioning principle, using the vibration source positioning model to output the leakage position, and determining the distance from the leakage position to the optical sensor;
[0221] S424. Analyze the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber.
[0222] Specifically, analyzing the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber includes the following steps:
[0223] S4241, performing time domain analysis on the vibration signal within the distance range to obtain the time domain waveform of the vibration signal, and determining how the vibration signal changes over time based on the time domain waveform to obtain a time-varying feature;
[0224] S4242. Convert the vibration signal from the time domain to the frequency domain using a linear integral variation technique, analyze the energy of the vibration signal at different frequencies, and determine the frequency characteristics of the leakage location based on the energy analysis result;
[0225] S4243, analyzing the intensity change of the vibration signal within the distance range by using the frequency characteristics and the time-varying characteristics, and graphically displaying the complementarity of the intensity change and the distance judgment result;
[0226] S4244. Draw an attenuation curve based on the display situation to show the change of signal strength within the distance range, and obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber based on the change.
[0227] S43, preliminarily estimating the size of the leakage hole based on the attenuation situation, and performing spectrum analysis on the vibration signal corresponding to the leakage position to obtain the frequency component, and determining the diameter of the leakage hole according to the frequency and the preliminary estimation result.
[0228] Specifically, the size of the leakage hole is preliminarily estimated based on the attenuation situation, and the frequency component is obtained by performing spectrum analysis on the vibration signal corresponding to the leakage position. The diameter of the leakage hole is determined according to the frequency and the preliminary estimation result, including the following steps:
[0229] Analyze the vibration signal attenuation from the leakage point to the sensor, and provide preliminary information about the severity of the leakage based on the attenuation, such as the possible size of the leak. According to the degree of signal attenuation, the size of the leak hole is preliminarily estimated. Larger leaks usually result in more significant signal attenuation.
[0230] Perform spectrum analysis on the vibration signal at the leakage location, analyze the spectrum data, and determine the main frequency components, which may be related to the shape and size of the leakage hole.
[0231] Correlate the attenuation data and frequency components with the leak size to predict how leaks of different sizes affect the frequency and attenuation of the vibration signal, and calculate or precisely determine the diameter of the leak hole based on the predicted output and data analysis.
[0232] In order to facilitate understanding of the above technical solution of the present invention, the calculation of the leakage position and the leakage hole diameter in the actual process of the present invention is described in detail below.
[0233] 1. Start the optical sensor and capture the vibration signal;
[0234] (1) Real-time monitoring of leakage probability: The leakage threshold is set to 0.8 (80% probability indicates that leakage may occur). When the leakage probability exceeds 0.8, the optical sensing system is automatically triggered.
[0235] (2) Prepare the light source and optical fiber layout: Use a laser source with a wavelength of 1550nm and a power of 10mW. The optical fiber is laid along the water supply network to cover the potential leakage area with a total length of 10km.
[0236] (3) Capturing vibration signals: The optical sensor captures the signal at a sampling rate of 10 kHz, and the signal is reflected as the change of light intensity in the optical fiber.
[0237] 2. Vibration signal processing and leakage location determination;
[0238] (1) Signal amplification and filtering: A 16-bit ADC is used to convert the analog signal into a digital signal. The digital amplifier gain is set to 10 to ensure that the signal strength is moderate. A bandpass filter is applied to retain the frequency components from 100 Hz to 500 Hz.
[0239] (2) Wave transfer function and narrowband component extraction: The abnormal vibration source is defined as a 200 Hz sine wave. The propagation function is simplified to second order. The inversion process is performed to obtain the conjugate signal. The narrowband component is extracted after the inverse Fourier transform. The narrowband width is 10 Hz. According to the superposition result, the vibration signal propagation speed is judged to be 2000 m / s.
[0240] (3) Determination of leakage location: The vibration source positioning model is based on the propagation velocity and inversion positioning principle, and the output leakage location is 5 km away from the optical sensor.
[0241] (4) Vibration signal attenuation analysis: Time domain analysis shows that the vibration signal intensity gradually weakens over time, and frequency domain analysis shows that the energy at 200 Hz is significantly reduced. The intensity change and distance judgment results are complementary and graphically displayed. The attenuation curve shows that the signal intensity decays by 60% within a distance of 5 km.
[0242] 3. Estimation of leakage hole size;
[0243] (1) Preliminary estimation based on attenuation: A signal attenuation of 60% indicates that the leakage hole may be large. The preliminary estimate of the leakage hole diameter is 10 mm.
[0244] (2) Spectrum analysis and diameter determination: Spectrum analysis shows that the main frequency component is 200 Hz, accompanied by harmonic components. Correlation prediction shows that a 10 mm leakage hole will lead to similar frequency and attenuation characteristics. Finally, the diameter of the leakage hole is determined to be 10 mm, with an error range of ±1 mm.
[0245] By monitoring the leakage probability in real time, the optical sensing system was triggered to capture the vibration signal of the water supply pipeline. After signal amplification, filtering, wave transfer function analysis and attenuation judgment, the leakage location was successfully determined to be 5km away from the optical sensor, and the diameter of the leakage hole was preliminarily estimated to be 10mm. This estimate was further verified through spectrum analysis, and the exact diameter of the leakage hole was finally determined.
[0246] The test data and test cases are as follows;
[0247] Leakage detection model output: Leakage probability is 0.85 (exceeding the preset threshold of 0.8);
[0248] Optical sensor configuration: light source is laser, wavelength 1550nm, power 10mW; optical fiber length: 10km; sampling rate: 10kHz;
[0249] Digital amplifier and filter settings: ADC resolution is 16 bits;
[0250] Gain setting: 10; filter type is bandpass filter, 100Hz to 500Hz;
[0251] Vibration signal characteristics: peak value: 0.5V; average value: 0.2V;
[0252] Wave transfer function and narrowband components: abnormal vibration source frequency: 200Hz; narrowband width: 10Hz;
[0253] Vibration signal propagation speed: propagation speed: 2000m / s;
[0254] Leakage location and distance: The leakage location is 5km away from the optical sensor; distance judgment error: ±50m, vibration signal attenuation: initial signal strength is 1V, signal strength after attenuation is 0.4V, and attenuation rate is 60%;
[0255] Spectrum analysis results: the main frequency component is 200Hz; the harmonic components are 400Hz and 600Hz;
[0256] Estimation of leakage hole diameter: preliminary estimate is 10mm; after spectrum analysis, it is determined to be 10mm (error range ±1mm).
[0257] Test cases;
[0258] Purpose of the test: To capture the vibration signal of the water supply network through optical fiber sensors, analyze the signal change characteristics, and determine the leakage location and the diameter of the leakage hole.
[0259] Test steps:
[0260] Start the optical sensor: Real-time monitoring of the leakage detection model, the output leakage probability is 0.85, which exceeds the preset threshold of 0.8 and automatically triggers the optical sensing system.
[0261] Capturing vibration signals: Using a laser light source with a wavelength of 1550nm and a power of 10mW, illuminating the optical fiber of the water supply network, the optical fiber length is 10km, and the sampling rate is 10kHz, to capture the vibration signals when water flows through.
[0262] Signal amplification and filtering: The analog signal is converted to a digital signal using a 16-bit ADC. The digital amplifier gain is set to 10 and a band-pass filter is applied to retain the frequency components from 100Hz to 500Hz.
[0263] Determine the leakage location: Analyze the vibration signal characteristics, the peak value is 0.5V, and the average value is 0.2V. Define the frequency of the abnormal vibration source as 200Hz, extract the narrowband component, and the narrowband width is 10Hz. Calculate the vibration signal propagation speed as 2000m / s. Establish a vibration source positioning model, and output the leakage location as 5km away from the optical sensor, with an error of ±50m.
[0264] Analyze the vibration signal attenuation: the initial signal strength is 1V, the signal strength after attenuation is 0.4V, and the attenuation rate is 60%. Draw an attenuation curve to show the change of signal strength within the distance range. Based on the attenuation situation, the diameter of the leakage hole is preliminarily estimated to be 10mm. Perform spectrum analysis on the vibration signal at the leakage position, the main frequency component is 200Hz, accompanied by harmonic components. Correlate and predict the impact of leaks of different sizes on the vibration signal, and finally determine that the diameter of the leakage hole is 10mm (error range ±1mm).
[0265] Test results: The leak location was successfully determined to be 5 km away from the optical sensor. The leak hole diameter was accurately estimated to be 10 mm.
[0266] Experimental conclusion: The optical fiber sensor can effectively capture the vibration signal of the water supply network and accurately determine the leakage location and leakage hole diameter through signal analysis.
[0267] In order to facilitate understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process is described in detail below.
[0268] Water flow velocity meters and hydrophones are installed at key nodes of the water supply network. The hydrophones are used to collect leakage sound signals in the water supply network. A device is arranged every 100 meters to collect leakage sound signals in the water supply network. Key nodes include pipeline branches, main water supply pipelines, and branch pipes close to users.
[0269] The collected sound signal is preprocessed, including denoising, pre-emphasis, framing and windowing. The collected sound signal is pre-emphasized to emphasize the high-frequency part, generate a relatively flat spectrum signal, and improve the signal-to-noise ratio. The pre-emphasis processing formula is y[n]=x[n]-αx[n-1].
[0270] The acoustic signal is divided into several short-time frames, and the frame shift is set to half of the frame length to ensure sufficient overlap between adjacent frames, thereby ensuring time continuity, and a Hamming window is performed on each short-time frame.
[0271] The data displayed by the water flow meter are extracted, including two water flow characteristics: average flow velocity and instantaneous flow velocity; at the same time, the Mel frequency cepstrum coefficient (MFCC) features are extracted: first, a fast Fourier transform (FFT) is performed on each short-time frame to convert the time domain signal into a frequency domain signal to obtain a power spectrum; the power spectrum is filtered through a set of Mel filters, and the center frequencies and bandwidths of these filters are arranged according to the Mel scale to simulate the auditory characteristics of the human ear; then the output energy of each filter is calculated and the logarithm is taken to compress the dynamic range; the discrete cosine transform (DCT) is performed on these logarithmic energies to convert the frequency domain information into the cepstrum domain to obtain a set of Mel frequency cepstrum coefficients, which can effectively capture the spectral characteristics of the acoustic signal and are suitable for the classification and recognition of acoustic signals.
[0272] The extracted MFCC features are fused with the water velocity data features, that is, the water flow features and the acoustic signal features are spliced into a comprehensive feature vector. After being divided into a training set and a test set, they are input into multiple SVM models for training, and hyperparameters are optimized during the training process.
[0273] Firstly, the hyperparameters of the SVM model are optimized through grid search and cross validation methods, mainly including the penalty parameter C and the radial basis function (RBF) kernel parameter γ. The grid search traverses a set of predefined parameter value combinations, and cross validation evaluates the performance of each parameter combination, and selects the best parameter combination to maximize the classification accuracy of the model. After determining the optimal parameters, the training set is used to train the model to obtain the optimized SVM model.
[0274] The trained SVM model is used to identify leakage based on the comprehensive features in the actual water supply network. After completing the above steps, the performance of the model is evaluated using the test set, and then the trained SVM model is used to identify leakage based on the characteristic signals in the actual water supply network. Finally, a majority vote is performed on the prediction results of multiple SVM models to obtain the final leakage detection result.
[0275] In summary, with the help of the above-mentioned technical scheme of the present invention, the present invention can comprehensively utilize multiple information sources by collecting water flow rate data and leakage sound signals and extracting corresponding features, thereby laying a foundation for leakage detection, so that leakage detection can more comprehensively reflect the actual situation of the water supply network, and at the same time, by analyzing the changing characteristics of the vibration signal through optical sensors, the leakage position and leakage hole diameter information can be accurately located, which is helpful to formulate a more accurate repair plan and reduce the waste of materials and human resources. In general, it has significant benefits in improving detection accuracy, enhancing timeliness, providing comprehensive information, optimizing resource utilization and improving management level. The present invention realizes the effective integration of information from different sources by performing splicing operations on water flow velocity characteristics and leakage sound characteristics in the channel dimension, which helps to more comprehensively understand the status of the water supply network, thereby improving the accuracy of leakage detection. At the same time, a dual-scale feature fusion platform is used to perform global average pooling processing on a channel-by-channel basis, so that global information is integrated into the feature vector. At the same time, the fireworks algorithm is used to optimize the parameters of the support vector machine model, which ensures that the model can find the optimal parameter combination, helps the model converge faster during the training process, and improves the generalization ability and detection performance of the model. Finally, the leakage threshold is set based on the output result of the leakage detection model, and alarm rules are formulated accordingly, which helps to improve the accuracy, sensitivity and reliability of leakage detection.
[0276] The present invention starts the optical fiber sensor to collect the vibration signal at the water supply pipeline based on the leakage probability result, and analyzes the change characteristics of the vibration signal to determine the leakage position and the diameter of the leakage hole of the water supply network. By real-time capturing and analyzing the vibration signal, the leakage can be discovered and located in time, thereby reducing the loss caused by the leakage. Based on the analysis of the propagation speed and attenuation of the vibration signal in the optical fiber, the leakage position and the size of the leakage hole can be determined more accurately. At the same time, the use of the optical fiber sensor allows non-destructive leakage detection without digging or destroying the water supply network, thereby reducing the detection cost and reducing potential interference.
[0277] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying water supply network leakage based on acoustic signals, characterized in that: The method for identifying water supply network leakage comprises the following steps: S1, collecting water flow rate data and leakage sound signals at the water supply network, and extracting water flow rate features and leakage sound features respectively after preprocessing the water flow rate data and the leakage sound signals; S2, fusing the water velocity feature with the leakage sound feature to obtain a comprehensive feature vector, and building a leakage detection model based on the feature vector and parameter combination, and setting the leakage threshold according to the output result; S3, processing and feature extraction of the water flow rate and acoustic signal actually generated by the water supply network, and inputting them into the leakage detection model to obtain the leakage detection result, and judging the leakage probability in combination with the leakage threshold; S4. Based on the leakage probability result, the optical fiber sensor is started to collect the vibration signal at the water supply pipeline, and the change characteristics of the vibration signal are analyzed. The leakage position of the water supply pipeline network and the diameter of the leakage hole are determined according to the change characteristics.
2. The method for identifying water supply network leakage based on acoustic signals according to claim 1, characterized in that: The method of fusing the water velocity feature with the leakage sound feature to obtain a comprehensive feature vector, building a leakage detection model based on the feature vector, and setting the leakage threshold according to the output result includes the following steps: S21, performing a splicing operation on the water flow velocity feature and the leakage sound feature in the channel dimension to obtain a preliminary fused feature vector; S22, using a preset dual-scale feature fusion platform to perform channel-by-channel global average pooling processing on the feature vector to obtain a feature tensor containing global information perception; S23, using one-dimensional convolution to perform information interaction operation on the feature tensor, and obtaining a weight matrix according to the interaction operation result and the nonlinear function, and weighting the weight matrix to the feature vector to obtain a comprehensive feature vector; S24, optimizing the support vector machine model parameters using the fireworks algorithm, and obtaining the optimal parameter combination of the support vector machine model based on the optimization result; S25. The comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model, and an alarm rule is formulated based on the leakage threshold.
3. The method for identifying water supply network leakage based on acoustic signals according to claim 2, characterized in that: The method of optimizing the support vector machine model parameters by using the fireworks algorithm and obtaining the optimal parameter combination of the support vector machine model based on the optimization result includes the following steps: S241, using the quantum bit probability amplitude to determine the encoding of the current position of the fireworks in the fireworks algorithm, and decoding the encoding into the support vector machine model parameter space for solution space conversion; S242, based on the solution space conversion result, the position of the fireworks is updated using the quantum revolving door, and the fireworks after the position update are exploded and mutated to obtain the number of sparks generated and the mutation result; S243, mapping the fireworks that are outside the feasible domain after mutation back to the feasible domain through mapping, and selecting a number of fireworks to form an initial group of fireworks through the roulette wheel selection principle; S244. Improve the fireworks algorithm by iteratively making the fireworks approach the global optimal solution, and use the improved fireworks algorithm to find the optimal combination of regularization parameters and kernel function parameters of the support vector machine model.
4. The method for identifying water supply network leakage based on acoustic signals according to claim 3, characterized in that: The comprehensive feature vector is used as input for training and testing to obtain a leakage detection model, and a leakage threshold is set according to the output result of the leakage detection model. The alarm rule is formulated based on the leakage threshold, which includes the following steps: S251, training the comprehensive feature vector to obtain several groups of vector parameter combinations, and dividing the corresponding parameter combinations into a training set, a test set, and a validation set according to a preset ratio; S252, using the training set as input to train a support vector machine model, and using the output result of the support vector machine model as a leakage probability value; S253, after verifying the support vector machine model using the verification set, several groups of independent leakage detection models are obtained, and the test set is input into each leakage detection model to obtain several groups of leakage probability values; S254, using a voting screening algorithm to perform a voting operation on a plurality of groups of leakage probability values, and selecting a leakage probability value with a number of votes greater than a threshold value as a final leakage prediction value based on the voting results; S255: Setting a leakage threshold based on the final leakage prediction value, and generating a hydrophone control rule and an optical sensor switch control according to the leakage threshold.
5. The method for identifying water supply network leakage based on acoustic signals according to claim 4, characterized in that: The method of using a voting screening algorithm to perform a voting operation on a plurality of groups of leakage probability values and selecting a leakage probability value with a number of votes greater than a threshold as a final leakage prediction value based on the voting result comprises the following steps: S2541, dividing a plurality of groups of leakage probability values into a plurality of subsets, and sending the subsets to entry nodes using a voting screening algorithm, and performing feature selection on the entry nodes using a decision tree; S2542, counting the features selected by each entry node, defining the leakage probability value corresponding to the selected feature as one vote, and traversing all entry nodes to obtain all feature selection results; S2543. Summarize and calculate all feature selection results, calculate the total number of votes for each group of leakage probability values in the entry node, and select the leakage probability value with a total number of votes greater than the threshold as the final leakage prediction value based on the voting results.
6. The method for identifying water supply network leakage based on acoustic signals according to claim 1, characterized in that: The method of starting the optical fiber sensor to collect the vibration signal at the water supply pipeline based on the leakage probability result, analyzing the change characteristics of the vibration signal, and determining the leakage position of the water supply pipeline network and the diameter of the leakage hole according to the change result includes the following steps: S41, when the leakage probability is greater than the leakage threshold, the optical sensor is started, the light source is used to illuminate the water supply network to excite the optical fiber, and the vibration signal of the water flow passing through the water supply network is captured based on the optical sensor; S42, after amplifying and filtering the vibration signal, determining the leakage position according to the propagation speed of the vibration signal in the optical fiber, and judging the attenuation of the vibration signal corresponding to the leakage position in the optical fiber; S43, preliminarily estimating the size of the leakage hole based on the attenuation situation, and performing spectrum analysis on the vibration signal corresponding to the leakage position to obtain the frequency component, and determining the diameter of the leakage hole according to the frequency and the preliminary estimation result.
7. The method for identifying water supply network leakage based on acoustic signals according to claim 6, characterized in that: After the vibration signal is amplified and filtered, the leakage position is determined according to the propagation speed of the vibration signal in the optical fiber, and the attenuation of the vibration signal corresponding to the leakage position in the optical fiber is determined, which includes the following steps: S421, using a digital amplifier to convert the vibration signal into a digital domain to perform an amplification operation, and using a filter to remove excess noise and frequency components in the vibration signal to extract signal features; S422, defining a wave transfer function according to the vibration signal characteristics, and extracting narrowband components in the vibration signal in combination with a transformation propagation function, to obtain a propagation speed of the vibration signal in the optical fiber; S423, establishing a vibration source positioning model according to the propagation speed and the inversion positioning principle, using the vibration source positioning model to output the leakage position, and determining the distance from the leakage position to the optical sensor; S424. Analyze the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber.
8. The method for identifying water supply network leakage based on acoustic signals according to claim 7, characterized in that: Defining the wave transfer function according to the vibration signal characteristics, extracting the narrowband component in the vibration signal in combination with the transformation propagation function, and obtaining the propagation speed of the vibration signal in the optical fiber includes the following steps: S4221, pre-define the abnormal sound vibration source at the leakage location from the vibration signal, and define the propagation function of the abnormal sound vibration source between any two points on the water supply network; S4222, after simplifying the propagation function to a finite order, invert the abnormal sound vibration source to obtain a conjugate signal, and perform inverse Fourier transform processing on the conjugate signal to obtain the time domain of the abnormal sound vibration source; S4223, simplifying the time domain of the abnormal sound vibration source into a narrowband wave inversion mathematical model, and then combining it with the transform propagation function to extract the narrowband component in the vibration signal, and replacing the vibration signal with the narrowband component for superposition operation; S4224. Determine the time when the vibration signal arrives at the optical sensor according to the superposition result, and calculate the propagation speed of the vibration signal in the optical fiber based on the arrival time.
9. The method for identifying water supply network leakage based on acoustic signals according to claim 8, characterized in that: The expression of the propagation function is: In the formula, l represents the result of the propagation function, a Am (e m , υ) represents the amplitude of the vibration signal when it propagates in a symmetrical mode, a Sm (e m , υ) represents the amplitude of the vibration signal when it propagates in an antisymmetric mode, j Am represents the wave number when the vibration signal propagates in a symmetrical mode, j Sm It represents the amplitude of the vibration signal when it propagates in a symmetrical mode, e m represents the distance between the abnormal sound vibration source and the mth optical sensor, υ represents the frequency of the vibration signal, m represents the total number of optical sensors, S represents the abnormal sound vibration source, and r represents a constant.
10. The method for identifying water supply network leakage based on acoustic signals according to claim 9, characterized in that: The step of analyzing the intensity change of the vibration signal within the distance range based on the distance judgment result to obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber comprises the following steps: S4241, performing time domain analysis on the vibration signal within the distance range to obtain the time domain waveform of the vibration signal, and determining how the vibration signal changes over time based on the time domain waveform to obtain a time-varying feature; S4242. Convert the vibration signal from the time domain to the frequency domain using a linear integral variation technique, analyze the energy of the vibration signal at different frequencies, and determine the frequency characteristics of the leakage location based on the energy analysis result; S4243, analyzing the intensity change of the vibration signal within the distance range by using the frequency characteristics and the time-varying characteristics, and graphically displaying the complementarity of the intensity change and the distance judgment result; S4244. Draw an attenuation curve based on the display situation to show the change of signal strength within the distance range, and obtain the attenuation of the vibration signal corresponding to the leakage position in the optical fiber based on the change.
Citation Information
Patent Citations
Intelligent in-pipe detection ball device for leakage locating of urban water supply network and method
CN106287239A
Pipeline leakage positioning method and device
CN108662442A
Water supply pipeline leakage monitoring method based on DVS optical fiber vibration sensing
CN113669635A
Leakage hole jet flow noise identification method and device, electronic equipment and storage medium
CN115854269A
Leakage detection method and system for intelligent detection ball of water supply pipeline
CN117823830A
Cited By
Water supply network flow prediction method based on time varying-time invariant feature extraction
CN119577425A
Water supply network leakage detection method and device based on logarithmic spectrogram and deep residual network, and storage medium
CN120007981A
Water supply network leakage monitoring system based on big data model
CN120251917A
Multi-source data monitoring test device for pipeline leakage and diagnosis method of multi-source data monitoring test device
CN120488149A
Real-time open channel clogging diagnosis system and method based on voiceprint and flow velocity fusion
CN121634111A
