Expert Adviser Program for Rod Pumping (includes associated paper 19367)
Authors: Foley W.L. , Svinos J.G. 
Published: December 2007

Summary
An expert adviser program for rod-pumping diagnostics (EXPROD) is being used successfully in the majority of oil fields operated by Chevron U.S.A. Field studies show that EXPROD gives excellent results in more than 90% of the cases analyzed. The program starts with results obtained from an analysis of field dynamometer data. These results consist of surface and downhole dynamometer cards, pumping-unit torque, rod stresses, and other parameters. From these data, EXPROD produces a one-to two-page diagnostic report in paragraph form that identifies equipment problems and recommends solutions.
The problem-solving strategy used by EXPROD consists of a statistical pattern recognition scheme coupled with a network of rules based on company expertise in rod-pumping diagnostics. With this logic, EXPROD attempts to find the best diagnosis or a set of alternatives to account for a problem. This approach differs from the widely used rule-based deduction schemes in many expert system shells.
Use of EXPROD reduces the expertise required for problem diagnosis but does not eliminate the need for some expertise.
The purposes of this paper are to illustrate the use of expert system technology to diagnose problems with rod-pumped wells, to describe the mechanism used for problem solving, and to show how EXPROD provides trouble-shooting recommendations.

Introduction
Rod pumping is the most common form of artificial lift in the world. In the U.S., more than 85% of all producing wells are on rod pump. The need to identify problems quickly and accurately is essential in attempts to minimize operating costs and to maximize production. This need was the primary motivation for developing EXPROD, a tool that allows a high level of expert knowledge to be applied daily in the field. EXPROD, a medium used to record expertise permanently, is improved continuously by addition of new knowledge as verified field cases are made available. EXPROD was developed as a companion to the surface and downhole analysis program, SADA.

SADA.
SADA calculates surface equipment loading, including gear-reducer torque analysis, motor-size analysis, unit balancing, rod stress loading. and a downhole dynamometer card based on a measured surface dynamometer card. Other parameters are also calculated; a complete SADA printout is shown in Figs. 1A through 1C. Because the wave-equation solution used in SADA does not fully account for friction between rods and tubing, the load range of the downhole pump dynamometer card is expanded beyond the true fluid load on the plunger, and the net fluid producing stroke may be shorter than the gross pump stroke. To obtain the true fluid load on the pump plunger and the net pump stroke, the user must apply judgment to set horizontal and vertical lines interactively on the downhole pump card during a SADA program run. Important parameters, such as pump intake pressure and fluid level as shown in Fig. 1B, are derived from these line settings. To diagnose problems accurately and to suggest corrective action with SADA alone, the user must have considerable rod-pumping expertise. Because many SADA users have little rod-pumping expertise, the diagnosis step often is a problem.

Application of EXPROD.
EXPROD was developed to make rodpumping expertise available to field-operations personnel. EXPROD, in combination with SADA, is a significant improvement over SADA alone, but it is not a cure for all problems. Inaccurate data can result in a wrong diagnosis. To obtain the maximum benefit from EXPROD, the user must he aware of such problems as inaccurate production gauging and other input data problems. The user also needs to he familiar with a well's past production history and local operating practices to judge the validity of EXPROD's diagnosis. EXPROD's diagnostics complements the skilled user but is not a replacement for a real expert.

Computing and Data Requirements
Computing Requirements. EXPROD was written in BASIC for the HP 9816 microcomputer. The choice of language and computer system were made to ensure compatibility with the previously developed SADA program and with about 30 dedicated microcomputers used by field personnel for rod-pumping diagnostics in the field. Most of the HP microcomputer systems we use have about 500 K of available memory.

Data Requirements.
Because of the memory limitation of the HP microcomputer used, EXPROD could not he fully integrated into the BASIC program code of SADA. To use EXPROD, the SADA program is run first and the analysis results are stored on disk in a well data file. EXPROD reads this file and performs diagnostics for either one well at a time or, in batch mode, several wells per run.
In addition to the data shown in Figs. 1A through 1C, the following information is useful for the EXPROD analysis: tubing size and whether or not the tubing is anchored; the likelihood of gas interference; net profit per barrel of oil; expected oil production when problem is solved; motor size; and service factor for rodstring stress analysis. If any of these additional data are unknown, EXPROD can still be run, but the diagnosis is often limited or several possibilities may be presented as alternative causes of a particular problem.

Scope of EXPROD's Calculations
EXPROD recognizes common pump-dynamometer-card shapes - such as full pump, fluid pound, gas interference, and leaking valves-through a statistical pattern recognition scheme coupled with a network of rules derived from company expertise. EXPROD considers such data as fluid production, gross pump stroke and maximum polished-rod load to help identify tubing leaks, worn pumps, and stuck pumps, types of problems not always apparent from pump-dynamometer-card shape alone.
EXPROD can detect difficult-to-identify problems, such as the load cell being out of calibration when the dynamometer data were recorded, and it ensures that all detected problems are presented to the user. This is an important feature because SADA users identifying a major problem, like a leaking valve, may overlook an over-loaded rod section or an improperly sized prime mover. With EXPROD, inexperienced field personnel have more confidence when making recommendations to solve rod-pump problems.
Important production parameters-e.g., pump intake pressure, fluid level, and net pump stroke-are estimated by EXPROD. These estimates were previously made by users during the interactive SADA pump-card analysis. These estimates are often the most difficult and subjective part of the entire data-analysis procedure.
The ability to run both EXPROD and SADA in batch mode makes these programs well suited for remote rod-pump-system diagnostic analysis because the procedure of data collection and problem detection can be automated.
JPT