Sie sind auf Seite 1von 8

IBP1484_14

IDENTIFICATION OF VALVE OPENING AND CLOSING


POINTS IN DOWNHOLE DYNAMOMETER CARDS FROM
SUCKER ROD PUMPING SYSTEMS BASED ON POLYGONAL
APPROXIMATION AND CHAIN CODE
Galdir D. Reges Jr.1, Leizer Schnitman 2, Ricardo Reis3

Copyright 2014, Brazilian Petroleum, Gas and Biofuels Institute IBP


This Technical Paper was prepared for presentation at the Rio Oil & Gas Expo and Conference 2014, held between September, 15-
18, 2014, in Rio de Janeiro. This Technical Paper was selected for presentation by the Technical Committee of the event according to
the information contained in the final paper submitted by the author(s). The organizers are not supposed to translate or correct the
submitted papers. The material as it is presented, does not necessarily represent Brazilian Petroleum, Gas and Biofuels Institute
opinion, or that of its Members or Representatives. Authors consent to the publication of this Technical Paper in the Rio Oil & Gas
Expo and Conference 2014 Proceedings.

Abstract
Although the idea for automatic fault diagnosis in Sucker Rod Oil Pumping Systems using Dynamometer Cards has
started in 1936, there is no standard computational solution yet. Differently from the traditional computational
techniques, that analyses the whole contour points of the Dynamometer Card to automatically diagnose the system,
recent works showed that statistical analyses of contour segments, around the approximated valve opening and closing
points, or between then, offer greater accuracy. Based on this modern approach this work provides a new method with
low complexity to identify these points in the Downhole Dynamometer Cards with many extreme shapes. To deal with
noise and unpredicted distortions from combined pumping conditions anomalies, this work uses a polygonal
approximation recognize the general shape of the Dynamometer Card. Line segment codes are extracted from of each
pair of sequential points, based on a Chain Code representation technique. Groups of sequential codes are created by
similarity and then are analyzed. Cycles of contour smoothing and Chain Code analysis are done until the shape fit into
one of the two polygons that represent the general shape of the Dynamometer Cards. Thus, the approximated polygon
corners are the valve opening and closing points of the pumping cycle. The results of this work are based on
Dynamometer Cards of 12 macro possible diagnoses, acquired from real wells, or artificially generated from the
literature and specialists, which are used to demonstrate the feasibility and advantages of this method.

1. Introduction
The richest diagnosis tool for the Sucker Rod Pumping System, the most common way for oil artificial lift, is
the Downhole Dynamometer Card (2009a), which is a closed curve formed by displacement values of the sucker rod
and the load values in the junction of the sucker rod and pumping unit, generated in each pumping cycle. There are 17
macro pumping conditions that can be recognized in the Downhole Dynamometer Cards (2010b).
Traditionally the diagnosis of the Sucker Rod Pumping System through the Dynamometer Cards is a manual
job, done by specialists with inner working knowledge of the system, referring pre diagnosed Dynamometer Cards
samples and his own experience. This job is therefore influenced by subjective factors, have no real time capabilities
and have higher costs than computer systems. Thus, the use of machine learning techniques for automatic diagnosis of
the Sucker Rod Pumping System can enhance the operational efficiency, allowing faster repairs and even preventive
interventions.
In the most recent works in the field, Peng Xu, Shijin Xu e Hongwei Yin (2007), used competitive Self-
Organizing Map (SOM) networks to classify five of the pumping conditions with excellent results, using only the load
values as features in the system.

______________________________
1
Bachelor, Information Systems UFBA
2
Ph.D., Electronic Engineering UFBA
3
Master, Mechatronics UFBA
Rio Oil & Gas Expo and Conference 2014

Fourier descriptors and Person correlation were used by Lima et al (2009b), with only 4 pumping conditions
with excellent results.
Bezerra (2010a) applied back propagation neural networks to classify 12 macro pumping conditions, using
interpolation between load and displacement to extract features. The results were excellent to some of the pumping
conditions.
Hua and Xunming (2011), used curvature analysis to identify the approximated valve opening and closing
points of the Sucker Rod Oil Pumping System in the Dynamometer Cards. Tests showed favorable results but with
examples from just some of the pumping condition. Based on this paper, in many recent papers written in Chinese, the
Dynamometer Cards are been analyzed by the location of valve opening and closing points.
Lima et al (2012) presented a study on shape descriptors applied in Dynamometer Cards of 5 pumping
conditions. The work demonstrated that each shape descriptors used is more effective on just some of the pumping
conditions, indicating the need to identify different features for each possible diagnosis.
Reges et al (2013b) showed that 4 sub segments of the Dynamometer Cards are enough to diagnose the system,
to at least 4 pumping conditions. The sub segments were extracted based on the curve behavior in the 4 stages of the
pumping cycle, each one been located between a pair of the valve opening or closing points. Tests showed excellent
results with more than 6000 samples.
Kun et al (2013a) used PSO-SVM approach to classify 10 pumping conditions. Four segments were extracted
by dividing the load and displacement amplitudes, and statistical moments were used as features. The work showed
excellent results to the 10 pumping conditions, but using only 128 samples to train and test.
By reviewing many recent works, one can say that there are many analytical approaches presented, and papers
with new advanced methods are continuously published every year. Still, there is no standard computational solution
yet to the automatic recognize the pumping conditions in the Dynamometer Cards, and the actual approaches are either
limited to a reduced number of possible diagnostics or have results that could be improved. On the other hand, between
the various approaches, the segmentation of the Dynamometer Cards shows great potential for multiple diagnoses.
The valve opening and closing points location in the Dynamometer Cards offers great information about the
operational condition of the Sucker Rod Pumping System (2011). Statistical analysis of the segments between or around
these points can be used to diagnose the system with greater accuracy, therefore the identification of valve opening and
closing points in the Dynamometer Cards is of particular importance.
Based on the working principles of the Sucker Rod Pump, and a comprehensive analysis of the physical
meaning of the load and displacement values, this work shows a new approach to identify the valve opening and closing
points in the Downhole Dynamometer Cards.

Figure 1. The Sucker Rod Pumping System; A pumping unit; B sucker rod; C plunger pump. Source: Bezerra et
al, 2009a

2
Rio Oil & Gas Expo and Conference 2014

2. The Sucker Rod Pumping System and the valve opening and closing events

Figure 1 shows the main components of the Sucker Rod Pumping System, which are the pumping unit (A), the
sucker rod (B) and the plunger pump (C). The pumping unit is normally connected to an electrical engine or an internal
combustion engine through a gearbox of torque transmission, which transforms the spinning movement of the engine
into an alternate movement at the top of the sucker rod. The sucker rod on its hand transmits the mechanical energy
received at the surface to the pump, and finally the pump transmits the mechanical energy received to the multiphase
fluid (oil, gas, sediments and water).
In the upward course of the plunger pump, as in the Figure 2, the traveling valve closes and the standing valve
opens. The weight of the fluid in the tubing is transmitted to the columns of rods. The fluid shifted by the plunger shows
up on the surface, whereas the barrel is refilled through the standing valve.
On the other hand, on the downward course, the traveling valve opens and the standing valve closes. Thus the
weight of the fluid column is supported by the sub-set of the standing valve and it is transmitted to the tubing through
the barrel. The plunger interior is flooded by the fluid. Plunging the column of rods in the fluid causes a small
production due to the shifted volume.

Travelling Travelling
Valve Closed Valve Open

Standing Standing Valve


Valve Open Closed

Figure 2. Travelling valve and standing valve behavior during the upward and downward course. Adapted from:
Bezerra, 2010a

Figure 3. Theoretical Downhole Dynamometer Card; S1 sucker rod stroke; Sp plunger stroke; Pr - weight of the
plunger inside the fluid; P1 weight of the plunger above the fluid ; Pd static load on the sucker rod (Pd=Pr+P1); A
travelling valve closes; B standing valve opens; C standing valve closes; D travelling valve opens. Source: Hua &
Xunming, 2011

3
Rio Oil & Gas Expo and Conference 2014

3. The general shape of the Downhole Dynamometer Card and the Stages of the Pumping
Cycle
Measurements conducted on the surface generate a Surface Dynamometer Cards from each pumping cycle,
with information from a dynamometer connected between the pumping unit and the sucker rod, together with the
displacement of the sucker rod in the well. The Surface Dynamometer Cards has distortion effects caused by elasticity
and friction in the system, and solving damping wave equations is used to describe the subsurface condition.
Barreto presented a detailed study (1993) on the Sucker Rod Pumping System, improving the method to
compute the mechanical strengths on the subsurface (at the bottom) from the Surface Dynamometer Cards, and in this
work the Downhole Dynamometer Cards are generated by this method.
Figure 3 shows a theoretical Downhole Dynamometer Card, which is a closed curve starting at the A point,
going through C and D, and returning to the A point. The upward course of the sucker rod can be identified by the
segment between the points A and C through B, and the downward course between the points C and A through D.
Points A, B, C and D represents respectively the traveling valve closing point, the standing valve opening point, the
standing valve closing point and the traveling valve opening point.
One can say that the valve opening and closing points are the corners of a tetragon in the theoretical Downhole
Dynamometer Card. Even if the Dynamometer Card represents one or more anomalies in the pumping, this four corners
had to appear if there is loading and unloading in the system, and this can be seen in the examples of pumping
conditions shapes showed in the Figure 4. There are important differences in the various shapes, in the curvatures
between the valve opening and closing points, maybe creating secondary corners, but is easy to find the four points in
the extremes of big changes in the load.
In this paper the main idea is fit a polygon to the Dynamometer Card shape through a polygonal
approximation to find the valve opening and closing points in its corners.
By analyzing a variety of Downhole Dynamometer Cards shapes from the 17 macro pumping conditions
(2010b), one can visually approximate two kinds of polygons, a tetragon or a hexagon with one concavity.
The tetragon stands for the pumping conditions with 4 macro segments, one segment of loading, one segment
when the load is approximately stable during the upward course, one segment of unloading and one segment when the
load is approximately stable during the downward course.
The hexagon is defined similarly to the tetragon, except the advent of a concavity. The concavity hypotheses
stands for the unload segment, between points C and D, because of some pumping conditions where the well is not
fulfilled and the plunger goes out of the fluid during the pumping, condition called Pump Off. This condition affects the
unload segment of the Dynamometer Card, where is possible to have two sub segments of unload with a sub segment
with some stabilization of the load.

Figure 4. Examples of pumping conditions shapes. Bezerra et al, 2009a


4
Rio Oil & Gas Expo and Conference 2014

4. Identification of valve opening and closing points


The details of algorithm here proposed to identify the valve opening and closing points are described as
following.
To deal with curvatures of the Downhole Dynamometer Cards, identify the segments of loading, unloading and
stability, a polygonal approximation of the Card shape is executed to one of the expected polygons, tetragon and
hexagon previously described.
The shape of the Dynamometer Cards is broke down to line segments that indicate if the rate of change in the
load is more or less important than the rate of change of the displacement, and if it is positive or negative. A
Dynamometer Card is a contour formed by points, and this rate of change is easily identified in the angle formed by a
pair of points to the displacement coordinate.
The points in the Downhole Dynamometer Cards are formed by a set of displacement values and load values

= ( , , ( , , , ( , ]
as in the equation 1.
(1)

The range of values in the Dynamometer Card can vary depending on characteristics of the originating well, so
a preprocessing normalization is used as in equations 2 and 3, where dmin, dmax, lmin, lmax, are respectively the minimum

=

and maximum values of the displacement and load.

(2)

=


(3)

With the normalization process the values of the Dynamometer Cards will vary between 0 and 1, simplifying
future calculations.
From the normalized values, the angles vector A is extracted, formed by each pair of sequential points as in the

= ( (
equation 4.
(4)

To analyze the angles and approximate segments to lines, the Chain Code shape representation is used based
on the Freeman Chain Code (1961). The Chain Code describes an object contour by a sequence of unit size vectors with
a limited set of directions. Starting at an arbitrary point, each pair of points is encoded depending on the angle formed
by the pair. A Chain Code can be generated using a 4-connected code, which mean 4 directions only, 8-connected or
more. In the Figure 5 a Chain Code is generated from a simple contour using a 4-connected code as example.
The angles extracted from the Dynamometer Cards can now be used to extract the Chain Code, where each
angle will be encoded in one of 4 codes. The equation 5 is used to generate the Chain Code vector C. Figure 6 shows a
Downhole Dynamometer Card after the normalization process with each of its points marked with the respective code.

Figure 5. Chain Code applied to a simple contour using the 4-connected codes showed.
5
Rio Oil & Gas Expo and Conference 2014

0 45 < < 45
1 45 135
=
2 > 135
(5)
3 135

Figure 6. Codes extracted by the Chain Code method showed in the points of a Downhole Dynamometer Card.

With the Chain Code is easy to identify segments as intended, which a load stability segment in the upward is
encoded as 0, loading is encoded as 1, stability in the downward is encoded as 2, and unloading is encoded as 3.
To recognize the general shape and deal with distortions, the Chain Code is compressed, removing the
sequentially repeated codes, creating a singular identity to the shape. For example, from the Chain Code of the Figure 5,
[3, 0, 0, 3, 1, 1, 2, 1, 2, 3, 2], is generated the compressed Chain Code [3, 0, 3, 1, 2, 1, 2, 3, 2].
Some distortions in the shape caused by different factors can modify the general shape identity showed by the
Chain Code, where minor isolated segments can be found between macro sequences of repeated codes.
After the compressed Chain Code extraction, it is then compared to the compressed Chain Code of the two
expected polygons, the tetragon, [1, 0, 3, 2], and the concave hexagon, [1, 0, 3, 2, 3, 2], and if it is not equal to any of
them a filtering cycle is applied to smooth the contour.
The Downhole Dynamometer Card from Figure 6 is approximately a tetragon, but its compressed Chain Code
is [1, 0, 3, 0, 3, 2], do not reflect this expected polygon for the pumping condition represented, so filtering cycles are
needed.
To smooth the shape a mean filter is applied as in the equations 6 and 7.

=


(6)

=


(7)

After the filtration the algorithm described here is repeated until the compressed Chain Code matches one of
the expected polygons.
It is important to understand that with enough filtering cycles any closed contour can be approximated to a
tetragon by this method, but the distortions in the Dynamometer Card points can be enormous, and the identification of
the valve opening and closing can lose accuracy.
The hexagon hypotheses increase the precision of the method, offering a concave option to fit Cards with a
concavity in the unloading, augmenting the precision and minimizing the need to filter cycles.
To guarantee the consistence of the match to one the polygons, an extra analysis is done after a match is found,
on the segments isolated by sequential repeated codes. The sizes of the isolated segments are compared, and if they fit
the expected proportions the polygonal approximation is done, and if not, a new cycle of filtering is applied restarting
the approximation.
With the polygonal approximation done, the valve opening and closing points can be identified in its corners.
A polygonal decomposition is executed simply by identifying the sides of the polygon as the groups of identical codes,
and the corners of the polygon are then the first points in these groups.
At the end of this algorithm the indexes of the 4 points are determined and can be used with the original
Downhole Dynamometer Card, allowing more profound analysis over the location of the points and the segments
between them.
6
Rio Oil & Gas Expo and Conference 2014

Figure 7. Examples of the identification of the 4 valve opening and closing points in Downhole Dynamometer Cards
with extreme shapes; TVC Travelling Valve Closes; SVO Standing Valve Opens; SVC Standing Valve Closes;
TVO Travelling Valve Opens.

5. Test results
The algorithm has more or less filtering cycles in his process, depending on the Dynamometer Card shape, and
these filtering cycles can cause some distortions in the Dynamometer Cards points behavior, yet it results in an accurate
approximation of the valve opening and closing points. Tests evaluated by specialists with 300 cards, been cards from
real wells and cards generated from literature or from specialists, shows that the points identified are ideal for the
majority of the cards. For the minority of the cards the identified points can be approximated by 3 index at maximum.
Knowing the Dynamometer Cards used in the tests have 100 points, this approximation is very precise. On the other
hand, the information offered by the general curve characteristics of the 4 segments between the points of interest will
suffer little interference by the approximation identified in the index points.
Figure 7 shows the identification of the valve opening and closing points in many very distinct Downhole
Dynamometer Cards.

6. Conclusions
The systems used today to automatic fault diagnosis the Sucker Rod Oil Pumping System, with many different
techniques, had not shown reliability to offer a precise recognition of the many pumping conditions. As such, industry
and academy haven't reached consensus yet as to the ideal automated diagnosis method.
Recent works indicate that the accurate identification of the valve opening and closing points of the pumping
cycle, in the Downhole Dynamometer Cards, are of great importance. The information offered by its location are very
useful and the segments extracted between them can be used to accurately diagnose the Sucker Rod Oil Pumping
System with accuracy.
7
Rio Oil & Gas Expo and Conference 2014

Based on a comprehensive analysis of the physical meaning of the load and displacement values, this work
shows a new approach to identify the valve opening and closing points in the Downhole Dynamometer Cards.
The method presented here has low complexity, offers great robustness to noise and even to simultaneous,
multiple anomalies represented on the Dynamometer Cards. The results in this work are based on Dynamometer Cards
of 17 macro possible diagnoses, acquired from real wells or artificially generated from the literature and by specialists,
which are used to demonstrate the feasibility and advantages of this method. Revised by specialists, the results indicate
his reliability, allowing for the implementation as a tool to assist the human expert during the visual analysis. As a
preprocessing stage with a posterior curve analysis is possible to measure features as they are observed by an human
expert, such as the speed of the loading stage or the stability of the load in the downward course. Finally, as these
curvature characteristics can be individually informative, together with pattern recognition systems they can be used to
accurately automatic diagnose the Sucker Rod Pumping System.

7. Acknowledgments
Thanks to PETROBRAS and his specialists for supporting academic research.
Thanks to CAPES for supporting academic research.
Thanks to the Master Degree Program in Mechatronics of UFBA (Universidade Federal da Bahia).
Thanks to CTAI (Centro de Capacitao Tecnolgica em Automao Industrial) nucleus of UFBA.
Thanks to our families, for their support and inspiration.

8. References

BARRETO FILHO, M. DE A. Gerao de carta dinamomtrica de fundo para diagnstico do bombeio meccnico em
poos de petrleo (Dissertation). UNICAMP. 1993

BEZERRA, M. Aplicao de redes neurais artificiais no reconhecimento de padres de cartas dinamomtricas de fundo
em sistemas de bombeio mecnico de petrleo. Dissertao de Mestrado-UFBA. 2010a

BEZERRA, M. A. D. Aplicao de redes neurais artificiais no reconhecimento do padres de cartas dinamomtricas de


sistemas de bombeio mecnico de petrleo (Dissertation). UFBA. 2010b

BEZERRA, M., SCHNITMAN, L., & FILHO, M. B. Pattern Recognition for Downhole Dynamometer Card in Oil Rod Pump
System using Artificial Neural Networks. ICEIS (2), 25. 2009a

DE LIMA, F. S., GUEDES, L. A. H., & SILVA, D. R. Application of Fourier Descriptors and Pearson Correlation for fault
detection in Sucker Rod Pumping System. In 2009 IEEE Conference on Emerging Technologies & Factory
Automation (pp. 14). IEEE. 2009b

FREEMAN, H. On the encoding of arbitrary geometric configurations. Electronic Computers, IRE Transactions on, 260
268. 1961

HUA, L., & XUNMING, L. Accurate extraction of valve opening and closing points based on the physical meaning of
surface dynamometer card. Petroleum Exploration and Development, 38(1), 109115. 2011

LI, K., GAO, X., YANG, W., DAI, Y., & TIAN, Z. Multiple fault diagnosis of down-hole conditions of sucker-rod pumping
wells based on Freeman chain code and DCA. Petroleum Science, 10(3), 347360. 2013a

LIMA, F. DE, GUEDES, L., & SILVA, D. Comparison of Border Descriptors and Pattern Recognition Techniques Applied
to Detection and Diagnose of Faults on Sucker-Rod Pumping System. Digital Image Processing. InTech. 2012

REGES, G. D., SCHNITMAN, L., & REIS, R. A. Application of curvature-based descriptors for fault diagnosis in sucker rod
oil pumping systems. ICPR 22 Proceedings. 2013b

XU, P., XU, S., & YIN, H. Application of self-organizing competitive neural network in fault diagnosis of suck rod
pumping system. Journal of Petroleum Science and Engineering, 58(1-2), 4348. 2007