SYSTEM AND METHOD FOR ROD PUMP AUTONOMOUS OPTIMIZATION WITHOUT A CONTINUED USE OF BOTH LOAD CELL AND ELECTRIC POWER SENSOR

20230184239 · 2023-06-15

Assignee

Inventors

Cpc classification

International classification

Abstract

A method, a computer program product, and a system for pump control that incorporates software algorithms, artificial intelligence, subject matter expertise and hardware for the autonomous optimization of a rod pump in a producing oil well, including various systems. The subject of the invention that is named here The Rod Pump Surveillancer System, is a built in a Pump Controller and integrates themodels for generation and diagnostic classification of dynamometer cards, the Neural Fuzzy Logic Algorithm for a programmable logic controller functioning stand alone, or connected to an edge computer, a server at the office or in the cloud, and the program software for the Human Machine Interphase. The method includes a developed model to generate downhole dynamometer cards based on data from two sensors. A programmable logic controller and a Human Machine Interphase device is used to further enhance control capabilities.

Claims

1. A method, a computer program product, and a system for pump control that incorporates data from fit for purpose sensors, transducers, meters, artificial intelligence tools, optimization algorithms and subject matter expertise for autonomous optimization of a rod pump producing oil well, comprising: a) a model to generate a Dynamometer Card based on data from two sensors, being the first one an accelerometer attached to the polished rod and the second one a positioning sensor attached to the horse head and a machine learning tool that enables a data-driven determination of the shape of the downhole dynamometer card using a database of real downhole dynamometer cards and Artificial Neural Network; b) a model to classify Dynamometer Card based on the generated Dynamometer Card in 1a) and a Machine Learning tool that enables the diagnostic of the pump operating condition using a data base of real downhole dynamometer cards, labelled according to the prevailing operating condition as determined by a Subject or Domain Matter Expert, which may include one or a combination of two, three or of multiple operational conditions occurring at the same time during the operation of the pump and sucker rods, at a given point on time, e.g. fluid pounding only or fluid pounding and leaking standing valve or fluid pounding, leaking standing valve and pump plunger tagging up-stroke or down stroke, etc; c) a program software for the programmable logic controller - PLC on the basis of Neural Fuzzy Logic, wherein the input data incorporates the by means of neural network generated and classified dynamometer card - 1a and 1b, measured parameters from reliable surface sensors and other calculated parameters, enabling autonomous optimization of the rod pump operation, by interacting with the variable speed drive-VSD, valve actuators, the start and stop switch, among others; d) a Human Machine Interphase - HMI device that displays the menu comprising 5 sub-menus: Data Input, Monitor, Troubleshooting, Optimizer and Operation. It enables the users to enter the input data. Further it shows the actual and trend of the key variables that enable to monitor the operation and shows the performed diagnostic of any anomaly that may be occurring or may be about to occur. Further in the menu are the Troubleshooting module and the Optimization module, while the Operation menu is the default screen that provides an overview of the current status of the rod pump system; and e) a computer program that is called here The Rod Pump Surveillancer - RPS System and is built in a Pump Controller that integrates a) and b) the models for generation and classification of the dynamometer cards, c) the algorithm and software program for the programmable logic controller - PLC and d) the program software for the Human Machine Interphase - HMI.

2. The method of claim 1, wherein the Dynamometer Card Generation and Classification models use data from two sensors; an Accelerometer - attached to the polished rod and a Positioning Sensor - installed on the horse head or above the saddle bearing, which are robust devices also known as Inertial Measurement Unit - IMU sensors, where the Positioning Sensor is comprised of both an Accelerometer and a Gyroscope. The said sensors can transmit the data to the Pump Controller via electrical cable, fiberglass, electrical cable, radio or wireless.

3. The method of claim 2, wherein both, the model that generates the dynamometer card - constructing the shape of the dynamometer card, and the model that performs the classification - predicting the type of operational condition that is occurring, utilize a neural network technique. Two versions have been implemented. One uses a machine learning model of supervised learning for applications that are executed in microcontrollers or low capacity microprocessors e.g. for local installation where there is no electrical power. The preferred embodiment uses a model developed with supervised and unsupervised deep learning as well as more robust variants of supervised and unsupervised machine learning, to be run in clusters, servers or high performance computers or CPUs at the well site.

4. The method of claim 2, wherein to perform the generation or classification models first an updated dynamometer card is recorded using a load cell or sensor and a positioning sensor - e. g. using the Echometer tool, when the present method is run in the subject well for the first time. This card is used for calibration purposes, thereafter the models carry on generating and classifying the dynamometer cards on a continuous basis. The generation rate of dynamometric charts depends on the strokes per minute -SPM of the unit, requiring at least two complete strokes to make a good data collection. During the initial calibration process two processing options are evaluated. The first one is in a batch form that first collects a sample of data and then process them to reconstruct the dynamometric chart and classify it, while the second one is done through a time series that implies acquiring the data continuously and making predictions based on a time space of at least a couple of strokes. It is to note that the load on the surface polished rod is determined comparing the dynamometer card recorded in the calibration phase with the generated dynamometer card, as the model generates the shape of the dynamometer card, it does not calculate the load.

5. The method of claim 2, wherein the required processing modules of the generation and classification models are described as follows: (a) The Real Time Clock - RTC, that allows to make a temporary trace to the register, for both, the classification and for the generation models. (b) The liquid-crystal display - LCD interface, that allows to view in the field the system data, such as time, date, the dynamometer card, the classification, the recommendation and the historical events of the day in the absence of a Human Machine Interphase - HMI. (c) The data acquisition module - DAQ that allows the synchronization of the request for information and the reception of data from the sensor. (d) The Data Manager, is a software module that allows managing the information (position and load), communicates with the cloud or the local processor in case the models run locally. (e) The Communication Module, e.g. the General Packet Radio Service - GRPS is a transmission module that uses the 3G cellular network to transmit and receive information from the cloud. It can transmit the raw information to be processed in the cloud or for local processing, in data packages. (f) The two Artificial Intelligence - IA Generation and Classification Models, that have been implemented in the present application, which can be executed in the cloud or locally, and are in charge of processing the information from the Data Manager, having as input the vector of acceleration and position characteristics.

6. The method of claim 2, wherein for the supervised Machine Learning the training data set for the model to generate the dynamometer card contains as input data the time in seconds, the load on the plunger in pounds, the acceleration in units of gravity - g, the positioning in the polish rod and the position on the plunger in inches. For the classification or the diagnostic part, the input contains and the dynamometer card labelling that indicates the type of prevailing operational condition of the pump and the sucker rods, as determined by a Subject Matter Expert. The considered operational conditions that are classified as part of the diagnostic module include among others the following conditions: fluid pound, gas interference, standing valve leakage, travelling valve leakage, broken rod, stretched rod, full load production, unanchored tubing, hole in barrel, plunger tag on up-stroke, plunger tag on down-stroke, worn pump, reduced tubing diameter, among others, as well as a combination of those conditions that could occur at the same time, e.g. two or three conditions.. Further the Training Set contains the same training parameters, yet from different wells. The initialization contains initial randomly generated weighting of the network. Further for the training of the Neural Network normalized and pretreated data is utilized, and as the Loss Function the Mean Square Error is used, that indicates the accuracy with respect to the real dynamometer card. Further a Gradient Descendent Optimizer is utilized to correct the initial weighting factor in such a way that as the Epochs pass the error decreases. Finally, the termination criteria is determined either by a number of Epochs or by the stabilization at a given low error value.

7. The method of claim 2, wherein for the supervised machine learning the training set for the model to classify the dynamometer card - a multi label classification, containsthe same features that the training of the model to generate the dynamometer card, except that the Loss Function is based on the Categorical Cross Entropy and that the termination criteria is based on achieving an accuracy above of 92%. Further the trainingprocess can also be carried out using other techniques such as supervised and unsupervised deep learning, and other techniques of recent and future development.

8. The method of claim 2, wherein the preferred embodiment for the wells where there is no electrical power available and the use of a battery and / or solar panel is needed, incorporates a microcontroller built in a transmission device that performs the reading of both sensors from claim 2 and performs the data pre-processing for the acceleration and the position as well as the extraction of the main characteristics, by dividing the recorded acceleration data into four blocks. From the entire register only onestroke is extracted according to the position register, this stroke is divided into four blockswith the same number of records each, from each group the main characteristics are extracted, which are inputs for both models - the Generation and the Classification Models. The information transfer to the field computer, e.g. CPU is transferred through the RS485 protocol, Modbus, or ethernet, among others.

9. The method of claim 2, wherein the preferred embodiment for the wells where electrical power is available, the field computer, e.g. CPU can perform the reading of both sensors from claim 2 and performs the data pre-processing for the acceleration and the position as well as the extraction of the main characteristics, by dividing the recorded acceleration data into four blocks and further feed it to the models for generation and classification of the dynamometer cards. Alternatively, more advanced programmable logic controllers - PLCs come with a CPU or microprocessor built in that can be suited toperform the above function.

10. The method of claim 2, wherein the dynamometer card results from a data-driven generated model, another embodiment incorporates data resulted of measurement of load, carried out using a cell attached to the polished rod that includes at least an ultrasound wave device to determine the deformation of the rod and therefore the load. Alternatively, this load can also be determined via the use of a cell attached to the polished rod that incorporates at least a camera and an image processing device to determine the deformation of the rod and therefore the load.

11. The method of claim 2, wherein both the Generation Model and the Classification Model configures an application called here - Dyna Chart App that is a system composed of hardware and software modules that allow both the generation of dynamometer cards and its automatic classification as described above. Further it also can be run on a standalone mode, without a pump controller.

12. The method of claim 1, wherein the programmable logic controller - PLC utilizes among others a Neural Fuzzy Logic Algorithm - NFLA. It improves the diagnostic and control capabilities, based on the integration of multiple parameters that enable the proper identification of the rod pump operation anomaly cases, and the problems affecting the other subcomponents of the Integrated Production System - IPS, the inflow and the outflow, as well as the Identification of Production Improvement opportunities.

13. The method of claim 12, wherein the input data for the Neural Fuzzy Logic Algorithm - NFLA includes the output of the generated and classified dynamometer cardusing neural network, the data recorded by reliable surface sensors and other calculatedparameters, in order to come up with specific recommendations that translate in optimized control measures, in contrast to other PLC only based solutions that have limitations withdata driven models using artificial intelligence - Al tools and rely on downhole sensors that are prone to fail or loss communication and are mainly focused on the downhole pump operation while neglecting the other subcomponents of the Integrated Production System.

14. The method of claim 1, wherein a Human Machine Interphase - HMI device displays the menu comprising modules related to the input data, monitoring, troubleshooting, optimization and the operational default display screen. It enables the users to enter the input data of the three subsystems of the Integrated Production System - IPS for the subject well. Further it shows the actual and trend values of the key variables that enable to monitor the operation and shows the performed diagnostic of any operational condition or conditions that may be occurring or may be about to occur. Further in the menu is the Troubleshooting module that shows the recommended corrective action and the optimization module that shows the recommended action to increase oil production both are performed on autonomous mode in the preferred embodiment.

15. The method of claim 1, wherein the computer program is called here The Rod Pump Surveillancer - RPS System and is built in a Pump Controller that integrates the models for generation and classification (or diagnostic) of the dynamometer cards, the algorithm program for the programmable logic controller - PLC, the microcontroller device, the edge computer and the program for the Human Machine Interphase - HMI.

16. The method of claim 15, wherein, specific algorithms are used to link all the components of the RPS System: CPU or Microcontroller, PLC, HMI, sensors, meters, valve actuators, VSD, the outcome of the generated and classified dynamometer cards and the determined parameters characterizing the three subcomponents of the integrated production system IPS - the reservoir, the pump and the outflow subsystems, such as the downhole flowing pressure Pwf, the liquid flow rate QI, the oil deferment, the flow conduct diameter above the rod pump, the effective pump volume, the pump wear, among others, as opposed to other systems that are constrained to the rod pump only.

17. The method of claim 15, wherein the hardware and software enable for ample range of application that goes from remote surveillance only to an onsite full autonomous optimization and anything in between, as required by the particular field application, and as justified by the production rate of the well. E.g. there is a configuration for low to very low rate wells and another one for high to very high rate producers. Further, the control capabilities of this application enables full autonomous pump operation by incorporating a Variable Speed Drive - VSD, flow line regulator valves and choke valves in the flow line and, or in the casing valve, wherein the choke valve can be operated by an electrical, pneumatic, or hydraulic driven actuator or adjusted manually on-site by the user, according to the recommendation of the pump controller software.

18. The method of claim 15, wherein for low rate wells and in the absence of a Variable Speed Drive - VSD, microcontrollers or processors and a Programmable Logic Controller - PLC can be incorporated on the wellsite to stop and start the well as determined by the built-in software. Whereby the PLC can also be a conventional one, or of the type that has at least an embedded microprocessor, or CPU built in.

19. The method of claim 15, wherein it can be used in versions for hardware based on a computer processing unit-CPU, microcontrollers, and on a programmable logic controller - PLC with a CPU (edge computer) or a microprocessor built in or embedded or a combination of them, E.g. for high rate wells. Alternatively, the software program called here The Rod Pump Surveillancer - RPS System can also be installed in a Variable Speed Drive-VSD and perform as an operating mode.

20. The method of claim 15, wherein it can be applied for a single well or for a group of wells by incorporating a distributed control system - DCS. Moreover, all the modules of the Rod Pump Surveillance - RPS System can be used or part of it, on the wellsite, the office server or in the cloud. It also can interact with other already existing systems in the user’s facilities that perform simplified tasks such as basic alarms, start-stop functions or parameter trend display.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The novel features believed characteristic of the application are set forth in the appended claims. However, the application itself, as well as a preferred mode of use, and further objectives and advantages thereof, will best be understood by reference to the following detailed description when read in conjunction with the accompanying drawings, wherein:

[0050] FIG. 1 illustrates a rod pump system with surface and downhole components, including the sensors incorporated in the present application, located on the polished rod and on the horse head, as per the preferred embodiment.

[0051] FIG. 2.1 illustrates the involved hard and software of the dynamometer card generation and diagnostic classification in accordance with the preferred embodiment of the present invention. FIG. 2.2 describes the conceptual workflow of the data streams of the present application. FIG. 2.3 shows a workflow of the data sets for Training and Testing of the model for the Dynamometric Chart Generation.

[0052] FIG. 3 illustrates a Schematic of the pressure drop on the three subsystems of the Integrated Production System (IPS).

[0053] FIG. 4 illustrates the Architecture of the identification of Equipment Anomalies and Production Improvement Opportunities as incorporated in the present application.

[0054] FIG. 5 illustrates the schematic of the architecture of the Microcontroller based Pump Controller showing the components of the Rod Pump Surveillancer - RPS System.

[0055] FIG. 6 illustrates schematic of the Architecture of the CPU - PLC - HMI based Pump Controller showing the components of the Rod Pump Surveillancer - RPS System, according to the preferred embodiment of the present invention.

[0056] FIG. 7 Schematic of the Human Machine Interphase - HMI Display of the Rod Pump Rod Pump Surveillancer - RPS System.

[0057] FIG. 8 depicts the Data Transmission set up and Data Traffic Protection, according to an embodiment of the present invention.

[0058] While the embodiments and method of the present application is susceptible to various modifications and alternative forms, specific embodiments thereof have been shown by way of example in the drawings and are herein described in detail. It should be understood, however, that the description herein of specific embodiments is not intended to limit the application to the particular embodiment disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the process of the present application as defined by the appended claims.

DETAILED DESCRIPTION OF THE INVENTION

[0059] Illustrative embodiments of the preferred embodiment are described below. In the interest of clarity, not all features of an actual implementation are described in this specification. It will of course be appreciated that in the development of any such actual embodiment, numerous implementation-specific decisions must be made to achieve the developer’s specific goals, such as compliance with system-related and business-related constraints, which will vary from one implementation to another. Moreover, it will be appreciated that such a development effort might be complex and time-consuming but would nevertheless be a routine undertaking for those of ordinary skill in the art having the benefit of this disclosure.

[0060] In the specification, reference may be made to the spatial relationships between various components and to the spatial orientation of various aspects of components as the devices are depicted in the attached drawings. However, as will be recognized by those skilled in the art after a complete reading of the present application, the devices, members, apparatuses, etc. described herein may be positioned in any desired orientation. Thus, the use of terms to describe a spatial relationship between various components or to describe the spatial orientation of aspects of such components should be understood to describe a relative relationship between the components or a spatial orientation of aspects of such components, respectively, as the embodiments described herein may be oriented in any desired direction.

[0061] The method in accordance with the present invention overcome one or more of the above-discussed problems associated with performing the generation of the dynamometer cards and the automatic event diagnostic. In particular, the system and method of the present invention based on the accelerometer inertial sensor by the use of machine learning techniques for rod pump systems to generate and classifydynamometer cards for wells with electrical or gas motor prime in a reliable and cost effective manner.

[0062] Prior attempts to resolve the generation of dynamometer cards without the use of load sensors or load cells have different limitations. On one side the disturbance and interference affecting the power consumption or current sensor, on the other side the inability to use it for rod pump systems based on gas motors. Further the generation and classification of dynamometer cards by means of mathematical algorithms such as neural network demands from a large data base which requires large computing capability, In contrast, the presented method and assembly utilizes inertial sensors such as the Accelerometer and the Gyroscope that are robust and reliable and are not affected by electrical disturbances, Further the utilized workflow is based on models that are accurate, yet with low computing capacity requirements, and processing can be carried out on real time in a cost effective and reliable manner.

[0063] In general, the method presented herein may be applied to both, conventional oil wells and unconventional shale oil wells, unconventional wet gas or gas condensate (retrograde gas) wells, coalbed methane wells, conventional oil wells, and conventional wet gas or gas condensate (retrograde gas). The method may also be applied to both land and offshore wells. Furthermore, the well can be vertical, horizontal, multilateral, stimulated with a single/multiple fracture(s) or chemically stimulated, or both. The incumbent well can be an existing well or a recently or new to be drilled well.

[0064] The method disclosed herein can be used in wells that are using sucker rod pumps such as the traditional oil well pump jacks, long stroke pump systems, such as theRotaflex type, linear rod pumps such as the LRP system.

[0065] The method and system will be understood from the accompanying drawings, taken in conjunction with the accompanying description. Several embodiments of the system may be presented herein. It should be understood that various components, parts, and features of the different embodiments may be combined together and/or interchanged with one another, all of which are within the scope of the present application,even though not all variations and particular embodiments are shown in the drawings. It also should be understood that the mixing and matching of features, elements, and/or functions between various embodiments are expressly contemplated herein so that one of ordinary skill in the art would appreciate from this disclosure that the features, elements, and/or functions of one embodiment may be incorporated into another embodiment as appropriate unless otherwise described.

[0066] The system of the present application is illustrated in the associated drawings. As used herein, “system” and “assembly” are used interchangeably. It should be noted that the articles “a”, “an”, and “the”, as used in this specification, include plural referents unless the content clearly dictates otherwise. Additional features and functions are illustrated and discussed below.

[0067] Referring now to FIG. 1, a Rod Pump System environment is depicted including both the surface and the downhole components. The pump action that lifts the oil up to the surface is caused by the reciprocating movement of the rod pump plunger 3 inside the cylinder 2 that triggers the sequential opening and closing of the standing 1 and traveling 4 valve respectively. The energy generated on the surface is transferred via the polished rod 10 and the sucker rod string 5 to the plunger 3 of the pump that is tied by the pump anchor 6 to the tubing 7. The energy generation is done by the prime mover 29 that over the reduction gear 28, the crank 26, the equalizer pitman 27, the walking beam 24, the horse head 22 and the wireline 13, the polished rod hanger 12 is transferred to the polished road 10 and further below up to the plunger 3. Further in the present inventiontwo inertial sensors are incorporated as follows. First the acceleration of the polished rodis measured by the accelerometer 11 and the accurate position of the walking beam and therefore of the polished rod is determined by the accelerometer and the gyroscope called also positioning sensor 14. The recording of the readings of the sensors 11 and 14 provide the input data to generate and classify the dynamometer card using artificial intelligence as described below. In the present invention the preferred embodiment considers the use of a Pump Controller 33 - that is further described in FIG. 5 and FIG. 6, and of a Variable Speed Drive - VSD 32, along with a choke valve 19 and an electronic actuator 18, as depicted in FIG. 1. Among other surface components of the Rod Pump System are the well head 8, stuffing box 9, casing pressure sensor 15, high resolution Microphone 16, well head pressure sensor 17, flow line pressure 20, flow rate meter 21, saddle bearing 23, equalizer bearing 25, reducer sub-base 30 and the Samson post 31.

[0068] Referring now to FIG. 2.1, a functional block diagram illustrating the dynamometer card generation and diagnostic classification of the presented application, as described below. It is to note that this figure provides only an illustration of one implementation and does not imply any limitations with regards to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made by those skilled in the art without departing from the scope from the invention as recited by the claims.

[0069] 1 shows an Inertial Measurement Unit - IMU, composed of an Accelerometer to obtain the linear acceleration in the z axis of the polished rod, in a range of -3G to 3G with a resolution of 16-bit ADC. It has an acquisition system that allows to register up to 600 samples per second, it uses the I2C protocol for data transfer to the microcontroller (transmitter).

[0070] 2 shows an IMU (Inertial Measurement Unit) composed of an Accelerometer and of a Gyroscope to obtain the position of the polished rod with respect to the lowest position. This is carried out by combining the acceleration and the angular velocity in the Y axis. It has an acquisition system that allows recording up to 600 samples per second, it uses the I2C protocol for data transfer to the micro-controller (transmitter).

[0071] 3 depicts a Microcontroller that performs the reading of both sensors 1 and 2, further it performs the data pre-processing for the acceleration and the position as well as the extraction of the main characteristics, by dividing the recorded acceleration data into four blocks, then it transfers the information through the RS485 protocol to the field computer 5.

[0072] 4 is a Module that uses the RS485 communication protocol for data transfer and reception, further it allows connectivity by wiring up to 500 meters of distance between the sensors and the field computer.

[0073] 5 is a computer Processing Unit - CPU, called here also a Field Computer that receives data serially using the RS485 protocol, it has an acquisition module that synchronizes the request and reception of data. This information is used by the application, called here - App Dyna Chart depicted in 6, that is installed in the CPU. This is a system composed of hardware and software modules that allow the generation of dynamometer charts and its automatic classification using data of both the acceleration and the position of the polished rod. A CPU version is utilized whose modules are described as follows:

[0074] (a) The Real Time Clock - TRC, that allows to make a temporary trace to the register, for both, the classification and for the generation.

[0075] (b) The liquid-crystal display - LCD interface, that allows to view in the field the system data, such as time, date, the dynamometer card, the classification, the recommendation and the historical events of the day.

[0076] (c) The data acquisition module - DAQ that allows the synchronization of the request for information and the reception of data from the sensor.

[0077] (d) The Data Manager, is a software module that allows managing the information (position and load), and communicates with the cloud or the local processor in case the models are run locally.

[0078] (e) The Communication Module, e.g. General Packet Radio Service - GRPS is a transmission module that uses the 3G cellular network to transmit and receive information from the cloud. It can transmit the raw information to be processed in the cloud or the processed information in data packages (local processing).

[0079] (f) The two Artificial Intelligence - IA Generation and Classification Models, that have been implemented in the present application, can be executed in the cloud or locally, and are in charge of processing the information from the Data Manager, having as input the vector of acceleration and position characteristics.

[0080] Referring now to FIG. 2.2, a conceptual workflow is described in the following lines. 1 depicts the Data Streams which is the raw data for acceleration and position thatis recorded - as shown in the module 1 and 2 of FIG. 2.1. From the entire register only one stroke is extracted according to the position register, this stroke is divided into four blocks with the same number of records each, from each group the main characteristics are extracted, which are inputs for both models - the Generation and the Classification Models. Thereafter the feature extraction is carried out 2. The Generation Model is represented in 3, that has as input the vector of characteristics from the previous block 1 and based on that reconstructs a vector of 250 points that corresponds to the normalized load of the plunger (0 - 1) and with the vector of position of the pump plunger, together they allow to reconstruct the dynamometer card. 4 represents the Classification Model, that has as input the vector of characteristics from block 2. It allows the prediction of the type of dynamometer card from the data recorded for the acceleration and position. This model was trained based on data available for the different operational conditionswhereby each dynamometer card used for training was manually labelled according to the input of a subject matter expert.

[0081] 5 depicts the dynamometer card that is generated by the model which isdisplayed on the LCD on the field pump controller, in the cloud and, or on the web server.6 depicts the classification of the model generated dynamometer card that is displayed on the LCD on the field pump controller, in the cloud and, or on the web server.

[0082] Referring now to FIG. 2.3, a functional block diagram illustrates the Dynamometric Chart Generation as described in the following lines. The Training Set contains data of the time, the acceleration, the load, of the positioning and the tag of the occurring operational condition of different Wells. In the Initialization the weighting factorsof the network are randomly generated. The Training of the Artificial Neural Network - ANN Not Linear Regression module, implies entering of the normalized and pre-treated data (Vector of features) and the use of the Mean Squared Error as the Loss Function (Root Mean Square Error) that serves as measure on how close it is to the real curve. Inthis Workflow the Gradient descent serves as an Optimizer that corrects the original weights in such a way that as time passes the error decreases. As Termination Criteria either a certain number of epochs or the stability of a low value of the error are chosen. Upon achieving the Optimized (C) the testing phase starts using Testing Data Set that contains data of the same type then the training set, yet from other pool of selected wells.

[0083] The Classification of the generated Dynamometric Chart is carried out in a similar way than in the Generation Phase, except the training for the multi label classification whereby as the Function Loss the Categorical cross entropy by means of a matrix, instead of the Mean Squared Error, is utilized.

[0084] In the present application a method is presented to determine the wellbore flowing pressure Pwf on real time without the need of downhole sensors nor from fluid level surveys. Upon the generation and classification of the DC and therefore determination of the pump operating condition as explained in [0059] the actual fluid levelin the casing annular can be indirectly measured by means of the identification of the case of “Fluid Pound”. This actually starts occurring when the fluid in the pump cylinder is below the travelling valve, leading to a partial filling of the pump. The developed modelidentifies the point on time when this condition occurs and use the set depth of the travelling valve to calculate the actual fluid level. Further operationally the Stroke per minutes - SPM will be adjusted so that the fluid level stabilizes with a low level of fluid pounding for the duration of a representative well test. Alternatively, the fluid rate can becalculated with the use of a standard Nodal Analysis that incorporates all three subcomponents of the Integrated Production System - IPS, as showed in FIG. 3. With thisinformation the Productivity Index - PI can be calculated. Thereafter the SPM will be further fine-tuned so as to remove the fluid pounding condition. This procedure requires that the load capability of the rod string and of the surface motor have been properly designed to enable the adjustment of the SPM either manually or automatically by meansof a VSD.

[0085] D) In the present invention a method is applied that enables the optimization of the Integrated Production System using the information extracted from the DC and data from sensors installed on the surface, thus going beyond the rod pump system. Giving that the downhole rod pump is just a subsystem of the Integrated Production System and is in continued interaction with the other two, the others being the Well-Reservoir System - called also he Inflow, and the Outflow System, changes on any of the other subsystems - that remain unnoticed, due to over focusing on the rod pump system only, will impact on the pump performance, thus missing improvement opportunities. FIG. 3 shows a schematic of the pressure Drop occurring on the said three Subsystems. In this application a method is presented that enables the optimization of the integrated production system that takes advantage of the generated and classified dynamometer cards that enable identification of a number of abnormal conditions or anomalies in the pump operation that affect or are caused by the other subsystems of the integrated production system IPS, as described in the detail description section. Further FIG. 3 depicts the three subsystems of the Integrated Production System - IPS, in the present invention a method is applied that enables the optimization of the Integrated Production System using data from sensors installed on the surface and the information extracted from the generated and classified dynamometer cards that enable identification of a number of abnormal conditions or anomalies in the pump operation that affect or are caused either by the rod pump subsystem or by the other subsystems of the integrated production system IPS. Thus the present application goes beyond the rod pump subsystem 2. To achieve this, first the characterization of the Subsystem of the Inflow performance of the Well Reservoir Subsystem 1 is carried out by determination of the wellbore flowing pressure Pfl without the need of downhole sensors nor from a fluid level surveys, and performing a well test or calculating the rate, what is described in [0059]. Another critical parameter that describes the inflow performance relationship - IPR, is the Bubble Point Pressure - Pb. This parameter depends on the composition of the crude oil and it is measured in the laboratory with fluid samples taking downhole or recombining the crude oil and the gas on the surface. Giving the associated complexity in obtaining this value, often times it is an unknown parameter. In the present application a determination method is presented that is done using the generated and classified DC, presented in this application in [0059]. Specifically, the point in time where the DC indicates the start of a gas interference condition, represents the physical effect of gas going out of solution at the point intake depth. By taking simultaneously a fluid level survey the Pb can be determined. It is to note that for unconventional wells attention should be paid to differentiate the condition of natural gas production of dissolved gas that goes out of solution from gas flow that is the result of the sinusoidal horizontal well trajectory what is reflected in a cyclical increased gas flow. Secondly based on the generated DC, a progressive increase in the load can be indicative of a diameter reduction in the flow conduit such as the tubing a key element of the Outflow 3. Depending on the historical data of the well, the performed diagnostic would call for a paraffin, asphaltene, sand, scale or salt treatment work to remove the obstruction. In any case the identification of this event triggers the use of treatment measures to remove the said diameter reduction of the flow conduit. Therefore, the performance of the downhole rod pump subsystem 3 can be better characterized on the basis of the changes in the parameters related to the elements of the other two subcomponents. Thus, considering all three subsystems of the Integrated Production System enables to unlock production increase opportunities as well as prevent pump or rod failures that otherwise would have been missed due to the sole focus on the downhole rod pump. As the above presented method enable the said improvements that result in the optimization of the Integrated Production System IPS, these features have been included in the algorithms that drives the Pump Controllers mentioned described in [0037] and [0038] and described further below, see also FIG. 5 and, FIG. 6.

[0086] Referring to the FIG. 4, it depicts the operation anomaly and opportunity detection module built in the algorithm of the pump controller based on the invention of the present application. One of the purposes of this application is to have a reliable pump controller operation using an algorithm that is based on the generated and classified dynamometer cards and the parameters measured with the surface sensors only. In this context, the parameter data sourced from downhole sensors such as the downhole pressure, temperature or flow rate is considered as a secondary reference with no effect on the pump controller operation, due to the risk of sensor failure or communication disruption. The FIG. 4 shows the architecture of the automated identification of Anomalies affecting the subcomponents of the integrated production system, including the rod pump system as well as the identification of the production improvement opportunities that are available in the subject well.

[0087] FIG. 5 shows a schematic of the architecture of the Microcontroller based Pump Controller, that is powered by a battery loaded by solar panel. In this schematic the version for microcontrollers of the App Dyna Chart application is utilized - that is described in [0059]. FIG. 5 also shows components of the Rod Pump Surveillancer System - RPSS that is composed of a software module that incorporates both the dynamometer card generation and classification models, as contained in the App Dyna Chart along with the software that controls the pump operation that also takes data from other surface sensors into consideration and performs the optimization algorithm. It becomes evident that for low to very low oil producers less costly, yet robust rod pump controllers are required. The presented method enables the configuration of a Pump Controller that is based on a scalable application embedded in IoT - Internet of Things, based equipment that is robust, accurate and is driven by a software that can be operated at the site using Artificial Intelligence - AI as described in [0059], that yields accurate results, yet are run on devices with low computing capacity requirements such as microcontrollers, alternatively it can be also run in the cloud or in other external server. The algorithm for the said Pump Controller incorporates the architecture described in [0061] to identify the current operating conditions and production improvement opportunities as shown in FIG. 4, wherein the required input data is provided by the generated and classified dynamometer cards along with data from other surface sensors such as the Well Head Pressure Pwh, the Casing Pressure Pcs, the Flow Line Pressure Pfl, the Well Head Temperature Twh and a high resolution Microphone. A second microcontroller package is used as a redundant system that caters for any unexpected malfunctioning of the main microcontroller package. On the other side the utilized Fuzzy Logic Algorithm incorporates the said inventions enabling an online diagnostic and optimization of the rod pump system, as well as of the other two subsystems of the Integrated Production System, the Inflow and the Outflow - described in FIG. 3.

[0088] FIG. 6 Illustrates the schematic of the Architecture of the CPU - PLC - HMI based Pump Controller showing the components of the Rod Pump Surveillancer System -RPSS. The processing inside the CPU 1 is based on a set of rules and fuzzy logic structure in order to operate, monitor, troubleshoot and optimize the operation of the rod pump system. The presented set up expands the capability to identify abnormal pump operating conditions, it also supports the optimization of the integrated production system - as described in [0060], additionally it enables a full autonomous operation of the well using a Process Logic Control - PLC 4, the Human Machine Interphase - HMI 5, and the Ethernet communication protocol 2. Considering the associated advantages of the presented innovation it is up to the User to decide if it can be installed in the high profile wells and beyond. As shown in the FIG. , 4 the use of the downhole recorded data is considered as a reference only, and is not affecting the operation of the rod pump system in case of failure, as described in [0061], in order to have a reliable operation, despite any downhole sensor failure. Latest developments in PLC Technology incorporate an embedded microcontroller that can also be included in the present embodiment. As illustrated in the FIG. 1, in the present application the preferred embodiment incorporates an additional control device to the rod pump system, besides the use of the Variable Speed Drive - VSD 32, specifically a choke valve 19 with an actuator 18 on the flow line that is connected to the tubing. The related parameters such as the choke size and the differential pressure across the choke are added to the other surface parameters, to serve as input to the Computer Programmable Unit - CPU 1.

[0089] FIG. 7 illustrates the display of the menu as shown in the Human Machine Interphase - HMI comprising 5 sub-menus: Data Input, Monitor, Troubleshooting, Optimizer and Operation. The HMI device enables the users to enter the input data of the three subsystems of the Integrated Production System - IPS for the subject well. Further it shows the actual and trend of the key variables that enable to monitor the operation and shows the performed diagnostic of any anomaly that may be occurring or may be about to occur. Further in the menu are the Troubleshooting module that shows the recommended corrective action and the optimization module that shows the recommended action to increase oil production both are performed on autonomous mode in the preferred embodiment. The Operation Menu shows the default display of the key operating parameters, the dynamometer card and its classification and the result of the diagnostic and recommended corrective action as needed as well as the identified oil production improvement opportunity.

[0090] While the incorporated algorithm and control components enable a local operation, the remote operation requires that the data can be transmitted via internet, wifi,radio or satellite. For well locations where there is no internet connection at the site, a Low Power Wide Area Network (LPWAN) protocol such as the LoRaWAN™ can be utilized, which supports low-cost, mobile, and secure bi-directional communication for applications related to Internet of Things (IoT), machine-to-machine (M2M), such as the one of the present application. For the secure use of several pump controllers serving a group of wells, in the present embodiment a router, e.g. Gateway is utilized, that connects the End Nodes - the group of rod pump wells, with the Network Server. The connection to the Application Server ensures a secure payload traffic, e.g. via the TCP/IP SSL communication protocol. The said protocols provide full end-to-end encryption for IOT application, FIG. 8 shows a schematic of the data transmission and data traffic protection set up.

[0091] The particular embodiments disclosed above are illustrative only, as the application may be modified and practiced in different but equivalent manners apparent to those skilled in the art having the benefit of the teachings herein. It is therefore evident that the particular embodiments disclosed above may be altered or modified, and all such variations are considered within the scope and spirit of the application. Accordingly, the protection sought herein is as set forth in the description. It is apparent that an application with significant advantages has been described and illustrated. Although the present application is shown in a limited number of forms, it is not limited to just these forms, but is amenable to various changes and modifications without departing from the spirit thereof.