Professional Documents
Culture Documents
2021-Application of Artificial Intelligence and Machine Learning To Detect DrillingAnomalies Leading To Stuck Pipe Incidents
2021-Application of Artificial Intelligence and Machine Learning To Detect DrillingAnomalies Leading To Stuck Pipe Incidents
Paulinus Abhyudaya Bimastianto, Shreepad Purushottam Khambete, Hamdan Mohamed Alsaadi, Suhail
Mohammed Al Ameri, Erwan Couzigou, Adel A/Rahman Al-Marzouqi, and Fahed Salem Al Ameri, ADNOC
Offshore; Said Aboulaban, Husam Khater, and Philippe Herve, SparkCognition
This paper was prepared for presentation at the Abu Dhabi International Petroleum Exhibition & Conference to be held in Abu Dhabi, UAE, 15 – 18 November 2021.
The official proceedings were published online on 9 December 2021.
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
This project used predictive analytics and machine learning-based modeling to detect drilling anomalies,
namely stuck pipe events. Analysis focused on historical drilling data and real-time operational data to
address the limitations of physics-based modeling. This project was designed to enable drilling crews to
minimize downtime and non-productive time through real-time anomaly management.
The solution used data science techniques to overcome data consistency/quality issues and flag drilling
anomalies leading to a stuck pipe event. Predictive machine learning models were deployed across seven
wells in different fields. The models analyzed both historical and real-time data across various data channels
to identify anomalies (difficulties that impact non-productive time). The modeling approach mimicked the
behavior of drillers using surface parameters. Small deviations from normal behavior were identified based
on combinations of surface parameters, and automated machine learning was used to accelerate and optimize
the modeling process. The output was a risk score that flags deviations in rig surface parameters.
During the development phase, multiple data science approaches were attempted to monitor the overall
health of the drilling process. They analyzed both historical and real-time data from torque, hole depth and
deviation, standpipe pressure, and various other data channels.
The models detected drilling anomalies with a harmonic model accuracy of 80% and produced valid alerts
on 96% of stuck pipe and tight hole events. The average forewarning was two hours. This allowed personnel
ample time to make corrections before stuck pipe events could occur. This also enabled the drilling operator
to save the company upwards of millions of dollars in drilling costs and downtime.
This project introduced novel data aggregation and deep learning-based normal behavior modeling
methods. It demonstrates the benefits of adopting predictive analytics and machine learning in drilling
operations. The approach enabled operators to mitigate data issues and demonstrate real-time, high-
frequency and high-accuracy predictions. As a result, the operator was able to significantly reduce non-
productive time.
2 SPE-207987-MS
Introduction
Given the impact of COVID-19, demand fluctuation, and unstable oil prices, many operators are exploring
ways to improve their return on capital. According to the CAPEX structure of exploration and production,
drilling and completion account for 40% to 50% of capital expenditures. Time-related costs contribute
70% to 80% of overall drilling and completion costs. Therefore, to improve return on capital, it is crucial
to maximize drilling and completion efficiency by maximizing productive time and minimizing non-
• Indirect NPT impacting events; leading to change in practice like tight spots
• Indirect NPT impacting events; leading to slower than planned operation but no change in practice.
At a high level, stuck pipe can be categorized into 2 broad categories: differential sticking and mechanical
sticking. Differential sticking occurs when the mud column pressure exceeds the formation fluid's pressure,
leading to the pipe becoming embedded in the mud cake, and causing a stuck pipe (DeGeare, 2003). Torque,
pick-up, and slack-off can be good indicators to warn against potential differential sticking. Mechanical
sticking, on the other hand, can be attributed to pack-off, key-seating, wellbore collapse, and other issues.
Standpipe pressure, torque, and hookload are useful as early indicators of mechanical sticking.
The project's scope was to demonstrate and evaluate the ability of machine learning, trained with actual
drilling history, to detect drilling anomalies. This approach stands in contrast with using physics models,
either directly to detect drilling anomalies, or indirectly to train machine learning models. The project
produced a tool for drilling crews to minimize NPT with an artificial intelligenceI-based, real-time, early
warning system for detecting drilling anomalies.
The work introduces novel methods for data aggregation and deep learning-based normal behavior
modeling and demonstrates the benefits of applying machine learning and artificial intelligence technologies
in drilling. The approach allows us to deal with data issues and to demonstrate real-time, high frequency,
high accuracy predictions, aiming at reducing non-productive time.
• Dependence on subject matter experts to establish a threshold for deviation from theoretical values.
• Theoretical values estimated are highly dependent and sensitive to bottom hole assembly, well
trajectory, mud properties, and others. This makes the deviation threshold very hard to generalize.
• Some of those models tend to oversimplify assumptions of local conditions, such as the soft-string
model.
• Another limitation is that torque, drag, and hydraulics are modeled and analyzed independently.
This ignores interdependence between surface parameters.
SPE-207987-MS 3
• Time aspect is not taken into account. Where a physics based approach works based on a single
spot value in time, in reality the stuck pipe situation depends on time trends to identify them. For
example, in case of accumulated cuttings, the following are common symptoms: increase in drag,
overpull, and higher stand-pipe pressure (Skalle et al, 2013).
• Finally, the operator used absolute values of parameters to model torque, drag, and hydraulics. Due
to the nature of work on rigs, absolute values might be skewed because of data calibration issues.
Those data issues do not mean that the rig is operationally dysfunctional, however, data is skewed.
• Alert: alert raised by the solution to highlight real-time drilling incidents with elevated risk and
potential stuck-pipe/tight hole impact.
Data Analysis
Due to availability and quality of data, it was decided to use surface parameters for the solution. The
following surface parameters were used for modeling and monitoring purposes:
• Torque: the rotational force between the drill string and the formation.
• Hookload: the total downward force acting on the hook (attached to the bottom of the travelling
block).
• Flow in: flow rate supplied from the mud pumps.
Data was collected and analyzed for multiple sections, wells, rigs and fields, producing the following
observations:
• Data calibration issues consistently impact the distribution of features, making it tougher for models
to generalize. The example below (Figure 1) is for block position, where for W1 the block position
ranges between 0 and 150ft, and W3 starts from negative (-ve) block position.
4 SPE-207987-MS
• Drilling rigs differ in terms of surface parameters, making it harder to generalize the models
across multiple drilling rigs. Figure 2 shows the wide range of hookload values for different rigs,
especially minimum hookload.
Feature Engineering
To overcome the identified data issues, and prior to starting the modeling exercise, the operator and their
consultant worked on multiple feature engineering approaches, with the aim of:
• Addressing the issue of time inconsistent sampling rates and time stamps for surface parameters
• Addressing the issue of the unexpected/highly variable distribution of surface parameters across
multiple formations, sections, wells, fields and rigs.
• Focusing on the symptoms visible on surface parameters.
Keeping the above objectives in mind, the operator and their consultant managed to transform input
surface parameters from what is displayed on the left to what is displayed on the right in Figure 3, through
the use of multiple feature engineering methodologies, as well as implementing different interval rolling
windows for maximum, average, and standard deviation of surface parameters.
SPE-207987-MS 5
Modeling
Normal Behavior Modeling. The operator and their consultant applied NBM to detect anomalies during
drilling operations. NBM is an unsupervised machine learning modeling technique used for anomaly
detection (Goodfellow et al, 2016).
NBM is used when there are too few failures upon which to train a supervised machine learning model.
It is also applicable when normal operating periods are easy to define within the asset's data history.
An NBM model is trained using deep neural networks algorithms that learn "normal" operating conditions
from historical data. The model uses this training to predict values for each variable as new data passes
through the model (Goodfellow et al, 2016). The model predictions are compared to actual surface parameter
values. The residuals between predicted values and actual values are normalized and combined to produce
an anomaly score for each timestamp. When the anomaly score exceeds a statistically defined threshold,
the model triggers an alert for the abnormal behavior.
Figure 4 depicts an example output of the NBM model, where the x-axis reflects timestamp, and y-axis
the model output, in terms or risk score. As long as the risk score is green, the solution identifies the activity
to be operating within normal behavior boundaries. Once the risk score turns red, it represents the NBM
identifying the activity to be operating in abnormal behavior.
The goal of NBM models is to provide both predictive capability through early anomaly detection and
interpretability by pointing to root causes in the form of feature importance.
Alert Classifier. The output of the NBM model is routed to two components as shown in Figure 5:
1. Threshold based alerting model
2. Time and depth-based feature engineering
6 SPE-207987-MS
The output of these two components is then fed to a binary alert classifier.
The alert classifier provides 3 main functions:
• Maintains a depth-based risk profile of observed depth points to address risk driven by well
Model Evolution. The sections below demonstrate the model evolution over time, starting with model V1,
then progressing to V2 and V3. The model evolved in order to address the following challenges:
• False positives due to high sensitivity of the NBM to momentary fluctuations in values.
• To maintain a bit depth based profile within the solution to identify high risk depth spots.
Solution Evaluation
The model was independently evaluated by the operator's onsite subject matter experts (SMEs). The team
of drilling engineers used the raw data and the model outputs to verify model performance. Using the data,
the SMEs identified anomalies in the drilling operations. This information was compared with the alerts
that the solution generated. The alerts were then labeled with one of the options listed in Table 1 below.
8 SPE-207987-MS
Anomalies are not drilling related, or not in open Not applicable – Only drilling conditions were
Not drilling related
hole used for model evaluation purposes
The overall metric that is used to evaluate the harmonic accuracy of the model is F1 score, presenting
accuracy in a measure between 0 and 1, with an F1 score value of 1 reflecting perfect model accuracy;
capturing 100% of the alerts, and not raising a single false alert, and an F1 score of 0 means a model with
100% false alerts AND/OR 100% missed alerts.
As shown above, the labels were then categorized as True Positive (TP), False Positive (FP), and False
Negative (FN). These categorizations were used to calculate model accuracy metrics such as precision,
recall, and F1 score.
The solution went through 3 iterations to improve the solution performance in terms of:
Figure 9 shows a significant decrease in the average number of alerts generated per well. There was a
51% reduction between versions V1 and V2 and another 25% reduction between V2 and V3.
SPE-207987-MS 9
Looking into the distribution of alarms, most of the reduction was from fewer False Positives. This
indicates that the model becomes less noisy without meaningfully affecting its ability to detect truly
anomalous behavior, i.e., the number of True Positives. Fewer False Positives also improves the user
experience.
Figure 11 shows the evolution of the solution performance over versions. Model performance is evaluated
based on F1 Score, Precision and Recall.
10 SPE-207987-MS
Based on the reduced number of false positives and the overall improved accuracy, version V3 was
considered the best model iteration. Model V3 was deployed for all wells in the online, live platform. Table
2 summarizes the final results of the live pilot project.
Conclusion
The solution deployed by the operator to deal with stuck pipe events was run in a production environment
for 6 months, deployed on 5 rigs, and monitored drilling activities for 7 areas of interest.
The solution deployed a novel approach using machine learning methods on surface parameters.
Identifying and alerting on early warning signals for drilling dysfunctions created opportunity for preventive
measures that reduced risk of stuck-pipe.
The solution overcomes the limitations of physics based approaches that had been used by the operator
previously. The dynamic machine learning approach reacts to real time changes in drilling conditions. It also
reacts to shifts in surface parameters values due to calibration issues. Furthermore, the machine learning
approach can generalize across sections, wells, rigs, fields, etc.
The NBM layer proved capable of tracking deviations in surface parameters from their expected values.
These deviations reflect the risk level of the active drilling operation. Adding a machine learning based
classifier on top of the NBM layer for alerting enabled the solution to track trends in risk and to alert drillers
SPE-207987-MS 11
accordingly. Implementing expert feedback mechanism as part of the solution further improved performance
in terms of F1 Score. The final F1 score was 0.8, with precision of 0.71 and recall of 0.93.
Given the successful deployment of the solution in the operator's live environment, future additions to
the solution will focus on two main areas:
• Classifying a stuck pipe event based on multiclass types defined in the NPT Types Table instead
of the current approach, which outputs a binary classification: alert or no alert.
References
Skalle, P. & Aamodt, Agnar & Gundersen, Odd Erik. (2013). Detection of Symptoms for Revealing Causes Leading to
Drilling Failures. SPE Drilling & Completion. 28. 182–193. 10.2118/165931-PA.
Goodfellow, I. & Bengio, Y. & Courville, A. (2016). Deep Learning. Retrieved from https://www.deeplearningbook.org/.
DeGeare, J. (2003) The Guide to Oilwell Fishing Operations (Second Edition).