Signal Feature Extraction and Quantitative Evaluation of Metal Magnetic Memory Testing for Oil Well Casing Based on Data Preprocessing Technique

. Metal magnetic memory (MMM) technique is an effective method to achieve the detection of stress concentration (SC) zone for oil well casing. It can provide an early diagnosis of microdamages for preventive protection. MMM is a natural space domain signal which is weak and vulnerable to noise interference. So, it is difficult to achieve effective feature extraction of MMM signal especially under the hostile subsurface environment of high temperature, high pressure, high humidity, and multiple interfering sources. In this paper, a method of median filter preprocessing based on data preprocessing technique is proposed to eliminate the outliers point of MMM. And, based on wavelet transform (WT), the adaptive wavelet denoising method and data smoothing arithmetic are applied in testing the system of MMM. By using data preprocessing technique, the data are reserved and the noises of the signal are reduced. Therefore, the correct localization of SC zone can be achieved. In the meantime, characteristic parameters in new diagnostic approach are put forward to ensure the reliable determination of casing danger level through least squares support vector machine (LS-SVM) and nonlinear quantitative mapping relationship. The effectiveness and feasibility of this method are verified through experiments.


Introduction
Caused by the factors of erosion, geology, and engineering, well casing damage leads to huge economic losses in oil field every year because of the long-term nonuniform load on downhole casing which results in severe local stress concentration and bending, deformation, and breaking [1][2][3].Therefore, it is one of the difficulties in nondestructive testing to predict the abnormal stress concentration of oil well casing in order to prevent casing damage.Stress is regarded as one of the major factors affecting ferromagnetic behavior, along with magnetic field and temperature.Effect of stress or strain on magnetization is called the Villari effect, inverse magnetostrictive effect, or piezomagnetism.In general, it is simply referred to as magnetomechanical effect.Since an applied stress can alter the domain structure and have a substantial effect on the low-field magnetic properties, such as remanence and permeability, recently these effects are mostly found in practical applications of magnetic nondestructive testing, actuators, and magnetic sensors.As a result, the effects have been paid considerable attention in the literature [1][2][3][4].Nevertheless, the coupling effect between mechanical and magnetic properties is so complicated to stunt the development of these properties in nondestructive testing application.
Traditional nondestructive testing such as radiographic testing, ultrasonic testing, penetrant testing, magnetic particle testing, and eddy current testing is effective in detecting existing cracks, which means that the detection of crack in the bud can not be achieved in time before crack develops severely.However, MMM technique is a new method of nondestructive testing which can accomplish early diagnosis and detection of defects.With the testing characteristic of stress concentration, it is capable of detecting the most 2 Abstract and Applied Analysis dangerous damage in advance.It has been widely applied in the field of electric power, railway, and petrochemical industry and has been proved effective.Despite of all these, MMM is found to be a natural space domain signal and have the same order of magnitude as the earth magnetic field, which means it is of random nonsmooth signal as well as low signal-to-noise ratio and is vulnerable to noise interference [4].Meanwhile, quantitative evaluation is affected because it is difficult to correctly extract the features of MMM signal under the hostile subsurface environment, such as high temperature, high pressure, and great noise.Another difficulty for feature extraction is that underground casing is wrapped in thermal-protective coating of a large damping, which results in producing weaker signal or even no signal from the stress concentration zone where cracks appear.
Data preprocessing and data driven is the first step in diagnosis for casting by using MMM.The reliability, usability, and integrality of measurement data can affect the accuracy, efficiency, and effectiveness of model reconstruction directly.The concept of data preprocessing and data driven is often used in computer science.But because of the exceeding progress of computer techniques, massive process data can be obtained by the intelligentized industry, so data preprocessing and data driven have been taking up a lot of attentions in engineering science.Rapid improvement of database capacity make people use data more effectively and fulfill more functions.Data means information, so the so-called data preprocessing and data driven are drawing information from data and use information to realize different objects.To draw information from data, statistical techniques are the chief method, and applications based on multivariate statistical techniques become the main part of data preprocessing and data-driven area.At present, there have been many papers about the application in different fields of industry based on data-driven algorithm and techniques [5][6][7][8].Based on the basic data-driven methods for process monitoring and fault diagnosis, a comparison study in [9] is provided.Authors in [9] illustrated the efficiencies of data-driven methods discussed in their paper through the application of an industrial benchmark of Tennessee Eastman (TE) process.
The most important mathematical tools in statistical techniques, filtering algorithm, and wavelet analysis are commonly used in data preprocessing and data-driven field.In the process of data acquisition, redundancy, and measurement, noise will be introduced inevitably.These error points can bring great impacts on the model reconstruction and analysis of data feature.In order to extract the feature of data better, data filtering must be applied to make the errors removed.Authors in [10] proposed an intelligent data filtering method based on artificial neural networks to detect bearing defects of induction motors.In [11], a robust  ∞ filtering problem is investigated for a class of complex network systems which has stochastic packet dropouts and time delays, combined with disturbance inputs.Authors in [12] deal with the design problem of minimum entropy  ∞ filter in terms of linear matrix inequality (LMI) approach for linear continuous-time systems with a state-space model subject to parameter uncertainty that belongs to a given convex bounded polyhedral domain.In [13], a filtering algorithm for maneuvering target tracking is presented based on smoothing spline fitting.
The wavelet analysis theory is gradually developing to become one of important technologies in the dynamic measurement signal process field by its advantage of multiresolution and multidimensional analysis on time frequency.Authors in [14] propose control strategy for the energy management which is based on the combination of wavelet transform and neural network arithmetic.In the control strategy proposed, wavelet is in charge of decomposing and then reconfiguring the power difference between generated power and consumed power by loads.In [15], authors address an application of wavelet networks in identification and control design for a class of structures equipped with a type of semiactive actuators.The wavelet analysis theories and methods are developing and are far from maturation.Wavelet analysis and its application have great potentialities in many applied fields of natural science, and its application in MMM test and estimating stress concentration zone is increasing.
In this paper, according to the foregoing reference, a method of multisource information processing and multifeature quantitative evaluation is described to solve the problems of MMM signal processing of underground casing.First of all, median filter preprocessing is adopted to eliminate the outliers point of MMM.Secondly, based on wavelet transform (WT), the estimation is made by adaptive threshold of wavelet transform coefficients with various scaled space signals through optimal soft threshold denoising, which restrains the noise signal to extract gradient and zero-crossing point features to achieve correct localization of SC zone.Thirdly, new diagnostic approach of combined characteristic parameters is put forward to ensure the reliable determination of casing danger level through LS-SVM and nonlinear quantitative mapping relationship.The effectiveness and feasibility of this method are verified through experiments.

Mechanism of Metal Magnetic Memory Testing
The studies of modern material science and ferromagnetic have proved that if iron artifacts are influenced by its working load under geomagnetic environment, their interior structure will show magnetostrictive magnetic domain orientation and irreversible reorientation.Theoretically, relationship between the magnetic field leakage of (  ) and the changes of mechanical stress (Δ) of ferromagnetic artifacts under test is as follows [2,3]: where   is an irreversible component in magnetoelastic effect, and it is a function that depends on mechanical stress as well as the intensity and temperature of the external magnetic field;  0 = 4 × 10 −7 is the permeability of vacuum.Metal magnetic memory theory has proved that the maximum variation of scattered magnetic leakage field   occurs in stress concentration and deformation zone; that is, the tangential component of magnetic leakage   () shows the maximum value while normal component of the magnetic leakage   () is shown to be zero (Figure 1).This irreversibility of magnetic state will remain after the elimination of working load, which makes it possible to accomplish the accurate diagnosis of component defects and (or) stress concentration zone through the determination of normal component   () in the magnetic leakage of scattered magnetic leakage field.In [16,17], the absolute value of maximum gradient value in magnetic variation is taken as a diagnostic parameter to estimate stress concentration level (a patent belongs to Energodiagnostika Co. Ltd., of Russia), that is,  = |d  ()/d|, is taken as a measurement indicator.
The features of zero-crossing point and gradient value are two key characteristic parameters in MMM testing technique.Experts from Energodiagnostika Co., Ltd., have proposed supplementary rules at the MMM application conference in Anshan in 2004, which is mainly about the comprehensive localization of stress concentration zone through maximum gradient area and zero-crossing point area [1][2][3][4].Though it is easy to locate stress concentration zone according to the smooth MMM curves like the ones in Figure 1, the actual curves collected are obviously much more complicated than what is in Figure 1, because noise variation is often included when differential derivative technique is employed, which makes it hard to extract the accurate gradient value of signal saltation.In addition, subsurface environment is extremely hostile and has the characteristics of high temperature, high pressure, high humidity, and great noise; underground casing is wrapped in thermal-protective coating of a large damping, which results in worse signal-to-noise ratio of weak MMM signal or even totally overwhelmed by noise.Therefore, it is difficult to extract gradient characteristic value of MMM as well as achieve quantitative evaluation of danger level, which proves the necessity of MMM signal processing.

Signal Analysis of MMM Testing for Oil Well Casing
While variable characteristics of MMM signal in tensile tests have been introduced in most of the present research papers [18,19], few extrusion tests have been involved.The main function of oil well casing is pressure-bearing.In this text, a ground test was carried out in the simulation well of Daqing oilfield.During the test, short oil well casings with the length of 1 m were truncated, respectively, from a 11-meter long oil well casing (specimen is about 14 mm; wall thickness is 7.6 mm) and were labeled as specimen 1 and specimen 2. The two specimens were placed, respectively, in the middle of hydraulic platform of a NYL-300 compression testing machine, and stress tests were carried out in the middle part of the specimens in order to eliminate the effect of end face.
Stress application was done every other 20 kN and lasted for 10 minutes each time.After each stress application, the specimen was removed and was vertically placed at a fixed position.The experimental facility is shown in Figure 2. Before stress tests, there was no stress concentration zone in oil well casing; see the MMM curve in Figure 3.There is no obvious peak-peak singular feature of local gradient and signal.When the working strength is equal to or larger than 40 kNs pressure, the curve showed significant change, that is, obvious peak-peak value in Figure 4 and maximum gradient area after Fourier analysis of the curve.See Figure 5.This proves that MMM signal energy is mainly concentrated in low-frequency area.From Figure 6, it can be seen that in several areas, the gradient values are above 8 or close to 8. According to the criterion of Russian patent, this means there is dangerous stress concentration zone (oil well casing is close to hazardous situation when gradient values are above 8).However, after the experiment, conclusion has been drawn that maximum stress concentration level only appears intensively in the intermediate region, which means there should be low stress concentration level in other areas and the utilization will not be affected.Therefore, it is difficult to determine danger level depending only on differential derivative [20].It is necessary to conduct MMM signal processing, especially under more complicated underground environment.

MMM Signal Processing and Feature Extraction for Oil Well Casing
There is a great influence of underground interference and noise on MMM data, and the main source of noise is found to be the high-frequency noise of measurement noise and the interfering signal from probe vibration.Since MMM signal is random signal, strictly speaking, it lacks stability.Though Fourier analysis can achieve a general analysis on the spectrum features of MMM signal, it does not possess local analysis feature of time domain and frequency domain [20].Therefore, wavelet analysis is adopted in this section to process MMM signal.

Data Smoothing.
Since MMM signal is weak spatial domain signal with low frequency [21,22], it is necessary to firstly accomplish the smoothing of data collected in order to remove possible interference signal and meaningless isolated outliers point.To ensure high fidelity of signal amplitude as well as real time of the testing system without producing new quantization parameters, median smooth filter is adopted.Consider where () is the output, () is the input signal sequence in spatial domain, and Median is median function.

Wavelet Analysis. Since wavelet transformation (MT) has
a good multiresolution time-frequency analysis feature which is capable of reducing noise as well as retaining the edge, it has become the key method of the extraction of MMM signal singularity [23][24][25][26].For MMM signal () which contains noise, the model in wavelet domain is where () represents Gaussian white noise and   indicates noise intensity.[()] shows the mathematical expectation of random variable; thus, Define   (()) as the wavelet transform value of ().To some degree, it is also a random variable of .Under wavelet decomposition scale , there is Its mathematical expectation is This indicates that the average density of white noise modulus maximum is inverse proportion to the scale; that is, the greater the scale is, the sparser the modulus maximum will be.
While WT of noise on different scales is highly irrelevant, WT of MMM singular signal often has a strong correlation; that is, local modulus maximums on adjacent scales almost share the same position and the same sign, which is the theoretical foundation of MMM signal processing.

Wavelet-Based Adaptive Threshold
Denoising.The principle of wavelet-based denoising is to accomplish a wavelet analysis on measurement signal mixed with noise and to separate them according to the different characteristics between signal and noise under WT.The wavelet coefficients which belong to noise are set to zero; wavelet reconstruction is carried out on the left to get useful signal.Wavelet coefficients obtained from hard threshold method are discrete [22], which often result in oscillation effect for signal reconstruction.Soft threshold function can achieve smooth denoising of wavelet coefficients in low scales.However, in high scales, it will cause a decline of signal-to-noise ratio.Therefore, it is necessary to contract wavelet coefficients in low scales as well as protect wavelet coefficients in high scales in order to restrain the oscillation.
The combination of soft and hard threshold methods is adopted, that means that, under the premise of maximum denoising [23], errors are reduced to the greatest extent with the purpose of achieving optimal denoising.Consider When  = 0, it is hard threshold method; when  = it can be seen that actually noise threshold will decline along with the increase of scales.So, it is not inadvisable to choose the fixed threshold value.If the threshold value is too large, useful signal is prone to be filtered out, which will have an impact on signal-to-noise ratio.So, adaptive threshold value is chosen by (9), which changes according to the scales and standard deviation.Noise standard deviation is estimated as follows: Since WT is linear transformation, both signal and noise wavelet coefficients accord Gaussian distribution, and signal standard deviation of each wavelet scale is estimated in terms of approximate maximum probability: Therefore, new wavelet coefficients are obtained, and signal reconstruction is achieved through inverse transforms.
Signal denoising procedures are as follows: (1) wavelet coefficients are obtained through six-layer decomposition according to Db10 wavelet mother function; (2) based on ( 9), the first four-layer threshold values are determined, and optimal threshold value ( 7) is employed to process wavelet coefficients to get new wavelet coefficients; (3) signal is reconstructed through inverse transforms.
Data from Figure 4 is applied to adaptive threshold denoising; see Figures 7 and 8.It is obvious that gradient value maximum of oil well casing in the middle area is 8, and the stress concentration level is the highest, which is in accordance with experimental results and should be well focused on.Gradient values in other areas are less than 4; the stress concentration zone is relatively small.Therefore, gradient values after signal denoising are more accessible to qualitative and quantitative evaluation on service life of oil well casing for influence of noise is eliminated.
After the denoising reconstruction of MMM signal collected, feature extraction should be accomplished.Patented technology raised by Energodiagnostika Co., Ltd., of Russia is to determine stress concentration zone through gradient value maximum and zero-crossing point.Gradient value is considered as characteristic parameter, which has been pointed out in existing researches that one single parameter often causes misjudgment in real.In this section, peak-peak value and gradient value are chosen to be characteristic parameters as a whole with the purpose of ensuring accurate determination of stress concentration zone.
Signal peak-peak value PP0 is as follows: peak-peak value is taken as characteristic parameter, which eliminates the impact of signal baseline and enhances the reliability of detection, because it is an important distribution feature of signal detection.When peak-peak value is calculated, maximum and minimum values of signal are firstly sought, and then absolute value (range) of the difference between these two adjacent extremums is obtained, which is easy to achieve through computer.Consider where max[()] and min[()] represent a pair of adjacent extremums.During the experiment, peak-peak value is the key index. = [, PP0]  refers to the feature vector;  is gradient value.When both of the two characteristic component values are larger than the corresponding threshold value, there is the real dangerous area of stress concentration zone.If gradient value is larger than threshold value while peakpeak value is relatively small, there is not necessarily a stress concentration zone but possibly an uncertain area created by noise.Accurate determination needs to be done with the help of other nondestructive testing methods.Qualitative analysis is only a way to determine stress concentration zone of oil well casing; it is unable to satisfy the need of the quantitative evaluation on danger level, which will be in the next section.

Quantitative Evaluation on Danger Level of Oil Well Casing
Mechanism model which reflects MMM effect is the quantitative basis of nondestructive testing.Present mechanism studies are mainly based on theories such as common effect of stress and external magnetic field, stress magnetization of energy maximum principle, and stress permeability effect.Combined with test data, MMM mechanism model is established from various angles; however, complete and rigorous theoretical system has not been formed yet.So, the scope of applications is limited.In the meantime, local elastic and plastic deformation of ferromagnetic material has been noticed during the experiment, and nonlinear variation of normal magnetic flux leakage happened on the surface of local variation area.Therefore, feature parameter and stress concentration of MMM signal are of unknown mathematical relation, which requires a solution of quantitative evaluation problem through nonlinear modeling technology.Gradient value and peak-peak value as combined vector are taken to describe signal features and there are two input ends.Output ends of quantitative model are also two.According to the safe requirement of real engineering oil well casing, "00" represents the fact that elastic deformation is relatively small, which has no influence on using; "01" shows a relatively large elastic deformation, which requires regular inspection; "10" means that critical plastic changing area, protective measures should be carried out; "11" indicates that severe deformation of oil well casing has happened and they must be replaced.Since {, PP0 → } obtained from experiment is small sample, quantitative classification of danger level through small sample study method is adopted in this section, and nonlinear mapping relationship is established through LS-SVM.LS-SVM is a machine learning algorithm based on statistical learning theory.Learning according to the principle of structural risk minimization, it translates optimization problem into a problem of convex quadratic programming, which ensure that the extreme solution is the globally optimal solution [27].
A training sample set is taken into consideration which includes  data point {  ,   },  = 1, 2, . . ., ,   ∈   which represents the input sample and   ∈  shows the output sample.Regression model is as follows: In the above formula, nonlinear mapping () map input data to high-dimension feature space, which makes the nonlinear regression problem in the original space to translate into linear regression problem in feature space.And  ∈ where  = 1, 2, . . ., ,  represents the constant which is called penalty factor and it is used to balance model complexity and fitting precision, and   refers to the error term.Constrained optimization problem is translated into unconstrained optimization problem, and Lagrange multiplier   is introduced, the corresponding Lagrange function is where Y = [ In the above formula,   ,  are the solution to formula (16).Table 1 is the results of danger level classification for oil well casing, in which the first ten groups are training samples and the last two are testing samples.Therefore, quantitative evaluation of danger level for oil well casing is achieved through support vector machine.and research results are the same as ground ones; no repeat will be done here.The casing after MMM testing is shown in Figure 11.As the casing cube is nondestructive, the MMM testing technique is suitable for practical application.

Conclusion
The experiment indicates that MMM is capable of achieving an effective prediction on underground stress concentration  zone for oil well casing.Due to the complicated underground environment and various interferences, digital processing technology is introduced to MMM analysis software in order to enhance signal-to-noise ratio as well as eliminate highfrequency noise.In addition, smooth data from filter processing achieve accurate feature extraction of MMM signal.At the same time, new combined feature vector is put forward, which is used to closely approach the nonlinear relationship of magnetic flux leakage signal and danger level through SVM.Therefore, the stress concentration level for oil well casing could be predicted in a timely and reliable manner.And it should also be noted that MMM is influenced by temperature greatly.With the oil well casing drilling into the ground, geothermal temperature will inevitably have an impact on the MMM signals.In the future work, efforts will be made to design the robust hardware to reduce the temperature drift.It is also a challenge to use advanced datadriven technology to deal with the complex MMM signals and remove the disturbance effect of geothermal temperature.

Figure 6 :
Figure 6: Gradient value variation of MMM signal.

Figure 9 :
Figure 9: Probe device of underground MMM testing.

Notation 1 .
Accurate classification requires a large quantity of training samples.Samples given here are related to the model number of MMM device (has an influence on the sensitivity of characteristic parameter) and material and model number of oil well casing.Experimental facility of underground test in Daqing Oilfield (located in Heilongjiang Province in China) is shown in Figures 9 and 10 ,

Table 1 :
Quantitative evaluation on danger level for oil well casing.