0% found this document useful (0 votes)
7 views

Real-Time Estimation of Downhole Equivalent Circulating Density ECD Using Machine Learning and Applications

Uploaded by

maliha waseem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Real-Time Estimation of Downhole Equivalent Circulating Density ECD Using Machine Learning and Applications

Uploaded by

maliha waseem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

IADC/SPE-208675-MS

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
Real-Time Estimation of Downhole Equivalent Circulating Density ECD
Using Machine Learning and Applications

Tim Robinson and Dalila Gomes, Exebenus AS; Meor M. Hakeem Meor Hashim, M. Hazwan Yusoff, M. Faris
Arriffin, and Azlan Mohamad, PETRONAS Carigali Sdn Bhd; Tengku Ezharuddin and Eswadi Othman, Faazmiar
Technology SDN BHD

Copyright 2022, IADC/SPE International Drilling Conference and Exhibition DOI 10.2118/208675-MS

This paper was prepared for presentation at the IADC/SPE International Drilling Conference and Exhibition held in Galveston, Texas, USA, 8–10 March 2022.

This paper was selected for presentation by an IADC/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 International Association of Drilling Contractors or the Society of Petroleum Engineers and are subject to correction
by the author(s). The material does not necessarily reflect any position of the International Association of Drilling Contractors or 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 International Association of Drilling
Contractors or 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 IADC/SPE copyright.

Abstract
Despite many drilling technology improvements during recent years, hole cleaning remains a significant
challenge. The variation of equivalent circulation density (ECD) is a symptom of borehole instability.
Therefore, the ability to accurately estimate ECD is a key consideration for preventing hole cleaning
problems that may lead to a stuck pipe, and well pressure management more generally.
In this work, we demonstrate a Machine Learning approach to estimating downhole ECD in real-time
using a deep neural network. Surface measurements that are widely available from most rigs are used as the
model inputs, hence less configuration information is required relative to hydraulic simulations for pressure
loss. Mean Absolute Errors of ~0.3-0.4 ppg were achieved on 16 validation wells and 7 holdout wells
(blind test); these wells were independent of those in the training data. Prediction errors often reflect offsets
between reference and predicted values; however, even with these offsets, trends in ECD behavior can still
be captured correctly. The model shows promise for real-time ECD monitoring purposes to complement
existing numerical methods and downhole tools.
Beyond real-time estimation, other applications could include forecasting ECD a short time ahead to
provide early indications of hole cleaning issues; case studies obtained from a real-time monitoring centre
where this approach is used are presented as part of this work. The software tool was capable of detecting
such symptoms in advance, giving the driller opportunity to take preventive actions to avoid a potential
stuck pipe.

Introduction
While there have been many drilling technology improvements in recent years, hole cleaning and
management of downhole equivalent circulation density (ECD) remain as significant challenges. The
fluctuation of ECD is a symptom of borehole instability. Therefore, the ability to accurately estimate ECD
in real-time is a key consideration for ECD management and prevention of hole cleaning problems that may
lead to a stuck pipe. Furthermore, the safe drilling window between hole collapse and fracturing is often
2 IADC/SPE-208675-MS

narrow, especially in High Pressure High Temperature (HPHT), extended-reach drilling, deep water, and
other challenging well types.
ECD is influenced by a range of factors such as the drilling mud characteristics (density, viscosity, and
flow rate into the well), the quantity and granularity of cuttings in suspension, well pressure and temperature

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
[Rommeveit 1997], drillstring rotary speeds [Hemphill 2008, Ahmed 2010, Kulkarni 2017], and gains and
losses. Hence, modelling ECD is a complex and inherently multivariate problem. A detailed discussion of
factors affecting ECD is provided by Pål Skalle in Drilling Fluid Engineering, Section 7 [Skalle 2010].
Usually, companies rely on expensive downhole sensors to measure ECD, which typically do not provide
data at sampling frequencies matching the surface measurements. Most of these tools have operational
limitations (e.g. related to pressure and temperature) which might prevent their use throughout the whole
operation. Downhole ECD is typically obtained by measuring the pressure loss Ps in the annulus using a
quartz gauge pressure sensor, and then applying the following formula for ECD:

(1)

where the DTV is the true vertical depth (TVD), ρmud is the mud density, and C is a constant. If using units of
ppg, psi and ft for mud density, annular pressure loss and TVD respectively, then C = 1/0.052, yielding a
commonly used version of this formula in the industry. Equation 1 is also used in conjunction with hydraulics
calculations, which estimate values for Ps instead of using measurements from a downhole tool. Some
example rheological models commonly used for hydraulics calculations in the industry include Bingham-
Plastic, Power-Law and Herschel-Bulkley [Whittaker 1985]. These hydraulics calculations typically require
many input parameters, which can be challenging to obtain values for, increasing the configuration effort
required to use them. Furthermore, they make certain assumptions, for example when calculating pressure
drop using Bingham-Plastic and Power-Law models, laminar flow of drilling fluids is assumed, as well as
the drillstring being located concentrically in a circular hole, no drillstring rotation, and that the drilling fluid
is incompressible [Bourgoyne 1991]. These assumptions may not hold well in reality; for example, laminar
flow is typically associated with low pumping rates, and drillstring rotation is routine in many operations
where ECD monitoring is of interest. Based on the aforementioned limitations, there is a clear motivation
for developing alternative numerical methods for estimating ECD.
In this work, we demonstrate a Machine Learning (ML) approach to estimating downhole ECD in real-
time using a deep neural network with residual connections. The input variables used are surface parameters
that are widely available in real-time from most rigs, and models are trained in advance of practical usage,
hence less configuration information is required relative to hydraulic simulations for pressure loss. The
application of ML to real-time drilling data is recent; most research published so far describes early-stage
technologies. The tool described here has been used in live operations for identifying hole cleaning risks
for over a year, as a component of a software system helping to decrease the number of stuck pipe incidents
[Meor Hashim 2021(1), Meor Hashim 2021 (2), Meor Hashim 2021 (3)].
Other works have been published relating to ECD estimation using ML [Abdelgawad 2019, Alkinani
2019, Al Saihati 2021 (1), Gamal 2021], however these are typically limited in scope (for example
Abdelgawad et al. only consider drilling in an 8.5″ vertical hole section) or have methodological limitations
relating to assessment metrics used (R2 is commonly mentioned, but only applies to linear models), or how
datasets were split for model validation (e.g. at random, with small sample sizes). Hence, generalizability
to new wells has not been properly assessed.
In addition to estimating ECD in real-time, Alkinani et al. proposed an interesting use of ML models for
optimization purposes, namely modifying the input variables to identify the combination of values which
yield an estimated ECD closest to a target value [Alkinani 2019]; this could be useful in the field for
downhole ECD management. In this work, we apply a deep learning approach using a model with residual
connections, building on previous attempts to model ECD with ML, and addressing the methodological
IADC/SPE-208675-MS 3

issues by using robust validation strategies and an assessment of generalization that closely replicates real-
world usage of such systems.

Methodology

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
Dataset Selection
The dataset was constructed using offshore (deep and shallow water) and onshore well data from a variety
of regions, such as Central and South America, Northern Europe, West Africa, Central Asia and South
East Asia. It included a mixture of vertical and deviated wells, different section sizes, as well as drilling
scenarios with and without use of downhole mud motors. Data from reaming and back-reaming intervals
was also included.
Downhole ECD measurements were used as the target variable for fitting the ML model. The following
surface measurements were used as the predictor (input) variables for modelling: standpipe pressure, mud
density in, mud flow in, bit depth, surface rotary speed, and the rate of penetration (ROP). Interactions
between these variables were also included as inputs, for example the ratio of standpipe pressure and mud
flow. A time-averaged ROP is used due to the volatility of instantaneous ROP; this is typically provided with
the surface parameters from most rigs. Outside of drilling operations, for example during (back)reaming,
circulating or other operations with flow, ROP was set to zero. The model's intended scope is for operations
with mud circulation such as drilling and reaming, thus presence of flow greater than 100 galUS/min was
required for a set of inputs at a given timestamp to be included in the dataset.
The datasets were cleaned both by removing values, for a given variable, above/below physically sensible
limits (e.g. a mud density value of 35 ppg), and by removing "spike" type anomalies, where a variable would
appear to suddenly change by a "large" amount before returning to previous levels on short timescales. Some
of these "spikes" might fall within the upper/lower limits, thus need to be treated separately. An example of
such a false sensor reading might be pressure values (in psi) of {1000, 1003, 4000, 999, 1002} with a 0.5
Hz sampling frequency, where the 4000 psi value would be removed. The cleaning steps were applied both
to the surface measurements (input variables) and downhole ECD (target variable).
As the downhole ECD measurements were typically sampled at lower frequencies compared to the
surface data (which ranged from 0.2 to 1 Hz), a 20 second rolling window mean average was applied to
the surface readings for noise-reduction purposes, prior to fuzzy-matching them in time to the (slightly
differently timestamped) ECD measurements.
After preprocessing and temporal matching, certain wells contributed significantly more data to the
overall set, for example ~100,000 examples came from one well, compared to others on average contributing
~3000-20,000 examples. To prevent a small number of wells contributing disproportionately to the dataset
(sampling bias), and thus to evaluation of the objective function during model fitting, some wells were
undersampled down to approximately 15,000-20,000 examples in order to balance the dataset. This is
particularly important to do with the training and validation sets, which impact on the model fitting process
directly and indirectly; it is less necessary to do for the holdout testing set, as this is not used during
model development, and breakdown of scoring metrics by individual wells will reveal if models over or
underperform in any specific cases.
A natural and convenient way to split drilling and completions datasets is by well; this allows the neural
network for ECD estimation to be trained and validated on data from a variety of independent wells in order
to assess model generalization; there was no overlap in terms of specific wells between training, validation
and holdout testing datasets. This is a superior strategy compared to splitting datasets by random sampling, a
commonly used technique, as it minimizes leakage of information between the training and testing datasets.
This leakage may result in over-optimistic estimates of a model's performance on previously unseen data,
as the validation set could no longer be considered to be unseen by the model. Hence, steps should be, and
were, taken to avoid it.
4 IADC/SPE-208675-MS

Details of these datasets are given in Table 1. Min-max scaling was applied to the input and output
variables prior to fitting models; note that this preserves the distributions of each variable, and is thus
sensitive to outliers in the dataset. Hence, the aforementioned cleaning steps must be done prior to scaling.

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
Table 1—Details concerning the splitting of data for purposes of training, validating and estimating
generalization error. There was no overlap between data subsets at the individual well level.

Data subset Number of independent wells Number of samples

Training 39 228,362
Validation 16 61,839
Holdout testing 7 32,786

Model Selection
A deep neural network (NN) with residual connections [He 2016, Chen 2020] was implemented as a
regression model for estimating downhole ECD. This differs from previous works on this topic, which
used shallow NN models [Abdelgawad 2019, Alkinani 2019, Gamal 2021] or other models such as Support
Vector Machines applied to the input dataset's principal components [Al Sahaiti 2021 (1), Al Sahaiti 2021
(2)]. In contrast to physical models, few assumptions are needed with NNs; here, we assume there exists a
functional mapping between a set of continuous input variables (the aforementioned surface readings) onto
another continuous variable (downhole ECD measurements).
Several works in the literature have established universal approximation theorems showing neural NNs’
capabilities to represent a broad variety of complex functions, provided sufficient hidden units are available
("capacity") and the model has appropriate weights [Hornik 1989, Hornik 1991, Lu 2017, Kratsios 2020].
The number of hidden units is determined by the width of the NN's hidden layers, and the number of
layers. Rather than analogies relating to the human brain which are sometimes used, another way to think
about a feedforward NN is as a series of matrix multiplications and applications of nonlinear activation
functions (e.g. sigmoid, tanh or ReLU) at each layer; the input variables are progressively transformed by
being sequentially multiplied by the weights matrices and passed through an activation at each layer. For
those interested in more information about NNs and Deep Learning, Ian Goodfellow's book Deep Learning
[Goodfellow 2016] is an excellent resource.

Fig. 1—Diagram of a residual block with skip connection used in the neural network model.

Residual or "skip" connections and intermediate normalization layers [Ioffe 2015] help to address the
problems of vanishing gradients [Hochreiter 1991] and accuracy degradation, which can impair convergence
IADC/SPE-208675-MS 5

and predictive performance of deep (many-layered) NNs, allowing deeper architectures to be practically
utilized [He 2016, Veit 2016, Chen 2020]. Deeper models are capable of representing more complex
functions relative to shallow models of similar layer widths. In this work, a model with eight (8) residual
blocks was selected. A diagram depicting how residual blocks with skip connections were implemented is

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
provided in Fig. 1.

Model Fitting
Keras, an open-source Python library providing an interface for neural networks, using Google's TensorFlow
as a backend, was used for implementing models. Mini-batch gradient descent ("Adam" optimization)
[Kingma 2015] with early stopping [Prechelt 2012] and learning-rate scheduling was used to train the neural
networks; at the end of each epoch, the objective (loss) function is calculated on the validation dataset,
allowing the training process to be terminated once the validation loss ceases to improve. Mean Squared
Error (MSE) was used as the optimization objective. Note that the validation dataset itself does not directly
affect the gradient updates to the network weights, which are calculated from the gradient of the objective
function evaluated on the training dataset. However, the validation data is used during the hyperparameter
tuning process, consequently it is possible for models to indirectly overfit to it, hence the holdout testing
set is ultimately required to assess generalization.
The combination of independent validation wells and early stopping helps to reduce overfitting and
encourage better generalization. Generalizability is thus built into the model fitting process itself, which
replicates the scenario of applying the model on unseen wells as closely as possible.

Results and Discussion

Fig. 2—An example interval taken from the holdout test set comparing ECD from downhole measurements and estimated by
the ML model. The time index has been replaced with integers to distribute the data points more evenly for easier viewing.

As ECD estimation in this context is a regression problem without explicit use of temporal relationships,
Mean Absolute Error (MAE) and Mean Squared Error (MSE) were the chosen metrics for assessing model
performance. Qualitative analysis via inspecting time-series of measured and estimated ECDs were also
useful in assessing models. MAE values of ~0.3-0.4 ppg were achieved on the 16 validation wells (used
to terminate model training) and 7 holdout testing wells (not used at all during the model fitting process),
using only real-time surface data as the model inputs. A sample interval taken from the holdout test set is
presented in Fig. 2, which demonstrates that the ML model can perform well on previously unseen data and
6 IADC/SPE-208675-MS

follow the trends in measured ECD, although not all localized variation is captured by the model, as seen
on the right-hand side of the graph. Note that the time indices, which have variable gaps between them,
have been replaced with integers for easier viewing of long series by spreading them more evenly; integers
represent the order of a value in the dataset.

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
For a broader view of model performance, summary statistics for each data subset are shown in Table 2,
and a breakdown for the seven (7) independent wells within the holdout testing dataset is shown in Table 3.
MAE is the simplest statistic to interpret, while MSE is more affected by outliers due to squaring of errors;
this can be seen in the results for wells 4 and 7 from the holdout test set (Table 3) which have MSE > MAE,
suggesting there are some larger errors which drive up the MSE value. Performance on the holdout wells is
similar, except for well 4, and is not greatly increased relative to the training set metrics; this suggests the
model has generalized well to 6 of the 7 holdout cases.

Table 2—Summary statistics from the model validation process.

Data subset Mean Absolute Error (MAE) [ppg] Mean Squared


Error (MSE) [ppg2]

Training 0.257 0.167


Validation 0.415 0.389
Holdout testing 0.326 0.239

Table 3—Summary statistics for each independent well in the holdout testing dataset. The bottom row
contains the average of the single well scores, not the MAE/MSE across the combined holdout dataset.

Well number Mean Absolute Mean Squared


Error (MAE) [ppg] Error (MSE) [ppg2]

1 0.257 0.112
2 0.278 0.142
3 0.218 0.061
4 0.643 0.728
5 0.323 0.220
6 0.308 0.141
7 0.297 0.325
Mean 0.332 0.234

Statistical models are however typically overfit to some extent, indicated by smaller training set error
compared to validation and testing sets in Table 2. Here, this is an expected consequence of the strong
independence enforced between the data subsets from using entirely separate wells, despite the steps taken
to avoid overfitting such as early-stopping based on the validation set loss. The information pertaining to
downhole ECD is imperfectly captured in the model's input data, due to the lack of real-time measurements
of certain characteristics in normal operations; examples of these could relate to specifics of mud rheology,
bottomhole assemblies or other operational details not included in the real-time data coming from Electronic
Data Recorders. Hence, it is reasonable to observe some increased error on the holdout wells.
Prediction errors often reflect offsets between reference and predicted values. However, even with these
offsets, trends in ECD behavior can still be captured correctly, which is useful for hole cleaning related
applications described later in this work. An example interval containing both close predictions and those
with offsets is shown in Fig. 3 (which uses the same time reindexing to integers as in Fig. 2); the plot also
demonstrates an example of a limitation of the ML approach, namely the spike in ECD estimates, annotated
as (c), coinciding with a pump ramp-down. Here, the mud flow in, standpipe pressure and rotary speed
IADC/SPE-208675-MS 7

all dropped sharply, representing an edge case where operations transitioned outside the model's scope.
Although an increase in measured ECD was observed at this point, the model response is disproportionate to
this. In a typical operation where this tool could be used to monitor ECD (drilling or reaming), these transient
zones would be filtered out, however they have been included in the figure as an illustrative example of a

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
limitation in the statistical modelling approach.

Fig. 3—Example time series comparison between measured downhole ECD and estimates from the ML model. This
interval was taken from the validation set in order to highlight sections where (a) trends are followed closely, (b) where
trends are followed but with an offset, (c) an example of instability in the ECD estimates coinciding with pump ramp-
downs. The time index has been replaced with integers to distribute the data points more evenly for easier viewing.

Residuals distributions are a useful way to visualize how prediction errors vary across a dataset; residuals
are defined as the differences between the reference values and the model predictions, in this case given
by ECDmeasured – ECDpredicted. Negative residuals represent overprediction by the ML model, and conversely
positive residuals values represent underestimates. For each data subset used during the model training
and validation process, a residuals distribution is shown in Fig. 4; these are centred close to zero in all
cases, though as expected the validation and holdout sets have broader distributions relative to the training
residuals, with some long tails coming from intervals with larger offsets between measured and estimated
ECD. These long tails contribute to the larger validation and holdout errors reported in Tables 2 and 3.

Fig. 4—Residuals distributions for each data subset used in the model validation process.
8 IADC/SPE-208675-MS

Comparison to theoretical calculations


In addition to benchmarking the ML models against ECD measurements from downhole tools, it useful
to understand how they compare to physical models commonly used in the industry. The ML models
were benchmarked against theoretical ECD values from a hydraulics calculation, using an available sample

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
dataset from a North Sea drilling operation. This data was not included in any of the previously mentioned
training, validation or holdout testing datasets. A time-series comparison for ECD values from the ML
and hydraulics models, and reference ECD from downhole measurements, is given in Fig. 5; this shows
qualitatively that both ML and hydraulics models capture the general and finer-scale trends in ECD
reasonably well. The Mean Absolute Errors (MAEs), calculated relative to the downhole measurements,
were 0.14 and 0.24 ppg for the ML and hydraulics models respectively. Residuals distributions for both the
theoretical calculations and the ML-estimates are shown in Fig. 6; both distributions are centered close to
zero (particularly the ML estimates), with only a small number of absolute differences from the reference
ECD exceeding ~0.2 ppg.

Fig. 5—Time series comparison of ML-estimated ECD (green), theoretical ECD calculations
from a hydraulics model (blue), and the reference ECD obtained from a downhole
sensor (red). The sample dataset was from a drilling operation in the North Sea.

Fig. 6—Residuals distributions for the benchmarking of the theoretical ECD calculations
and ML estimated values against ECD obtained from downhole measurements.
IADC/SPE-208675-MS 9

These results suggest the ML model estimates can be competitive with theoretical calculations, with the
added benefit of simpler setup and configuraton relative to physical models; only the surface measurements
and the scaling factors associated with each variable are needed for inference. This contrasts favourably
with the configuration requirements of physical models, where typically many values need to be chosen by

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
the user, which can potentially be a source of error.
Due to limited availability of data from hydraulic simulations, we were unable to perform the
benchmarking on a wider range of wells, in a similar manner to the comparisons with downhole ECD
measurements on many independent wells. Hence, while the results in Fig. 5 and Fig. 6 are promising and
show smaller MAE than the theoretical calclations in this case, the sample size is small and it should not
be extrapolated that this will be the case in all well scenarios.
Although the ECD estimation model has demonstrated its utility and capability to generalize to previously
unseen wells in various contexts, it should not be assumed that it will therefore perform similarly in
all possible contexts globally. Due to practical constraints, it was not feasible to construct a dataset that
is completely representative of all upstream drilling and completions operations. Hence, if applied to a
situation where the phenomena influencing the ECD (the "data generating process") are very different in
some way to the wells used for training and validation, for example in HPHT or extended reach wells, a
degradation in model performance may be observed.

Case studies
While real-time ECD estimation as a standalone tool is useful, another application is to use it to forecast
ECD a short time ahead, in order to provide early indications of hole cleaning issues as they build up. Case
studies obtained from historical datasets, and a real-time monitoring centre where this approach is used,
are presented as part of this work. An analysis by Liang [Liang 2017] relating to stuck pipe incidents in
PETRONAS operations between 2014-2016 found that ~50% of these were related to hole cleaning issues,
thus there is a strong incentive to detect symptoms of poor hole cleaning and to avoid non-productive time
(NPT).
An earlier version of the NN model described in the previous sections was used as part of the tool
for detecting hole cleaning risk, although the model architecture was approximately the same; the main
difference was that less data was available for model training at the beginning of the live-testing process.
The software technology was capable of detecting such symptoms in advance and providing warnings, such
that the monitoring specialists could inform the driller and provide an opportunity to take preventive actions
to avoid a potential stuck pipe.
During drilling and reaming operations, surface data points were sampled every ten (10) and five (5)
minutes respectively and used to generate ECD estimates using the aforementioned ML model, in order to
build up input sequences. From these, two ECD values were forecasted using a recurrent neural network,
where the sampling period of the output sequences was matched to the inputs. Warnings were raised based on
a comparison of the forecasted ECD points relative to each other and the later values of the input sequence;
this process can be tuned according to the desired sensitivity to estimated ECD changes.
Two stages of validation were required for the tool; firstly, testing on historical datasets in a simulated
environment intended to replicate live well operations, with the second stage of validation being true live-
testing. Historical testing provides an indication of when warnings would be raised relative to known
restrictions or stuck pipe issues, importantly without the warnings influencing the actions of the drillers. This
is very useful, as in an ideal live-test scenario where all stuck pipe issues are predicted and mitigated, there
would be no incidents and it would not be possible to assess counterfactuals. Therefore, it is impossible to
know what would have happened had no actions been taken, and difficult to calculate performance metrics
for the overall warning system. While it is not possible to conclude with certainty that a given incident could
have been prevented when running such historical tests, the main performance criteria for these tests are
10 IADC/SPE-208675-MS

that early warnings are provided for as many incidents as possible (high recall), and that false warnings are
within an acceptable limit (high precision, low false positive rates), thus augmenting risk and situational
awareness.
The second stage of validation is live-testing on real-life wells; this was done in partnership with

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
PETRONAS on a variety of wells across their global operations, and has been running for over a year at the
time of writing. This is assessed by considering the number of hole cleaning-related stuck pipe incidents that
occur during the testing period, and comparing this to past experience from similar oilfields and offset wells.
An example historical stuck pipe case from a land-based well located in South America is shown in Fig.
7; this was a pack-off incident followed by jarring and many hours of NPT. Here, the software raised a
warning ~30 minutes before the pipe got stuck, based on a forecasted ECD increase from the ML models.
Some fluctuations in standpipe pressure were also observed following the warning being raised, which may
also indicate increased ECD. While we cannot be certain that this case could be have been prevented, a 30
minute early warning is a reasonable timescale for mitigating actions to be taken.

Fig. 7—An example pack-off case where the stuck pipe risk detection software was run on historical data. Warnings were
raised by the tool ~30 minutes before the pipe got stuck. A long jarring period followed this, with many hours of NPT.

Another example case, from live-testing the software on a PETRONAS well operation (back-reaming
out of hole), is shown Fig. 8 (previously shown in [Meor Hashim 2021 (2)], Fig. 33, p.22), a screenshot
from the real-time viewer application used for visualizing the software's output. An earlier version of the
ECD estimation ML model was used in this case. Curves showing the relevant surface parameters, as well
as model predictions and the downhole ECD measurements are annotated for ease of viewing. Here, an
increasing trend in ECD was forecasted by the ML software, which was then compared to an increased ECD
measured by the downhole tools. The communication protocol was initiated, and observation was conveyed
to the drilling supervisor at the rig site. The monitoring specialist highlighted the increasing ECD trends,
as well as a potentially low flow rate used for back-reaming. An increased flow rate was recommended,
as well as to spend additional time circulating before entering the build section (avalanche zone), and to
reduce the back-ream pulling speed to allow cuttings to be removed from the vicinity of the bottom-hole
IADC/SPE-208675-MS 11

assembly. The higher recommended flow rate was implemented in the last two (2) stands, as can be seen
in the screenshot; no pack-off occurred following this.

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
Fig. 8—Example case from live-usage of the software with PETRONAS, visualized in a real-time viewer application. Relevant
variables are displayed as time-based curves, and annotated. Here, increasing trends in predicted ECD were observed to
coincide with increases in measured downhole ECD. This was raised by the monitoring specialists to the drillers, who were
recommended to take mitigating actions. This figure is adapted from Figure 33 in [Hashim 2021-2], IPTC-21199-MS, p.22.

It should be noted that not all hole cleaning problems can be forewarned; some causes of pack-offs, such
as collapse of fractured formations, can occur suddenly and are thus highly unlikely to be predictable. Based
on this, system described in this work is better suited to identifying hole cleaning risk symptoms that build
up more gradually, rather than short-timescale indicators; these are better detected using real-time reactive
warning systems, for example monitoring standpipe pressure spikes with respect ot mud flow rates, rather
than predictive approaches.
It is instructive to consider the statistics relating to stuck pipe incidents before and after adoption of
the stuck pipe detection software into PETRONAS operations, in May 2020. Between 2017-2019, ten
(10) stuck pipe incidents were reported from 110 wells drilled, and between 2014-2016, 46 incidents
were reported from 113 wells [Meor Hashim 2020]. Note that real time dynamic drilling solutions were
implemented in 2016, after which stuck pipe incidents were greatly reduced [Meor Hashim 2021 (2)], hence
these time periods are considered separately. Assuming ~50% of these were hole cleaning-related based
on Liang's analysis [Liang 2017], this corresponds to an occurrence rate of ~4.5 incidents per 100 wells
drilled between 2017-2019, and a rate of ~20 incidents per 100 wells for 2014-2016. Since adoption of
the ML software, there has been one stuck pipe incident related to hole cleaning problems, from 38 wells
drilled and monitoring specialists using the software; this corresponds to an occurrence rate of 2.6 incidents
per 100 wells. Although the sample size (number of wells) is smaller for May 2020 onwards, the reduced
hole cleaning-related stuck pipe occurrence rate, particularly compared to the already improved rate from
2017-2019, supports the hypothesis that the stuck-pipe detection software provides operational value and
complements other solutions in use by PETRONAS.

Conclusions
The Machine Learning approach described in this work demonstrates that estimates for downhole ECD
obtained from statistical models can be competitive with theoretical calculations, but with much less effort
than required for setup and configuration of hydraulics models. The potential for generalization to wells that
12 IADC/SPE-208675-MS

the model has not previously been exposed to has also been demonstrated. As only surface measurements
are used as inputs, the ML approach also avoids the operational costs of downhole tools or reliance on
measurements which are not dependably available in real-time from the rig.
While these results are promising, they are not yet at the point to suggest downhole sensors could be

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
discontinued from routine usage. However, this work could be used to provide a higher frequency real-time
ECD estimate to complement the more irregular and infrequent downhole measurements. Furthermore, the
ML models could also be used to power an ECD optimization approach similar to that proposed by Alkinani
et al. [Alkinani 2019], based on varying the input parameters and monitoring the resulting ECD estimates.
In addition to their standalone usage, ECD estimates obtained from statistical models have been
successfully applied to real-time monitoring of hole cleaning risks as a key component of a software
system intended to detect stuck pipe risks and provide early warnings. This system has been running in
live operations for over a year, and has provided valuable insights and decision support to the users in the
real-time time operations centre. The occurrence rate of hole cleaning-related stuck pipe incidents was also
observed to be lower since adoption of the software.

Acknowledgements
We thank our collaborators in the PETRONAS Carigali Wells team for providing historical data and enabling
the software to be tested on their operations. The Faazmiar Technologies team were instrumental in testing
the software for predicting stuck pipe risk from hole cleaning on live rig operations from the perspective
of real-time monitoring.

References
Abdelgawad, K. Z., Elzenary, M., Elkatatny, S. et al. 2019. New approach to evaluate the equivalent circulating density
(ECD) using artificial intelligence techniques, J Petrol Explor Prod Technol 9, 1569–1578. https://doi.org/10.1007/
s13202-018-0572-y
Ahmed, R., Enfis, M., Kheir, H. et al. 2010. The Effect of Drillstring Rotation on Equivalent Circulation Density: Modeling
and Analysis of Field Measurements. Proceedings - SPE Annual Technical Conference and Exhibition. 7. https://
doi.org/10.2118/135587-MS
Alkinani, H. H., Al-Hameedi, A. T., Dunn-Norman, S., Al-Alwani, M.A., Mutar, R.A., and Al-Bazzaz, W.H. 2019. "Data-
Driven Neural Network Model to Predict Equivalent Circulation Density ECD." Presented at the SPE Gas & Oil
Technology Showcase and Conference, Dubai, UAE, October 2019. doi: https://doi.org/10.2118/198612-MS
Al Saihati, A. et al. 2021 (1). A Statistical Machine Learning Model to Predict Equivalent Circulation Density ECD while
Drilling, Based on Principal Components Analysis PCA. 10.2118/202101-MS.
Al Saihati, A., Elkatatny, S. and Abdulraheem, A. 2021 (2). Real-Time Prediction of Equivalent Circulation Density for
Horizontal Wells Using Intelligent Machines, ACS Omega 2021 6 (1), 934–942, DOI: 10.1021/acsomega.0c05570
Bourgoyne Jr, A.T., Millheim, K.K., Chenevert, M.E. and Young, F.S.Jr. 1991. Applied Drilling Engineering, Chapter 4:
Drilling Hydraulics, Section 4.10, p. 137. SPE Textbook Series Vol. 2, ISBN: 978-1-55563-001-0
Chen, D., Hu, F., Nian, G., Yang, T. 2020. Deep Residual Learning for Nonlinear Regression. Entropy, 22, 193. https://
doi.org/10.3390/e22020193
Gamal, H., Abdelaal, A., and Elkatatny, S. 2021. Machine Learning Models for Equivalent Circulating Density Prediction
from Drilling Data, ACS Omega 2021 6 (41), 27430–27442, DOI: 10.1021/acsomega.1c04363
Goodfellow, I., Bengio, Y., and Courville, A. 2016. Deep Learning, MIT Press, http://www.deeplearningbook.org
He, K., Zhang, X., Ren, S. and Sun, J. 2016 Deep Residual Learning for Image Recognition, Presented at the IEEE
Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, DOI: 10.1109/CVPR.2016.90.
Hemphill, T., Ravi, K., Bern, P. A., and Rojas, J. 2008. A Simplified Method for Prediction of ECD Increase with Drillpipe
Rotation. Presented at the SPE Annual Technical Conference and Exhibition, Denver, Colorado, USA, September
2008. DOI: https://doi.org/10.2118/115378-MS
Hochreiter, S. 1991. Untersuchungen zu dynamischen neuronalen Netzen (Diplom thesis). Institut f. Informatik,
Technische Univ. Munich.
Hornik, K., Stinchcombe, M., White, H. 1989. Multilayer feedforward networks are universal approximators, Neural
Networks, Volume 2, Issue 5, Pages 359–366, ISSN 0893-6080, https://doi.org/10.1016/0893-6080(89)90020-8.
IADC/SPE-208675-MS 13

Hornik, K. 1991. Approximation capabilities of multilayer feedforward networks, Neural Networks, Volume 4, Issue 2,
Pages 251–257, ISSN 0893-6080, https://doi.org/10.1016/0893-6080(91)90009-T.
Ioffe, S.; Szegedy, C. 2015. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate
Shift, Presented at the 32nd International Conference on Machine Learning, in Proceedings of Machine Learning
Research, 37: 448–456. Available from https://proceedings.mlr.press/v37/ioffe15.html

Downloaded from http://onepetro.org/SPEDC/proceedings-pdf/22DC/2-22DC/D022S008R001/2649269/spe-208675-ms.pdf/1 by NED University of Engrg & Tech-Karachi, Maliha Waseem on 25 December 2023
Kingma, D. P., Ba, J. 2015. Adam: A Method for Stochastic Optimization., Presented at the 3rd International Conference
on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, http://arxiv.org/abs/1412.6980
Kratsios, A., Bilokopytov, E. 2020 Non-Euclidean Universal Approximation, Presented at the 33rd Conference on Neural
Information Processing Systems (NeurIPS 2020), https://arxiv.org/abs/2006.02341v3
Kulkarni, S. D., Singh, J., Pereira, V. L., and Porter, A. 2017. Real-Time ECD Management by Accounting for
Effects of Drillpipe Rotation and Eccentricity in the Wellbore. Presented at the AADE National Technical
Conference and Exhibition, Houston, Texas, April 11-12, 2017. AADE-17-NTCE-097, https://www.aade.org/
application/files/4915/7132/1742/AADE-17-NTCE-097-Kulkarni.pdf
Liang, L. C. 2017. Analysis of Stuck Pipe Incidents in PETRONAS Carigali Operations in Malaysia. Perak. Universiti
Teknologi PETRONAS.
Lu, Z., Pu, H., Wang, F. et al. 2017. The Expressive Power of Neural Networks: A View from the Width. Presented
at the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. https://
proceedings.neurips.cc/paper/2017/file/32cbf687880eb1674a07bf717761dd3a-Paper.pdf
Meor Hashim, M. M. H. 2020. Wells Augmented Stuck Pipe (WASP) Indicator - Value Creation and Scalability of
Artificial Neural Network for Real Time Drilling Operations to Identify Stuck Pipe Symptoms. Perak. Universiti
Teknologi PETRONAS.
Meor Hashim, M. M. H. et al. 2021 (1). Performance Improvement of Wells Augmented Stuck Pipe Indicator via Model
Evaluations. Presented at the IPTC International Petroleum Technology Conference 2021. DOI: 10.2523/IPTC-21455-
MS
Meor Hashim, M. M. H. et al., 2021 (2). Case Studies for the Successful Deployment of Wells Augmented Stuck Pipe
Indicator in Wells Real Time Centre. Presented at the IPTC International Petroleum Technology Conference 2021.
DOI: 10.2523/IPTC-21199-MS
Meor Hashim, M. M. H. et al. 2021 (3). Utilizing Artificial Neural Network for Real-Time Prediction of Differential
Sticking Symptoms. Presented at the IPTC International Petroleum Technology Conference 2021. DOI: 10.2523/
IPTC-21221-MS
Prechelt, L. 2012. Early Stopping — But When?, Neural Networks: Tricks of the Trade: Second Edition, p.53–67. Springer
Berlin Heidelberg. https://doi.org/10.1007/978-3-642-35289-85
Rommeveit, R., Bjorkevoll, K. S. 1997. Temperature and Pressure Effects on Drilling Fluid Rheology and ECD in Very
Deep Wells. Presented at the 1997 SPE/IADC Middle East Drilling Technology Conference, Manama, Bahrain; Society
of Petroleum Engineers, November, 1997. SPE/IADC 39282. pp 1–10.
Skalle, P., 2011, Drilling Fluid Engineering, Section 7, Pål Skalle & Ventus Publishing ApS, ISBN 978-87-7681-929-3
Veit, A. Wilber, M. and Belongie, S. 2016. Residual networks behave like ensembles of relatively shallow networks.
Presented at the 30th International Conference on Neural Information Processing Systems (NIPS'16). Curran
Associates Inc., Red Hook, NY, USA, 550–558.
Whittaker, A. 1985. Theory and Application ofDrilling Fluid Hydraulics, Chapter 2, ISBN-13: 978-94-009-5303-1, DOl:
10.1007/978-94009-5303-1

You might also like