Sie sind auf Seite 1von 8

Sodotyof

Pdrobum Etwbwers

SW 26246
Rod Pumping Expert System
E.R. Martinez and W.J, Moreno, Corpoven S.A,; V,J. Castillo, Perfoprocf; and J,A. Moreno,
U. Central de Venezuela
SPE Member
Copyright 1993, Society of Pelroleum Englnaars Inc.
Thh paper wea prepared for presen!ellon al the SPE Petroleum Computer Conference held In New Orleen8, Loulslane, U.S.A., 11-14 July 1993.
This paper wee Seleafed for prtwenlatlon by an SPE Program Committee followlng review of Information contained In an abatracr submitted by the 8UlhW(S). ConVwMeof the paper,
as preaanted, have not been tevlsw@ by the Scciety of Petroleum Engineers and are eub]act to correction by the author(s). The material. es pfeaenh?d.doee not necessarily mflsct
any ~sit[on of the ~lety ot Petroleum Engineere, ite officere, or membere.Pepere Pre8antedat SPE rneetkwweWect topublication
review
WEditorial
committees
c?lh* SoclJtY
0! Petro!aumEnglne#a. Permieaionto 00PyIeraefricfedto an abstractof not morethan 390worde.Ilhie!ratlonamaynot be wplsd. The abetractehouldcontain corraplcuoueacknowledgment
o: where and by whom the papar Ie preeented. Wrl!e Librarian, SPE. P.O. Box 833S36, Richardson, TX 75083-3S36,U.S.A. Talex. 1S3245SPEUT.

SrRAcT
This paper describes the development of a rod
pumping expert system in which methods of
emergent computation are extensively used. These
methodologies include artificial neural networks
(ANN) and genetic algorithms (GA). The system is
implemented in order to provide assistance to the
production engineer both in the problem diagnostic
of operating units and the design of rod pumping
facilities. The chosen computational methodologies
prove to be very efllcient in executing these tasks
and require considerably less implementation time
than other more common expert system methods.
The problem diagnostic method, implementedin the
system, is based on the analysis of field
dynamometer data by means of an ANN. These
A.NNsam computational tools, inspired on models
of biological neural systems, with remarkable signal
processing capabilities proven to be effective in
areas such as pattern recognition and classification.
The diagnostic task is achieved by using an ANN to
analyze the down-hole pump cards and by means of
Rcfcxwwsandillustrationsat endof paper,

its pattern recognition ability evaluate the condition


of the pumping equipment. The ANN reacts to gross
and subtle data features in the down-hole card and
produces a response generalized from the
knowledgestored in the network during a training
process.
The facility design module of the expert system is
implemented by means of a GA which executes an
intelligent swch in pump cordlguration space in
order to produce automatically and fast several
optimal design proposals compatible with the
equipment restrictions and the %rget production
entered by the user. Genetic algorithms (GA) are
global search methods inspired in the principles of
genetic evolution, which have been found to be very
well suited for a multiparametric search in complex
spaus. This outstanding search capability of GA is
exploited in the configurationof rod pumping system
designs based on the API W 1lL procedure. A run
of the design procedure outputs several optima]
cordlgurations with the corresponding strokes per
minute, plunger size, pumping speed, sucker rod
type and operating characteristics.
Use of the expert system has proven to reduce the

201

-1

ROD PUMPING EXPERTSYSTEM


2
SPE 26246
expertise required for problem diagnosis and design components. Examples of emergent computation
in rod pumping systems with considerable savings in methodologiesare artiilcial neural networks, genetic
algorithms, cellular automata, artificial life systems,
the engineer man hours required by those tasks.
etc. In the present work use has been made of
artificial neural networksand genetic algorithms.
Rod pumping is the artificial lifiing method most
commonly used in the world, in Venezuela more
than 70% of the operating wells am on md pump. In
addition the incorporation of new production areas
will require this form of artificial lift. It is clear then
that in attempts to minimize operating costs and
maximize production it is essential to be able to
identify problems quickly and accurately and also to
produce optimal designs compatible with available
equipment and satis~ing a desired target production.
Therefore the automatization of the tasks of design
and diagnostic for these kind of facilities are a
mayor concern of the industry.
Several attempts of satisfying these needs have
previously been made. Fmm the point of view of
problem diagnostic they include the application of
pattern recognition twhniques [1-3], the combination
of these techniques with expert system technology
[4-5] and recently the application of artiilcial neural
networks [6]. l!hedesign task, on the other hand,
has been faced with traditional design algorithms,
some of them incorporating rod pump system
simulations [7-9], and combinations of the latter
with expert system technology [10].
ODOLOGY
Recently a variety of new approaches have made
their way to the problem-solving arena of Artificial
Intelligence. A very powerful subset of them have
been classified under the common concept of
emergent computation. This denomination is
consequence of the shared properties of king
structured by many simple, highly interconnected,
computational devices processing local information
and with the characteristic that the computational
process of the whole emerges as a consequenceof
the concurrent behavior of the individiial
202

ARTXFKXALNEW

NETWOI?KS

An artificial neural [11] network is an information


processing system composed of a large number of
interconnectedprocessing elements. Each processing
element or unit computes its activity locally on the
basis of the activities of the units to which it is
connected and the strengths of its connections
(weights) to those units. The unit transfer function
(activation fimction) explicitly determines the
units output, given its input. Various neuml
network models differ in important assumptions
made about processing element connectivity-.
(architecture), the type of transfer fimction, and
the equation or algorithms governing the learning
process in the system.
The ANNs used in this work are all of the three
layer, fee&forward type. The architecture of these
networks specifies three processing layers: an input
layer, an internal or hidden layer and an output
layer. Each unit in the input layer registers the value
of a variable or of a feature describing the input
event. Processing elements in the hidden layer of the
network construct the mapping that ensures that the
output units compute the correct output in response
to the given input information. Each unit in the
output layer corresponds to a value of the desired
computation or to a pattern category. There are no
lateral connectivities between units in the same
layer, the unit interconnections occur only among
units in different processing layers.
The connections between the ith and jth units, in
different layers, define a weight vector for the jth
unit with components Wij. If Ai represent the
activity of the ith unit, then the activity of the jth
unit cm be computedby the relation:

$PE 26246

E. MARTINEZ etoal.
3
optimization problems, that otherwise have no
reasonably fast, guaranteed algorithms for solution.
All= F(D,(wlj,Ai)
In most real life applicationsa near optimal solution
where F is an appropriately chosen transfer function is acceptable if it can be computed reasonably
for the units, and Di(wi,Ai) is some defined quickly, for most of these cases the genetic
distance metric between t1!e weight vectors with algorithms are very well suited.
componentsWI and the activity pattern of all the ith
processing umts (e.g. a C!mtesiandistance or an GAs start with a population of randomly generated
solution candidates and evolve toward better
inner product between real-valuedvectors, etc.).
solutions by applying genetic operators, modeled on
Learning in the neuml network consists of a search the genetic processes occurring in nature. A genetic
process in weight-space for a set of interconnection algorithm maintains a population of potential
weights by which the desired input-output solutions for a given problem; this population
correspondence can be satisfactorily computed. The undergoes evolution in a form of natural selection.
most common learning methods (backPropagation) In each generation relatively good solutions
involve different variants of the well known reproduce and relatively bad solutions die, to be
gradient-descentmethods of fimction optimization in replaced by offspring of the good. To distinguish
which a quadmtic error function calculated between between solutions, an evaluation or objective
the desired output and the actual network output is function plays the role of the environment. The
heuristic assumption in which GA are based is that
minindad.
the best solutions will be found in regions of the
l%e following procedures establish a methodology parameter space containing a relatively high
propmtion of good solutions and that these regions
which allows a problem to be solved with an ANN:
can be explored by conveniently chosen genetic
-A set of examples of the desired input-output operators.
relation must be collected.
-The data must be conveniently preprocessed in The structure of a simple GA is as follows:
order to compress the information and enhance the
begin
important features of the input-outputrelation.
t=o
-The data set is partitioned in a training and a
initialize P(t)
validation set.
evaluate P(t)
-A convenientarchitecture of ANN must be selected
while (not termination-condition)do
together with an appropriate learning algorithm and
begin
associatedpammeters.
t =t+l
-The network is trained.
sekct P(t) from P(t-1)
-The network is valkiated.
recombineP(t)
-The last three procedures are repeated until
evaluate P(t)
satisfaction.
end
end
G~s
Genetic algorithms [12] are a class of probabilistic
search methods that can be applied to a large
repertoire of interestingproblems, including many

During iteration t the genetic algorithm maintains a


population P(t) of solutions x$, ,.,, *,xNt
conveniently codifkd as a bit string (the population
size N remains fixed). Each solution xit is evaluated

203

ROD PUMPING EXPERT SYSTEM


4
SPE 2624Q
by computing f(xit), a measure of fitness of the
solution. A new population (iteiation t+ 1) is then DESIGN OF THE EXPERT SYSTEM
formed, solutions are selected to reproduce on the
basis of their relative fitness, and the selected The expert system discussed in this work has as
solutions are recombined using genetic operators objective the automatization of the tasks of problem
(such as crossover and mutation in the present diagnostic and design of rod pumping systems. Its
main conception is centered in the application of
application)to form the new population.
techniques of emergent computation in order to
The crossover operator combines the features of two cordlgure a system which executes the tasks under
parent structures to form two similar offspring. It consideration with a high level of expertise, with
operates by swapping corresponding segments of a minimal requirement of users knowledge and with
binary string representingthe parent solutions.
small response times. The chosen approach differs
greatly from the widely used mle based expert
The mutation operator randomly alters one or more systems methodology having the advantages of
bits of the selected structure increasing in this way rendering unnecessary the costly knowledge
the variability of the population. Each bit position of engineering process and reducing considerably the
each solution structure in the population undergoesa implementationtime.
random change with a probability equal to the
mutation rate.
The complete rod pumping expert system consists of
a software implementation structured in two main
There are five main componentsthat must be defined modules, one for the problem diagnostic task and
in order to solve a problem with a GA:
the other for facility design. The whole program is
coded in C language and runs on AT compatible
-A genetic representation of solutions to the microcomputers.
problem.
PROBLEMDIAGNOSTIC MODULE
-A way to create an initial population of solutions.
-An evaluation function that plays the role of the
environment, rating solutions in terms of their The problem diagnostic module is based on analysis
fitness.
of field dynamometer data by means of an ANN.
-Genetic operators that effect the composition of The diagnostic task is achieved by training an ANN
chfldren during reproduction.
to analyze conveniently preprocessed down-hole
-Values of the parameters that the genetic algorithm pump card data and by means of its pattern
uses (population size, probabilities of application recognition ability to evaluate the condition of the
of the genetic operators, etc).
pumping equipment. In the execution phase the
ANN reacts to gross and subtle data features in the
From the point of view of the design problem GAs inputted down-hole card and produces a response
offer a number of advantages: they search from a set generalized from the knowledge stored in the
of designs and not from a single design; they are not network during the training process. As seen there is
derivative-based; they work with discrete and a two phase process that leads to the implementation
continuous parameters and they explore and exploit of the diagnostic module, frost a training and
the pamrneter space. The major disadvantage of this validation period that can be actualized at any
strategy is the possible computational cost derived moment, and then an operational phase where the
from the large number of runs of the design code subsystembehavesas an expert.
needed to evaluate a set of designs for each
generation.
In practice, current automated rod pump diagnostic
204

SPE 26246
E. MARTINEZet.al.
5
systems are based on statistical pattern matching due to its e&e of implementation and history of
schemes and/or traditional knowledge based expert success, was a feedforward three-layer neural
system methods. The application of the neural network under backpropagation training and
network methodologyto this problem area proves to sigmoidal transfer function. The input layer had 30
be very convenient, not only because of the ease of units, the output layer 21 processing elements and
implementation and training of the system (based after some testing a final network with 8 hidden
solely on examples) but because this kind of units was found to be adequate. The training
application can bring new information to the objective was to produce a value of 1 in the output
diagnosticprocess through the ability of the ANN to unit corresponding to the diagnostic category of the
recognize important features in the pump card data. inputtedcard, the output units of the other categories
Another great advantage is the robustness of the were assigneda Ovalue. If a pump card showed2 or
ANN to noisy data, a characteristic not shared with more conditions, each appropriate node was trained
to output a value of 1.
the aforementionedapproaches.
The interpretation of subsurface pump card patterns
is not a trivial task, and the learning process
necessary to acquire this expertise requires the
exposure to already interpreted data and to a
teacher. In this sense, the neural network acts as
the individual trying to learn the interpretation and
we act as the professors giving the necessary
information to solve the problems that we assign,
and, hopet%lly, be able to solve new ones. The
success of this learning process requires a careful
selection of a training set of pump card data already
interpreted by experts. In this implementation a set
of 140 cards from active wells in Venezuelan oil
fields were used as training set. In the card selection
care was taken in order to provide a balanced and
representative grouping of diagnostic categories (21
in total).
Each of the down-hole pump cards to be processed
was calculated from measured surface cards and was
digitized and normalized into dirnentionless loads
and positions. A total of 100 equally spaced points
were extracted from each card. These points were
Walsh-transformed and the resulting spectrum
normalized, this pro-processing allows a
compression of the information into only 30 points
retaining the salient features of the card. These 30point set of features was used as input to the neural
network.
The neuml network architecture chosen, essentially

The network was trained in a 386 DOS computer


with math-coprocessor. The training set was iterated
through 10,000 learning cycles corresponding to a
total of 4 hours of training time. The achieved
diagnostic accuracy over the training set was of 99
percent whereas the interpretation accuracy over a
validation set of 50 cards was of 95 percent.
The weights of the trained neural network were
saved in a file for ulterior use by a subroutine
implementing the trained network architecture. This
subroutine, together with a data input-interfaceand a
pre-processing subroutine configure the essentials of
the problem diagnostic module.
The input to the problem diagnostic module is a
conveniently digitized previously calculated downhole pump card, this data is pre-processed and
inputted to the neurtd network subroutine which
produces a diagnosis. Both the pump card and the
interpretation are displayed in graphical form. In
Figure 1 we show a typical output of the problem
diagnosticmodule.
ROD PUMP DESIGN MODULE
The problem of designing a rod pumping system can
be treated as a simple combinatorial problem
involvingconstraints, in which the values of a set of
parameters such as type of equipment, strokes per
minute and stroke length must be found in order to

205

6
ROD PUMPING EXPERT SYSTEM
SPE2624Q
satisfy a desiml production at the lowest possible required the inclusion of tables about API rod and
cost. The global search method based on genetic tubing data and available equipment stock, all these
algorithms has proven to be very suitable in the were included in a small database.
solution of this class of combinatorial problem. In
this line of thought we have, for the implementation The design module requires as input from the user
of the design module, customized a GA which the following information: Specific Gravity of the
executes an intelligent search in pump fluid, Fluid Level, Pump Depth, Desired Production
configuration space in order to produce Rate, the nominal tubing di~eter and whether it is
automatically and fast several optimal design anchored or hanging free. On the output it produces
proposalscompatible with equipment restrictions and several design alternatives which include values for
the surface stroke, pumping speed, pump plunger
targetproduction entered by the user.
diameter, sucker rod types and predictions on the
The implemented pump design module is based on gearbox peak torque and loading, sucker rod stresses
the AN RP 1lL design procedure. In order to and loading, expected surface production and
automat~ all the involved ctuculations in a time maximum counterbalance moment all compatible
efficient way so as to diminish the possible with available stock and target production. With
computationalcost derived from the many necessary all these possible designs at hand the user can
xuns of the design procedure it was necessary to evaluate the alternatives simultaneously and reach
select an approximation scheme for the required the usual compromise between efficiency, equipment
functions (plunger stroke factor, peak polished rod loading, equipment size and cost.
load, minimum polished rod load, peak torque,
polished rod horse power and for adjustment for The observable that constitute the parameters
peak torque). The chosen method was to defining the search space to be explored and
approximate each of these functions by the exploited by the GA are the sutiace stroke, pumping
application of appropriately selected feedfonvard speed, pump plunger diameter and sucker rod types.
three-layer radial base fimctions (RBF) neural A point in the search or pammeter space (a
networks with gaussian transfer fhnctions [13]. This parameter set) is represented by a binary string
particular neunil network architecture was chosen, (chromosomal representation) and an adequate
due to its well known function approximation recodification procedure translates the information
properties and its ease of implementation. In each of in the chromosometo a numeric form in order to
these networksthe input layer had 2 units, the output run the AM RP 1lL design procedure. The quality
layer 1 processing elements and after some testing of the chromosomes is evaluated, by means of an
networks with 5 to 8 hidden units were found to be adequate evaluation function, in terms of the
adequate. These RBF neuml nets were pnwiously calculated pump displacement, which must be
trained with corresponding sets of values for each between 15% and 20% higher than the Desired
particular function, attaining approximations with Production Rate, and the avtiabfity in stock of the
typical normalized erms of 0,1. The weights of the equipment required to configure the proposed
trained RBF networks were saved in different files design.
for ulterior use by a subroutine implementing the
tmined network architecture In this way a call to The workings of the customized GA is as follows: it
this subroutine would produce a very accurate value initially generates a random population of 40
(design points) over which an
of any of these functions for later use in the design c~mo~mes
procedure. The time efficiency of this approximation evolution dynamics is established through the
procedure is the clue to the very fast execution time manipulationof the chromosomeswith the genetic
of the genetic algorithm. The design procedure also operators of selection, crossover and mutation but
206

*.*

$PE 26246
E. MARTINEZet.al.
7
keeping the population number constant. In each horizontal wells. Finally two additional advantages,
generation all the chromosomes are ranked with the pertaining the system, should be mentioned: the
evaluation fimction and the best of them are selected system is open and portable. These alIow the system
with a roulette wheel strategy (probability of to grow by the easy incorporation of new tasks and
selectionproportional to its fitnessor quality). The to be implanted in a wide range of computer
selected chromosomes are reproduced by crossover platforms.
with a rate of 85% and the offspring are mutated
with a mutation mte per bit of 1%. The worst
chromosomes in the parent generation are then
partially replaced without repetition by the new 1. Keating, J.F., Laine, R.E. and Jennings, J.W.
produced offsprings, a fraction of 10% of the Pattern Recognition Applied to Dynamometer
population is replaced in each generation. This Cards. paper SPE 19394presented at the 1989 SPE
dynamics is iterated over 100 generations were Annual Technical Conference and Exhibition, San
nomnally it converges to a population of design Antonio, TX, Oct. 8-11.
points of high quality. At this point the process is
stopped and the 8 best design proposals are 2. Dickinson, R.R. and Jennings, J.W. Use of
presented to the user. A typical output of this Pattern-Recognition Techniques in Analyzing
Downhole Dynamometer Cards. SPE Production
module is shown in figure 2.
Engineering , pp. 187-92(May, 1990).
CONCLUSIONS
3. Keating, J.F., Laine, R.E. and Jennings, J.W.
We have presented in some detail the construction of Application of a Pattern-Matching Expert System
Dynamometer- Card Pattern
an emergent techniques based rod pump expert to Sucker-Rod,
system. The system, implementedin the C.language, Recognition. paper SPE 21666 NUPRO Show
consists of two different modules, a problem and Tell (demo) Jan. 8 (1991).
diagnostic module which exploits the powerful
abilities of the ANNs as pattern recognition and 4. Foley, W.L. and Svinos, J,G. Expert Adviser
cl:ssiflcation systems for the analysis of down-hole Program for Rod Pumping. J. Pet. Tech. pp. 394pump cards and a facility design module employing 400 (April, 1989).
the intelligent search strategy wrapped in the GAs
to configure a very efficient and fast system which 5. Derek, H.J. Sucker Rod Pumping Unit
produces simultaneously several optimal design Diagnosis Using an Expert System and Pattern
proposals for pump facilities. The results to date Recognition Techniques. MS Thesis, TX A&M U.
indicate that we have made good choices in respect College Station (1988).
to the applied methodologies, we have obviated a
costly knowledge engineering issue and the 6. Reep, G.J. and Tudor, J.L. Analyzing Downimplementationtimes of the system were very short. Hole Pump Cards Using a Neural Network
On the other hand the maintenance and updating of
the system is a simple task. In this respect the 7. Gibbs, S.G. Predicting the Behavior of Sucker
diagnostic module can be updated or specialized to Rod Pumping Systems. J. Pet. Tech. pp. 769-778
new or specific diagnostic problems by restraining (July, 1963).
the ANN, a matter of hours when the training data is
available. The design rhodule could be updated 8. Svinos, J.G. Exact Kinematic Analysis of
incorporating other more general design procedures Pumping Units paper SPE 12201 presented at the
not only for vefiical but also for deviated and 58th SPE Annual Technical Conference and
207

ROD PUMPING EXPERT SYSTEM


8
Exhibition, San Fmncisco, CA, October 1983.
9. API RP 1lL, RecommendedPmctice for Design
Calculations for Sucker Rod Pumping Systems
(ConventionalUnits), Fourth Edition, June 1, 1988.

SPE 2624G

DM6NOSTK0

POZO:MFEI-396

10. Svinos, J.G. RODSTAR an EXpelt Rod


Pumping System Predictive Simulator paper No.
CIM/SPE 90-31 presented at the International
TechnicalMeeting CIM/SPE, Calgary, June 1990.

t!17

MWltullENTO DE TUBEfUA d
MAL ANCLAJE

,>>
:2

11. Nelson, M.M. and Illingworth W.T. A


Practical Guide to Neural Nets. Addison Wesley
Inc., ReadingMA (1990).
Figure 1

12. Goldberg, D.E. Genetic Algorithms in Search,


Optimization and Machine Learning. Addison
WesleyInc., Reading MA (1989).
13. Poggio, T. and Girosi, F. Networks for
Approximation and Learning. Proc. IEEE, vol. 78
No 9 (September 1990).

RESULTAOOS
SND

PUIII.spm pulg.

swta de

Prod

cabillas

bpd.

64

5.00

2s25 1 X 716X 3/4 154.4

64
54
54
54
54

5s00
5.00
6.50
5*OO
5.00

2.25
3.75
2.25
250
2.75

150.4
1 X 713
157.1
i58,2
?m x 314
7JTIX 3/4
159.0
1 x 7/8
146.1
1 X 7/WX 3/4 160.6

FTgure2

208

Torque Cbe
Ibs-pulg Ibs
70178

11766

63735 10769
83459 12482
83380 13003
59828
9908
68608 12873
72291 12997

I-J

Das könnte Ihnen auch gefallen