# Calculation Method for Inflow Performance Relationship in Sucker Rod Pump Wells Based on Real-Time Monitoring Dynamometer Card

Authors: Ruichao Zhang; Yuqiong Yin; Liangfei Xiao; Dechun Chen
Journal: Geofluids
 (2020)

---

## Abstract

Based on the informatization and intelligent construction of an oilfield, this paper proposes a new method for calculating inflow performance relationship in sucker rod pump wells, which solves the limitations of current IPR curve calculation method in practical application. By analyzing the forming principle of the dynamometer card, the plate of abnormal dynamometer card is created innovatively, and the recognition model of abnormal dynamometer card based on “feature recognition” is established to ensure the accuracy of the dynamometer card. By analyzing the curvature of each point on the curve of downhole pump dynamometer card, the opening and closing points of standing valve and traveling valve are determined, and the models for calculating fluid production and bottom hole flowing pressure are established to obtain the data of fluid production and bottom hole flowing pressure of sucker rod pump wells. Finally, a calculation model of inflow performance relationship fitted with the calculated fluid production and bottom hole flowing pressure data based on genetic algorithm is established to realize calculation of oil well inflow performance relationship curve. The field application and analysis results show that the inflow performance relationship curve calculated by the model in this paper fits well with the measured data points, indicating that the calculation model has high accuracy and can provide theoretical and technical support for the field. Moreover, the real-time acquisition of dynamometer cards can provide real-time data source for this method, improve the timeliness of oil well production analysis, and help to reduce the production management costs and improve the production efficiency and benefit.


---

## Body

## 1. Introduction

The inflow performance relationship (IPR) curve of oil well is a curve describing the relationship between oil well production and bottom hole flowing pressure [1–3], which is the basis of well performance analysis and productivity prediction [4–9]. However, many classical calculation methods of IPR curve have their limitations in practical application. The dimensionless IPR equation proposed by Vogel [10] is widely used to determine the IPR curve of two-phase flow, but the Vogel equation is based on the assumption of an ideal perfect well, and there will be a large error in actual production. Based on the Vogel equation, Standing [11] establishes the productivity prediction equation of imperfect oil wells, which expands the application range of the Vogel equation. However, when the flow efficiency is high or the flow pressure is low, the calculation results of the Standing equation will be problematic [12]. Fetkovitch [13] suggested using well test data to evaluate the production capacity of oil wells and proposed the Fetkovitch equation. However, it was proved that the production obtained by this formula under given pressure was higher than that obtained by the Vogel method [14]. Cheng [15] obtained the IPR regression equation of different hole deviation angles without water cut by regression method, but the equation is not normalized. Moreover, the comprehensive IPR curve cannot be calculated by the IPR curve without water. Bendakhlia et al. [16] proposed the IPR curve equation varying with the recovery degree, but did not give the specific calculation method of the equation parameters, which made it difficult for the model to be applied in practice. For this reason, many scholars have done a lot of further research and fitting modification work on the relevant models [17–20], but the data used for regression fitting is limited to wells under certain conditions, so the IPR equation obtained is not universal, and in actual production, a large number of test data points cannot be obtained, which limits its application.In view of the above problems, based on the informatization and intelligent construction of the oilfield [21, 22], this paper studies the calculation method of inflow performance relationship in sucker rod pump wells based on real-time monitoring dynamometer card. By analyzing the forming principle of the dynamometer card, considering the abnormal changes of load that may occur in the four stages of the dynamometer card formation, the abnormal dynamometer card plate and identification model are established to ensure the accuracy of the dynamometer card. According to the working principle of the pump and the physical meaning of opening and closing points of pump valves, the opening and closing points of standing valve and traveling valve are determined by analyzing the curvature of each point on the curve of downhole pump dynamometer card, and the calculation models of fluid production and bottom hole flow pressure are established to obtain the data of fluid production and bottom hole flow pressure. Based on the Bendakhlia model, a model for calculating inflow performance relationship fitted with the calculated fluid production and bottom hole flowing pressure data based on genetic algorithm is established to realize the calculation of oil well inflow performance relationship curve.


## 2. Identification Model of Abnormal Dynamometer Card

### 2.1. Plate of Abnormal Dynamometer Card

By analyzing the forming principle of the dynamometer card, the abnormal changes of load that may occur in four stages of dynamometer card formation (including loading section of upstroke, upstroke section after the end of initial deformation of sucker rod string, unloading section of downstroke, and downstroke section after the end of initial deformation of sucker rod string) are considered, and the position and load of the dynamometer card are normalized to establish the abnormal dynamometer card plate (as shown in Figure1).Figure 1
Plate of abnormal dynamometer card.
(a)
The slope of AB is equal to zero(b)
The slope of AB is less than zero(c)
The upper step appears in BC(d)
The lower step appears in BC(e)
The upper boss appears in BC(f)
The lower boss appears in BC(g)
The height of BC is inclined downward(h)
The slope of CD is greater than zero(i)
The upper step appears in DA(j)
The upper boss appears in DA(k)
The lower boss appears in DA(l)
The height of DA is inclined upward


### 2.2. Feature Extraction and Recognition of Abnormal Dynamometer Card

#### 2.2.1. Identification of Abnormal AB Section

The AB section of the normal dynamometer card is the loading section, and both the traveling valve and the standing valve are closed. As the polished rod goes up, the load of the fluid column in the wellbore is gradually loaded on the sucker rod string. The sucker rod string is elongated and the tubing is shortened, forming a section with slope greater than zero in the dynamometer card. If the loading is slow due to the influence of gas or the travelling valve leakage, the AB section becomes a curve with positive slope and upward convex. If the slope of the AB section is equal to or less than zero (as shown in section EF in Figures1(a) and 1(b)), it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal loading in section AB are as follows:(1)kEF≤0,ΔSEFΔSAB>0.1,where kEF is the slope of the EF section, ΔSEF is the displacement of the EF section, and ΔSAB is the displacement of the AB section.


#### 2.2.2. Identification of Abnormal BC Section

The BC section of the normal dynamometer card is the upstroke section after the end of the initial deformation of the sucker rod string. The traveling valve is closed, the standing valve is opened, and the load is relatively stable. If it is affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by gas or the traveling valve leakage, the load will be delayed or unloaded in advance, and the length of stable load in the BC section will be shortened; if the pump plunger comes out of the working cylinder, the load will rapidly reduce to the DA section of the downstroke, which belongs to the normal dynamometer card under the influence of typical working conditions.If there are upper and lower steps (as shown in Figures1(c) and 1(d)) or upper and lower boss (as shown in Figures 1(e) and 1(f)), it indicates that the load increases or decreases periodically in the process of stable lifting, and it is regarded as “abnormal.” If there is no stable BC section with a certain length in the dynamometer card, but the slope is negative from point B until the end of upstroke and point C coincides with point D (as shown in Figure 1(g)), indicating that the sucker rod string is unloaded immediately after loading, and the downstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “step” in section BC are as follows:(2)F¯FG−F¯BC>0.2,kEF>2,ΔSFG>0.1,ΔSBC−ΔSFG>0.1,where F¯FG is the average normalized load of the FG section, F¯BC is the average normalized load of the BC section, kEF is the slope of the EF section, ΔSFG is the displacement of the FG section, and ΔSBC is the displacement of the BC section.The eigenvalues of the dynamometer card with abnormal “boss” in section BC are as follows:(3)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSDA−ΔSFG>0.1,ΔSHC>0.05,ΔSBE>0.05,where FDA is the average normalized load of the DA section, ΔSDA is the displacement of the DA section, ΔSHC is the displacement of the HC section, and ΔSBE is the displacement of the BE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section BC are as follows:(4)FB−FC>0.7,kBC<−0.7,nBC,k<−0.7nBC≥0.5,where FB is the normalized polished rod load at point B, FC is the normalized polished rod load at point C, kBC is the slope of the BC section, nBC,k<−0.7 is the number of points with slope less than -0.7 in the BC section, and nBC is the number of points in the BC section.


#### 2.2.3. Identification of Abnormal CD Section

The CD section of the normal dynamometer card is the unloading section, and both the traveling valve and the standing valve are closed. As the polished rod goes down, the load of the fluid column is gradually transferred from the plunger to the tubing, the sucker rod string is shortened, and the tubing is elongated, forming a section with slope greater than zero in the dynamometer card. If it is affected by fluid pound or gas, the unloading delay will be caused, point D will move to the left, and the CD section will become a curve with positive slope and upward convex; if affected by the standing valve leakage, the CD section will become a curve with positive slope and downward convex due to slow unloading. If the slope in the CD section of the dynamometer card is less than zero (as shown in the EF section in Figure1(h)), it is regarded as “abnormal.”The eigenvalues of the dynamometer card with abnormal unloading in section CD are as follows:(5)kEF<0,ΔSEFΔSCD>0.1,where ΔSCD is the displacement of the CD section.


#### 2.2.4. Identification of Abnormal DA Section

The DA section of the normal dynamometer card is the stable downward stage after the end of the initial deformation of the sucker rod string. The traveling valve is opened, and the standing valve is closed. The load is relatively stable and close to the theoretical minimum load. Similar to the BC section, if affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by fluid pound, gas or valve leakage, unloading will be delayed, and the length of stable load in the DA section will be shortened.If there is an upper step (as shown in Figure1(i)) or upper and lower boss (as shown in Figures 1(j) and 1(k)) in section DA, which is similar to “step” and “boss” in the BC section, it is considered as “abnormal”; if there is no stable DA section with a certain length in the dynamometer card, the slope is negative from the beginning of point D to the end of the downstroke, and point A coincides with point B (as shown in Figure 1(l)), which indicates that the sucker rod string is loaded immediately after unloading, and the upstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “upper step” in section DA are as follows:(6)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSFG<ΔSDA−0.1.The eigenvalues of the dynamometer card with abnormal “upper and lower boss” in section DA are as follows:(7)FDA¯−FFG¯>0.2,kEF>2,ΔSFG>0.1,ΔSDA−ΔSFG>0,ΔSAH>0.05,ΔSDE>0.05,where ΔSAH is the displacement of the AH section and ΔSDE is the displacement of the DE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section DA are as follows:(8)FA−FD>0.7,kDA<−0.7,nDA,k<−0.7nDA>0.5,where FA is the normalized polished rod load at point A, FD is the normalized polished rod load at point D; kgyDA is the slope of the DA section, nDA,k<−0.7 is the number of points with slope less than -0.7 in the DA section, and nDA is the number of points in the DA section.


## 2.1. Plate of Abnormal Dynamometer Card

By analyzing the forming principle of the dynamometer card, the abnormal changes of load that may occur in four stages of dynamometer card formation (including loading section of upstroke, upstroke section after the end of initial deformation of sucker rod string, unloading section of downstroke, and downstroke section after the end of initial deformation of sucker rod string) are considered, and the position and load of the dynamometer card are normalized to establish the abnormal dynamometer card plate (as shown in Figure1).Figure 1
Plate of abnormal dynamometer card.
(a)
The slope of AB is equal to zero(b)
The slope of AB is less than zero(c)
The upper step appears in BC(d)
The lower step appears in BC(e)
The upper boss appears in BC(f)
The lower boss appears in BC(g)
The height of BC is inclined downward(h)
The slope of CD is greater than zero(i)
The upper step appears in DA(j)
The upper boss appears in DA(k)
The lower boss appears in DA(l)
The height of DA is inclined upward


## 2.2. Feature Extraction and Recognition of Abnormal Dynamometer Card

### 2.2.1. Identification of Abnormal AB Section

The AB section of the normal dynamometer card is the loading section, and both the traveling valve and the standing valve are closed. As the polished rod goes up, the load of the fluid column in the wellbore is gradually loaded on the sucker rod string. The sucker rod string is elongated and the tubing is shortened, forming a section with slope greater than zero in the dynamometer card. If the loading is slow due to the influence of gas or the travelling valve leakage, the AB section becomes a curve with positive slope and upward convex. If the slope of the AB section is equal to or less than zero (as shown in section EF in Figures1(a) and 1(b)), it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal loading in section AB are as follows:(1)kEF≤0,ΔSEFΔSAB>0.1,where kEF is the slope of the EF section, ΔSEF is the displacement of the EF section, and ΔSAB is the displacement of the AB section.


### 2.2.2. Identification of Abnormal BC Section

The BC section of the normal dynamometer card is the upstroke section after the end of the initial deformation of the sucker rod string. The traveling valve is closed, the standing valve is opened, and the load is relatively stable. If it is affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by gas or the traveling valve leakage, the load will be delayed or unloaded in advance, and the length of stable load in the BC section will be shortened; if the pump plunger comes out of the working cylinder, the load will rapidly reduce to the DA section of the downstroke, which belongs to the normal dynamometer card under the influence of typical working conditions.If there are upper and lower steps (as shown in Figures1(c) and 1(d)) or upper and lower boss (as shown in Figures 1(e) and 1(f)), it indicates that the load increases or decreases periodically in the process of stable lifting, and it is regarded as “abnormal.” If there is no stable BC section with a certain length in the dynamometer card, but the slope is negative from point B until the end of upstroke and point C coincides with point D (as shown in Figure 1(g)), indicating that the sucker rod string is unloaded immediately after loading, and the downstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “step” in section BC are as follows:(2)F¯FG−F¯BC>0.2,kEF>2,ΔSFG>0.1,ΔSBC−ΔSFG>0.1,where F¯FG is the average normalized load of the FG section, F¯BC is the average normalized load of the BC section, kEF is the slope of the EF section, ΔSFG is the displacement of the FG section, and ΔSBC is the displacement of the BC section.The eigenvalues of the dynamometer card with abnormal “boss” in section BC are as follows:(3)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSDA−ΔSFG>0.1,ΔSHC>0.05,ΔSBE>0.05,where FDA is the average normalized load of the DA section, ΔSDA is the displacement of the DA section, ΔSHC is the displacement of the HC section, and ΔSBE is the displacement of the BE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section BC are as follows:(4)FB−FC>0.7,kBC<−0.7,nBC,k<−0.7nBC≥0.5,where FB is the normalized polished rod load at point B, FC is the normalized polished rod load at point C, kBC is the slope of the BC section, nBC,k<−0.7 is the number of points with slope less than -0.7 in the BC section, and nBC is the number of points in the BC section.


### 2.2.3. Identification of Abnormal CD Section

The CD section of the normal dynamometer card is the unloading section, and both the traveling valve and the standing valve are closed. As the polished rod goes down, the load of the fluid column is gradually transferred from the plunger to the tubing, the sucker rod string is shortened, and the tubing is elongated, forming a section with slope greater than zero in the dynamometer card. If it is affected by fluid pound or gas, the unloading delay will be caused, point D will move to the left, and the CD section will become a curve with positive slope and upward convex; if affected by the standing valve leakage, the CD section will become a curve with positive slope and downward convex due to slow unloading. If the slope in the CD section of the dynamometer card is less than zero (as shown in the EF section in Figure1(h)), it is regarded as “abnormal.”The eigenvalues of the dynamometer card with abnormal unloading in section CD are as follows:(5)kEF<0,ΔSEFΔSCD>0.1,where ΔSCD is the displacement of the CD section.


### 2.2.4. Identification of Abnormal DA Section

The DA section of the normal dynamometer card is the stable downward stage after the end of the initial deformation of the sucker rod string. The traveling valve is opened, and the standing valve is closed. The load is relatively stable and close to the theoretical minimum load. Similar to the BC section, if affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by fluid pound, gas or valve leakage, unloading will be delayed, and the length of stable load in the DA section will be shortened.If there is an upper step (as shown in Figure1(i)) or upper and lower boss (as shown in Figures 1(j) and 1(k)) in section DA, which is similar to “step” and “boss” in the BC section, it is considered as “abnormal”; if there is no stable DA section with a certain length in the dynamometer card, the slope is negative from the beginning of point D to the end of the downstroke, and point A coincides with point B (as shown in Figure 1(l)), which indicates that the sucker rod string is loaded immediately after unloading, and the upstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “upper step” in section DA are as follows:(6)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSFG<ΔSDA−0.1.The eigenvalues of the dynamometer card with abnormal “upper and lower boss” in section DA are as follows:(7)FDA¯−FFG¯>0.2,kEF>2,ΔSFG>0.1,ΔSDA−ΔSFG>0,ΔSAH>0.05,ΔSDE>0.05,where ΔSAH is the displacement of the AH section and ΔSDE is the displacement of the DE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section DA are as follows:(8)FA−FD>0.7,kDA<−0.7,nDA,k<−0.7nDA>0.5,where FA is the normalized polished rod load at point A, FD is the normalized polished rod load at point D; kgyDA is the slope of the DA section, nDA,k<−0.7 is the number of points with slope less than -0.7 in the DA section, and nDA is the number of points in the DA section.


## 2.2.1. Identification of Abnormal AB Section

The AB section of the normal dynamometer card is the loading section, and both the traveling valve and the standing valve are closed. As the polished rod goes up, the load of the fluid column in the wellbore is gradually loaded on the sucker rod string. The sucker rod string is elongated and the tubing is shortened, forming a section with slope greater than zero in the dynamometer card. If the loading is slow due to the influence of gas or the travelling valve leakage, the AB section becomes a curve with positive slope and upward convex. If the slope of the AB section is equal to or less than zero (as shown in section EF in Figures1(a) and 1(b)), it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal loading in section AB are as follows:(1)kEF≤0,ΔSEFΔSAB>0.1,where kEF is the slope of the EF section, ΔSEF is the displacement of the EF section, and ΔSAB is the displacement of the AB section.


## 2.2.2. Identification of Abnormal BC Section

The BC section of the normal dynamometer card is the upstroke section after the end of the initial deformation of the sucker rod string. The traveling valve is closed, the standing valve is opened, and the load is relatively stable. If it is affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by gas or the traveling valve leakage, the load will be delayed or unloaded in advance, and the length of stable load in the BC section will be shortened; if the pump plunger comes out of the working cylinder, the load will rapidly reduce to the DA section of the downstroke, which belongs to the normal dynamometer card under the influence of typical working conditions.If there are upper and lower steps (as shown in Figures1(c) and 1(d)) or upper and lower boss (as shown in Figures 1(e) and 1(f)), it indicates that the load increases or decreases periodically in the process of stable lifting, and it is regarded as “abnormal.” If there is no stable BC section with a certain length in the dynamometer card, but the slope is negative from point B until the end of upstroke and point C coincides with point D (as shown in Figure 1(g)), indicating that the sucker rod string is unloaded immediately after loading, and the downstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “step” in section BC are as follows:(2)F¯FG−F¯BC>0.2,kEF>2,ΔSFG>0.1,ΔSBC−ΔSFG>0.1,where F¯FG is the average normalized load of the FG section, F¯BC is the average normalized load of the BC section, kEF is the slope of the EF section, ΔSFG is the displacement of the FG section, and ΔSBC is the displacement of the BC section.The eigenvalues of the dynamometer card with abnormal “boss” in section BC are as follows:(3)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSDA−ΔSFG>0.1,ΔSHC>0.05,ΔSBE>0.05,where FDA is the average normalized load of the DA section, ΔSDA is the displacement of the DA section, ΔSHC is the displacement of the HC section, and ΔSBE is the displacement of the BE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section BC are as follows:(4)FB−FC>0.7,kBC<−0.7,nBC,k<−0.7nBC≥0.5,where FB is the normalized polished rod load at point B, FC is the normalized polished rod load at point C, kBC is the slope of the BC section, nBC,k<−0.7 is the number of points with slope less than -0.7 in the BC section, and nBC is the number of points in the BC section.


## 2.2.3. Identification of Abnormal CD Section

The CD section of the normal dynamometer card is the unloading section, and both the traveling valve and the standing valve are closed. As the polished rod goes down, the load of the fluid column is gradually transferred from the plunger to the tubing, the sucker rod string is shortened, and the tubing is elongated, forming a section with slope greater than zero in the dynamometer card. If it is affected by fluid pound or gas, the unloading delay will be caused, point D will move to the left, and the CD section will become a curve with positive slope and upward convex; if affected by the standing valve leakage, the CD section will become a curve with positive slope and downward convex due to slow unloading. If the slope in the CD section of the dynamometer card is less than zero (as shown in the EF section in Figure1(h)), it is regarded as “abnormal.”The eigenvalues of the dynamometer card with abnormal unloading in section CD are as follows:(5)kEF<0,ΔSEFΔSCD>0.1,where ΔSCD is the displacement of the CD section.


## 2.2.4. Identification of Abnormal DA Section

The DA section of the normal dynamometer card is the stable downward stage after the end of the initial deformation of the sucker rod string. The traveling valve is opened, and the standing valve is closed. The load is relatively stable and close to the theoretical minimum load. Similar to the BC section, if affected by sand production or rod string vibration, there will be a small amplitude of fluctuation; if affected by fluid pound, gas or valve leakage, unloading will be delayed, and the length of stable load in the DA section will be shortened.If there is an upper step (as shown in Figure1(i)) or upper and lower boss (as shown in Figures 1(j) and 1(k)) in section DA, which is similar to “step” and “boss” in the BC section, it is considered as “abnormal”; if there is no stable DA section with a certain length in the dynamometer card, the slope is negative from the beginning of point D to the end of the downstroke, and point A coincides with point B (as shown in Figure 1(l)), which indicates that the sucker rod string is loaded immediately after unloading, and the upstroke is normal, then it is considered as “abnormal.”The eigenvalues of the dynamometer card with abnormal “upper step” in section DA are as follows:(6)F¯FG−F¯DA>0.2,kEF<−2,ΔSFG>0.1,ΔSFG<ΔSDA−0.1.The eigenvalues of the dynamometer card with abnormal “upper and lower boss” in section DA are as follows:(7)FDA¯−FFG¯>0.2,kEF>2,ΔSFG>0.1,ΔSDA−ΔSFG>0,ΔSAH>0.05,ΔSDE>0.05,where ΔSAH is the displacement of the AH section and ΔSDE is the displacement of the DE section.The eigenvalues of the dynamometer card with abnormal “the slope is negative” in section DA are as follows:(8)FA−FD>0.7,kDA<−0.7,nDA,k<−0.7nDA>0.5,where FA is the normalized polished rod load at point A, FD is the normalized polished rod load at point D; kgyDA is the slope of the DA section, nDA,k<−0.7 is the number of points with slope less than -0.7 in the DA section, and nDA is the number of points in the DA section.


## 3. Calculation Model of Fluid Production and Bottom Hole Flowing Pressure Based on Dynamometer Card

### 3.1. Calculation Model of Fluid Production

The actual fluid production of an oil well is the actual surface fluid production after degassing of crude oil at the wellhead [23], and the calculation formula is as follows:
(9)Q=ηv1440SPENSAP,where Q is the actual fluid production of the oil well (m3/d), ηv is the volume factor of the mixed fluid (m3/m3), SPE is the effective stroke of the plunger, which can be determined by the downhole pump dynamometer card (m), NS is the stroke of the pumping unit (min-1), and AP is the cross-sectional area of the plunger (m2).The volume factor of mixed fluidηv is the ratio of the volume of surface fluid to the volume of mixed fluid in tubing under formation conditions [24], which is related to the parameters such as pressure P, temperature T, dissolved gas oil ratio Rs, crude oil volume factor Bo, and water volume factor Bw. The calculation formula is as follows:
(10)ηv=11−nwBo+nwBw,where nw is the water cut of the mixture under standard conditions (Pst, Tst) (%), Bo is the volume factor of crude oil under formation conditions (m3/m3), and Bw is the volume factor of water under formation conditions (m3/m3).


### 3.2. Calculation Model of Bottom Hole Flowing Pressure

In the upstroke, the plunger goes up, the traveling valve closes, and the standing valve opens when the submergence pressure is greater than the pressure in the pump barrel. After the completion of the upstroke loading, the load on the bottom end face of the sucker rod string (the load of the upstroke in the downhole pump dynamometer card) is as follows:(11)Fpu=ppfp−fr−pn−Δpsfp+Wp+f,where Fpu is the load on the bottom end face of the sucker rod string from the opening to closing of the standing valve (N), pp is the discharge pressure of the pump, which can be calculated using the correlation formula of multiphase pipe flow in wellbore (Pa), fp and fr are the cross-sectional areas of the plunger and the lower end face of the sucker rod string, respectively (m2), pn is the submergence pressure (Pa), Δps is the pressure drop caused by the fluid passing through the standing valve hole (Pa), Wp is the plunger weight (N), and f is the friction force between the plunger and pump barrel (N).In the downstroke, the plunger moves down, the standing valve closes, and the traveling valve opens when the pressure in the pump barrel is greater than the fluid column pressure above the plunger. After the unloading of the downstroke, the load on the bottom end face of the sucker rod string (the load of the downstroke in the downhole pump dynamometer card) is as follows:(12)Fpd=ppfp−fr−pp+Δptfp+Wp−f,where Fpd is the load on the bottom end face of the sucker rod string from the opening to closing of the traveling valve (N) and Δpt is the pressure drop caused by the fluid passing through the traveling valve hole (Pa).The calculation formula of pump discharge pressurepp is as follows:
(13)pp=pt+ρlgLp,where pt is wellhead oil pressure (Pa), ρl is the density of fluid in the oil pipe (kg/m3), g is the acceleration of gravity (m/s2), and Lp is the pump setting depth (m).For convenience of calculation, it is assumed that the pressure drop [25] caused by the fluid passing through the traveling valve or standing valve is Δp, that is,
(14)Δpt=Δps=Δp=ρl729×μ2×fp2f02×s×n2,where ρl is the density of the fluid in the oil pipe (kg/m3), f0 is the area of the valve hole of the traveling valve or standing valve (m2), s is the stroke of the plunger (m), n is the stroke (min-1), and μ is the valve flow coefficient, dimensionless.By subtracting formula (11) from formula (12), we can get
(15)Fpu−Fpd=pt+ρlgLp−pn+2Δpfp+2f.Through sorting, we obtain(16)pn=pt+ρlgLp+2Δp−Fpu−Fpdfp+2ffp.The calculation formula of bottom hole flowing pressure is as follows:(17)pwf=Hz−Lpρlg+pn+pc,where pwf is the bottom hole flowing pressure (Pa), Hz is the depth in the middle of the reservoir (m), and pc is the wellhead casing pressure (Pa).By substituting formula (16) into formula (17), we can get the following results:
(18)pwf=Hzρlg+pc+pt+2Δp−Fpu−Fpdfp+2ffp.Therefore, the bottom hole flowing pressurepwf can be obtained from the load difference (Fpu−Fpd) between the upstroke and downstroke of the downhole pump dynamometer card.


### 3.3. Method for Determining the Opening and Closing Points of Pump Valves

The solution method of the downhole pump dynamometer card is as follows. Taking the surface position and load (surface dynamometer card) as the boundary conditions, the Fourier series method was used to solve the one-dimensional damped wave equation [26–28].One of the key steps in calculating the effective stroke and the load difference between the upstroke and downstroke of the downhole pump dynamometer card is to accurately determine the position of opening and closing points of pump valves [29]. According to the analysis of the downhole pump dynamometer card, the opening and closing points of the valves are located at the position where the curvature of the curve changes significantly. The opening and closing points of the standing valve are located in the upstroke section of the downhole pump dynamometer card, and the opening and closing points of the traveling valve are located in the downstroke section of the downhole pump dynamometer card. Therefore, the position of opening and closing points of traveling valve and standing valve can be determined by calculating four points with the largest curvature change in the upstroke and downstroke section.Because there is a lot of high-frequency parts in the closed curve of downhole pump dynamometer card obtained by numerical calculation method, the five-point average method is used to eliminate or reduce the curvature change caused by it in actual calculation, so as to improve the accuracy of curvature calculation.The specific steps of determining the opening and closing points of pump valves are as follows.Step 1.
The average value of the coordinates of each point is calculated by the five-point average method.Step 2.
The maximum valueXmax and minimum value Xmin of the abscissa and the maximum value Ymax and minimum value Ymin of the ordinate in the downhole pump dynamometer card are calculated, respectively.Step 3.
The discrete points are normalized, and the normalization formula is as follows:ΔXi=Xi¯−Xmin/Xmax−Xmin and ΔYi=Yi¯−Ymin/Ymax−Ymin.Step 4.
The normalized downhole pump dynamometer card is expanded along the plunger stroke, and the pump dynamometer card changes from a closed curve to a single value curve, as shown in Figure2.Step 5.
According to the curvature calculation model of discrete points [30], the curvature value Ki of each discrete point is calculated.Step 6.
According to the formulaδi=∣Ki+1−Ki∣, the variation δi between the curvature Ki of one discrete point and the curvature Ki+1 of its following discrete point are obtained.Step 7.
The average loaddfa of normalized load is introduced. Assuming that dfu=dfa+0.1, dfd=dfa−0.1, the opening and closing points of standing valve (points A and B) are determined according to the two points with the largest curvature change in the range of normalized load greater than dfu during the upstroke, and the opening and closing points of the traveling valve (points C and D) are determined according to the two points with the largest curvature change in the range of normalized load less than dfd during the downstroke.Figure 2
Determination of opening and closing points of pump valves.


## 3.1. Calculation Model of Fluid Production

The actual fluid production of an oil well is the actual surface fluid production after degassing of crude oil at the wellhead [23], and the calculation formula is as follows:
(9)Q=ηv1440SPENSAP,where Q is the actual fluid production of the oil well (m3/d), ηv is the volume factor of the mixed fluid (m3/m3), SPE is the effective stroke of the plunger, which can be determined by the downhole pump dynamometer card (m), NS is the stroke of the pumping unit (min-1), and AP is the cross-sectional area of the plunger (m2).The volume factor of mixed fluidηv is the ratio of the volume of surface fluid to the volume of mixed fluid in tubing under formation conditions [24], which is related to the parameters such as pressure P, temperature T, dissolved gas oil ratio Rs, crude oil volume factor Bo, and water volume factor Bw. The calculation formula is as follows:
(10)ηv=11−nwBo+nwBw,where nw is the water cut of the mixture under standard conditions (Pst, Tst) (%), Bo is the volume factor of crude oil under formation conditions (m3/m3), and Bw is the volume factor of water under formation conditions (m3/m3).


## 3.2. Calculation Model of Bottom Hole Flowing Pressure

In the upstroke, the plunger goes up, the traveling valve closes, and the standing valve opens when the submergence pressure is greater than the pressure in the pump barrel. After the completion of the upstroke loading, the load on the bottom end face of the sucker rod string (the load of the upstroke in the downhole pump dynamometer card) is as follows:(11)Fpu=ppfp−fr−pn−Δpsfp+Wp+f,where Fpu is the load on the bottom end face of the sucker rod string from the opening to closing of the standing valve (N), pp is the discharge pressure of the pump, which can be calculated using the correlation formula of multiphase pipe flow in wellbore (Pa), fp and fr are the cross-sectional areas of the plunger and the lower end face of the sucker rod string, respectively (m2), pn is the submergence pressure (Pa), Δps is the pressure drop caused by the fluid passing through the standing valve hole (Pa), Wp is the plunger weight (N), and f is the friction force between the plunger and pump barrel (N).In the downstroke, the plunger moves down, the standing valve closes, and the traveling valve opens when the pressure in the pump barrel is greater than the fluid column pressure above the plunger. After the unloading of the downstroke, the load on the bottom end face of the sucker rod string (the load of the downstroke in the downhole pump dynamometer card) is as follows:(12)Fpd=ppfp−fr−pp+Δptfp+Wp−f,where Fpd is the load on the bottom end face of the sucker rod string from the opening to closing of the traveling valve (N) and Δpt is the pressure drop caused by the fluid passing through the traveling valve hole (Pa).The calculation formula of pump discharge pressurepp is as follows:
(13)pp=pt+ρlgLp,where pt is wellhead oil pressure (Pa), ρl is the density of fluid in the oil pipe (kg/m3), g is the acceleration of gravity (m/s2), and Lp is the pump setting depth (m).For convenience of calculation, it is assumed that the pressure drop [25] caused by the fluid passing through the traveling valve or standing valve is Δp, that is,
(14)Δpt=Δps=Δp=ρl729×μ2×fp2f02×s×n2,where ρl is the density of the fluid in the oil pipe (kg/m3), f0 is the area of the valve hole of the traveling valve or standing valve (m2), s is the stroke of the plunger (m), n is the stroke (min-1), and μ is the valve flow coefficient, dimensionless.By subtracting formula (11) from formula (12), we can get
(15)Fpu−Fpd=pt+ρlgLp−pn+2Δpfp+2f.Through sorting, we obtain(16)pn=pt+ρlgLp+2Δp−Fpu−Fpdfp+2ffp.The calculation formula of bottom hole flowing pressure is as follows:(17)pwf=Hz−Lpρlg+pn+pc,where pwf is the bottom hole flowing pressure (Pa), Hz is the depth in the middle of the reservoir (m), and pc is the wellhead casing pressure (Pa).By substituting formula (16) into formula (17), we can get the following results:
(18)pwf=Hzρlg+pc+pt+2Δp−Fpu−Fpdfp+2ffp.Therefore, the bottom hole flowing pressurepwf can be obtained from the load difference (Fpu−Fpd) between the upstroke and downstroke of the downhole pump dynamometer card.


## 3.3. Method for Determining the Opening and Closing Points of Pump Valves

The solution method of the downhole pump dynamometer card is as follows. Taking the surface position and load (surface dynamometer card) as the boundary conditions, the Fourier series method was used to solve the one-dimensional damped wave equation [26–28].One of the key steps in calculating the effective stroke and the load difference between the upstroke and downstroke of the downhole pump dynamometer card is to accurately determine the position of opening and closing points of pump valves [29]. According to the analysis of the downhole pump dynamometer card, the opening and closing points of the valves are located at the position where the curvature of the curve changes significantly. The opening and closing points of the standing valve are located in the upstroke section of the downhole pump dynamometer card, and the opening and closing points of the traveling valve are located in the downstroke section of the downhole pump dynamometer card. Therefore, the position of opening and closing points of traveling valve and standing valve can be determined by calculating four points with the largest curvature change in the upstroke and downstroke section.Because there is a lot of high-frequency parts in the closed curve of downhole pump dynamometer card obtained by numerical calculation method, the five-point average method is used to eliminate or reduce the curvature change caused by it in actual calculation, so as to improve the accuracy of curvature calculation.The specific steps of determining the opening and closing points of pump valves are as follows.Step 1.
The average value of the coordinates of each point is calculated by the five-point average method.Step 2.
The maximum valueXmax and minimum value Xmin of the abscissa and the maximum value Ymax and minimum value Ymin of the ordinate in the downhole pump dynamometer card are calculated, respectively.Step 3.
The discrete points are normalized, and the normalization formula is as follows:ΔXi=Xi¯−Xmin/Xmax−Xmin and ΔYi=Yi¯−Ymin/Ymax−Ymin.Step 4.
The normalized downhole pump dynamometer card is expanded along the plunger stroke, and the pump dynamometer card changes from a closed curve to a single value curve, as shown in Figure2.Step 5.
According to the curvature calculation model of discrete points [30], the curvature value Ki of each discrete point is calculated.Step 6.
According to the formulaδi=∣Ki+1−Ki∣, the variation δi between the curvature Ki of one discrete point and the curvature Ki+1 of its following discrete point are obtained.Step 7.
The average loaddfa of normalized load is introduced. Assuming that dfu=dfa+0.1, dfd=dfa−0.1, the opening and closing points of standing valve (points A and B) are determined according to the two points with the largest curvature change in the range of normalized load greater than dfu during the upstroke, and the opening and closing points of the traveling valve (points C and D) are determined according to the two points with the largest curvature change in the range of normalized load less than dfd during the downstroke.Figure 2
Determination of opening and closing points of pump valves.


## 4. Calculation Model of Inflow Performance Relationship Based on Genetic Algorithm Fitting

### 4.1. Calculation Model

Based on the Bendakhlia model, genetic algorithm [31–33] is used to regress and fit the data of bottom hole flowing pressure and its corresponding fluid production calculated by the dynamometer card so as to determine the most ideal IPR equation of oil well. The calculation model is shown in the following:
(19)qoqmax=1−vpwfpr−1−vpwfpr2n,where pwf is the bottom hole flowing pressure of the oil well (MPa), qo is the fluid production of the oil well corresponding to a certain bottom hole flowing pressure (m3/d), pr is the average pressure of the reservoir (MPa), qmax is the maximum fluid production of the oil well (m3/d), and v and n are the fitting coefficients, which are related to the recovery degree of the oil well.


### 4.2. The Steps of Regression Fitting Using Genetic Algorithm

The specific steps of regression fitting using genetic algorithm are as follows.Step 1.
The three variablesqmax, v, and n related to the model are arranged into a string, which is encoded in real number. The string is regarded as the “chromosome” in genetic algorithm.Step 2.
A group of “chromosomes” (30–160 groups of parameters) is randomly generated, and the fluid productionqii=1,2,⋯,n of each bottom hole flowing pressure corresponding to each group of parameters in the population is calculated by formula (19). If the actual fluid production value corresponding to each bottom hole flowing pressure is qtii=1,2,⋯,n, the fitness function is qi−qti2, and the fitness of each chromosome in the population is calculated. The smaller the fitness is, the closer the calculation result is to the actual situation.Step 3.
After the emergence of the initial group, the next generation of individuals is selected according to the principle of survival of the fittest. That is to eliminate the “chromosome” with larger fitness and retain the “chromosome” with smaller fitness. For the individuals selected for breeding the next generation, the same positions of two individuals are randomly selected, and according to the cross probabilityP, the selected positions are exchanged. After that, the mutation probability Pm is used to perform mutation on some bits of some individuals. In this way, a new generation of groups emerged and replaced the old ones.Step 4.
In this way, after several generations of selection, crossover, and variation, the survival population has a smaller fitness than the original population. Finally, the “chromosome” with the smallest fitness is selected as the optimal value, which corresponds to the three coefficients in the calculation model of inflow performance relationship curve. The flow chart of fitting regression is shown in Figure3.Figure 3
Flow chart of genetic algorithm.


## 4.1. Calculation Model

Based on the Bendakhlia model, genetic algorithm [31–33] is used to regress and fit the data of bottom hole flowing pressure and its corresponding fluid production calculated by the dynamometer card so as to determine the most ideal IPR equation of oil well. The calculation model is shown in the following:
(19)qoqmax=1−vpwfpr−1−vpwfpr2n,where pwf is the bottom hole flowing pressure of the oil well (MPa), qo is the fluid production of the oil well corresponding to a certain bottom hole flowing pressure (m3/d), pr is the average pressure of the reservoir (MPa), qmax is the maximum fluid production of the oil well (m3/d), and v and n are the fitting coefficients, which are related to the recovery degree of the oil well.


## 4.2. The Steps of Regression Fitting Using Genetic Algorithm

The specific steps of regression fitting using genetic algorithm are as follows.Step 1.
The three variablesqmax, v, and n related to the model are arranged into a string, which is encoded in real number. The string is regarded as the “chromosome” in genetic algorithm.Step 2.
A group of “chromosomes” (30–160 groups of parameters) is randomly generated, and the fluid productionqii=1,2,⋯,n of each bottom hole flowing pressure corresponding to each group of parameters in the population is calculated by formula (19). If the actual fluid production value corresponding to each bottom hole flowing pressure is qtii=1,2,⋯,n, the fitness function is qi−qti2, and the fitness of each chromosome in the population is calculated. The smaller the fitness is, the closer the calculation result is to the actual situation.Step 3.
After the emergence of the initial group, the next generation of individuals is selected according to the principle of survival of the fittest. That is to eliminate the “chromosome” with larger fitness and retain the “chromosome” with smaller fitness. For the individuals selected for breeding the next generation, the same positions of two individuals are randomly selected, and according to the cross probabilityP, the selected positions are exchanged. After that, the mutation probability Pm is used to perform mutation on some bits of some individuals. In this way, a new generation of groups emerged and replaced the old ones.Step 4.
In this way, after several generations of selection, crossover, and variation, the survival population has a smaller fitness than the original population. Finally, the “chromosome” with the smallest fitness is selected as the optimal value, which corresponds to the three coefficients in the calculation model of inflow performance relationship curve. The flow chart of fitting regression is shown in Figure3.Figure 3
Flow chart of genetic algorithm.


## 5. Calculation and Analysis of Examples

In order to verify the accuracy of the established model and the feasibility of the genetic algorithm regression curve, a sucker rod pump well J1 in an oilfield is taken as an example for calculation and analysis. The average pressure of the reservoir is 10.4 MPa during multipoint test. The dynamometer card, bottom hole flowing pressure, and corresponding fluid production of eight points are measured. The dynamometer card is identified, and the fluid production and bottom hole flowing pressure are calculated by using the model established in this paper. The calculation results are shown in Table1. It can be seen that the average relative error of bottom hole flowing pressure calculation is 4.06%, and the average error of fluid production calculation is 2.49%, which shows that the model has high calculation accuracy and can accurately identify the abnormal dynamometer card to ensure the accuracy of inflow performance relationship curve fitting data.Table 1
Calculation results.
NumberDynamometer cardIdentification resultsBottom hole flowing pressurepwf (MPa)Fluid productionqt (m3/d)MeasuredCalculatedErrorMeasuredCalculatedError1Normal8.28.53.66%29.129.61.72%2Normal7.88.02.56%37.635.36.12%3Abnormal7.1——43.2——4Normal6.66.83.03%46.547.31.72%5Normal5.65.43.57%60.158.92.00%6Normal4.04.25.00%65.867.11.98%7Normal2.92.83.45%76.174.81.71%8Normal1.41.57.14%78.780.42.16%Average4.06%2.49%The data calculated by the dynamometer card (see Table1) is used to fit the inflow performance relationship curve, and the measured data are plotted on the diagram and then compared with the IPR curve of the Vogel equation, as shown in Figure 4. It can be seen that the inflow performance relationship curve calculated by the model proposed in this paper fits well with the measured data points, while the Vogel equation, which is representative in IPR calculation, has considerable error with the measured data due to the limitation of its parameter application range.Figure 4
Inflow performance relationship curve.The fitting equation is as follows:(20)qoqmax=1−0.364pwfpr−1−0.364pwfpr20.824,(21)qmax=85.1m3/d.In order to further verify the accuracy of the model, the measured bottom hole flowing pressure (7.1 MPa) of the third group in Table1 is substituted into equation (20). The calculated fluid production is 44.5 m3/d, and the measured fluid production is 43.2 m3/d. The relative error of this model is 3.0%, while that of the Vogel model is 11.3%. It can be seen that the IPR calculation model proposed in this paper has higher accuracy, which can provide theoretical guidance and technical support for the field.


## 6. Conclusions

(1)
By analyzing the forming principle of the dynamometer card, considering the abnormal changes of load that may occur in the four stages of dynamometer card formation, the abnormal dynamometer card plate and identification model are established to ensure the accuracy of dynamometer card data. According to the working principle of the pump and the physical meaning of the opening and closing points of the pump valves, the opening and closing points of standing valve and traveling valve are determined by analyzing the curvature of each point on the curve of downhole pump dynamometer card, and the model for calculating fluid production and bottom hole flow pressure is established to obtain the data of fluid production and bottom hole flow pressure. Finally, a method for calculating inflow performance relationship fitted with the calculated fluid production and bottom hole flowing pressure data based on genetic algorithm is established(2)
The field application and analysis results show that the well inflow performance relationship curve calculated by the model in this paper fits well with the measured data points, indicating that the calculation model has high accuracy and can provide theoretical and technical support for the field. Using this model, we can fit thev and n values of oil wells in different periods and under different production conditions according to dynamometer card, so as to determine the most ideal IPR equation of oil wells and improve the accuracy of productivity prediction(3)
Based on the informatization and intelligent construction of oilfield, the data such as surface dynamometer card, oil pressure, and casing pressure are collected in real time, which can provide real-time data source for fitting calculation of inflow performance relationship curve of oil well, improve the timeliness of oil well production analysis, and help to reduce the production management costs and improve the production efficiency and benefit



---

*Source: 8884988-2020-11-16.xml*