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

(ESP) - Otc-30468-Ms

Uploaded by

Faysal Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

(ESP) - Otc-30468-Ms

Uploaded by

Faysal Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

OTC-30468-MS

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
ESP Data Analytics: Use of Deep Autoencoders for Intelligent Surveillance
of Electric Submersible Pumps

Olabode Afolabi Alamu and Deval A. Pandya, Shell Global Solutions, US, Inc; Oscar Warner, Shell Global
Solutions, UK, Ltd.; Igor Debacker, Shell Brasil Petróleo Ltda.

Copyright 2020, Offshore Technology Conference

This paper was prepared for presentation at the Offshore Technology Conference originally scheduled to be held in Houston, TX, USA, 4-7 May 2020. Due to COVID-19
the physical event was not held. The official proceedings were published online on 4 May 2020.

This paper was selected for presentation by an OTC 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 Offshore Technology Conference and are subject to correction by the author(s). The material does not necessarily reflect any
position of the Offshore Technology Conference, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written
consent of the Offshore Technology Conference 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 OTC copyright.

ABSTRACT
Objectives/Scope: Electric Submersible Pump (ESP) account for over 60% of artificial lift methods used
globally and contribute significantly to the CAPEX and OPEX of a project. They tend to be the least
reliable component in the system with an average life-span of 2 years. This paper demonstrates how artificial
intelligence was used to unlock insights from sensor data around an ESP to understand the operating
conditions which lead to a trip and failure of these systems.
Methods, Procedures, Process: Autoencoders were used for the detection of anomalous behavior in an
ESP and the determination of the root cause of an anomalous event. Autoencoders are neural networks
trained to reconstruct input data. They have an encoding and decoding section, the encoder compresses the
input vector, while the decoder reconstructs the original input from the compressed vector. This process
allows the network to understand the patterns in a dataset. We trained the network on stable operating data
from a 2-years historical data dump of 97 sensors. This allowed the model to understand the patterns of
stability in an ESP.
Results, Observations, Conclusions: The autoencoder was developed using the Python programming
language along with the Keras deep learning framework. It had 7 layers with the exponential linear unit
as the activation function for training. During reconstruction, the autoencoder never produces a perfect
reconstruction of input data, it, however, performs a good reconstruction on data similar to what it was
trained on. In our case, the model reconstructs stable data well and struggles with unstable data. The
reconstruction error is used to distinguish a normal event from an anomalous event because it increases
prior to an event and reduces as the system returns to stability. During the historical time period, the ESP
experienced 5 major trips, three of them were due to gas locks while the other two were due to electrical
issues. The model was able to detect the gas locks on average 5 hrs in advance and electrical issues several
days in advance before the actual events. The top ten sensors responsible for each event were determined
based on the relative magnitude of the individual sensor reconstruction errors, the validity of this output
was confirmed by the Subject Matter Expert.
2 OTC-30468-MS

Novel/Additive Information: Autoencoders can make non-linear correlation between features in a dataset
and have been used for anomaly detection in images and other fields, this paper demonstrates their usefulness
in intelligent surveillance of ESPs. This solution is currently used for near real-time intelligent surveillance
of ESPs with the ability to send out email notifications whenever any sensor strays away from stability.

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
INTRODUCTION
Over the course of life of an oil field, the natural energy of the reservoir reduces and the need for artificial
lift becomes imperative. Electric Submersible pumps are one of the most widely used artificial lift methods,
accounting for over 60% of the total global oil production (Dunham 2013). They represent the heart of
production processes offshore, and a significant part of CAPEX and OPEX of a project. Oilfields have an
average life of 20-25 years; however, ESPs have an industry average run-life of 2 years (Marra F et al)
and tend to be the least reliable component of the production system. Over the course of life of an ESP,
it experiences trips and failures. A trip occurs when an ESP stops working temporarily and needs to be
restarted, a failure is when an ESP stops working and can't be restarted. Trips and failures of ESPs lead to
production downtime, reduced reliability of the system and deferred production.
Typical production systems are highly instrumented with several thousand of sensors measuring key
process parameters at high sampling rates (D. Pandya et al 2018), this data holds the key to intelligent
surveillance of rotating equipment which would increase reliability and avoid downtime through predictive
analytics. Currently, the data from a production platform is fed to a SCADA unit or any other distributed
Control System which allows monitoring and control of the process equipment. This allows the engineers
to monitor the working of ESPs by setting alarms whenever the process variables drift away from pre-set
margins. This approach has its advantages and shortcomings. One major shortcoming of such a system is
that by the time the system alarm goes off, it is already late, and an ESP trip cannot be avoided.
A more sophisticated approach would involve the use of data-driven models created through Machine
learning / Deep learning to detect anomalous operations in an ESP which would provide the operator with
a detailed root cause analysis of what sensors are responsible for the current state of operation of the
equipment.
In this paper, a deep learning approach was applied to 4 ESPs operated in the Brazil BC-10 field for
intelligent surveillance. Deep learning is a subset of artificial intelligence which uses artificial neural
networks to mimic biological neurons. It has found several use cases in various fields in tasks which
require human level performance. The deep learning model used in this study is called an autoencoder.
Autoencoders in their simple form refer to an artificial neural network which have the same number of
neurons in the input and output layer, and hence reproduces its input vector. This paper is concerned with
the application of autoencoder to the advanced analytics / intelligent surveillance of operation of an ESP to
detect unfavorable operating conditions before they lead to a trip.

RELATED WORKS ON PREDICTIVE ANALYTICS OF PROCESS EQUIPMENT


Machine learning is a subset of artificial intelligence concerned with the scientific study of algorithms and
statistical models that computer systems use to perform a specific task without using explicit instructions,
relying on patterns and inference instead, it differs from deep learning in the type of models developed,
because deep learning methods are all based on the artificial neural network.
The plethora of data from process equipment (such as compressors, pumps, valves etc.), the advances
in artificial intelligence, and the availability of relatively cheap computing power have made several
researchers to turn to data-driven approach to the age-old problem of predictive maintenance. Such data-
driven approaches are developed through applying machine learning to data.
OTC-30468-MS 3

Machine learning has been applied to problems which would have been difficult to explicitly program,
and this has led to its popularity in the energy sector. (Jansen et al 2018) describes a detailed framework on
how Machine learning models can be incorporated into the already-existing SCADA system for the purpose
of detecting anomalous behavior in ESPs, the author also emphasizes the advantages of AI driven predictive
maintenance approaches over Physics based methods and expert models.

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
Predictive maintenance problems can be posed as either a regression, classification, clustering or anomaly
detection problem based on the type of data available and the objective of the project. For example, projects
which aim to predict the remaining useful life of an equipment are posed as regression problems, while
those which distinguish between two or more operational states of an equipment operation can be posed as
a classification or clustering problem (assuming a balanced dataset).
Classification algorithms are used to distinguish between several classes in a dataset, this classes might
be representative of the different states which an equipment can exist in. As an example, in the case of rod
pumps, (Bangert et al 2019) applied decision tree algorithm to classify 12 different operational states of a
rod pump based on the dynamometer cards. The model saved time in determining the rod pumps which
were about to fail and needed urgent attention.
For the majority of process equipment operation, the operation is usually stable for long periods with
process upsets being rare, therefore leading to an unbalanced dataset (unequal amount of data in stable and
unstable regions). The unbalanced nature of the dataset requires a different machine learning approach called
anomaly detection. An anomaly is an event which occurs infrequently, in the case of an ESP, this could be a
gas lock, electrical issues, riser instabilities, or sudden pressure transients. In the paper, (Urban et al 2015),
pressure transients and electrical issues are cited as the leading causes of ESP trips and subsequent failures.
Another common approach to predictive maintenance is the application of Principal Component analysis.
(PCA), PCA is a machine learning algorithm used to reduce the dimensionality of a dataset. By reducing the
dimension of a dataset, it creates new and unique features which retain the information of the initial large
data set. Several authors have applied Principal Component Analysis to the predictive analytics of ESPs.
(Gupta et al 2016) applied the PCA and multivariate Hotelling T-square statistic to sensor data from ESPs,
the data set contained 22 key sensors for the ESP operation, this was reduced to 6 principal components
after PCA. The training dataset was stable operating timestamps for the ESP, this approach treated ESP trips
as an anomalous event and used the Hotelling statistic as an anomaly score for the state of operation of the
ESP. This approach showed a clear deviation of the system on the plot of the first two principal components
as the system deviated from stability.
In the area of anomaly detection, the machine learning algorithm most commonly used is One class SVM.
A one class SVM model was used by (D. Pandya et al 2018) to predict when a compressor would fail and
provide the probable causes for the compressor failure, the author was able to achieve a median detection
time of 8 hours before an event. The One-class SVM model was trained on only stable data, this approach
of training on only stable data is a recurring theme in anomaly detection problems.
In the anomaly detection space, several other models are available such as isolation forests, autoencoders
etc., the remaining sections in this paper covers the autoencoder approach to anomaly detection in greater
detail.
4 OTC-30468-MS

MACHINE LEARNING WORKFLOW

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
The entire machine learning workflow was developed using the Python programming language along with
the Keras deep learning library for building the autoencoder network. The data collected was time series data
from 90-97 sensors around an ESP. The data collected was from electrical sensors, valve position sensors,
well flowrate sensors, sensors that measure fluid properties, and sensors that monitor the operation of the
ESP such as vibration sensors, motor winding temperature, intake and discharge sensors for temperature
and pressure on the ESP.
Data collected from well data and valve data were removed from the data set because of the various
combinations of operational set up used in the field which might not be reflected in the training data set,
removing such tags helped to reduce false alarms during the use of the model in a production environment.
The data set was cleaned with missing values removed, each timestamp was then labelled as stable or
unstable based on the subject matter expert rule for what stable operation for an ESP is. This stable data
was then transformed into z scores and used to train the autoencoder model.
The autoencoder was developed using the Keras deep learning library in Python, details of its parameters
can be seen in the table below:

Parameter Value

Number of Layers 7

Activation function Exponential Linear Unit

Optimizer Adadelta

Loss function Mean Squared error

Input layer dropout 50%

Hidden layer dropout 50%

Early stopping used True


OTC-30468-MS 5

To avoid overfitting, input layer dropout was applied as well as dropout within the hidden layers. As an
added step, early stopping was also applied during training.

AUTOENCODER APPROACH TO ANOMALY DETECTION IN ESPS

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
An Autoencoder is a type of artificial neural network used to learn efficient data encodings in an
unsupervised manner. The aim of an autoencoder is to learn a representation for a set of input data and to
reproduce this input data in the output. An autoencoder in its simplest form is a feedforward neural network
with the exception that the number of neurons in the input layer is the same as the number of neurons in
the output layer.

The image above shows a schematic of an autoencoder, it consists of an encoding section and a decoding
section. The encoding section compresses the dimension of the data to a lower dimension and by doing this,
it forces the network to learn salient new features about the input data. The encoder section acts in a manner
to PCA for dimensionality reduction, it however, performs this dimensionality reduction in a non-linear
manner unlike PCA. The decoder section reproduces the output from the features learnt in the latent space.
The mere reconstruction of the input data is not useful in itself, it is the inability of the network to
reconstruct a given input data that holds useful applications, this is because, an autoencoder is only able to
reconstruct data similar to what it was trained on; if it is trained on stable data points, it would experience
difficulty reconstructing unstable data points. It is this feature of an autoencoder which allows it to be used
for anomaly detection.
Autoencoders are lossy models, this means that as the model tries to reconstruct the input data, there
would be some loss of information. This loss of information is minimal for data similar to what the model
was trained on, and significantly more for data different from what the model was trained on. This loss
of information is characterized by the reconstruction error of the autoencoder, which is calculated by the
equation below:

Where:
x = Vector of input sensors (vector of size N, where N is number of sensors / tags in the dataset used to
build the model)
x’ = Model reconstruction of sensor values
The reconstruction error of the autoencoder is calculated as the difference between the input vector to
the model and its predicted output vector. As can be seen from the equation, reconstruction error is a vector,
of the same shape as the input data. A useful way to summarize this vector to a single number is to find
6 OTC-30468-MS

the mean of the squared reconstruction error (MSE), this value is used as an anomaly score for the system.
This value is computed according to the equation below:

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
Where:
Reconstruction Error = difference between input sensors and their reconstruction
N = Number of sensors used to train the model.
MSE = Mean Squared Error (anomaly score)

Root cause analysis


The autoencoder model flags anomalous point through pattern recognition of stable data. In order to
determine the sensors responsible for the anomaly detected, we investigate the reconstruction error vector.
We can assume that, if the model is finding it difficult to reconstruct a tag or sensor, it is because that tag
is the cause of the current state of the system and would have a higher error value in the reconstruction
vector compared to other sensors.
The reconstruction error vector is arranged in decreasing magnitude, and each sensor is mapped to an
error value in the vector. The top 10 sensors are gotten from this vector based on the size of their error value.

Determination of anomaly threshold


After training of the autoencoder, the entire stable data points are passed through the model and the mean
squared error for each time stamp is determined. When the histogram of the logarithm to base 10 of the
mean squared error values is plotted, the image below is gotten.

The mean squared error value for stable data follows a gaussian like distribution, while that of unstable
timestamps follows a different distribution. The mean and standard deviation of this distribution can be
determined and used as anomaly threshold for the dataset. Data points whose mean squared error value
is 3 standard deviations from the mean are flagged as an anomalous data point. One shortcoming of this
approach assumes that all sensors are to be treated equally (errors from an electrical sensor are just as
important as errors from a temperature sensor) this is not necessarily the case as some sensors are of more
OTC-30468-MS 7

concern to the ESP than others. In future iterations of the current solution, a more weighted approach to
anomaly scoring would be implemented.

REAL TIME IMPLEMENTATION

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
After the model was trained and validated on historical data, the model and the supporting python program
were deployed in a docker container on a Linux server. Every 10 mins, data is downloaded from the process
historian database and passed through the machine learning model. The machine learning model outputs
the mean squared error and the top 10 tags of interest at that point in time. The operators of the electric
submersible pumps receive an email alert with the model result if the timestamp is seen to be anomalous.
This helps the engineers with more proactive troubleshooting as to the cause of the current state of operation
of the ESP. The model results are written back to the process historian database so that the engineers can
visualize the results in any visualization tool of their choice.

RESULTS

This section outlines the results for the different ESPs used in this study, in each case, the model was able
to detect events such as gas locks, riser instabilities and electrical issues. The image above shows how the
anomaly score for an ESP rises before an event and then reduces after the system returns to stability.
The approach was first tested out on one ESP, and subsequently replicated on the remaining three ESPs.
For the first ESP, the autoencoder was able to detect gas locks and riser instability with a median detection
of 6 hours, minimum detection time of 1 hour and maximum detection time of 15 hours. ESP (number
2) experienced gas locks (20 hours detection time) and riser trips (6 hours detection time), and the model
8 OTC-30468-MS

eventually detected the electrical problems which led to the final pump failure as early as 18 days prior to
the actual failure.
On the third ESP, the model detected gas lock 3 hours in advance and gave prewarning of a degrading
electrical system 100 days prior to the end of the ESP. The fourth ESP experienced gas locks and electrical
issues which were detected by the autoencoder, the gas locks were detected on average 5 hours in advance

Downloaded from http://onepetro.org/OTCONF/proceedings-pdf/20OTC/1-20OTC/D011S013R006/2339996/otc-30468-ms.pdf/1 by University of Engineering and Technology Lahore user on 04 February 2023
while electrical issues were detected 2 days prior to an event.

CONCLUSION
We have demonstrated that autoencoders can be used for the intelligent surveillance of electric submersible
pumps by analyzing multivariate time series data from several sensors on and around an ESP. This approach
combines anomaly detection and Root cause analysis into one single model, reducing the complexity from
having to maintain code for multiple models.

FUTURE WORK
The autoencoder approach has shown to be suitable for the intelligent surveillance of Electric Submersible
Pumps, however, this approach doesn't consider the temporal nature of the data set into the encoding. Other
autoencoder variants which would consider the temporal nature of the data set would be investigated in
future iterations of this project.

ACKNOWLEDGEMENT
I would like to thank Igor Debacker, (ESP Surveillance Manager) for the BC-10 field for his Subject matter
expertise and validation of the model results, and Robert Rivera for serving as co-product owner I would
also like to thank the members of the digital team for allowing the project to run smoothly – Deval Pandya
(Lead Data Scientist) for his leadership on Data science methodology, Oscar Warner (Data Engineer) for
his data engineering expertise and Vanessa Sun for ensuring we handled the project in an agile fashion.

REFERENCES
1. Bangert, P., & Sharaf, S. (2019, April 22). Predictive Maintenance for Rod Pumps. Society of
Petroleum Engineers. doi: 10.2118/195295-MS
2. Jansen van Rensburg, N. (2018, November 12). Usage of Artificial Intelligence to Reduce
Operational Disruptions of ESPs by Implementing Predictive Maintenance. Society of Petroleum
Engineers. doi: 10.2118/192610-MS
3. Marra, F., & Girard, C. (2017, April 24). Advanced Electric Submersible Pumps – Added Value
for Offshore Fields. Society of Petroleum Engineers. doi: 10.2118/185159-MS
4. Dunham, C (2013 May) 2013 27th ESP Workshop- Summary of Presentation. Retrieved
from https://www.spegcs.org/media/files/files/cebfcc3a/2013-ESP-Workshop-Summary-of-
Presentations.pdf
5. Gupta, S., Saputelli, L., & Nikolaou, M. (2016, September 26). Applying Big Data Analytics to
Detect, Diagnose, and Prevent Impending Failures in Electric Submersible Pumps. Society of
Petroleum Engineers. doi: 10.2118/181510-MS
6. Pandya, D., Srivastava, A., Doherty, A., Sundareshwar, S., Needham, C., Chaudry, A., &
KrishnaIyer, S. (2018, April 30). Increasing Production Efficiency via Compressor Failure
Predictive Analytics Using Machine Learning. Offshore Technology Conference. doi:
10.4043/28990-MS
7. Urban, A., Boechat, N., Haaheim, S., Sleight, N., Debacker, I., & Rivera, R. (2015, October 27).
MOBO ESP Interventions. Offshore Technology Conference. doi: 10.4043/26125-MS

You might also like