Application of a noise reduction method combining AVMD and SVD in natural gas pipeline leakage signal

Due to the large amount of noise in pipeline leakage signal, the accuracy of the leakage detection device's judgment will be reduced by direct leakage detection. Therefore, the noise reduction of pipeline leakage signal is critical for preprocessing technology of pipeline leakage detection. A denoising method combining adaptive variational mode decomposition (AVMD) and singular value decomposition (SVD) is proposed in this paper. First, the mode number and the penalty factor of VMD are searched automatically by AVMD. The AVMD algorithm is coupled to a fitness function based on improved refine composite multiscale dispersion entropy (RCMDE). Subsequently, a time–frequency matrix which obtains time–frequency subspace after SVD is constructed for all mode components decomposed by VMD, and the number of effective time–frequency subspaces is determined by the relative change rate of singular values, thereby the denoised signal is achieved. Finally, the experimental results show that the AVMD-SVD method proposed in this paper has the significant denoising effect and strong robustness.


Introduction
Pipeline is the main mode of transportation for large quantities of natural gas. For long-distance transportation, the pipeline is very cost-effective because it has the advantages of low cost, safety and so on (Muggleton et al., 2020). However, pipeline leakage occurs frequently because of aging, corrosion, and other forms of damage, which poses a great threat to the safe transportation of pipelines (Zhang et al., 2014). Pipeline leakage has a series of adverse effects on the environment, economy, health, and safety. In view of the above facts, accurate detection and early warning of leakage pipelines are very necessary and significant (Liu et al., 2017). The main methods to solve pipeline leakage include: acoustic wave method (Xiao et al., 2019), negative pressure wave detection method (Li, Zheng, et al., 2019), transient model method (Murvay & Silea, 2012), distributed optical fibre method (Muggleton et al., 2020). Considering that the acoustic method has higher sensitivity and stronger adaptability than traditional methods, a lot of research on it have been conducted by experts and scholars. In Liang et al. (2013), the sound principle and source characteristics of pipeline leakage have been studied, then a novel acoustic technology for pipeline leakage detection CONTACT Dongmei Wang wdmljy@126.com,quxue183@163.com model has been proposed. In Liu et al. (2015), a leakage detection and location method based on propagation law has been proposed by studying propagation law of attenuation and using correction factor to correct the actual propagation model. However, due to the influence of the complex environment during pipeline transportation, a large amount of noise is mixed into the acoustic signal. Therefore, effectively filtering out the noise in the pipeline leakage signal is of great significance to pipeline leakage detection technology. In practice, various methods of signals denoising have been investigated. The wavelet transform (WT) method is a practical tool for signal denoising, and it has a wide range of applications in various fields (Huang et al., 2018;Xin et al., 2020). Given that WT has good time-frequency characteristics, nonlinear signal can be denoised effectively. The selection of the mother wavelet and the number of decomposition layers are closely related to the extracted feature information, which is crucial to the denoising performance. The empirical mode decomposition (EMD) (Huang et al., 1998) is a method of adaptively signal decomposition. Lahmiri and Boukadoum (2015) has been decomposed the bio-signal by EMD, assigned a specific weight to each IMF obtained and passed the discrete wavelet transform (DWT) threshold to reduce noise. However, the end effect problem of EMD and the mode aliasing phenomenon need to be optimized. In 2014, Dragomiretskiy and Zosso (2014) proposed variational mode decomposition (VMD). As a new signal decomposition method, the VMD algorithm could overcome the problems of endpoint effects and modal aliasing. Furthermore, VMD makes up for the shortcomings of EMD and has good stability and robustness. If the parameter values [K, α] of VMD are not set properly, it may cause under-decomposition or over-decomposition. In Yang et al. (2019), the simulated annealing (SA) algorithm has been applied to search for the control parameters of VMD. In Zhang et al. (2018), a method for optimizing the parameter values has been proposed by the grasshopper optimization algorithm (GOA). In Yi et al. (2016), the improved cross-correlation coefficient has been used as the fitness function of the particle swarm optimization (PSO) algorithm, and then the parameters of VMD have been optimized by PSO. In Gu et al. (2020), the grey wolf optimization algorithm (GWOA) using the minimum average envelope entropy as the fitness function has been optimized the control parameters adaptively. This method could accurately identify the frequency of the fault feature. In Lu et al. (2020), VMD has been used in combination with the Bhattacharyya distance based on variance method to optimize the modes. In Li et al. (2020), the maximum envelope kurtosis has been used as an index for optimizing and determining the number of VMD modes. In Zhou and Zhu (2019), an algorithm combining VMD and singular spectrum analysis (SSA) has been used to filter seismic noise. In Zhou et al. (2020), a multi-feature fusion method has been proposed to extract the characteristics of pipeline signal. The effective characteristic parameters have been selected to form the characteristic vector and the support vector machine (SVM) has been used to identify the different pipeline signals. The two-dimensional variational mode decomposition (2D-VMD) and the Hausdorff distance (HD) in Gao et al. (2020) has been presented to denoising oil and gas pipeline images. Singular value decomposition (SVD) is an effective signal denoising method. In Zhao and Jia (2017), in order to extract weak features caused by early failures, a reweighted SVD strategy has been proposed for denoising signal and enhancing the weak feature of signal. In Zhang et al. (2017), higher-order SVD has been investigated to the denoising of diffusion-weighted images. In Li, liu, et al. (2019), a new type of relative change rate of singular value kurtosis (SVK) has been proposed to determine the reconstruction order of singular values.
For the interference brought by artificially set VMD parameters on signal decomposition, a signal denoising method based on the combination of AVMD and SVD has been proposed in this paper. First, input the parameter pair [K, α] adaptively optimized by the AVMD algorithm into VMD, and decompose a series of intrinsic mode functions (IMFs) for the noise signal. Second, the time-frequency matrix composed of K mode components is subjected to SVD processing. Subsequently, the effective IMFs are selected to reconstruct the signal through the relative change rate of singular values to achieve signal denoising. Finally, the combined method of AVMD and SVD proposed in this paper is used to denoise the simulation signal and the pipeline leakage signal, respectively. The main contributions of this paper are summarized as follows: (1) the AVMD algorithm is proposed to optimize the mode component number K and penalty factor α of VMD adaptively, so as to avoid the inaccuracy of setting parameters artificially; (2) the improved refine composite multiscale dispersion entropy (RCMDE) is used as the fitness function of the AVMD method and (3) the combination of AVMD and SVD (AVMD-SVD) is applied to denoise the natural gas pipeline leakage signal.
The rest of this paper is arranged as follows. Section 2 states the basic mechanism of VMD and the novel fitness function based on RCMDE, as well as the SVD. Section 3 introduces the AVMD method and AVMD-SVD joint noise reduction method. In Section 4, the simulated and real leakage signal are used to validate the AVMD method, the robustness and superior of the proposed are demonstrated by comparing with several of optimizing parameters methods. In Section 5, the conclusions are summarized.

Theory of VMD
The VMD algorithm can decompose the signal f (t) into K sub-modes, each mode component has its corresponding centre frequency ω(t). This method can estimate the frequency bandwidth of each mode component. The specific steps are listed as follows: (1) The analytic signal of each mode component is obtained by Hilbert transform, and then its marginal spectrum is solved.
(2) For each mode component, the centre frequency of the mode is estimated according to the exponential hybrid modulation, and the spectrum of the mode is moved to the 'baseband'. (3) The bandwidth of each mode function is estimated by the Gaussian smoothness and gradient square criterion of demodulation signal. The VMD constrained variational expression obtained through the above steps is given as follows: , ω K } is the set of centre frequencies of the decomposed components. δ(t) represents the unit impulse function. ∂ t represents the partial derivative concerning for to t. k = K k=1 represents the sum of all mode components.
The quadratic penalty factor α and Lagrange multiplication operator λ are used to construct the augmented Lagrange function to transform the above-mentioned constrained variational problem into an unconstrained variational problem, which is specifically expressed as follows: The Lagrange function of the Equation (2) is transformed into the frequency domain. The frequency domain expressions of the mode component u k and the centre frequency ω k are described as follows: (4) Using the Alternate Direction Method of Multipliers (ADMM) algorithm to perform a series of iterative optimizations to find the 'saddle point' of Equation (2) is the optimal solution of Equation (1), thereby decomposing the signal f (t) into K IMFs. The implementation steps of the u k are described as follows: Step 1: Initialization {u 1 k }, {ω 1 k },λ 1 , n ← 0; Step 2: n = n + 1, starting loop; Step 3: For k = 1 : K do; Step 4: Double promotion for all ω ≥ 0: Step 5: Repeat step 2-step 4 until the iteration stop condition is met: where ε > 0 is the discrimination accuracy,û k and ω k are obtained at the end of the loop, K IMFs with limited bandwidth are obtained by inverse Fourier transform.

Fitness function based on RCMDE
Entropy, as an index to measure the uncertainty and complexity of time series, is an effective and widely used method. It could measure the non-linear behaviour of the signal and detect the dynamic changes of weak signal. The RCMDE was proposed by Azami et al. (2017).
The RCMDE method has significant advantages in feature extraction, calculation errors, and stability. The RCMDE is defined as the Shannon entropy of the mean value of the discrete mode of the displacement sequence. The k th coarse-grained time series X = {x k,2 , . . .} for the mode component u is described as follows: For each scale factor τ , RCMDE is defined as follows: k with the relative frequency of the dispersion pattern π in the series x (τ ) k . The parameters to be set are: embedding dimension m = 3, category c = 6, delay d = 1, and maximum scale factor τ max = 15. For more information about parameters, see reference Rostaghi and Azami (2016). This refined method of signal processing may reduce information loss effectively and calculation deviation. RCMDE can measure the complexity of the signal. The lower the complexity, the smaller the value of RCMDE. Calculate the RCMDE for each mode component obtained by VMD, that is, 15 entropy values of different scales, and take the variance of the entropy values (VRCMDE). When VRCMDE has a larger value, the mean value of VRCMDE will have a larger value, indicating that the effective components and the noise components can be separated. Equation (12) is the fitness function of the AVMD algorithm. The specific definitions are described as follows:

The principle AVMD
In practical applications, the VMD couldn't decompose adaptively. The number of the decomposition K and penalty factor α are of great importance for decomposing signal by VMD. For under-decomposition: K value is small, and some low-frequency components are regarded as high-frequency components (the α value is small), or the phenomenon of discarding low-frequency components classified as high frequency (the α value is large); for over-decomposition: K value is too large, and several of the modes contain a lot of noise (the α value is small), or mode replication will occur. In this paper, an optimization method is proposed for adaptively optimizing VMD parameters, which searches for the optimal parameter pair [K, α] automatically. The detailed processes are as follows: (1) Initialize the VMD parameters. Given K value, α value, and the iteration step size. The range of K is an integer of [2,12], and the range of α is [200,6000], and the step size is 50.
(4) The fitness function proposed in this paper is used to iterate the cycle. (5) The fitness function values calculated by the AVMD algorithm are averaged again. That is, calculate the mean value of all fitness function values for each mode component, select the number of mode components corresponding to the largest mean value as the optimal K, find the minimum difference between the maximum mean value and the fitness function value, search for the corresponding α value. The formulas for solving the optimal parameters are described as follows: The specific flowchart of the AVMD is shown in Figure 1.

The AVMD-SVD signal denoising method
SVD is an effective method for signal denoising. In this paper, the signal x(t) is decomposed by VMD to obtain K IMF components, assuming that the data point of each IMF component is a kn (k = 1, 2, · · · , K; n = 1, 2, · · · , N), the time-frequency matrix A is expressed as: Then, the time-frequency matrix A is subjected to SVD to obtain K time-frequency subspaces and corresponding singular values. The relative change rate of singular values (Wang et al., 2012) is used to determine the number of effective time-frequency subspaces. The inverse singular value transformation of the effective time-frequency matrix is carried out to achieve signal noise reduction. The specific flowchart of the algorithm is as follows Figure 2:

Simulation test of AVMD-SVD method
In this paper, three different frequency bands of AM and FM signals and a Gaussian white noise signal are combined into a simulation signal to test the accuracy of the AVMD-SVD method. The expression of the simulation signal is following: where the frequencies of f 1 ,f 2 ,f 3 are 2, 20, 200 Hz, respectively. η is Gaussian white noise. The length of the simulated signal is 1024. The experimental results show that the value of RCMDE is smaller, and the complexity of the effective component obtained by VMD decomposition is lower than the noise component. Given that the optimization of the AVMD algorithm is to search randomly, this paper optimizes the parameter pair [K, α] of VMD for five times. Gaussian white noise with input signal to noise ratio (SNR in ) of 5 and 10 dB is added to the original signal, so as to verify the robustness of AVMD, respectively. It is compared with the VMD parameters optimized by the standard particle swarm optimization (SPSO) algorithm and genetic algorithm (GA) to illustrate the performance of AVMD. The optimization methods all use fitness as the fitness function, and the search range of optimized VMD parameters remains consistent. The optimized parameter pairs of VMD are shown  in Tables 1 and 2. The average value of the optimized parameters in the table below is used as the best parameter pair. From Tables 1 and 2, when Gaussian white noise with different SNR in is added, the optimal K obtained by AVMD is 4, the variance is small, and there is almost no fluctuation. Since the simulation signal consists of three cosine harmonic signals and a noise component, it can be determined that the VMD parameters optimized by the AVMD method have not been under-decomposition or over-decomposition. The parameter pairs optimized by the SPSO-VMD method with different SNR in are [5,2400] and [3,4957], respectively. It can be seen from the variance of the K value that the optimization results fluctuate greatly, and the optimized α value easily falls into the local optimum. The variance of K value optimized by the GA-VMD method is relatively large. Due to the optimized K value differs greatly from the number of mode components of the input signal, over-decomposition may occur. Therefore, the comparison shows that the control parameters of the VMD optimized by the AVMD method proposed in this paper are relatively stable.
For this purpose, a simulation signal with SNR in of 10 dB is taken as an example. The result of the AVMD method to decompose the simulation signal is shown in Figure 3. It can be found that the AVMD method can separate the effective mode components and the noise components completely. The signal is decomposed into 3 effective mode components and 1 noise component. Moreover, the centre frequencies of the effective mode components are 2, 20, and 200 Hz, respectively, which correspond to the frequency of the original signal. There is no phenomenon of under-decomposition or over-decomposition. The result of SPSO optimized VMD is shown in Figure 4. It can be found that VMD decomposes 2 effective mode components and 1 noise component. The mode components with centre frequencies of 2 and 20 Hz are not separated, and under-decomposition occurs. The result of GA optimized VMD is shown in Figure 5. The signal is decomposed into 7 IMFs, and the frequencies of IMFs are sorted from low to high. However, the mode mixing phenomenon occurs in IMF3 and IMF4. Therefore, compared to the SPSO-VMD and GA-VMD methods, the AVMD method could separate the mode components of the signal better.
The simulation signal is decomposed into several mode components by the AVMD algorithm. Timefrequency matrix is constructed form the decomposed mode components, and then the time-frequency matrix is decomposed by SVD to obtain the corresponding time-frequency subspaces and singular values. In Figure 6(a), the signal filtered by the AVMD-SVD method retains the spectral characteristics of the simulation signal. While in Figure 6(b), the reconstructed signal based on the SPSO-VMD-SVD method is distorted, and the   denoising is invalid. It can be found from Figure 6(c) that the waveform after noise reduction by the GA-VMD-SVD method is also distorted, and the amplitude information of x(t) is not retained.

Performance indicators
In this paper, output signal-to-noise ratio (SNR out ), mean square error (MSE), mean absolute error (MAE), and energy loss coefficient (e) (Tang & Wang, 2016) are used to evaluate the denoising effect. The higher the SNR out , the better the denoising effect. MSE and MAE indicate the closeness of the denoising signal to the pure signal, and lower MSE and MAE indicate that the denoising signal is closer to the pure signal. The AVMD optimization parameter method is carried out with the iterative increase of the number of modes K. At the beginning of the calculation, the K value is usually too small. At this time, the reconstructed signal may be very different from the original signal. The smaller the energy loss coefficient, the more the characteristics of the original signal are maintained, and the better the denoising effect. The specific calculation formulas are defined as follows:

MSE
where x(t) is the pure signal,x(t) is the denoising signal, N is the length of the signal. Twenty sets of experiments are carried out with different optimization methods for the simulation signal. Figure 7 shows the results of performance evaluation indicators of different methods for denoising. Compared with denoising methods of SPSO-VMD-SVD and GA-VMD-SVD, the SNR out of AVMD-SVD is the highest. The MSE, MAE, and energy loss coefficients of the AVMD-SVD method are all lowest than those of the SPSO-VMD-SVD method and GA-VMD-SVD method, and the fluctuation range is very small.

Denoising analysis of pipeline leakage signal
In this paper, the pipeline leakage signal is collected by the natural gas pipeline leak detection simulation experiment platform of Northeast Petroleum University, seeing in Figure 8. The length of the simulated pipeline on the experimental platform is 160m, a pipe diameter of DN50, and a pipe wall thickness of 1 centimetre. In order to simulate a pipeline leakage in the field, the pipeline has a total of 15 leak points, and every two adjacent leak points are separated by 10 metres. The experimental software For the pipeline leakage signal, three methods are used to optimize the parameter pair of the VMD for five times. The specific results of optimizing the parameters of VMD are shown in Table 3. The variance of the parameters optimized by the AVMD method is the smallest, the fluctuation is small, and it has strong robustness. The parameter pair [K, α] optimized by the AVMD method has the smallest variance, small fluctuation, and strong robustness. The SPSO-VMD method optimizes the variance of the α value and its fluctuation range is large. The variances of K value and α value obtained by GA-VMD method optimization are large, and the robustness of this method is poor. The average values of the VMD parameter pairs optimized by the three methods are used as the initial value parameters of VMD, and the collected pipeline leakage signal is decomposed. Figure 9 is the decomposition effect of the pipeline leakage signal. The sampling frequency of the pipeline leakage signal is 3 kHz. The number of sampling points is 8192. The pipeline leakage signal is decomposed into 3 effective mode components and 7 noise components with centre frequencies of 12, 30, and 131 Hz by the AVMD method. While the SPSO-VMD method can only decompose 1 effective IMF and 1 noise component, the GA-VMD method also decomposes 1 effective IMF and 1 noise component. From the above analysis, it can be concluded that compared with SPSO-VMD and GA-VMD optimization methods, the AVMD method can separate the effective components and the noise components of the signal completely. It shows that AVMD proposed in this paper has better feasibility and superiority. Table 4 shows the results of four performance evaluation indexes after denoising the pipeline leakage signal. The performance evaluation index results of the signal filtering method of the AVMD method are expressed in bold. Through comparison, it is found that the SNR out is the highest of AVMD-SVD method, and MSE, MAE, and energy loss coefficient are the lowest of AVMD-SVD method. The AVMD-SVD method has obvious advantages for the denoising of pipeline leakage signal.

Conclusion
In this paper, a signal denoising method based on the AVMD and SVD has been proposed in order to denoise the leakage signal of pipelines. The control parameters [K, α] of VMD have been optimized by AVMD. A new adaptive method for selecting VMD parameters has been established by adopting the fitness function based on RCMDE. Compared with other optimization algorithms, it has been shown that the parameters optimized by the AVMD method could make the VMD decomposition obtain more effective mode components, and avoid under-decomposition or over-decomposition. The AVMD-SVD method has been used to filter noisy signals, and it has been applied to natural gas pipeline leakage signal. The experiment has been demonstrated that this method could effectively filter out noise, and retain the original characteristics for leakage signal of pipeline.

Disclosure statement
No potential conflict of interest was reported by the author(s).