You are on page 1of 15

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/343723428

Use of Machine Learning and Data Analytics to Detect Downhole


Abnormalities While Drilling Horizontal Wells, With Real Case Study

Article in Journal of Energy Resources Technology, Transactions of the ASME · April 2021
DOI: 10.1115/1.4048070

CITATIONS READS

11 368

4 authors:

Ahmed Saihati Salaheldin Elkatatny


King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals
15 PUBLICATIONS 25 CITATIONS 324 PUBLICATIONS 2,858 CITATIONS

SEE PROFILE SEE PROFILE

Ahmed Abdulhamid Mahmoud Abdulazeez Abdulraheem


King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals
46 PUBLICATIONS 536 CITATIONS 218 PUBLICATIONS 2,428 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

CIPR 2333: Drilling Geological Environment Description For Pre-Khuff Formation In Key Blocks In Saudi Arabia. View project

Improving the Oil-well cement integrity using the Polypropylene Fiber View project

All content following this page was uploaded by Ahmed Saihati on 23 February 2021.

The user has requested enhancement of the downloaded file.


Use of Machine Learning
and Data Analytics to Detect
Downhole Abnormalities While
Drilling Horizontal Wells,
Ahmed Alsaihati
Department of Petroleum Engineering,
With Real Case Study
King Fahd University of Petroleum & Minerals, The standard torque and drag (T&D) modeling programs have been extensively used in the
Dhahran 31261, Saudi Arabia oil and gas industry to predict and monitor the T&D forces. In the majority of cases, there
e-mail: g200780390@kfupm.edu.sa has been variability in the accuracy between the pre-calculated (based on a T&D model)
and actual T&D values, because of the dependence of the model’s predictability on
Salaheldin Elkatatny1 guessed inputs (matching parameters) which may not be correctly predicted. Therefore,
Associate Professor to have a reliable model, program users must alter the model inputs and mainly the friction
Department of Petroleum Engineering, coefficient to match the actual T&D. This, however, can conceal downhole conditions such
King Fahd University of Petroleum & Minerals, as cutting beds, tight holes, and sticking tendencies. The objective of this study is to develop
Dhahran 31261, Saudi Arabia an intelligent machine to predict the continuous profile of the surface drilling torque to
e-mail: elkatatny@kfupm.edu.sa enable the detection of operational problems ahead of time. This paper details the develop-
ment and evaluation of an intelligent system that could promote safer operation and extend
Ahmed Abdulhamid the response time limit to prevent undesired events. Actual field data of Well-1, starting from
Mahmoud the time of drilling a 5-7/8-in. horizontal section until 1 day prior to the stuck pipe incident,
Department of Petroleum Engineering, were used to train and test three models: random forest, artificial neural network, and func-
King Fahd University of Petroleum & Minerals, tional network, with an 80/20 training-to-testing data ratio, to predict the surface drilling
Dhahran 31261, Saudi Arabia torque. The independent variables for the model are the drilling surface parameters,
e-mail: g201205160@kfupm.edu.sa namely: flow rate (Q), hook load (HL), rate of penetration (ROP), rotary speed (RS), stand-
pipe pressure (SPP), and weight-on-bit (WOB). The prediction capability of the models was
evaluated in terms of correlation of coefficient (R) and average absolute error percentage
Abdulazeez Abdulraheem (AAPE). The model with the highest R and lowest AAPE was selected to continue with the
Associate Professor
analysis to detect downhole abnormalities. The best-developed model was used to predict
Department of Petroleum Engineering,
the surface drilling torque on the last day leading up to the incident in Well-1, which rep-
King Fahd University of Petroleum & Minerals,
resents the normal and healthy trend. Then, the model was coupled with a multivariate
Dhahran 31261, Saudi Arabia
metric distance called “Mahalanobis” to be used as a classification tool to measure how
e-mail: aazeez@kfupm.edu.sa
close an actual observation is to the predictive normal and healthy trend. Based on a
pre-determined threshold, each actual observation was labeled “NORMAL” or
“ANOMAL.” Well-2 with a stuck pipe incident was used to assess the capability of the
developed system in detecting downhole abnormalities. The results showed that in Well-
1, where a stuck pipe incident was reported, a continuous alarm was detected by the devel-
oped system 9 h before the drilling crew observed any abnormality, while the alarm was
detected 7 h prior to any observation by the crew in Well-2. The developed intelligent
system could help the drilling crew to detect downhole abnormalities in real-time, react,
and take corrective action to mitigate the problem promptly. [DOI: 10.1115/1.4048070]

Keywords: torque and drag, horizontal drilling, random forest, Mahalanobis distance,
petroleum engineering, petroleum wells-drilling/production/construction

1 Introduction minimize the hidden lost time. A common strategy used to


monitor T&D is to compare actual T&D values with pre-calculated
The surface torque is the force required to rotate the entire drill
T&D values, estimated with a mathematical model only at the
string and the drilling bit at the bottom of the hole. This force is
survey station depths or every pipe connection, ±100 ft [2].
used to overcome the rotational friction against the wellbore, the
The fundamental assumption of the mathematical T&D model is
viscous force between the drill string and drilling fluid as well as
that both drag and torque are caused by sliding friction forces as a
the drilling bit torque [1]. A real-time torque and drag (T&D) mon-
result of the contact between the drill string and the wellbore. There
itoring system has been influential in the oil and gas industry
are two major theoretical and conceptual factors affecting the
because it enables the user to analyze the available data at the rig
sliding friction forces; these are as follows: (i) the normal contact
site and convert it into valuable information. This information is
force, which is contributed by the gravity and the tension acting
subsequently interpreted to optimize the drilling efficiency and
through the curvature of the wellbore and (ii) the friction coefficient
[3]. The value of the friction coefficient is highly dependent on the
1
Corresponding author. contacting material and the degree of lubricity at various depths
Contributed by the Petroleum Division of ASME for publication in the JOURNAL OF
ENERGY RESOURCES TECHNOLOGY. Manuscript received February 2, 2020; final
along the wellbore [2]. Furthermore, it is affected by other factors
manuscript received July 10, 2020; published online August 28, 2020. Assoc. such as cutting beds, wiper trips, changing mud types, and mud
Editor: Daoyong (Tony) Yang. additives [4].

Journal of Energy Resources Technology Copyright © 2020 by ASME APRIL 2021, Vol. 143 / 043201-1
A challenging problem that arises in this domain is the use of energy mass and conservation of momentum or empirical. Although
single data entry of the friction coefficient when the well profile mathematical models can simulate real-life situations to forecast
is designed using modern T&D software packages, regardless of future behaviors, they do not provide effective solutions under
the type of formation being drilled. In addition to that, the friction some conditions [15]. On the other hand, empirical models,
coefficient used to calculate T&D values in the planning phase which are based on experiments and observations, are easy to estab-
needs to be calibrated during the actual drilling phase [2,5–7]. To lish, but might not be accurate and cannot be generalized
do that, drilling surface loads including pick-up weight, slack-off [14,16,17]. Conventional models, which entail several assumptions
weight, and surface torque reading are used as data inputs for the and simplifications, require extensive procedures based on trial and
software. Then, the software will perform backward calculations error until desired outcomes are obtained. Furthermore, they are
to find the friction coefficient, which will be different for each drill- unable to handle complex relations and account for noisy data
ing surface load [2,6,8]. Therefore, the friction coefficient has to be [17]. Data mining, which plays a crucial role in data-driven
considered carefully not only to lend credibility to the model and models, can extract hidden predictive insights from large and
predict T&D confidently but also so as not to obscure downhole complex datasets. It integrates ML and pattern recognition algo-
problems that might cause an unhealthy drilling environment. rithms with statistical and visualization tools to find anomalies
The first T&D model was developed by Johancsik et al. [2]. This and correlations within large datasets.
model was put in a differential equation standard form by Sheppard Data-driven models incorporate two methods: (i) computational
et al. [9]. It is the most common model used for drill string analysis, intelligence which involves artificial neural networks (ANN),
and it has been adopted broadly for well planning [10]. Vos and fuzzy rule-based systems (ANFIS), genetic algorithms and (ii)
Reiber [4] combined real-time friction coefficients with equivalent ML models that are based on the theoretical foundation applied
circulating density (ECD) and vibration to gain insights about by computational intelligence [18]. These two methods are power-
downhole conditions including the hole cleaning condition, drilling ful tools that boost the capability to detect and uncover hidden infor-
efficiency, and wellbore stability. Rae et al. [10] suggested design- mation and enable operational improvement in the oil and gas
ing a well profile using a T&D simulator to calculate surface drilling industry.
torque and hock load and compared it with actual field data. If there The AI and ML have been widely used in the drilling industry to
is inconsistency in the results, it implies that either the model is not generate insights that would help to predict, detect, and describe
reliable or the hole condition has deteriorated. Mason and Chen [11] trends. Hedge et al. [19] used logistic regression, support vector
emphasized that the effect of drag force as a result of pipe move- machine (SVM), RF, and Gaussian mixture to classify the severity
ment in the opposite direction of drilling fluid flow and wellbore tor- of the stick-slip index (SSI) during drilling as low or high. The data
tuosity should be considered in the soft string model for better consisted of surface and downhole drilling parameters, and vibra-
accuracy of T&D estimation. Mirhaj et al. [8] found from a field tional measurements obtained from a measurement-while-drilling
case study that the friction coefficients resulting from reverse calcu- (MWD) sensor. In the study, a threshold of one was used to separate
lations of hock load during drilling and while tripping activities are the dataset into two classes, low or high. If SSI is greater than 1, the
0.05 and 0.2, respectively. Mitchell et al. [12] developed a new data points are classified as high, and if SSI is less than 1, the data
model that adds bending moment and shear forces to the pre- points are classified as low. The results showed that the RF outper-
existing conventional T&D model. The new model also determines formed other models with an average accuracy of 90%.
the contact forces between the drill string and wellbore more accu- Gurina et al. [20] used an analogs search approach to detect acci-
rately for a complex well path, which results in a better friction dents during directional drilling. Two types of data were used in the
coefficient. study: (i) 94 operational accidents obtained from old wells includ-
It is clear from the literature that the friction coefficient needs to ing stuck pipe, drill string wash-out, breaks of drilling, mud loss,
be iteratively altered in the model using field T&D data to increase shale collars, and fluid show and (ii) measurements while drilling
model reliability. Moreover, the friction coefficient needed to match data such as depth of the drill bit, torque, WOB, SPP, RS, Q, gas
the torque results is different from the coefficient needed to match content, and weight on the hook. The database values of mean, var-
the drag results; it can also differ from trip to trip [13]. Thus, vigi- iance, slope angle, deviation, and relative coefficient of the mea-
lance, caution, and domain knowledge are essential when using the surements while drilling data were calculated and used as input
T&D model. parameters for the gradient boosting (GB) classification model.
One way of avoiding the above problems is to use artificial intel- The Precision-Recall curve was used to check the model quality
ligence (AI) and machine learning (ML) models, which could be since the problem was an unbalanced classification problem. The
built based on drilling surface parameters only. This viable solution model had a Precision-Recall curve of 0.6086, which indicates an
has been proposed to eliminate the need to alter the friction coeffi- adequate model. Abbas et al. [21] developed an ANN model to
cient and to assist the crew to have real-time intuition about T&D. predict ROP in highly angled wells using depth, WOB, RS, bit
This paper will introduce an intelligent system that analyses surface type, bit working hours, torque, Q, SPP, total flow area (TFA),
drilling parameters to identify possible downhole issues by provid- azimuth, inclination, mud weight (MW), mud fluid rheology (e.g.,
ing an alarm based on a pre-defined threshold. The proposed alarm funnel viscosity, plastic viscosity, yield point), rock compressive
system could promote safer operations while drilling extended hor- strength, vertical stress, maximum horizontal stress, and minimum
izontal wells and improve the response time limit for the drilling horizontal stress as inputs. The highest accuracy of the coefficient
crew to prevent possible stuck pipe incidents. of determination (R 2 = 0.97) was obtained using three layers and
The types of models used in the oil and gas industry are discussed 30 neurons with tan-sigmoid (TANSIG) transfer function. Elkatatny
in Sec. 2, which is then followed by a discussion of different AI and [22] developed ANN, ANFIS, and SVM models to obtain a contin-
ML models, random forest (RF), artificial neural network (ANN), uous profile of the static Poisson’s ratio for a carbonate reservoir.
and functional network (FN). Sections 3 and 4 describe the datasets 610 core samples and log data (bulk density, compressional time,
and the experimental design methodology for developing the intel- shear time) were used to train and test the models. The ANN
ligent system. Section 5 presents the results of the study and a achieved the best results compared to the ANFIS and SVM. The
detailed discussion, while conclusions are presented in Sec. 6. developed model can be used to estimate the Poisson’s ratio
without a need for coring and extensive lab work.
Abdelgawad et al. [23] developed an ANN to estimate the rheo-
logical properties of bentonite spud mud. The input parameters of
2 Data-Driven Models the model were MW, marsh funnel viscosity, and solid percent.
Models used in the oil and gas industry can be classified into The ANN model was combined with the self-adaptive differential
three categories: (i) mathematical, (ii) physical, and (iii) empirical evolution algorithm (SaDE) to optimize the developed ANN
[14]. Mathematical models are based on first principles such as model. The model predicted the rheological properties with an

043201-2 / Vol. 143, APRIL 2021 Transactions of the ASME


AAPE of less than 5% and R more than 95%. Ahmed et al. [24] pre- based on a collection of interconnected artificial neurons that
dicted the ROP using an ANFIS in shale formation across two-hole mimics the performance characteristics of biological neural net-
sizes, 8-3/8-in. and 5-7/8-in., with R of 0.934 and AAPE of works [21,33]. For an ANN to accomplish the task of manner rec-
16.946%. The input parameters were WOB, SPP, RS, Q, torque, ognition, the interconnected units have to be organized in a manner
MW, yield point, plastic viscosity, funnel viscosity, and solids known as topology [34]. Usually, the processing units are arranged
content %. Elkatatny et al. [25] used actual field data to build an in a multilayered topology that consists of an input layer, one or
ANN to predict the top-depth of four geological formations in real- more hidden layers, and an output layer. Every single unit is
time while drilling. The best results were obtained when scaled con- made up of four essential components, which are as follows:
jugate gradient backpropagation (TRAINSCG) with 20 neurons input data, weights, a transfer function and output values. The
was used. The input parameters used in the study to develop the input corresponding to each neuron is multiplied by the weight
model were the mechanical drilling parameters including ROP, Q, (W1j, W2j, W3j, W4j, …, Wnj). The summing unit is then fed into a
RS, SPP, torque, and WOB. Abdelgawad et al. [26] used SPP, transfer function (e.g., tan-sigmoid “TANSIG,” log-sigmoid
ROP, and MW as input parameters to predict the ECD using an “LOGSIG”), which is applied to the weighted inputs of a neuron
ANN and ANFIS in an 8-1/2-in. vertical hole section. The to produce the final output [21].
models predicted the ECD with R of 0.99 and AAPE of 0.22%. Backpropagation (BP) is a multiple cycle where a training algo-
Gowida et al. [27] developed three models, namely, ANFIS, FN, rithm (e.g., Bayesian regularization backpropagation “TRAINBR,”
and SVM to estimate the formation of bulk density (RHOB) while Levenberg–Marquardt backpropagation “TRAINLM”) randomly
drilling. The input parameters were RS, ROP, torque, WOB, and assigns weights and bias, which are then used to transform the
Q. The results showed that the ANFIS outperformed the FN and input data through each layer until the output is calculated. The
SVM models. The ANFIS predicted the RHOB with R of 0.93 error signal of each output is then assessed by comparing an
and AAPE of 0.81%. Mahmoud et al. [28] developed a hole clean- actual output with the calculated one [21].
ing factor (HCF) model, which incorporates the effect of the drilling
fluid rheology, MW, and Q, the hole size, drill pipe size, hole incli-
nation, and ROP, to predict the hole cleaning condition. The model 2.3 Functional Network. FN is a generalization of an ANN,
was applied on an actual well in North Africa at different depths that which can be accomplished by using multiple arguments and learn-
ranged from 33 to 12,854 ft. The crew members had a stuck pipe able functions, i.e., in an FN, the activation functions associated
incident due to improper hole cleaning at the same depth as pre- with neurons are not fixed but learned from data [35]. In an
dicted by the HCF model. ANN, the weights associated with the neurons must be learned,
while they are suppressed in a functional network [36]. Another
characteristic of the FN is that the specification of the initial topol-
2.1 Random Forest Technique. Random Forest (RF) is an ogy could be based on the features of the problem. Therefore,
ensemble learning model that could be used for classification and knowledge about the problem can help in developing the network
regression problems [29]. The RF combines hundreds or thousands structure.
of decision trees and trains each one on a slightly different set of
observations. Splitting nodes of each tree consider only a limited
number of input variables, often determined using cross-validation, 2.4 Mahalanobis Distance. Mahalanobis distance is a multi-
in a process called bootstrapping, to effectively reduce the variance variate metric distance that measures the distance from a point
and improve the algorithm predictability [30]. The final prediction (vector) and the centroid of a distribution. Mahalanobis distance
of the RF is made by averaging the predictions of each tree; this has applications in multivariate anomaly detection and classifica-
process is called aggregation. When a bootstrap sample is taken tion. It takes into consideration the correlations between the vari-
from the dataset, some observations are not included. These ables within a dataset [37]. Mahalanobis distance is calculated
samples or observations are called out-of-bag data and are beneficial using Eq. (1) [38]:
for estimating generalization error and independent variables 
importance—a feature ranking—which is useful for model infer- )T S−1 (x − μ
DM (x) = (x − μ ) (1)
ence [29,31]. The RF outperforms a single decision tree because
of its ability to limit overfitting without substantially increasing where DM is the Mahalanobis distance (unitless), x is a vector of the
the margin of error [29]. Figure 1 shows a visualization of how observation (row in a dataset), μ
 is the vector of means (mean of
an RF works. each column), S−1 is the inverse of the covariance matrix. An
example of how to calculate a Mahalanobis distance is given in
Appendix B.
2.2 Artificial Neural Network. ANNs are the most widely
used AI technique. An ANN is an information processing system
3 Data Description
It is required to drill a 5–7/8-in. horizontal hole section across a
carbonate gas reservoir of 5000 ft of a reservoir contact. Such wells
are prone to stuck pipe incidents because of the high torque and drag
and inability to transfer sufficient WOB, which impairs the ROP
performance and leads to ineffective hole cleaning.
Well-1 was a deep, high angle well. The 5–7/8-in. hole was hor-
izontally drilled at 15,060 ft with an angle of 90 deg, below
12,563 ft of 7-in. casing. The hole kicked off at 10,613 ft to a
continuous-build well profile with an angle of 78 deg at 7-in.
casing. At 15,060 ft, it was decided to perform a short trip to
check for the hole condition (on Dec. 9, 2015 at 07:17:00 AM).
Therefore, the drilling crew circulated hole clean for some time
while reciprocating the drill string. When the drilling crew started
to pull out of the hole, at a depth of 14,935 ft (on Dec. 9, 2015 at
10:20:00 AM), the drill string got stuck.
Well-2 was another deep, high angel well. The 5-7/8-in. hole was
Fig. 1 Random Forest visualization [32] horizontally drilled at 15,254 ft with an angle of 88.5 deg, below

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-3


12,280 ft of 7-in. casing. The hole kicked off at 10,350 ft to a predictor variables are useful for variable selection and for interpret-
continuous-build well profile with an angle of 50 deg at 7-in. ing the fitted model [28]. Figure 2 compares the relative importance
casing. At 15,060 ft, it was decided to perform a short trip to of the input parameters used to train the models. Figure 2 shows that
check for the hole condition (on Aug. 2, 2015 at 12:05:00 PM). SPP and GPM have good correlation coefficients with the surface
Therefore, the drilling crew circulated hole-clean for some time torque, i.e., 0.81 and 0.70, respectively. RS, ROP, and HL have
until the mud shale-shakers were clean. When the drilling crew moderate correlation coefficients of 0.57, 0.38, and 0.36. Although
started to pull out of the hole, at a depth of 15,157 ft (on Aug 2, WOB has a low correlation of 0.10, it was considered in this study
2015 at 16:10:00 PM), an over-pull of 15,000 klbf and a restricted because it has a direct effect on the torque in practical life. Increas-
rotation were observed, which was an indication of hole pack-off. ing WOB tends to increase the torque generated by the drill bit and,
The drill string got stuck and could not be moved or rotated. therefore, leads to an increase of the surface torque.

4 Methods 4.4 Building the Models. Python library’s Scikit-Learn® was


4.1 Data Collection. The data required for this study was col- used to build the RF model. The model hyper-parameters including
lected and maintained from surface real-time transmitter sensors, the maximum depth of the tree “max_depth,” the maximum features
which are located in the rig site at different positions. The analyzed to be considered when splitting the node in each tree “max_fea-
data include depth, flow rate (GPM), hock load (HL), ROP, rotation tures,” and the number of trees in the forest “n_estimators” were
speed (RS), standpipe pressure (SPP), and surface drilling torque. tuned using a built-in algorithm GridSearchCV. Different values
Initially, the data consisted of all drilling operations performed of max_depth from 3 to 40 and two types of max_features (i.e.,
while drilling the 5–7/8-in. hole section including the drilling of sqrt, log2) were tried while varying the n_estimator from 3 to 200.
®
new footage, recording surveys: making connections, downlinking MATLAB code was used to build the ANN model. The interaction
directional tools, tripping, and running completion were collected. between different training functions, such as TRAINBR, and
Thus, drilling data were customized to have its best suited to the TRAINLM, with the two most commonly used transfer functions,
analysis by removing all unnecessary operation activities. i.e., log-sigmoid (LOGSIG) and tan-sigmoid (TANSIG) were eval-
uated in terms of minimizing the error function. Additionally, the
optimal number of neurons in the hidden layer for each training
4.2 Data Splitting. Actual data of Well-1, starting from the function with different transfer functions was determined by
time of drilling the 5–7/8-in. horizontal section until 1 day prior increasing the number from 1 to 30. Likewise, MATLAB® code was
to the stuck pipe incident, were used to build the models to used to build the FN model. Two methods, functional network
predict the surface drilling torque. There are six parameters used forward-backward method (FNFBM) and functional network
as inputs to build the models: GPM, HL, ROP, RP, SPP, and exhaustive-backward method (FNEBM) were studied with a
WOB. Eighty percent of the data (7186 data points) was randomly linear and nonlinear relationship.
selected to train the models, while 20% of the data (1797 data
points) was used to test the model. Eighty percent of the data was
selected for training to ensure that the model captures most of the
formation torque variation. Tables 1 and 2 summarize the statistical 4.5 Models Assessment. The performance of the developed
parameters of the training data and testing data, respectively. models was evaluated using two metrics, AAPE and R. The
AAPE and R can be calculated as follows:
4.3 Relative Importance of Input Variables. The importance
of feature engineering selection is to use domain knowledge and
human insight to ensure that the independent variables (predictors) n |Yi − Ŷ i |
1 × 100
have relevant indicators with the dependent variable (target vari- Yi
AAPE = (2)
able) for the prediction task. Measures of the importance of the n

Table 1 Statistical parameter for the training data (7186 data points)

Statistical parameter Q (gal/min) HL (klbf) ROP (ft/h) RS (RPM) SPP (psi) WOB (klbf) Torque (kft.lbf)

Minimum 243.0 248.4 3.7 80.2 1428.8 5.0 4.5


Maximum 297.0 331.3 58.7 160.0 3047.0 34.7 9.1
Range 54.0 82.9 55.0 79.8 1618.2 29.7 4.6
Mean 256.0 287.5 23.4 135.0 2513.7 12.5 6.9
Standard deviation 6.0 6.2 8.2 22.5 258.8 4.7 1.0
Skewness 0.027 −0.180 0.451 −1.203 −0.112 0.877 0.032
Kurtosis 1.707 4.267 3.741 3.018 2.080 4.279 1.964

Table 2 Statistical parameters for the testing data (1797 data points)

Statistical parameter Q (gal/min) HL (klbf) ROP (ft/h) RS (RPM) SPP (psi) WOB (klbf) Torque (kft.lbf)

Minimum 243.0 254.7 3.7 80.2 1542.0 5.0 4.6


Maximum 270.6 311.3 57.5 159.0 3047.0 33.4 9.1
Range 292.0 56.6 53.8 78.8 1505.0 28.3 4.5
Mean 256.1 287.5 23.5 134.6 2519.5 12.4 6.9
Standard deviation 5.9 5.99 8.03 22.8 261.0 4.5 1.0
Skewness −0.082 −0.165 0.268 −1.154 −0.194 0.853 −0.041
Kurtosis 1.435 3.972 3.142 2.897 2.209 4.179 2.022

043201-4 / Vol. 143, APRIL 2021 Transactions of the ASME


Table 4 Statistical parameters of the input parameters for the
last day in Well-2 (435 data points)

Statistical Q HL ROP RS SPP WOB


parameter (gal/min) (klbf) (ft/h) (RPM) (psi) (klbf)

Minimum 253.2 266.4 3.2 85.4 2730.6 5.0


Maximum 258.8 284.7 58.7 96.7 3045.0 20.1
Range 5.6 18.2 55.5 11.3 314.4 15.1
Mean 255.9 278.3 34.0 91.7 2914.9 9.1
Standard 1.6 3.5 7.1 2.5 78.9 3.6
deviation
Skewness 0.072 −0.461 −0.446 −1.046 0.437 0.438
Kurtosis −1.600 −0.328 2.063 −0.406 −0.848 −0.658

Fig. 2 The relative importance of the input variables


decide whether to flag an observation as an anomaly or normal.
Therefore, Mahalanobis distances of all observations of the
Table 3 Statistical parameters of the input parameters for the modeled surface drilling torque (normal and healthy trend) of the
last day in Well-1 (1227 data points) last day leading up to the incident in Well-1 were calculated to
decide on a threshold. Then, the Mahalanobis distances of the
Statistical Q HL ROP RS SPP WOB
parameter (gal/min) (klbf) (ft/h) (RPM) (psi) (klbf) actual drilling surface torque of the last day leading up to the inci-
dent in Well-1were calculated and compared to the pre-determined
Minimum 243.0 263.6 6.4 99.0 2012.4 5.2 threshold. Python library’s Scikit-Learn® code was used to calcu-
Maximum 273.0 311.4 48.5 160.0 3049.8 29.1 late the Mahalanobis distances. An actual observation is going to
Range 31.0 47.8 42.1 61.0 1037.4 23.9 be classified as “ANOMALY” if its associated Mahalanobis dis-
Mean 260.9 292.7 23.3 148.3 2942.0 12.3 tance is higher than the predetermined threshold, while it is going
Standard 2.4 4.2 7.3 11.5 124.8 3.6 to be classified as “NORMAL” if its Mahalanobis distance is less
deviation than the predetermined threshold.
Skewness −2.384 −0.870 0.476 −1.844 −3.739 0.483
Kurtosis 27.861 8.589 3.572 7.214 20.813 3.209
4.8 Validation of the Technique Using Well-2. Well-2 was
used to assess the callability of the developed intelligent system
in detecting downhole abnormalities on the last day leading up to
  
n( n1 Yi Ŷ i ) − ( n1 Yi )( n1 Ŷ i ) the incident in Well-2. The input parameters in Well-2 were
R = 
n 2  (3)
 n 2 n 2 checked to ensure they are in the same range of the dataset,
[n n1 Yi2 − 1 i Y ] [n Ŷ
1 i − 1 i ]
Ŷ which was used to train the RF model in Well-1. The statistical
parameters of the last day leading up to the incident are presented
where n is the number of samples in the dataset, Yi is the actual in Table 4.
output, and Ŷi is the predicted output.

4.6 The Last day Leading up to the Incident. The best- 5 Results and Discussion
developed model out of the three was used to predict the surface 5.1 Models Assessment. The RF model optimum parameters
drilling torque for the last day leading up to the incident in are presented in Table 5. The RF predicted the actual torque with
Well-1. The list of the statistical parameters of the last day
leading up to the incident is listed in Table 3. The compatibility Table 5 The optimum parameters of the RF model
of the input parameters for the last day leading up to the incident
in Well-1was checked to ensure they are in the same range as the Optimum parameters
dataset, which was used to train the best model.
max_features Log2
max_depth 23
4.7 Real-Time Alarm Detection. To perform real-time n_estimators 100
anomaly detection, a threshold value needs to be determined to

Fig. 3 Cross-plots of the actual torque versus predicted torque using RF for (a) training set and
(b) testing set

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-5


Table 6 The performance of the ANN model using different training functions with LOGSIG transfer function and one hidden layer

Training function No. Neurons AAPE_Training % R_Training AAPE_Testing % R_Testing

TRAINBR 21 4.35 0.92 4.57 0.91


TRAINLM 20 4.36 0.92 4.54 0.91

Table 7 The performance of the ANN model using different training functions with TANSIG transfer function and one hidden layer

Training function No. Neurons AAPE_Training % R_Training AAPE_Testing % R_Testing

TRAINBR 30 4.24 0.93 4.59 0.91


TRAINLM 23 4.37 0.92 4.63 0.91

Fig. 4 Cross-plots of the actual torque versus predicted torque using ANN for (a) training set and
(b) testing set

Table 8 The performance of the FN model with different methods and relationship types

FN Method Relationship type AAPE_Training % R_Training AAPE_Testing % R_Testing

FNFBM Nonlinear 5.21 0.89 5.29 0.88


Linear 6.33 0.85 6.43 0.84
FNEBM Nonlinear 6.01 0.86 6.03 0.85
Linear 6.33 0.85 6.43 0.84

AAPE of 1.46% and R of 0.99 in the training set, while AAPE and a transfer function, LOGSIG. Table 7 shows the performance of the
R were 3.98% and 0.93, respectively, in the testing set. Figures 3(a) ANN model with different training functions and their optimal
and 3(b) are cross-plots of the actual and predicted torque of the number of neurons when using a transfer function, TANSIG. The
training and testing sets, respectively. lowest AAPE in the testing set was the criterion to select the
Table 6 shows the performance of the ANN model with different optimum ANN model. The analysis shows that the ANN model,
training functions and their optimal number of neurons when using when using a transfer function, LOGSIG, with a training function,

Fig. 5 Cross-plots of the actual torque versus predicted torque using FN for (a) training set and
(b) testing set

043201-6 / Vol. 143, APRIL 2021 Transactions of the ASME


Table 9 Summary of the optimum results of the models

Model AAPE_Training % R_Training AAPE_Testing % R_Testing

RF 1.46 0.99 3.98 0.93


ANN 4.36 0.92 4.54 0.91
FN 5.21 0.89 5.29 0.88

Fig. 6 Depth versus the actual and predicted torque (the last day leading up to the inci-
dent, Well-1)

second-best. Therefore, the RF was selected to continue with the


analysis to detect downhole abnormalities.

5.2 Alarm Detection in Well-1. RF was used to predict the


torque on the last day leading up to the incident in Well-1. The pre-
dicted surface drilling torque represents the normal and healthy
drilling environment, which was compared with the actual surface
drilling torque. The difference in the actual surface drilling torque
trend from the predicted model could be a sign or symptom indicat-
ing a potential hole problem. Figure 6 indicates that the hole condi-
tion starts to deteriorate at a depth of 14,900 ft.
The Mahalanobis distances of all observations of the modeled
surface drilling torque (normal and healthy trend) were calculated
Fig. 7 Mahalanobis distances of the normal and healthy trend to decide on a threshold. Figure 7 shows that the Mahalanobis dis-
(the last day leading up to the incident, Well-1)
tances for the majority of the data points fall between 0.71 and 3.81.
However, there are 11 data points, which are the farthest from the
TRAINLM, and 20 neurons achieved the lowest AAPE in the centroid of the distribution, these points are within the range of
testing set of 4.54%. Figures 4(a) and 4(b) show cross-plots of 5.87–6.9. Thus, a threshold value of 6.9 is considered to flag an
the actual torque versus predicted torque of the training set and anomaly when the actual surface drilling torque is examined. The
testing set, respectively. torque value that is higher than 6.9 is going to be classified as
The FN model performance with different methods and relation- “ANOMALY,” while the torque value that is less than 6.9 is
ship types is presented in Table 8, which shows that the best results going to be classified as “NORMAL.”
were obtained when FNFBM was used with a nonlinear relationship The Mahalanobis distances of the actual drilling surface torque
type. The model predicted the torque with AAPE of 5.21% and R of were calculated and compared with the pre-determined threshold,
0.89 in the training set, and with AAPE of 5.29 and R of 0.88 in the i.e., 6.9. The Mahalanobis distances for the last two drilled stands
testing set. Figures 5(a) and 4(b) are cross-plots of the actual and (14,874–15,060 ft) prior to the stuck pipe incident are presented
predicted torque of the training and testing sets, respectively, in Table 10 in Appendix A. Table 10 shows that a continuous
when FNFBM with a nonlinear relationship was used. alarm, highlighted in gray, was being detected by the model (on
The optimum results of each model are summarized in Table 9. 2015-12-8 at 22:11:30), 9 h before any abnormality was observed
Table 9 shows that the RF has the lowest AAPE and the highest or reported by the drilling crew or monitoring engineers. This
R in the training and testing sets, followed by the ANN as the early warning sign would have permitted the drilling crew to

Fig. 8 Depth versus the actual and predicted torque (the last day leading up to the inci-
dent, Well-2)

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-7


stands (15,065–15,254 ft) prior to the stuck pipe incident are pre-
sented in Table 11 in Appendix A. Table 11 shows that a continuous
alarm, highlighted in gray, was being detected by the model (on
2015-12-8 at 05:40:00), 7 h before any abnormality was observed
by the drilling crew or monitoring engineers.

6 Conclusions
The key contribution of this work is the solution it provides to
streamlining early detection operation anomalies. Unlike traditional
drilling models, ML models provide predictive capabilities. An ML
model, i.e., RF, was built to predict the surface torque using actual
Fig. 9 Mahalanobis distances of the normal and healthy trend field data of Well-1. Well-2 was used to assess the capability of the
(the last day leading up to the incident, Well-2) intelligent system in detecting downhole abnormalities in the last
day leading up to the incident in Well-2. Based on the results, the
following can be concluded:
react and take action to mitigate the problem promptly, thereby min-
imizing the unproductive time associated with the incident. – The RF predicted the actual torque with AAPE of 1.46% and R
of 0.99 in the training set, while AAPE and R were 3.98% and
5.3 Alarm Detection in Well-2. RF was used to predict the 0.93, respectively, in the testing set.
torque on the last day leading up to the incident in Well-2. – The RF model recognized that the actual torque trend in the
Figure 8 indicates that the hole condition starts to deteriorate at a last day leading up to the incident in Well-1 diverged from
depth of 15,060 ft. the predictive model at a depth of 14,900 ft.
Similar to Well-1, the Mahalanobis distances of all observations – The RF model recognized that the actual torque trend in the
of the modeled surface drilling torque (normal and healthy trend) in last day leading up to the incident in Well-2 deviated from
Well-2 were calculated to decide on a threshold. Figure 9 shows that the predictive model at a depth of 15,060 ft.
the Mahalanobis distances for the majority of the data points fall – The intelligent system populated a real-time alarm to alert the
between 1.36 and 3.39. However, there are 11 data points, which drilling crew 9 h before any abnormality was observed or
are the farthest from the centroid of the distribution; these points reported by the drilling crew or monitoring engineers in
are within the range of 3.97–4.26. Therefore, a threshold value of Well-1. However, the alarm was populated 7 h before any
4.26 is considered to flag an anomaly when the actual surface drill- abnormality was observed by the drilling crew in Well-2.
ing torque is examined.
The Mahalanobis distances of the actual drilling surface torque
were calculated and compared with the pre-determined threshold, Conflict of Interest
i.e., 4.26. The Mahalanobis distances for the last two drilled There are no conflicts of interest.

Appendix A

Table 10 Mahalanobis distances for the last two drilled stands, Well-1

TIME DM ANOMALY/NORMAL TIME DM ANOMALY/NORMAL

2015-12-08T22:11:30.0000000+03:00 7.094 ANOMAL 2015-12-08T23:12:30.0000000+03:00 5.197 NORMAL


2015-12-08T22:12:00.0000000+03:00 5.629 NORMAL 2015-12-08T23:15:30.0000000+03:00 3.624 NORMAL
2015-12-08T22:12:30.0000000+03:00 9.527 ANOMAL 2015-12-08T23:16:30.0000000+03:00 8.570 ANOMAL
2015-12-08T22:13:00.0000000+03:00 10.451 ANOMAL 2015-12-08T23:17:00.0000000+03:00 7.786 ANOMAL
2015-12-08T22:13:30.0000000+03:00 6.563 NORMAL 2015-12-08T23:18:00.0000000+03:00 4.485 NORMAL
2015-12-08T22:14:00.0000000+03:00 7.860 ANOMAL 2015-12-08T23:19:00.0000000+03:00 3.306 NORMAL
2015-12-08T22:15:00.0000000+03:00 7.110 ANOMAL 2015-12-08T23:20:00.0000000+03:00 5.750 NORMAL
2015-12-08T22:15:30.0000000+03:00 6.987 ANOMAL 2015-12-08T23:21:30.0000000+03:00 4.282 NORMAL
2015-12-08T22:16:00.0000000+03:00 7.437 ANOMAL 2015-12-08T23:23:30.0000000+03:00 3.813 NORMAL
2015-12-08T22:16:30.0000000+03:00 7.907 ANOMAL 2015-12-08T23:26:30.0000000+03:00 5.271 NORMAL
2015-12-08T22:17:00.0000000+03:00 6.878 NORMAL 2015-12-08T23:27:30.0000000+03:00 3.474 NORMAL
2015-12-08T22:17:30.0000000+03:00 7.984 ANOMAL 2015-12-08T23:29:00.0000000+03:00 6.037 NORMAL
2015-12-08T22:18:00.0000000+03:00 6.771 NORMAL 2015-12-08T23:29:30.0000000+03:00 7.299 ANOMAL
2015-12-08T22:18:30.0000000+03:00 6.752 NORMAL 2015-12-08T23:31:00.0000000+03:00 3.537 NORMAL
2015-12-08T22:19:30.0000000+03:00 6.868 NORMAL 2015-12-08T23:31:30.0000000+03:00 4.456 NORMAL
2015-12-08T22:20:00.0000000+03:00 6.603 NORMAL 2015-12-08T23:32:00.0000000+03:00 5.255 NORMAL
2015-12-08T22:20:30.0000000+03:00 6.413 NORMAL 2015-12-08T23:32:30.0000000+03:00 6.077 NORMAL
2015-12-08T22:22:00.0000000+03:00 7.341 ANOMAL 2015-12-08T23:33:00.0000000+03:00 5.803 NORMAL
2015-12-08T22:22:30.0000000+03:00 6.623 NORMAL 2015-12-08T23:33:30.0000000+03:00 6.179 NORMAL
2015-12-08T22:23:00.0000000+03:00 7.462 ANOMAL 2015-12-08T23:34:00.0000000+03:00 6.544 NORMAL
2015-12-08T22:23:30.0000000+03:00 7.128 ANOMAL 2015-12-08T23:34:30.0000000+03:00 5.539 NORMAL
2015-12-08T22:24:00.0000000+03:00 7.088 ANOMAL 2015-12-08T23:35:00.0000000+03:00 5.766 NORMAL
2015-12-08T22:24:30.0000000+03:00 6.016 NORMAL 2015-12-08T23:36:00.0000000+03:00 7.341 ANOMAL
2015-12-08T22:25:00.0000000+03:00 6.342 NORMAL 2015-12-08T23:36:30.0000000+03:00 6.360 NORMAL
2015-12-08T22:25:30.0000000+03:00 11.454 ANOMAL 2015-12-08T23:37:00.0000000+03:00 6.060 NORMAL
2015-12-08T22:26:00.0000000+03:00 9.045 ANOMAL 2015-12-08T23:37:30.0000000+03:00 6.094 NORMAL
2015-12-08T22:26:30.0000000+03:00 7.030 ANOMAL 2015-12-08T23:38:00.0000000+03:00 5.299 NORMAL

043201-8 / Vol. 143, APRIL 2021 Transactions of the ASME


Table 10 Continued

TIME DM ANOMALY/NORMAL TIME DM ANOMALY/NORMAL

2015-12-08T22:27:00.0000000+03:00 6.136 NORMAL 2015-12-08T23:39:00.0000000+03:00 5.837 NORMAL


2015-12-08T22:27:30.0000000+03:00 7.909 ANOMAL 2015-12-08T23:39:30.0000000+03:00 7.637 ANOMAL
2015-12-08T22:28:00.0000000+03:00 7.453 ANOMAL 2015-12-08T23:40:00.0000000+03:00 6.747 NORMAL
2015-12-08T22:28:30.0000000+03:00 6.514 NORMAL 2015-12-08T23:40:30.0000000+03:00 6.142 NORMAL
2015-12-08T22:29:30.0000000+03:00 7.913 ANOMAL 2015-12-08T23:41:00.0000000+03:00 4.493 NORMAL
2015-12-08T22:30:00.0000000+03:00 6.824 NORMAL 2015-12-08T23:52:00.0000000+03:00 5.485 NORMAL
2015-12-08T22:30:30.0000000+03:00 6.988 ANOMAL 2015-12-08T23:53:00.0000000+03:00 5.186 NORMAL
2015-12-08T22:31:00.0000000+03:00 7.440 ANOMAL 2015-12-08T23:54:00.0000000+03:00 7.078 ANOMAL
2015-12-08T22:31:30.0000000+03:00 8.070 ANOMAL 2015-12-08T23:54:30.0000000+03:00 6.842 NORMAL
2015-12-08T22:32:00.0000000+03:00 6.843 NORMAL 2015-12-08T23:56:30.0000000+03:00 4.516 NORMAL
2015-12-08T22:32:30.0000000+03:00 6.893 NORMAL 2015-12-08T23:57:30.0000000+03:00 7.345 ANOMAL
2015-12-08T22:33:00.0000000+03:00 7.195 ANOMAL 2015-12-08T23:58:00.0000000+03:00 5.910 NORMAL
2015-12-08T22:33:30.0000000+03:00 6.402 NORMAL 2015-12-08T23:58:30.0000000+03:00 6.942 ANOMAL
2015-12-08T22:34:00.0000000+03:00 7.343 ANOMAL 2015-12-08T23:59:00.0000000+03:00 4.927 NORMAL
2015-12-08T22:35:00.0000000+03:00 6.953 ANOMAL 2015-12-08T23:59:30.0000000+03:00 5.795 NORMAL
2015-12-08T22:35:30.0000000+03:00 6.840 NORMAL 2015-12-09T00:00:00.0000000+03:00 7.098 ANOMAL
2015-12-08T22:36:30.0000000+03:00 7.761 ANOMAL 2015-12-09T00:00:30.0000000+03:00 6.674 NORMAL
2015-12-08T22:37:00.0000000+03:00 6.686 NORMAL 2015-12-09T00:01:00.0000000+03:00 5.193 NORMAL
2015-12-08T22:37:30.0000000+03:00 7.338 ANOMAL 2015-12-09T00:01:30.0000000+03:00 4.862 NORMAL
2015-12-08T22:38:00.0000000+03:00 7.715 ANOMAL 2015-12-09T00:02:00.0000000+03:00 2.948 NORMAL
2015-12-08T22:38:30.0000000+03:00 6.517 NORMAL 2015-12-09T00:02:30.0000000+03:00 4.046 NORMAL
2015-12-08T23:03:00.0000000+03:00 6.918 ANOMAL 2015-12-09T00:03:30.0000000+03:00 5.934 NORMAL
2015-12-08T23:03:30.0000000+03:00 6.701 NORMAL 2015-12-09T00:04:30.0000000+03:00 7.204 ANOMAL
2015-12-08T23:04:00.0000000+03:00 4.530 NORMAL 2015-12-09T00:05:30.0000000+03:00 4.352 NORMAL
2015-12-08T23:06:00.0000000+03:00 5.286 NORMAL 2015-12-09T00:06:00.0000000+03:00 3.931 NORMAL
2015-12-08T23:08:30.0000000+03:00 4.016 NORMAL 2015-12-09T00:06:30.0000000+03:00 6.683 NORMAL
2015-12-08T23:10:30.0000000+03:00 4.895 NORMAL 2015-12-09T00:07:00.0000000+03:00 5.219 NORMAL
2015-12-08T23:11:00.0000000+03:00 5.169 NORMAL 2015-12-09T00:08:00.0000000+03:00 4.517 NORMAL
2015-12-09T00:08:30.0000000+03:00 7.692 ANOMAL 2015-12-09T03:05:30.0000000+03:00 5.530 NORMAL
2015-12-09T00:10:30.0000000+03:00 4.589 NORMAL 2015-12-09T03:06:00.0000000+03:00 6.432 NORMAL
2015-12-09T00:11:00.0000000+03:00 5.343 NORMAL 2015-12-09T03:06:30.0000000+03:00 6.355 NORMAL
2015-12-09T00:12:00.0000000+03:00 6.035 NORMAL 2015-12-09T03:07:00.0000000+03:00 6.370 NORMAL
2015-12-09T00:12:30.0000000+03:00 4.937 NORMAL 2015-12-09T03:08:00.0000000+03:00 8.539 ANOMAL
2015-12-09T00:13:30.0000000+03:00 6.252 NORMAL 2015-12-09T03:08:30.0000000+03:00 7.114 ANOMAL
2015-12-09T00:14:00.0000000+03:00 4.088 NORMAL 2015-12-09T03:09:00.0000000+03:00 5.322 NORMAL
2015-12-09T02:18:30.0000000+03:00 6.063 NORMAL 2015-12-09T03:09:30.0000000+03:00 5.474 NORMAL
2015-12-09T02:19:30.0000000+03:00 5.952 NORMAL 2015-12-09T03:18:00.0000000+03:00 10.521 ANOMAL
2015-12-09T02:20:30.0000000+03:00 8.287 ANOMAL 2015-12-09T03:18:30.0000000+03:00 14.591 ANOMAL
2015-12-09T02:22:30.0000000+03:00 4.883 NORMAL 2015-12-09T03:19:00.0000000+03:00 15.892 ANOMAL
2015-12-09T02:23:30.0000000+03:00 6.850 NORMAL 2015-12-09T03:19:30.0000000+03:00 16.919 ANOMAL
2015-12-09T02:25:00.0000000+03:00 6.377 NORMAL 2015-12-09T03:20:00.0000000+03:00 17.549 ANOMAL
2015-12-09T02:27:00.0000000+03:00 4.546 NORMAL 2015-12-09T03:21:00.0000000+03:00 15.194 ANOMAL
2015-12-09T02:27:30.0000000+03:00 7.040 ANOMAL 2015-12-09T03:21:30.0000000+03:00 14.760 ANOMAL
2015-12-09T02:28:00.0000000+03:00 7.811 ANOMAL 2015-12-09T03:22:00.0000000+03:00 14.068 ANOMAL
2015-12-09T02:29:00.0000000+03:00 6.293 NORMAL 2015-12-09T03:22:30.0000000+03:00 16.887 ANOMAL
2015-12-09T02:29:30.0000000+03:00 6.804 NORMAL 2015-12-09T03:23:00.0000000+03:00 13.987 ANOMAL
2015-12-09T02:30:00.0000000+03:00 7.153 ANOMAL 2015-12-09T03:24:00.0000000+03:00 13.695 ANOMAL
2015-12-09T02:30:30.0000000+03:00 6.647 NORMAL 2015-12-09T03:25:00.0000000+03:00 3.290 NORMAL
2015-12-09T02:31:00.0000000+03:00 5.736 NORMAL 2015-12-09T03:25:30.0000000+03:00 6.126 NORMAL
2015-12-09T02:31:30.0000000+03:00 5.324 NORMAL 2015-12-09T03:26:00.0000000+03:00 4.211 NORMAL
2015-12-09T02:33:00.0000000+03:00 6.518 NORMAL 2015-12-09T03:26:30.0000000+03:00 8.608 ANOMAL
2015-12-09T02:35:00.0000000+03:00 3.035 NORMAL 2015-12-09T03:28:00.0000000+03:00 7.241 ANOMAL
2015-12-09T02:35:30.0000000+03:00 4.468 NORMAL 2015-12-09T03:28:30.0000000+03:00 5.066 NORMAL
2015-12-09T02:37:00.0000000+03:00 5.582 NORMAL 2015-12-09T03:29:00.0000000+03:00 9.030 ANOMAL
2015-12-09T02:40:30.0000000+03:00 4.185 NORMAL 2015-12-09T03:30:30.0000000+03:00 3.432 NORMAL
2015-12-09T02:41:00.0000000+03:00 8.847 ANOMAL 2015-12-09T03:31:00.0000000+03:00 5.884 NORMAL
2015-12-09T02:42:00.0000000+03:00 6.184 NORMAL 2015-12-09T03:31:30.0000000+03:00 10.720 ANOMAL
2015-12-09T02:42:30.0000000+03:00 5.051 NORMAL 2015-12-09T03:32:00.0000000+03:00 6.963 ANOMAL
2015-12-09T02:44:00.0000000+03:00 6.613 NORMAL 2015-12-09T03:33:00.0000000+03:00 4.890 NORMAL
2015-12-09T02:45:00.0000000+03:00 7.507 ANOMAL 2015-12-09T03:34:00.0000000+03:00 4.476 NORMAL
2015-12-09T02:46:30.0000000+03:00 8.256 ANOMAL 2015-12-09T03:34:30.0000000+03:00 8.254 ANOMAL
2015-12-09T02:48:00.0000000+03:00 8.137 ANOMAL 2015-12-09T03:35:30.0000000+03:00 5.306 NORMAL
2015-12-09T02:49:00.0000000+03:00 4.833 NORMAL 2015-12-09T03:36:00.0000000+03:00 5.289 NORMAL
2015-12-09T02:49:30.0000000+03:00 5.467 NORMAL 2015-12-09T03:36:30.0000000+03:00 7.833 ANOMAL
2015-12-09T02:50:30.0000000+03:00 4.734 NORMAL 2015-12-09T03:37:00.0000000+03:00 5.522 NORMAL
2015-12-09T02:51:30.0000000+03:00 7.379 ANOMAL 2015-12-09T03:38:30.0000000+03:00 5.261 NORMAL
2015-12-09T02:52:00.0000000+03:00 5.290 NORMAL 2015-12-09T03:39:30.0000000+03:00 5.445 NORMAL
2015-12-09T02:52:30.0000000+03:00 8.503 ANOMAL 2015-12-09T03:40:30.0000000+03:00 5.219 NORMAL
2015-12-09T02:53:30.0000000+03:00 7.105 ANOMAL 2015-12-09T03:41:00.0000000+03:00 6.824 NORMAL
2015-12-09T02:54:30.0000000+03:00 4.870 NORMAL 2015-12-09T03:41:30.0000000+03:00 9.832 ANOMAL
2015-12-09T02:55:00.0000000+03:00 6.601 NORMAL 2015-12-09T03:42:00.0000000+03:00 7.445 ANOMAL
2015-12-09T02:55:30.0000000+03:00 7.130 ANOMAL 2015-12-09T03:42:30.0000000+03:00 7.242 ANOMAL
2015-12-09T02:56:00.0000000+03:00 7.637 ANOMAL 2015-12-09T03:43:30.0000000+03:00 4.597 NORMAL

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-9


Table 10 Continued

TIME DM ANOMALY/NORMAL TIME DM ANOMALY/NORMAL

2015-12-09T02:57:30.0000000+03:00 5.852 NORMAL 2015-12-09T03:44:30.0000000+03:00 6.194 NORMAL


2015-12-09T02:58:00.0000000+03:00 7.871 ANOMAL 2015-12-09T03:46:00.0000000+03:00 6.965 ANOMAL
2015-12-09T02:58:30.0000000+03:00 5.541 NORMAL 2015-12-09T03:46:30.0000000+03:00 4.687 NORMAL
2015-12-09T02:59:30.0000000+03:00 5.086 NORMAL 2015-12-09T03:47:00.0000000+03:00 6.437 NORMAL
2015-12-09T03:00:00.0000000+03:00 7.544 ANOMAL 2015-12-09T03:51:00.0000000+03:00 8.204 ANOMAL
2015-12-09T03:01:00.0000000+03:00 3.872 NORMAL 2015-12-09T03:51:30.0000000+03:00 7.899 ANOMAL
2015-12-09T03:02:30.0000000+03:00 5.957 NORMAL 2015-12-09T03:52:00.0000000+03:00 7.735 ANOMAL
2015-12-09T03:03:00.0000000+03:00 7.783 ANOMAL 2015-12-09T03:54:00.0000000+03:00 8.458 ANOMAL
2015-12-09T03:04:00.0000000+03:00 10.419 ANOMAL 2015-12-09T03:54:30.0000000+03:00 7.181 ANOMAL
2015-12-09T03:04:30.0000000+03:00 7.055 ANOMAL 2015-12-09T03:55:00.0000000+03:00 10.654 ANOMAL
2015-12-09T03:56:00.0000000+03:00 5.459 NORMAL 2015-12-09T04:57:00.0000000+03:00 10.497 ANOMAL
2015-12-09T03:56:30.0000000+03:00 6.249 NORMAL 2015-12-09T04:58:00.0000000+03:00 9.882 ANOMAL
2015-12-09T03:57:30.0000000+03:00 8.334 ANOMAL 2015-12-09T04:59:00.0000000+03:00 10.739 ANOMAL
2015-12-09T03:58:30.0000000+03:00 3.120 NORMAL 2015-12-09T05:01:00.0000000+03:00 1.917 NORMAL
2015-12-09T03:59:00.0000000+03:00 4.603 NORMAL 2015-12-09T05:02:00.0000000+03:00 6.790 NORMAL
2015-12-09T04:00:30.0000000+03:00 5.278 NORMAL 2015-12-09T05:03:00.0000000+03:00 8.038 ANOMAL
2015-12-09T04:01:30.0000000+03:00 5.515 NORMAL 2015-12-09T05:04:00.0000000+03:00 5.800 NORMAL
2015-12-09T04:02:30.0000000+03:00 2.898 NORMAL 2015-12-09T05:04:30.0000000+03:00 6.502 NORMAL
2015-12-09T04:03:00.0000000+03:00 5.867 NORMAL 2015-12-09T05:05:00.0000000+03:00 8.756 ANOMAL
2015-12-09T04:04:00.0000000+03:00 5.512 NORMAL 2015-12-09T05:06:00.0000000+03:00 8.044 ANOMAL
2015-12-09T04:05:00.0000000+03:00 5.433 NORMAL 2015-12-09T05:06:30.0000000+03:00 8.082 ANOMAL
2015-12-09T04:05:30.0000000+03:00 4.972 NORMAL 2015-12-09T05:07:00.0000000+03:00 9.214 ANOMAL
2015-12-09T04:06:30.0000000+03:00 2.862 NORMAL 2015-12-09T05:08:30.0000000+03:00 9.174 ANOMAL
2015-12-09T04:07:00.0000000+03:00 5.831 NORMAL 2015-12-09T05:09:00.0000000+03:00 9.095 ANOMAL
2015-12-09T04:08:00.0000000+03:00 4.911 NORMAL 2015-12-09T05:09:30.0000000+03:00 11.103 ANOMAL
2015-12-09T04:09:30.0000000+03:00 7.774 ANOMAL 2015-12-09T05:10:30.0000000+03:00 7.885 ANOMAL
2015-12-09T04:10:30.0000000+03:00 6.509 NORMAL 2015-12-09T05:11:30.0000000+03:00 5.316 NORMAL
2015-12-09T04:11:30.0000000+03:00 4.616 NORMAL 2015-12-09T05:12:00.0000000+03:00 5.067 NORMAL
2015-12-09T04:12:00.0000000+03:00 5.145 NORMAL 2015-12-09T05:12:30.0000000+03:00 5.791 NORMAL
2015-12-09T04:12:30.0000000+03:00 5.670 NORMAL 2015-12-09T05:13:00.0000000+03:00 6.979 ANOMAL
2015-12-09T04:13:00.0000000+03:00 6.856 NORMAL 2015-12-09T05:13:30.0000000+03:00 6.899 NORMAL
2015-12-09T04:13:30.0000000+03:00 5.963 NORMAL 2015-12-09T05:14:00.0000000+03:00 6.274 NORMAL
2015-12-09T04:14:30.0000000+03:00 7.038 ANOMAL 2015-12-09T05:14:30.0000000+03:00 6.558 NORMAL
2015-12-09T04:15:00.0000000+03:00 5.124 NORMAL 2015-12-09T05:15:00.0000000+03:00 8.260 ANOMAL
2015-12-09T04:16:00.0000000+03:00 4.779 NORMAL 2015-12-09T05:15:30.0000000+03:00 10.652 ANOMAL
2015-12-09T04:16:30.0000000+03:00 6.154 NORMAL 2015-12-09T05:16:00.0000000+03:00 7.348 ANOMAL
2015-12-09T04:17:30.0000000+03:00 5.187 NORMAL 2015-12-09T05:16:30.0000000+03:00 6.151 NORMAL
2015-12-09T04:18:30.0000000+03:00 4.082 NORMAL 2015-12-09T05:17:00.0000000+03:00 6.534 NORMAL
2015-12-09T04:19:30.0000000+03:00 6.950 ANOMAL 2015-12-09T05:17:30.0000000+03:00 7.694 ANOMAL
2015-12-09T04:20:30.0000000+03:00 5.737 NORMAL 2015-12-09T05:18:00.0000000+03:00 6.758 NORMAL
2015-12-09T04:21:00.0000000+03:00 5.278 NORMAL 2015-12-09T05:18:30.0000000+03:00 9.328 ANOMAL
2015-12-09T04:23:00.0000000+03:00 4.084 NORMAL 2015-12-09T05:19:00.0000000+03:00 8.248 ANOMAL
2015-12-09T04:25:00.0000000+03:00 5.155 NORMAL 2015-12-09T05:19:30.0000000+03:00 7.335 ANOMAL
2015-12-09T04:26:30.0000000+03:00 5.541 NORMAL 2015-12-09T05:20:00.0000000+03:00 7.589 ANOMAL
2015-12-09T04:27:00.0000000+03:00 5.956 NORMAL 2015-12-09T05:20:30.0000000+03:00 8.199 ANOMAL
2015-12-09T04:29:00.0000000+03:00 4.554 NORMAL 2015-12-09T05:21:00.0000000+03:00 8.974 ANOMAL
2015-12-09T04:30:00.0000000+03:00 6.758 NORMAL 2015-12-09T05:21:30.0000000+03:00 9.212 ANOMAL
2015-12-09T04:31:30.0000000+03:00 3.580 NORMAL 2015-12-09T05:22:00.0000000+03:00 7.024 ANOMAL
2015-12-09T04:33:30.0000000+03:00 4.193 NORMAL 2015-12-09T05:22:30.0000000+03:00 7.182 ANOMAL
2015-12-09T04:34:00.0000000+03:00 5.467 NORMAL 2015-12-09T05:23:00.0000000+03:00 4.773 NORMAL
2015-12-09T04:37:00.0000000+03:00 6.178 NORMAL 2015-12-09T05:23:30.0000000+03:00 7.003 ANOMAL
2015-12-09T04:38:00.0000000+03:00 4.442 NORMAL 2015-12-09T05:24:00.0000000+03:00 7.548 ANOMAL
2015-12-09T04:38:30.0000000+03:00 6.225 NORMAL 2015-12-09T05:24:30.0000000+03:00 5.894 NORMAL
2015-12-09T04:40:00.0000000+03:00 5.957 NORMAL 2015-12-09T05:25:00.0000000+03:00 7.326 ANOMAL
2015-12-09T04:40:30.0000000+03:00 7.801 ANOMAL 2015-12-09T05:25:30.0000000+03:00 5.611 NORMAL
2015-12-09T04:49:00.0000000+03:00 10.067 ANOMAL 2015-12-09T05:26:00.0000000+03:00 8.679 ANOMAL
2015-12-09T04:49:30.0000000+03:00 7.315 ANOMAL 2015-12-09T05:26:30.0000000+03:00 8.548 ANOMAL
2015-12-09T04:50:00.0000000+03:00 7.854 ANOMAL 2015-12-09T05:27:00.0000000+03:00 8.674 ANOMAL
2015-12-09T04:52:00.0000000+03:00 5.747 NORMAL 2015-12-09T05:27:30.0000000+03:00 9.189 ANOMAL
2015-12-09T04:52:30.0000000+03:00 7.582 ANOMAL 2015-12-09T05:28:00.0000000+03:00 8.912 ANOMAL
2015-12-09T04:53:30.0000000+03:00 4.869 NORMAL 2015-12-09T05:28:30.0000000+03:00 9.249 ANOMAL
2015-12-09T04:54:00.0000000+03:00 5.888 NORMAL 2015-12-09T05:29:00.0000000+03:00 10.865 ANOMAL
2015-12-09T04:55:30.0000000+03:00 8.839 ANOMAL 2015-12-09T05:29:30.0000000+03:00 10.925 ANOMAL
2015-12-09T04:56:00.0000000+03:00 5.522 NORMAL 2015-12-09T05:30:00.0000000+03:00 8.159 ANOMAL
2015-12-09T04:56:30.0000000+03:00 9.241 ANOMAL 2015-12-09T05:30:30.0000000+03:00 8.139 ANOMAL
2015-12-09T05:33:00.0000000+03:00 7.041 ANOMAL 2015-12-09T06:25:00.0000000+03:00 7.802 ANOMAL
2015-12-09T05:34:00.0000000+03:00 4.340 NORMAL 2015-12-09T06:26:00.0000000+03:00 8.479 ANOMAL
2015-12-09T05:34:30.0000000+03:00 4.808 NORMAL 2015-12-09T06:27:00.0000000+03:00 7.812 ANOMAL
2015-12-09T05:35:30.0000000+03:00 7.375 ANOMAL 2015-12-09T06:27:30.0000000+03:00 8.160 ANOMAL
2015-12-09T05:36:00.0000000+03:00 7.337 ANOMAL 2015-12-09T06:28:00.0000000+03:00 6.762 NORMAL
2015-12-09T05:36:30.0000000+03:00 7.394 ANOMAL 2015-12-09T06:29:00.0000000+03:00 6.894 NORMAL
2015-12-09T05:37:00.0000000+03:00 10.113 ANOMAL 2015-12-09T06:30:00.0000000+03:00 6.819 NORMAL

043201-10 / Vol. 143, APRIL 2021 Transactions of the ASME


Table 10 Continued

TIME DM ANOMALY/NORMAL TIME DM ANOMALY/NORMAL

2015-12-09T05:37:30.0000000+03:00 8.808 ANOMAL 2015-12-09T06:31:00.0000000+03:00 6.093 NORMAL


2015-12-09T05:38:00.0000000+03:00 5.940 NORMAL 2015-12-09T06:32:00.0000000+03:00 4.830 NORMAL
2015-12-09T05:40:00.0000000+03:00 3.827 NORMAL 2015-12-09T06:32:30.0000000+03:00 4.527 NORMAL
2015-12-09T05:40:30.0000000+03:00 6.714 NORMAL 2015-12-09T06:34:00.0000000+03:00 4.850 NORMAL
2015-12-09T05:41:00.0000000+03:00 4.734 NORMAL 2015-12-09T06:35:00.0000000+03:00 4.742 NORMAL
2015-12-09T05:41:30.0000000+03:00 6.663 NORMAL 2015-12-09T06:36:00.0000000+03:00 7.324 ANOMAL
2015-12-09T05:42:00.0000000+03:00 6.974 ANOMAL 2015-12-09T06:37:30.0000000+03:00 4.920 NORMAL
2015-12-09T05:43:30.0000000+03:00 5.921 NORMAL 2015-12-09T06:38:00.0000000+03:00 6.121 NORMAL
2015-12-09T05:44:00.0000000+03:00 6.127 NORMAL 2015-12-09T06:39:30.0000000+03:00 6.505 NORMAL
2015-12-09T05:45:30.0000000+03:00 8.880 ANOMAL 2015-12-09T06:40:30.0000000+03:00 6.472 NORMAL
2015-12-09T05:46:00.0000000+03:00 9.327 ANOMAL 2015-12-09T06:42:00.0000000+03:00 8.413 ANOMAL
2015-12-09T05:47:00.0000000+03:00 7.979 ANOMAL 2015-12-09T06:43:30.0000000+03:00 7.088 ANOMAL
2015-12-09T05:47:30.0000000+03:00 9.132 ANOMAL 2015-12-09T06:44:00.0000000+03:00 8.090 ANOMAL
2015-12-09T05:48:00.0000000+03:00 8.120 ANOMAL 2015-12-09T06:44:30.0000000+03:00 6.604 NORMAL
2015-12-09T05:55:30.0000000+03:00 6.530 NORMAL 2015-12-09T06:47:00.0000000+03:00 4.983 NORMAL
2015-12-09T05:56:00.0000000+03:00 6.129 NORMAL 2015-12-09T06:49:00.0000000+03:00 8.237 ANOMAL
2015-12-09T05:56:30.0000000+03:00 10.855 ANOMAL 2015-12-09T06:49:30.0000000+03:00 6.235 NORMAL
2015-12-09T05:57:00.0000000+03:00 13.708 ANOMAL 2015-12-09T06:50:00.0000000+03:00 6.766 NORMAL
2015-12-09T05:58:00.0000000+03:00 6.643 NORMAL 2015-12-09T06:50:30.0000000+03:00 8.588 ANOMAL
2015-12-09T05:58:30.0000000+03:00 6.601 NORMAL 2015-12-09T06:51:30.0000000+03:00 5.349 NORMAL
2015-12-09T05:59:30.0000000+03:00 6.373 NORMAL 2015-12-09T06:53:30.0000000+03:00 7.320 ANOMAL
2015-12-09T06:00:00.0000000+03:00 4.179 NORMAL 2015-12-09T06:54:30.0000000+03:00 8.575 ANOMAL
2015-12-09T06:03:00.0000000+03:00 9.323 ANOMAL 2015-12-09T06:55:00.0000000+03:00 6.860 NORMAL
2015-12-09T06:04:30.0000000+03:00 5.850 NORMAL 2015-12-09T06:56:00.0000000+03:00 5.918 NORMAL
2015-12-09T06:05:00.0000000+03:00 7.897 ANOMAL 2015-12-09T06:58:30.0000000+03:00 6.484 NORMAL
2015-12-09T06:05:30.0000000+03:00 6.978 ANOMAL 2015-12-09T07:00:00.0000000+03:00 5.536 NORMAL
2015-12-09T06:06:00.0000000+03:00 7.876 ANOMAL 2015-12-09T07:01:00.0000000+03:00 5.764 NORMAL
2015-12-09T06:07:00.0000000+03:00 7.435 ANOMAL 2015-12-09T07:01:30.0000000+03:00 3.699 NORMAL
2015-12-09T06:07:30.0000000+03:00 6.619 NORMAL 2015-12-09T07:02:00.0000000+03:00 5.791 NORMAL
2015-12-09T06:08:30.0000000+03:00 8.096 ANOMAL 2015-12-09T07:02:30.0000000+03:00 4.442 NORMAL
2015-12-09T06:09:30.0000000+03:00 4.696 NORMAL 2015-12-09T07:03:00.0000000+03:00 6.158 NORMAL
2015-12-09T06:10:00.0000000+03:00 9.403 ANOMAL 2015-12-09T07:04:00.0000000+03:00 9.047 ANOMAL
2015-12-09T06:11:00.0000000+03:00 8.517 ANOMAL 2015-12-09T07:06:00.0000000+03:00 5.600 NORMAL
2015-12-09T06:11:30.0000000+03:00 7.534 ANOMAL 2015-12-09T07:07:30.0000000+03:00 7.636 ANOMAL
2015-12-09T06:12:00.0000000+03:00 8.074 ANOMAL 2015-12-09T07:08:00.0000000+03:00 7.472 ANOMAL
2015-12-09T06:12:30.0000000+03:00 10.952 ANOMAL 2015-12-09T07:08:30.0000000+03:00 8.807 ANOMAL
2015-12-09T06:13:30.0000000+03:00 8.039 ANOMAL 2015-12-09T07:09:30.0000000+03:00 5.948 NORMAL
2015-12-09T06:15:00.0000000+03:00 7.634 ANOMAL 2015-12-09T07:10:30.0000000+03:00 7.759 ANOMAL
2015-12-09T06:16:00.0000000+03:00 9.221 ANOMAL 2015-12-09T07:11:00.0000000+03:00 6.890 NORMAL
2015-12-09T06:16:30.0000000+03:00 8.418 ANOMAL 2015-12-09T07:11:30.0000000+03:00 5.017 NORMAL
2015-12-09T06:17:30.0000000+03:00 9.364 ANOMAL 2015-12-09T07:12:00.0000000+03:00 7.461 ANOMAL
2015-12-09T06:18:00.0000000+03:00 8.040 ANOMAL 2015-12-09T07:13:30.0000000+03:00 7.361 ANOMAL
2015-12-09T06:19:00.0000000+03:00 6.531 NORMAL 2015-12-09T07:14:30.0000000+03:00 4.269 NORMAL
2015-12-09T06:20:30.0000000+03:00 5.496 NORMAL 2015-12-09T07:15:00.0000000+03:00 5.028 NORMAL
2015-12-09T06:21:00.0000000+03:00 7.530 ANOMAL 2015-12-09T07:15:30.0000000+03:00 7.633 ANOMAL
2015-12-09T06:21:30.0000000+03:00 7.165 ANOMAL 2015-12-09T07:16:30.0000000+03:00 7.710 ANOMAL
2015-12-09T06:22:30.0000000+03:00 8.219 ANOMAL 2015-12-09T07:17:00.0000000+03:00 5.299 NORMAL

Table 11 Mahalanobis distances for the last two drilled stands, Well-2

RIGTIME (DateTime) DM ANOMALY/NORMAL RIGTIME (DateTime) DM ANOMALY/NORMAL

2015-08-02T05:40:00.0000000+03:00 6.064 ANOMAL 2015-08-02T09:38:20.0000000+03:00 3.948 NORMAL


2015-08-02T05:41:40.0000000+03:00 8.011 ANOMAL 2015-08-02T09:40:00.0000000+03:00 4.647 ANOMAL
2015-08-02T05:53:20.0000000+03:00 5.295 ANOMAL 2015-08-02T09:45:00.0000000+03:00 3.698 NORMAL
2015-08-02T05:55:00.0000000+03:00 6.070 ANOMAL 2015-08-02T09:46:40.0000000+03:00 4.526 ANOMAL
2015-08-02T05:56:40.0000000+03:00 4.935 ANOMAL 2015-08-02T09:53:20.0000000+03:00 4.520 ANOMAL
2015-08-02T05:58:20.0000000+03:00 5.436 ANOMAL 2015-08-02T09:55:00.0000000+03:00 5.590 ANOMAL
2015-08-02T06:00:00.0000000+03:00 5.835 ANOMAL 2015-08-02T09:56:40.0000000+03:00 4.164 NORMAL
2015-08-02T06:01:40.0000000+03:00 5.391 ANOMAL 2015-08-02T10:00:00.0000000+03:00 4.783 ANOMAL
2015-08-02T06:03:20.0000000+03:00 5.841 ANOMAL 2015-08-02T10:05:00.0000000+03:00 4.379 ANOMAL
2015-08-02T06:05:00.0000000+03:00 6.023 ANOMAL 2015-08-02T10:06:40.0000000+03:00 4.265 ANOMAL
2015-08-02T06:06:40.0000000+03:00 5.258 ANOMAL 2015-08-02T10:08:20.0000000+03:00 4.510 ANOMAL
2015-08-02T06:08:20.0000000+03:00 5.932 ANOMAL 2015-08-02T10:10:00.0000000+03:00 3.534 NORMAL
2015-08-02T06:11:40.0000000+03:00 5.483 ANOMAL 2015-08-02T10:11:40.0000000+03:00 4.107 NORMAL
2015-08-02T06:13:20.0000000+03:00 5.149 ANOMAL 2015-08-02T10:13:20.0000000+03:00 3.890 NORMAL
2015-08-02T06:33:20.0000000+03:00 3.267 NORMAL 2015-08-02T10:15:00.0000000+03:00 4.082 NORMAL
2015-08-02T06:35:00.0000000+03:00 2.768 NORMAL 2015-08-02T10:20:00.0000000+03:00 4.323 ANOMAL
2015-08-02T06:36:40.0000000+03:00 3.755 NORMAL 2015-08-02T10:21:40.0000000+03:00 4.651 ANOMAL

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-11


Table 11 Continued

RIGTIME (DateTime) DM ANOMALY/NORMAL RIGTIME (DateTime) DM ANOMALY/NORMAL

2015-08-02T06:38:20.0000000+03:00 2.942 NORMAL 2015-08-02T10:23:20.0000000+03:00 3.980 NORMAL


2015-08-02T06:40:00.0000000+03:00 3.075 NORMAL 2015-08-02T10:25:00.0000000+03:00 3.677 NORMAL
2015-08-02T06:41:40.0000000+03:00 4.097 NORMAL 2015-08-02T10:26:40.0000000+03:00 3.863 NORMAL
2015-08-02T06:43:20.0000000+03:00 3.281 NORMAL 2015-08-02T10:28:20.0000000+03:00 4.007 NORMAL
2015-08-02T06:45:00.0000000+03:00 3.580 NORMAL 2015-08-02T10:30:00.0000000+03:00 4.017 NORMAL
2015-08-02T06:48:20.0000000+03:00 3.643 NORMAL 2015-08-02T10:31:40.0000000+03:00 3.971 NORMAL
2015-08-02T06:50:00.0000000+03:00 3.657 NORMAL 2015-08-02T10:33:20.0000000+03:00 3.987 NORMAL
2015-08-02T06:53:20.0000000+03:00 3.490 NORMAL 2015-08-02T10:35:00.0000000+03:00 3.407 NORMAL
2015-08-02T06:55:00.0000000+03:00 3.960 NORMAL 2015-08-02T10:36:40.0000000+03:00 3.232 NORMAL
2015-08-02T06:56:40.0000000+03:00 3.645 NORMAL 2015-08-02T10:38:20.0000000+03:00 4.153 NORMAL
2015-08-02T06:58:20.0000000+03:00 3.818 NORMAL 2015-08-02T10:40:00.0000000+03:00 3.410 NORMAL
2015-08-02T07:03:20.0000000+03:00 4.579 ANOMAL 2015-08-02T10:43:20.0000000+03:00 3.919 NORMAL
2015-08-02T07:05:00.0000000+03:00 3.134 NORMAL 2015-08-02T10:45:00.0000000+03:00 3.525 NORMAL
2015-08-02T07:06:40.0000000+03:00 2.830 NORMAL 2015-08-02T10:50:00.0000000+03:00 3.040 NORMAL
2015-08-02T07:08:20.0000000+03:00 3.043 NORMAL 2015-08-02T10:51:40.0000000+03:00 3.289 NORMAL
2015-08-02T07:10:00.0000000+03:00 3.284 NORMAL 2015-08-02T10:53:20.0000000+03:00 3.258 NORMAL
2015-08-02T07:11:40.0000000+03:00 2.525 NORMAL 2015-08-02T10:56:40.0000000+03:00 3.658 NORMAL
2015-08-02T07:13:20.0000000+03:00 4.627 ANOMAL 2015-08-02T11:00:00.0000000+03:00 3.295 NORMAL
2015-08-02T07:15:00.0000000+03:00 3.696 NORMAL 2015-08-02T11:01:40.0000000+03:00 3.293 NORMAL
2015-08-02T07:16:40.0000000+03:00 4.616 ANOMAL 2015-08-02T11:13:20.0000000+03:00 3.103 NORMAL
2015-08-02T07:18:20.0000000+03:00 3.868 NORMAL 2015-08-02T11:16:40.0000000+03:00 3.178 NORMAL
2015-08-02T07:20:00.0000000+03:00 4.251 NORMAL 2015-08-02T11:18:20.0000000+03:00 3.567 NORMAL
2015-08-02T07:21:40.0000000+03:00 4.388 ANOMAL 2015-08-02T11:20:00.0000000+03:00 3.694 NORMAL
2015-08-02T07:23:20.0000000+03:00 3.256 NORMAL 2015-08-02T11:21:40.0000000+03:00 3.385 NORMAL
2015-08-02T07:25:00.0000000+03:00 4.061 NORMAL 2015-08-02T11:23:20.0000000+03:00 3.471 NORMAL
2015-08-02T07:26:40.0000000+03:00 3.091 NORMAL 2015-08-02T11:25:00.0000000+03:00 3.077 NORMAL
2015-08-02T07:28:20.0000000+03:00 3.138 NORMAL 2015-08-02T11:30:00.0000000+03:00 4.048 NORMAL
2015-08-02T07:30:00.0000000+03:00 3.225 NORMAL 2015-08-02T11:31:40.0000000+03:00 4.112 NORMAL
2015-08-02T07:31:40.0000000+03:00 3.840 NORMAL 2015-08-02T11:36:40.0000000+03:00 4.331 ANOMAL
2015-08-02T07:33:20.0000000+03:00 4.536 ANOMAL 2015-08-02T11:38:20.0000000+03:00 4.585 ANOMAL
2015-08-02T07:35:00.0000000+03:00 3.605 NORMAL 2015-08-02T11:40:00.0000000+03:00 4.362 ANOMAL
2015-08-02T07:36:40.0000000+03:00 3.724 NORMAL 2015-08-02T11:41:40.0000000+03:00 4.746 ANOMAL
2015-08-02T07:38:20.0000000+03:00 3.475 NORMAL 2015-08-02T11:43:20.0000000+03:00 4.983 ANOMAL
2015-08-02T07:43:20.0000000+03:00 3.582 NORMAL 2015-08-02T11:45:00.0000000+03:00 5.484 ANOMAL
2015-08-02T07:45:00.0000000+03:00 2.952 NORMAL 2015-08-02T11:46:40.0000000+03:00 4.583 ANOMAL
2015-08-02T07:51:40.0000000+03:00 2.814 NORMAL 2015-08-02T11:48:20.0000000+03:00 5.607 ANOMAL
2015-08-02T07:55:00.0000000+03:00 4.958 ANOMAL 2015-08-02T11:50:00.0000000+03:00 4.363 ANOMAL
2015-08-02T08:00:00.0000000+03:00 5.274 ANOMAL 2015-08-02T11:51:40.0000000+03:00 3.645 NORMAL
2015-08-02T08:03:20.0000000+03:00 5.212 ANOMAL 2015-08-02T11:53:20.0000000+03:00 4.386 ANOMAL
2015-08-02T08:05:00.0000000+03:00 3.760 NORMAL 2015-08-02T11:55:00.0000000+03:00 3.558 NORMAL
2015-08-02T08:13:20.0000000+03:00 5.438 ANOMAL 2015-08-02T11:56:40.0000000+03:00 3.326 NORMAL
2015-08-02T08:16:40.0000000+03:00 5.976 ANOMAL 2015-08-02T11:58:20.0000000+03:00 3.776 NORMAL
2015-08-02T08:23:20.0000000+03:00 6.344 ANOMAL 2015-08-02T12:00:00.0000000+03:00 3.826 NORMAL
2015-08-02T09:33:20.0000000+03:00 2.779 NORMAL 2015-08-02T12:01:40.0000000+03:00 4.494 ANOMAL
2015-08-02T09:35:00.0000000+03:00 3.433 NORMAL 2015-08-02T12:03:20.0000000+03:00 4.217 NORMAL
2015-08-02T09:36:40.0000000+03:00 3.725 NORMAL 2015-08-02T12:05:00.0000000+03:00 3.777 NORMAL

Appendix B where Yj denotes the jth column of Y, i is the row number, and j is
the column number.
Example of calculating the Mahalanobis distance
Step 1: Finding a dataset Y A = 68.0, Y B = 600.0, Y C = 40.0
Suppose that the following dataset (Y ) was obtained and we
need to find the Mahalanobis distance of Therefore,
x = 〈66.0,640.0, 44.0〉:  = 〈68.0, 600.0, 40.0〉
μ

ABC Step 3: Subtracting the mean


Y =⎡ ⎤ Subtract the vector of interest, i.e., x = 〈66.0, 640.0, 44.0〉,
64.0 580.0 29.0
⎢ 66.0 from the calculated mean (μ),
⎢ 570.0 33.0 ⎥

⎢ 68.0 590.0 37.0 ⎥
⎢ ⎥ ) = 〈66.0, 640.0, 44.0〉 − 〈68.0, 600.0, 40.0〉
(x − μ
⎣ 69.0 660.0 46.0 ⎦
73.0 600.0 55.0
=〈−2.0, 40.0, 4.0〉
Step 2: Calculating the mean Step 4: Finding the transpose
Calculate the mean of the jth variable, which is given by
⎡ ⎤
n
−2.0
 =
Yj Yij (B1) ) = ⎣ 40.0 ⎦
(x − μ
T

i=1 4.0

043201-12 / Vol. 143, APRIL 2021 Transactions of the ASME


Study,” Proceeding of the SPE Annual Technical Conference and Exhibition,
Step 5: Finding the covariance matrix Dallas, TX, Sept. 24–26, SPE-191426.
The covariance matrix is a symmetrical matrix that is always [8] Mirhaj, S. A., Fazaelizadeh, M., Kaarstad, E., and Aadnoy, B., 2010, “New
measured between two dimensions. The covariance formula for Aspects of Torque-and-Drag Modeling in Extended-Reach Wells,” Proceeding
any two variables (a, b) is given by of the SPE Annual Technical Conference and Exhibition, Florence, Italy, Sept.
19–22, SPE-135719.
n [9] Sheppard, M. C., Wick, C., and Burgess, T. M., 1986, “Designing Well Paths to
1
Cov(a, b) = (ai − a)(bi − b) (B2) Reduce Drag and Torque,” SPE Drill. Compl., 2(4), pp. 344–350. SPE-
n i
15463-PA.
[10] Rae, G., Lesso, W. G., and Sapijanskas, M., 2005, “Understanding Torque and
where a is the average of variable a, b is the average of var- Drag: Best Practices and Lessons Learnt From the Captain Field’s Extended
Reach Wells,” Proceeding of the SPE/IADC Drilling Conference, Amsterdam,
iable b. Netherlands, SPE/IADC 91854. pp.1–12.
If we have a dataset with more than two dimensions, more than [11] Mason, C. J., and Chen, D. C., 2007, “Step Changes Needed to
one covariance measurement can be calculated. The dataset (Y ) is Modernize Torque and Drag Software,” Proceeding of the 2007 SPE/IADC
a three-dimensional dataset (A, B, C). Therefore, more than one Drilling Conference, Amsterdam, Netherlands, February, SPE/IADC 104609.
pp. 1–13.
covariance measurement is to be calculated. The covariance [12] Mitchell, R., Bjorset, A., and Grindhaug, G., 2015, “Drillstring Analysis with a
matrix (S) of the dataset (Y ) has three rows and three columns Discrete Torque/Drag Model,” SPE Drill. Compl., 30(01), pp. 5–16.
and the values are as follows: [13] Mitchel, R. F., and Samuel, R., 2007, “How Good is the Torque and Drag
Model?,” Proceeding of the 2007 SPE/IADC Drilling Conference, Amsterdam,
⎡ ⎤ The Netherland, Feb. 20–22, SPE-105068-MS, pp. 1–9.
cov (A, A) cov (A, B) cov (A, C) [14] Christine, I., and Jerome, J., 2018, “The Role of Machine Learning in Drilling
S = ⎣ cov (B, A) cov (B, B) cov (B, C) ⎦ Operation: A Review,” Proceeding of the SPE Eastern Regional Meeting Held
in Pittsburgh, Pennsylvania, Oct. 7–11, SPE-191823-18ERM-MS.
cov (C, A) cov (C, B) cov (C, C) [15] Saputelli, L., Nikolaous, M., and Econmides, M. J., 2003, “Self-Learning
Reservoir Management,” Proceeding of the SPE Annual Technical Conference
Note: S can be calculated manually or easily obtained by and Exhibition in Denver, CO, SPE-84064.
[16] Al-AbdulJabbar, A., Elkatatny, S., Mahmoud, M., Abdelgawad, K., and
MATLAB. Al-Majed, A., 2019, “A Robust Rate of Penetration Model for Carbonate
⎡ ⎤ Formation,” ASME J. Energy Resour. Technol., 141(4), p. 042903.
11.50 50.0 34.75 [17] Balaji, K., Rabiei, K., Suicmez, V., Canbaz, C., Agharzeyva, Z., Tek, S., Bulut,
S = ⎣ 50.0 1250.0 205.0 ⎦ U., and Temizel, C., 2018, “Status of Data-Driven Methods and Their
Applications in Oil and Gas Industry,” Proceeding of the SPE Europec
34.75 205.0 110.0 Featured at 80th EAGE Conference and Exhibition Held in Copenhagen,
Denmark, June 11–14, SPE-190812-MS.
Step 6: Finding the inverse of the covariance matrix [18] Holdaway, K. R., 2014, Harnessing Oil and Gas Big Data with Analytics, John
⎡ ⎤ Wiley & Sons, Hoboken, NJ.
11.50 50.0 34.75 [19] Hegde, C., Millwater, H., and Gray, K., 2019, “Classification of Drilling
S = ⎣ 50.0 1250.0 205.0 ⎦
−1 Stick Slip Severity Using Machine Learning,” J. Pet. Sci. Eng., 179, pp. 1023–
1036.
34.75 205.0 110.0 [20] Gurina, E., Klyuchnikov, N., Zaytsev, A., Romanenkova, E., Antipova, K.,
Simon, I., Makarov, V., and Koroteev, D., 2020, “Application of Machine
Note: S −1 can be easily obtained by MATLAB. Learning to Accidents Detection at Directional Drilling,” J. Pet. Sci. Eng., 184,
p. 106519.
Step 7: Matrix multiplying 1 × 3 Vector (x − μ
)T by 3 × 3 inverse [21] Abbas, A., Rushdi, S., Alsaba, M., and Al Dushaishi, M., 2019, “Drilling Rate of
covariance matrix S −1 to get D2M Penetration Prediction of High-Angled Wells Using Artificial Neural Networks,”
⎡ ⎤ ASME J. Energy Resour. Technol., 141(11), p. 112904.
11.50 50.0 34.75 [22] Elkatatny, S., 2018, “Application of Artificial Intelligence Techniques to Estimate
DM = [−2.0, 40.0, 4.0] . ⎣ 50.0 1250.0 205.0 ⎦
2 the Static Poisson’s Ratio Based on Wireline Log Data,” ASME J. Energy Resour.
Technol., 140(7), p. 072905.
34.75 205.0 110.0 [23] Abdelgawad, K., Elkatatny, S., Moussa, T., Mahmoud, M., and Patil, S., 2019,
“Real-Time Determination of Rheological Properties of Spud Drilling Fluids
Using a Hybrid Artificial Intelligence Technique,” ASME J. Energy Resour.
D2M = 28.4573 Technol., 141(3), p. 032908.
[24] Ahmed, A. A., Elkatatny, S., Abdulwahab, Z., Mahmoud, M., and
Step 8: Finding the Mahalanobis distance DM Abdulraheem, A., 2019, “Rate of Penetration Prediction in Shale Formation
√ Using Fuzzy Logic,” Paper Presented at the International Petroleum
DM = 28.4573 = 5.33 Technology Conference Held in Beijing, China, Mar. 26-28, IPTC-19548-MS,
pp. 1–9.
[25] Elkatatny, S., Al-AbdulJabbar, A., and Mahmoud, A., 2019, “New Robust Model
to Estimate Formation Tops in Real Time Using Artificial Neural Networks
(ANN),” Petrophysics—The SPWLA Journal of Formation Evaluation and
References Reservoir Description, 60(6), pp. 825–837.
[1] Fazaelizadeh, M., 2013, “Real Time Torque and Drag Analysis During [26] Abdelgawad, K. Z., Elzenary, M., Elkatatny, S., Mahmoud, M., Abdulraheem, A.,
Directional Drilling,” Doctoral Dissertation, University of Calgary, Alberta, and Patil, S., 2018, “New Approach to Evaluate the Equivalent Circulating
Canada. Density (ECD) Using Artificial Intelligence Techniques,” J. Pet. Explor. Prod.
[2] Johancsik, C. A., Friesen, D. B., and Dawson, R., 1984, “Torque and Drag in Technol., 9(2), pp. 1569–1578.
Directional Wells-Prediction and Measurement,” J. Pet. Technol., 36(6), [27] Gowida, A., Elkatatny, S., Al-Afnan, S., and Abdulraheem, A., 2020,
pp. 987–992. “New Computational Artificial Intelligence Models for Generating
[3] Reiber, F., Vos, B. E., and Eide, S. E., 1999, “On-Line Torque & Drag: A Synthetic Formation Bulk Density Logs While Drilling,” Sustainability,
Real-Time Drilling Performance Optimization Tool,” Proceeding of the SPE/ 12(2), p. 686.
IADC Drilling Conference, Amsterdam, Holland, March, SPE/IADC 52836. [28] Mahmoud, A., Elzenary, M., and Elkatatny, S., 2020, “New Hybrid Hole
[4] Vos, B. E., and Reiber, F., 2000, “The Benefits of Monitoring Torque & Drag in Cleaning Model for Vertical and Deviated Wells,” ASME J. Energy Resour.
Real Tim,” Proceeding of the 2000 SPE/IADC Asia Pacific Drilling Technology Technol., 142(3), p. 034501.
Held in Kuala Lumpur, Malaysia, Sept. 11–13, SPE/IADC 62784. [29] Hegde, C., and Gray, K., 2017, “Use of Machine Learning and Data Analytics
[5] McCormick, J. E., Frilot, M., and TzuFang, C., 2011, “Torque and Drag Software to Increase Drilling Efficiency for Nearby Wells,” J. Nat. Gas Sci. Eng., 40,
Model Comparison: Impact on Application and Calibration of Field Data,” pp. 327–335.
Proceeding of the Brazil Offshore Conference and Exhibition, Macae, Brazil, [30] Efron, B., 1982, The Jackknife, the Bootstrap and Other Resampling Plans,
June 14–17, SPE-143623-MS. SIAM, Stanford, CA.
[6] McCormick, J. E., Liu, G., and Vertex, P., 2012, “Torque and Drag [31] Hedge, C., Wallace, S., and Gray, K., 2015, “Using Trees, Bagging, and Random
Modeling Advanced Techniques and Troubleshooting,” Proceeding of the SPE Forest to Predict Rate of Penetration During Drilling,” Proceeding of the SPE
Annual Technical Conference and Exhibition, TX, Oct. 8–10, SPE-156945. Middle East Intelligence Oil and Gas Conference and Exhibition Held in
pp. 1–16. Dubai, UAE, Sept. 15–16, SPE-176792-MS.
[7] Shahri, M., Wilson, T., Thetford, T., Nelson, B., Behounek, M., Ambrus, A., [32] Chakure, A., 2019, “Random Forest and Its Implementation.” Medium,
D’Angelo, J., and Ashok, P., 2018, “Implementation of a Fully Automated Towards Data Science, July 7, towardsdatascience.com/random-forest-and-its-
Real-Time Torque and Drag Model for Improving Drilling Performance: Case implementation-71824ced454f.

Journal of Energy Resources Technology APRIL 2021, Vol. 143 / 043201-13


[33] Bello, O., Holzmann, J., Yaqoob, T., and Teodoriu, C., 2015, “Application of Arti- [36] Anifowose, F., and Abdulraheem, A., 2011, “Fuzzy Logic Driven and
ficial Intelligence Methods in Drilling System Design and Operations: A Review SVM-Driven Hybrid Computational Intelligence Models Applied to Oil and
of The State of The Art,” J. Artif. Intell. Soft Comput. Res., 5(2), pp. 121–139. Gas Reservoir Characterization,” J. Nat. Gas Sci. Eng., 3(3), pp. 505–517.
[34] Electronics Hub, 2020, Artificial Neural Networks (ANN) | Basics, Characteristics, [37] Durka, B., 2011, “A Classification Algorithm Using Mahalanobis Distance
Elements, Types. [online] Available at: https://www.electronicshub.org/artificial- Clustering of Data with Applications on Biomedical Data Sets,” MSc dissertation,
neural-networks-ann/, Accessed March 19, 2020. Middle East Technical University, Ankara, Turkey.
[35] Iglesias, A., and Gálvez, A., 2001, “Applying Functional Networks to Fit Data [38] Sapp, M., Obiakor, F. E., Gregas, A. J., and Scholze, S., 2007, “Mahalanobis
Points From B-Spline Surfaces,” Proceedings Computer Graphics International Distance: A Multivariate Measure of Effect in Hypnosis Research,” Sleep
2001, Hong Kong, China, pp. 329–332. Hypnosis, 9, pp. 67–70.

043201-14 / Vol. 143, APRIL 2021 Transactions of the ASME

View publication stats

You might also like