Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
VIRTUAL FLOW METER FOR WELL USING A SUCKER ROD PUMP
Document Type and Number:
WIPO Patent Application WO/2023/066549
Kind Code:
A1
Abstract:
A method of calculating flow values from a well for a mixed fluid flow using a data driven virtual flow meter includes operating a sucker rod pump to pump the mixed fluid flow from a well bottom to a well top, measuring an operating parameter of the sucker rod pump at the well top, and determining a soft sensor value based at least in part on the measured operating parameter, the soft sensor value being indicative of a pump condition at the well bottom. The method also includes calculating a reconstruction error using an AI-based trained reconstruction error model and the soft sensor value and calculating a first flow value of a first fluid and a second flow value of a second fluid using an AI-based trained flow model and the soft sensor value from the well, the first fluid and the second fluid being mixed together as part of the mixed fluid flow, the reconstruction error being indicative of the accuracy of the calculated first flow value and second flow value.

Inventors:
MENON NISHA (IN)
MITTAL AKASH (IN)
WIMMER HELMUT (AT)
VENUGOPAL ASWIN (IN)
Application Number:
PCT/EP2022/073411
Publication Date:
April 27, 2023
Filing Date:
August 23, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SIEMENS ENERGY GLOBAL GMBH & CO KG (DE)
International Classes:
E21B47/009; E21B43/12; E21B47/10
Domestic Patent References:
WO2021050943A12021-03-18
Other References:
PENG YI ET AL: "Deep Autoencoder-Derived Features Applied in Virtual Flow Metering for Sucker-Rod Pumping Wells", 31 October 2019 (2019-10-31), XP055982709, Retrieved from the Internet [retrieved on 20221117]
Download PDF:
Claims:
Docket No. 202117353

CLAIMS

What is claimed is:

1. A method of calculating flow values from a well for a mixed fluid flow using a data driven virtual flow meter, the method comprising: operating a sucker rod pump to pump the mixed fluid flow from a well bottom to a well top; measuring an operating parameter of the sucker rod pump at the well top; determining a soft sensor value based at least in part on the measured operating parameter, the soft sensor value being indicative of a pump condition at the well bottom; calculating a reconstruction error using an Al-based trained reconstruction error model and the soft sensor value; and calculating a first flow value of a first fluid and a second flow value of a second fluid using an Al-based trained flow model and the soft sensor value from the well, the first fluid and the second fluid being mixed together as part of the mixed fluid flow, the reconstruction error being indicative of the accuracy of the calculated first flow value and second flow value.

2. The method of claim 1, wherein the sucker rod pump includes a walking beam and a rod string, and wherein the operating parameter is a rod string load.

3. The method of claim 2, wherein the rod string load is measured as a function of the position of the walking beam.

4. The method of claim 2, wherein the soft sensor value is based at least in part on the rod string load, and at least one of a pump casing pressure, a tube pressure, a temperature of the mixed fluid flow, and an ambient temperature.

5. The method of claim 1, wherein the soft sensor value includes one of a flow rate, a volumetric efficiency, a strokes per minute, a minimum load per stroke, and a maximum load per stroke.

6. The method of claim 1, wherein the well is an oil well, the first fluid is oil, the second fluid is natural gas, and a third fluid is water, and wherein the calculating step includes separately calculating the first flow value for oil, the second flow value for natural gas, and a third flow value for water. Docket No. 202117353

7. The method of claim 1, wherein each of the trained flow model and the trained reconstruction error model employs an artificial neural network.

8. The method of claim 1, further comprising comparing the reconstruction error and a predefined allowable error, and at least partially in response to the comparison between the reconstruction error and the predefined allowable error indicating that the reconstruction error is not acceptable; retraining the trained flow model using old operating data that was available for the initial training and new operating data from the well that was generated after the initial training to create a new retrained flow model; retraining the trained reconstruction error model using the old operating data and the new operating data from the well to create a retrained reconstruction error model; replacing the trained flow model with the retrained flow model; and replacing the trained reconstruction error model with the retrained reconstruction error model.

9. The method of claim 8, wherein the retraining the trained flow model and the retraining the trained reconstruction error model steps are automatically initiated in response to the comparison between the reconstruction error and the predefined allowable error indicating that the reconstruction error is not acceptable.

10. The method of claim 1, further comprising operating a trained Al-based pump model using the measured operating parameter as an input to calculate the soft sensor value.

11. The method of claim 10, wherein the measured operating parameter includes a surface dynacard comprising rod string load versus pump position for a complete pump stroke.

12. The method of claim 11, wherein the rod string load versus pump position data is measured at an interval between 20 ms and 100 ms. Docket No. 202117353

13. A well system comprising: a sucker rod pump including a well top portion, a well bottom portion, and a rod string that connects the well top portion and the well bottom portion, the well bottom portion operable to pump a mixed fluid flow from the well bottom to the well top in response to reciprocation of the well top portion; a sensor coupled to the rod string and operable to periodically measure a rod string load; a first computing device operable to calculate soft sensor data based at least in part on the rod string load, the soft sensor data indicative of a pump condition at the well bottom; and a second computing device operable to receive the soft sensor data and to calculate a first flow value for a first flow, a second flow value for a second flow, and a third flow value for a third flow, based in part on the soft sensor data using an Al-based trained flow model, the first flow value, the second flow value, and the third flow value cooperate to at least partially define the mixed fluid flow.

14. The well system of claim 13, wherein the sensor includes a load cell, and wherein the load cell measures the rod string load as a function of a position of a walking beam.

15. The well system of claim 14, wherein the load cell samples rod string load data at a rate between 20 ms and 100 ms.

16. The well system of claim 13, wherein the soft sensor data includes at least one of a flow rate, a volumetric efficiency, a strokes per minute, a minimum load per stroke, and a maximum load per stroke.

17. The well system of claim 13, wherein the soft sensor data is based on the rod string load and at least one of a pump casing pressure, a tube pressure, a temperature of the mixed fluid flow, and an ambient temperature.

18. The well system of claim 13, wherein the first flow, the second flow, and the third flow are components of the mixed fluid flow and wherein the first flow includes oil, the second flow includes natural gas, and the third flow includes water.

19. The well system of claim 13, further comprising a trained Al-based pump model that uses the rod string load data as an input to calculate the soft sensor data. Docket No. 202117353

20. The well system of claim 19, wherein the rod string load data partially defines a surface dynacard comprising rod string load versus pump position for a complete pump stroke.

21. The well system of claim 13, wherein the first computing device and the second computing device are a common edge computing device.

22. The well system of claim 13, wherein one of the first computing device and the second computing device is located on an edge device and the other of the first computing device and the second computing device is located on a second device separate from the edge device.

Description:
Docket No. 202117353

VIRTUAL FLOW METER FOR WELL USING A SUCKER ROD PUMP

BACKGROUND

[0001] The present disclosure generally relates to the field of resource extraction, and more particularly relates to a system and method for monitoring fluid flow from a well such as an oil well in an industrial environment.

[0002] In the oil and gas industry, multiphase flowrate measurements of an oil well play an important role in production optimization and reservoir management. The flow of the oil is measured with parameters such as flow rate, gas to oil ratio, water cut and the like. Flowmeters are used to measure these parameters and indicate the flow of the oil through various parts of a production system or well. Conventionally, hardware multiphase flow meters or separator measurements are used for measuring these parameters.

BRIEF SUMMARY

[0003] In one arrangement, a method of calculating flow values from a well for a mixed fluid flow using a data driven virtual flow meter includes operating a sucker rod pump to pump the mixed fluid flow from a well bottom to a well top, measuring an operating parameter of the sucker rod pump at the well top, and determining a soft sensor value based at least in part on the measured operating parameter, the soft sensor value being indicative of a pump condition at the well bottom. The method also includes calculating a reconstruction error using an Al-based trained reconstruction error model and the soft sensor value and calculating a first flow value of a first fluid and a second flow value of a second fluid using an Al-based trained flow model and the soft sensor value from the well, the first fluid and the second fluid being mixed together as part of the mixed fluid flow, the reconstruction error being indicative of the accuracy of the calculated first flow value and second flow value. Docket No. 202117353

[0004] In another aspect, a well system includes a sucker rod pump including a well top portion, a well bottom portion, and a rod string that connects the well top portion and the well bottom portion, the well bottom portion operable to pump a mixed fluid flow from the well bottom to the well top in response to reciprocation of the well top portion. The system also includes a sensor coupled to the rod string and operable to periodically measure a rod string load, a first computing device operable to calculate soft sensor data based at least in part on the rod string load, the soft sensor data indicative of a pump condition at the well bottom, and a second computing device operable to receive the soft sensor data and to calculate a first flow value for a first flow, a second flow value for a second flow, and a third flow value for a third flow, based in part on the soft sensor data using an Al-based trained flow model, the first flow value, the second flow value, and the third flow value cooperate to at least partially define the mixed fluid flow.

[0005] The foregoing has outlined the technical features of the present disclosure so that those skilled in the art may better understand the detailed description that follows. Additional features and advantages of the disclosure will be described hereinafter that form the subject of the claims. Those skilled in the art will appreciate that they may readily use the conception and the specific embodiments disclosed as a basis for modifying or designing other structures for carrying out the same purposes of the present disclosure. Those skilled in the art will also realize that such equivalent constructions do not depart from the spirit and scope of the disclosure in its broadest form.

[0006] Also, before undertaking the Detailed Description below, it should be understood that various definitions for certain words and phrases are provided throughout this patent document, and those of ordinary skill in the art will understand that such definitions apply in many, if not most, instances to prior as well as future uses of such defined words and phrases. While some terms may include a wide variety of embodiments, the appended claims may expressly limit these terms to specific embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

[0007] To identify the discussion of any particular element or act, the most significant digit or digits in a reference number refer to the figure number in which that element is first introduced. Docket No. 202117353

[0008] FIG. 1 is a schematic illustration of a resource field including a number of wells.

[0009] FIG. 2 is a schematic illustration of a portion of a process for collecting a resource from a reservoir.

[0010] FIG. 3 is a flow chart illustrating the data flow from a well to a data driven flow meter.

[0011] FIG. 4 is a flow chart illustrating a portion of an autoencoder training process.

[0012] FIG. 5 is a chart illustrating the process of determining the optimum iteration to end outlier data removal.

[0013] FIG. 6 is a flow chart illustrating the operation of the virtual flow meter using operational well data.

[0014] FIG. 7 is a flow chart illustrating the operation of the virtual flow meter including the retraining decision process and the retraining process.

[0015] FIG. 8 is a flow chart illustrating the steps of the autoencoder training process.

[0016] FIG. 9A graphically illustrates raw training data.

[0017] FIG. 9B graphically illustrates transient and steady state training data with outlier data removed.

[0018] FIG. 9C graphically illustrates training data with outlier data and transient data removed.

[0019] FIG. 10 illustrates a process for retraining and for making a retraining decision.

[0020] FIG. 11 illustrates a functional block diagram of an example computer system.

[0021] FIG. 12 illustrates a block diagram of a data processing system 1200 in which an embodiment of the virtual flow meter may be implemented.

[0022] FIG. 13 schematically illustrates a well including a sucker rod pump.

[0023] FIG. 14 is a chart illustrating one possible sample set of data illustrating a sucker rod load as a function of a position of a walking beam. Docket No. 202117353

[0024] FIG. 15 schematic illustration of soft sensor generation process.

DETAILED DESCRIPTION

[0025] Before any embodiments of the invention are explained in detail, it is to be understood that the invention is not limited in its application to the details of construction and the arrangement of components set forth in this description or illustrated in the following drawings. The invention is capable of other embodiments and of being practiced or of being carried out in various ways. Also, it is to be understood that the phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting.

[0026] Various technologies that pertain to systems and methods will now be described with reference to the drawings, where like reference numerals represent like elements throughout. The drawings discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way to limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged apparatus. It is to be understood that functionality that is described as being carried out by certain system elements may be performed by multiple elements. Similarly, for instance, an element may be configured to perform functionality that is described as being carried out by multiple elements. The numerous innovative teachings of the present application will be described with reference to exemplary non-limiting embodiments.

[0027] Also, it should be understood that the words or phrases used herein should be construed broadly, unless expressly limited in some examples. For example, the terms “including,” “having,” and “comprising,” as well as derivatives thereof, mean inclusion without limitation. The singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. Further, the term “and/or” as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term “or” is inclusive, meaning and/or, unless the context clearly indicates otherwise. The phrases “associated with” and “associated therewith,” as well as derivatives thereof, may mean to include, be included within, interconnect with, contain, be contained within, connect to or with, couple to or with, be communicable with, cooperate with, interleave, Docket No. 202117353 juxtapose, be proximate to, be bound to or with, have, have a property of, or the like. Furthermore, while multiple embodiments or constructions may be described herein, any features, methods, steps, components, etc. described with regard to one embodiment are equally applicable to other embodiments absent a specific statement to the contrary.

[0028] Also, although the terms "first", "second", "third" and so forth may be used herein to refer to various elements, information, functions, or acts, these elements, information, functions, or acts should not be limited by these terms. Rather these numeral adjectives are used to distinguish different elements, information, functions or acts from each other. For example, a first element, information, function, or act may be termed a second element, information, function, or act, and, similarly, a second element, information, function, or act may be termed a first element, information, function, or act, without departing from the scope of the present disclosure.

[0029] In addition, the term "adjacent to" may mean that an element is relatively near to but not in contact with a further element or that the element is in contact with the further portion, unless the context clearly indicates otherwise. Further, the phrase “based on” is intended to mean “based, at least in part, on” unless explicitly stated otherwise. Terms “about” or “substantially” or like terms are intended to cover variations in a value that are within normal industry manufacturing tolerances for that dimension. If no industry standard is available, a variation of twenty percent would fall within the meaning of these terms unless otherwise stated.

[0030] FIG. 1 schematically illustrates a resource field 100 such as an oil field that is arranged to extract a resource 104 (e.g., oil, natural gas) that is trapped beneath a surface 102.

Typically, large resource fields 100 include multiple wells 120 each arranged to extract a portion of the resource 104. As used herein, the term “well” is not geographically limited to only the location of a wellhead and a pipe or hole. Rather, “well” includes all the components that may be required or optionally included to deliver the resource 104 to a pipeline or storage facility. Each of the wells 120 may be arranged to extract the resource 104 from a different depth or the same depth as may be required. Typical resource fields 100 include multiple wells 120 however, a single well 120 may be employed in some situations. Docket No. 202117353 [0031] Some wells 106 include a separator 302 (shown in FIG. 2 and FIG. 3) and choke valve 118 that operates to control the flow of fluid through the well 120 and in particular through the well head 110. The separator 302 operates to separate the incoming flow into separate constitute components and may be located near the well head 112 or may be remotely located. Thus, in a well 120 where the resource 104 emerges as a mix of oil, water, and natural gas, the separator 302 is arranged to separate that flow into three distinct flows, one predominately water, one predominately oil, and one predominately natural gas. It should also be noted that a single separator 202 could be employed to handle the flow from a single well head 112 or multiple well heads 112 as may be desired.

[0032] Each well 120 of the illustrated construction includes a well head 110 that sits on the surface 102 and connects to a well bore 108 that extends downward from the surface 102 to a desired depth. The surface equipment may include a pump (e.g., sucker rod pump), valves, measuring equipment, and the like. "Sucker rod pump" (SRP), sometimes referred to as a pumpjack is an over ground drive for a reciprocating piston pump in an oil well. It is used to mechanically lift liquid out of the well if not enough bottom hole pressure exists for the liquid to flow all the way to the surface. The arrangement is commonly used for onshore wells producing little oil. In some wells 120, an artificial lift device 116 is needed to aid in extracting the resource 104. In FIG. 1, an artificial lift device 116 in the form of an electrical submerged pump 106 is positioned at the bottom or near the bottom of each of the well bores 108 and operates to pump the resource 104 upward through the well bore 108 when the well pressure is insufficient to push the resource 104 upward naturally and at a desired rate. "Electrical submerged pump" (ESP) is a device which has a hermetically sealed motor close- coupled to the pump body. The whole assembly is submerged in the fluid to be pumped. Of course, where natural flow due to underground pressure is insufficient, other artificial lift devices 118 such as other pumps, or other modes of forcing the resource 104 upward (e.g., progressive cavity pump (PCP), gas lift, etc.) may be employed as artificial lift devices 116. Thus, the term “artificial lift device” should be understood to encompass any system or device that enhances the lifting capacity beyond that provided by the natural existing pressure within the well 120.

[0033] Many resources 104, when extracted exit the ground as a multi-phase flow (i.e., mixture of liquid, gas, and/or solid) and/or contain two or more different substances having Docket No. 202117353 different, and in many cases vastly different densities (e.g., oil, water, and natural gas). It is desirable to accurately measure the flow of each of these substances from each of the wells 120. However, the aforementioned factors make such measurements difficult.

[0034] In general, flow measuring systems fall into one of three types of flow meters that can be employed to measure the complicated flow of a resource 104. These flow meters include hardware flow meters, physics-based virtual flow meters, and data-driven virtual flow meters. Hardware flow meters directly measure the flow rate of the fluid. However, these flow meters are very expensive and have high operating costs making them undesirable. Physics-based flow meters are flow meters that rely on known relationships between measurable properties of the resource 104 and its flowrate and therefore require exact modeling (e.g., well geometry, fluid properties, and reservoir conditions). These flow meters require sensors not typically used in wells 120 and these and other components require continuous manual calibration, are only accurate in a narrow operating range, and therefore require expertise to use accurately.

[0035] FIG. 1 illustrates a virtual flow meter 114 associated with one of the wells 120 to allow for the determination of a flow rate from that well 120. Each well 120 may include a similar virtual flow meter 114 and the virtual flow meter 114 or some of the components of the virtual flow meter 114 may be spaced apart from the well 120 as may be desired.

[0036] The data driven virtual flow meter 114 is generally computer-based and uses the data available from existing sensors in the well 120 that it is monitoring. The virtual flow meter 114 can be included in a single computer or device or can have different portions housed in different computing or intelligent devices. For example, the virtual flow meter 114 may be housed in an edge computing device that is positioned near the well 120 or may be housed in a remote computer some distance away. The computer includes a processor, memory, data storage (volatile and non-volatile), communication devices, and typically user input and output devices. The communication devices allow for the transmission of sensor data from the well 120 to the virtual flow meter 114 and specifically, the computer or computer device that houses the virtual flow meter 114.

[0037] FIG. 2 schematically illustrates an arrangement that may be employed to extract the resource 104 from a reservoir 202. While FIG. 2 illustrates a single reservoir 202, multiple reservoirs 202 could be employed in extracting the resource. As such, the single reservoir 202 Docket No. 202117353 simply represents the source of the resource 104. Multiple wells 204a-204d are employed to extract the resource 104 with more or fewer wells 204a-204d being possible. Each well 204a- 204d experiences different input conditions based on the condition of the reservoir 202 and the position of the well 204a-204d. In addition, each well 204a-204d is operable to discharge the extracted resource to one or more manifolds 206a-206b. In the illustrated construction, two manifolds 206a, 206b are illustrated with a single manifold 206a or more than two manifolds 206a could be employed if desired. Each manifold 206a, 206b collects some or all of the resource 104 from some or all of the wells 204a-204d. During typical operation, each of the wells 204a-204d delivers the resource to one of the manifolds 206a, 206b.

[0038] The manifolds 206a, 206b collect the resource 104 from each of the wells 204a-204d and then direct that resource to one or more separators 208a, 208b. While two separators 208a, 208b are illustrated, a single separator 208a or more than two separators 208a, 208b could be employed if desired. Preferably, a single separator 208a or 208b is employed at any given time to facilitate measuring total flows of the constituents of the resource 104 if desired. Ideally flow is measured for only one well (eg well 204a) and not total flow of all wells 204a-204d. Thus, the constituents of that well 204a are measured. In different arrangements the total flow of several wells 204a-204d can be measured depending on the separator design. Each separator 208a, 208b is arranged to separate the specific constituents found in the resource 104 being extracted. In one common application, the resource 104 includes water, natural gas, and oil. In this application, each separator 208a, 208b discharges three streams that are collected in one of a first fluid reservoir 210, a second fluid reservoir 212, or a third fluid reservoir 214. The first fluid reservoir 210 collects water, the second fluid reservoir 212 collects natural gas, and the third fluid reservoir 214 collects oil. It should be noted that the term “reservoir” in this context simply means a common collection location. Each reservoir could be a pipeline that directs the material for further processing or collection.

[0039] FIG. 3 illustrates a data pipeline 300 that describes the data collection and analysis process for the fully data driven virtual flow meter 114. The virtual flow meter 114 predicts the flow or production rates of the well 120 by modeling the well 120 (and more accurately by correlating data values from the well 120 to production rates) with all its multi- variate conditions. For example, for a well 120 that includes the electrical submerged pump 106, input pressure, motor current, motor power, motor temperature and other relevant physical Docket No. 202117353 parameters may be used to develop a trained flow model 316. The actual field data from available measurements is used for model building and training. The trained flow model 316 can then be used as part of the virtual flow meter 114 to provide usable flow rates based on the exact operating conditions of the electrical submerged pump 106 and the well 120. It should be noted that the term “model” as used herein simply means that some aspect of the well 120 is represented mathematically. The representation can include equations, tables, or other means that describe correlations between datasets and actual operation of the well 120.

[0040] The virtual flow meter 114 also includes a reconstruction error model 322 that is used to assess the quality of the predictions made by the trained flow model 316. Both the trained flow model 316 and the reconstruction error model 322 utilize artificial intelligence and specifically artificial neural networks to operate with the desired accuracy and speed.

"Artificial neural network" (ANN) is the piece of a computing system designed to simulate the way the human brain analyzes and processes information. An ANN is based on a collection of connected units or nodes called artificial neurons, which loosely model the neurons in a biological brain. Each connection, like the synapses in a biological brain, can transmit a signal to other neurons. An artificial neuron that receives a signal then processes it and can signal neurons connected to it. The "signal" at a connection is a real number, and the output of each neuron is computed by some non-linear function of the sum of its inputs. The connections are called edges. Neurons and edges typically have a weight that adjusts as learning proceeds. The weight increases or decreases the strength of the signal at a connection. Neurons may have a threshold such that a signal is sent only if the aggregate signal crosses that threshold. Typically, neurons are aggregated into layers. Different layers may perform different transformations on their inputs. Signals travel from the first layer (the input layer) to the last layer (the output layer), possibly after traversing the layers multiple times. Of course, other artificial intelligence techniques such as flow model generic ANN, autoencoder for reconstruction, LSTM for dynamic lag, Kohonen RF for clustering, XGBOOST, etc. could be employed in conjunction with or in place of an artificial neural network.

[0041] As an overview, the data pipeline 300 includes a number of steps and processes that each fall into one of the categories of data cleaning, data pre-processing, model building and training, and model retraining. In preferred constructions, the data cleaning category includes Docket No. 202117353 an automated step for outlier removal 318 which removes outliers in the input data as will be discussed in greater detail.

[0042] The data pre-processing category can include autoencoders 306 and a pre-processor 308 that analyze incoming data to verify that it falls within the expected ranges for the particular data source and sensor and will be discussed in greater detail. Model building and model training 312 makes use of an artificial neural network (ANN) architecture to develop an untrained flow model 314 that is then trained to become a trained flow model 316 that is used to predict the flow rates of the well 120. A reconstruction error model 322 is created in a similar manner. The reconstruction error model 322 is used to detect changes in input conditions. The reconstruction error model 322 outputs an indicator (reconstruction error) indicative of how the input data differs from the known or trained data patterns. The reconstruction error model 322 provides a good measure of the prediction accuracy of the flow rates produced by the trained flow model 316 as it can provide a quality indication based on the input data.

[0043] The model retraining category operates when the reconstruction error model 322 detects a change in the operating conditions of a predetermined magnitude. The retraining portion initiates a retraining process to retrain the trained flow model 316 using the new operating data.

[0044] With reference to FIG. 3, the data pipeline 300 uses operational data 304 collected from the well 120 and a separator 302, as well as any other components desired. The operational data 304 collected from the well 120 may include input pressure, output pressure, motor current, motor power consumption, pressure differentials, casing pressure, tube pressure, temperature of the resource 104, etc. Similarly, operational data 304 can be collected from the separator 302 indicative of its operation. This operational data 304 may include pressures, temperatures, differential pressures, and the like.

[0045] As illustrated in FIG. 4, the collected data, or operational data 304 is fed to an autoencoder 206 where the operational data 304 is processed for use in the reconstruction error model 322. The autoencoder 306 employs an unsupervised data science modeling technique which learns the normal data representation and interaction between the input features without any explicit target data or outputs. "Autoencoder" refers to a type of artificial neural network Docket No. 202117353 used to learn efficient data coding in an unsupervised manner. The aim of an autoencoder is to learn a representation (encoding) for a set of data, typically for dimensionality reduction, by training the network to ignore signal “noise”. Along with the reduction side, a reconstructing side is learnt, where the autoencoder tries to generate from the reduced encoding a representation as close as possible to its original input. In the illustrated application, for a given set of operating conditions or operational data 304, the input data is expected to follow a normal representation, which can be learned by the autoencoders 306. It follows an encoding and decoding later flow, and with proper hyper parameter tuning, it can learn the input data representation and correlations. In other constructions, the autoencoder can be replaced by or used in conjunction with other unsupervised learning techniques such as PCA, K-means clustering, or similar autoencoders.

[0046] The autoencoders 306 employ an artificial neural network to analyze the operational data 304 from the various operational sensors to learn the normal data distribution and to determine what data values may fall out of an expected range. The use of the autoencoders 306 and the artificial neural network allows for more accurate analysis by accounting for situations where the well 120 is operating in an expected manner but one or more data points may be out of an expected range. The output of the autoencoders 306 is used as part of the reconstruction error model 322 as will be discussed in greater detail. As with any artificial neural network, the autoencoders 306 must be trained. This process is described in more detail with regard to FIG. 8.

[0047] Returning to FIG. 3, the operational data 304 is also passed to the pre-processor 308 for pre-processing. The pre-processor 308 operates to remove outlier data to allow for more accurate calculations from the trained flow model 316 and for better data for training. The outlier removal 318 is performed autonomously and generally includes three different methodologies. The first methodology is a rule-based system for removing gross outliers. Gross outliers are outliers that are out of range from the general sensor readings. The most common outliers are those in flow readings with too high or too low of a value. This can be caused by abrupt flow measurements (transients). Pressure and temperature sensors are susceptible to the same type of out-of-range data errors. These are removed using general cut off ranges that can be specific to each well 120 and each sensor and that are typically determined after an analysis of the expected data ranges. Docket No. 202117353 [0048] The second methodology is steady-state detection for narrow operating range data. For narrow operating ranges, the data is expected to be nearly constant and therefore a gradientbased or rate of change-based method to remove data that are outside the steady-state is applied. The gradients can be measured with respect to one or more of the speed or frequency of the electrical submerged pump 106, pump inlet pressure, water flowrate, oil flow rate, and/or other suitable parameters. A threshold is selected based on the rate of change and all sample points that have gradients or rates of change below the selected value are retained, while those outside of the selected gradient or rates of change are discarded. Thus, only data corresponding to the steady state for these narrow range values are used for further analysis and the rest are discarded. In some constructions, a K-nearest neighbors algorithm is employed to determine if the gradients or rates of change exceed the predetermined values. "K-nearest neighbors algorithm" (KNN) refers to a non-parametric method used for classification and regression. In both cases, the input consists of the k closest training examples in the feature space. The output depends on whether A NN is used for classification or regression. In k-NN classification, the output is a class membership. In k-NN regression, the output is the property value for the object. This value is the average of the values of k nearest neighbors.

[0049] The third methodology employed for outlier removal is an adaptive outlier removal process 500 applicable to larger operating range data. For larger operating ranges, the data can have more outliers such as zero readings (i.e., a sensor out of range low value) as well as sudden spikes and dips (e.g., transients). Electrical noise between the sensor and the preprocessor 308 can cause some of these data outliers. To assure that only data in acceptable ranges is used, an adaptive method of outlier removal is employed. As illustrated in FIG. 5, an iterative process is employed. In each iteration, a set of points are removed based on an algorithmic decision score and these decision scores are monitored. When the decision score reaches a local minimum 502, the loop terminates, and the final set of points are returned.

[0050] The algorithmic decision score is determined for every data point by first measuring a variance of a full data set (Vo) for the sensor or data in question. Using a suitable algorithm (autoencoder, KNN, Isolation Forest etc.), an algorithmic decision store is obtained for each sample data point. For each iteration, variance or a suitable statistical metric is computed from the decision scores of all data points. In each iteration, a set percent of data points corresponding to highest decision scores are removed from the analysis. After removal of the Docket No. 202117353 above data points, the same algorithm is applied on the remaining data-points and decision scores and corresponding variance scores are again computed. The process terminates when variance score of the new iteration is higher than the previous iteration. Sample data is then analyzed using the model with each sample data point receiving an algorithmic decision score. In the illustrated construction, an algorithmic decision score of “0” represents inlier data and a score of “1” represents outlier data. Of course, many different values may be assigned to inliers and outliers as desired (e.g., the “0” and “1” may be reversed). The variance of the sample data including only the inlier values (Vi) is then determined. If the variance of the inlier values (Vi) is less than the variance of the full data set (Vo) the aforementioned process is repeated. When the variance of the inlier values (Vi) is greater than the variance of the full data set (Vo) the aforementioned process terminates. This point should be the local minimum 502 illustrated in FIG. 5.

[0051] Returning to FIG. 3, with the outliers now removed from the data, the clean data is passed on for feature extraction 310, sometimes referred to as feature engineering. Feature extraction 310 selects features that can be used for training the untrained flow model 314. Most of the features can be classified as sensor data, production separator data, and/or well data. Sensor data is generally continuously measured at a predetermined sample rate (e.g., once per minute) and may include electrical submerged pump 106 properties such as current, leakage current, power, differential pressure, inlet pressure, outlet pressure, fluid temperature, winding temperature, vibration, and the like. In addition, other values related to the well 120 that may be measured include casing pressure, tubing pressure, motor frequency, and the like. Production separator data may include a gross production rate, a net production rate, a gas production rate, and separator pressures and temperatures. These values are either periodically sampled at a high sampling rate (e.g., between 20ms and 100ms) or event-based measurements (on-change). Well data is typically data that is static and only changes in response to well or equipment changes. Well data may include the pump design, pump depth, tubing diameter, perforation top, perforation bottom, nominal motor voltage, nominal motor performance (efficiency), and well path (e.g., inclination, azimuth), as well as other similar data.

[0052] With feature extraction 310 complete, the feature extracted data can be used to train the untrained flow model 314. In general, sensor data, well data, and separator pressure are used as inputs to the untrained flow model 314 and the production rates (e.g., gross, net, and Docket No. 202117353 gas production rates) are used as outputs. During model training 312, input data is provided to the untrained flow model 314 and the untrained model predicts production rates. The predicted production rates are compared to the known values from the data output from feature extraction 310. The model is adjusted, and this process is repeated until the predicted production rates converge on, and closely match the known values.

[0053] Next, a cross-validation step 320 is performed to verify that the model is performing as desired. Data taken from feature extraction 310 or other data can be input into the model and the predicted production rates again compared to the known production rates to verify that the model is producing accurate results. In addition, data from similar wells 120 may be employed for the cross-validation step 320 if desired. Once the model passes the cross-validation step 320, it becomes the trained flow model 316 and can be used for operational predictions.

[0054] Data output from feature extraction 310 is also used by the reconstruction error model 322. Specifically, sensor data is used as both inputs and outputs for the reconstruction error model 322.

[0055] As illustrated in FIG. 6, the now trained flow model 316 and the reconstruction error model 322 can be used with actual well data 604 to predict the production rates for the well 120. The well data 604 can include motor current, motor power, pump pressure differential, pump pressure, casing pressure, tube pressure, fluid temperature, motor temperature, pump vibration, and the like. The well data 604 is passed through the pre-processor 308 to remove any outlier data and to assure that the well data 604 is suitable for use and will provide accurate results when presented to each of the reconstruction error model 322 and the trained flow model 316.

[0056] The reconstruction error model 322 and the trained flow model 316 are used in a realtime scenario for prediction. The reconstruction error model 322 is used to calculate a reconstruction error 602 to determine if and by how much the input data has changed when compared to the original data used for training. The trained flow model 316 predicts production, or flow rates for each component of the mixed flow resource 104. In oil field applications, the resource 104 can be a mixed flow of oil, water and natural gas with the trained flow model 316 being able to separately predict production or flow rates for each of the oil, water, and natural gas. Docket No. 202117353 [0057] During the process of predicting production rates, the new well data 604 is provided to both the reconstruction error model 322 and the trained flow model 316. The reconstruction error model 322 checks the quality of the data by comparing the data to the expected data for the particular well 120. The reconstruction error model 322 generates the reconstruction error 602 for the new data point and checks if that error exceeds predetermined limits to evaluate if the conditions of the well 120 have changed to the point where the predictions from the trained flow model 316 may be inaccurate.

[0058] At nearly the same time, the trained flow model 316 generates a flow model prediction 606 that includes estimated or predicted production or flow rates based on the new well data 604. Skilled users of the system can use the reconstruction error 602 and the flow model predictions 606 to determine the production rates for the well 120 and whether or not the conditions of the well 120 have changed to the point that the trained flow model 316 is no longer accurate.

[0059] FIG. 7 illustrates the operation of the trained flow model 316 and the reconstruction error model 322 and in particular illustrates the operation of a model retraining process 710 that is initiated based on a retraining decision 702. More specifically, and as was discussed with regard to FIG. 6, new well data 604 is received by the virtual flow meter 114 for processing. The new well data 604 is first analyzed by the reconstruction error model 322 to determine the reconstruction error 602. The reconstruction error 602 is indicative of the level of change that may have occurred in the well 120, a change in the reservoir, or in the operation of the well 120. The retraining decision 702 compares the reconstruction error 602 to a predefined threshold or allowable reconstruction error 602. If the reconstruction error 602 is less than the predefined threshold, the decision is a “Yes” and the new well data 604 is passed to the trained flow model 316 which then operates to output flow model predictions 606 as discussed above. If however, the reconstruction error 602 is greater than the predefined threshold, the model retraining process 710 may be automatically initiated.

[0060] The model retraining process 710 begins by requesting new well test 704. The data from the new well test 704 will be similar to the original data used to train the trained flow model 316 and the reconstruction error model 322 and will be treated in a similar manner. The new data is used to retrain each of the trained flow model 316 and the reconstruction error model 322 to produce a retrained flow model 706 and a retrained reconstruction error model Docket No. 202117353 708. These models then replace the trained flow model 316 and the reconstruction error model 322 that were in place prior to the retraining and are used for future predictions until an additional retraining is required.

[0061] The model retraining process 710 may be autonomous such that it occurs automatically without any user intervention to assure that the trained flow model 316 or the retrained flow model 706 produces suitably accurate results. However, other constructions may include semiautomatic initiation or supervised initiation.

[0062] FIG. 8 illustrates one possible training process 800 that can be employed to train the autoencoders 306 for use with the reconstruction error model 322. The training process 800 includes an outlier removal step 802, a clustering step 804, a sample data extraction step 806, autoencoder training 808, and autoencoder testing 810.

[0063] The outlier removal step 802 utilizes steady-state and/or K-Nearest neighbors algorithms to determine which data points may be outliers and removes those data points from the data set as was described with regard to FIG. 3.

[0064] Next, the clustering step 804 uses K-means clustering with a pre-assigned K to cluster the data into respective labels or categories. "K-means clustering" refers to a method of vector quantization, originally from signal processing, that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or cluster centroid), serving as a prototype of the cluster. For example, the clustering may be based on the pump frequency such that the data is clustered or grouped based on pump frequency values. As should be understood, other clustering techniques may also be employed, or the clustering step may be omitted.

[0065] With the clustering complete, a sample data extraction step 806 is performed. In one arrangement, an equal number of data is sampled from each cluster to remove bias towards clusters or data sets with a higher number of data points.

[0066] The extracted sampled data is then used for autoencoder training 808. As discussed above, the data is provided to the autoencoder 306 and the results of the autoencoder 306 are compared to known results. A reconstruction plot indicative of the error of the autoencoder 306 can then be produced. Docket No. 202117353

[0067] Finally, the autoencoder training process 800 is completed with autoencoder testing 810. The autoencoder 306 is tested using a blind dataset (i.e., a dataset with known results that are compared to the predicted results) or using the same training datasets to verify that the results produced by the autoencoder 306 is sufficiently close to the expected or known results to allow production use of the autoencoders 306.

[0068] Training data is an important aspect of the virtual flow meter. Without proper training data, the resulting model could be inaccurate. To assure proper training data, the raw data 902, illustrated in FIG. 9A goes through a preprocessing step.

[0069] The raw data 902 includes both input data and output data for both transient and steady state operation. The virtual flow meter is mainly used to predict steady state operating conditions such that the use of steady state training data is preferred. While transient data could be used for additional training, it would not increase the accuracy of the virtual flow model at predicting steady state operating conditions and is therefore intentionally omitted in this example.

[0070] The raw data 902 illustrated in FIG. 9A may include outlier data and/or data that is obviously wrong (e.g., failed sensor or out of range values). This obviously incorrect data is removed in the first step of data preprocessing. This step in the process can be autonomous or could include some user intervention or interaction. In addition, the outlier removal process can be the same as or similar to the step of outlier removal 318 described with regard to removing inaccurate incoming data during operation.

[0071] The removal of the outlier data from the raw data 902 leads to a set of clean data 904 illustrated in FIG. 9B. The clean data 904 still includes transient data and steady state data but many of the clearly inaccurate data has been removed. Next, the clean data 904 is processed to separate the transient data. In one example, a K-nearest neighbors algorithm or autoencoder is employed to facilitate the separation of the transient data. Again, the processes and systems employed can be the same as or similar to those used to preprocess the incoming operating data prior to it being submitted to the virtual flow meter.

[0072] With the separation of the transient data complete, the resulting preprocessed training data 906 as illustrated in Figs. FIG. 9C is ready to be used for training. Docket No. 202117353

[0073] As noted above, the examples described herein do not utilize the transient data. However, other systems may employ the transient data if desired. Therefore, this transient data is not simply deleted or ignored but rather may be used elsewhere as it describes different aspects of the system.

[0074] FIG. 10 illustrates in a flow chart format a routine 1000 that may be followed by the virtual flow meter 114. In block 1002, operating data is received from the well, the operating data is indicative of the current operating parameters of the well. In block 1004, routine 1000 calculates a reconstruction error using an Al-based trained reconstruction error model and the operating data from the well. In block 1006, routine 1000 predicts a flow value using an AI- based trained flow model and the operating data from the well in response to a comparison between the reconstruction error and a predefined allowable error indicating that the reconstruction error is acceptable. In block 1008, routine 1000, in response to the comparison between the reconstruction error and a predefined allowable error indicating that the reconstruction error is not acceptable initiates a retraining process. In block 1010, routine 1000 retrains the trained flow model using the operating data from the well to create a retrained flow model. In block 1012, routine 1000 retrains the trained reconstruction error model using the operating data from the well to create a retrained reconstruction error model. In block 1014, routine 1000 replaces the trained flow model with the retrained flow model. In block 1016, routine 1000 replaces the trained reconstruction error model with the retrained reconstruction error model.

[0075] With reference to FIG. 11, an example computer system 1100 is described that may house a portion of, or the entire virtual flow meter 114. The computer system 1100 employs at least one data processing system 1102. A data processing system may comprise at least one processor 1116 (e.g., a microprocessor/CPU, GPU, and the like). The processor 1116 may be configured to carry out various processes and functions described herein by executing from a memory 1126, computer/processor executable instructions 1128 corresponding to one or more applications 1130 (e.g., software and/or firmware) or portions thereof that are programmed to cause the at least one processor to carry out the various processes and functions described herein.

[0076] The memory 1126 may correspond to an internal or external volatile or nonvolatile processor memory 1118 (e.g., main memory, RAM, and/or CPU cache), that is included in the Docket No. 202117353 processor and/or in operative connection with the processor. Such a memory may also correspond to non-transitory nonvolatile storage device 1120 (e.g., flash drive, SSD, hard drive, ROM, EPROMs, optical discs/drives, or other non-transitory computer readable media) in operative connection with the processor.

[0077] The described data processing system 1102 may optionally include one or more display devices 1112 and one or more input devices 1114 in operative connection with the processor. The display device, for example, may include an LCD or AMOLED display screen, monitor, VR headset, projector, or any other type of display device capable of displaying outputs from the processor. The input device, for example, may include a mouse, keyboard, touch screen, touch pad, trackball, buttons, keypad, game controller, gamepad, camera, microphone, motion sensing devices that capture motion gestures, operational sensors (e.g., pressure, temperature, flow, etc.), or other type of input device capable of providing user inputs or other information to the processor.

[0078] The data processing system 1102 may be configured to execute one or more applications 1130 that facilitates the features described herein.

[0079] For example, as illustrated in FIG. 11, the at least one processor 1116 may be configured via executable instructions 1128 (e.g., included in the one or more applications 1130) included in at least one memory 1126 to operate all or a portion of the virtual flow meter 114.

[0080] Referring now to FIG. 12, a methodology is illustrated that facilitates operation of a portion of, or all the virtual flow meter 114. While the methodology is described as being a series of acts that are performed in a sequence, it is to be understood that the methodology may not be limited by the order of the sequence. For instance, unless stated otherwise, some acts may occur in a different order than what is described herein. In addition, in some cases, an act may occur concurrently with another act. Furthermore, in some instances, not all acts may be required to implement a methodology described herein.

[0081] It should be appreciated that this described methodology may include additional acts and/or alternative acts corresponding to the features described previously with respect to the data processing computer system 1100. Docket No. 202117353

[0082] It is also important to note that while the disclosure includes a description in the context of a fully functional system and/or a series of acts, those skilled in the art will appreciate that at least portions of the mechanism of the present disclosure and/or described acts may be capable of being distributed in the form of computer/processor executable instructions 1128 (e.g., software/firmware applications 1130) contained within a storage device 1120 that corresponds to a non-transitory machine-usable, computer-usable, or computer- readable medium in any of a variety of forms. The computer/processor executable instructions 1128 may include a routine, a sub-routine, programs, applications, modules, libraries, and/or the like. Further, it should be appreciated that computer/processor executable instructions may correspond to and/or may be generated from source code, byte code, runtime code, machine code, assembly language, Java, JavaScript, Python, Julia, C, C#, C++ or any other form of code that can be programmed/configured to cause at least one processor to carry out the acts and features described herein. Still further, results of the described/claimed processes or functions may be stored in a computer-readable medium, displayed on a display device, and/or the like.

[0083] It should be appreciated that acts associated with the above-described methodologies, features, and functions (other than any described manual acts) may be carried out by one or more data processing systems 1102 via operation of one or more of the processors 1116. Thus, it is to be understood that when referring to a data processing system, such a system may be implemented across several data processing systems organized in a distributed system in communication with each other directly or via a network.

[0084] As used herein a processor corresponds to any electronic device that is configured via hardware circuits, software, and/or firmware to process data. For example, processors described herein may correspond to one or more (or a combination) of a microprocessor, CPU, GPU, or any other integrated circuit (IC) or other type of circuit that is capable of processing data in a data processing system 1102. As discuss previously, the processor 1116 that is described or claimed as being configured to carry out a particular described/claimed process or function may correspond to a CPU that executes computer/processor executable instructions 1128 stored in a memory 1126 in the form of software to carry out such a described/claimed process or function. However, it should also be appreciated that such a processor may correspond to an IC that is hardwired with processing circuitry (e.g., an FPGA or ASIC IC) to carry out such a described/claimed process or function. Also, it should be understood, that Docket No. 202117353 reference to a processor may include multiple physical processors or cores that are configured to carry out the functions described herein. In addition, it should be appreciated that a data processing system and/or a processor may correspond to a controller that is operative to control at least one operation.

[0085] In addition, it should also be understood that a processor that is described or claimed as being configured to carry out a particular described/claimed process or function may correspond to the combination of the processor 1116 with the executable instructions 1128 (e.g., software/firmware applications 1130) loaded/installed into the described memory 1126 (volatile and/or non-volatile), which are currently being executed and/or are available to be executed by the processor to cause the processor to carry out the described/claimed process or function. Thus, a processor that is powered off or is executing other software, but has the described software loaded/stored in a storage device 1120 in operative connection therewith (such as on a hard drive or SSD) in a manner that is available to be executed by the processor (when started by a user, hardware and/or other software), may also correspond to the described/claimed processor that is configured to carry out the particular processes and functions described/claimed herein.

[0086] FIG. 12 illustrates a further example of a data processing system 1200 with which one or more embodiments of the data processing system 1102 described herein may be implemented. For example, in some embodiments, the at least one processor 1116 (e.g., a CPU or GPU) may be connected to one or more bridges/buses/controllers 1202 (e.g., a north bridge, a south bridge). One of the buses for example, may include one or more I/O buses such as a PCI Express bus. Also connected to various buses in the depicted example may include the processor memory 1118 (e.g., RAM) and a graphics controller 1204. The graphics controller 1204 may generate a video signal that drives the display device 1112. It should also be noted that the processor 1116 in the form of a CPU may include a memory therein such as a CPU cache memory. Further, in some embodiments one or more controllers (e.g., graphics, south bridge) may be integrated with the CPU (on the same chip or die). Examples of CPU architectures include IA-32, x86-64, and ARM processor architectures.

[0087] Other peripherals connected to one or more buses may include communication controllers 1214 (Ethernet controllers, WiFi controllers, cellular controllers) operative to connect to a network 1222 such as a local area network (LAN), Wide Area Network (WAN), Docket No. 202117353 the Internet, a cellular network, and/or any other wired or wireless networks or communication equipment. The data processing system 1200 may be operative to communicate with one or more servers 1224, and/or any other type of device or other data processing system that is connected to the network 1222. For example, in some embodiments, the data processing system 1200 may be operative to communicate with a memory 1126. Examples of a database may include a relational or non-relational database (e.g., Influx DB, Oracle, Microsoft SQL Server). Also, it should be appreciated that is some embodiments, such a database may be executed by the processor 1116.

[0088] Further components connected to various busses may include one or more I/O controllers 1212 such as USB controllers, Bluetooth controllers, and/or dedicated audio controllers (connected to speakers and/or microphones). It should also be appreciated that various peripherals may be connected to the I/O controller(s) (via various ports and connections) including the input devices 1114, and output devices 1206 (e.g., printers, speakers) or any other type of device that is operative to provide inputs to and/or receive outputs from the data processing system.

[0089] Also, it should be appreciated that many devices referred to as input devices 1114 or output devices 1206 may both provide inputs and receive outputs of communications with the data processing system 1200. For example, the processor 1116 may be integrated into a housing (such as a tablet) that includes a touch screen that serves as both an input and display device. Further, it should be appreciated that some input devices (such as a laptop) may include a plurality of different types of input devices 1114 (e.g., touch screen, touch pad, and keyboard). Also, it should be appreciated that other hardware 1208 connected to the I/O controllers 1212 may include any type of device, machine, sensor, or component that is configured to communicate with a data processing system.

[0090] Additional components connected to various busses may include one or more storage controllers 1210 (e.g., SATA). A storage controller 1210 may be connected to a storage device 1120 such as one or more storage drives and/or any associated removable media. Also, in some examples, a storage device 1120 such as an NVMe M.2 SSD may be connected directly to a bus (e.g., bridges/buses/controllers 1202) such as a PCI Express bus. Docket No. 202117353 [0091] It should be understood that the data processing system 1200 may directly or over the network 1222 be connected with one or more other data processing systems such as a server 1224 (which may in combination correspond to a larger data processing system). For example, a larger data processing system may correspond to a plurality of smaller data processing systems implemented as part of a distributed system in which processors associated with several smaller data processing systems may be in communication by way of one or more network connections and may collectively perform tasks described as being performed by a single larger data processing system.

[0092] A data processing system in accordance with an embodiment of the present disclosure may include an operating system 1216. Such an operating system may employ a command line interface (CLI) shell and/or a graphical user interface (GUI) shell. The GUI shell permits multiple display windows to be presented in the graphical user interface simultaneously, with each display window providing an interface to a different application or to a different instance of the same application. A cursor or pointer in the graphical user interface may be manipulated by a user through a pointing device such as a mouse or touch screen. The position of the cursor/pointer may be changed and/or an event, such as clicking a mouse button or touching a touch screen, may be generated to actuate a desired response. Examples of operating systems that may be used in a data processing system may include Microsoft Windows, Linux, UNIX, iOS, macOS, and Android operating systems.

[0093] As used herein, the processor memory 1118, storage device 1120, and memory 1126 may all correspond to the previously described memory 1126. Also, the previously described applications 1130, operating system 1216, and data 1220 may be stored in one more of these memories or any other type of memory or data store. Thus, the processor 1116 may be configured to manage, retrieve, generate, use, revise, and/or store applications 1130, data 1220 and/or other information described herein from/in the processor memory 1118, storage device 1120, and/or memory 1126.

[0094] In addition, it should be appreciated that data processing systems may include virtual machines in a virtual machine architecture or cloud environment that execute the executable instructions. For example, the processor and associated components may correspond to the combination of one or more virtual machine processors of a virtual machine operating in one or more physical processors of a physical data processing system 1200. Examples of virtual Docket No. 202117353 machine architectures include VMware ESXi, Microsoft Hyper- V, Xen, and KVM. Further, the described executable instructions 1128 may be bundled as a container that is executable in a containerization environment such as Docker executed by the processor 1116.

[0095] Also, it should be noted that the processor 1116 described herein may correspond to a remote processor located in a data processing system such as a server that is remote from the display and input devices described herein. In such an example, the described display device and input device may be included in a client data processing system (which may have its own processor) that communicates with the server (which includes the remote processor) through a wired or wireless network (which may include the Internet). In some embodiments, such a client data processing system, for example, may execute a remote desktop application or may correspond to a portal device that carries out a remote desktop protocol with the server in order to send inputs from an input device to the server and receive visual information from the server to display through a display device. Examples of such remote desktop protocols include Teradici's PCoIP, Microsoft's RDP, and the RFB protocol. In another example, such a client data processing system may execute a web browser or thin client application. Inputs from the user may be transmitted from the web browser or thin client application to be evaluated on the server, rendered by the server, and an image (or series of images) sent back to the client data processing system to be displayed by the web browser or thin client application. Also, in some examples, the remote processor described herein may correspond to a combination of a virtual processor of a virtual machine executing in a physical processor of the server.

[0096] Those of ordinary skill in the art will appreciate that the hardware and software depicted for the data processing system may vary for particular implementations. The depicted examples are provided for the purpose of explanation only and is not meant to imply architectural limitations with respect to the present disclosure. Also, those skilled in the art will recognize that, for simplicity and clarity, the full structure and operation of all data processing systems suitable for use with the present disclosure is not being depicted or described herein. Instead, only so much of a data processing system as is unique to the present disclosure or necessary for an understanding of the present disclosure is depicted and described. The remainder of the construction and operation of the data processing system 1200 may conform to any of the various current implementations and practices known in the art. Docket No. 202117353

[0097] FIG. 13 schematically illustrates an example of a well or well system 1300 that includes a sucker rod pump 1302 that operates to draw a multiphase or mixed fluid from a well bottom 1306 and discharge the fluid at a well top 1304. The sucker rod pump 1302 includes a drive mechanism that converts rotary motion to reciprocating motion at an end of a walking beam 1308. The walking beam 1308 is connected to a rod string 1310 such that the reciprocating motion of the walking beam 1308 is transferred to the rod string 1310. The rod string 1310 extends from the walking beam 1308 down to the well bottom 1306 where it connects to a pump 1314 that reciprocates within a casing 1322. The pump 1314 cooperates with one or more valves at the well bottom 1306 to facilitate the lifting of the multiphase or mixed fluid from the well bottom 1306 for delivery to the well top 1304 as is well known in the art.

[0098] In some constructions, a load cell 1320 is coupled to the rod string 1310 to measure the load on the rod string 1310 during a pumping cycle. As illustrated in FIG. 14 this data can be plotted graphically as a function of the position of the walking beam and more particularly the position of the end of the walking beam to which the rod string 1310 is connected. As can be seen in FIG. 14 the zero position can be the lower most position or the uppermost position of the end of the walking beam 1308 with the opposite end being the maximum position in the graph. With this arrangement, two loads are measured at each position, one load on a suction or upward stroke (the suction load 1402 in FIG. 14) and one load measured during the return or downward stroke (the return load 1404 in FIG. 14). This data is sometimes referred to as a surface dynacard (sometimes referred to as a dynamometer card) and is not a single time-series value but rather the graph of the rod load versus the beam position as illustrated in FIG. 14. In most constructions, the rod load data is sampled at intervals between 20 ms and 100 ms with other sampling rates being possible.

[0099] In addition to the load cell 1320, other instrumentation may be provided to measure a pressure within the casing 1322 (casing pressure), a pressure within the tube 1312 (tube pressure), a temperature of the fluid being pumped (i.e., the multiphase fluid), the number of pump strokes per minute (reciprocating frequency), and other data needed to calculate a volumetric efficiency. In addition, the load cell can be used to determine a minimum load per stroke and a maximum load per stroke. Docket No. 202117353

[0100] The load cell 1320 may be used alone or in conjunction with other measured data to produce dynacard data which can form the input for a soft sensor 1510 (shown in FIG. 15) that provides bottom hole input conditions (i.e., a subsurface dynacard). As used herein, the term “soft sensor” or virtual sensor is a common name for software where several measurements are processed together. There may be dozens or even hundreds of measurements. The interaction of the signals can be used for calculating new quantities that need not be measured. Soft sensors are especially useful in data fusion, where measurements of different characteristics and dynamics are combined. Several soft sensors may be available in the well system 1300. One or more soft sensors as well as surface dynacard data and other sensor data (i.e., at least a portion of the soft sensing input data 1508) may be used as input conditions for training a machine-learning model or Al-based pump model, and for calculating or predicating results (i.e., soft sensing output data or soft sensor 1510) using the machine- learning model or AI- based pump model. The output of the machine-learning model or Al-based pump model (i.e., the soft sensor 1510 or soft sensing output data) is then ultimately used as an input to the data driven virtual flow meter 114 discussed with regards to FIG. 1 through FIG. 12 to calculate a multiphase flow composition coming from the well system 1300.

[0101] To develop the soft sensor 1510 for use with the virtual flow meter 114, existing operating data, sensor data 1502, and/or well data 1504 is employed. The available and calculated data (i.e., soft sensor data or soft sensor input data) is used in two ways, first for training the machine-learning model or Al-based pump model, and second for calculating or predicating results. For training, datasets are constructed from different data sources by combining the surface dynacards with other data such as pumping stroke and rate, pump size, rod size, wellbore and reservoir parameters as inputs and the corresponded production rate or production rates for individual flows as targets or flow results. After training, the same input data sources are employed as inputs to the machine-learning model or Al-based pump model which then operates to calculate or predict the production rate for a single flow or production rates for individual flows for each individual stroke of the sucker rod pump 1302.

[0102] The machine-learning model or Al-based pump model contains two neural networks. A deep autoencoder extracts the feature representations from all the surface dynacards, and a neural network combines all the related features to predict the real-time production flow rate (either multiphase or individual single-phase flows) at the well bottom 1306 (i.e., at least a Docket No. 202117353 portion of the soft sensing data 1508). More specifically, the autoencoder extracts feature representations for each surface dynacard with each dynacard representing a single stroke of the pump. The neural network uses the data from the autoencoder and corresponding flow results during the training phase and predicts or calculates the flow results after training.

[0103] Typical input data required for carrying out virtual flow metering could include the surface dynacard data (i.e., load versus walking beam position), casing pressure, tubing pressure, temperature of the fluid being pumped, and the ambient temperature, collectively referred to as sensor data 1502. Temperature and pressure data may be measured at intervals of once per minute while the dynacard data is preferable measured at intervals between 20 ms and 100 ms with other rates being possible. Other information such as physical characteristics of the well or well data 1504 may also be used. This other data includes data related to the pump type, the pump geometry, the rod geometry, the pump setting depth, the tube diameter, and the well path (i.e., inclination, azimuth).

[0104] From the surface dynacard an experienced user can detect a change in the pumping behavior, but it is normally not possible to map from the shape of the surface dynacard (i.e., the graph of FIG. 14) directly what the impact is on the flow rate represented by liquid displaced by the subsurface pump 1314 (i.e., at the well bottom 1306).

[0105] The first step in developing the soft sensor 1510 (which includes a subsurface dynacard or a downhole dynacard) is to transform the measured load values from the load cell 1320 into one or more subsurface dynacards that describe what happens at the bottom subsurface pump 1314. In preferred systems, load values for a stroke are used in one and only one surface dynacard such that no load value is mapped into two different surface dynacards. This transformation can usually be obtained by either resolving wave equations or more precisely a finite element calculation can be used that models the exact behavior of the rod string 1310 which links the subsurface pump 1314 with the walking beam 1308. It should be noted that other means are available to gather the data provided by the load cell 1320. As such, the arrangement is not limited to a load cell 1320. For example, other constructions could replace the load cell 1320 with a soft sensor that determines the necessary data based on other measurements such as the power consumed by the prime mover (i.e., motor or engine driving the sucker rod pump 1302 or a torque and speed measurement taken at some point between the prime mover and the sucker rod pump 1302 (i.e., within a transmission arrangement). Docket No. 202117353

[0106] The derived subsurface (downhole) dynacard may be used to calculate relevant key performance indicators that represent a real physical behavior at the pump 1314. Possible key performance indicators include volumetric efficiency using net pump stroke, gross pump stroke, minimum load at the pump 1314, and maximum load at the pump 1314. These data points are calculated for each stroke and can therefore be used as an input for training of a virtual flow model and during runtime for making calculations of the various flows (e.g., multiphase flow or each individual flow of the multiphase fluid) from the pump 1314.

[0107] An edge device may be employed as a preprocessor 1506 to do preprocessing for a 2D or 3D finite element calculation for the rod string 1310 used in the well system 1300. The derived subsurface card results and any additional key performance indicators, whether measured or calculated are then provided as an input to the virtual flow model.

[0108] Various data features, or parameters are extracted and resampled for every pump stroke and therefore the calculated subsurface key performance parameters on min/max load as well as gross pump stroke and net liquid stroke give a very precise input value (soft sensing data 1508) of what the pump 1314 delivers at a given point in time which results in a flow output or flow change. Once the soft sensing data 1508 is calculated, it is either sent to the central server where it is used along with other instrumentation like tubing/casing pressure and additional temperature data for calculation of virtual flow using machine learning models, or the complete virtual flow model solution is enabled on the edge device and flowrates for all three phases are directly calculated as discussed above. Use of this result is then either available for more autonomous operation at the well system 1300 (using edge technology) or via a central server.

[0109] Use of soft sensors 1510 as inputs to the virtual flow model and reconstruction error model provide much more robust features applicable over the entire range of input data to be used for model training as well as for calculations. Applying the complete virtual flow model using the soft sensing data 1508 instead of direct data from the load cell 1320 enables an autonomous solution which can be deployed on a cloud or edge device without intervention from a domain expert or data scientist. Implementation of the complete solution on an edge computing device reduces the total throughput of data to be sent to the central servers. In addition, the described system provides improved accuracy by using high frequency dynacard information, as compared to the traditional methodology of storing only a few dynacards per Docket No. 202117353 day which is often done to reduce network traffic, processing power onsite and data storage requirements. The traditional approach does not reflect flow changes during the periods where no dynacards are recorded and evaluated. Thus, the traditional approach is more of an estimate (assuming constant flow between two measurements) whereas the described system calculates exact input values for each stroke and therefore takes the flow contribution of each individual stroke into account.

[0110] FIG. 15 schematically illustrates a simplification of the system and process described with regard to FIG. 13 and FIG. 14. The sensor data 1502 includes data that is measured periodically and that potentially changes over time. As discussed with regard to FIG. 13, the data can be measured at many different rates as may be desired. The well data 1504 generally includes data that does not vary with time. Data such as the pump type or the tube diameter are generally fixed and do not change frequently. The sensor data 1502 and the well data 1504 are provided to the preprocessor 1506 where they are used in conjunction with known flows from the pump 1314 to initially train an autoencoder or other Al-based device. Once trained, the autoencoder or other Al-device can use the sensor data 1502 and the well data 1504 to predict the soft sensing data 1508 (or soft sensor value) with each stroke of the pump 1314. The soft sensing data 1508 may then be used as inputs to a virtual flow model as discussed with regard to FIG. 1 through FIG. 12 to accurately predict the flow values for a multiphase flow, and in particular a three-phase flow (e.g., natural gas, oil, and water).

[0111] Although an exemplary embodiment of the present disclosure has been described in detail, those skilled in the art will understand that various changes, substitutions, variations, and improvements disclosed herein may be made without departing from the spirit and scope of the disclosure in its broadest form.

[0112] None of the description in the present application should be read as implying that any particular element, step, act, or function is an essential element, which must be included in the claim scope: the scope of patented subject matter is defined only by the allowed claims. Moreover, none of these claims are intended to invoke a means plus function claim construction unless the exact words "means for" are followed by a participle.