Sei sulla pagina 1di 12

SPE-196159-MS

Artificial Intelligence Applied in Sucker Rod Pumping Wells: Intelligent


Dynamometer Card Generation, Diagnosis, and Failure Detection Using
Deep Neural Networks

Yi Peng, PetroChina Riped

Copyright 2019, Society of Petroleum Engineers

This paper was prepared for presentation at the SPE Annual Technical Conference and Exhibition held in Calgary, Alberta, Canada, 30 Sep - 2 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
For most of the mature fields, the oil well operation and maintenance expenditures continue to put financial
pressure on the operators in the low oil price period. Digital oilfields and artificial intelligent technology
are the major areas invested to fight for declining oil production and increasing cost. This paper provides
a novel artificial intelligent method to monitoring and diagnose the sucker-rod pumping wells using deep
learning algorithms.
Traditional method using load and displacement sensors to measure the dynamometer card needs large
investment on the equipment installation and maintenance. We build a general model that generates the
dynamometer card from electrical parameter using state-of-art deep learning algorithms. The deep learning
algorithms can analyze the relationships between the electrical data and corresponding dynamometer card in
different conditions, which is very hard for human being to detect. In addition, we build another automated
diagnosis deep learning model from thousands of dynamometer cards labeled with different classifications.
We have already tested these newly developed artificial intelligent models on hundreds of sucker rod
pumped wells in different oilfields in PetroChina. The field test results show that the dynamometer cards
generated from electrical data have above 90% similarity compared to the real dynamometer, which meet
the requirement for well diagnosis. The card generation model is stable and prevents the disturbance of
hostile environment change and sensor failures. The automated diagnosis model also proved to be a good
substitute to the conventional software, with above 95% prediction accuracy. The automated diagnosis
model reduces the liability and uncertainty of traditional diagnosis software and can integrated with the
former dynamometer card generation model to fulfill well monitoring and diagnosis automatically without
any physical model based calculations.
These models developed with artificial intelligent technology will be important components in the
"Intelligent Fields". They can also be embedded in the IIoT edge computing machines for automatic
diagnosis and control. For ultra-low production wells and the newly producing wells utilized this method,
operator can save expenditure and human resources tremendously.
2 SPE-196159-MS

Introduction
Sucker-rod pumping system is the most widely used artificial lift method in producing wells, which account
for more than 80% around the wolrd and more than 94% in China. In PetroChina there are at least 200,000
wells producing with daily production less than 10 barrel of oil and more than 90% water cut. The ultra low
production and high cost of operation and human resources made the company’ profits lower than 5% of
its total income. Lowering the cost and improving the operation efficiency become our first priority during
this long low profit period.
Information and artificial intelligence technologies are the major methods to make differences for modern
companies, which also suitable to traditional oil and gas companies. With the success of Alpha-Go and self-
driving car, more and more companies are investing huge money on ai technologies and realize that this
innovative technology are changing our world much faster than we thought with the help of IoT and big
data. The companies of traditional industry hope to leverage ai to empower the machine with the intelligence
of human that can perform some repeative daily tasks for human with less chance of mistake and lower cost.
In the petroleum industries especially in the oil and gas upstream, the best scenario of implemting
the ai technology for improving effiency is the petroleum production engineering. After the drilling and
stimulation jobs, the rest expenditure and resources will be spent on well production. Generally speaking, a
sucker-rod pumping well can produce for dozons of years. Nevertheless, the total expenditure on equipments
and resources for well monitoring, maintenance and optimization within years constitute almost all of its
total operation cost. Hence, the operator launched several pilot research projects of ai technology application
on production engineering for trails.
Beside its potential for improving effiency, years of testing and monitoring data collected during
production lay a solid foundation for ai technology implementation. All the data come from surface sensors
with very high accuracy and the history datasets from thousands of wells in different producing phase of its
full life circle provide wide varieties and good distribution for building a more generalized model.

Dynamometer Card
The worldwide used sucker-rod pumping system is comprised of a motorized horse-head assembly, rod
strings and a pump in the wellbore. With the rod moving up and down, the standing valve at the bottom and
the travelling valve attatched to a rod open and close periodically that allow the fluid to pass through from
downhole to the surface. The journey of the travelling valve from top of the well to the bottom and back
up again is called a stroke (Patrick 2019). During this process, we measure both the load and displacement
simultaneously at each time step during the one full stroke. We normally plot these two parameters in
the same time step, this graph is known as dynamometer card, see figure 1. This paper will focus on the
dynamometer card as it is a significant source for diagnosis and optimization of sucker-rod pumping wells.

Figure 1—An example of a dynamometer card


SPE-196159-MS 3

Card Acquisition Problem


The traditional method for dynocard acquisition relies on costly sensors, which account for 30-50% of
the total cost of digital oilfield IoT infrastructure. This huge investment on sensor initial installations and
frequent follow-up maintenance often hinder the oilfield digitalization, especially in low production and
high water cut wells. Figure 2 shows the dynamometer card acquisition, format of that data and its usages

Figure 2—Dynamometer card acquisition and usages

Card Diagnosis Problem


Dynamometer card is essential for well diagnosis and optimization and it is a common practice to evaluate
the well condition by using the card data. Gilbert found that the shape of the card represents a certain
working condition of the pump downhole (Gilbert 1936). Figure 2 illustrates some typical well working
conditions (Sayed 2019). An experienced production engineer can diagnose these conditions precisely just
by just looking from the shape of the cards.
In the production engineering industry, we measure the displacement and load parameter at the top of
the rod for they are very difficult to measure directly on the moving rod. It is now an industry standard to
calculate the downhole conditions by solving the wave equation and other calculated parameters such as
intake pressure and frictions. The accuracy of downhole pump card relies on the accuracy of the inferred
parameters used in the equation and the approximating friction laws. Most importantly, the downhole card
is an intermediate variable and may change during one production period. The last diagnosis result from
downhole card using complex and large quantity of calculations may be the same as the results inferred
from surface card in the perspective of experienced production experts.

Figure 3—Typical pump card with different conditions


4 SPE-196159-MS

Objectives
Despite the importance of the dynamometer card, the traditional acquisition method is not economic for its
huge initial investment on sensors and annual maintenance cost to operators with decreasing oil production.
Operators strive to find a compromise solution to obtain the surface card data with relative low cost
inputs and accuracy loss. As for the card diagnosis aspect, the operator also tries to diagnose the minute-
level sample rate card data automatically in real-time with less field engineers involved in the traditional
optimization process. And this automation can free up more staff to focus on concrete fixing jobs instead
of determing which well need attention. The solution of reduction on sensor expenditure and diagnosis
automation can improve the operation efficiency and operation budget much better.
This paper presents an application of artificial intelligence technology to generate the card data directly
using only electrical power curves with very low cost and diagnose the well working condition automatically
in the real-time.

Dynamometer Card Generation Solution


The electrical parameter is an acquisition standard practice in PetroChina and huge continuous data with
high resolution has been stored in the database without any deeper analyzed. This time series data has not
been widely used for analysis and diagnosis for its complicated rules. Nevertheless, a few sophisticated
experts can extract some important information like well working condition and equipment health by
looking the shape and changing trend with intuition and experiences. The key problem is how to extract
information from this continuous changing variable.

Using Electric Power Curves


It is much easier and cheaper to get the electrical data and there are other reasons to use this kind of data.
Electrical data and dynamometer card are both the results of lifting the liquid to surface driven by the moter.
The card data represents the displacement and load changes of the polished rod when lifting the liquid to
the surface. And the electrical parameter shows the efficiency when lifting the liquid in each time step.
Any changes in the borehole, rods and pumps will eventually demonstrate in both electrical power and
corresponding surface cards. In addition, they will change simultaneously depending on the downhole
condition. One data changed, the other data would change accordingly. Apparently, there are strong
correlations between surface cards and electrical power data. So our solution becomes to find the pattern
between the electrical power data and the surface card.
Above that, electrical data is a real-time, continuous and high resolution data that can give us a more
detailed and continuous information about the well working condition. The very low data cost and large
sample sets helps a lot when building our models
There are many researchers in China have been studying the relations between electrical data and surface
card since 1990s (Li Hujun, Feng Guoqiang and Liu Kexin). In theory, we can easily calculate the electrical
data from surface card (Figure 4). And they build some theoretical model to inverse the card from the
electrical power. Some parameters in the formulas cannot be measured and some assumptions of the values
made the card calculation inaccurate and unstable
SPE-196159-MS 5

Figure 4—Workflow and problems of the theoretical method

This theoretical model of inversing the card from electrical data model is not practical in the field. The
model have some limitations. First, this method assumes the pumping unit is fully balanced. Second, we
need to know some structural parameters, which is not easy to get, and the calculation is complicated. Most
importantly is that there is convergence problem at the top and bottom of the stroke, where the torque
factor is too small which make this equation often unstable. As for we get the input data (electrical data)
and its corresponding target (dynamometer card data), we can change our problem-solving mode from
traditional theory-based model to data-driven model without building the theorical formala, especially for
some complicated problems.

Deep Learning
In our traditional method, we build the rules first, we feed in the data to the rules, and it give us the answer.
However, in machine learning method, we have the data and the corresponding result of the input data, and
the rules are learned automatically from the dataset. Deep Learning is a subfield of machine learning. This
mehod cannot understand the data much deeper. It just stands for the successive layers of representation
from data. Modern deep learning involves tens or even hundreds of successive layers and the weights are
learned automatically from the training data (Francois Chollet). So in this project, we explore to develop
deep neural networks to generate the dynamometer cards directly from electrical power curves and reduce
the investment on card acquisition sensors.

Deep Learning Model Architecture


Here is the structure of our deep learning model (Figure 5). We have two neural networks. First, we train
a deep convolutional antoencoder to get the latent feature representation of the cards. Second, we build a
fully connected network to train the features of electrical power data and its corresponding latent features
of the card. After the model is trained, we feed in the electrical data. The electrical data is transformed to
the latent features and we use the decoder to reconstruct our final dynamometer card data.
6 SPE-196159-MS

Figure 5—Dynamometer card generation deep learning model architecture

Autoencoders is a type of neural network with layers organized in an hourglass shape of contraction
and subsequent expansion (Jeremy Liu), such a network can learns to automatically compact into a set of
new abstract features with minimal information loss. Autoencoder is often used for data compression in
signal processing or dimensionality reduction. The autoencoders is a simple model structure whose goal is
to reconstruct its input. The input is first mapped to a latent code, which is typically lower dimensional than
the input. The encoder tries to encode all of the useful information about the input into the latent code, and
the decoder tries to reconstruct the input based only on the information in the latent (Colin Raffel).

Dynamometer Cards Generation System Workflow


Figure 6 illustrates the workflow of our card generation system. We collect millions of monitoring and
testing records from hundreds of wells in one operator in China. The electrical power data and corresponding
dynamometer card data in the same stroke are the must required data for our model. And the related well
parameters like reservoir property, pump, rod, motor types are also collected for check the well distributions.
Data processing work takes the most of the time for building this model. For processing the electrical data,
we have to extract integer-strokes and resample the each stroke to fixed numbers of data. For dynamometer
card data, we need to plot the load and displacement data without the axises and transform it to a grayscale
image with filled white in the area. The features of the card are generated from the autoencoder neural
networks mentioned above. Then we train our deep learning model using these features and compare with
measured cards until we get a good accuracy. After the model was built, we provide an API to our operator,
they send the electrical data in json, and the model will return the calculated card. The model can be updated
as long as we keep increasing the sample data.
SPE-196159-MS 7

Figure 6—Dynamometer cards generation workflow

Data Pipeline
We build a data pipeline to complish data loading, cleaning and feature selction. The final results are the
vectors that can be directly feed into the deep learnin algorithms.
Data Collection. We collect the millions of monitoring and testing records from hundreds of wells from
one oilfield in China. The electrical data must be continuous with high sample rate and the corresponding
dynamometer card must be recorded simultaneously. The dynamometer card in one stroke need at least
contain 200 time steps. And the electrical power data can have a higher time-steps. The best choice of getting
these one-by-one data we record the load, displacement and electrical power data simultaneously in the
same system with more than 200 time-steps in one stroke. The number of the time-steps in each sequences
of these data must be the same. Table 1 shows the a record of the required datasets.

Table 1—Data Format of the dataset


8 SPE-196159-MS

Data Processing.

• Normalization

The card data and electrical data are acquired from different wells by different equipments. To remove the
discrepancy between different wells and different motors,we normalized our input and output data using the
MaxMin normalization (Figure 7). In another perspective, the shape of the electrical parameter are related
to the shape of the card data. And the latter card diagnosis task focus on the shape of the card, too. So after
the MaxMin normalization, all the data are compared in the same standard.

Figure 7—MaxMin Normalization(Left-Dynamometer Card, Right-Electrical Power)

• Electrical Data Regularity

As there are many contractors for building the monitoring and accquistion system of IoT data of the
wells. The format of the data and the number of time-step in each stroke are not unite. Some extract the
electrical data in the fixed time interval and other collect the data in fixed time-steps that cause various
scale of the input data. The objectives are that we need process the data into integer strokes (>3) and fixed
number of time-steps in each stroke.

Figure 8—Electrical Data Processing

• Card Processing (Numeric to Image)


SPE-196159-MS 9

After the card data being normalized from 0 to 1, we need to transform the card data to image with
only one channel with grayscale. Some black border need to add to center the card to make it easy for
training. The 100×100 shape images are feed into the autoencoder for features extraction which can be used
to reconstruct the card data and used for the target data as the latter fully connected neural network.

Figure 9—Card Image Processing to Pixels

Field Application Result


According to the low cost Iot strategy of PetroChina, low production wells or newly producing wells will
use this ai technology to generate the dynamometer cards for monitoring on trial. Before its large promoted
application, we use some existing wells with sensors for validations. Here we present a few validation results
with the measured dynamometer cards in from Figure 10 to Figure 15.

Figure 10—Normal

Figure 11—Normal
10 SPE-196159-MS

Figure 12—Gas Effect

Figure 13—Gas Effect

Figure 14—Overpumping

Figure 15—Overpumping

A graphical comparison by overlaying predicted surface cards from the deep learning algorithm and
the measured cards from sensors has been conducted. The model demonstrates very good results that the
calculated cards are very similar to the measured ones in the card shape. And the average error of the card
area and the boundary of load and displacement are restricted in 10%. The card generated from the deep
learning neural networks is completely applicable to the card diagnosis programs that are image-based.
After the successful application of pilot projects, its large application and its scalable application embedded
in the IoT equipment will save huge expenditures on new investment and maintenance

Dynamometer Card Diagnosis Solution


Dynamometer card has been transformed to the grayscale images and with pre-labled well working
condition by the experienced expert and sophisticated commercial software (Figure 16). It has been changd
SPE-196159-MS 11

a multi-class classification problems in machine learning. And the CNN is known as be capable of image
classification. As we collcect more than 200,000 labeled images, the classification result is destined to have
a very high accuracy for the 10 classes. A typical architecture of CNN is shown in Figure 17. The input layer
is an image represented as pixel values. This conventional image classfification task reached an accuracy
more than 98%.

Figure 16—Most common well working conditions collected from our database.

Figure 17—Most common well working conditions collected from our database

Conclusion
Using the deep learning model to predicted the card data from electrical parameter proved to be feasible
as long as we train the model with huge and various data. The predicted card have a good correspondence
with the measured card.
A potential downside is that the predicted card has been smoothed. We can clearly see from the pilot
project that the load values in measured card have big fluctuation than predicted one. Some detailed
information may have been smoothed when using the deep learning model. The predicted card may not be
suitable for quantitative calculation.
The well working condition diagnosis model demnonstrate very good accuracy with the existing data,
and the next step is to increase dataset of the special working condition.

Acknowledgement
We would like to thank the Exploration and Development Company in PetroChina for funding this research
project. We also would like to thank Changqing, Huabei, Xinjiang Oilfields for providing the data for the
research project.
12 SPE-196159-MS

Patrick Bangert. 2019. Application of a Pattern-Matching Expert System to Sucker-Rod, Dynamometer-Card Pattern
Recognition. SPE-194993-MS presented at the SPE Middle East Oil and Gas Show and Conference held in Manama,
Bahrain, 18-21 March 2019
Gilbert, W.E. (1936): An Oil-Well Pump Dynagraph. Drill. and Prod. Prac., API
Gibbs, S.G. (1963): Predicting the Behavior of Sucker-Rod Pumping Systems. SPE 588. SPE Rocky Mountain Regional
Meeting, Denver, May 27-28, 1963.
Gibbs, S.G.; Neely, A.B. (1966): Computer Diagnosis of Down-Hole Conditions in Sucker RodPumping Wells. SPE 1165.
Journal of Petroleum Technology, January 1966, 93-98
Ian Goodfellow, Yoshua Bengio, and Aaron Courville. 2016. Deep Learning. The MIT Press.
Hinton, G E and Salakhutdinov, R R. "Reducing the dimensionality of data with neural networks." Science 313, no. 5786
(2006): 504–507.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. 2012. ImageNet classification with deep convolutional neural
networks. In Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1
(NIPS'12), F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (Eds.), Vol. 1. Curran Associates Inc., USA,
1097–1105.
Sayed Ali Sharaf, Tatweer Petroleum; Patrick Banger. 2019. Beam Pump Dynamometer Card Classification Using
Machine Learning. SPE-194949-MS presented at the SPE Middle East Oil and Gas Show and Conference held in
Manama, Bahrain, 18-21 March 2019
Francois Chollet, Deep Learning with Python, Manning Publications, 2017
Li Hujun, Zhang Jifen, Zhi Lianyou. Predicting Dynamometer Cards by Actual Motor Power Curves [J]. Petroleum
Geology & Oilfield Development in Daqing, 1991, 10(4): 63-67.
Feng Guoqiang, Xie Xiong, Han qiqing, et al Real-Time Analysis Model of Rod-Pumped Well System Performance [J].
Journal of China University of Petroleum, 2010, 34(4): 84-88.
Liu Kexin. The Study on Electrical Parameter Inversion of Dynamometer Card for Pump Well [D]. Daqing: Master Thesis
of Northeast Petroleum University, 2012: 10-14. 4.
Peng Yi. 2019. Innovative Convolutional Neural Networks Applied in Dynamometer Cards Generation, SPE-195264-MS
presented at the SPE Western Regional Meeting held in San Jose, California, USA, 23-26 April 2019
Xishun Zhang, Junfeng Shi, and Ruidong Zhao, Research and Application of Electric Power Curve Inversing
Dynamometer Diagram Technology Using Big Data Approach, SPE-189200-MS presented at SPE Symposium:
Production Enhancement and Cost Optimisation held in Kuala Lumpur, Malaysia, 7-8 November 2017
ColinRaffel, A Few Unusual Antoencoders,online material
Liu, Yintao. Failure Prediction for Rod Pump Artificial Lift Systems. ProQuest, UMI Dissertations Publishing, 2013.
Jeremy Liu, Ayush Jaiswal, Ke-Thia Yao, Cauligi S. Raghavendra, 2015, Autoencoder-Derived Features as Inputs to
Classification Algorithms for Predicting Well Failures, SPE-174015-MS presented at SPE Western Regional Meeting
held in Garden Grove, California, USA, 27–30 April 2015

Potrebbero piacerti anche