Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

SPE-207987-MS

Application of Artificial Intelligence and Machine Learning to Detect Drilling

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Anomalies 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

Copyright 2021, Society of Petroleum Engineers

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-

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


productive time (NPT).
With this goal in mind, the operator identified drilling dysfunctions, such as stuck pipe, as the major
contributors to NPT. A stuck pipe situation can halt drilling activities, requiring the work crew to focus on
the dysfunction, and delaying the drilling plan. Accordingly, events of interest are broken into:

• Direct NPT impacting events; stuck pipe

• 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.

Previous Approach and Limitations


Prior to this, the operator used torque and drag models to plan and monitor drilling operations, aiming
at reducing NPT. The approach was to use physics modeling to model torque, drag, and hydraulics
independently, then to alert the drilling operations team based on deviation of torque, drag, and standpipe
pressure from their theoretical values.
This traditional approach introduced limitations to the drilling operations team, especially in terms of:

• 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.

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Novel Methodology
Approach
The approach taken in this project by the operator and their consultant was to use machine learning and
artificial intelligence technologies to build models that use minimal data from surface parameters. The
models were applied to:

• Model normal behavior of drilling operations in open holes.

• Identify deviation(s) from normal behavior.

• Classify deviations based on their impact on stuck-pipe and tight holes.

The output of the machine learning models were:

• Risk Score: reflecting in real-time the riskiness of the drilling operation.

• 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:

• RPM: rotary speed of the drill string.

• Torque: the rotational force between the drill string and the formation.

• Block position: The position of the block in the derrick.

• Bit depth: the depth of the bit in the drilled hole.

• Hole depth: the measured depth of the drilled hole.

• 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.

• Standpipe pressure: total pressure loss due to fluid friction.

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.

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Figure 1—Block position

Figure 2—Hookload values

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:

• Reducing/eliminating the effect of data calibration errors.

• Reducing the dependence of modeling on depth and trajectory.

• 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

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Figure 3—Feature engineering results

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.

Figure 4—Sample Normal Behavior Model Output

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:

• Tracks risk trends and alert for risky operations

• Suppresses False Positive alerts

• Maintains a depth-based risk profile of observed depth points to address risk driven by well

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


geometry

Figure 5—Alerting Model Workflow

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.

Figure 6—Model V1 Architecture


SPE-207987-MS 7

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Figure 7—Model V2 Architecture

Figure 8—Model V3 Architecture

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

Table 1—Labels for Evaluation

Label Label Description Evaluation Impact

Anomalies are not drilling related, or not in open Not applicable – Only drilling conditions were
Not drilling related
hole used for model evaluation purposes

Data Issue Issues related to received data quality.

An anomaly is observed; however, it did not


Difficulty Level 1
impact the drilling operations.

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


An anomaly is observed; it impacted the duration
Difficulty Level 2
of the operation without causing a rig action.

An anomaly is observed; it caused a change in True Positive (TP)


Difficulty Level 3
drilling operation.

Stick-Slip An anomaly is observed due to stick and slip.

Stuck Pipe Stuck pipe or tight hole forewarning.

Anomalies observed when rig actions are


Surface-Induced
performed.

False Alert - alert raised but no anomaly


False Positive False Positive (FP)
observed.

A drilling anomaly is observed in the data;


False Negative however, there is no corresponding alert from the False Negative (FN)
model.

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:

• F1 Score (i.e. harmonic mean of the model's precision and recall)

• Number of Alerts raised

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

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Figure 9—Average Number of Alerts per Well across Model Versions

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 10—Breakdown of Model Results across Model Versions

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

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


Figure 11—Accuracy Metrics across Model Versions

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.

Table 2—Summary of Model v3 Online Results

Rig/Well Total Alerts TP FP FN Precision Recall F1 Score

Well 1 37 28 9 0 0.76 1.00 0.86

Well 2 64 42 22 0 0.66 1.00 0.79

Well 3 62 45 17 1 0.73 0.98 0.83

Well 4 49 32 17 13 0.65 0.71 0.68

Well 5 160 112 48 6 0.70 0.95 0.81

Well 6 121 84 37 6 0.69 0.93 0.80

Well 7 38 32 6 3 0.84 0.91 0.88

Total 531 375 156 29 0.71 0.93 0.80

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.

Downloaded from http://onepetro.org/SPEADIP/proceedings-pdf/21ADIP/4-21ADIP/D041S108R002/2534486/spe-207987-ms.pdf/1 by U. of Alberta Library user on 15 September 2023


• Implementing machine learning approaches for different hole problems, including circulation loss,
washout, and real time pore pressure prediction.

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).

You might also like