Measurement 39 (2006) 621–627 www.elsevier.com/locate/measurement
A modified wavelet transform domain adaptive FIR filtering algorithm for removing the SPN in the MFL data Wenhua Han *, Peiwen Que Department of Information Measurement Technology and Instruments, Institute of Automatic Detection, Shanghai Jiaotong University, No. 800, Dongchuan Road, Shanghai 200240, China Received 12 January 2005; received in revised form 20 January 2006; accepted 25 January 2006 Available online 9 March 2006
Abstract With the widespread application and fast development of gas and oil pipeline network, the pipeline inspection technology has been used more extensively. The magnetic flux leakage (MFL) method has established itself as the most widely used in-line inspection technique for the evaluation of gas and oil pipelines. The MFL data obtained from seamless pipeline inspection is usually contaminated by the seamless pipe noise (SPN). SPN can in some cases completely mask MFL signals from certain type of defects, and therefore considerably reduces the detectability of the defect signals. This paper presents a modified wavelet transform domain adaptive FIR filtering algorithm for removing the SPN in the MFL data. The advantage of the proposed algorithm is that it converges faster than the time domain adaptive SPN filtering algorithm. Results from application of the modified algorithm to the MFL data from field tests show that the modified algorithm has good performance and considerably improves the detectability of the defect signals in the MFL data. 2006 Elsevier Ltd. All rights reserved. Keywords: Pipeline inspection; Magnetic flux leakage data; Discrete wavelet transform; Wavelet transform domain adaptive FIR filtering; Seamless pipe noise
1. Introduction With the widespread application and fast development of gas and oil pipeline networks, the pipeline inspection technology has been used more extensively. Over the years a number of nondestructive evaluation techniques have been developed for detection of damage in gas or oil pipelines. *
Corresponding author. Tel.: +86 021 34201347; fax: +86 021 34201372. E-mail addresses:
[email protected],
[email protected] (W. Han).
The magnetic flux leakage (MFL) method has established itself as the most widely used in-line inspection technique for the evaluation of gas and oil pipelines. An MFL inspection device called an ‘intelligent pig’ is used for in-service assessing the conditions of gas or oil pipelines. A strong permanent magnet in the pig nearly saturates the pipe wall with magnetic flux flowing in the axial direction. When the pig encounters an anomaly as it traverses the pipe, a higher fraction of magnetic flux will leak from the pipe wall into the air inside and outside the pipe. This ‘leakage flux’ signal is detected by a flux sensitive device such as a Hall-effect sensor or an
0263-2241/$ - see front matter 2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.measurement.2006.01.007
622
W. Han, P. Que / Measurement 39 (2006) 621–627
induction coil. An array of Hall sensors is usually installed around the circumference of the pig between the two poles of the magnetizer to measure the leakage flux. The MFL signal due to any irregularities is appropriately sampled and stored within an on-board data acquisition system. Subsequently the MFL data is analyzed offline for evaluating the conditions of gas or oil pipelines. Unfortunately, the MFL data is usually contaminated by various sources of noise, including sensor lift-off variation induced noise, vibration induced noise, seamless pipe noise (SPN), and system noise [1]. Among these sources of noise, the seamless pipe noise can in some cases completely mask MFL signals from certain type of defects, such as low signalto-noise ratio (SNR) signals from shallow corrosion and mechanical damage, and considerably reduce the detectability of the pipeline defects. Afzal and Udpa [2,3] have proposed a method which applies the time domain adaptive filtering method to remove the seamless pipe noise. However, the speed of the convergence of this algorithm is dependent on the eigenvalue spread or the ratio of maximum to minimum eigenvalues of the input correlation matrix of the adaptive filter and slow convergence rate can be expected when this ratio is large [4]. This paper presents a new de-noising approach for removing the SPN in the MFL data by using a modified version of the wavelet transform domain adaptive FIR filtering algorithm introduced in [5] which cannot be directly applied to remove SPN in the MFL data. According to the results given in Refs. [5,6], the convergence rate of the modified algorithm is faster than that of the time domain adaptive SPN filtering algorithm. It should be noted that the data normalization [2] preprocessing the raw MFL data to compensate for imperfections in the data collection mechanism is required before the modified algorithm can be applied. Results from application of the modified algorithm to the MFL data from field tests are presented to demonstrate the effectiveness of the algorithm.
x
HPF
2
2
LPF
J =1
The paper is organized as follows. In Section 2, the discrete wavelet transform (DWT) is briefly reviewed. Section 3 describes the theoretical analysis of the modified wavelet transform domain adaptive FIR filtering algorithm for removing the SPN contained in the MFL data. Section 4 presents experimental results and Section 5 concludes the paper. 2. Discrete wavelet transform (DWT) The DWT is a batch method, which analyzes a finite-length time-domain signal at different frequency bands with different resolutions by successive decomposition into coarse approximation and detail information. The DWT employs two sets of functions, the scaling functions and the wavelet functions, which are associated with low-pass and high-pass filter, respectively. The general form of an L-level DWT of a time-domain signal, x(t), is written in terms of L detail sequences, dJ(k) for J = 1, . . . , L and the Lth level approximation sequence aL(k) as follows xðtÞ ¼
L X X J ¼1
2
LPF
2
d2
J =2
aL ðkÞuL;k ðtÞ
ð1Þ
k
where uL,k(t) is the Lth scaling function and wJ,k(t), J = 1, . . . , L are wavelet function sequences for L different levels. The DWT (and inverse DWT) of a discrete signal of length N = 2n can be efficiently implemented by iteratively applying low-pass and high-pass filters, and subsequently down-sampling (up-sampling for inverse DWT) them by two, with computation complexity of order O(N) [7]. Fig. 1 illustrates the implementation of the DWT of the time domain signal x(t), including wavelet decomposition and wavelet reconstruction. Let x = [x(t1),x(t2), . . . , x(tN)]T denote N · 1 column vectors containing the N successive samples of x(t), where the superscript T represents the transpose. The resolution of the signal x is changed by low/ high pass filtering operations and the scale is chan-
2 2
HPF
2
LPF
a2
Fig. 1. The DWT implementation (L = 2).
HPF
x 2
a1
X
k
d1 HPF
d J ðkÞwJ ;k ðtÞ þ
LPF
W. Han, P. Que / Measurement 39 (2006) 621–627
ged by down-sampling/up-sampling operations. The set {d1,d2, . . . , dL, aL} = wL will comprise the wavelet transform of x up to level L. The parameters of DWT are the type of the wavelet filter used and the number of decomposition levels (J = 1, . . . , L). 3. Theoretical analysis 3.1. Overview of the time domain adaptive FIR filtering method for SPN cancellation The SPN is time-varying and thereby requires an adaptive filter to mitigate its affect [2]. An adaptive filter is capable of adjusting its impulse response appropriately using an algorithm that minimizes the error between the filter output and a reference input. A finite impulse response (FIR) filter is utilized to implement the adaptive system. The FIR coefficients are estimated using the least mean squared (LMS) algorithm. Fig. 2 shows the schematic of the time domain adaptive filtering method [2] for removing the SPN. In addition, the structure of the FIR filter with system function Hk(z) is given in this paper. The idea underlying the approach is to exploit the correlation properties of the MFL signal generated by the seamless pipe and the signals due to defects and other artifacts in the pipeline. The reference input, u(k), and the primary input, d(k), to the adaptive system are signals obtained from two MFL sensors in close proximity. Both inputs are assumed to be statistically stationary. For the sake of simplicity, the system noise is not considered initially. Assume that u(k) consists of the SPN signal alone, while d(k) contains the desired defect signal in addition to the SPN signal, that is
623
dðkÞ ¼ sðkÞ þ gðkÞ; uðkÞ ¼ g0 ðkÞ;
ð2Þ ð3Þ
where s(k) denotes the defect signal, g(k) and g 0 (k) represent SPN signals from the two sensors. The underlying assumption is that the SPN noise contained in the primary and the reference inputs, g(k) and g 0 (k), are highly correlated with each other, and uncorrelated with the defect signal component, s(k). To determine the adaptive filter coefficients using the LMS algorithm, the total system output power is minimized, which in this case is the power in the error signal, e(k), or the mean-square-error (MSE) given by MSE ¼ E½e2 ðkÞ ¼ E½ðdðkÞ yðkÞÞ2 ¼ E½ðsðkÞ þ gðkÞ yðkÞÞ2 2
¼ E½s2 ðkÞ þ E½ðgðkÞ yðkÞÞ þ E½sðkÞ ðgðkÞ yðkÞÞ.
ð4Þ
Since s(k) is uncorrelated with g(k) and y(k) = h(k) * g 0 (k), where h(k) is the impulse response of the FIR filter, the following Eq. (5) is obtained, 2
E½e2 ðkÞ ¼ E½s2 ðkÞ þ E½ðgðkÞ yðkÞÞ .
ð5Þ
The signal power E[s2(k)] is unchanged when the filter coefficients are adjusted in the error minimization algorithm. Consequently, only the term E[(g(k) y(k))2] is minimized in the MSE minimization. That is, minimize E[e2(k)] minimize E[(g(k) y(k))2]. When the algorithm converges to the minimum mean square error (MMSE) solution, y(k) provides the best estimate, ^gðkÞ, of the SPN contained in primary input d(k) in the least square sense, i.e. yðkÞ ^gðkÞ. Since e(k) = s(k) + g (k) y(k), this implies eðkÞ ¼ ^sðkÞ.
Fig. 2. Schematic of the time domain adaptive SPN cancellation system.
624
W. Han, P. Que / Measurement 39 (2006) 621–627
The above argument shows that the minimization of MSE entails cancellation of correlated components between d(k) and u(k), which in this case is the SPN. Consequently, the error signal at the output of the noise rejection system provides an estimate of the desired defect signal component in the primary input signal. The MMSE solution can be obtained by the following LMS algorithm. The LMS algorithm utilizes the method of steepest decent to update the filter coefficients. The filter coefficients update equation is given by bðk þ 1Þ ¼ bðkÞ þ 2leðkÞuðkÞ;
ð6Þ
where data vector: u(k) = [u(k), u(k 1), . . . , u (k K)]T; coefficient vector: b(k) = [b0(k), b1(k), . . . , bK(k)]T, K + 1 is the number of adaptive filter coefficients, l is a parameter that controls the convergence rate of the algorithm, and e(k) = d(k) y(k), y(k) = uT(k)b(k). The choice of the convergence parameter l plays an important role in determining the performance of the adaptive system. The stable range of l varies according to the input signal power [8]. If a value of l normalized by the signal power l
l ðK þ 1Þr2 ðkÞ
ð7Þ
is employed, where r2(k) is input signal power, the stable range of l is restricted to 0 < l < 1. In the MFL data obtained from pipeline inspection, the signal power may change along the axis of the pipe due to variation in wall thickness or other artifacts in the pipe. For robust approximation of l, r2(k) is replaced by a time varying estimate ^2 ðkÞ ¼ au2 ðkÞ þ ð1 aÞ^ r r2 ðk 1Þ;
ð8Þ
where a is called the forgetting factor with values in the range 0 < a 1, and is selected to reduce the influence of past samples. Thus, the NLMS algorithm is implemented using the relations, bðk þ 1Þ ¼ bðkÞ þ
2leðkÞuðkÞ ðK þ 1Þ^ r2 ðkÞ
^2 ðkÞ ¼ au2 ðkÞ þ ð1 aÞ^ r2 ðk 1Þ r
ð9Þ ð10Þ
The analysis until this point does not take the system noise into account. Taking the system noise into consideration, the inputs to the adaptive noise rejection system can be described as dðkÞ ¼ sðkÞ þ gðkÞ þ DðkÞ;
ð11Þ
uðkÞ ¼ g0 ðkÞ þ D0 ðkÞ.
ð12Þ
The system noise contributions D(k) and D 0 (k) are assumed to be uncorrelated with each other, and to other signal components s(k), g(k) and g 0 (k) as well. Both the desired and reference inputs are considered to be stationary processes. In this case, the adaptive system cancels out the correlated SPN, g 0 (k), and the system noise D(k) passes through to the output e(k). Therefore, the output of the adaptive SPN cancellation system is eðkÞ ¼ ^sðkÞ þ DðkÞ. 3.2. The modified wavelet transform domain adaptive FIR filtering algorithm for removing SPN A new de-noising approach for removing the SPN in the MFL data is presented by using a modified version of the wavelet transform domain adaptive FIR filtering algorithm introduced in [5]. The algorithm in [5] is modified in a similar way as the time domain adaptive filtering algorithm for SPN cancellation described above, and thus its modified version can be applied to remove the SPN in the MFL data. Fig. 3 shows the schematic of the modified wavelet transform domain adaptive SPN cancellation system. Unlike the time domain adaptive filtering method, where the K + 1 consecutive samples from the reference input u(k) are used as the input of the FIR filter, the proposed method applies the DWT to the K + 1 consecutive samples from the reference input u(k) before being used as the input of the FIR filter. In what follows, the forward and inverse DWT operators are denoted by W(Æ) and W1(Æ), respectively. In the wavelet transform domain adaptive FIR filtering method, the input data vector u(k) is transformed into the vector v(k) that can be expressed as vðkÞ ¼ W ðuðkÞÞ.
ð13Þ
The transformed coefficients are then weighted using the wavelet transform domain adaptive filter coefficient vector w(k) = [w0(k), w1(k), . . . , wK(k)]T. Then, the output signal z(k) is given as zðkÞ ¼ vT ðkÞwðkÞ.
ð14Þ
The corresponding error signal e(k) is given as eðkÞ ¼ dðkÞ zðkÞ;
ð15Þ
where d(k) is the primary input signal. The weight update equation is given by wðk þ 1Þ ¼ wðkÞ þ 2lw eðkÞvðkÞ;
ð16Þ
where lw is a parameter that controls the convergence rate of the wavelet transform domain LMS
W. Han, P. Que / Measurement 39 (2006) 621–627
625
Fig. 3. Schematic of the wavelet transform domain adaptive SPN cancellation system.
algorithm. Similar to the time domain NLMS algorithm, if a value of lw normalized by the signal power lw lw ð17Þ ðK þ 1Þr2 ðkÞ is employed, where r2(k) is input signal power, the stable range of lw is restricted to 0 < lw < 1. Here, the fact that the power of a signal remains invariant in the process of wavelet transform is utilized. In the MFL data obtained from pipeline inspection, the signal power may change along the axis of the pipe due to variation in wall thickness or other artifacts in the pipe. For robust approximation of lw, r2(k) is replaced by a time varying estimate ^2 ðkÞ ¼ au2 ðkÞ þ ð1 aÞ^ r2 ðk 1Þ; r
ð18Þ
where a is called the forgetting factor with values in the range 0 < a 1, and is selected to reduce the influence of past samples. Thus, the wavelet transform domain NLMS algorithm is implemented using the relations, wðk þ 1Þ ¼ wðkÞ þ
2lw eðkÞvðkÞ ; ðK þ 1Þ^ r2 ðkÞ
^2 ðkÞ ¼ au2 ðkÞ þ ð1 aÞ^ r2 ðk 1Þ. r
ð19Þ ð20Þ
According to the results given in [5,6], the convergence rate of the above modified wavelet transform domain adaptive FIR filtering algorithm for removing the SPN contained in the MFL data is faster than that of the time domain adaptive SPN filtering algorithm. Just as the time domain adaptive filtering algorithm for removing the SPN, the wavelet transform
domain adaptive system cancels out the correlated SPN, and the output of the wavelet transform domain adaptive SPN cancellation system still contains the system noise. This noise is treated as additive white Gaussian noise (AWGN), and therefore can be removed by utilizing the wavelet shrinkage de-noising method. Assume that the output of the wavelet transform domain adaptive SPN cancellation system can be expressed in vector form as e = [e(1), e(2), . . . , e(M)], where M denotes the total number of the output samples. Denoting by W(Æ) and W1(Æ) the forward and inverse DWT operators, respectively, and by T(Æ,h) the thresholding/ shrinking operator with the threshold h, the processing steps of removing the system noise contained in the output e of the wavelet transform domain adaptive SPN cancellation system will be c ¼ W ðeÞ;
ð21Þ
^c ¼ T ðc; hÞ;
ð22Þ
^e ¼ W 1 ð^cÞ;
ð23Þ
where ^e is the de-noised version of e. As a result, the system noise in the MFL data e is removed. 4. Experimental results Results from application of the modified wavelet domain adaptive FIR filtering algorithm to the MFL data from field tests are presented to verify the efficacy of the proposed algorithm. In the experiments, the MFL data is provided by Material Assessment Research Group in the Department of Electrical and Computer Engineering of Michigan
626
W. Han, P. Que / Measurement 39 (2006) 621–627
Fig. 4. Experiment results of the modified algorithm for the MFL data with defect signals. (a) Primary input signal; (b) reference input signal; (c) output signal after wavelet transform domain adaptive FIR filtering; (d) final output signal after wavelet shrinkage de-noising.
State University. The MFL data is collected by Tuboscope Vetco pipeline services in Houston, Texas. The pipe wall thickness and diameter is 0.625 and 50 cm, respectively. The parameters employed in the new algorithm are set as follows. In the wavelet transform domain adaptive FIR filtering algorithm, the number of coefficients of the adaptive filter K + 1 = 128, the convergence size l = 0.075, the forgetting factor a = 0.001, the daubechies 1 wavelet function,1 and the decomposition level L = 3 are used. In the wavelet shrinkage de-noising for removing the system noise, the daubechies five wavelet function, the decomposition level L = 4, and the soft thresholding rule with SureShrink threshold [9] are utilized. Fig. 4 shows the results obtained from the application of the modified algorithm to the MFL data containing the defect signals. The primary input signal and the reference input signal of the modified wavelet transform domain adaptive SPN cancellation system are shown in Fig. 4(a) and (b). The correlated SPN is cancelled in the output of the wavelet
transform domain adaptive SPN cancellation system, as is shown in Fig. 4(c). To facilitate showing the performance of the modified wavelet transform domain adaptive FIR filtering algorithm in terms of visual quality, the wavelet shrinkage de-noising is then used to remove the residual system noise contained in the output of the wavelet transform domain adaptive SPN cancellation system, and the final output signal is shown in Fig. 4(d). In practice, a pipe under inspection will only occasionally have defects and therefore the input of the wavelet transform domain adaptive SPN cancellation system will contain noise only. In this case, the output of the wavelet transform domain adaptive SPN cancellation system will contain system noise only, which is then removed by using the wavelet shrinkage de-noising. The corresponding results for this case are shown in Fig. 5. From Figs. 4 and 5, it can be seen that the modified algorithm has good performance and considerably improves the detectability of the defect signals in the MFL data. 5. Conclusions
1
An older convention is used for the order of the wavelet function.
This paper has presented a modified version of the wavelet transform domain adaptive FIR filter-
W. Han, P. Que / Measurement 39 (2006) 621–627
627
Fig. 5. Experiment results of the modified algorithm for the MFL data without defect signals. (a) Primary input signal; (b) reference input signal; (c) output signal after wavelet transform domain adaptive FIR filtering; (d) final output signal after wavelet shrinkage de-noising.
ing algorithm for removing the SPN in the MFL data. The proposed algorithm converges faster than the time domain adaptive SPN filtering algorithm. Results from application of the modified algorithm to the MFL data from field tests has shown that the modified algorithm has good performance and considerably improves the detectability of the defect signals in the MFL data.
[4]
[5]
[6]
References [7] [1] J. Lim, Data Fusion for NDE Signal Characterization, Iowa State University, Michigan, 2001. [2] M. Afzal, S. Udpa, Advanced signal processing of magnetic flux leakage data obtained from seamless gas pipeline, NDT and E International 35 (7) (2002) 449–457. [3] M. Afzal, R. Polikar, L. Udpa, S. Udpa, Adaptive noise cancellation schemes for magnetic flux leakage signals obtained from gas pipeline inspection, IEEE International
[8] [9]
Conference on Acoustics, Speech and Signal Processing — Proceedings, Salt Lake, UT, vol. 6, 2001, pp. 3389–3392. B. Widrow, J.M. McCool, M.G. Larimore, C.R. Johnson, Stationary and nonstationary learning characteristics of the LMS adaptive filter, Proceedings of the IEEE 64 (8) (1976) 1151–1162. S. Hosur, A.H. Tewfik, Wavelet transform domain adaptive FIR filtering, IEEE Transactions on signal processing 45 (3) (1997) 617–630. S. Hosur, A.H. Tewfik, Wavelet transform domain LMS algorithm, IEEE International Conference on Acoustics, Speech, and Signal Processing, Minneapolis, MN, vol. 3, 1993, pp. 508–510. S.G. Mallat, A theory of multiresolution signal decomposition: the wavelet representation, IEEE Transactions on Pattern Analysis and Machine Intelligence 11 (7) (1989) 674–693. B. Widrow, S.D. Stearns, Adaptive Signal Processing, Prentice-Hall, Englewood Cliffs, NJ, 1985. A. Bakhtazad, A. Palazoglu, J.A. Romagnoli, Process data de-noising using wavelet transform, Intelligent Data Analysis 3 (4) (1999) 267–285.