2021-An Unsupervised Learning Model For Pipe Stuck Predictions Using A LongShort-Term Memory Autoencoder Architecture
2021-An Unsupervised Learning Model For Pipe Stuck Predictions Using A LongShort-Term Memory Autoencoder Architecture
Yujin Nakagawa and Tomoya Inoue, Japan Agency for Marine-Earth Science and Technology; Hakan Bilen,
University of Edinburgh; Konda R. Mopuri, Indian Institute of Technology; Keisuke Miyoshi and Shungo Abe3,
Japan Oil, Gas and Metals National Corporation; Ryota Wada, University of Tokyo; Kouhei Kuroda, Japan
Petroleum Exploration Co., Ltd; Hitoshi Tamamura, INPEX corporation
This paper was prepared for presentation at the SPE/IATMI Asia Pacific Oil & Gas Conference and Exhibition held virtually on 12 - 14 October, 2021. The official
proceedings were published online on 4 October, 2021.
This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents
of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect
any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written
consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may
not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.
Abstract
Pipe-sticking during drilling operations causes severe difficulties, including economic losses and safety
issues. Therefore, stuck-pipe predictions are an important tool to preempt this problem and avoid the
aforementioned troubles. In this study, we have developed a prediction technique based on artificial
intelligence, in collaboration with industry, the government, and academia. This technique was an
unsupervised learning model built using an encoder-decoder, long short-term memory architecture. The
model was trained with the time series data of normal drilling operations and based on an important
hypothesis: reconstruction errors between observed and predicted values are higher around the time of pipe
sticking than during normal drilling operations. The trained model was then applied to 34 actual stuck-
pipe events, where it was found that reconstruction errors increased prior to the pipe sticking in some cases
(thereby partly confirming our hypothesis) and were sensitive to large variations in the drilling parameters.
Introduction
The occurrence of pipe-sticking during drilling operations leads to extreme delays in the completion of
the operation, well abandonment and, in the worst case, an uncontrolled spout of crude oil or gas into the
surroundings. These troubles are unexpected and cause economic losses and safety issues. An important
reason behind these troubles is the difficulty in the antecedent collection of information about the lithological
characteristics of the wells. Of the techniques used to reduce and avoid these troubles, two approaches are
eminent: one is the detection of stuck pipes as soon as possible after the pipe-sticking has started (hereafter
referred to as stuck-pipe detections), while the other is the prediction of pipe-sticking before it has occurred
(hereafter referred to as stuck-pipe predictions). The latter approach is more appropriate because it could
give crews sufficient time to take preventative or remedial actions. Therefore, stuck-pipe predictions that
use mud logging data that reflect the conditions inside the wells are an important step taken to avoid or
reduce the troubles associated with pipe-sticking.
2 SPE-205677-MS
Several ideas have been proposed to make stuck-pipe predictions using mud logging data. One involves
the use of statistical and/or analytical models (Hess 2016; Magana-Mora et al. 2019; Meor Hashim et
al. 2021b; Salminen et al. 2017; Shoraka et al. 2011), while another employs a combination of physics-
based and data-driven models (Zhang et al. 2019). Ideas based on supervised machine learning have been
proposed using the architecture of neural networks and/or support vector machines (Abbas et al. 2019;
Ahmed et al. 2019; Al-Baiyat et al. 2012; Alshaikh et al. 2019; Brankovic et al. 2020; Chamkalani et al.
2013; Meor Hashim et al. 2021a; Siruvuri et al. 2006; Zhu et al. 2019). In addition, prediction methods based
Methods
The fundamental design of our unsupervised learning model was based on two concepts. The first concept
is that an unsupervised learning model is trained only with the time series data of normal drilling operations.
The second concept is the hypothesis that the differences between the actual and predicted values of the
time series data increase around the starting of pipe sticking, when compared to the time of normal drilling
operations. If this hypothesis could be proven to be correct, stuck-pipe predictions can be certainly made
before the start of pipe-sticking.
Data
This study was performed using the time series data of actual drilling operations in 34 distinct wells,
obtained by the collaborating companies. The time series data spans 3,382 days and has a resolution of 4 s.
To remove anomalous, possibly inaccurate values, the data were filtered so that all 13 drilling parameters
simultaneously satisfied the minimum and maximum criteria presented in Table 1. The data were then
normalized by a min-max scaler whose variables were calculated for each drilling parameter. As a result, we
SPE-205677-MS 3
found 76,278,319 datasets, where a single dataset consisted of 150 continuous time bins (i.e., 600 seconds)
and 13 drilling parameters.
As described in the "Introduction" section, the long short-term memory autoencoder (LSTM-AE) model
was designed to be trained with the time series data of normal drilling operations. These data points were
obtained by filtering the complete dataset using two boundaries that indicated normal drilling operations:
360 s before the start of pipe-sticking and 3,600 s after its end. As a result, we obtained 47,667,472 datasets
corresponding to the normal drilling operations of all 34 wells, among which we extracted 38,394,875
datasets pertaining to 24 of the wells for training the model.
To evaluate the performance of the trained LSTM-AE model, we defined the time periods corresponding
to the normal operation of the drill and to the detection and prediction of pipe-sticking by using the daily
drilling reports obtained from the collaborating companies as follows.
Labels of detector time periods indicate the duration between the start and end of pipe-sticking (hereafter
referred to as detector labels). We identified the detector time periods of 34 stuck-pipe events using the daily
drilling report. Labels of predictor time periods, on the other hand, indicate the duration from 360 to 60 s
before the start of the pipe-sticking event (hereafter referred to as predictor labels). In addition, labels of
the normal operating time periods were categorized into two types of durations — one before the predictor
time period and one after the detector time period. In this study, the first type was defined as 360 s before
the start of pipe-sticking, while the second type was defined as 3,600 s after the end of pipe-sticking.
Based on the above three aspects, detector, predictor, and normal operation labels were assigned to each
time bin of the datasets and used to evaluate the performances of stuck-pipe detections, predictions, and both
detections and predictions, respectively. It should be noted here that the performances are highly dependent
on the definitions of the time periods of normal operation, predictor, and detection.
Test datasets were then extracted from all the datasets for all 34 stuck-pipe events. The definition
of negative and positive labels was necessary at this point to evaluate the performances of the stuck-
pipe predictions and detections. To evaluate the performance of stuck-pipe detections, the time periods
corresponding to normal operation and detection were taken as the negative and positive labels. Similarly,
the durations corresponding to normal operation and prediction were considered as the negative and positive
labels to evaluate the performance of stuck-pipe predictions.
4 SPE-205677-MS
Model
We developed an autoencoder model using an encoder-decoder LSTM architecture — a feedback neural
network that is more suitable for time series predictions than standard feedforward neutral networks. The
LSTM-AE model was intended to reconstruct the input data consisting of the 13 drilling parameters by first
encoding them and then decoding them back to their original values to make the output data consistent with
input data. A major detail of this model is that the dimensions of input data were narrowed down into a
latent layer during the encoding stage of the process. Therefore, the appropriate extraction of features from
(1)
where n is the number of time bins and xi and denote vectors of true and predicted values, respectively.
Since both these vectors consist of the 13 drilling parameters; therefore, L is a vector of their averaged
reconstruction errors.
Model Learning
Using the training datasets, parameters of the LSTM-AE model were updated through 30,000 iterations. A
mini-batch of one iteration consisted of 50 randomly chosen datasets from the larger superset of training
data. To avoid overfitting, we utilized a function to halt the training process if the reconstruction errors
did not improve even after a certain number of iterations. Upon implementation, this function stopped
the training after 16,000 iterations. Fig. 1 shows the averaged reconstruction error calculated by the mean
squared error function over each 500 iterations; these errors decreased with progressive iterations.
SPE-205677-MS 5
Case Studies
Statistics of Reconstruction Errors and Area Under Cover
Using the test datasets for 6 stuck-pipe events from 10 wells which were not used in the training process,
reconstruction errors were calculated for the detector, predictor, and normal operating time periods defined
in the "Data" section. In Fig. 2, the left panel shows distributions of the reconstruction errors for the stuck-
pipe predictions, where histograms labeled as negative and positive indicate the normal operation and
predictor time periods, respectively. On the same note, the right panel in Fig. 2 shows distributions of the
reconstruction errors for stuck-pipe detections, where histograms labeled as negative and positive indicate
the normal operation and detector time periods, respectively.
Figure 2—Left: Distributions of the reconstruction error for stuck-pipe predictions. Histograms labeled
as negative and positive indicate the normal operation and predictor time periods, respectively.
Right: Distributions of the reconstruction error for stuck-pipe detections. Histograms labeled
as negative and positive indicate the normal operation and detector time periods, respectively.
6 SPE-205677-MS
To evaluate the trained LSTM-AE model, area under cover (AUC), a performance indicator, was
calculated for each stuck-pipe event using the receiver operating characteristic (ROC) curve of the above
reconstruction errors, which quantifies the performance of a classification model at all classification
thresholds. The ROC curve depicts the relation between the true positive rate (RTPR) and the false positive
rate (RFPR), which are defined as:
(2)
(3)
where NTP, NFN, NFP, and NTNdenote the numbers of results where the model correctly predicted positive
labels, incorrectly predicted negative labels, incorrectly predicted positive labels, and correctly predicted
negative labels, respectively. The AUC is then defined as the complete two-dimensional area underneath
the entire ROC curve. Using the above reconstruction errors, AUC values were calculated for the 6 stuck-
pipe events: 0.72 and 0.78 for the predictor and detector time periods, respectively.
Discussion
Performance Evaluation Using AUC
There seems to be a little difference in the distributions of the reconstruction errors between the negative
labels and the positive labels for both the predictor and detector time periods (Fig. 2). The reconstruction
errors for the positive labels seems to be greater than those for the negative labels for both the predictor and
detector time periods. The reason of the unclear difference is presumably because the distributions of the
reconstruction errors (i.e., Fig. 2) were summarized for all 6 stuck-pipe events with different performances.
On the other hand, marginally good performances are given by the AUC values of 0.72 and 0.78 for the
predictor and detector time periods, respectively. These imply the capability of the trained LSTM-AE model
to detect and predict certain types of stuck-pipe events. Further investigations into specific types of stuck-
pipe events and their AUC values are required for a more detailed evaluation of the performances of the
trained LSTM-AE model.
be caused by lost circulation which occurred during the time period around this pipe-sticking event: the
lost circulation reduced SPP_pressA, and increased MPP_SPM1 and MPP_SPM2. Lost circulation with a
high rate generally reduces the cuttings transport efficiency and increases a probability of pipe-sticking due
to pack-off. Therefore, it is not clear whether the increasing of the reconstruction errors indicates the lost
circulation during the time period around the pipe-sticking event or the predictors of the pipe-sticking event.
However, the above reconstruction errors are sensitive to large variations in the drilling parameters; this
was not unique to stuck-pipe predictions, but was common to all time series data. Therefore, the use of this
Conclusions
To make stuck-pipe predictions using artificial intelligence, we undertook a project in collaboration with
industry, the government, and academia (Inoue et al. 2020). This led to the development of an LSTM-
AE model based on unsupervised machine learning. The model was trained with the time-tagged mud
logging data of normal drilling operations based on the hypothesis that reconstruction errors between true
and predicted values increase around the time of occurrence of the stuck-pipe event, when compared to
the time of normal drilling operations. This model was applied to all 34 stuck-pipe events, and results
showed high AUC values for some of these events. We also found that the reconstruction errors did increase
prior to pipe-sticking in some cases (thereby partially confirming our hypothesis), while also sensitively
responding to large variations in the drilling parameters. Therefore, we conclude that while the LSTM-
AE model appears promising for the making of stuck-pipe predictions which could give crews sufficient
time to take preventative or remedial actions, hyperparameter optimization is required for more accurate
predictions.
Acknowledgements
This work was supported by the Japan Oil, Gas and Metals National Corporation.
References
Abbas, A. K., Flori, R., Almubarak, H. et al. 2019. Intelligent Prediction of Stuck Pipe Remediation Using Machine
Learning Algorithms. Paper Presented at the SPE Annual Technical Conference and Exhibition, Calgary, Alberta,
Canada, September. SPE-196229-MS. https://doi.org/10.2118/196229-MS
Ahmed, O. S., Aman, B. M., Zahrani, M. A. et al. 2019. Stuck Pipe Early Warning System Utilizing Moving Window
Machine Learning Approach. Paper Presented at the Abu Dhabi International Petroleum Exhibition & Conference,
Abu Dhabi, UAE, November. SPE-197674-MS. https://doi.org/10.2118/197674-MS
Al-Baiyat, I., and Lloyd H. 2012. Implementing Artificial Neural Networks and Support Vector Machines in Stuck Pipe
Prediction. Paper Presented at the SPE Kuwait International Petroleum Conference and Exhibition, Kuwait City,
Kuwait, December. SPE-163370-MS. https://doi.org/10.2118/163370-MS
Alshaikh, A., Magana-Mora, A., Gharbi, S. A. et al. 2019. Machine Learning for Detecting Stuck Pipe Incidents: Data
Analytics and Models Evaluation. Paper Presented at the International Petroleum Technology Conference, Beijing,
China, March. IPTC-19394-MS. https://doi.org/10.2523/IPTC-19394-MS
Brankovic, A., Matteucci, M., Restelli, M. et al. 2020. A Data-Based Approach for the Prediction of Stuck-Pipe Events
in Oil Drilling Operations. Paper Presented at the Abu Dhabi International Petroleum Exhibition & Conference, Abu
Dhabi, UAE, November. SPE-202625-MS. https://doi.org/10.2118/202625-MS
Chamkalani, A., Pordel S. M., and Saeed P. 2013. Support Vector Machine Model: A New Methodology for Stuck Pipe
Prediction. Paper Presented at the SPE Unconventional Gas Conference and Exhibition, Muscat, Oman, January.
SPE-164003-MS. https://doi.org/10.2118/164003-MS
Diederik, K., Jimmy, B. 2015. Adam: A Method for Stochastic Optimization. Published as a conference paper at the 3rd
International Conference for Learning Representations, San Diego. https://arxiv.org/abs/1412.6980v8
SPE-205677-MS 9
Hess, J. 2016. Pipe Sticking Prediction Using LWD Real-Time Measurements. Paper Presented at the IADC/SPE Drilling
Conference and Exhibition, Fort Worth, Texas, USA, March. SPE-178828-MS. https://doi.org/10.2118/178828-MS
Inoue, T., Wada, R., Miyoshi, K. et al. 2020. Research Project on Safety Improvement by Applying Digital Technology
for Drilling Operations (in Japanese), Proceedings of the Japan Society of Naval Architects and Ocean Engineers.
ISSN: 2185–1840.
Inoue, T., Nakagawa, Y., Wada, R. et al. 2021. Attempt of Early Stuck Detection Using Unsupervised Deep Learning with
Probability Mixture Model. Proceedings of the ASME 2021 40th International Conference on Ocean, Offshore and
Arctic Engineering OMAE 2021. Virtual, Online.