Professional Documents
Culture Documents
Ahmed K. Abbas, Iraqi Drilling Company; Haidar Almubarak, King Saud University; Hayder Abbas, Missan Oil
Company; Jawad Dawood, Basra Oil Company
This paper was prepared for presentation at the Abu Dhabi International Petroleum Exhibition & Conference held in Abu Dhabi, UAE, 11-14 November 2019.
This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents
of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect
any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written
consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may
not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.
Abstract
Stuck pipe has been recognized as one of the serious problems in drilling operations that has a significant
impact on drilling efficiency and well costs. The events related to the stuck pipe can be responsible for
losses of hundreds of millions of dollars each year in the drilling industry. This paper presents a study on the
application of machine learning methodologies to predict the stuck pipe occurrence which can be utilized
to modify drilling variables to minimize the likelihood of sticking. The new models were developed to
predict the stuck pipe incidence for vertical and deviated wells using artificial neural networks (ANNs) and
a support vector machine (SVM). The proposed models were examined using a few examples of real stick
pipe cases from the field. The results of the analysis have revealed that both ANNs and SVM approaches
can be of great use, with the SVM results being more promising.
The present analysis supplies knowledge that can be used during well pre-planning and developmental
phases to make informed decisions that will avoid pipe sticking problems and essentially optimize drilling
performance. The risk of pipe sticking can then be minimized and the costs associated with its occurrence
will be reduced.
Introduction
Drilling operation is one of the most expensive and necessary part of petroleum and gas exploration (Abbas
et al., 2018a). One of the most prominent troubles occurring while drilling operations is stuck pipe incidents.
These incidents generally result in the significant amount of non-productive time in terms of loss of rig days
either due to the stopping of drilling operations or an attempt to free the stuck pipe (Rostami and Khaksar
Manshad, 2014). Pipe sticking problems are estimated to cost the industry about 250 millions of dollars
per year (Bradley et al., 1991).
The stuck pipe is identified as the resistance of drilling mud flow in the annular space and the drill string
cannot be rotated or moved either in the upward or downward direction. In a complete stuck pipe situation,
neither circulation nor drill string movement is possible (Siruvuri et al., 2006). Generally, stuck pipe
mechanisms are divided into two major categories: differential sticking and mechanical sticking (Shivers
and Domangue, 1993; Santos, 2000). Differential sticking occurs when the drill string or tool is stationary
2 SPE-197396-MS
(or sometimes when it is moving very slowly) across the permeable zone. A major cause of differential
stuck pipe is due to differential pressure forces from an overbalanced drilling mud column acting on the drill
string against a filter cake deposited on porous and permeable formations such as sandstone and limestone
(Krishan et al., 2000). The portion of the area of the drill string, casing, or logging tools that is embedded
into the mud cake has a pressure equal to the formation pressure acting on it, while the hydrostatic pressure
of the drilling mud column acts on the other side. When the hydrostatic pressure in the wellbore exceeds
the formation pressure, there will be a net force pushing the drill string towards the borehole wall (Brandon
Data Pre-processing
A total of 1010 datasets were collected from daily drilling reports, daily mud reports, final well reports, and
master logs of drilled wells in Southern Iraq. After analyzing recent stuck pipe incidents thoroughly and
investigating the root causes, the mechanical (pack off/bridging) sticking was the major cause of stuck pipe.
Therefore, the focus of this study is on the mechanical pipe sticking prediction. According to the primary
operational modes (drill string status), the datasets can be divided into three categories: stuck pipe while
As shown in Table 2 and Table 3, numbering classes are applied to convert the lithology type and stuck
index into a numeric form, respectively (Abbas et al., 2019b). The collected data were normalized into a
form that can be used with the ANNs or the SVM. Further details of normalization data preprocess were
comprehensively described in the studies conducted by Abbas et al. (2019b).
Lithology Code
Limestone 0
Shale 1
Sandstone 2
Dolomite 3
Dolomite Limestone 4
Anhydrite 5
Gypsum 6
Chalky Limestone 7
Marly Limestone 8
Argillaceous Limestone 9
Shaly Limestone 10
Condition Code
Understanding the effect of the input parameters is considered the primary concern when developing
machine learning models. In this study, the fscaret package of R environment was applied to justify the worth
of the input parameters in predicting the pipe sticking occurrence (Szlek, and Mendyk, 2018). This method
is a simple package providing fast and automated feature ranking based on the caret package (Kazemi et
al., 2016). It uses a group of models (i.e., 103 various models) to determine the significance of variables.
The importance of features is averaged through all models to select the best relevant predictors for building
a model. In the end, the result is scaled from 0 to 100. A total number of 25 parameters were selected
Table 4—Range of input parameters for stuck pipe while drilling dataset.
Table 5—Range of input parameters for stuck pipe while tripping in dataset.
Table 6—Range of input parameters for stuck pipe while tripping out dataset.
To demonstrate the robustness of the developed models, accuracy, sensitivity, and specificity were used.
These statistical measures of the performance were conducted to evaluate the model's goodness of fit for a
binary classification test. To discriminate between the actual class and the predicted class, some definitions
such as true positive (TP), false positive (FP), true negative (TN), and false negative (FN) were used for
the class predictions generated by a classifier (Jahanbakhshi and Keshavarzi, 2016). There are two possible
consequences of the test outcome: (1) positive (PS occurrence) or negative (non-PS) according to this
scenario:
➢ True positive (TP): Pipe sticking (PS) cases are correctly identified as pipe sticking (PS).
➢ False positive (FP): Non-pipe sticking (NPS) cases are incorrectly identified as pipe sticking (PS).
➢ True negative (TN): Non-pipe sticking (NPS) cases are correctly identified as non-pipe sticking
(NPS).
➢ False negative (FN): Pipe sticking (PS) cases are incorrectly identified as non-pipe sticking (NPS).
Based on the previous four scenarios, the accuracy, sensitivity, and specificity can be obtained by use
of the following equations:
(1)
(2)
(3)
8 SPE-197396-MS
In developing the networks, the TANSIG and LOGSIG transfer functions were examined for one, two,
and three hidden layers for stuck pipe while drilling, stuck pipe during a trip in, and stuck pipe while tripping
out, as shown in Figures 6, 7, and 8, respectively. Also, the optimal number of neurons in hidden layers
was determined by increasing the numbers incrementally. As can be seen in these figures, the accuracy
between the predicted results and the measured values increased as the number of neurons in the hidden
layers gradually increased, except at the individual fluctuant points. However, the accuracy values decreased
when the number of hidden neurons included more than 40 nodes. This indicates that the number of neurons
in hidden layers with more than 40 nodes can negatively affect the final accuracy of ANNs. For the TANSIG
transfer function, the accuracy reached its highest values at 0.83 with 40 nodes and two hidden layers for
stuck pipe while drilling, 0.87 with 35 nodes and two hidden layers for stuck pipe during trip in, and 0.87
with 35 nodes and three hidden layers for stuck pipe while tripping out (Figs. 6a, 7a, and 8a, respectively).
In contrast, the accuracy attained its highest points for the LOGSIG transfer function at 0.81 with 40 nodes
and two hidden layers for stuck pipe while drilling, 0.83 with 45 nodes and two hidden layers for stuck
pipe during trip in, and 0.85 with 40 nodes and three hidden layers for stuck pipe while tripping out (Figs.
6b, 7b, and 8b, respectively).
SPE-197396-MS 9
Figure 7—Different structures of the FFBP for stuck pipe while tripping in dataset:
(a) using the TANSIG transfer function, (b) using the LOGSIG transfer function.
Figure 8—Different structures of the FFBP for stuck pipe while tripping out dataset:
(a) using the TANSIG transfer function, (b) using the LOGSIG transfer function.
(9)
Here αn is Lagrange multiplier for solving the optimization problem. For regression, we just use a function
to approach the result instead of classification, which is defined as follows:
(10)
In short, in the case of nonlinear separated training data, to maximize the margin of hyperplanes, the
kernel trick can be applied and the resulting solution has the form:
(11)
where K (xn,x) is kernel transformation which maps nonlinear data into a higher-dimensional space and it can
supersede a dot product wherever it is required. Now there are several kinds of kernel function frequently
used including the linear kernel, polynomial kernel, exponential basis function (RBF) kernel, and sigmoid
function, etc. The popular ones are polynomial and Gaussian kernel (Table 7) (Adib et al., 2013). Optimal
settings for SVM is done by the user, carefully selecting regularization factor c, the type of kernel function
and its specific parameters.
SPE-197396-MS 11
Type Equation
Polynomial
Gaussian
Figure 10—Different structures of the SVM for stuck pipe while drilling dataset:
(a) using the Gaussian kernel function, (b) using the polynomial kernel function.
Figure 11—Different structures of the SVM for stuck pipe while tripping in dataset:
(a) using the Gaussian kernel function, (b) using the polynomial kernel function.
12 SPE-197396-MS
To show the robustness for all the developed ANNs and SVM models, the comparison of the performance
criteria including the accuracy, sensitivity, and specificity were calculated for all the presented datasets. As
seen in Table 8, the predicted performance for the SVM with the Gaussian kernel function yielded the best
efficiency.
Stuck Pipe While Drilling FFBP with TANSIG transfer function* 0.83 0.85 0.81
FFBP with LOGSIG transfer function 0.81 0.84 0.78
SVM with Gaussian kernel function** 0.96 0.97 0.95
SVM with polynomial kernel function 0.94 0.96 0.92
Stuck Pipe During Trip In FFBP with TANSIG transfer function* 0.87 0.89 0.85
FFBP with LOGSIG transfer function 0.83 0.85 0.81
SVM with Gaussian kernel function** 0.94 0.95 0.93
SVM with polynomial kernel function 0.91 0.94 0.88
Stuck Pipe During Trip Out FFBP with TANSIG transfer function* 0.87 0.89 0.85
FFBP with LOGSIG transfer function 0.85 0.88 0.82
SVM with Gaussian kernel function** 0.93 0.94 0.92
SVM with polynomial kernel function 0.86 0.90 0.82
Conclusions
An accurate and early prediction of stuck pipe has been of great importance in order to avoid the risks
associated with this problem's occurrence. Substantial technical and economic benefits can be accomplished
if the correct and identification of the most likely cause of stuck pipe is considered. This will lead to
optimization and cost reduction because the prevention of stuck pipe is far more economical than even the
best of free procedures. The results of this study lead to the following conclusions:
• The primary operational modes (drill string status) affects pipe sticking occurrence. Therefore,
the training datasets should be divided into three categories: stuck pipe while drilling, stuck pipe
during tripping in, and stuck pipe while tripping out.
• An appropriate selection of the learning datasets yields realistic results.
• Wellbore inclination, rate of penetration, lithology type, and BHA length have a more significant
effect on stuck pipe occurrence.
SPE-197396-MS 13
• The results showed that SVM are more accurate in stuck pipe prediction than ANNs. Besides, it
can be found that SVM are more convenient than ANNs since they need fewer parameters to be
optimized.
• With the available real-time data feed of various operational parameters, predicting potential stuck
condition can be very effective during drilling to reduce the well cost.
• In addition, the present analysis allows the drilling engineer to assess the risk of stuck pipe
occurrence during the well planning procedure.
References
Aadnøy, B. S., Larsen, K., and Berg, P. C., 2003. Analysis of stuck pipe in deviated boreholes. J. Pet. Sci. Eng. 37 (3–4),
pp.195–212. http://dx.doi.org/10.1016/s0920-4105(02)00353-4.
Abbas, A. K., Alameedy, U., Alsaba, M., and Rushdi, S., 2018a. Wellbore Trajectory Optimization Using Rate of
Penetration and Wellbore Stability Analysis. Presented at the SPE International Heavy Oil Conference and Exhibition,
Kuwait City, Kuwait, December 10-12, Paper No. SPE-193755-MS. http://dx.doi.org/10.2118/193755-ms.
Abbas, A. K., Alameedy, U., Alsaba, M., and Rushdi, S., 2018b. Wellbore Trajectory Optimization Using Rate of
Penetration and Wellbore Stability Analysis. Presented at the SPE International Heavy Oil Conference and Exhibition,
Kuwait City, Kuwait, December 10-12, Paper No. SPE-193755-MS. http://dx.doi.org/10.2118/193755-ms.
Abbas, A. K., Bashikh, A. A., Abbas, H., and Mohammed, H. Q. 2019a. Intelligent Decisions to Stop or Mitigate Lost
Circulation Based on Machine Learning. Energy 183: 1104 – 1113. https://doi.org/10.1016/j.energy.2019.07.020.
Abbas, A. K., Al-Haideri, N. A., and Bashikh, A. A. 2019b. Implementing Artificial Neural Networks and Support Vector
Machines to Predict Lost Circulation. Egyptian Journal of Petroleum. https://doi.org/10.1016/j.ejpe.2019.06.006.
Abbas, A. K., Rushdi, S., Alsaba, M., and Al Dushaishi, M. F. 2019c. Drilling Rate of Penetration Prediction of
High-Angled Wells Using Artificial Neural Networks. ASME J. Energy Resour. Technol. 141(11), 112904. https://
doi.org/10.1115/1.4043699.
Adib, H., Sharifi, F., Mehranbod, N., Kazerooni, N. M. and Koolivand, M. 2013. Support Vector Machine Based
Modeling of an Industrial Natural Gas Sweetening Plant. J. Nal. Gas Sci. Eng. 14: 121–131. http://dx.doi.org./10.1016/
j.jngse.2013.06.004.
Akande, K. O., Owolabi, T. O. and Olatunji, S. O. 2015. Investigating the Effect of Correlation-Based Feature Selection
on the Performance of Support Vector Machines in Reservoir Characterization. J. Nal. Gas Sci. Eng. 22: 515–522.
http://dx.doi.org./10.1016/j.jngse.2015.01.007.
Alkamil, E. H., Abbas, A. K., Flori, R., Silva, L. E., Wunsch, D. C., and Chumkratoke, C., 2018. Learning from experience:
real-time h2s monitoring system using fuzzy art unsupervised learning. Presented at the IADC/SPE Asia Pacific
Drilling Technology Conference and Exhibition, Bangkok, Thailand, August 27-29, Paper No. SPE-191097-MS.
http://dx.doi.org/10.2118/191097-ms.
Almubarak, H. A., Stanley, R. J., Long, R., Antani, S., Thoma, G., Zuna, R., and Frazier, S. R., 2017. Convolutional Neural
Network Based Localized Classification of Uterine Cervical Cancer Digital Histology Images. Procedia Computer
Science, 114, 281–287. https://doi.org/10.1016/j.procs.2017.09.044.
Amer, M. M., Dahab, A. S., and El-Sayed, A. H., 2017. An ROP Predictive Model in Nile Delta Area Using Artificial
Neural Networks. Presented at the SPE Kingdom of Saudi Arabia Annual Technical Symposium and Exhibition,
Dammam, Saudi Arabia, 24-27 April, Paper No. SPE-18796-MS. http://dx.doi.org/10.2118/187969-ms.
Anemangely, M., Ramezanzadeh, A., Amiri, H., and Hoseinpour, S., 2019. Machine learning technique for the prediction
of shear wave velocity using petrophysical logs. J. Pet. Sci. Eng. 174, pp.306–327. http://dx.doi.org./10.1016/
j.petrol.2018.11.032.
Bahrami, P., Kazemi, P., Mahdavi, S., and Ghobadi, H., 2016. A novel approach for modeling and optimization of
surfactant/polymer flooding based on Genetic Programming evolutionary algorithm. Fuel, 179, 289–298. http://
dx.doi.org./10.1016/j.fuel.2016.03.095.
Bradley, W., Jarman, D., Plott, R., Wood, R., Schofield, T., Auflick, R., and Cocking, D., 1991. A task force approach to
reducing stuck pipe costs. Presented at the SPE/IADC Drilling Conference, Amsterdam, Netherlands, March 11–14,
Paper No. SPE-21999-MS. http://dx.doi.org./10.2118/21999-ms.
14 SPE-197396-MS
Brandon, N., Panesar, S., Bonanos, N., Fogarty, P., and Mahmood, M., 1993. The effect of cathodic currents
on friction and stuck pipe release in aqueous drilling muds. J. Pet. Sci. Eng. 10 (2), pp.75–82. http://
dx.doi.org./10.1016/0920-4105(93)90032-a.
Cawley, G. C. and Talbot, N. L., 2003. Efficient Leave-One-Out Cross-Validation of Kernel Fisher Discriminant
Classifiers. Pattern Recognit. 36 (11): pp.2585–2592. http://dx.doi.org./10.1016/s0031-3203(03)00136-5.
Eskandarian, S., Bahrami, P., and Kazemi, P., 2017. A comprehensive data mining approach to estimate the rate of
penetration: Application of neural network, rule based models and feature ranking. J. Pet. Sci. Eng. 156, pp.605–615.
https://doi.org/10.1016/j.petrol.2017.06.039.