Vibration-based Processing and Classification Method for Oil Well-testing Data from Downhole Pressure Gauges

. During petroleum exploration and exploitation, the oil well-testing data collected by pressure gauges are used for monitoring the well condition and recording the reservoir performance. However, due to the large number of the collected data, the classification of this large volume of data requires a previous processing for the removal of noise and outliers. It is impractical to partition and process these data manually. Vibration-based features reflect geological properties and offer a promising option to fulfil such requirements. Based on the 75 on-site measured samples, the time-frequency-domain features are extracted and the classification performance of three classical classifiers are investigated. Then the downhole data processing and classification method is present by analysing the cross interaction of different types of data features and different classification mechanism. Several feature combinations are tested to establish a processing flow that can efficiently remove the noise and preserve the shape of curves, high signal to noise ratio rates, with minimum absolute errors. The results show that optimal multi-feature combination can achieve the highest working stage identification rate of 72%, the parameters optimized support vector machine can achieve the better classification performance than other listed classifiers. This paper provides a theoretical study for the data denoising and processing to enhance the working stage classification accuracy.


INTRODUCTION
Long-term downhole pressure monitoring is playing an important role in improving reservoir management and workflow optimization. However, with the deepening of oil well exploration and development, the downhole formation structure is becoming more complex, the types of the difficult operating wells is enriching, including the deep and ultra-deep wells, the high temperature and high pressure wells, and the high-angle horizontal well. Such exploration faces the problems with noise, attenuation and nonlinear distortion [1].
Also, to identify the underground production status under different well types and working conditions, the ground analysts identify the working stages from the huge underground measurement data artificially, which brings a big inconvenience and man-made interference to data interpretation. Meanwhile, the data are gathered under unattended situation and usually contain some outliers and noises. Add up the large amount of downhole pressure data, the traditional manual classification of flow process is more time-consuming and laborious. Therefore, the smart well technology is becoming an important methodology to study the downhole well-testing data processing and the data interpretation [2]. Many published papers described the methods of processing and interpreting pressure data.
Elsherif [3] extracted the distribution characteristics of pressure mutation and identified the damaged zones based on the pressure transient analysis when evaluating reservoir matrix chemical treatment in real time. The method used linear transformation to extract single feature of signal, but cannot fully reflect the nonlinear structure of downhole parameter data. Andreas [4] used wavelet analysis to detect the four stages of deterministic sedimentary pattern. However, few attempts have been made to develop a comprehensive model for working stage decisions. The latest researches [5] introduced the multi-feature extraction and the deep learning methods, although obtained a good classification effect, its complex structure is more suitable for offline data processing. Generally, the current difficulties can be summarized as the following three aspects: 1. The stochastic of data due to the variousness and the complexity of the downhole geological conditions.
2. The incompleteness of the well testing record and the unsatisfactory quality of the available datasets.
3. The features used for classification has few types and the superiority of each is not considered.
Our objective is to analyse the classification effects of the different feature extraction methods and the different classifiers, and propose an integrated vibrationbased processing flow to classify the well-testing segments, determining the working stage they belong to.

Data Source
The datasets are collected from the well testing platform of Huabei Oilfield, China, which is the same with the datasets we used in our previous study [6]. There are 15 field samples containing 75 stage samples in total, all of which have good quantity. The reservoirs in this filed have the feature of special lithology, structural fractures, and strong edge water. As shown in Fig. 1, a complete well test process includes five stages. The pressure data processed are divided into data segments according to their working stages. The processing objects are the segments that belong to the above five stages.  These peaks and interference are mixed into the pressure data that we used for further working stage classification, which will lead to the inaccurate identification of signal feature points and the poor characteristics representing ability of extracted features. If applying unfiltered data to working stage classification directly, it could lead to false-decision of the system due to the measured data corrupted with noise and outliers.
As for data filtering, the peaks seriously deviate from the average trajectory of data points. The time-domain method can predict the motion trend of the data and quickly find the outliners. The mechanical vibration interference belongs to the local characteristic and it shows the aggregation with different density. The timefrequency-domain method can observe the data from both the time-domain and the frequency-domain aspects and abstractly characterize and denoise the data [6].

Proposed Method
The main task of this paper mainly includes three aspects: 1. Apply the coefficient denoising approach with wavelet transform to filter the data noise.
2. Extract multiple vibration features of well-testing data from the viewpoint of the time domain.
4. Perform feature classification of well-testing working stage by using different classifiers.
3. Analyse the classification effect of the combination features formed by different types of features.

Wavelet Based Denoising
Currently, there is no unified standard for wavelet base selection as its applications are different. Based on our previous research, the Symlets wavelet has good local characteristics in the frequency domain [7]. Therefore, the wavelet denoising in this paper performs the sym6 based 6-scale decomposition, which includes two steps: 1. Decompose a signal in low-frequency and highfrequency coefficients by using the discrete wavelet transform (DWT) based multiresolution analysis.
2. Modify the coefficients according to the thresholding method and remove the noise and outliers.
3. Reconstruct the original data and obtain S d by using the C r after threshold quantization.
Where, the thresholding method is the Hierarchical based Wavelet method. S d is the denoised data after reconstructing the original pressure data. C r is the wavelet coefficients that used for data reconstruction.

Vibration Features Extraction
Considering the influence of mechanical vibration on underground geological data, we introduce the common time domain characteristic indexes as the input features. Also, one type of feature is not enough to characterize the information of data fully. As shown in Table 1, here we use the following five indicators as the time domain characteristics for each working stage data. Then the vibration feature f V can be expressed as: Where rms X , abs(X), max X , r X and beta are mean square value, mean absolute value, maximum, root mean square value, and kurtosis. Here, we take another timedomain based feature pressure derivatives d P into consideration and use all these features for classification and performance judgement. P is pressure and t is time.

Working Stage Classification
This paper uses the majority vote algorithm in the LIBSVM developed by Lin Chih-Jen [8] for the final working stage classification. This algorithm has strong compatibility and needs only two adjustable parameters: penalty parameter c and kernel function parameter g.
Then the identified stage Stage can be expressed as:  At last, the stage with the largest c m num will be the stage that the sample belongs to. What's more, in order to obtain the best parameters c and g, we introduce particle swarm algorithm (PSO) to avoid the occurrence of overlearning and underfitting states.

Results and Discussion
A signal processing method is hard to extract the features with strong data characteristics for uncertain change of fluctuating and trend. To improve the final classification performance, firstly, the original downhole pressure data are processed by wavelet based denoising method. As shown in Table 2, the robust of four global threshold methods and two high-frequency threshold methods are analysed. Hierarchical based threshold method [9] obtains the lowest signal to noise ratio (SNR). The resolution scale used for the data decomposition determines the final data denoising results. The 6 decomposition scale (6-DS) is more suitable for the welltesting data processing than that of less than 6, which can obtain better denoising effect. All the simulations are conducted using Matlab 2017a. Figure 2 shows that, through output comparison, the HWD can better remove the data noise and enhance the data quality. The recognition rate of edge enhanced data has a remarkable improvement compared with those of the original data and other processed data. Compared with the global threshold and 3 decomposition scale (3-SD) threshold algorithms, the HWD can better achieve the purpose of pressure data denoising caused by mechanical vibration. It strengthens the pressure change trends apparently and keeps the time domain characteristics of original data highly at the same time. By using the HWD and wavelet reconstruction, the curve burrs and unpredicted peaks in pressure data successions can be easily detected, filtered and eliminated, which is more conducive to the recognition of data features and further classification processing.  Table 3, the classification effect of different methods varied with integrating different types of features. The combination of SVM and feature with f V and d P can achieve the highest classification efficiency, it is 72%, though it is not high, the method is proved efficient and feasible in deleting meaningless noise information and improving greatly feature mining and classification ability. This paper also introduces the wavelet features and systematically analysis the classification efficiency under different combinations of the total seven timedomain and time-frequency-domain features. Define the wavelet feature as f W . Table 3 and Figure 3 demonstrate through simulations with downhole pressure data that the performances of the proposed method surpass that of previously classical method both visually and in terms of the classification accuracy and the absolute error.
Absolute errors/ psi Meanwhile, this paper uses PSO to solve the difficulty of determining the optimal parameters. Table 3 gives the comparisons with NNs and KNN, by simulation of the datasets in our previous research [6], the result shows that PSO based SVM classifier can do better in global optimal solution, which is mainly manifested in its powerful classification ability. The proposed integrated data processing and classification flow for downhole pressure, which based on the wavelet decomposition, the HWD thresholding based coefficients modification, the vibration analysis based domain feature extraction, and the P-SVM classifier, can satisfy the requirement of actual production and provide theoretical foundation for exact downhole working stage identification.
The proposed method also exists some limitations and shortcomings. Although the influences of vibration are analysed, only seven classical indicators in total are used for classification, and more types of influencing factors should be considered. What's more, 75 field stage samples are analysed in this paper and the sample size is small. Future work should collect more downhole well-testing samples including more complete and complex working conditions to make the proposed method more convincing.

Conclusion
This paper aims at reflecting the real characteristic of oil well reservoirs, making the test data be more close to the true value, and completing the well testing stage classification. The hierarchical based wavelet denoising and the vibration analysis based time-frequency-domain characteristics are used successfully for this purpose. The experimental results show that the proposed flow improves the signal-to-noise ratio, achieves the high average classification of 72%, which demonstrates that the data processing, feature extraction method, and the working stage classification approach are correct and effective. It can reduce the effort of oil data analysts and provide reliable reference for future academic research.