Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
VIRTUAL FLOW METER WITH DOMAIN SPECIFIC INPUT FEATURES
Document Type and Number:
WIPO Patent Application WO/2024/041726
Kind Code:
A1
Abstract:
A method of improving prediction accuracy of well flow values generated by a data driven virtual flow meter using flow features derived from well operating data.

Inventors:
MITTAL AKASH (IN)
VENUGOPAL ASWIN (IN)
WIMMER HELMUT (AT)
Application Number:
PCT/EP2022/073409
Publication Date:
February 29, 2024
Filing Date:
August 23, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SIEMENS ENERGY GLOBAL GMBH & CO KG (DE)
International Classes:
E21B47/10; E21B43/34
Foreign References:
US20210089905A12021-03-25
Other References:
BIKMUKHAMETOV TIMUR ET AL: "First Principles and Machine Learning Virtual Flow Metering: A Literature Review", JOURNAL OF PETROLEUM SCIENCE AND ENGINEERING, ELSEVIER, AMSTERDAM, NL, vol. 184, 10 September 2019 (2019-09-10), XP085943968, ISSN: 0920-4105, [retrieved on 20190910], DOI: 10.1016/J.PETROL.2019.106487
Download PDF:
Claims:
CLAIMS

What is claimed is:

1. A method of improving prediction accuracy of flow values from a well for a mixed fluid flow using a data driven virtual flow meter, the method comprising: receiving operating data from the well, the operating data indicative of current operating parameters of the well, the data comprising at least a first system pressure and a second system pressure of the well; determining, from the operating data, when the well is fluidically connected to a separator and is disconnected from the separator; calculating a first on-separator differential pressure from the system pressures received when the well is determined to be fluidically connected to the separator; calculating a first on-flow feature from the first on-separator differential pressure when the well is determined to be fluidically connected to the separator; using the first on-flow feature to train an Al-based flow model; generating an Al-based on-separator trained flow model; and using the Al-based on-separator trained flow model with the operating data from the well to predict an off-separator first flow value of the first fluid and an off- separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

2. The method of claim 1, further comprising using the predicated flow value to evaluate a condition of the flow model.

3. The method of claim 1, further comprising: calculating a second on-separator differential pressure from the system pressures received when the well is fluidically connected to a separator; calculating a second on-flow feature from the second on-separator differential pressure when the well is determined to be fluidically connected to the separator; determining a preferred on-flow feature from the first on-flow feature and the second on-flow feature; and using the preferred on-flow feature as the first on-flow feature to train the AI- based flow model.

4. The method of claim 1, wherein the well includes a pump, and wherein the first system pressure comprises a pump outlet pressure.

5. The method of claim 4, wherein the second system pressure comprises a casing pressure.

6. The method of claim 4, wherein the second system pressure comprise a tubing pressure.

7. The method of claim 1, wherein the well includes a pump, and wherein the first system pressure comprises an inlet pressure of the pump and the second system pressure comprises an outlet pressure of the pump.

8. The method of claim 7, wherein the data further comprises an operating frequency of the pump.

9. The method of claim 8, wherein calculating the first on-flow feature further comprises using the operating frequency of the pump.

10. The method of claim 9, wherein calculating the first on-flow feature comprises dividing one thousand times the on-separator differential pressure by the operating frequency squared.

11. The method of claim 9, further comprising: calculating an off-flow feature from an off-separator differential pressure and the operating frequency of the pump when the well is determined to be fluidically disconnected from the separator; calculating a flow feature offset from the first on-flow feature and the off-flow feature; using the Al-based on-separator trained flow model with the flow feature offset and the operating data from the well to predict an off-separator first flow value of the first fluid and an off-separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

12. The method of claim 11, wherein calculating the off-flow feature comprises dividing one thousand times the off-separator differential pressure by the corresponding operating frequency squared.

13. 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 predicting step includes separately predicting the first flow value for oil, the second flow value for natural gas, and a third flow value for water.

14. The method of claim 1, wherein the trained flow model employs an artificial neural network.

15. A computing apparatus comprising: a processor; and a memory storing instructions that, when executed by the processor, configure the apparatus to: receive operating data from the well, the operating data indicative of current operating parameters of the well, the data comprising system at least a first system pressure and a second system pressure of the well; determine, from the operating data, when the well is fluidically connected to a separator and is disconnected from the separator; calculate a first on-separator differential pressure from the system pressures received when the well is determined to be fluidically connected to the separator; calculate a first on-flow feature from the first on-separator differential pressure when the well is determined to be fluidically connected to the separator; use the first on-flow feature to train an Al-based flow model; generate an Al-based on-separator trained flow model; and use the Al-based on-separator trained flow model with the operating data from the well to predict an off-separator first flow value of the first fluid and an off- separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

16. The computing apparatus of claim 15, wherein the first system pressure comprises a pump outlet pressure.

17. The computing apparatus of claim 16, wherein the second system pressure comprises a casing pressure. 18. The computing of claim 16, wherein the second system pressure comprises a tubing pressure pressure.

19. The computing of claim 18, wherein the well includes a pump, and wherein the first system pressure comprises an inlet pressure of the pump and the second system pressure comprises an outlet pressure of the pump. 20. The computing of claim 18, wherein the data further comprises an operating frequency of the pump, and calculating the first on-flow feature further comprises using an operating frequency of the pump.

Description:
VIRTUAL FLOW METER WITH DOMAIN SPECIFIC INPUT FEATURES

BACKGROUND

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

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 are used for measuring these parameters.

BRIEF SUMMARY

In one arrangement, a method of improving prediction accuracy of flow values from a well for a mixed fluid flow using a data driven virtual flow meter, the method includes receiving operating data from the well, the operating data indicative of current operating parameters of the well, the data includes at least a first system pressure and a second system pressure of the well, determining, from the operating data, when the well is fluidically connected to a separator and is disconnected from the separator, calculating a first on-separator differential pressure from the system pressures received when the well is determined to be fluidically connected to the separator, calculating a first on-flow feature from the first on-separator differential pressure when the well is determined to be fluidically connected to the separator, using the first on-flow feature to train an Al-based flow model, generating an Al-based on-separator trained flow model, and using the Al-based on-separator trained flow model with the operating data from the well to predict an off-separator first flow value of the first fluid and an off- separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

In still another aspect, a computing apparatus includes a processor and a memory storing instructions that, when executed by the processor, configure the apparatus to receive operating data from the well, the operating data indicative of current operating parameters of the well, the data includes system at least a first system pressure and a second system pressure of the well, determine, from the operating data, when the well is fluidically connected to a separator and is disconnected from the separator, calculate a first on-separator differential pressure from the system pressures received when the well is determined to be fluidically connected to the separator, calculate a first on-flow feature from the first on-separator differential pressure when the well is determined to be fluidically connected to the separator, use the first on-flow feature to train an AI- based flow model, generate an Al-based on-separator trained flow model, and use the Al-based on-separator trained flow model with the operating data from the well to predict an off-separator first flow value of the first fluid and an off-separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

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.

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

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.

FIG. 1 is a schematic illustration of a resource field including a number of wells. FIG. 2 is a schematic illustration of a portion of a process for collecting a resource from a reservoir.

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

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

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

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

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

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

FIG. 9A graphically illustrates raw training data.

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

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

FIG. 10 illustrates a process for retraining and for making a retraining decision.

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

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

FIG. 13 graphically illustrates exemplary pump operation curves at different frequencies.

FIG. 14 illustrates a routine 1400 in accordance with one embodiment.

FIG. 15 illustrates a routine 1500 in accordance with one embodiment.

FIG. 16 illustrates a routine 1600 in accordance with one embodiment.

DETAILED DESCRIPTION

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.

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.

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, 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- 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.

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.

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.

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 predom- inately 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.

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.

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 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.

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 vir- tual 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.

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.

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.

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 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.

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.

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 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.

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.

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 an automated step for outlier removal 318 which removes outliers in the input data as will be discussed in greater detail.

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 build- ing 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.

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.

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.

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 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 repre- sentation, 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.

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.

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.

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 gradient-based 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.

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 pre-processor 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.

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 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.

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.

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 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.

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.

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.

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.

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.

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 gener- ates 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. 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.

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.

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 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.

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 re- trained flow model 706 produces suitably accurate results. However, other constructions may include semi-automatic initiation or supervised initiation.

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.

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.

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.

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.

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.

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.

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. 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.

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.

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.

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.

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.

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 Al -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.

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.

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 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.

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. The data processing system 1102 may be configured to execute one or more applications 1130 that facilitates the features described herein.

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.

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.

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.

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.

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.

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 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.

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.

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.

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), 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.

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 con- trailers (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.

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.

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.

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.

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 in- terface 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.

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.

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 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.

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.

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.

A typical challenge faced by any data driven model is its applicability in operating ranges outside of the training range. This poses a unique problem in the case for oil wells 120. For example, training/learning of data driven models for oil wells 120 may use historical datasets or measurements taken using three-phase separators/multi-phase flow meters installed in the pipeline/manifold system of the wells 120. During such well-testing period, there may be a change in pressure heads observed among, for example, four main sensors of the well 120, such as tubing pressure, casing pressure, outlet pressure, and differential pressure across a pump, such as the electrical submerged pump 106. This change in pressure head across the electrical submerged pump 106 is typically caused by additional line/manifold/separator pressure drops down- stream of the electrical submerged pump 106. This causes additional complexity while using wells 120 trained on one set of data ranges to carry out predictions on another set of data ranges. For example, as shown in the exemplary pump operation curves 1304 of FIG. 13 for various pump operating frequencies, an electrical submerged pump 106 operating at a relatively higher differential pressure, such as when the well 120 is connected to a downstream separator 302, has a lower flow rate than when the pump 106 is operating at a relatively lower differential pressure, such as when the well 120 is disconnected from a downstream separator 302. Thus, there is a pressure differential offset characteristic of the different pump operating regimes.

The inventors have innovatively realized that the above described tubing pressure, casing pressure, outlet pressure, differential pressure across a pump, and/or, pressure differential offset characteristic of different pump operating regimes can be used as a basis to create one or more virtual flow meter 114 features that allows for using an on- separator trained model when the well is connected to a separator 302 to make more accurate well flow model predictions 606 when the well 120 is disconnected from the separator 302. Although a constant offset may be used for a fixed pump speeds, the inventors have created and developed a variable flow feature offset (described in further detail below) that compensates the virtual flow meter predictions for different pump speeds. Advantageously, the innovative flow feature offset allows virtual flow meter model training without the need to perform additional pump frequency runs, minimizes the number of well tests required, improves model validity when the well is off-separator, and in the case of an offset feature, allows using a single offset feature that is valid across multi-frequency wells as will be described below.

Returning to FIG. 3, the flow feature and/or flow feature offset may be applied to data coming from pre-processor 308 in the feature extraction 310 block for training the untrained flow model 314. The flow feature and/or flow feature offset may be determined in the feature extraction 310 block based on the data from the pre-processor 308 as further described in the flow charts of FIGS. 14 - 16. 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 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 pre- dieted 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.

FIG. 14 illustrates, in a flow chart format, a routine 1400 that may be followed by the virtual flow meter 114 to generate a flow feature that can be used to improve well flow predictions when the well 120 is off-separator. In block 1402, routine 1400 receiving operating data from the well, the operating data indicative of current operating parameters of the well, the data comprising at least a first system pressure and a second system pressure of the well. In block 1404, routine 1400 determines, from the operating data, when the well is fluidically connected to a separator and is disconnected from the separator. In block 1406, routine 1400 calculates a first on-separator differential pressure from the system pressures received when the well is determined to be fluidically connected to the separator. In block 1408, routine 1400 calculates a first on-flow feature from the first on-separator differential pressure when the well is determined to be fluidically connected to the separator. In block 1410, routine 1400 using the first onflow feature to train an Al-based flow model. In block 1412, routine 1400 generates an Al-based on-separator trained flow model. In block 1414, routine 1400 using the AI- based on-separator trained flow model with the operating data from the well to predict an off-separator first flow value of the first fluid and an off-separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator.

In another aspect, the predicated flow value may be used to evaluate a condition of the flow model.

Advantageously, different wells’ models may be applied using different feature sets, such as may be required thru change in operating envelope during measurement versus operating envelope during normal (uninterrupted) production, to improve flow model predictions.

In another aspect, the inventors have innovatively realized that other well system pressures may be used as a basis to create a virtual flow meter 114 feature that allows for using an on-separator trained model to make more accurate flow model predictions 606. For example, it has been observed that both tubing and casing pressure may change by more than 50%, and up to 100%, when well is put on the separator 302 compared to when it is disconnected from the separator 302. The inventors have inno- vatively realized that casing or tube pressure, in conjunction with pump outlet pressure, may be used to calculate a flow feature for improved prediction performance of the virtual flow meter 114. It is believed that this change in pressure head is typically caused by additional line/manifold/separator pressure drops in the ESP downstream. This causes additional complexity while using the wells trained on one set of data range to carry out prediction on another set of data range. In one aspect, establishing a flow feature based on a difference in tubing pressure and pump outlet pressure would help in making the training and prediction data come close from a tube pressure perspective. This tube feature signifies the pressure drop in the tubing which then is independent of the downstream manifold/pipe pressure drops. Similarly, establishing a flow feature based on a difference in casing pressure and pump outlet pressure would help in making the training and prediction data come close from a casing pressure perspective. In exemplary embodiments, the first system pressure in block 1402 may include a pump outlet pressure and the second system pressure may include a casing pressure and/or a tubing pressure. The differential pressure may be calculated as the difference between the pump outlet pressure and the tubing pressure or casing pressure.

Different flow features may be selected for use to improve prediction quality of the virtual flow meter 114. For example, FIG. 15 illustrates, in a flow chart format, a routine 1500 that may be followed by the virtual flow meter 114 to determine a preferred on-flow feature from at least two calculated flow features to train the virtual flow meter 114. In block 1502, routine 1500 calculates a second on-separator differential pressure from the system pressures received when the well is fluidically connected to a separator. In block 1504, routine 1500 calculates a second on-flow feature from the second on-separator differential pressure when the well is determined to be fluidically connected to the separator. In block 1506, routine 1500 determines a preferred on-flow feature from the first on-flow feature and the second on-flow feature. In block 1508, routine 1500 uses the preferred on-flow feature as the first on-flow feature to train the Al-based flow model.

In yet another aspect, the offset determination for different wells may be automated. For example, when using the flow feature with the offset, one restriction it poses is that the offset needs to be determined for each well. The offset will depend on the well downstream configuration. Data driven methodology may be used to extract the offset while training the models. For example, this may be achieved by using the historical data during periods when well is On separator and when well is OFF separator. During the training of the models, first the data is pre-processed, outliers removed, and then the flow feature is computed. Typically from separator data, periods of well test can be identified. That information may be used to extract flow feature values during well tests and during normal operations. The difference is automatically extracted. The same methodology may also be used during model retraining (for example, triggered by automatic event driven pipelines), which is crucial in case there is change in the well downstream configuration, or a change in the operating state/condition of equipment like control valve, pipes or separator.

When computing an offset, sensed pump pressures, such as from an ESP, may be used. For example, the first system pressure of block 1402 may include an inlet pressure of the pump and the second system pressure may include an outlet pressure of the pump. The data received in block 1402 may include an operating frequency of the pump. The method in routine 1400 may also include calculating the first on-flow feature using the operating frequency of the pump.

In an embodiment, FIG. 16 illustrates, in a flow chart format, a routine 1600 that may be followed by the virtual flow meter 114 to calculate a flow feature offset to train the virtual flow meter 114. In block 1602, routine 1600 calculates an off-flow feature from an off-separator differential pressure and the operating frequency of the pump when the well is determined to be fluidically disconnected from the separator. In block 1604, routine 1600 calculates a flow feature offset from the first on-flow feature and the off-flow feature. In block 1606, routine 1600 using the Al-based on-separator trained flow model with the flow feature offset and the operating data from the well to predict an off-separator first flow value of the first fluid and an off-separator second flow value of the second fluid, the first fluid and the second fluid being mixed together as part of the mixed fluid flow when the well is fluidically disconnected from the separator. In an aspect, calculating the first on-flow feature may include dividing one thousand times the on-separator differential pressure by the operating frequency squared. In another aspect, calculating the off-flow feature may include dividing one thousand times the off-separator differential pressure by the corresponding operating frequency squared. 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.

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.

LISTING OF DRAWING ELEMENTS

100 resource field

102 surface

104 resource

106 electrical submerged pump

108 well bore

110 well head

112 pipeline

114 virtual flow meter

116 artificial lift device

118 choke valve

120 well

202 reservoir

204a well 204b well

204c well

204d well

206a manifold

206b manifold

208a separator

208b separator

210 first fluid reservoir

212 second fluid reservoir

214 third fluid reservoir

300 data pipeline

302 separator

304 operational data

306 autoencoder

308 pre-processor

310 feature extraction

312 model training

314 untrained flow model

316 trained flow model

318 outlier removal

320 cross-validation step 322 reconstruction error model

500 adaptive outlier removal process

502 local minimum

602 reconstruction error

604 well data

606 flow model prediction

702 retraining decision

704 new well test

706 retrained flow model

708 retrained reconstruction error model

710 model retraining process

800 training process

802 outlier removal step

804 clustering step

806 sample data extraction step

808 autoencoder training

810 autoencoder testing

902 raw data

904 clean data

906 preprocessed training data

1000 routine 1002 block

1004 block

1006 block

1008 block

1010 block

1012 block

1014 block

1016 block

1100 computer system

1102 data processing system

1104 data store

1106 data 1

1108 data 2

1110 data 3

1112 display device

1114 input device

1116 processor

1118 processor memory

1120 storage device

1122 first object

1124 second object 1126 memory

1128 executable instructions

1130 applications

1200 data processing system

1202 bridges/buses/controllers

1204 graphics controller

1206 output device

1208 other hardware

1210 storage controller

1212 I/O controllers

1214 communication controller

1216 operating system

1218 database

1220 data

1222 network

1224 server

1302 pump curve

1304 pump operation curves

1306 differential pressure

1308 higher differential pressure

1310 lower differential pressure 1312 pressure differential offset

1400 routine

1402 block

1404 block

1406 block

1408 block

1410 block

1412 block

1414 block

1500 routine

1502 block

1504 block

1506 block

1508 block

1600 routine

1602 block

1604 block

1606 block