# Research on Leakage Location of Pipeline Based on Module Maximum Denoising
## 2 Materials and Method  
### A Novel Denoising Method Based on Improved Module Maximum  
#### 2.1.1 Discrete Wavelet Transforms and Module Maximum  
Discrete wavelet transform can be realized using the Mallat algorithm. It carries out repeated low-pass and high-pass filtering for discrete signals through wavelet filter, and a low-frequency signal and a high-frequency signal can be obtained each time. Then low-pass and high-pass filtering are performed on the low-frequency signal again, and the low-frequency signals on the larger decomposition layer can be obtained. Therefore, the result of the discrete wavelet transform of a discrete signal should include the high frequency component at each level and the low frequency component at the maximum level. The advantage of this processing is that any detail of the signal can be noticed.  
In this paper, the discrete wavelet transform is applied to the noisy signal, and the module maximum value corresponding to the wavelet transform coefficients on each scale is obtained. The specific process is as follows:  
Let the parent wave function be \(\Psi(t)\), the scaling and translation factors are \(a\) and \(b\), and the wavelet basis function is:  
\[\Psi_{a,b}(t)=\frac{1}{\sqrt{a}}\Psi\left(\frac{t-b}{a}\right) \tag{1}\]  
where, \(a\) and \(b\) are real numbers.  
There is a function \(f(t)\in L^{2}(R)\), whose wavelet transform can be defined as \(W_{a,b}(f)\):  
\[W_{a,b}(f)=<f(t),\Psi_{a,b}(t)>f(t)=\frac{1}{\sqrt{a}}\int_{-\infty}^{\infty} f(t)\Psi_{a,b}(t)dt \tag{2}\]  
Then the wavelet transform \(W_{a,b}(f)\) is the decomposition of the function \(f(t)\in L^{2}(R)\) on the corresponding function family \(\Psi_{a,b}(t)\), and the premise of decomposition is that the parent wave function \(\Psi(t)\) satisfies the following allowable conditions:  
\[C_{\Psi}=\lim_{k\rightarrow\infty}\int_{0}^{k}\frac{|\Psi(\hat{w})|}{w}dw \tag{3}\]In the formula, \(\Psi(\vartheta)\) is the Fourier transform of \(\Psi(t)\).  
In order to improve computational efficiency, wavelet transform can adopt convolution form:  
\[W_{s}f(t)=f(t)*\Psi_{s}(t)=\frac{1}{s}\int_{-\infty}^{\infty}f(x)\Psi\left(\frac {t-x}{s}\right)dx \tag{4}\]  
where \(\Psi_{s}(t)=\frac{1}{s}\Psi\left(\frac{t}{s}\right)\). \(s\) is the scale parameter. In practical application, the scale parameter of the wavelet transform does not need to be evaluated continuously. The usual processing method is the binary separation of the scale parameters. That is \(s=2^{j}\), \(j\) is an integer, and the wavelet transformation of the noisy signal at the scale \(2^{j}\) is:  
\[W_{2^{j}}f(t)=f(t)*\Psi_{2^{j}}(t)=\frac{1}{2^{j}}\int_{-\infty}^{\infty}f(x) \Psi\left(\frac{t-x}{2^{j}}\right)dx \tag{5}\]  
The results of Formula (5) can be used to describe the local information of the \(j\)-th octave of the noisy signal.  
Based on the binary discrete wavelet transform, the process of solving module maximum in this paper is as follows:  
For any point \(x\) in a neighborhood of \(x_{0}\), there is a condition \(\left|W_{f}(s,x)\right|\leq\left|W_{f}(s,x_{0})\right|\) for any point in the neighborhood of \(x_{0}\)[15]. Let \(W_{f}(s,x)\) be the convolution wavelet transform of \(f(x)\). Under the scale \(s_{0}\), point (\(s_{0}\), \(x_{0}\)) is called the local extreme point. If \(\frac{\partial W_{f}(s_{0},x_{0})}{\partial x}\) is 0 at \(x_{0}\), then (\(s_{0}\), \(x_{0}\)) is considered to be the module maximum point of the wavelet transform [16].