Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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.
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.
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.
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).
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.
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.
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.
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 10—Normal
Figure 11—Normal
10 SPE-196159-MS
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
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