SPE-196861-MS Understanding Well Events With Machine Learning
SPE-196861-MS Understanding Well Events With Machine Learning
SPE-196861-MS Understanding Well Events With Machine Learning
Vitaly Elichev and Andriy Bilogan, Wintershall Dea GmbH; Konstantin Litvinenko, Rinat Khabibullin, and Alexey
Alferov, Gubkin University; Alexey Vodopyan, Alta Engineering LLC
This paper was prepared for presentation at the SPE Russian Petroleum Technology Conference held in Moscow, Russia, 22 – 24 October 2019.
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
The key to successful planning of well interventions and other well actions is to understand the current
state and the history of the well. Due to the large spread of telemetry systems with high-frequency (up to
1 measurement per second) measurement of parameters, it is possible to use machine learning methods for
well events recognition. In this paper we consider well analysis with, aim to identify equipment failures and
other influences affecting the behavior of wells.
Typically, several parameters are recorded at the wellhead with high frequency: wellhead and bottom-
hole pressure and temperature, flow line pressure and temperature. Also, readings of downhole measuring
devices and well logs are periodically made and recorded. The readings of well parameters can be influenced
by many factors: manual manipulations on the well, changes in the composition of the produced products,
well integrity issues and others.
This work suggests an approach that allows to identify and classify events at the well. The approach is
based on the results of constructed synthetic dynamic models of wells and observation of the real behavior
of wells. It allows to identify the behavior of individual measured parameters and classify events using all
measured parameters in aggregate.
The proposed algorithm allows retrospective analysis of data and identification of different events,
such as well tests that occurred in the past. The algorithm also allows the analysis of incoming data
and identification of well events in real time. Retrospective analysis of the data was useful not only for
detecting anomalies and malfunctions, but also for building a real log of events at the well, monitoring well
interventions and building reports on well performance. The analysis of event records demonstrates that
only minor part of well events is normally captured in central databases.
The developed algorithm for natural flowing wells can be easily extended to wells equipped with
mechanized oil production systems. For example, for wells with a gaslift or ESP installation. The algorithm
can be easily integrated into corporate monitoring systems as an auxiliary tool.
Introduction
We rely on different models to improve the efficiency of field and well management. Mathematical
models of reservoirs, wells, reservoir fluids and oil production facilities allow us to make forecasts and
2 SPE-196861-MS
make decisions based on such models. An important element ensuring the applicability of forecasts is the
adaptation of models to real data. The process of adaptation is necessary for all models - complex and
simple, both for dynamic reservoir models and for models of oil production potential based on Darcy law.
For machine learning approaches, which have been actively pursued in recent years in the oil industry,
adaptation is a key step. The word "learning" in the name Machine Learning is responsible for adapting
the model's adaptation to reality. At the same time, the process of adaptation of machine learning models
differs markedly from the adaptation of classical models.
One of the distinctive features can be described as follows: in classical models, the number of variables
- the degrees of freedom for adjustment is much less than in the models of machine learning. In classical
approaches we often search for separate parameters of models - permeability, productivity, wear factor of the
equipment and others. In many cases, these parameters are based on the physical sense of the model or the
physical intuition of the engineer working with the model. Often successful adaptation of such parameters
by the engineer is achieved by "manual" selection of good parts of input data, sometimes even by conducting
special studies, which provide a mode of operation that eliminates the influence of extraneous factors and
noise.
Machine learning models offer a different approach - the need to adjust many model parameters is
compensated by many observations and a limited set of answers that we expect to get. For example, in one
of the approaches one observes the model dynamics for hundreds of wells, all the recorded parameters of
their work for a certain period (for example, for a year) and expect to get forecasts of oil rates for a month
in advance for several different scenarios. Unlike the classical approach, we do not think much about the
physical meaning of the models and tweaked parameters, expecting that the data already have the answers
we need.
Unfortunately, this direct approach to machine learning methods does not always yield the expected
results. We believe that one of the key reasons is that our data is not always accurate enough. In addition
to the necessary information to get an answer (we believe it is in the data), the data contains a lot of noise.
When adapting the classical models, an engineer can eliminate a part of the noise and not take into account,
for example, the periods of stable operation of the well, when external factors influence the minimum,
highlight the periods of launch and shutdown of the well on the basis of pressure measurements, highlight
the moments of change in the ESP installation operation mode on the basis of indirect signs even without
having detailed information on the equipment operation. This allows him to assess which data areas are most
valuable for adaptation and successfully build the necessary model. As a rule, machine learning algorithms
cannot separate informative data from noise in the initial data. Preprocessing of initial data becomes critical
for such type of algorithms. One of the elements of preliminary data processing is the identification of events
in the data and various patterns of well behavior. This work is devoted to the description of approaches that
can help to identify events in the well, to understand its behavior based on regularly measured parameters of
its operation, such as wellhead pressure and temperature, electrical parameters of submersible equipment,
parameters of control systems - valves, etc. In today's fields, more and more data are being recorded on a
regular basis at high frequencies. Extraction of value from these data - their transformation into information
and subsequent solutions - the general task of operation control and the block of event detection can be one
of the significant elements of the control system.
The following types of events can be identified on the well, which can influence the change dynamic
parameters:
• Reaction to control actions - change of operating parameters caused by artificial impact on well
and well equipment. It can be a change of choke size, change of the ESP frequency, change of the
operation mode of the separator collecting the downhole production.
• Reaction to changes in flow parameters in formation - changes in parameters caused, for example,
by a gas breakthrough from a gas cap or a sharp change in watercut, decrease in reservoir pressure.
• Reaction to changes in flow parameters in the well and in surface facilities - changes in parameters
due to changes in the flow regime of multiphase mixture with the growth of the gas factor, the
influence of neighboring wells operating in the same oil gathering reservoir, daily changes in
parameters.
• Influence of measuring instruments - change of parameters during recalibration of flowmeter,
sensor replacement, influence of environment on measuring instruments. As a rule, these are errors
that are not related to the investigated object.
• Well equipment failure or well integrity violation - changes caused, for example, by formation of
leaks in tubing or production string, partial or complete failure of well equipment.
Additionally, events can be divided into:
• Expected activities - changes in signals based on known patterns. These may include start/stop of
the well due to operator actions, planned technological operations, daily fluctuations of parameters
in case of temperature changes.
• Unexpected events, anomalies - changes affecting known patterns. For example, violation of well
integrity, equipment failure, etc.
• Noise - changes in the signal not related to well and/or reservoir events. Changes that do not carry
any semantic load.
Theoretically expected well events, especially those caused by field crews, should be recorded in field
reports. However, the practice in many fields shows that only major events directly affecting production
are recorded (and not always), and many minor operations and impacts on the well remain unrecorded
(Khabibullin 2017). This does not cause significant complications during normal operation of the field.
On the contrary, it is often useful to work as a filter and allow production engineers to focus on important
events. However, when trying to use this data for blind machine learning algorithms, this creates difficulties.
Machine learning algorithms must be adjusted not only for reservoir and well behavior determined by
physical processes and equipment operation, but also for "filters" involved in field reporting.
This leads to the fact that the formation of algorithms to detect anomalies in wells (the relevance of this
task, as a rule, is not in doubt) is impossible without the identification of all the events - and expected
(understandable), and noisy and unexpected. The task of classifying the identified events is also relevant.
The areas of application of such algorithms are the control of the field development status, control of the
technical condition of wells (well integrity, wellhead and downhole equipment) and control of the process
personnel during well operations. The article will provide several examples from these areas.
In oil engineering practice, modeling is common to assess the potential and production growth from well
interventions. Most of the models are steady-state and work with average values of well parameters. Their
main drawback is their low accuracy and impossibility to estimate dynamic short-term events.
More complex transient models require more raw data, which is not always easy and fast to obtain. And
even if much of the data is available, it takes time to "knock down" the model with the field data. In addition,
the data inevitably contain errors.
4 SPE-196861-MS
Autocorrelation approach based on recurrent neural networks. One of the approaches for detecting
anomalies in data is the detection of novelty in data (Pimentel 2014). The idea of the approach is to teach
the model on normal data, during which the system will reveal internal correlations between variables. And
then, when analyzing real data with anomalies on the change of the novelty coefficient, it is possible to
determine at what point in time the anomalies occur.
Initially, the novelty coefficient is high and decreases over time due to the model's study of signal behavior
patterns. At change of a pattern of behavior, for example at occurrence of new physical factors, correlations
between parameters change, and the factor of novelty sharply increases. This increase allows the event to be
identified and different behavior patterns to be identified. Figure 1 shows the idea applied to real-well data.
Convolutional neural networks. Convolutional neural networks are widely used in computer vision tasks.
In the case of anomalies detection, the convolution network can be trained to memorize typical patterns
in the work of the system presented as graphical images. Convolution helps to minimize such images of
data in a combination of data of different dimensions to create a characteristic description of the pattern.
SPE-196861-MS 5
When the system behavior changes, a new relationship between the data will appear and the characteristic
description will change (Figure 2).
When training the neural network, it is necessary to mark up the events on the well in advance - to break
the signals into different classes, including the usual behavior of the well, various operations, equipment
failure, breach of integrity and others. The behavior of the signals for some events is obvious. Synthetic
simulation on transient simulators can be used to understand complex processes. These data can also be
used to teach the model if such events have not been detected in the actual data but are likely to occur.
6. Recovery of missed data. In some words, the source data may contain spaces that can be eliminated.
For example, due to flowmeter failure, well production data may not be available for some periods.
They can be restored based on the detected events and other parameters - for example, at the moments
of the well operation the flow rate is estimated by the physical dependence of the pressure drop per
connection, during the shutdown period it is zero.
7. This concludes the preliminary data preparation stage. A set of dynamic parameters of the system,
both measured and restored, as well as a set of events has been formed. Further, these data can be
used for meaningful analysis - for example, to predict production, identify anomalies in the events,
and so on.
This approach can be clearly configured to generate a real-time monitoring algorithm. For this purpose,
the stages starting from the third stage should be closed in the cycle of new data coming from the change
systems with a specified time window. The task becomes more complicated in comparison with the
retrospective analysis because of the necessity to estimate the parameters of the time window, but at the
same time the algorithm does not change at the qualitative level.
Case 1. As part of the first case, a production well was selected in a remote onshore field. Several wells
experienced challenges with integrity. The task was to assess the technical condition of the well according
to measurements on the surface and early detection of issues in the well equipment.
For the analysis of the well operation, an initial set of high-frequency data was collected: well head
pressure (WHP), flow line pressure (FLP), flow line temperature (FLT), annulus pressure (APA) and annulus
pressure B (APB). The frequency of measurements is about 10 measurements per hour. And, low-frequency
data were collected, such as: measurements of flow rates, gas-oil ratio and water cut, choke sizes and a list
of measures taken at the well. Frequency of measurements - several measurements per month.
The algorithm for solving the problem was based on the algorithm described above. To solve the problem,
a physical model of the well was developed and synthetic examples of the well behavior under various
scenarios were constructed.
For systematization, it is proposed to create a library of patterns of well behavior, including a description
of the event with the characteristic behavior of the main signals (Figure 4).
SPE-196861-MS 7
The next steps were the initial processing of the data. Resampling and filtering parameters were selected
to bring the data to a single time scale. Since we were interested in the events with an accuracy of about 10
minutes, we chose resampling up to 10 measurements per hour.
Typical well behavior patterns were compared with those observed at the well using the measured
data. Primary processing allowed visualizing all the initial parameters in time and comparing the observed
behavior patterns with synthetic models.
It should be noted that although in the description of the algorithm we have put the study of the physical
statement of the problem and the construction of synthetic examples on the first place (in order to develop
the intuition of the engineer engaged in the development of the algorithm) in fact work on the synthetic
model and the analysis of the initial data was carried out simultaneously and these problems complement
each other.
At the next stage, several hidden parameters were restored based on the initial data - downhole pressure,
maximum allowable pressure in annular space (MAASP) and others.
Analysis was then applied to identify events at the well. First, the expert data markup was applied, and
then a combination of anomaly detection methods was applied for automated event markup.
The dynamics of changes in the parameters shows the moment of change in the correlation between the
buffer pressure and the borehole pressure (Figure 5).
8 SPE-196861-MS
Autocorrelation-based algorithm helps to detect the point of failure of the underground valve. The
following changes are made to the signal recovery error using the autocorrelation algorithm (Figure 6). We
see a clear identification of the torque algorithm in the automated mode.
Case 2. In the second case, an onshore injection well was analyzed. Wells of this field have risks of packer
leakages, cap rock or formation fracturing, therefore the task of early risks identification has been posed.
SPE-196861-MS 9
The initial data were the dynamics of wellhead pressure, water injection flow rates, annular and annular
pressure, downhole pressure and temperature, opening degree of the choke, and well design (Figure 7).
Initially, data was filtered and resampled. For the missing values, the interpolation of the last value was
chosen, since this allows us to preserve the physicality of the data (Figure 8).
For the periods of well shutdown we estimated the dynamics of reservoir pressure and injectivity
coefficient (Figure 9). These data can also be used to estimate the dynamics of well productivity index.
10 SPE-196861-MS
Further, the well operation was evaluated by two methods using the autocorrelation approach and the
modified Hall method (Izgec 2007). We see that both approaches demonstrate, that the well has no problems
with packer integrity or formation fracturing (Figure 10,11).
Case 3. Analysis of offshore production well. The autocorrelation method was used to automatically detect
an operation to test the operation of downhole equipment. The application of the method allows to detect
and record with high reliability the time of the beginning and end of the operation. The example above
shows an example of one of the operations. The given algorithm can work both in real-time mode history
analysis modes (Figure 12,13).
Figure 13—Well performance evaluation – function of losses and novelty for an autocorrelation approach
12 SPE-196861-MS
Conclusions
The combination of anomalies detection methods with physical models allows to identify in an automated
mode the events occurring on the well and classify them. And thus, it helps to prepare well's or other object's
observed data for further analysis.
The given examples illustrate machine learning construction algorithm suitable for solving practical
problems. They demonstrate the importance of both the technical stages of application of new algorithms
(autocorrelation, convolution networks) and the preparatory stages, which require the participation of an
engineer – domain specialist. An example of an injection well illustrates that an engineer, capable of
estimating both reservoir pressure and injectivity from real-time wellhead measurements and classical
schemes of data analysis (Hall graph), can significantly increase the reliability of the model using machine
learning (prediction of values based on autocorrelation).
In general, it is important to note that the first steps of the workflow - the problem statement and traditional
engineering analysis- are the most important points that determine the success of the application of machine
learning methods to solve practical problems. And the process requires joint efforts of both - petroleum
specialists and specialists in computer science and mathematics.
Acknowledgements
The team of authors would like to thank the management of Wintershall Dea GmbH for permission to
publish the article.
References
1. K. C. Gross, K. Vaidyanathan, and M. Valiollahzadeh. Advanced Pattern Recognition for Optimal
Bandwidth and Power Utilization for Intelligent Wireless Motes for IoT Applications,", 17th
Intn'l Conf. on Wireless Networks (ICWN'16), Las Vegas, NV (July 25-28, 2016)
2. V. Elichev, Wintershall Holding GmbH, E. Munoz Wintershall Holding GmbH. Case study of
digital oilfield implementation in the southern North Sea (Russian) Paper SPE 191596, SPE
Russian Petroleum Technology Conference, 15-17 October, 2018, Moscow, Russia.
3. P. Shoeibi Omrani TNO, I. Dobrovolschi TNO, S. Belfroid TNO, P. Kronberger, Wintershall
Noordzee B.V., E. Munoz, Wintershall Noordzee B.V. Improving the accuracy of virtual
flow metering and back allocation through machine learning, Paper SPE 192819, Abu Dhabi
International Petroleum Exhibition & Conference, 12-15 November, 2018, Abu Dhabi, UAE.
4. Andrianova, Alla, Simonov, Maxim, Perets, Dmitry, Margarit, Andrey, Serebryakova, Darya,
Gazpromneft Science & Technology Centre, Bogdanov, Yuriy, Budennyy, Semen, Volkov, Nikita,
Tsanda, Artem, MIPT, Bukharev, Alexander, MIPT Engineering Center. SPE 191601-18RPTC-
RU Application of Machine Learning for Oilfield Data Quality Improvement,
5. Khabibullin R., Sarapulov N. Gazpromneft Science & Technology Centre. SPE 187738-MS
SPE Conference Paper – 2017 Application of Big Data Tools for Unstructured Data Analysis to
Improve ESP Operation Efficiency
6. M. A. F. Pimentel, D. A. Clifton, L. Clifton, and L. Tarassenko. A review of novelty detection.
Signal Processing, 99:215–249, June 2014.
7. B. Izgec, SPE, Chevron ETC/Texas A&M University and C.S. Kabir, SPE, Chevron ETC. SPE
109876. Real-Time Performance Analysis of Water-Injection Wells.