Pipeline leakage detection method and system based on MPA-VMD denoising

By applying the MPA-VMD denoising method in pipeline leakage detection, optimizing the variational modal decomposition algorithm and using the Hausdorf distance to select effective components, the problem of poor noise reduction in pipeline signals in the prior art is solved, and higher detection accuracy and efficiency are achieved.

CN115062670BActive Publication Date: 2025-04-15NORTHEAST GASOLINEEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210822919.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-14
Publication Date
2025-04-15
Estimated Expiration
2042-07-14

AI Technical Summary

Technical Problem

The prior art has poor noise reduction effect when processing pipeline signals containing noise, resulting in low accuracy in pipeline leakage detection.

Method used

The denoising method based on MPA-VMD is adopted, and the variational modal decomposition algorithm is optimized through the marine predator algorithm, and the optimal decomposition layer number and punishment factor are adaptively selected, and the effective component is calculated in combination with the Housedorf distance to perform signal noise reduction processing.

Benefits of technology

It significantly improves the noise removal effect of pipeline signals, enhances the accuracy and speed of pipeline leakage detection, and avoids the problems of modal aliasing and underdecomposition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115062670B_ABST
    Figure CN115062670B_ABST
Patent Text Reader

Abstract

The pipeline leakage detection method and system based on MPA-VMD denoising, relates to the technical field of pipeline leakage detection, and is used to solve the problem that the prior art has poor denoising effect on pipeline signals containing noise, resulting in low accuracy of pipeline leakage detection. The technical points of the present invention include: optimizing the preset parameters of variational modal decomposition by the marine predator algorithm, so as to find the optimal parameter combination; decomposing the noisy signal into multiple intrinsic modal components after variational modal decomposition; using the Hausdorff distance method, by calculating the distance between the probability density function of the original signal and each component, and evaluating the Hausdorff distance of two adjacent components, the modal components with the largest Hausdorff distance mutation and thereafter are regarded as noise components, and the rest are regarded as effective components and reconstructed to obtain a denoised signal, so as to obtain a smoother and more accurate denoised signal, so that the denoised pipeline signal can make the distinction of pipeline working conditions more accurate and rapid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline leakage detection, and in particular to a pipeline leakage detection method and system based on MPA-VMD denoising. Background Art

[0002] Oil pipelines are increasingly used in modern society. Pipeline transportation has become the fifth largest means of transportation after railways, highways, waterways, and air transportation, used to transport crude oil, natural gas, and other liquid and gas products. With the widespread use of pipelines and the extension of their operating time, pipeline leakage caused by human and natural factors has gradually increased, which not only causes waste of resources and environmental pollution, but also poses a risk of fire and explosion, posing a greater threat to the production and life of surrounding residents. Establishing a pipeline leakage detection system and reporting the scope and extent of accidents in a timely and accurate manner can minimize economic losses and environmental pollution. With the rapid development of information technology, revolutionary technologies such as the Internet of Things and big data are constantly refreshing people's cognition. The progress of science and technology is not only reflected in living standards and economy, but also in its contribution to the sustainable development of the country and the rational use of social resources. Although my country started late in the pipeline oil and gas industry, with the construction of major oil fields, oil and gas transportation pipelines have gradually spread across my country. However, with the increasing scale of the oil and gas pipeline network gathering and transportation system, coupled with the increase in service life, operation wear, equipment aging, and the influence of human and natural factors, pipeline leakage will occur, and even cause major leakage accidents such as explosions and pollution. Therefore, oil pipeline leakage detection is very important. With the widespread application of oil pipeline transportation, the requirements for oil pipeline leakage detection systems are also increasing. It is a very necessary and significant topic to find leaks in time, estimate the leak point and leak amount, and take effective measures to avoid and reduce the occurrence of leakage accidents. Therefore, establishing a pipeline leakage detection system and reporting the scope and extent of accidents in a timely and accurate manner can minimize economic losses and environmental pollution.

[0003] Pipeline leakage not only causes huge economic losses to production and operation units, but also damages the environment and seriously affects the health and life safety of residents along the line. Therefore, it is necessary to strengthen the research on leakage detection technology and positioning technology to improve the accuracy of leakage detection. Summary of the invention

[0004] In view of the above problems, the present invention proposes a pipeline leakage detection method and system based on MPA-VMD denoising to solve the problem that the prior art has poor noise reduction effect on pipeline signals containing noise, resulting in low accuracy of pipeline leakage detection.

[0005] According to one aspect of the present invention, a pipeline leakage detection method based on MPA-VMD denoising is provided, the method comprising the following steps:

[0006] Acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal;

[0007] De-noising the pipeline signal to obtain a pipeline signal after de-noising;

[0008] The de-noised pipeline signal is input into the pre-trained classifier for operating condition recognition to identify different operating conditions of the pipeline.

[0009] Furthermore, the specific process of reducing the noise of the pipeline signal includes:

[0010] The ocean predator algorithm is used to optimize the variational mode decomposition algorithm, so that the variational mode decomposition algorithm can adaptively select the optimal decomposition layer number and penalty factor according to the characteristics of the pipeline signal;

[0011] The optimal number of decomposition layers and penalty factors are used as the input of variational mode decomposition, and the pipeline signal containing noise is decomposed through variational mode decomposition to obtain multiple intrinsic mode components;

[0012] Calculate the probability density function of the pipeline signal containing noise and the probability density functions of multiple eigenmode components;

[0013] Calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of multiple intrinsic mode components, expressed as a similarity degree sequence SD;

[0014] Find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point. The eigenmode component before the turning point is defined as the effective component, and the eigenmode component after the turning point is defined as the noise component.

[0015] The effective components are reconstructed to obtain the pipeline signal after noise reduction.

[0016] Furthermore, the specific process of using the ocean predator algorithm to optimize the variational mode decomposition algorithm so that the variational mode decomposition algorithm can adaptively select the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal includes:

[0017] Setting a range of parameters to be optimized for the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition levels and a penalty parameter;

[0018] Initialize various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters;

[0019] The position of each predator is calculated, and the position of each predator is used as a parameter for the operation of a variational mode decomposition algorithm, and the fitness values ​​of all modal components at the position of each predator are obtained; the fitness values ​​in the iteration are compared to detect whether it is the optimal fitness value, that is, the minimum fitness value, and the position of the predator corresponding to the optimal fitness value is updated; wherein, the sample entropy is used as the fitness function to obtain the fitness value;

[0020] The above steps are iterated until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding final predator position. The final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm.

[0021] Furthermore, the calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise is as follows:

[0022] SD(i)=HD[pdf(s(t)),pdf(IMF i (t))]

[0023] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

[0024] Furthermore, the operating conditions include three types of operating conditions: normal, knocking, and leakage.

[0025] According to another aspect of the present invention, a pipeline leakage detection system based on MPA-VMD denoising is provided, the system comprising:

[0026] A signal acquisition module, configured to acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal;

[0027] A noise reduction module, configured to reduce noise on the pipeline signal and obtain a noise-reduced pipeline signal;

[0028] The working condition identification module is configured to input the pipeline signal after noise reduction into a pre-trained classifier for working condition identification, and identify different working conditions of the pipeline; the working conditions include three types of working conditions: normal, knocking, and leakage.

[0029] Furthermore, the noise reduction module includes:

[0030] A VMD optimization submodule, which is configured to optimize the variational mode decomposition algorithm using the ocean predator algorithm, so that the variational mode decomposition algorithm adaptively selects the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal;

[0031] A VMD decomposition submodule is configured to use an optimal number of decomposition layers and a penalty factor as inputs of a variational mode decomposition, and decompose a pipeline signal containing noise through the variational mode decomposition to obtain a plurality of intrinsic mode components;

[0032] A probability density calculation submodule configured to calculate a probability density function of a pipeline signal containing noise and probability density functions of a plurality of intrinsic mode components;

[0033] A Hausdorff distance calculation submodule, configured to calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of the plurality of intrinsic mode components, expressed as a similarity degree sequence SD;

[0034] An effective component screening submodule is configured to find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point, define the eigenmode component before the turning point as the effective component, and define the eigenmode component after the turning point as the noise component;

[0035] The reconstruction submodule is configured to reconstruct the effective component to obtain the pipeline signal after noise reduction.

[0036] Furthermore, the specific process of optimizing the variational mode decomposition algorithm by using the ocean predator algorithm in the VMD optimization submodule so that the variational mode decomposition algorithm adaptively selects the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal includes:

[0037] Setting a range of parameters to be optimized for the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition levels and a penalty parameter;

[0038] Initialize various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters;

[0039] The position of each predator is calculated, and the position of each predator is used as a parameter for the operation of a variational mode decomposition algorithm, and the fitness values ​​of all modal components at the position of each predator are obtained; the fitness values ​​in the iteration are compared to detect whether it is the optimal fitness value, that is, the minimum fitness value, and the position of the predator corresponding to the optimal fitness value is updated; wherein, the sample entropy is used as the fitness function to obtain the fitness value;

[0040] The above steps are iterated until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding final predator position. The final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm.

[0041] Furthermore, the calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise in the Hausdorff distance calculation submodule is as follows:

[0042] SD(i)=HD[pdf(s(t)),pdf(IMF i (t))]

[0043] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

[0044] The beneficial technical effects of the present invention are:

[0045] The present invention optimizes the preset parameters of the VMD algorithm through the MPA algorithm, avoiding modal aliasing and under-decomposition caused by improper selection of preset parameters; further selects effective components through HD to obtain a smoother and more accurate denoised signal. Experiments have proved that the denoising method based on MPA-VMD has a better denoising effect; thus, the denoised pipeline signal can make the distinction between pipeline working conditions more accurate and rapid. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The present invention can be better understood by referring to the description given below in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification, and are used to further illustrate the preferred embodiments of the present invention and explain the principles and advantages of the present invention.

[0047] Figure 1 is a flow chart of a pipeline leakage detection method based on MPA-VMD denoising according to an embodiment of the present invention;

[0048] Figure 2 It is a time domain waveform diagram of the original signal and its spectrum diagram in an embodiment of the present invention;

[0049] Figure 3 It is a comparison diagram between the method of the present invention and the optimization iteration based on WOA-VMD denoising;

[0050] Figure 4 1 is a comparison chart of HD lines between the method of the present invention and the denoising based on WOA-VMD; wherein (a) corresponds to the method of the present invention; (b) corresponds to the denoising based on WOA-VMD;

[0051] Figure 5 It is a time domain waveform diagram and spectrum diagram of the reconstructed signal based on the method of the present invention and WOA-VMD denoising; wherein (a) corresponds to the method of the present invention; (b) corresponds to the denoising based on WOA-VMD;

[0052] Figure 6 It is a structural schematic diagram of a pipeline leakage detection system based on MPA-VMD denoising according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, exemplary implementations or embodiments of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described implementations or embodiments are only implementations or embodiments of a part of the present invention, not all of them. Based on the implementations or embodiments of the present invention, all other implementations or embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.

[0054] The embodiment of the present invention provides a pipeline leakage detection method based on MPA-VMD denoising, such as Figure 1 As shown, the method comprises the following steps:

[0055] Acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal;

[0056] De-noising the pipeline signal to obtain a pipeline signal after de-noising;

[0057] The de-noised pipeline signal is input into the pre-trained classifier for operating condition recognition to identify different operating conditions of the pipeline.

[0058] In this embodiment, preferably, the specific process of reducing the noise of the pipeline signal includes:

[0059] The ocean predator algorithm is used to optimize the variational mode decomposition algorithm, so that the variational mode decomposition algorithm can adaptively select the optimal decomposition layer number and penalty factor according to the characteristics of the pipeline signal;

[0060] The optimal number of decomposition layers and penalty factors are used as the input of variational mode decomposition, and the pipeline signal containing noise is decomposed through variational mode decomposition to obtain multiple intrinsic mode components;

[0061] Calculate the probability density function of the pipeline signal containing noise and the probability density functions of multiple eigenmode components;

[0062] Calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of multiple intrinsic mode components, expressed as a similarity degree sequence SD;

[0063] Find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point. The eigenmode component before the turning point is defined as the effective component, and the eigenmode component after the turning point is defined as the noise component.

[0064] The effective components are reconstructed to obtain the pipeline signal after noise reduction.

[0065] In this embodiment, preferably, the variational mode decomposition algorithm is optimized by using the ocean predator algorithm, and the specific process of enabling the variational mode decomposition algorithm to adaptively select the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal includes:

[0066] Setting a range of parameters to be optimized for the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition levels and a penalty parameter;

[0067] Initialize various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters;

[0068] The position of each predator is calculated, and the position of each predator is used as a parameter for the operation of a variational mode decomposition algorithm, and the fitness values ​​of all modal components at the position of each predator are obtained; the fitness values ​​in the iteration are compared to detect whether it is the optimal fitness value, that is, the minimum fitness value, and the position of the predator corresponding to the optimal fitness value is updated; wherein, the sample entropy is used as the fitness function to obtain the fitness value;

[0069] The above steps are iterated until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding final predator position. The final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm.

[0070] In this embodiment, preferably, the calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise is as follows:

[0071] SD(i)=HD[pdf(s(t)),pdf(IMF i (t))]

[0072] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

[0073] In this embodiment, preferably, the operating conditions include three types of operating conditions: normal, knocking, and leakage.

[0074] Another embodiment of the present invention provides a pipeline leakage detection method based on MPA-VMD denoising. First, the preset parameters of the variational mode decomposition (VMD-Variational Mode Decomposition) are optimized by the marine predator algorithm (MPA-Marine Predators Algorithm), so as to find the optimal parameter combination; then, the noisy signal is decomposed into multiple intrinsic mode components (IMFs) by variational mode decomposition; in order to find the effective component, the Hausdorff distance method is adopted, by calculating the distance between the probability density function of the original signal and each component, and evaluating the Hausdorff distance of two adjacent components, the two adjacent components with the largest Hausdorff distance increment are used as the turning points for selecting the effective component, that is, the modal components with the largest Hausdorff distance mutation and thereafter are regarded as noise components, and the rest are regarded as effective components and reconstructed to obtain the denoised signal, thereby realizing high-precision denoising of the collected pipeline leakage signal.

[0075] The VMD parameters optimized by MPA use sample entropy as the fitness function, and perform global optimization by selecting the minimum sample entropy to obtain the optimal number of decomposition layers K and penalty parameter α. The specific steps of MPA optimization of VMD are as follows:

[0076] Step 1: Input the original signal S, set the parameter range that VMD needs to optimize, and initialize various parameters of the marine predator algorithm, including population size N, number of iterations iter, and FADs parameters;

[0077] Step 2: Calculate the position of each predator, and use the position of each predator [K, α] as a parameter for a VMD run, and obtain the fitness values ​​of all modal components at this position;

[0078] Step 3: Compare the fitness values ​​in the iteration, detect whether it is the optimal fitness value, and update the position of the predator;

[0079] Step 4: Repeat steps 2 to 3, iteratively, until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding predator position [K, α];

[0080] Step 5: The optimal parameter combination [K, α] obtained after MPA optimizes VMD is used as VMD parameter input. The noise signal is decomposed by VMD, and the resulting IMFs are aligned from low frequency to high frequency.

[0081] The noise components are mainly concentrated in the high frequency part. However, valid IMFs also exist in the high frequency part. In order to distinguish valid IMF from non-valid IMF, Hausdorff distance is used to select valid IMF components.

[0082] Step 6: Calculate the probability density function of the original noisy signal x(t) after VMD decomposition and the probability density function of each IMF;

[0083] Step 7: Calculate the Hausdorff distance between them using formula (26), and express it as the similarity SD with the original signal. The definition of SD is as follows:

[0084] SD(i)=HD[pdf(s(t)),pdf(IMF i (t))]

[0085] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

[0086] Step 8: Evaluate the increment of the SD between two adjacent IMF components and the original signal, and use the two adjacent modal components with the largest SD increment as the turning points for selecting effective components, which means that the modal components with the largest SD mutation and those after it are regarded as noise signals;

[0087] Step nine: reconstruct the effective component to obtain the noise reduction signal.

[0088] The following is a brief description of the relevant algorithms used.

[0089] 1. VMD algorithm

[0090] The VMD algorithm is an adaptive, completely non-recursive modal variation and signal processing method that has a good processing effect on non-stationary and nonlinear signals. The VMD algorithm has the advantage of being able to determine the number of modal decompositions. It can determine 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 intrinsic modal components (IMFs), frequency domain division of signals, and then obtain effective decomposition components of a given signal, and finally obtain the optimal solution to the variational problem. However, since the VMD algorithm requires the pre-definition of the decomposition layer number K and the penalty factor α, when K and α are set improperly, it will have a certain impact on the VMD decomposition, thereby affecting the noise reduction effect.

[0091] Assume f is the original multi-component signal. VMD can adaptively decompose f into a series of sparse intrinsic mode functions, also called modal components, by constructing and solving the variational model. They are defined as follows:

[0092] u k (t) = A k (t)cos(φ k(t)) (1)

[0093] Among them, A k (t) is the amplitude, t is the time variable, φ k (t) is the phase function, non-monotonic decreasing, instantaneous frequency Relative φ k (t) changes slowly, that is, u k (t) can be regarded as a harmonic signal.

[0094] After VMD decomposition, the signal f is divided into several independent modes u k , and construct the variational model:

[0095] (1) For each modal function u k The analytical signal is obtained through Hilbert transform, the purpose is to find its one-sided spectrum;

[0096]

[0097] (2) Utilization Index Correction, so that the spectrum of each mode function is modulated to the corresponding baseband;

[0098]

[0099] (3) Through Gaussian smoothing (i.e. The signal is demodulated by using the square root of the norm gradient to obtain the bandwidth of each mode function.

[0100]

[0101] The obtained VMD constrained variational model is as follows:

[0102]

[0103] Among them, u k ={u1,u2,...,u k} are the modal functions, ω k ={ω1,ω2,...,ω k} is the center frequency, δ(t) is the unit impulse function, represents the partial derivative of the function with respect to time t.

[0104] In order to solve the above constrained optimization problem, the augmented Lagrangian function is introduced by taking advantage of the quadratic penalty term and the Lagrangian multiplier method, as shown in the following formula:

[0105]

[0106] Among them, α is the penalty parameter and λ is the Lagrange multiplier.

[0107] The alternating direction multiplier algorithm is used to perform a series of iterations to find the optimal solution, thereby decomposing the original signal f into K BLIMF components. The implementation steps are as follows:

[0108] Step 1: Initialization n←0;

[0109] Step 2: n=n+1, execute the entire loop;

[0110] Step 3: k = k + 1, until k = K

[0111] For all ω ≥ 0, update the functional

[0112]

[0113] Update functional ω k :

[0114]

[0115] Step 4: For all ω ≥ 0, double lifting:

[0116]

[0117] Wherein, γ represents the noise tolerance. When the signal contains strong noise, γ=0 can be set to achieve better denoising effect.

[0118] Step 5: Repeat Step 2-4 until the following iteration constraints are met:

[0119]

[0120] From the process of solving the variational model by the VMD algorithm, it can be seen that the penalty factor α and the number of decomposition layers K are the two main parameters that affect the decomposition effect of the VMD signal. When the values ​​of the two are inappropriate, it will directly cause the VMD decomposition result to be inaccurate or the decomposition time to be too long, affecting the decomposition effect.

[0121] 2. Construction of sample entropy

[0122] Sample entropy measures the complexity of a time series by measuring the probability of a new pattern in a signal. The greater the probability of a new pattern, the greater the complexity of the sequence. Compared with approximate entropy, sample entropy has two advantages: the calculation of sample entropy does not depend on the length of the data; sample entropy has better consistency, that is, the changes in parameters m and r have the same impact on sample entropy. The lower the value of sample entropy, the higher the self-similarity of the sequence; the larger the value of sample entropy, the more complex the sample sequence.

[0123] Generally speaking, for a sequence of N data {s(n)}=s(1),s(2),…,s(N), the sample entropy is calculated as follows:

[0124] (1) A vector sequence of dimension m is formed according to the sequence number: S m (1),…,S m (N-m+1), where S m (i) = {s(i), s(i+1), ..., s(i+m-1)}, 1≤i≤N-m+1. These vectors represent the m consecutive values ​​of s starting from the i-th point.

[0125] (2) Define vector S m (i) with S m (j) The distance d[S m (i),S m (j)] is the absolute value of the maximum difference between the two corresponding elements. That is:

[0126] d[S m (i),S m (j)]=max k=0,…,m-1 (|s(i+k)-s(j+k)|) (11)

[0127] (3) For a given S m (i) Statistics S m (i) and S m The number of j (1≤j≤Nm, j≠i) whose distance between them is less than or equal to r, and is recorded as B i For 1≤i≤Nm, define:

[0128]

[0129] Definition B (m) (r) is:

[0130]

[0131] Increase the dimension to m+1 and calculate S m+1 (i) and S m+1 The number of distances (j)(1≤j≤Nm, j≠i) less than or equal to r, denoted as A i . Defined as:

[0132]

[0133] Definition A m (r) is:

[0134]

[0135] So, B m (r) is the probability that two sequences match m points under similarity tolerance r, and A m (r) is the probability that two sequences match m+1 points. Sample entropy is defined as:

[0136]

[0137] When N is a finite value, it can be estimated using the following formula:

[0138]

[0139] 3. Selection of Hausdorff distance

[0140] After the signal is decomposed by VMD, it is uncertain which decomposed components are useful components, so the Hausdorff distance method is used to select the effective components. The principle of Hausdorff distance is as follows:

[0141] If two sequences P = {p1, p2, ...}, Q = {q1, q2, ...} are given, then the Hausdorff distance can be used to measure the distance between the two sequences. The calculation method is as follows:

[0142] HD(P,Q)=max(hd(P,Q),hd(Q,P)) (18)

[0143] in, HD(P,Q) is called the bidirectional Hausdorff distance, and hd(P,Q) is called the one-way Hausdorff distance from point set P to point set Q. Correspondingly, hd(Q,P) is called the one-way Hausdorff distance from point set Q to point set P.

[0144] 4. Marine Predator Algorithm

[0145] The Marine Predator Algorithm is a new metaheuristic optimization algorithm proposed by Afshin Faramarzi et al. in 2020. Similar to most metaheuristics, MPA is a population-based method in which the initial solutions are uniformly distributed over the search space at the first test:

[0146] X0=X min +rand*(X max -X min ) (19)

[0147] Among them, X max and X min are the upper and lower bounds of the variable and rand is a uniform random vector in the range 0 to 1.

[0148] According to the theory of survival of the fittest, the top predators in nature are more talented in foraging. Therefore, the most suitable solution is named the top predator, which constructs an elite matrix. The array of this matrix will supervise the search and find prey based on the information about the location of the prey.

[0149]

[0150] in represents the top predator vector, which is replicated n times to construct the elite matrix. n is the number of search agents, and d is the dimension. It is worth noting that both predators and prey are considered search agents. Because when the predator is looking for prey, the prey is looking for its own food. At the end of each iteration, if the top predator is replaced by a better predator, the elite will also be updated.

[0151] Another matrix identical to the elite is called prey, based on which the predators update their positions. In short, initialization creates the initial prey, from which the fittest (predators) construct the elite. The prey is displayed as follows:

[0152]

[0153] Where, X i,j represents the jth dimension of the i-th prey. It should be noted that the entire process of optimization is mainly and directly related to these two matrices.

[0154] The MPA optimization process is divided into three main optimization phases, taking into account different rate ratios and simulating the entire life of predators and prey. For each defined phase, a specific iteration cycle is specified and assigned. These steps are defined based on the rules governed by the nature of the predator and prey movement, while simulating the movement of predators and prey in nature. The three optimization phases include:

[0155] At high velocity ratios or when the prey moves faster than the predator. The mathematical model for this rule applies as:

[0156]

[0157] where RB is a random vector containing a normal distribution based on Brownian motion. The notation represents the multiplication of entries. The RB multiplication of the prey simulates the movement of the prey. P=0.5 is a constant, R is a vector of uniform random numbers in [0,1]. Max_iter is the maximum number of iterations.

[0158] Unit rate ratio or when both the predator and prey are moving at nearly the same speed. , for the first half of the population:

[0159]

[0160] For the second half of the population:

[0161]

[0162] in, is an adaptive parameter that controls the step size of the predator's movement. The multiplication of and elite simulates the motion of the predator in a Brownian manner, while the prey updates its position according to the motion of the predator in Brownian motion.

[0163] At low speed ratios, the predator moves faster than the prey. hour:

[0164]

[0165] The multiplication with the elite simulates the motion of the predator in the Lévy method. Also adding the step size to the elite position simulates the motion of the predator to help update the prey position.

[0166] The formation of eddies and fish aggregation (FADs) effects also lead to changes in the behavior of marine predators. In the search space, FADs are considered to be local optima. Taking this factor into account during the simulation process avoids stagnation in the local optimum. Therefore, the FADs effect is mathematically expressed as:

[0167]

[0168] Among them, the probability that FADs affects the optimization process is taken as FADs = 0.2. is a binary vector containing arrays of 0 and 1. Its construction method is as follows. Generate a random vector in the range [0,1]. If the array is less than 0.2, change its array to 0. If the array is greater than 0.2, change its array to 1. r is a uniform random number in the range [0,1]. r1, r2 are random indexes of the prey matrix respectively.

[0169] The technical effect of the present invention is further verified through experiments.

[0170] The experiment selected three harmonic signals with frequencies of 5 Hz, 50 Hz and 200 Hz and a Gaussian white noise with a signal-to-noise ratio of 15 dB to form a noise signal to analyze the performance of the MPA-VMD method, as shown in the following formula:

[0171] S=sin(2π*5t)+1.2cos(2π*50t)+1.4sin(2π*200t)+η (27)

[0172] The waveform and spectrum of signal S are as follows: Figure 2 As shown, from Figure 2 It can be seen from the figure that since the synthesized signal S is interfered by noise, the frequencies of the three harmonic signals are all affected.

[0173] By optimizing VMD with MPA algorithm and Whale Optimization Algorithm (WOA) respectively, and using sample entropy as fitness function in the optimization process, the search range of decomposition level K is set to [2,10], and the search range of penalty factor α is set to [200,4000]. The optimization results are shown in Table 1. The optimization process is as follows: Figure 3 shown.

[0174] Table 1

[0175]

[0176] The optimization results are used as VMD preset parameters for calculation, and the HD distance line graphs obtained are as follows: Figure 4 shown.

[0177] from Figure 4 It can be seen that the HD increment between IMF3 and IMF4 is the largest, so the first three IMF components are reconstructed as valid components. Figure 4 It can be seen from the displayed results that the first three IMF components are still valid components. The optimization results of the MPA-VMD and WOA-VMD methods are respectively input into VMD to decompose the original signal, and the valid components are selected from the decomposed modes for reconstruction. The reconstruction results are shown in Figure 5 shown.

[0178] The reconstruction result and the original signal are compared by using the three evaluation indicators of SNR, MSE and MAE. It can be seen from Table 2 that the denoising method using MPA-VMD can not only find the optimal parameter combination of decomposition scale K and penalty factor α faster and more accurately, but also improve SNR, reduce MSE and MAE, and have a better denoising effect.

[0179] Table 2 Performance comparison of different denoising methods

[0180]

[0181] The present invention optimizes the preset parameters of VMD through an intelligent optimization algorithm, avoiding modal aliasing and under-decomposition caused by improper selection of preset parameters. HD is used to further select effective components to obtain a smoother and more accurate denoised signal, and a comparison is made from three aspects: SNR, MSE and MAE, proving that the denoising method based on MPA-VMD has a better denoising effect.

[0182] Another embodiment of the present invention provides a pipeline leakage detection system based on MPA-VMD denoising, such as Figure 6 As shown, the system includes:

[0183] A signal acquisition module 10, configured to acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal;

[0184] A noise reduction module 20, configured to reduce noise on the pipeline signal and obtain a noise-reduced pipeline signal;

[0185] The working condition identification module 30 is configured to input the pipeline signal after noise reduction into a pre-trained classifier for working condition identification, and identify different working conditions of the pipeline; the working conditions include three types of working conditions: normal, knocking, and leakage.

[0186] In this embodiment, preferably, the noise reduction module 20 includes:

[0187] A VMD optimization submodule 210, which is configured to optimize the variational mode decomposition algorithm using the ocean predator algorithm, so that the variational mode decomposition algorithm adaptively selects the optimal decomposition layer number and penalty factor according to the characteristics of the pipeline signal;

[0188] The VMD decomposition submodule 220 is configured to use the optimal decomposition layer number and penalty factor as inputs of variational mode decomposition, and decompose the pipeline signal containing noise through variational mode decomposition to obtain multiple intrinsic mode components;

[0189] A probability density calculation submodule 230, configured to calculate a probability density function of a pipeline signal containing noise and probability density functions of a plurality of intrinsic mode components;

[0190] A Hausdorff distance calculation submodule 240, configured to calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of the plurality of intrinsic mode components, expressed as a similarity degree sequence SD;

[0191] The effective component screening submodule 250 is configured to find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point, define the eigenmode component before the turning point as the effective component, and define the eigenmode component after the turning point as the noise component;

[0192] The reconstruction submodule 260 is configured to reconstruct the effective component to obtain a pipeline signal after noise reduction.

[0193] In this embodiment, preferably, the VMD optimization submodule 210 uses the ocean predator algorithm to optimize the variational mode decomposition algorithm, so that the variational mode decomposition algorithm adaptively selects the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal. The specific process includes:

[0194] Setting a range of parameters to be optimized for the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition levels and a penalty parameter;

[0195] Initialize various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters;

[0196] The position of each predator is calculated, and the position of each predator is used as a parameter for the operation of a variational mode decomposition algorithm, and the fitness values ​​of all modal components at the position of each predator are obtained; the fitness values ​​in the iteration are compared to detect whether it is the optimal fitness value, that is, the minimum fitness value, and the position of the predator corresponding to the optimal fitness value is updated; wherein, the sample entropy is used as the fitness function to obtain the fitness value;

[0197] The above steps are iterated until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding final predator position. The final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm.

[0198] In this embodiment, preferably, the calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise in the Hausdorff distance calculation submodule 240 is as follows:

[0199] SD(i)=HD[pdf(s(t)),pdf(IMF i (t))]

[0200] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

[0201] The function of the pipeline leakage detection system based on MPA-VMD denoising described in this embodiment can be explained by the aforementioned pipeline leakage detection method based on MPA-VMD denoising. Therefore, for the parts not described in detail in this embodiment, please refer to the above method embodiments and will not be repeated here.

[0202] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments are contemplated within the scope of the invention thus described. The disclosure of the present invention is intended to be illustrative rather than restrictive of the scope of the invention, which is defined by the appended claims.

Claims

1. A pipeline leakage detection method based on MPA-VMD denoising, characterized in that: The following steps are involved: Acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal; De-noising the pipeline signal to obtain the pipeline signal after de-noising. The specific process includes: The variational mode decomposition algorithm is optimized by using the marine predator algorithm, so that the variational mode decomposition algorithm can adaptively select the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal; including: setting the range of parameters to be optimized of the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition layers and the penalty parameter; initializing various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters; calculating the position of each predator, and using the position of each predator as a parameter for running the variational mode decomposition algorithm once, and obtaining the fitness values ​​of all modal components at the position of each predator; comparing the fitness values ​​in the iteration, detecting whether it is the optimal fitness value, that is, the minimum fitness value, and updating the position of the predator corresponding to the optimal fitness value; wherein, the sample entropy is used as the fitness function to obtain the fitness value; iterating the above steps until the maximum number of iterations is reached to obtain the global optimal fitness value and the corresponding final predator position, and the final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm; The optimal number of decomposition layers and penalty factors are used as the input of variational mode decomposition, and the pipeline signal containing noise is decomposed through variational mode decomposition to obtain multiple intrinsic mode components; Calculate the probability density function of the pipeline signal containing noise and the probability density functions of multiple eigenmode components; Calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of multiple intrinsic mode components, expressed as a similarity degree sequence SD; Find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point. The eigenmode component before the turning point is defined as the effective component, and the eigenmode component after the turning point is defined as the noise component. Reconstruct the effective components to obtain the pipeline signal after noise reduction; The de-noised pipeline signal is input into the pre-trained classifier for operating condition recognition to identify different operating conditions of the pipeline.

2. The pipeline leakage detection method based on MPA-VMD denoising according to claim 1 is characterized in that: The calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise is as follows: SD(i)=HD[pdf(s(t)),pdf(IMF i (t))] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.

3. The pipeline leakage detection method based on MPA-VMD denoising according to claim 1 or 2, characterized in that: The working conditions include three types of working conditions: normal, knocking and leakage.

4. The pipeline leakage detection system based on MPA-VMD denoising is characterized by: include: A signal acquisition module, configured to acquire a pipeline signal containing noise; the pipeline signal includes a sound wave signal or a negative pressure wave signal; A noise reduction module, configured to reduce noise on the pipeline signal and obtain the pipeline signal after noise reduction; comprising: The VMD optimization submodule is configured to optimize the variational mode decomposition algorithm using the marine predator algorithm, so that the variational mode decomposition algorithm adaptively selects the optimal number of decomposition layers and penalty factors according to the characteristics of the pipeline signal; including: setting the range of parameters to be optimized of the variational mode decomposition algorithm; the parameters to be optimized include the number of decomposition layers and the penalty parameters; initializing various parameters of the marine predator algorithm, including population size, number of iterations, and FADs parameters; calculating the position of each predator, and using the position of each predator as a parameter for running the variational mode decomposition algorithm once, and obtaining the fitness values ​​of all modal components at the position of each predator; comparing the fitness values ​​in the iteration, detecting whether it is the optimal fitness value, that is, the minimum fitness value, and updating the position of the predator corresponding to the optimal fitness value; wherein, the sample entropy is used as the fitness function to obtain the fitness value; iterating the above steps until the global optimal fitness value and the corresponding final predator position are obtained after the maximum number of iterations, and the final predator position is the optimal number of decomposition layers and penalty parameters of the variational mode decomposition algorithm; A VMD decomposition submodule is configured to use an optimal number of decomposition layers and a penalty factor as inputs of a variational mode decomposition, and decompose a pipeline signal containing noise through the variational mode decomposition to obtain a plurality of intrinsic mode components; A probability density calculation submodule configured to calculate a probability density function of a pipeline signal containing noise and probability density functions of a plurality of intrinsic mode components; A Hausdorff distance calculation submodule, configured to calculate the Hausdorff distance between the probability density function of the pipeline signal containing noise and the probability density functions of the plurality of intrinsic mode components, expressed as a similarity degree sequence SD; An effective component screening submodule is configured to find the SD value with the largest change relative to the previous SD value in the sequence SD, and take the eigenmode component corresponding to the SD value with the largest change as the turning point, define the eigenmode component before the turning point as the effective component, and define the eigenmode component after the turning point as the noise component; A reconstruction submodule, configured to reconstruct the effective component to obtain a pipeline signal after noise reduction; The working condition identification module is configured to input the pipeline signal after noise reduction into a pre-trained classifier for working condition identification, and identify different working conditions of the pipeline; the working conditions include three types of working conditions: normal, knocking, and leakage.

5. The pipeline leakage detection system based on MPA-VMD denoising according to claim 4 is characterized in that: The calculation formula of the SD value between the i-th intrinsic mode component in the sequence SD and the pipeline signal containing noise in the Hausdorff distance calculation submodule is as follows: SD(i)=HD[pdf(s(t)),pdf(IMF i (t))] Where pdf(s(t)) represents the probability density of the pipeline signal containing noise; pdf(IMF i (t)) represents the probability density of the i-th eigenmode component; HD represents the Hausdorff distance.