Professional Documents
Culture Documents
This paper was prepared for presentation at the International Petroleum Technology Conference held virtually on 23 March - 1 April 2021. The official proceedings
were published online on 16 March 2021.
This paper was selected for presentation by an IPTC Programme Committee following review of information contained in an abstract submitted by the author(s).
Contents of the paper, as presented, have not been reviewed by the International Petroleum Technology Conference and are subject to correction by the author(s). The
material, as presented, does not necessarily reflect any position of the International Petroleum Technology Conference, its officers, or members. Papers presented at
IPTC are subject to publication review by Sponsor Society Committees of IPTC. Electronic reproduction, distribution, or storage of any part of this paper for commercial
purposes without the written consent of the International Petroleum Technology Conference 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 where and by whom the paper was presented.
Write Librarian, IPTC, P.O. Box 833836, Richardson, TX 75083-3836, U.S.A., fax +1-972-952-9435.
Abstract
Stuck pipe is one of the leading causes of non-productive time (NPT) while drilling. Machine learning
(ML) techniques can be used to predict and avoid stuck pipe issues. In this paper, a model based on ML
to predict and prevent stuck pipe related to differential sticking (DS) is presented. The stuck pipe indicator
is established by detecting and predicting abnormalities in the drag signatures during tripping and drilling
activities. The solution focuses on detecting differential sticking risk via assessing hookload signatures,
based on previous experience from historical wells. Therefore, selecting the proper training set has proven
to be a crucial stage of model development, especially considering the challenges in data quality. The
model is trained with historical wells with and without differential sticking issues. The solution is based
on the Artificial Neural Network (ANN) approach. The model is designed to provide users, i.e., driller
or monitoring specialist, a warning whenever a risk is identified. Since multi-step forecasting is used, the
warning is given with enough time for the driller or monitoring specialist to evaluate which preventative
action or intervention is necessary. The warnings are provided typically between 30 minutes and 4 hours
ahead. The model validation includes the performance metrics and a confusion matrix. Practical cases with
real-time wells are also provided. The ML model was proven robust and practical with our data sets, for both
historical and live wells. The huge amount of data produced while drilling holds valuable information and
when smartly fed into an Artificial Intelligence (AI) model, it can prevent NPT such as stuck pipe events
as demonstrated in this paper.
Introduction
Stuck pipe is one of the leading causes of non-productive time (NPT) while drilling, leading to huge
economic losses. As reported by Muqeem et al. (2012), within a year, stuck pipe can be responsible for 25%
of the total cost related to NPT in the drilling activity of a company, with 30% of the stuck pipe events being
due to differential sticking. A more recent statistic shows stuck pipe incidents accounting for approximately
15% of NPT (Alshaikh et al., 2019) which still represents a high cost, and companies continue making efforts
2 IPTC-21221-MS
to decrease these numbers. The need for tools that assist to prevent stuck pipe, as operators continue to drill
in high-risk drilling formations and depleted zones (Bakar et al., 2019), has been driven research on using
Artificial Intelligence (AI) to address the issue in recent years (Elmousalami and Elaskary, 2020; Al-baiyat
and Heinze, 2012; Khan et al., 2020). Among the challenges identified in attempting to practically apply
AI models is the need for an extensive amount of data that are not easily available, the poor generalization
of models, and the requirements for high-quality data.
Differential pressure pipe sticking occurs typically in permeable formations when filter cake builds up in
Figure 1—Filter cake can build up in the wellbore wall in the permeable layer if the
pressure in the wellbore (P1) is significantly higher than the formation pressure (P2)
Machine learning is a field of AI and it is based on the idea of giving computers the ability to learn by
experience without being explicitly programmed. In the supervised learning approach, which is the one
adopted here, the humans provide real data, known as a training set, and the algorithm will learn how the
input variables (also known as features) relate which each other to generate the outputs. This is done by
feeding the training set to the network several times in different patterns, each time is called an epoch.
Inputs and outputs relate with each other through a function called hypothesis. The model will determine
the hypothesis best capable of minimizing the cost function or loss (which is related to the gap between the
predicted and the actual values), for a given hypothesis. Supervised learning problems can be classification
or regression problems. The first one is usually adopted when the data points have discrete values (e.g.,
category or true/false) and the second one is more suitable when the data points have continuous values.
There are many different ML techniques with vast applications. The one addressed here is based on
the Artificial Neural Network (ANN). The ability of ANN to learn with the training set is inspired by the
IPTC-21221-MS 3
functioning of the human brain system through spikes between neurons. A neuron model is illustrated in
Figure 2.
The network architecture consists of artificial neurons and multiple layers. The layers between the input
layer and the output layer are called hidden layers and the neurons in each layer are called nodes. Figure 3
illustrates a network containing 1 hidden layer with 3 nodes. In a multilayer network, all nodes in one layer
are connected to those of the next layer. Mathematically, a fully-connected neural network is a Universal
Function Approximator, using a series of matrix multiplications and nonlinear function activations to
approximate some complex mapping function between inputs and outputs. The output depends not only
on the inputs but also on the network's internal parameters such as weights (i.e., internal parameters used
by the model to fit the training set), and hyperparameters such as the learning rate (i.e., factor to limit the
changes in the model and depend on the estimated error each time the model weights are updated), and the
activation function (i.e., function that relates each input to the neuron in the next layer). There are different
types of neural networks such as Convolutional Neural Networks (CNN) and Recurrent Neural Networks
(RNN). Among the applications are image recognition and conditional language modelling, respectively
(Aggarwal, 2018). Advanced variations of the RNN include Long Short-Term Memory (LSTM) classic and
the Gated Recurrent Unit (GRU). Information about those instances can be found in Aggarwal (2018).
4 IPTC-21221-MS
When the input data have different ranges and order of magnitude, it is useful to normalize the data so
they can all be in a small range to improve the speed of convergence. To evaluate the performance of the
solution, one can evaluate the generalization capability through the learning curve (i.e., train and validation
plot, where validation data are not used as training examples). A model with good generalization capability
will show improvement as more epochs take place up to a stabilization point (i.e., increasing epochs will
not result in significant improvement). For regression models, statistical metrics such as the Mean Absolute
Error (MAE) or the Mean Squared Error (MSE) can be used. For a classification problem, metrics such as
accuracy, precision, recall, and confusion matrices can be used. For more information on ANN see Hastie
et al. (2017) and Aggarwal (2018).
The ANN technique is particularly good at handling data with quality issues such as often faced in drilling
operations. Examples of research using ANN for predicting differentially stuck pipe can be found in Siruvuri
et al. (2006), Miri et al. (2007), and Jahanbakhshi et al. (2012). The authors treat the problem as supervised
learning, which means that the model was trained with historical (real-time) data containing differential
sticking cases, near-stuck cases, and normal operations (i.e., without stuck pipe). The ANN applies to a wide
variety of real-life problems. The abilities to learn complex non-linear relationships between data points
and to perform multi-step prediction are used for the differential sticking model developed.
Methodology
Conceptual Solution
The solution uses a multi-layered RNN to predict the hookload signature of future stands while tripping
and drilling. The input parameters are the real-time sensor time index, the bit depth, and the hookload
readings. This is possible by training the model with hookload patterns from past operations. A set of
rules based on engineering knowledge and past experiences will trigger warnings whenever the hookload
signatures indicate a differentially stuck pipe symptom. Warnings are based on the hookload predictions and
are triggered typically from 30 min to 4 hours in advance, so there is enough time for preventive actions.
As discussed in Mason et al. (2013) and Bjerke (2013), a distinct hookload signature exists before a
differential sticking event. A snapshot of tripping in one stand is illustrated in Figure 4. For this activity,
the key hookload points for the models are A) the hookload readings during connection and the connection
IPTC-21221-MS 5
duration, B) the minimum reading right after the slips are removed, when part of the string load is held by the
formation, and C) the hookload during dynamic conditions. The logic is similar for tripping out, except that
for tripping out, the peak related to the static friction right after the slips are removed has an opposite sign.
In a tripping in operation, the hookload is expected to increase with time, as additional stands or casings
are being added to the string (except wells with a long horizontal section) and static friction should not vary
much when monitoring consecutive stands. However, before differential sticking incidents, it was observed
that the static friction shows an increase in trend, seen as a decrease in the minimum hookload illustrated
in Figure 4(B). An example of consecutive tripping in casings is shown in Figure 5 in which the decrease
in the minimum hookload indicates an increase in the force related to overcoming the static friction. For
tripping out operation, the force has an opposite sign, so a differential sticking symptom would be detected
if an increase in the maximum hookload is detected for a few consecutive stands. The standstill time is also
considered as a risk factor for differential sticking. The models presented herein are trained to detect the
described trend in a very early stage before this escalates into a stuck pipe incident.
6 IPTC-21221-MS
The solution provides warnings (low to medium risk) and alarms (medium to high risk) if the conditions
determined for warnings and alarms are met. The conditions account for the magnitude of the predicted
drag and the number of consecutive stands ahead the drag is expected to occur. The solution also considers
the standstill time (i.e., no rotation, no flow, and no bit movement) as a risk factor for differential sticking.
One of the goals of the developed models is to generalize as much as possible. Therefore, the tripping
model is quite broad in terms of the activity it covers. For the differential sticking model, tripping in involves
a wide range of activities in which the string, casing, or liner is moving towards the bottom of the well.
Similarly, tripping out involves many activities in which the string, liner, or casing is moving towards the
surface.
The philosophy of the solution is to avoid a huge number of input parameters, prioritizing the combination
of narrower but targeted models to perform a task. The ML model for predicting the hookload trend while
tripping monitors and predicts the local minimum hookload expected for tripping in (Figure 4(B)) and the
local maximum hookload expected for tripping out operations. The ML model for drilling monitors the pick-
up weight after each connection. Having a specific set of models for one type of stuck pipe (i.e., differential
sticking) and different models for different activities (i.e., tripping and drilling), minimizes the number of
input parameters required. Naturally, the solution needs to read data for a few stands before being able
to provide predictions. The required number of real-time stands data needed for the predictions to start
appearing to the user depends on the activity. For tripping, the model needs to read at least 6 stands to
provide predictions and it predicts 4 stands ahead between the 6th and the 10th stand and 10 stands ahead
from the 10th stand on. For drilling, the model needs to read 3 stands to start prediction and it always predicts
2 stands ahead.
parameters are then tuned, and the model is trained again and evaluated. The process is repeated until the
performance criteria are met. The tuning of the model is done by adjusting model hyperparameters such as
the number of hidden layers and the number of neurons in each layer, the learning rate, etc. This process
is illustrated in Figure 6.
The system pulls a set of real-time inputs from the WITSML server and the data are transmitted
between the WITSML server and the UI through Hypertext Transfer Protocol Secure (HTTPS) and using
basic authentication with Secure Sockets Layer (SSL) encrypted. Data are stored in the memory only for
processing and is in .NET and protected by a firewall. Normalized data are then transferred to the ML
models for processing. The output of this processing is sent back to Server 1 where the data are rescaled
and sent to the WITSML viewer.
8 IPTC-21221-MS
where yi is the prediction, xi the true value, and n is the total number of observations.
Residuals are obtained by comparing the predicted model output with the actual values the model is
trying to predict (in our case, the hookload). Examining residuals is a key part of all statistical modelling.
A normal probability plot of the residuals is a way of checking if we can assume that the error terms are
normally distributed. An ideal distribution should be centered on zero and as narrow as possible. The results
of the analysis of the test set are shown below.
For the drilling model, in a total of 208 samples, the MAE was 0.275 tonnes. The residuals distribution
for this model can be seen in Figure 8.
For the tripping model, in a total of 892 samples, the MAE was 1.07 tonnes. The residuals distribution
for this model can be seen in Figure 9.
IPTC-21221-MS 9
The analyses were performed on the test set. As observed in the plot, the distribution is centered on zero
for both models, indicating that the predictions do not have systematic offsets.
The model is essentially a regression model. The warnings and alarms are provided based on the trends of
the hookload predictions and represent low to medium risk of differential sticking and medium to high risk of
differential sticking, respectively. So, a pure true or false assessment is too simplistic as there are borderline
cases due to the physics addressed by the model, as well as the effect of changes in the operation. However,
by adopting the criterion that both warnings and alarms are considered as “positive” events, it is possible
to evaluate the model using a confusion matrix. The evaluation with this criterion was done considering 3
historical wells not present in the training set, and the performance can be seen in Table 1 below.
TRUE FALSE
The confusion matrix was built after running the model on 3 wells which are not part of the training set,
therefore it is the data that the models have not seen before. Both stuck pipe and near stuck are considered as
a positive event. The confusion matrix shows a relatively low false positive rate. Another important aspect
is the false negative being zero, denoting that the model did not miss any potential stuck pipe.
The results presented in Table 1, result in the following metrics:
Precision: 0.85
Sensitivity (Recall): 1.00
f1-score: 0.92
Precision and Recall are defined by Equation 2 and Equation 3, respectively. Recall expresses the ability
to find all relevant instances in a dataset and it is the most important metric in this case because the potential
cost of a false negative is very high for stuck pipe. Precision is related to the proportion of the data points
10 IPTC-21221-MS
our model labelled as relevant were indeed relevant. In practical terms, the drilling team should not waste
time doing preventive actions based on false positives.
(2)
(3)
Accuracy has a specific meaning in the context of a confusion matrix for classification models. In the
The connection period is also an input to the solution because standstill time is a risk factor for differential
sticking. If the connection takes more than 10 minutes, an alarm is provided to the user to alert that the
system has been static, increasing the risk of differential sticking, as shown in Figure 11.
Figure 11—Alarm due to prolonged static conditions during connection, increasing the risk of differential sticking
The behaviour of the hookload during a real-time operation is quite complex and unveiling these trends
can extrapolate the human cognitive processing capability. One example of this can be seen in Figure 12
which shows the hookload signature while back reaming out of hole with a BHA in an 8 ½” section before
a differential sticking incident. Although it might not be obvious, especially for a person monitoring the
sensor data in real-time, the peak related to the drag when going from static to dynamic conditions, show
an increase in trend when considering multiple stands. The differential sticking model provided the first
warning approximately 5 hours before the event. Among the stands in which the increase in the maximum
hookload is clearly seen, there can be a stabilization or even a small decrease, which might give a false
sense that the risk no longer exists – as can be seen in stands 2 to 7 in Figure 12. For this reason, it is
important to keep following the situation closely for a few stands after a warning or alarm is given, seeking
for additional signs of differential sticking. In this case, an increase in torque was observed a couple of
stands before the incident. It can also be observed that there is a high breakover hookload on the stand
marked with 1 in Figure 12.
12 IPTC-21221-MS
Although the model was designed to detect differential sticking symptoms, it was also capable of
identifying a mechanical sticking event, while tripping in a 7” liner, as shown in Figure 13. The differential
sticking model provided the first warning more than 3 hours before the event. The essence of the model is
to detect an increase in drag trend, which can be seen in Figure 13 when considering the general trend of
several consecutive stands prior to the event.
Figure 13—Liner stuck while tripping in. The first warning was provided more than 3 hours in advance.
IPTC-21221-MS 13
False warnings and alarms are possible occurrences. Therefore, when the solution provides a warning
or an alarm, it must be validated. The user should check other parameters to evaluate if the abnormalities
predicted are in fact indicating potential stuck pipe signs before performing any preventive actions or
intervention. Some situations might produce patterns similar to what is observed when there is an increase
in drag in the system. An example is provided in Figure 14, in which the hookload was trending down while
tripping in because the pipes were not being filled in for a few stands. The trending down was caused by
the buoyancy effect and this warning was considered as a false positive.
Once the drilling team filled up the pipe, the warnings stopped and the status curve turned green, as
shown in Figure 15. This also shows that the model is sensitive to operational condition changes.
Figure 15—Status curve became green after the operational conditions changed. The black curve
on the top lane represents the block position. The blue curve on the bottom lane represents the
hookload. The red curve is the hookload predictions and the green curve is the historical predictions.
transformed their workflow from reactive to proactive and created value via cost avoidance (Arriffin et al.,
2020).
The model helps to increase situational awareness during drilling and provides the drilling team useful
additional information (i.e., beyond the sensor data) to make crucial decisions with a higher degree of
confidence whether a preventive action should be taken or if the risk is acceptable and the operation can
proceed. The huge amount of data produced while drilling holds valuable information and when effectively
used by an Artificial Intelligence (AI) model, can prevent NPT such as stuck pipe events. To take advantage
Acknowledgements
The authors would like to thank PETRONAS administration for envisioning the importance of new
technologies to leverage digital transformation, fundamentally transforming the way of working. We would
also like to thank Faazmiar Technology and Exebenus for the cooperation.
References
Aggarwal, C. C., 2018. Neural Networks and Deep Learning. Springer, NY, USA.
Al-Baiyat, I. A. and Heinze, L. 2012. Implementing Artificial Neural Network and Support Vector Machines in Stuck
Pipe Prediction. Presented at the SPE Kuwait International Petroleum Conference and Exhibition, 10-12 December,
Kuwait. SPE-163370-MS. https://doi.org/10.2118/163370-MS.
Alshaikh, A., Magana-Mora, A., Gharbi, S. A., et al, 2019. Machine Learning for Detecting Stuck Pipe Incidents: Data
Analytics and Models Evaluation. Presented at the International Petroleum Technology Conference (IPTC), 26-28
March, Beijing, China. IPTC-19394-MS https://doi.org/10.2523/IPTC-19394-MS.
Arriffin, M. F., Norhashimi, L., Richard, B., et al, 2020. Value Creation Transformation from a Reactive Workflow to a
Proactive and Predictive Monitoring in Real Time Centre. Presented at the Offshore Technology Conference (OTC)
Asia, 2-6 November, Kuala Lumpur, Malaysia. OTC-30113-MS. https://doi.org/10.4043/30113-MS.
Bakar, M. A. A., Nasrudin, K. A, Nor, A. M., et al, 2018. Application of a Wellbore Shield Eliminates NPT in South China
Sea Wells. Presented at the SPE/IADC Middle East Drilling Technology Conference and Exhibition, 29-31 January,
Abu Dhabi. SPE-189365-MS. https://doi.org/10.2118/189365-MS.
Bjerke, H., 2013. Revealing Causes of Restrictions by Signatures in Real-Time Hook Load Signals. Master thesis.
Norwegian University of Science and Technology (NTNU), Norway.
Elmousalami, H. H. and Elaskary, M. 2020 Drilling stuck pipe Classification and Mitigation in the Gulf of Suez Oil Fields
Using Artificial Intelligent. Journal of Petroleum Exploration and Production Technology (10), 2055–2068.
Hestie, T., Tibshirani, R., and Friedman J., 2017. The Elements of Statistical Learning. Second edition, Springer, NY, USA.
Jahanbakhshi, R., Keshavarzi, R., Shoorehdeli, A., et al, 2012. Intelligent Prediction of Differential Pipe Sticking by
Support Vector Machine Compared With Conventional Artificial Neural Networks: An Example of Iranian Offshore
Oil Fields. SPE Drilling & Completion, (27). SPE-163062-PA. https://doi.org/10.2118/163062-PA.
Khan, J. A., Irfan, M, Irawan, S., et al, 2020. Comparison of Machine Learning Classifiers for Accurate Prediction of
Real-time Stuck Pipe Incidents. Energies, (14), 3683. https://doi.org/10.3390/en13143683.
Mason, C. J., Igland, J. K., Streeter, E., and Andresen, P. A., 2013. New Real-Time Casing Running Advisory System
Reduces NPT. Presented at the SPE Offshore Europe Oil and Gas Conference, Aberdeen, 3-6 September 2013.
SPE-166616-MS. https://doi.org/10.2118/166616-MS.
Miri, R., Sampaio J. H. B., Afshar, M., et al, 2007. Development of Artificial Neural Networks to Predict Differential
Pipe Sticking in Iranian Offshore Oil Fields. Presented at the International Oil Conference and Exhibition, 27-30 June,
Veracruz, Mexico. SPE-108500-MS. https://doi.org/10.2118/108500-MS.
Muqeem, M.A., Weekse, A. E., and Al-Hajji, 2012. Stuck Pipe Best Practices – A Challenging Approach to Reducing
Stuck Pipe Costs. Presented at the SPE Saudi Arabia Section Technical Symposium and Exhibition, Saudi Arabia,
8-11 April. SPE-160845-MS. https://doi.org/10.2118/160845-MS.
Siruvuri, C., Nagarakanti, S., and Samuel, R., 2006. Stuck pipe prediction and avoidance: a Convolutional Neural Network
Approach. Presented at the IADC/SPE Drilling Conference, 21-23 February, Florida, USA. SPE-98378-MS. https://
doi.org/10.2118/98378-MS.