Patent application title:

Machine Learning Assisted Downhole Multiphase Flowmeter

Publication number:

US20260125977A1

Publication date:
Application number:

18/942,130

Filed date:

2024-11-08

Smart Summary: A system measures fluid flow in a well using a flowmeter that collects data like pressure, temperature, and speed. It checks if any of these measurements are of low quality. For those low-quality measurements, the system uses high-quality data and a special type of artificial intelligence called Long Short-Term Memory (LSTM) to make predictions. These predictions help fill in the gaps for the low-quality data. Finally, the system uses both the predicted and high-quality values to calculate the flow rates of different components in the fluid. 🚀 TL;DR

Abstract:

To characterize fluid flow in a conduit disposed in a wellbore, a system obtains a time series of flow values of the fluid flow measured in real-time using a flowmeter. The flow values at least include pressure, temperature, bulk velocity, and speed of sound. The system determines whether any of the flow values at each step in the time series is of low-quality having a quality below a threshold. Any other flow values in the step may be of high-quality. Using the high-quality values and a Long Short-Term Memory (LSTM) neural network, the system predicts a respective predicted value for each low-quality value at each step in the time series. Based on the respective predicted values and the high-quality values, the system calculates flow rates of multiphase components in the fluid flow at the at least one location.

Inventors:

Applicant:

Interested in similar patents?

Get notified when new applications in this technology area are published.

Classification:

E21B47/114 »  CPC main

Survey of boreholes or wells; Locating fluid leaks, intrusions or movements using electrical indications; using light radiations using light radiation

E21B2200/22 »  CPC further

Special features related to earth drilling for obtaining oil, gas or water Fuzzy logic, artificial intelligence, neural networks or the like

E21B47/113 IPC

Survey of boreholes or wells; Locating fluid leaks, intrusions or movements using electrical indications; using light radiations

Description

This application claims the benefit of U.S. Provisional Appl. 63/717,338 filed Nov. 7, 2024, which is incorporated herein by reference.

BACKGROUND OF THE DISCLOSURE

In the petroleum industry, as in many other industries, the ability to monitor flow of fluids in process pipes in real-time offers considerable value. Oil and gas operators measure individual oil, water, and/or gas flow rates within an overall production flow stream containing a mixture of these three phase components. This information may be used to improve and optimize well production, allocate royalties, prevent corrosion based on the amount of water, and/or determine the well performance.

Production from wells can vary over time, and production tends to reduce as the flow rate decreases. Various flowmeters in the art may provide flow rate measurements or determinations as long as the flow rates are above a sufficient velocity. For example, determining the phase flow rates in a 3-phase flow may use several measurements, including measuring speed of sound (SoS). Distributed acoustic sensing (DAS) is one technology that may be used in measuring flow in wells. A DAS system is usually capable of measuring SoS. Additionally, a DAS system may also be capable of measuring flow velocity depending on its installation, configuration, and the type of application.

In another example, an in-well optical flowmeter (OFM) may be used to accurately measure 1- and 2-phase flows by measuring flow velocity and speed of sound (SoS). Such an OFM is typically unable to accurately measure 3-phase flows without the use of secondary pressure and temperature sensors, which may be separated from the optical flowmeter, and which are used to predict the density of the fluid mixture. The measurements of flow velocity, the SoS, and the mixture density are sufficient for solving 3-phase flows. However, the 3-phase solution from such a system has been found to be inaccurate when the velocity decreases or the SoS measurement fades out as production rates decline.

Although current techniques may be useful, the subject matter of the present disclosure is directed to improving measurements and analysis for a downhole multiphase flowmeter.

SUMMARY OF THE DISCLOSURE

According to the present disclosure, a method is directed to characterizing fluid flow in a conduit disposed in a wellbore. The method comprises: obtaining, at a processing system, a time series of flow values of the fluid flow measured in real-time at at least one location in the conduit using at least one flowmeter; determining, at the processing system, that any given one or more of the flow values at any given time step in the time series is a low-quality value of low-quality, each of any remaining ones of the flow values at the given time step being a high-quality value of high-quality; predicting, at the processing system based on the high-quality values in the time series, a respective predicted value for each low-quality value at each given time step in the time series; and calculating, at the processing system based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.

In the method, obtaining the time series of the flow values can comprise obtaining, at each time step in the time series, the flow values at least including a pressure value, a temperature value, a bulk velocity value, and a speed of sound (SoS) value associated with the fluid flow. Also, determining that the any given one or more of the flow values is of low-quality can comprise determining that any of at least one of the bulk velocity value and the SoS value is of low-quality having a respective quality below a respective threshold. In this instance, determining that the SoS value is of low-quality can comprise determining that at least one of: (i) a speed of sound (SoS+) of waves opposite to a flow direction of the fluid flow and (ii) a speed of sound (SoS−) of waves in the flow direction has the respective quality below the respective threshold.

In the method, calculating the flow rates of the multiphase components in the fluid flow can comprise calculating a total flow rate and calculating phase flow rates of one or more of oil, water, and gas.

The method can further comprise at least one of: adjusting well production based on the calculated flow rates; adjusting zonal production in a multi-zone well based on the calculated flow rates; adjusting one or more inflow control devices on the conduit in the wellbore based on the calculated flow rates; allocating production quantities based on the calculated flow rates; and preventing corrosion based on the calculated flow rates.

In a first arrangement of the method, determining the quality can comprise detecting a data gap in the time steps of the time series having the any given one or more of the flow values determined to be of low-quality. For instance, predicting the respective predicted value for each low-quality value at each given time step in the time series can comprise forward modeling, in real-time processing of the time steps in the time series of the data gap, the respective predicted value for each low-quality value in each given time step.

In one example, forward modeling can comprise using a Long Short-Term Memory (LSTM) neural network. In another example, forward modeling can comprise: encoding a memory cell, a hidden state, and a predicted value set based on the high-quality values in an input sequence in the time series before the data gap; and decoding, for each current time step from a start time step to a later time step in the time series of the data gap, by successively performing the acts of: inputting a current value set of the flow values for the current time step; inputting a predicted value set forwarded from a previous time step; producing an updated value set by replacing each low-quality value of the current value set with each predicted value of the forwarded predicted value set; updating the memory cell and the hidden state based on the updated value set; and outputting a predicted value set for forwarding to a successive time step up until completion.

In the first arrangement of the method, predicting the respective predicted value for each low-quality value at each time step in the time series can comprise backward modeling, in post processing of the time steps in the time series of the data gap, the respective predicted value for each low-quality value in each given time step.

In one example, backward modeling can comprise using a Long Short-Term Memory (LSTM) neural network. In another example, backward modeling can comprise: encoding a memory cell, a hidden state, and a predicted value set based on the high-quality values in an input sequence in the time series after the data gap; and decoding, for each current time step from a last time step to a first time step in the time series of the data gap, by successively performing the acts of: inputting a current value set of the flow values for the current time step; inputting a predicted value set back fed from a later time step; producing an updated value set by replacing each low-quality value of the current value set with each predicted value of the back fed predicted value set; updating the memory cell and the hidden state based on the updated value set; and outputting a predicted value set for back feeding to an earlier time step up until completion.

In a second arrangement of the method, calculating the flow rates of the multiphase components in the fluid flow being oil/water two-phase (liquid/liquid) flow can comprise: calculating a speed of sound (SoS) in an infinite medium based on the Wood equation, the Korteweg-Lamb equation, and first parameters, the first parameters including a temperature value and a pressure value from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value being of low quality, otherwise the SoS parameter being the SoS value of high-quality; and determining a water-in-liquid ratio (WLR) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties of the multiphase components in the fluid flow.

In this instance, calculating the flow rates can comprise: calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and calculating phase flow rates (Qoil, Qwater) for the oil/water two-phase (liquid/liquid) flow based on the determined WLR and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

Moreover, the method in the second arrangement can further comprise determining the single-phase properties of the multiphase components of the fluid flow based on an analysis of a bottomhole fluid sample.

In a third arrangement of the method, calculating the flow rates of the multiphase components in the fluid flow being oil/gas two-phase (gas/liquid) flow can comprise: calculating a speed of sound (SoS) in an infinite medium based on the Wood equation, the Korteweg-Lamb equation, and first parameters, the first parameters including a temperature value and a pressure value from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value being of low quality, otherwise the SoS parameter being the SoS value of high-quality; and determining a liquid volume fraction (LVF) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties of the multiphase components in the fluid flow.

In this instance, wherein calculating the flow rates can comprise: calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and calculating phase flow rates (Qgas, Qoil) for the gas/oil two-phase (gas/liquid) flow based on the determined LVF and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

Furthermore, the method in this third arrangement can further comprise determining the single-phase properties of the multiphase components of the fluid flow based on an analysis of a bottomhole fluid sample.

The method can further comprise sensing the flow values by using an optical flowmeter for the at least one flowmeter. For example, sensing the flow values can further comprise using a distributed acoustic sensing (DAS) system, the DAS system being communicatively coupled to a first optical waveguide of the optical flowmeter or having a second optical waveguide separate from the optical flowmeter.

According to the present disclosure, a non-transitory computer-readable medium comprises instructions executable by a processing system to perform operations to characterize fluid flow in a conduit disposed in a wellbore, such as discussed above. In particular, the operations can comprise: obtaining a time series of flow values of the fluid flow measured in real-time using at least one flowmeter at at least one location in the conduit; determining, at each time step in the time series, that any one or more of the flow values is of low-quality as a low-quality value, any remaining ones of the flow values each being a high-quality value of high-quality; predicting, based on the high-quality values in the time series, a respective predicted value for each low-quality value at each time step in the time series; and calculating, based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.

A system according to the present disclosure is used to characterize fluid flow in a conduit disposed in a wellbore. The system comprises an apparatus and a processing system. The apparatus is disposed on the conduit in the wellbore. The apparatus is configured to measure a time series of flow values of the fluid flow in real-time at at least one location in the conduit. The processing system is in communication with the apparatus and is configured to perform a method as described above. In particular, the processing system is configured to: obtain the time series of the flow values; determine, at each time step in the time series, that any given one or more of the flow values is a low-quality value of low-quality, any remaining ones of the flow values each being a high-quality value of high-quality; predict, based on the high-quality values in the time series, a respective predicted value for each low-quality value at each time step in the time series; and calculate, based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.

The foregoing summary is not intended to summarize each potential embodiment or every aspect of the present disclosure.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 illustrates a monitoring system that may be utilized to perform multiphase flow rate measurements according to aspects of the present disclosure.

FIG. 2 illustrates a data set in which a data gap occurs.

FIG. 3 illustrates a monitoring process in flowchart form.

FIG. 4 illustrates an example diagram of a Long Short-Term Memory model for the present disclosure.

FIG. 5 illustrates a Forward model having encoder units and decoder units for a machine learning model according to the present disclosure.

FIG. 6A illustrates an encoder unit.

FIG. 6B illustrates a decoder unit.

FIG. 7 illustrates a Backward model for a machine learning model according to the present disclosure.

FIG. 8 illustrates a Deep Forward model for a machine learning model according to the present disclosure.

FIG. 9 illustrates a Deep Backward model for a machine learning model according to the present disclosure.

FIG. 10 illustrates a process for training and deploying a deep neural network.

FIG. 11 illustrates an example optical flowmeter for use with the disclosed monitoring system.

FIG. 12A illustrates an example distributed acoustic sensing (DAS) sensor in a coiled or helical configuration for use with the disclosed monitoring system.

FIG. 12B illustrates an example DAS sensor in a linear configuration for use with the disclosed monitoring system.

FIG. 13 illustrates an example Venturi flowmeter for use with the disclosed monitoring system.

FIG. 14 illustrates an example differential pressure (DP) gauge for use with the disclosed monitoring system.

DETAILED DESCRIPTION

FIG. 1 illustrates a monitoring system 30 to perform multiphase flow rate measurements of a fluid mixture flow F (i.e., a fluid flow) in a conduit 20 of a wellbore completion 10. The conduit 20 may be production tubing disposed in the wellbore 12. Additional downhole tools and devices (not shown) may be disposed downhole on the conduit 20 in the wellbore 12. For example, inflow control devices (not shown) can be disposed on the conduit 20 to control the introduction of production fluid into the conduit 20 from different zones of the wellbore 12 and surrounding formation. The production fluid flows through the conduit 20 to the wellhead 14 at surface to be produced.

During production, operators want to monitor the fluid flow. As illustrated, the monitoring system 30 includes surface electronics 34, a plurality of downhole sensors 32, and a processing system 50. The monitoring system 30 may also include one or more surface sensors (not shown), such as a pressure sensor, a temperature sensor, etc. at a wellhead 14 or a separator of the well.

In one arrangement, the downhole sensors 32 include one or more downhole sensing units 40A-B having sensors to measure speed of sound (SoS), bulk fluid velocity, pressure, and temperature in the fluid flow in the conduit 20. For example, one downhole sensing unit 40A (i.e., flowmeter unit 40A or simply “flowmeter”) can have a first section 41a with pressure and temperature sensors 42, 44 and can have a second section 41b with a flowmeter 45, which includes sensors 46, 48 for measuring the bulk velocity and the SoS in the fluid flow.

In particular, the downhole flowmeter unit 40A can have a pressure sensor 42 (e.g., a static pressure sensor) and a temperature sensor 44 disposed in the first section 41a. The pressure sensor 42 can measure pressure at a point 43 in the fluid mixture within the conduit 20, and the temperature sensor 44 can measure temperature of the fluid mixture at or near the same point 43 at which the pressure is sensed within the conduit 20 by the pressure sensor 42. Although one of each sensor 42, 44 is shown, more than one can be used for each.

The pressure sensor 42 may be any suitable type of sensor that measures pressure directly, such as a diaphragm configured to flex and apply a force to an optical fiber within the downhole flowmeter unit 40A. For its part, the temperature sensor 44 may be any suitable type of sensor that measures the mixture's temperature. The pressure and temperature measurements obtained by the sensors 42, 44 are used to quantify the density and viscosity of multiphase components (i.e., oil, water, and gas phases) of the fluid mixture. The component density and viscosity of the oil, water, and gas phases are then used in an iterative algorithm, which is explained in more detail below.

In the second section 41b, the downhole flowmeter unit 40A includes the flowmeter 45, having a fluid bulk velocity sensor 46 and an SoS meter 48. The fluid bulk velocity sensor 46 measures a bulk velocity of the flowing fluid mixture. As discussed herein, the bulk velocity of the flowing fluid mixture may be used in calculating flow rates for the 3-phase flow. The SoS meter 48 obtains measurements of the speed of sound (SoS) in the fluid mixture. In some cases, either one or both of the bulk velocity sensor 46 and the SoS meter 48 may include a pressure sensor array. These sensors 46 and 48 can use sensor arrangements as disclosed herein and as known and used in the art.

An example of the SoS meter 48 includes two or more sensing elements that form an array. Spacing between the sensing elements sense acoustic signals traveling at the SoS through the fluid flow F within the conduit 20 (referred to as “acoustic sensing”). Spacing between the sensing elements also sense short duration local pressure variations traveling with the fluid flow (referred to as “flow velocity sensing”). The acoustic signals and/or the local pressure variations commonly originate from naturally occurring phenomena. In some configurations, the sensing elements may be formed with optical waveguide 36 in the flowmeter 45 within the conduit 20. Other pressure-measuring devices, such as piezoelectric- or polyvinylidene fluoride (PVDF)-based detectors, may also be used.

As noted, the flowmeter 45 in the unit 40A can be an optical flowmeter. (FIG. 11 discussed much further below illustrates an example optical flowmeter, which can be used with the disclosed monitoring system 30.) The optical flowmeter 45 is typically deployed with primary pressure and temperature sensors 42, 44 and can measure two-phase flow downhole, acting as a local “two-phase” optical flowmeter 40A. (The use of the term “local” here contrasts with “global” or “distributed” form of measurements, such as produced by a distributed acoustic sensing (DAS) system.) When used in conjunction with secondary pressure and temperature sensors (not shown) located with some vertical distance from the primary pressure and temperature sensors 42, 44, the “two-phase” optical flowmeter 40A is capable of measuring three-phase flow for wells where the gas volume fraction (GVF) is up to about 30%. For example, the “two-phase” optical flowmeter 40A typically integrates a primary P/T sensor gauge (e.g., sensors 42, 44) and the flow sensors (e.g., 46, 48). To measure three-phase flow, secondary temperature and pressure sensors (e.g., a secondary P/T gauge) are used to calculate the density of the fluid mixture between the two pressure gauges. For a vertical configuration, for instance, the secondary P/T gauge is placed vertically above the primary P/T gauge (within the order of 100 m). In this vertical configuration, the pressure difference is balanced by both the weight of the fluid and the friction force that the pipe exerts onto the fluid between the gauges. For a horizontal configuration, for instance, the secondary P/T gauge is placed along the horizontal section with a larger separation (within the order of several hundred meters) from the primary P/T gauge. In this horizontal configuration, the pressure difference is balanced by the friction force only, so the separation distance between the two P/T gauges must be larger. The larger distance increases the friction on the fluid so the frictional force can be measured with appropriate resolution. Details of horizontal frictional force measurement for three-phase flow are given in U.S. Pat. No. 9,383,476 as well as in conference paper SPE-164854-MS.

Although illustrated with an optical flowmeter 45 in FIG. 1, the monitoring system 30 is not so limited. The techniques disclosed here for an optical flowmeter 45 can be equally applicable to a DAS sensing system, or a combination of DAS sensing system and optical flowmeter 45. The disclosed techniques can also be applicable to sensing systems with electronic sensing capabilities.

For example, the monitoring system 30 can use a sound measurement system 40B (electronic or optical) for determining a fluid flow rate in an alternative to the optical flowmeter 45 or in addition thereto. One such sound measurement system includes a distributed acoustic sensing (DAS) system 40B, which can be connected to the optical waveguide 36 of the optical flowmeter 45 or can have its own optical waveguide. (FIGS. 10A and 10B discussed much further below illustrate example DAS sensors in a coiled or helical configuration and in a linear configuration for use with the disclosed monitoring system 30.)

Advantageously, DAS instruments can be used with optical sensors in the optoelectronic instruments of the surface electronics 34 used with the optical flowmeter 45. Accordingly, the DAS system 40B and the optical flowmeter 45 in the unit 40A can be operated simultaneously using the same optoelectronic instruments of the surface electronics 34 and the same fiber line for the waveguide 36. Precise local flow measurement from the optical flowmeter 45 in the unit 40A and global multi-measurement capability from the DAS system 40B can therefore be integrated together.

Although the monitoring system 30 is described herein using data from optical sensors, the implementation of the monitoring system 30 is independent of the sensor type. Accordingly, the teachings of the present disclosure can be applied to electronic-based sensors as well. Moreover, the one or more flowmeters 40A-B of the disclosed monitoring system 30 may use a Venturi type device, which is typically suitable for single-phase flows. (FIG. 11 discussed much further below shows a Venturi type device.)

As shown, the processing system 50 includes a machine learning model 60 and includes algorithms for analytic solutions 70 operating on a processing unit (e.g., a computer system 80 having one or more processors 82 and memory 84) to provide results 90 for multiphase flow rates of the downhole flow in the conduit 20. Processing as disclosed herein can be performed at surface using the processing system 50. Additionally, at least some processing can be performed remotely using a remote processing system (not shown) or can be performed downhole using processing capabilities of the flowmeters 40A-B.

During operation, the in-well optical flowmeter 45 provides local flow measurements 52 in real-time at consistent time intervals (e.g., every 90 seconds). (Any of the other flowmeter(s) 40B can also provide measurements 52.) For example, the optical flowmeter 45 tracks the motion of eddies in turbulent flow and provides a velocity (V) measurement, which is necessary to determine the total flow rate of the fluid mixture. The optical flowmeter 45 also tracks the propagating sound waves within the fluid medium and provides a speed of sound (SoS) measurement, which characterizes phase fraction information in two-phase flow. The pressure (P) measurement and the temperature (T) measurement are used to determine correct properties of the fluids as well as the correct SoS of the phases constituting the fluid mixture.

The processing system 50 receives the downhole measurements 52 for analysis. In particular, the surface electronics 34 of the monitoring system 30 receives signals conveying the downhole measurements from the downhole sensors 40 (i.e., pressure sensor 42, temperature sensor 44, optical flowmeter 45, etc.) and optionally from sensors at the wellhead 14 via one or more cables 16. The cables 16 may, for example, include optical waveguides and/or electric wires.

During steady-state (standard or normal) operation, the measurements 52 of bulk velocity (V), speed of sound of waves opposite to flow direction (SoS+), speed of sound of waves in flow direction (SoS−), pressure (P), and temperature (T) are sufficient for the processing system 50 to resolve the two-phase flow. There is, however, a minimum flow rate below which the measurement capabilities degrade. In particular, reduced strain (i.e., reduced signal-to-noise ratio) on the pipe wall of the optical flowmeter 45 occurs during lower flow rates. As a result, when the production rate falls below a certain value in the wellbore 12, the dynamic measurements 52 for bulk velocity (V) and/or speed of sound (SoS) are not always available from the optical flowmeter 45 for the processing system 50 to use in its determinations. If one of these dynamic measurements 52 for V and/or SoS is not available, the processing system 50 cannot calculate the phase flow rates (i.e., flow rates for oil, water, gas). Other flowmeter units (e.g., 40B) may also have their own limitations to the measurement capabilities at lower flow rates.

For instance, the one or more flowmeters (e.g., optical flowmeter 45 and/or DAS arrangement—e.g., 40B) make flow measurements as a passive type of sensor because the optical waveguide 36 in the optical flowmeter 45 is wrapped outside the tubing or the optical waveguide in the DAS arrangement 40B is clamped onto the tubing. Making flow measurements with these passive sensors can be challenging during low velocity of the fluid when the production rates are low. Under these lower flow conditions, tracking of eddies in turbulent flow or propagation of sound waves through the fluid becomes challenging due to the smaller strains on the pipe wall of the tubing of the flowmeters (e.g., optical flowmeter 45 and/or DAS arrangement—e.g., 40B). As a result, frequent signal losses can occur, and the flow rates are not calculated. To handle signal loss but still provide flow rates, the monitoring system 30 disclosed herein uses available past measurements and uses future measurements to predict any non-measured parameters and to provide flow rates along with associated uncertainties.

During steady-state operation, for example, the measurements 52, which include P, T, V, SoS+, SoS−, from the optical flowmeter 45 are fed into the analytic solution 70 having a multiphase flow algorithm and flow equations, which are solved analytically to determine the multiphase flow rates. This can be acceptable as long as each of the dynamic measurements 52 is available.

When there are low-quality measurements from the optical flowmeter 45, however, a data gap occurs in the measurements 52, and the analytic solution 70 is not possible. For this reason, the processing system 50 initially makes a determination 54 if there is a gap in the data of the dynamic measurements 52. If there is no data gap (No to the determination 54), the analytic solution 70 can be used. If there is a data gap (Yes to the determination 54), the processing system 50 uses the machine learning model 60 to fill in the data gap so the analytic solution 70 can then be used to provide results 90 for the multiphase flow rates.

At the start of the data gap, for example, the machine learning model 60 of the processing system 50 is activated to predict the low-quality measurements for V and/or SoS and to fill in the data gap in real-time. As the data gap is filled, the analytic solution 70 is performed to calculate the phase flow rates. As can be seen, if one or more dynamic measurements 52 for V and/or SoS are currently not available, the machine learning model 60 is activated in real-time, and predicted measurements for V and/or SoS are used to analytically solve the multiphase flow rates. Accordingly, the processing system 50 disclosed herein can expand the operational envelope of the optical flowmeter 45 to handle more challenging flow conditions, and potentially short or long interruptions in the data due to signal loss or low quality can be handled appropriately with the disclosed monitoring system 30. In this way, the machine learning model 60 increases the stability of flow measurements 52 and provides full functionality to the monitoring system 30 under challenging flow conditions.

A turndown ratio is defined as the ratio of maximum flow rate to minimum flow rate and is typically used in sizing a flowmeter for different applications. By using the disclosed techniques, flow conditions with low velocity can be predicted in most scenarios so a low-end velocity boundary can be decreased. Configurations using an optical flowmeter 45 and/or DAS system (e.g., 40B) can benefit from the disclosed techniques. Due to the expanded operational envelope and the increased turndown ratio, configurations of the disclosed monitoring system 30 using an optical flowmeter 45 and/or DAS system (40B) can measure more challenging flow conditions. As a result, the performance of these configurations can be increased significantly.

The techniques of the present disclosure can be used in new installations for a wellbore 12. Moreover, the disclosed techniques can be applied retroactively to existing wellbores 12 and can use any optical infrastructure already installed in those wellbores 12. Software, algorithms, processing capabilities, and the like can be added to any existing processing system. Therefore, no additional hardware may be needed for the implementation of the disclosed techniques. Additionally, there is no need to intervene in the well operations to implement the disclosed techniques so there is no loss of production time. No additional equipment or operational costs are necessary once the machine learning model 60 is integrated into the existing flow algorithms of the analytic solution 70.

FIG. 2 illustrates time series data 100 in which a data gap 110 occurs. As shown, the time series data 100 includes flow measurements 104 taken at time steps 102. These flow measurements 104 can be obtained from a downhole sensing unit (e.g., flowmeter unit 40A or simply “flowmeter”) having a pressure sensor (42), a temperature sensor (44), and an optical flowmeter (45), such as discussed above with reference to FIG. 1.

The flowmeter unit (40A) measures five flow measurements 104 and defines a quality factor for at least three of them. As shown, the flow measurements 104 include values for P (pressure); T (temperature); V (bulk velocity); SoS+ (speed of sound of waves opposite to flow direction); SoS− (speed of sound of waves in flow direction); and SoSave (average or “true” speed of sound). The quality factors in the flow measurements 104 include qV (velocity measurement quality); qSoS+ (SoS+ measurement quality); and qSoS− (SoS− measurement quality). The flow measurements 104 for pressure P and temperature T can be measured consistently at high quality so they do not require a quality factor. (Of course, pressure and temperature can be accessed for quality according to the purposes disclosed herein, and a quality factor can be included for them in the flow measurements 104.)

The flow measurements 104 for bulk velocity V and Speed of Sound SoS+, SoS− may have been measured at lower quality during challenging flow conditions. Therefore, quality factors are provided for these flow measurements 104. In general, the quality factor is based on the signal levels for the respective flow measurements 104, and respective thresholds are used to determine high or low quality of these flow measurements 104. The thresholds can be calibrated, modified, user-defined, and manually and automatically adjusted as needed.

During normal operation, all the flow measurements 104 can be measured at high quality. This allows the phase fractions and quality factors to be solved analytically with the analytic solution (70), and there is no need for using the machine learning model (60) of the processing system (50). When the flow measurements are of low quality, a data gap 110 is created. In the data gap 110, the complete set of flow measurements 104 has not been measured at high quality, and therefore, either the phase fractions (i.e., water-in-liquid ratio (WLR) and liquid volume fraction (LVF)) or total flow rate (Qtotal) cannot be solved analytically. The SoS value yields LVF in a gas/liquid (G/L) mixture with two practical solutions: 1) gas-rich and 2) liquid-rich applications. (See e.g., Unalmis, O. H., “Sound speed in downhole flow measurement,” The Journal of the Acoustical Society of America, Vol. 140, No. 1 (2016), 19 Jul. 2016, pp. 430-441.)

As shown, the time series data 100 for the flow measurements 104 may have a data gap 110, where some combination of low-quality measurements for V, SoS−, and/or SoS+ have been measured. When the data gap 110 begins, a Forward Model 120 (discussed below) is activated in real-time to predict values for the low-quality measurements for a specified number of time steps 102 from the start of the data gap 110 moving forward in time. The Forward Model 120 uses the measurements 104 from measured points 106A in past times steps 102 before the data gap 110.

A Backward Model 130 (discussed below) is used to predict values for the low-quality measurements for a specified number of time steps 102 from the chronological end of the data gap 110 moving backward in time toward the start of the data gap 110. The Backward Model 130 uses the measurements 104 from measured points 106B in following times steps 102 after the data gap 110.

When the data gap 110 is encountered, the machine learning model (60) is activated in real-time. If the bulk velocity V is measured at low quality, the machine learning model (60) is activated because the total fluid flow rate (Qtotal) cannot be solved analytically. If any two values among the bulk velocity V and speed of sound (SoS+, and SoS−) are measured at low quality, the machine learning model (60) is activated because the phase fractions (WLR, LVF) cannot be solved analytically. Table 1 lists whether the machine learning model (60) is activated in each of the scenarios most commonly encountered.

TABLE
Scenarios
Missing Activate Machine
Scenario Measurement No Analytic Solution Learning Model
1 V Qtotal Yes
2 V, SoS− Qtotal, phase fractions Yes
3 V, SoS+ Qtotal, phase fractions Yes
4 V, SoS+, SoS− Qtotal, phase fractions Yes
5 SoS+, SoS− phase fractions Yes
6 SoS− full analytic solution No
available
7 SoS+ full analytic solution No
available
8 No missing full analytic solution No
measurements available

As can be seen in the Table, the scenarios most commonly responsible for causing a data gap 110 are where some combination of V, SoS+, and SoS− is measured at low quality. When scenarios 1-5 are encountered, the machine learning model (60) is activated in real-time. When scenarios 6-8 are encountered, the machine learning model (60) is not activated because both the phase fractions (WLR and LVF) and the total flow rate (Qtotal) and the corresponding phase flow rates (e.g., Qoil, Qwater, and Qgas) can be solved analytically with the analytic solution (70).

Although disclosed with reference to an optical flowmeter (45), this methodology can also be applied to a DAS system (e.g., 40B) as well as other flow measurement systems that may have different sensor technologies (e.g., electronic-based sensors). In fact, as stated herein, the flow sensing capability of the optical flowmeters (45) is superior to a DAS system (40B), thus the problem of data dropouts is expected to occur even more frequently in a DAS system (40B). The current methodology can therefore also create a dramatic impact in a DAS system (40B).

A logic process 200 is illustrated in flowchart form in FIG. 3. (The steps of the logic process 200 can be performed by the processing system (50) of FIG. 1, which can include the surface computing system (80) of FIG. 1 alone or can use distributed processing capabilities of both the surface computing system (80) and any processing circuitry of a downhole flowmeter units (40A-B)). Reference to elements in FIGS. 1-2 are repeated in the discussion below for better understanding.

The processing system 50 receives flow measurements (i.e., P, T, V, SoS+, SoS−, SoSave, qV, qSoS+, and qSoS−) measured by the downhole flowmeter unit (e.g., 40A) or the like (Block 230). The processing system 50 checks the qualities for the bulk velocity V, SoS+, and SoS− (Yes at Decision 232) because these measurements are affected by dynamic flow conditions. The pressure P and temperature T measurements are static measurements and are unlikely to be affected by dynamic flow conditions. Therefore, the pressure P and temperature T measurements can be used directly by the analytic solution (70) (Block 210).

If the measurements for V and at least one of the SoS+ and SoS− pass the quality check (i.e., scenarios 6-8 in Table 1), then the total flow rate (Qtotal) and the phase flow rates (e.g., Qoil, Qwater, and Qgas) are solved analytically using the flow equations (e.g., Wood equation 212 and Korteweg-Lamb equation 214), phase fraction curves (216) and multiphase flow algorithm (215) in the analytic solution (210). Details related to the analytic solution (210) for the steady-state operation of the optical flowmeter (45) can be found in U.S. Pat. Nos. 11,905,825 and 11,692,858, which are incorporated herein by reference.

If the measurements for the bulk velocity V does not pass the quality check (i.e., scenarios 1-4 in Table) (No at Decision 232), no analytic solution is available for Qtotal. If the measurements for the bulk velocity V and at least one of the speed of sound measurements (i.e., SoS+ for waves opposite the flow direction and SoS− for waves in the flow direction) do not pass the quality check (i.e., scenarios 2-4 in Table) (No at Decision 232), then no analytic solution is available for both Qtotal and phase fractions. If the measurements for both SoS+ and SoS− do not pass the quality check (i.e., scenario 5 in Table) (No at Decision 232), then the phase fractions cannot be calculated, and the flow solution cannot be obtained analytically with the analytic solution (210). As noted, this could happen due to a number of factors, such as low production rates, quiet flows, sensor issues, and the like that are encountered. When the analytic solution (210) cannot be obtained from the flow measurements, the machine learning model is activated for real-time monitoring (Block 240). The machine learning model (240) predicts replacement values (e.g., V*, SoS+*, and/or SoS−*) that can then replace the low-quality measurements. These predicted replacement values (e.g., V*, SoS+*, and/or SoS−*) can then be used in the analytic solution (210) as needed to solve for the flow rates (Block 220).

As noted above, the analytic solution (210) determines phase flow rates for a given flow condition according to aspects of the present disclosure. The measured flow values of high quality can be used to obtain the analytical solution (210) in the steady-state operation. Otherwise, predicted replacement values (e.g., V*, SoS+*, and/or SoS−*) can then be used in the analytic solution (210) as needed to solve for the flow rates when any one or more of the measurements (e.g., V, SoS+, and SoS−) are of low quality.

In either case, the calculation in the analytic solution (210) for two-phase flow is well defined and established. Briefly, the analytic solution (210) uses an analysis report (202), which includes analysis information of a bottomhole fluid (e.g., a fluid mixture) sample. Data from the bottomhole fluid sample analysis report (202) is analyzed with a Pressure-Volume-Temperature (PVT) software package (204) to determine single-phase properties, which can be provided in a parameter file (Block 206). These single-phase properties (Block 206) can include density ρ; viscosity μ; speed of sound a; and volume formation and retrograde condensation factors from reservoir to surface of the analyzed mixture at various pressures (P) and temperatures (T), such as pressures and temperatures at one or more downhole locations, at the wellhead, and at standard pressures and temperatures. The steady-state operation of the optical flowmeter (45) makes use of the available information provided in the parameter file, which includes tables of SoS and includes tables of other fluid properties (e.g., density, viscosity, etc.) of the individual phases.

Downhole sensors (e.g., the pressure sensor 42, the temperature sensor 44, and the flowmeter 45 shown in FIG. 1) measure the pressure (P), temperature (T), bulk fluid velocity (V), and speed of sound (SoS+, SoS−) of the fluid mixture in the pipe at one or more downhole locations (Block 230). Single-phase properties that correspond to the measured pressure and temperature P and T may be selected from the parameter file of single-phase properties of components of the fluid mixture. For example, this parameter file may be based on the bottomhole fluid sample analysis report (Block 202) or generated by the processing system 50 shown in FIG. 1.

When dealing with multiphase flow, the typical solution uses a volumetric proportion approach, such as provided by the Wood equation (Ref. 6). Because the SoSmix for infinite medium needs to be corrected for pipe compliance, the Korteweg-Lamb equation (Ref. 7) is used. Details of the Wood equation (212) can be found in Wood, A. B., A textbook of sound, (The Macmillan Company, New York), 327-328, 1930. Details of the Korteweg-Lamb equation can be found in Junger, M. C. and Feit, D., Sound, structures, and their interaction, Acoustical Society of America, Woodbry, New York, 37-40, 1993.

The two-phase analytic solution (210) produces a phase fraction curve: either an SoS-WLR curve for an oil/water type of liquid/liquid application, or an SoS-LVF curve for a gas/oil type of gas/liquid application. The phase fraction curve (Block 216) for the components in the fluid mixture is generated based on the selected single-phase properties (Block 206), the Wood equation (Block 212), and the Korteweg-Lamb equation (Block 214).

To solve for liquid/liquid flow (e.g., oil/water flow), for example, the phase fraction curve (Block 216) is a uniquely changing, well-behaved curve. Each SoS value along this curve corresponds to a unique WLR. Once the downhole phase fraction WLR is determined, the downhole phase flow rates (Qtotal, Qoil, Qwater) are calculated. (For oil/water two-phase (liquid/liquid) flow, for example, the total flow rate (Qtotal) is calculated by Qtotal=V. Area; the oil phase flow rate (Qoil) is calculated by Qoil=Qtotal·(1−WLR); and the water phase flow rate (Qwater) is calculated by Qwater=Qtotal·WLR, where Q is the volumetric flow rate, V is the fluid velocity, and Area is the cross-sectional area of the optical flowmeter.) To solve for two-phase gas/liquid flow (e.g., gas/oil flow), the selected single-phase properties (206) along with the measured SoS are used with the Wood equation (Block 212) and the Korteweg-Lamb equation (Block 214) to determine a liquid volume fraction (LVF) (Block 218). The Korteweg-Lamb equation (214) can correct the SoSmix for infinite medium for pipe compliance. An inline phase fraction LVF is determined, and the inline phase flow rates (Qtotal, Qgas, Qliquid) are calculated. (For gas/oil two-phase (gas/liquid) flow, for example, the total flow rate (Qtotal) is calculated by QT=V·Area; the gas phase flow rate (Qgas) is calculated by Qgas=Qtotal·(1−LVF); and the liquid phase flow rate (Qliquid) is calculated by Qliquid=Qtotal·LVF.)

Finally, inline volumetric phase flow rates are calculated (Block 220) using the measured bulk velocity V and the cross-sectional area of the flowmeter (e.g., 45). The inline mass phase flow rates can also be calculated by multiplying the volumetric phase flow rates by individual phase densities determined from the interpolation of single-phase properties (Block 206) at the measured pressure (P) and temperature (T). The standard phase flow rates can be obtained by using the downhole phase flow rates and conversion factors (derived from PVT analysis of the initial fluid report) in the flowmeter's parameter file. It is also possible to use various multiphase flow algorithms (Block 215) to consider possible slip conditions between the phases when calculating the flow rates at Block 220. The flow rate derivations may assume well-mixed flows. For the gas/liquid flows, it is also possible to implement various multiphase flow correlations to consider possible slip conditions between the phases. As an example, three different methods can be used: (1) a homogeneous flow approach in which flow patterns and slippage between the phases are not considered; (2) an empirical correlation that predicts the liquid holdup and pressure gradient, while considering the slippage but not the flow pattern (see e.g., Brill, J. P. and Mukherjee, H., Multiphase Flow in Wells, Society of Petroleum Engineers: Richardson, TX, USA, 1999; Volume 23, pp. 44-46); and (3) another empirical correlation that considers both slippage and flow patterns (see e.g., Hagedorn, A. R. and Brown, K. E., “Experimental study of pressure gradients occurring during continuous 2-phase flow in small-diameter vertical conduits,” J. Pet. Technol. 1965, 17, 475-484).

As can be seen for two-phase flows, SoS can be used to find either the water-in-liquid ratio (WLR) (oil/water, liquid/liquid flow) or the liquid volume fraction (LVF) (gas/oil, gas/liquid flow) so knowing the water-in-liquid ratio (WLR) is not a prerequisite to determine the liquid volume fraction (LVF) in a gas/liquid flow. Although the analytic solution (210) shown here in FIG. 3 is used to solve for two-phase flows, the analytical solution (210) can be extended to solve for three-phase flows by using the additional measurements. The WLR and LVF can be obtained in a number of ways for three-phase flow. One way of solving for three-phase flow is disclosed in U.S. Pat. No. 11,905,825, which uses different measurements of SoS from two different devices. When the flow is three-phase, for example, SoS can be measured at two different places (above and below bubble point pressure). The water-in-liquid ratio (WLR) can be first determined in two-phase flow. For instance, pressure adjusted water-in-liquid ratio (WLR) at the three-phase flow location can be used to determine the liquid volume fraction (LVF). Alternatively, a water-cut meter can be used to measure the WLR, which can be used to determine three-phase flow rates. (Further details are described in U.S. Pat. No. 9,347,310, which is incorporated by reference.) Another way of solving for three-phase flow is to measure temperature and pressure at a significantly different location using a secondary P/T gauge to define the density of the fluid mixture, which can be used to determine three-phase flow rates (Further details are described in U.S. Pat. No. 9,383,476, which is incorporated by reference). Accordingly, the machine learning methodology described in this application is equally applicable to both two-phase and three-phase measurements.

As already noted, the described techniques can be used with one or more downhole flowmeter units (e.g., 40A-B in FIG. 1) at one or more locations. Measuring speed of sound SoS and fluid velocity V with one flowmeter unit (e.g., 40A) at an individual location may be sufficient in some instances because the flow measurements at separate times may be used to resolve three-phase flow rates. The WLR is calculated from a two-phase curve (Block 216), and the one flowmeter unit (e.g., 40A) can report two-phase in-situ flow rates. At other times, the flow may be a three-phase flow. Any previous WLR measurement at one time can be used as an input to the measurements at another time. With the known WLR from one time, the other phase fraction LVF can be determined using the three-phase solution domain. The one flowmeter unit (e.g., 40A) can then report three-phase in-situ flow rates.

A. Model Overview

As noted above, a data gap may occur in the flow measurements when dynamic measurements for V, SoS+, and/or SoS− are of low quality. The machine learning model (240) of the present disclosure uses previous high-quality measurements to predict replacement values of the low-quality flow measurements within the data gap. These predicted replacement values for the low-quality flow measurements are then used for analytical calculations that can continue in real-time.

The disclosed machine learning model (240) recognizes patterns through nonlinear relationships between the inputs, allowing for more accurate predictions of the target outputs. In one arrangement, a Long Short-Term Memory (LSTM) neural network, which is a type of a recurrent neural network (RNN), models the time-series data of the real-time flow measurements. The LSTM neural network processes the time-series data and learns long-term dependencies by storing observed patterns in the network's memory cell and allowing for the memory cell to be updated at each time step where there is new input information. See e.g., Hochreiter, S. and Schmidhuber, J., “Long Short-Term Memory,” Neural Computation, vol. 9, no. 8, pp. 1735-1780, 15 Nov. 1997.

Features of a Long Short-Term Memory neural network 300 are depicted in FIG. 4. As a type of recurrent neural network (RNN), the LSTM neural network (300) stores and uses information over long sequences of data. The LSTM neural network 300 addresses the vanishing gradient problem seen in traditional RNNs.

The LSTM neural network 300 uses memory cells (c) to store information in the neural network 300 over time, allowing the neural network 300 to carry information from the past to influence future determinations.

The LSTM neural network 300 includes a forget gate (ft), an input gate (it), a candidate memory (Ct), and an output gate (ot) for a current time step (t). The LSTM neural network 300 receives a memory cell input (ct−1) and a hidden input (ht−1) from a previous time step (t−1), and the LSTM neural network 300 receives current data (xt) for the current time step (t). The forget gate (ft), the input gate (it), the candidate memory (Ct), and the output gate (ot) operate on the inputs, and the LSTM neural network 300 outputs a memory cell output (ct) and a hidden output (ht) for the current time step (t).

During operation, the forget gate (ft) first decides what information from the previous memory cell (ct−1) is forgotten/retained. The input gate (it) then decides what information from the candidate memory cell (Ct) is retained. After the forget gate (ft) has been applied to the previous memory cell (ct−1) and after the input gate (it) has been applied to the candidate memory cell (Ct), the new memory cell (ct) is the superposition of the two. Finally, this new memory cell (ct) represents the updated memory cell for output along with the hidden output (ht) for the next time step. The LSTM neural network 300 can maintain long-term dependencies, making it useful to make sequence prediction and time series forecasting in the flow measurements according to the current implementation.

As noted above, the forget gate (ft) determines what portion of a previous memory cell input (ct−1) should be “forgotten” or “retained.” To do this, the hidden input (ht−1) and the current data measurements (xt) are sent through two transformations, including a linear transformation (by the parameters optimized by the machine learning) and then a nonlinear transformation (by a sigmoid activation function (σ)). After the activation, if the value of the gate (ft) is close to 1, then the gate (ft) retains the information of the memory cell input (ct−1). If the value is close to 0, then the gate (ft) forgets the information of the memory cell input (ct−1). In the LSTM neural network 300, the sigmoid activation function (σ) (a.k.a. a logistic function) takes the real input values and outputs a value in a range (0, 1). The output value is then multiplied elementwise with the memory cell input (ct−1).

As noted, the candidate memory (Ct) represents the potential latest content that may be added to the memory cell (ct). The candidate memory (Ct) is created by applying a tangent hyperbolic activation function (tan h) to the combination of the hidden input (ht−1) and the current data (xt). In the neural network of the LSTM neural network 300, the tangent hyperbolic activation function (tanh) takes the real input values and outputs a value in a range (−1, 1).

As noted, the input gate (it) controls what information from the candidate memory (Ct) should be retained. To do this, the hidden input (ht−1) and the current data measurements (xt) are sent through two transformations, including a linear transformation (by the parameters optimized by the machine learning) and then a nonlinear transformation (by a sigmoid activation function (σ)). In the case of the input gate (it), after the activation, if the value of the gate is close to 1, then the gate (it) retains the information of the candidate memory cell and allows the memory cell input (ct−1) to be updated. If the value is close to 0, then the gate (it) does not retain the information of the candidate memory cell and block an update to the memory cell input (ct−1).

As noted, the output gate (ot) decides what parts of the updated memory cell (ct) to output. To do this, a sigmoid activation function (σ) is applied to the hidden input (ht−1) and the current data (xt), and the result is multiplied elementwise by the updated memory cell (ct) having a tangent hyperbolic activation function (tanh) applied thereto. The result is the hidden output (ht), which carries information as input to the next time step.

As discussed above, a forward sequence-to-sequence model (i.e., Forward Model) is used for real-time monitoring. (FIG. 5 illustrates a Forward Model 400 for a machine learning model according to the present disclosure.) As also discussed above, a backward sequence-to-sequence model (i.e., Backward Model) is used for post-processing. (FIG. 7 illustrates a Backward Model 430 for a machine learning model according to the present disclosure.) Both of these Models 400, 430 have an encoder-decoder architecture in which encoder units 410 and decoder units 420 are connected in series to form a single continuous LSTM architecture. See e.g., Sutskever, I., et. al., “Sequence to Sequence Learning with Neural Networks,” Advances in Neural Information Processing Systems, Vol. 27, (2014). The Forward Model 400 and the Backward Model 430 represent two separate LSTM architectures.

For the Forward Model 400 in FIG. 5, the encoder units 410 in the encoder 402 find a latent representation of a sequence of complete high-quality measurements for N time steps previous to the start of the data gap. The decoder units 410 in the decoder 404 predict the target measurements beginning at the start of the data gap for T time steps. The encoder and decoder units 410, 420 for the disclosed model 400 are configured as LSTM neural networks so the Forward Model 400 makes a prediction at a certain time step by using information from all preceding time steps.

For the Backward Model 430 in FIG. 7, the encoder units 410 in the encoder 432 find a latent representation of a sequence of complete high-quality measurements for η time steps following the conclusion of the data gap. The decoder units 420 in the decoder 434 predict measurements beginning at the end of the data gap, and the decoder 434 moves backward in time for T time steps. The encoder and decoder units 410, 420 for the disclosed model 430 are also configured as LSTM neural networks so the Backward Model 430 makes a prediction at each time step by using information from all following time steps.

The model inputs (x) are the complete vector set of flow measurements (i.e., P, T, V, SoS+, SoS−). Meanwhile, the model outputs (y) are a subset of the complete measurements (i.e., V, SoS+, SoS−). These three measurements (i.e., V, SoS+, SoS−) are chosen as the output because they are more commonly measured at low quality and are the main cause of the data gaps, as noted in discussions presented above.

The inputs (x) and outputs (y) are formalized as vectors (Eqs. 1-2). The superscripts refer to the real-time monitoring case where time (t) begins counting at the start of the input sequence, and where subsequent time (t′) begins counting at the start of the data gap after the conclusion of an input sequence of length N.

x t = [ P , T , V , So ⁢ S + , So ⁢ S - ] t ( 1 ) y ( N + t ′ ) = [ V , So ⁢ S + , So ⁢ S - ] ( N + t ′ ) ( 2 )

Before presenting the structure of the complete models, discussion first focuses on the building blocks of the encoder units 410 and the decoder units 420 used in the Forward Model 400 and the Backward Model 430.

B. Encoder Unit

FIG. 6A illustrates an encoder unit 410. The encoder unit 410 uses a complete set of high-quality measurements xt and uses a hidden input h(t−1) to update a memory cell c(t−1) of the model's network. The updated memory cell ct is used to produce a hidden output ht, and both the updated memory cell ct and the hidden output ht are passed to the next encoder unit.

C. Decoder Unit

FIG. 6B illustrates a decoder unit 420. At each time step in the data gap, the measurements are incomplete. An example of an incomplete flow measurement is when V is measured at low quality, while P, T, SoS+, and SoS− are all measured at high quality (Eq. 3). As will be appreciated, other combinations of low-quality measurements may occur.

ξ ( N + t ′ ) = [ P , T , V ( low - quality ) , So ⁢ S + , So ⁢ S - ] ( N + t ′ ) ( 3 )

At each time step, there is a model prediction (Eq. 4).

y ˆ ( N + t ′ ) = [ V ˆ , So ^ ⁢ S + , So ^ ⁢ S - ] ( N + t ′ ) ( 4 )

The model's predicted measurements ŷ(N+t′−1) from a previous time step, selectively replace () the low-quality measurements in the incomplete flow measurement ξ(N+t′−1) to produce a complete measurement x*(N+t′−1). The complete measurement contains both high-quality measurements recorded by the flowmeter and the predicted measurements produced by the model. The replacement process () is shown in Eq. 5. As can be seen, all low-quality measurements are discarded and are replaced by the model predictions.

x * ( N + t ′ ) = [ P , T , V ^ , So ⁢ S + , So ⁢ S - ] ( N + t ′ ) = ℛ ⁡ ( ξ ( N + t ′ ) , y ˆ ( N + t ′ ) ) ( 5 )

Each decoder unit 420 uses the complete measurement x*(N+t′−1) for the previous time step and the hidden input h(N+t′−1) to update the memory cell c(N+t−1′) of the model's network. The resulting updated memory cell c(N+t′) is used to produce a hidden output h(N+t′), and both the updated memory cell c(N+t′) and the hidden output h(N+t′) are passed to the next decoder unit 420. The predicted measurements ŷ(N+t′) for the current time step are then used for the next decoder unit 420.

D. Forward Model

As noted above, the Forward Model 400 in FIG. 5 is used for real-time monitoring. The forward modeling does not find averages. Instead, the Forward Model 400 is configured as a non-linear function that reduces error (i.e., increases quality) of predicted values. Prediction in the Forward Model 400 uses previous high-quality flow values to predict replacement values for those low-quality values in the next time step. For each time step, the Forward Model 400 determines a predicted value of each of the V, SoS+, and SoS− because any one of these may be used to replace a low-quality value in the next time step. The Forward Model 400 never uses low-quality values to make predictions. Only current high-quality values and predicted values for the low-quality values are used at each time step.

In the Forward Model 400, some initial subset (N) of high-quality values before the data gap are used. The size of this initial subset can be configurable and can depend on a number of factors, such as an anticipated length of time that the data gap is expected to be, a historic record of how the flow values have fluctuated between high-quality and low-quality in the past, etc. In the real time processing of the Forward Model 400, the error of the predictions may tend to increase so that a data gap having a long-time frame may tend to provide poorer predictions over time. However, this may not be the case depending, for example, on the circumstances, the predictions made, and the real-time data involved.

The encoder units 410 are arranged in series to form a unidirectional encoder 402. The encoder 402 creates an embedding E of an input sequence of N complete high-quality measurements prior to entering the data gap. The measurements at each time step contribute non-linearly to the embedding E through each of the encoder units 410. The updated memory cell c and the hidden output h after the final encoder unit 410 constitute the input sequence embedding E.

The embedding E is passed to the first decoder unit 420 of the decoder 404. Due to the model architecture, there needs to be an offset by one time step, so as a logical choice, the input xN at the final time step of the input sequence can be passed a second time to the Forward Model 400. The input xN is passed to the first decoder unit 420 along with the embedding E. The first decoder unit 420 uses these two inputs E, xN to predict the target measurements ŷ(N+t) for the first time step t′=1 in the data gap.

The decoder units 420 are arranged in series to form a unidirectional decoder. The decoder predicts the measurements for T time steps starting from the beginning of the data gap at t′=1 to an end of the data gap at t′=T. Because the measurements are incomplete in the data gap, the model predictions selectively replace () the low-quality measurements at each time step. The Forward Model 400 terminates after predicting for T time steps.

All high-quality measurements—i.e., those previous to the data gap and those within the data gap—are used by the Forward Model 400 to make the model predictions. All low-quality measurements in the data gap are replaced () by model predictions. The model predictions used for replacing are also used by the Forward Model 400 to make model predictions. All low-quality measurements are discarded and not used by the Forward Model 400. Likewise, all model predictions that are not used for replacing are also discarded and not used by the Forward Model 400.

Here, when a data gap is encountered, the Forward Model 400 does not know in real time what flow values (i.e., V, SoS+, SoS−) in the next time step may or may not be of low quality. During the real time measurements, either none or any combination of one or more of the flow values (i.e., V, SoS+, SoS−) may be of low quality from one time step to the next. Predictions for each of the flow values (i.e., V, SoS+, SoS−) are made at each step so any one of them can be used in the subsequent step if needed to replace a flow value of low quality.

Because the data gap is of arbitrary length, oftentimes hours or days, when using a sequence-to-sequence model to predict the measurements, the length of the output sequence will have an upper limit T at the point where the total model error is determined to be too large. This is to ensure that the Forward Model 400 does not mislead the operator by delivering inaccurate predictions. When the data gap is shorter than the model's predetermined output sequence length, the model execution will be terminated at the conclusion of the data gap. At this point, the flowmeter (e.g., 45) resumes delivering the complete set of high-quality flow measurements to the operator so the analytical solution (70) can be executed based entirely on the high-quality flow measurements. If the data gap is longer than the model output length, then the data gap will continue after the model terminates. In this case, the Forward Model 400 will not fill the entire data gap with predictions, and part of the data gap at the tail end may remain unfilled.

During model training, the extreme case of the data gap may be simulated. At every time step within the data gap in this case, no model predictions are discarded, and they are all circled back into the model as input. This aims to simulate the case where the flowmeter is measuring only pressure P and temperature T at high quality in the data gap. This case can happen when the flowmeter (45) is measuring at its worst capabilities, and therefore, it is a useful case to simulate when developing the model. The mean error between the model predictions and the real flow measurements is taken over the entire length of the data gap and is used to optimize the Forward Model 400. The model error is compared to a baseline error when optimizing the Forward Model 400 and determining an appropriate decoder length.

Execution of the real-time monitoring by the Forward Model 400 proceeds as follows. The data gap begins when the first incomplete measurement ξ(N+1) is passed to the Forward Model 400. However, the full Forward Model 400 cannot be executed at the start of the data gap because the remaining incomplete measurements ξ(N+2), . . . , ξN+T−1) are not yet available. They are being measured in real-time and have yet to be measured by the flowmeter.

The full Forward Model 400 is represented by two components (C1 and C2). When the data gap begins at t′=1, there are two successive steps. In the initial step, the first component C1 is activated to find the embedding E of the input sequence of complete high-quality measurements. In the successive step, the embedding E is passed to the second component C2, which is activated to predict the target measurements at the first time step in the data gap. The prediction at the first time step and the recurrent outputs are passed as input to the decoder unit 420 at the next time step t′=2. If the data gap continues, the second component C2 is reactivated again at t′=2 to predict the target measurements at the second time step in the data gap. Therein after, if the data gap continues, the necessary outputs continue to be passed along, and the second component C2 is reactivated at each time step until the output sequence length of the model is reached at t′=T, or until the data gap concludes if this happens before t′=T.

E. Backward Model

As noted above, the Backward Model 430 in FIG. 7 is used for post-processing after the data gap ends. The Backward Model 430 is similar to the Forward Model 400 in architecture except that it operates backward in time. Backward modeling may also suffer issues for a data gap having an exceptionally long-time frame (e.g., many days). In the end, both the Forward Model 400 and Backward Model 430 can work inward into the data gap toward an intermediate region.

Like the Forward Model 400, the Backward Model 430 does not find averages. Instead, the Backward Model 430 is configured as a non-linear function that reduces error (i.e., increases quality) of predicted values. The Forward and Backward Models 400, 430 are configured differently as to their non-linear functions.

The Backward Model 430 predicts the measurements in the data gap in post processing after the data gap ends. The encoder units 410 are arranged in series to form a unidirectional encoder 432 that moves backward in time. The encoder 432 creates an embedding EB of an input sequence of n complete high-quality measurements after the conclusion of the data gap. The measurements at each time step contribute non-linearly to the embedding EB through each of the encoder units 410. The updated memory cell c and the hidden output h after the final encoder unit 410 constitute the input sequence embedding EB.

The decoder 434 having decoder units 420 predicts the measurements for T time steps in the data gap beginning at t=−1 and moving backward in time to t=−τ. Throughout the decoder 434, the low-quality measurements within each incomplete measurement ξ are replaced (R) with the model predictions ŷ to form a complete measurement x*. The complete measurements of all chronologically following time steps are used to predict the target measurements of the current time step in the data gap. (The dashed connections are used to condense the diagram and show a skip through time.)

As shown, the embedding EB is passed to the first decoder unit 420. Like the forward case, the Backward Model 430 needs to be offset by one time step. To do this, the input xτ at the final time step of the input sequence is passed a second time to the Backward Model 430. It is passed to the first decoder unit 420 along with the embedding EB. (Chronologically, xτ is the input at the first time step of the input sequence, but when thinking in the direction the Backward Model 430 operates, it is the final time step of the input sequence). The first decoder unit 420 uses these two inputs xτ, EB to predict the target measurements ŷ(τ+t†) for the first time step t=−1 in the data gap. The decoder units 420 are arranged in series to form a unidirectional decoder that moves backward in time.

The decoder 434 predicts the measurements for τ time steps starting from the chronological end of the data gap at t=−1 and moving backward in time to t=−τ. Because the measurements are incomplete in the data gap, the model predictions selectively replace the low-quality measurements at each time step. The Backward Model 430 terminates after predicting for τ time steps.

The length of the output sequence will have an upper limit τ at the point where the model error is determined to be too large. This is to ensure the Backward Model 430 is not misleading the operator by delivering inaccurate predictions. When the data gap is shorter than the model's predetermined output sequence length, the model execution will be terminated at the chronological start of the data gap, where the flowmeter had first ceased to deliver the complete set of high-quality measurements to the operator, and where the analytical solution was possible entirely from measurements. If the data gap is longer than the model output length, the data gap will then continue backward in time after the model terminates. In this case, the Backward Model 430 will not fill the entire data gap with predictions, and part of the data gap at the chronological front end will remain unfilled. This is contrary to the forward case, where part of the chronological tail end of the data gap may remain unfilled. Again, during model training, the extreme case of the data gap may be simulated, where the flowmeter is taken to measure only P and T at high quality in the data gap.

The Backward Model 430 cannot be executed in real-time because the Backward Model 430 must wait η time steps after the conclusion of the data gap to activate the Backward Model 430. However, unlike the Forward Model 400, the Backward Model 430 can be executed in one single operational step.

F. Deep Models

Both the Forward Model 400 and the Backward Model 430 can be made larger by increasing the number of recurrent layers, which have connections through time. When there is more than one recurrent layer in the respective Model 400, 430, there are connections not only through time but also through space—i.e., there are connections between the recurrent layers. These larger Models 440, 450 are referred to here as a Deep Forward Model 440 (FIG. 8) and a Deep Backward Model 450 (FIG. 9).

The layering expands the respective Models in the spatial realm. The modeling in the time realm is the same. Because multiple layers are provided, a deep neural network is used to provide the predicted value set for the next time step from all of the spatial layers at the current time step.

FIG. 8 illustrates a Deep Forward Model 440 for a machine learning model according to the present disclosure, and FIG. 9 illustrates a Deep Backward Model 450 for a machine learning model according to the present disclosure. For the Deep Forward Model 440 in FIG. 8, there are K recurrent layers of the Forward Models 400 and encoder embeddings E1 to EK. For the Deep Backward Model 450 in FIG. 9, there are κ recurrent layers of Backward Models 430 and encoder embeddings EB,1 to EB,κ. The dashed connections are to condense the diagram and show a skip either through time or through space.

The time connections within each recurrent layer are the horizontal paths through the respective Model 440, 450. The vertical paths connecting the recurrent layers are the spatial connections. Each output from the decoder unit in the final spatial recurrent layer is passed through a classical, fully connected dense neural network that outputs the model predictions for the forward case (FIG. 8) or through a classical, fully connected dense neural network that outputs the model predictions for the backward case (FIG. 9). The model predictions selectively replace the low-quality measurements as usual.

As noted herein, many existing wells already have optical flowmeters installed. As these wells age and their production rates decrease, sporadic flow rate reporting may be encountered. Teachings of the present disclosure can be implemented in such an existing well already having an optical flowmeter installed.

As a further example, FIG. 10 illustrates a process for training and deploying a neural network 510 according to the present disclosure. (The training can be used on the LSTM neural network 300, the encoder units 410, the decoder units 420, the Forward Model 400, the Backward Model 430, and the Deep Forward and Backward Models 440, 450 disclosed herein.) Once the given neural network 510 has been structured for a task, the neural network 510 is trained using a training dataset 512. The training data in the training dataset 512 includes all high-quality data of flow measurements so the neural network 510 can be appropriately trained to predict flow values.

To begin training the neural network 510, initial weights may be chosen randomly or by pre-training using a deep belief network. The training cycle can then be performed in either a supervised or unsupervised manner.

Supervised learning uses the training dataset 512 to teach the neural network 510 to yield the desired output. The training dataset 512 includes inputs and desired outputs, which allow the neural network 510 to learn over time, or when the training dataset 512 includes input having known output and the output of the neural network 510 is manually graded. The neural network 510 processes the inputs and compares the resulting outputs against a set of expected or desired outputs. Errors are then propagated back through the training framework 514.

As training proceeds, the training framework 514 can adjust and change the weights that control the untrained neural network 516. The training framework 514 can provide tools to monitor how well the untrained neural network 516 is converging towards a model suitable for generating correct answers based on known input data. The training process repeatedly occurs as the network weights are adjusted to refine the output generated by the neural network 510. The training process can continue until the neural network 510 reaches a statistically desired accuracy associated with a trained neural network 518. The trained neural network 518 can then be deployed to implement any number of machine learning operations to output a result 522.

G. Flowmeters

Briefly, FIG. 11 illustrates an example of an in-well, two-phase optical flowmeter 600 for use with the disclosed monitoring system. The optical flowmeter (OFM) 600 includes pressure/temperature (P/T) sensors 604 and 606 in a first section 602A and includes one or more flow sensors in a second section 602B. The flow sensors 610 uses bare fiber 612 tightly-wrapped around inner tubing 608, which may be part of or connected to the conduit 20 shown in FIG. 1. The inner tubing 608 is protected by an outer sleeve of the second section 602B. The fiber 612 has low-reflectivity fiber Bragg gratings 614 (FBGs) separating the flow sensors 610.

As noted, the disclosed monitoring system can use an optical flowmeter, and another flowmeter can be used in addition to the optical flowmeter. The additional flowmeter can include an optical waveguide of a distributed acoustic sensing (DAS) system. The optical waveguide of the DAS system may be on the same optical waveguide communicatively coupled to the optical flowmeter. The optical waveguide can include a DAS coil or DAS line. Alternatively, a DAS waveguide can be installed into the well, separate from a waveguide communicatively coupled to the optical flowmeter.

Briefly, FIG. 12A illustrates an example DAS sensor 620 in a coiled or helical configuration for use with the disclosed monitoring system. The DAS sensor 620 includes an optical waveguide 624 in a coiled or helical configuration around a conduit 622 conveying the fluid being sensed. The DAS sensor 620 may measure speed of sound (SoS) in the fluid in the conduit 622 and may measure the bulk fluid velocity of the fluid. The conduit 622 may be part of or connected to the conduit 20 shown in FIG. 1.

In fact, many existing wells have fiber infrastructure installed, such as in a straight-line fiber cable configuration. In some cases, the fiber cable may be wrapped around tubing in a helical configuration, which may provide a 3-D sensing capability compared to the straight-line cable configuration. As a result, the sensing capabilities of existing DAS systems depend on their installation/configuration as well as the application.

FIG. 12B illustrates another example DAS sensor 630 for use with the disclosed monitoring system. The example DAS sensor 630 includes an optical waveguide 634 in a linear configuration paralleling and contacting a conduit 632 conveying the fluid being sensed. The optical waveguide 634 can be attached to the outside of conduit 632 in a straight-line configuration using clamps (not shown). The example DAS sensor 630 may measure SoS in the fluid in the conduit 632. In some cases, the optical waveguide 634 includes a protective coating, such that the actual optical-wave-carrying medium (e.g., an optical fiber) is acoustically coupled to, but indirectly contacts the conduit 632. The conduit 632 may be part of or connected to the conduit (20) shown in FIG. 1.

While the example DAS sensor 630 includes an optical waveguide 634 contacting the outside of a conduit 632 conveying the fluid being sensed, the present disclosure is not so limited. Aspects of the present disclosure may be practiced with a DAS sensor that includes an optical waveguide disposed within a conduit and directly contacts the fluid being sensed. In some cases, the optical waveguide includes a protective coating, such that the actual optical-wave-carrying medium is acoustically coupled to, but indirectly contacts, the fluid being sensed within the conduit.

In this DAS sensor 630, the straight-line configuration may have issues with SoS measurements, especially when multi-zone and multiphase applications are involved. Additionally, obtaining a valid flow velocity can be extremely difficult for these configurations. On the other hand, the DAS sensor 620 as in FIG. 10A having the helical cable configuration may be able to measure SoS. It is also possible for some particular cases to measure flow velocity for certain applications such as gas-rich flows. (See e.g., Unalmis, O. H., “Sound speed in downhole flow measurement,” The Journal of the Acoustical Society of America, Vol. 140, No. 1 (2016), 19 Jul. 2016, pp. 430-441.) The DAS technology has some limitations. (See e.g., Unalmis, O. H., “Flow measurement optimization using surface measurements and downhole sound speed measurements from local or distributed acoustic sensors,” SPE Production & Operations, 36, (02) (2021), 437-450; and Unalmis, O. H., “A methodology for in-well multiphase flow measurement with strategically positioned local and/or distributed acoustic sensors,” Sensors 2023, 23, 5969.) Because the amount of data acquired by the DAS sensor 630 as in FIG. 12B for the complete length of fiber usually adds up to huge sizes, a selective process and reduction of data may be needed.

FIG. 13 illustrates an example Venturi flowmeter 640 for use with the disclosed monitoring system. The Venturi flowmeter 640 is typically installed in-line with a conduit 644 conveying the fluid being sensed. The Venturi flowmeter 640 may measure a differential pressure between a first location 646 and a second location 642 that has two different cross-sectional areas. The conduit 644 may be part of or connected to the conduit 20 shown in FIG. 1. The Venturi type device 640 tends to have limited flow rate ranges due to their low turndown ratios (i.e., ratio of maximum flow rate to minimum flow rate). Because the Venturi type device 640 can only measure single-phase flow, measurements, such as water-cut, requiring measurements of two-phase flow rates may need to be determined using other flowmeters noted herein for the disclosed monitoring system.

FIG. 14 illustrates an example differential pressure (DP) gauge 650 for use with the disclosed monitoring system. The DP gauge 650 may be installed in connection with a conduit (e.g., conduit 20, shown in FIG. 1) conveying the fluid being sensed. The DP gauge 650 may obtain, via a first input 652, an indication of pressure at a first location. The first input 652 may, for example, be a tube connecting to the first location such that the DP gauge 650 is in fluid communication with the first location. The DP gauge 650 may also obtain, via a second input 654, an indication of pressure at a second location. The second input 654 may, for example, be another tube connecting to the second location such that the DP gauge 650 is in fluid communication with the second location. The DP gauge 650 may measure a differential pressure between the first location and the second location. The DP gauge 650 may report the differential pressure via an output 656. The DP gauge 650 may report the differential pressure optically (e.g., via a fiber-optic cable) or electronically (e.g., via a wire).

Configurations of the present disclosure can be characterized by the following clauses:

Clause 1. A method of characterizing fluid flow in a conduit (20) disposed in a wellbore (12), the method comprising:

    • obtaining (230), at a processing system (50), a time series (100) of flow values (104) of the fluid flow measured in real-time at at least one location in the conduit (20) using at least one flowmeter (45);
    • determining (232), at the processing system (50), that any given one or more of the flow values (104) at any given time step (102) in the time series (100) is a low-quality value of low-quality, each of any remaining ones of the flow values (104) at the given time step (102) being a high-quality value of high-quality;
    • predicting (240), at the processing system (50) based on the high-quality values in the time series (100), a respective predicted value for each low-quality value at each given time step (102) in the time series (100); and
    • calculating (210), at the processing system (50) based on the respective predicted values and the high-quality values, total flow rate (Qtotal) and flow rates of multiphase components (oil, water, and gas) in the fluid flow at the at least one location.

Clause 2. The method of clause 1, wherein:

    • obtaining (230) the time series (100) of the flow values (104) comprises obtaining, at each time step (102) in the time series (100), the flow values (104) at least including a pressure value (P), a temperature value (T), a bulk velocity value (V), and a speed of sound (SoS) value associated with the fluid flow; and
    • determining (232) that the any given one or more of the flow values (104) is of low-quality comprises determining that any of at least one of the bulk velocity value (V) and the SoS value (SoS) is of low-quality having a respective quality below a respective threshold.

Clause 3. The method of clause 2, wherein determining (232) that the SoS value is of low-quality comprises determining that at least one of: (i) a speed of sound (SoS+) of waves opposite to a flow direction of the fluid flow and (ii) a speed of sound (SoS−) of waves in the flow direction has the respective quality below the respective threshold.

Clause 4. The method of any one of clauses 1 to 3, wherein determining (232) comprises detecting a data gap (110) in the time steps (102) of the time series (100) having the any given one or more of the flow values (104) determined low-quality.

Clause 5. The method of clause 4, wherein predicting (240) the respective predicted value for each low-quality value at each given time step (102) in the time series (100) comprises forward modeling (120), in real-time processing of the time steps (102) in the time series (100) of the data gap (110), the respective predicted value for each low-quality value in each given time step (102).

Clause 6. The method of clause 5, wherein forward modeling (120) comprises using a Long Short-Term Memory (LSTM) neural network (300, 400).

Clause 7. The method of clause 5, wherein forward modeling (120) comprises:

    • encoding a memory cell (c), a hidden state (h), and a predicted value set (ŷ) based on the high-quality values (x) in an input sequence in the time series before the data gap; and
    • decoding, for each current time step from a start time step (t=1) to a later time step (t=T) in the time series of the data gap, by successively performing the acts of:
    • inputting a current value set (ξt) of the flow values for the current time step (t);
    • inputting the predicted value set (ŷ(t−1)) forwarded from a previous time step;
    • producing an updated value set (x*t) by replacing () each low-quality value of the current value set (ξt) with each predicted value of the forwarded predicted value set (ŷ(t−1));
    • updating the memory cell (c) and the hidden state (h) based on the updated value set (x*t); and
    • outputting a predicted value set (ŷ(t+1)) for forwarding to a successive time step up until completion.

Clause 8. The method of clause 4, wherein predicting (240) the respective predicted value for each low-quality value at each time step (102) in the time series (100) comprises backward modeling (130), in post processing of the time steps (102) in the time series (100) of the data gap (110), the respective predicted value for each low-quality value in each given time step (102).

Clause 9. The method of clause 8, wherein backward modeling (130) comprises using a Long Short-Term Memory (LSTM) neural network (300, 430).

Clause 10. The method of clause 8, wherein backward modeling (130) comprises:

    • encoding a memory cell (c), a hidden state (h), and a predicted value set (ŷ) based on the high-quality values (x) in an input sequence in the time series after the data group; and
    • decoding, for each current time step from a last time step (τ) to a first time step (0) in the time series of the data gap, by successively performing the acts of:
    • inputting a current value set (ξτ) of the flow values for the current time step;
    • inputting the predicted value set (ŷ(τ+1)) back fed from a later time step;
    • producing an updated value set (x*τ) by replacing () each low-quality value of the current value set (ξτ) with each predicted value of the back fed predicted value set (ŷ(τ+1));
    • updating the memory cell (c) and the hidden state (h) based on the updated value set (x*τ); and
    • outputting the predicted value set (x*τ) for back feeding to an earlier time step until completion.

Clause 11. The method of any one of clauses 1 to 10, wherein calculating (210) the flow rates of the multiphase components in the fluid flow being oil/water two-phase (liquid/liquid) flow comprises:

    • calculating a speed of sound (SoS) in an infinite medium based on the Wood equation (212), the Korteweg-Lamb equation (214), and first parameters, the first parameters including a temperature value (V) and a pressure value (P) from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value (SoS) being of low quality, otherwise the SoS parameter being the SoS value (SoS) of high-quality; and
    • determining a water-in-liquid ratio (WLR) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties (206) of the multiphase components in the fluid flow.

Clause 12. The method of clause 11, further comprising:

    • calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and
    • calculating phase flow rates (Qoil, Qwater) for the oil/water two-phase (liquid/liquid) flow based on the determined WLR and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

Clause 13. The method of any one of clauses 1 to 10, wherein calculating the flow rates of the multiphase components in the fluid flow being oil/gas two-phase (gas/liquid) flow comprises:

    • calculating a speed of sound (SoS) in an infinite medium based on the Wood equation, the Korteweg-Lamb equation, and first parameters, the first parameters including a temperature value and a pressure value from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value being of low quality, otherwise the SoS parameter being the SoS value of high-quality; and
    • determining a liquid volume fraction (LVF) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties (206) of the multiphase components in the fluid flow.

Clause 14. The method of clause 13, further comprising:

    • calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and
    • calculating phase flow rates (Qgas, Qoil) for the gas/oil two-phase (gas/liquid) flow based on the determined LVF and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

Clause 15. The method of any one of clauses 11 to 14, further comprising determining the single-phase properties of the multiphase components of the fluid flow based on an analysis of a bottomhole fluid sample.

Clause 16. The method of any one of clauses 1 to 15, wherein at least one of:

    • the step of calculating (210) the flow rates of the multiphase components in the fluid flow comprises calculating a total flow rate (Qtotal) and calculating phase flow rates of one or more of oil (Qoil), water (Qwater), and gas (Qgas);
    • the method further comprises at least one of: adjusting well production based on the calculated flow rates; adjusting, based on the calculated flow rates, one or more inflow control devices on the conduit (20) in the wellbore (12); allocating production quantities based on the calculated flow rates; and preventing corrosion based on the calculated flow rates; and
    • the method further comprises sensing the flow values by using an optical flowmeter (45) for the at least one flowmeter (40); and optionally the act of sensing comprises using a distributed acoustic sensing (DAS) system, the DAS system being communicatively coupled to a first optical waveguide of the optical flowmeter (45) or having a second optical waveguide separate from the optical flowmeter (45).

Clause 17. A non-transitory computer-readable medium comprising instructions executable by a processing system (50) to perform operation to characterize fluid flow in a conduit (20) disposed in a wellbore (12), the operations comprising the steps of the method according to any one of clauses 1 to 16.

Clause 18. A system used to characterize fluid flow in a conduit (20) disposed in a wellbore (12), the system comprising:

    • an apparatus disposed on the conduit (20) in the wellbore (12), the apparatus being configured to measure a time series of flow values of the fluid flow in real-time at at least one location in the conduit (20); and
    • a processing system (50) in communication with the apparatus and being configured to perform the method according to any one of clauses 1 to 16.

The foregoing description of preferred and other embodiments is not intended to limit or restrict the scope or applicability of the inventive concepts conceived of by the Applicants. It will be appreciated with the benefit of the present disclosure that features described above in accordance with any embodiment or aspect of the disclosed subject matter can be utilized, either alone or in combination, with any other described feature, in any other embodiment or aspect of the disclosed subject matter.

In exchange for disclosing the inventive concepts contained herein, the Applicants desire all patent rights afforded by the appended claims. Therefore, it is intended that the appended claims include all modifications and alterations to the full extent that they come within the scope of the following claims or the equivalents thereof.

Claims

1. A method of characterizing fluid flow in a conduit disposed in a wellbore, the method comprising:

obtaining, at a processing system, a time series of flow values of the fluid flow measured in real-time at at least one location in the conduit using at least one flowmeter;

determining, at the processing system, that any given one or more of the flow values at any given time step in the time series is a low-quality value of low-quality, each of any remaining ones of the flow values at the given time step being a high-quality value of high-quality;

predicting, at the processing system based on the high-quality values in the time series, a respective predicted value for each low-quality value at each given time step in the time series; and

calculating, at the processing system based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.

2. The method of claim 1, wherein:

obtaining the time series of the flow values comprises obtaining, at each time step in the time series, the flow values at least including a pressure value, a temperature value, a bulk velocity value, and a speed of sound (SoS) value associated with the fluid flow; and

determining that the any given one or more of the flow values is of low-quality comprises determining that any of at least one of the bulk velocity value and the SoS value is of low-quality having a respective quality below a respective threshold.

3. The method of claim 2, wherein determining that the SoS value is of low-quality comprises determining that at least one of: (i) a speed of sound (SoS+) of waves opposite to a flow direction of the fluid flow and (ii) a speed of sound (SoS−) of waves in the flow direction has the respective quality below the respective threshold.

4. The method of claim 1, wherein calculating the flow rates of the multiphase components in the fluid flow comprises calculating a total flow rate and calculating phase flow rates of one or more of oil, water, and gas.

5. The method of claim 1, further comprising at least one of: adjusting well production based on the calculated flow rates; adjusting zonal production in a multi-zone well based on the calculated flow rates; adjusting one or more inflow control devices on the conduit in the wellbore based on the calculated flow rates; allocating production quantities based on the calculated flow rates; and preventing corrosion based on the calculated flow rates.

6. The method of claim 1, wherein determining comprises detecting a data gap in the time steps of the time series having the any given one or more of the flow values determined to be of low-quality.

7. The method of claim 6, wherein predicting the respective predicted value for each low-quality value at each given time step in the time series comprises forward modeling, in real-time processing of the time steps in the time series of the data gap, the respective predicted value for each low-quality value in each given time step.

8. The method of claim 7, wherein forward modeling comprises using a Long Short-Term Memory (LSTM) neural network.

9. The method of claim 7, wherein forward modeling comprises:

encoding a memory cell, a hidden state, and a predicted value set based on the high-quality values in an input sequence in the time series before the data gap; and

decoding, for each current time step from a start time step to a later time step in the time series of the data gap, by successively performing the acts of:

inputting a current value set of the flow values for the current time step;

inputting a predicted value set forwarded from a previous time step;

producing an updated value set by replacing each low-quality value of the current value set with each predicted value of the forwarded predicted value set;

updating the memory cell and the hidden state based on the updated value set; and

outputting a predicted value set for forwarding to a successive time step up until completion.

10. The method of claim 6, wherein predicting the respective predicted value for each low-quality value at each time step in the time series comprises backward modeling, in post processing of the time steps in the time series of the data gap, the respective predicted value for each low-quality value in each given time step.

11. The method of claim 10, wherein backward modeling comprises using a Long Short-Term Memory (LSTM) neural network.

12. The method of claim 10, wherein backward modeling comprises:

encoding a memory cell, a hidden state, and a predicted value set based on the high-quality values in an input sequence in the time series after the data gap; and

decoding, for each current time step from a last time step to a first time step in the time series of the data gap, by successively performing the acts of:

inputting a current value set of the flow values for the current time step;

inputting a predicted value set back fed from a later time step;

producing an updated value set by replacing each low-quality value of the current value set with each predicted value of the back fed predicted value set;

updating the memory cell and the hidden state based on the updated value set; and

outputting a predicted value set for back feeding to an earlier time step up until completion.

13. The method of claim 1, wherein calculating the flow rates of the multiphase components in the fluid flow being oil/water two-phase (liquid/liquid) flow comprises:

calculating a speed of sound (SoS) in an infinite medium based on the Wood equation, the Korteweg-Lamb equation, and first parameters, the first parameters including a temperature value and a pressure value from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value being of low quality, otherwise the SoS parameter being the SoS value of high-quality; and

determining a water-in-liquid ratio (WLR) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties of the multiphase components in the fluid flow.

14. The method of claim 13, wherein calculating the flow rates comprises:

calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and

calculating phase flow rates (Qoil, Qwater) for the oil/water two-phase (liquid/liquid) flow based on the determined WLR and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

15. The method of claim 13, further comprising determining the single-phase properties of the multiphase components of the fluid flow based on an analysis of a bottomhole fluid sample.

16. The method of claim 1, wherein calculating the flow rates of the multiphase components in the fluid flow being oil/gas two-phase (gas/liquid) flow comprises:

calculating a speed of sound (SoS) in an infinite medium based on the Wood equation, the Korteweg-Lamb equation, and first parameters, the first parameters including a temperature value and a pressure value from the flow values and including an SoS parameter, the SoS parameter being the respective predicted value for an SoS value being of low quality, otherwise the SoS parameter being the SoS value of high-quality; and

determining a liquid volume fraction (LVF) of the fluid flow at the at least one location based on the SoS in the infinite medium, the first parameters, and single-phase properties of the multiphase components in the fluid flow.

17. The method of claim 16, wherein calculating the flow rates comprises:

calculating a total flow rate (Qtotal) based on the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for a bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality; and

calculating phase flow rates (Qgas, Qoil) for the gas/oil two-phase (gas/liquid) flow based on the determined LVF and the bulk velocity parameter, the bulk velocity parameter being the respective predicted value for the bulk velocity value being of low quality, otherwise the bulk velocity parameter being the bulk velocity value of high-quality.

18. The method of claim 16, further comprising determining the single-phase properties of the multiphase components of the fluid flow based on an analysis of a bottomhole fluid sample.

19. The method of claim 1, further comprising sensing the flow values by using an optical flowmeter for the at least one flowmeter.

20. The method of claim 19, wherein sensing the flow values further comprises using a distributed acoustic sensing (DAS) system, the DAS system being communicatively coupled to a first optical waveguide of the optical flowmeter or having a second optical waveguide separate from the optical flowmeter.

21. A non-transitory computer-readable medium comprising instructions executable by a processing system to perform operations to characterize fluid flow in a conduit disposed in a wellbore, the operations comprising:

obtaining a time series of flow values of the fluid flow measured in real-time using at least one flowmeter at at least one location in the conduit;

determining, at each time step in the time series, that any one or more of the flow values is of low-quality as a low-quality value, any remaining ones of the flow values each being a high-quality value of high-quality;

predicting, based on the high-quality values in the time series, a respective predicted value for each low-quality value at each time step in the time series; and

calculating, based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.

22. A system used to characterize fluid flow in a conduit disposed in a wellbore, the system comprising:

an apparatus disposed on the conduit in the wellbore, the apparatus being configured to measure a time series of flow values of the fluid flow in real-time at at least one location in the conduit; and

a processing system in communication with the apparatus and being configured to:

obtain the time series of the flow values;

determine, at each time step in the time series, that any given one or more of the flow values is a low-quality value of low-quality, any remaining ones of the flow values each being a high-quality value of high-quality;

predict, based on the high-quality values in the time series, a respective predicted value for each low-quality value at each time step in the time series; and

calculate, based on the respective predicted values and the high-quality values, flow rates of multiphase components in the fluid flow at the at least one location.