DOI: 10.18273/revuin.v18n2-2019002
Mathematical model of controllers for progressive cavity pumps
Modelos matemáticos para controladores de las bombas de cavidad progresiva
Juan Bernardo Ceballos1a*, Óscar Andrés Vivas1b
1 Departamento de Electrónica, Universidad del Cauca, Colombia.Email:
ajuanceballos@unicauca.edu.co
bbavivas@unicauca.edu.co
Forma de citar: J. B. Ceballos, O. A. Vivas, “Mathematical model of controllers for progressive cavity pumps,” Rev. UIS Ing., vol. 18, no.2, pp. 17-30, 2019.doi: 10.18273/revuin.v18n2-2019002
Received: 26January 2018. Accepted: 14 September 2018. Final version: 1 November 2018.
Abstract
Progressive Cavity Pumps (PCP) is an artificial fluid lift method widely used in oil wells of Colombia, Canada and Venezuela, where the pump is driven by a rod connected to the motor located at the surface. Efficiency in energy production is critical, and the current control techniques used are based on discrete changes, seeking for an operational point. This approach can be improved, and optimization techniques proposed are presented in this paper. Strategies of control based on continuous adjustments of motor speed and fuzzy logic together with a downhole pressure sensor are simulated for this nonlinear system. Utilization of Kalman filtering, for estimation of the fluid level in wells that are not instrumented, is proposed. Linear Quadratic Regulator (LQR) also is used to optimize production performance. Results show good performance compared with current techniques.
Keywords: fuzzy logic, Kalman filter, linear quadratic regulator, oil production, progressive cavity pump.
Resumen Las bombas de cavidad progresiva son un método de levantamiento artificial utilizado en pozos petroleros de Canadá, Colombia y Venezuela. En este método, la bomba de subsuelo está conectada hasta el motor en superficie, por medio de una varilla que la hace rotar. La eficiencia es un tema central, especialmente cuando se trata de producción de energía. Actualmente el enfoque de control para estos sistemas se basa en cambios discretos, y busca un punto de operación. En este artículo se simulan numéricamente estrategias de control continuas,incluyendo lógica difusa. Se utiliza un sensor de presión de fondo de pozo.Cuando dicho sensor no está disponible, se estima el nivel de fluido encima de la bomba por medio de la implementación deun filtro de Kalman. Para la optimización de la producción, se utiliza un regulador cuadrático lineal (LQR, por sus siglas en inglés). Los resultados muestran un buen desempeño al compararlo con las técnicas actuales. Palabras clave: bomba de cavidad progresiva, filtro de Kalman, lógica difusa, producción de petróleo, regulador cuadrático lineal. INTRODUCCIÓN
There is a continuous search for efficiency in energy production. Currently,oil accounts for 33% of the global energy matrix [1]. As the oil fields are produced, they lose energy, requiringtoartificially lift the fluids out of the wells up to surface.
Several approaches toartificial lifting are used. There is rod pump where a motor drives a rod up and down which inturn moves the pump. Electrical Submersible Pump (ESP) refers to when themotorislocated downhole and drives a centrifugal pump. Gas lifting is applied by injecting gas into a column of fluid, increasing its velocity and decreasing its density. Jet pumping increases the produced fluids velocity by pumping at the surface a hydraulic liquid down the well.
Another method used is the Progressive Cavity Pump (PCP). In this system,a surface motor drives a rod, which in turn drives the subsurface pump. The pump itself is composed of a single helical metal rotor and a double helical stator covered with elastomer. As the rotor turns, it creates a series of sealed cavities that move upward, driving the fluids in that direction [2], [3], [4],[5],[6],[7],[8]. A typical configuration of the system is exhibited in Figure 1.
The system has a rotation sensor at the surface to measure the RPM of the motor and thetorque sensor. The RPM and torque need to be controlled to avoid exceeding the pump specification and the rating of the driving rod to prevent a twist off. The normal range of operation of PCP systems takes to wells up to 6521 ft (2000 m) deep. These systems are widely used in oil wells of Canada, Venezuela [6] and Colombia.
The level of fluid in the annulus in the outer side of the production tubing determines the pressure drawdown that is exerted over to the reservoir exposed at the perforations of the casing. Reducing the fluid level will increase the drawdown, but it could increase water and sand production. Furthermore, the pump needs to operate fully immersed in fluid otherwise it will overheat, damaging the stator’s elastomer which would require a workover to replace the pump.
Currently, the control systems driving these pump systems rely on discrete changes of RPM [9],while measuring the fluid level in the annular with a portable ultrasound echo recorder and monitoring to torque applied to the rod string.
In this work, it isproposedan alternate control strategy, with continuous adjustments to RPM and downhole measurement of the intake pressure of the pump. The intake pressure provides a direct measurement of the annular level [10]. Regarding the control itself, the use of fuzzy logic to program the controller provides an intuitive approach to control, which is robust, stable and predictable. The fuzzy logic control for hydraulic systems was proposed and developed in [11]. This fuzzy logic approach was applied to develop a controller for the PCP system [12] focused on controllingtheannular level and torque by adjusting RPM.
This work is focused on the numerical simulation of the proposed control strategy. A model is developed that includes the fluid flow from the reservoir into the well, the pump performance and finally, the pressure losses in the producing tubular to the surface. The model is then calibrated against data from a real well with a PCP.
Very often there is no direct measurement of the fluid level in the annulus between the producing tubular and the casing. These cases require an operator at the well site with an ultrasound device that measures the fluid level. This process is costly and lacks continuous data that would ensure thesubmergence of the pump and the optimum pressure drawdown. A Kalman filter [13], [14] was implemented as an observer to generate an estimate of the fluid level. This observer enhances the applicability of the control system to wells that are not instrumented
The overall strategy of the controller aims to maximize the oil production from the well. With this in mind, a Linear Quadratic Regulator (LQR) is implemented [14]. For the LQR, a quadratic cost function is defined that optimizes the annular level, i.e., manages the pressure drawdown from the formation into the borehole. A comparison for the discrete system used in the industry with the continuous one proposed in this work is done, both using the LQR. Stabilization time, torque and the cumulative production are used for the comparison.
2.Mathematical model
A block diagram of the system object of this study is shownin Figure 2. The reservoir delivers fluid to the wellbore, filling the annulus. A PCP lifts the produced fluid up the tubing to surface. The surface motor drives the rod that turns the PCP.
There are several components of the system that need numerical modeling in order to incorporate them into the simulator. Starting with the PCP pump itself, which has its hydraulic performance modeled in [15]. Other components of the system are tubulars in the well that connect the reservoir with the surface. The numerical models for the pressure losses in the tubings are developed by in the reference material of the Society of Petroleum Engineers [16]..
2.1.Pump rate and slippage
Modeling of the progressive cavity pump has been done in [5]. In this paper, the author develops the equations that relate pump rate to RPM and includes the slippage as presented in Equation (1). Slippage is caused by the backflow of fluid within the pump due to imperfect sealing between the rotor and the stator.
Where:
Qa is the flow rate (in^3/min)
d is the diameter of the rotor in inches
e is the eccentricity measured in inches
K is the number of lobes in the stator
Ps is the pitch length of the stator in inches
N is the rotational speed in RPM
Stotal, Sl an St arethe slippage total, longitudinal and transversal respectively
w is the clearance between the rotor and the stator in inches
Ll and Ltare the depths of the channel swhere backflow takes
place. This has been iteratively computed in [5] to be 1.65mm (0.065inches) for both the longitudinal and transversal channels.Pump torque: Torque at the pump has a hydraulic part and a component associated withthe friction as given by Equation 6.
Where:
C is a constant that depends of the units used. For the case of MKS, it is equal to 0.111
s is the pump displacement in m^3/day/RPM plift is the pressure differential across the pump
Tf is torque caused by friction at the pump,and it is estimated at about 20%
2.2.Pressure losses in the producing tubing
The pressure changes along the tubulars are computed based on the first law of thermodynamics together with mass conservation. As the flow velocity and the fluid level changes, there are changes between kinetic and potential energies; hence, the authors arrive at differential Equation8. These equations are foundin[16].
Where:
O is the inclination of the pipe
v is the flow velocity
p is the fluid density
u is the fluid viscosity
O is the inclination of the pipe
g is gravity's aceleration
gc is a unit’s conversion factor; for the case of the imperial system, it is equal to 32.174
F1 is the Newtonian friction factor which is a function of the Reynolds number, which depends on the type of the flow inside the pipe (either turbulent or laminar) and the internal rugosity. The graph that describes the function is displayed in Figure 3
Re is the Reynolds number
2.3.Darcy ́s law
It is the differential equation that describes the flow of monophasic fluid with in the reservoir and is presented in Equation(11).
Where:
p is the fluid density
u is the fluid viscosity
k is the formation permeability
A is the unit cross section
q is the unit of flow
2.4.Fuzzy logic
Fuzzy logic refers to many-valued logicrather thanBoolean logic that has only the values of “true” and “false”.When applied to control, the ranges of the values vary from completely falseto completely true and are defined by membership functions.
The application of fuzzy logic controllers for a two tank system was presented in [3] where it was compared against a PID controller. The fuzzy logic controller presented a reduced overshoot and comparable settling time to the ones obtained with the PID. Controllers based in fuzzy logic for different applications are presented in [7]. Application of fuzzy logic controllers in the oil industry was not documented in the bibliography reviewed.
3.System model
Based on the on the mathematical models presented in the previous section, a numerical model for use during simulationis developed.
For the modeled system,both the levels of the annulus and the tubing havebeendefined as states, as presented in (12).
Furthermore,inputsare defined as the RPM at the surface motor, thepressure of the reservoir and the back pressure set to the production at the surface (normally via a wing valve) u(t) aspresented in (13)
The system si assumed to be Linear Time-Invariant (LTI) with in the operatin granges of the system and the time frames of operation of the PCP; thus, the system is defined by the state-space representation presented in(14).
The outputs of the system that are instrumented for measurement are presented in (15). All the outputs could be affected by noise in its measurement.
To select the parameters for the model, genuin evalues coming from an actua lwell in Colombia areused, instrumented and fit ted with a PCP. From the published mechanical status of the well, it was used the actual tubulars lengths, interna and external diameters(casing & production tubing), depths of the perforation sand PCP location. For the fluid characteristics in terms of viscosity, typical values from the oil produced in the region were taken. Formation pressure and permeability were taken from published values of the area. Thefluid parameters were used for thenon linear mathematical model:
Regarding set points, it isused as the reference for production 100 bopd. For torque, the set point is 350 lb. ft ,and the reference of the level is 100 ft above the pump .As the well is instrumented and has telemetry, its values were used forcalibration of torque and production coefficients used in the mathematical model.
4.Results
The numerical models of Darcy’s Law, pump rate, torque and pressure losses along the tubular were coded in SimulinkTM. The model was calibrated against actual data obtained from a well in the Llanos Province of Colombia that has a PCP (WTF 18.35-400 NU) with rotor spacing of 35 inches, installed at 3131 ft fromthesurface, inside a 7 inches OD 23# casing with a 3 ½ inches OD EUE 9.3# producing tubing. The specifications of the PCP are given by the manufacturer in the corresponding datasheet.
Data was sampled once every 5 minutes and is presented in Figure4. At 5230 minutes,the flow sensor (wedge) at the surface was changed because it was operating outside of its calibrated range, generating thesudden change in flow rate at the surface.
In Figure 5,a cross plot of torque and the RPM measured in the wellare demonstrated. In this plot, the discrete changes of RPM applied by the controllerare evident. It can be observed that values of torque increase substantially at the mid-range of RPM values. Torquemustremain controlled;if it increases substantially, it could cause a twist off ofthe rod, prompting a workover to replace it.
The plant is simulated,and real data is compared with the simulated plant as it is shownin Figure 5. A reasonable fit was obtained.
A fuzzy logic controller was developed with four membership functions, as follows: torque and annular differences from their corresponding references and the derivatives of those measurements. The membership functions adopted aGaussian distribution. Each membership function for the measurements was divided in low, medium and high. The membership functions for the derivatives were divided in increasing, stable and decreasing. The output controls the RPM,which can increase fast, increase, no change, decrease or decrease fast. The rules are defined in terms very similar to natural language;for instance:
if(torquedifislow)and(torqueslopeisdecreasing)then(RPMincreasesfast)
The rules are described in surfaces. The surface that describes the rules for torque is presented in Figure 7. Fifteen rules were defined to set up the controller. The simulation model, together with the Fuzzy logic controller,as it was developed in SimulinkTM[17], is illustratedin Figure 8.
A comparison was made between the response of the fuzzy logic controller and a PID controller, with the same references and parameters. The simulation is run for 400 seconds; thereference for torque is350 lb-ft, and for the fluid level, it is100 ft over the pump. The intention was to obtain production at the surface as quick as possible,while maintaining torquewithin its acceptable range and managing the fluid level to ensure that the pump remains immersed in liquid and that proper drawdown is given to the formation, so thatfluid flow into the wellcan be ensured. These goals are straightforward to express in terms of rules of fuzzy logic rather than reference values of operation. The strategy adopted was conservative in terms of torque value to avoid stressing the rod and fluid level in order to preventpump damage if operated without being immersed in fluid.
In Figure9 ,acomparis on is presented between both contro llers for torque and fluid production at the surface. In the case of the fuzzy logic controller, there is no over shoot in torque. As the fuzzy logic controller is programmatic, torque is given tigh ter conditions. In Figure9, the controller sare compared in termso ffluid level. Here, the fuzzy logic rules are softer, asw hatis critical is to avoid the pump from running with out liquid.
The PID tends precisely towards the reference level, stabilizing there. The fuzzy logic control stabilizes with an offset from the reference values. The PID presents overshoot in both torque and fluid level. The PID has an undershoot for the fluid level. The fuzzy logic controller does not have overshoot for torque but has an overshoot in fluid level. The strategy used to set up the rules in the fuzzy logic controller was to be conservative in terms of torque and to ensure that the pump was fully immersed in fluid in order to preserve the integrity of the system, avoiding a rod twist off or pump damage and the corresponding workover with its lost production.
In Figure 10, a comparison of the annular level is presented for both the PID and the fuzzy logic controller. It can be noticed that the PID is more accurate in reaching the set point although the Fuzzy controller has bigger overshoot and maintains an offset for this level.
In Table 1, a performance comparison of a PID controller with the fuzzy logic controller is presented. It compares how long it takes for production to reach surface, and what production rate is reached in a steady state. Furthermore, it is presented a comparison of the overshoot both for torque and annular level. As the fuzzy logic controller is set up to be conservative in terms of torque, it eliminates torque overshoot, that is still present in the PID.
4.1.Kalman filter
Most of the wells fitted with PCP’s do not have a pressure gauge in the annulus of the production tubing; hence, there is no direct measurement of the drawdown. In order to get an estimate of the annular level, a Kalman filtering (Linear Quadratic Estimator - LTE) was implemented. A Kalman filter estimates an internal state of a linear system (LTI). The Kalman Filter is computed in such a way that minimizes the steady-state error covariance between the estimated and the actual state (16). The optimal solution is the Kalman Filter.
The solution is computed to minimize the cost function (17) using the set-up matrices as presented in (18) and (19). NM is set equal to zero. The coefficients are set by trial and error.
A linearized model is used in order to compute the Kalman filter which then is simulated together with the nonlinear model, and the results are showcased in Figure 11. There is close tracking between the annular level estimated and the one computed with the nonlinear model.
This approach presents a valid approximation when there is no instrumentation downhole the well to measure the level at the annular. Most commonly this measurement is done with an ultrasound transducer at the surface, which requires an operator at the surface, or with pressure sensor downhole. Most wells with PCP are not instrumented permanently.
The annular level is one of the states controlled, as it must be as low as possible to increase pressure drawdown, therefore, increasing production. However, the PCP must remain with liquid around it to prevent damage to the stator. The annular level is used by the LQR, PID and fuzzy controllers.)
4.2.Linear Quadratic Regulator
Optimization of the production is the main goal behind control for an artificial lift system. One optimization approach that proved its applicability was the Linear Quadratic Regulator (LQR). For the LQR, a quadratic cost function (20) is defined, and the objective is to minimize such function.
For the modeled well, there are both the levels of the annular and inside the tubing in x(t), as presented in (21).
Furthermore, u(t) is defined as presented in (22):
The overall objective is to minimize both the annular level and RPM. Increasing the drawdown pressure improves producibility. Reducing RPM improves reliability of the system. Q and R are defined as presented in Equations (23) and (24). N is defined as equal to zero.
4.3.Comparison
To compare the controllers, the nonlinear model of the plant was used, and the annular level was estimated by the Kalman filter. Noise, disturbances to the measurements and backlash on the RPM adjustments, are introduced in order to account for the characteristics of the actual system. The cumulative production is computed for 4.5 hours of simulated time. As the LQR takes a long time to stabilize its production, an additional simulation of 55.5 hours was run for the LQR (discrete and continuous) in order to measure the stabilization time, and it is presented in Figure 12. It is worth noting that the fuzzy logic controller stabilizes at a higher production rate.
The fuzzy logic controller shows sensitivity to the noise and presents overshoot in torque, whereas the LQR controllers keep torque at lower values. Figure 13 shows the transient response with the overshoot for both the fuzzy and the PID. The comparison was run between the PID, fuzzy, LQR and the LQR using the current industry practice of discrete adjustments. The metrics are cumulative production, stabilization time, torque overshot and steady state value of torque. The results are presented in Table 2.
The results presented Table 2 demonstrate that the fuzzy logic shows a substantial overshoot of torque and stabilizes at the highest value of torque. The continuous LQR show the optimization in terms of production without exceeding in torque values. The current system used in the industry (LQR discrete) presents the longest stabilization time and reaches comparable flow rates in steady state, as compared with the LQR continuous.
Conclusions
A mathematical model was built and calibrated against actual data. The model includes the interaction of the reservoir with the well, the pump response and the pressure losses along the producing tubing. The model was built into SimulinkTM.
The overall objective is to obtain the maximum production of fluid at the surface as early as possible without exceeding the torque ratings, while maintaining the pump submerged in liquid and keeping the required fluid level to draw down production from the reservoir.
The fuzzy logic controller presents a potential framework to control a PCP system. The rules that apply to the fuzzy logic controller are intuitive, simplifying troubleshooting, and several inputs can be easily combined with logical connectors to control a single output (RPM). A concern remains in how the fuzzy logic controller dealt with a noisy environment. The fuzzy logic presented some challenges in terms of torque management when noise is introduced into the system.
The dynamic response of the fuzzy logic controller is comparable to a PID controller, with a limited overshoot, under low noise conditions. The fuzzy logic controller keeps an offset from the reference levels although it reaches comparable values of production and response time. The fuzzy logic controller starts the RPM only after having a fluid column on top of the pump.
PID controller is more precise in reaching the specific references. The fuzzy controller could reach comparable precision, with more granular membership functions, in the case of low noise.
Having a downhole pump intake pressure sensor allows closing loop in a continuous fashion to have more accurate control of the system. The full range of RPM was used to control, allowing a smoother control, a wider range of controllers available and reduced noise in the system.
Using the Kalman filter (LQE) as an observer of the fluid level gives reasonable values, providing an alternative when wells are lacking a downhole pressure sensor.
LQR shown is valued as an optimization technique, seeking to maximize cumulative production. In the comparison ran, a significant increase was obtained when a continuous controller is used as opposed to the traditional discrete.
As future work, the authors envision the applicability of model predictive control (MPC) as an optimization technique for the current time slot, while keeping future timeslots into account.
LQR continuous controller presents good performance in terms of production and transient response, as compared with the discrete approach used currently in the industry, fuzzy controller and PID.
Reference
[1] BP, “Statistical Review of World Energy,” 2017. [Online]. Available: https://www.bp.com/ en/global/ corporate/energy-economics/statistical-review-of-worldenergy.html [Accessed: August 2017].
[2] J. Chen, H. Liu, F. Wang, G. Shi, G. Cao, y H. Wu, “Numerical prediction on volumetric efficiency of progressive cavity pump with fluid–solid interaction model,” J. Pet. Sci. Eng., vol. 109, pp. 12-17, 2013. doi: 10.1016/j.petrol.2013.08.019
[3] T. Ernst et al., "Back Spin Control in Progressive Cavity Pump for Oil Well," 2006 IEEE/PES Transmission & Distribution Conference and Exposition: Latin America, Caracas, 2006, pp. 1-7. doi: 10.1109/TDCLA.2006.311587
[4] M. Lehman, “Progressing cavity pumps in oil and gas production,” World Pumps, vol. 2004, no. 457, pp. 2022, 2004.
[5] B. Nesbitt, Handbook of Pumps and Pumping. Pumping Manual International. Amsterdam: Elsevier Science, 2006.
[6] Gasparri, A. A. Romero, y E. Ferrigno, “PCP Production Optimization in Real Time With Surface Controller,” SPE Artificial Lift Conference-Americas, 2013. doi: 10.2118/165057-MS
[7] M. Wells and J.F. Lea, Gas Well Deliquification. Elsevier, 2008. doi: 10.1016/B978-0-7506-82800.X5001-X
[8] K. A. Woolsey, “Improving Progressing Cavity Pump performance through automation and surveillance,” SPE Progressing Cavity Pumps Conference, 2010.
[9] “Lufkin well manager - progressing cavity pump controller,” 2016 General Electric Company, 2013.
[10] J. Eck y L. Fry, “Eck et al. - 1999 - Downhole monitoring the story so far,” Oilfield Review, vol. 3, no. 3, pp. 18-29, 1999.
[11] M. Changela and A. Kumar, “Designing a controller for two tank interacting system,” International Journal of Science and Research, vol. 4, no. 5, pp. 589-593, 2015.
[12] M. E. Dreier, W L. McKeown, and H. WScott, Fuzzy Logic and Neural Network Handbook. McGraw- Hill, Inc., 1996.
[13] C-T Chen, Linear System Theory and Design. New York, USA: Oxford University Press, 2013.
[14] K. Chate, O. E. Prado and C. Rengifo, “Comparative Analysis between Fuzzy Logic Control, LQR Control with Kalman Filter and PID Control for a Two Wheeled Inverted Pendulum” en Advances in Automation and Robotics Research in Latin America, Springer, 2017, pp. 144-156. doi: 10.1007/978-3-319-54377-2_13
[15] T. Nguyen, H. Tu, E. Al-Safran and A. Saasen, “Simulation of single-phase liquid flow in progressing cavity pump,” J. Pet. Sci. Eng., vol. 147, pp. 617–623, 2016. doi: 10.1016/j.petrol.2016.09.037
[16] H. B. Bradley, Petroleum Engineering Handbook. Texas, USA: Society of Petroleum Engineers, 1987.
[17] H. Klee and R. Allen, Simulation of Dynamic Systems. CRC Press, 2012.