Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHODS FOR IMPROVING PERFORMANCE OF AUTOMATED COILED TUBING OPERATIONS
Document Type and Number:
WIPO Patent Application WO/2022/271594
Kind Code:
A1
Abstract:
Systems and methods presented herein facilitate coiled tubing operations, and generally relate to the use of flow modeling to generate flow-related data that cannot be measured in order to take real-time decisions and real-time predictions on the outcome of future potential actions to be taken by engineers or artificial intelligence to optimize operation performance together with a general method for parameter inference for any uncertain parameters deemed important when designing cleanout operations. In certain situations, a pre-conditioning method for the determination of a reservoir pressure parameter may be used to reduce the effect of its uncertainty on design fidelity. In addition, in certain situations, a pre-conditioning method for the determination of a reservoir inflow performance parameter may be used to reduce the effect of its uncertainty on design fidelity.

Inventors:
TARDY PHILIPPE MICHEL JACQUES (US)
SEGURA DOMINGUEZ JORDI JUAN (NO)
VARVEROPOULOS VASSILIS (US)
SU TIANXIANG (US)
FOSSATI LAURENCE CATHY (US)
DVORAK FILIP (US)
GEORGET STEPHANE (FR)
Application Number:
PCT/US2022/034173
Publication Date:
December 29, 2022
Filing Date:
June 20, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SCHLUMBERGER TECHNOLOGY CORP (US)
SCHLUMBERGER CA LTD (CA)
SERVICES PETROLIERS SCHLUMBERGER (FR)
SCHLUMBERGER TECHNOLOGY BV (NL)
International Classes:
E21B43/12; E21B17/04; E21B47/04; E21B47/06; E21B47/10
Domestic Patent References:
WO2016044026A12016-03-24
Foreign References:
US20070256489A12007-11-08
US20190032480A12019-01-31
EP3545161B12021-02-17
US20150040657A12015-02-12
Attorney, Agent or Firm:
FLYNN, Michael L. et al. (US)
Download PDF:
Claims:
CLAIMS

1. A method, comprising:

(a) accessing, via a processing system, a real-time pumping schedule for a pump unit configured to pump one or more fluids downhole into a wellbore via coiled tubing, wherein the real-time pumping schedule specifies one or more operational parameters relating to pumping of the one or more fluids downhole into the wellbore via the coiled tubing;

(b) executing, via the processing system, a forward model to predict values of one or more measurable input parameters relating to pumping of the one or more fluids;

(c) accessing, via the processing system, current measurements of the one or more measurable input parameters detected by one or more sensors;

(d) executing, via the processing system, an inverse model to predict one or more unmeasurable input parameters relating to pumping of the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and the current measurements of the one or more measurable input parameters; and

(e) estimating, via the processing system, one or more additional unmeasurable input parameters based at least in part on the one or more measurable input parameters and the one or more unmeasurable input parameters.

2. The method of claim 1, wherein the one or more operational parameters specified by the real-time pumping schedule comprise types of the one or more fluids, flow rates of the one or more fluids, pressures in the wellbore as a function of depth along the wellbore, a speed of movement of the coiled tubing through the wellbore, or some combination thereof.

3. The method of claim 1, wherein the one or more measurable input parameters comprise the one or more operational parameters specified by the real-time pumping schedule.

4. The method of claim 1, wherein the forward model uses one or more static parameters and one or more dynamic parameters as inputs.

5. The method of claim 4, wherein the one or more static parameters comprise a hole survey of the wellbore, geometry of the wellbore, completion diagram of the wellbore, one or more properties of the one or more fluids, one or more properties of the coiled tubing, and one or more properties of a reservoir.

6. The method of claim 4, wherein the one or more dynamic parameters comprise current measurements of the one or more measurable input parameters.

7. The method of claim 4, wherein the inverse model predicts values of the one or more static parameters.

8. The method of claim 4, wherein the inverse model evaluates an error between the predicted values of one or more measurable input parameters and current measurements of the one or more measurable input parameters, and adjusts the one or more static parameters to minimize the error.

9. The method of claim 4, comprising pre-conditioning execution of the forward model and the inverse model by using an estimated reservoir pressure as a static parameter of the one or more static parameters.

10. The method of claim 4, comprising pre-conditioning execution of the forward model and the inverse model by using an estimated reservoir inflow parameter as a static parameter of the one or more static parameters.

11. The method of claim 1, wherein the one or more additional unmeasurable input parameters comprise fluid density information associated with the one or more fluids.

12. The method of claim 11, wherein the fluid density information is estimated based at least in part on the one or more measurable input parameters comprising a pressure measurement by a fixed downhole pressure gauge.

13. The method of claim 1, wherein at least steps (b)-(e) are performed iteratively via the processing system.

14. A processing system, comprising: one or more processors; one or more storage media; and one or more analysis modules comprising computer-executable instructions and associated data, wherein the computer-executable instructions, when executed by the one or more processors, cause the one or more processors to generate a plurality of models stored and updated in the one or more storage media, wherein the plurality of models comprises: a forward model configured to predict values of one or more measurable input parameters relating to pumping one or more fluids downhole into a wellbore via coiled tubing; and an inverse model configured to predict one or more unmeasurable input parameters relating to pumping the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and current measurements of the one or more measurable input parameters.

15. The processing system of claim 14, comprising a network interface configured to communicate with a plurality of sensors.

16. The processing system of claim 15, wherein the plurality of sensors comprises a plurality of downhole sensors and a plurality of surface sensors.

17. The processing system of claim 15, wherein the current measurements of the one or more measurable input parameters are detected by the plurality of sensors.

18. The processing system of claim 14, wherein the plurality of models comprises a mechanical model configured to use the predicted values of the one or more measurable input parameters to predict forces applied to the coiled tubing.

19. The processing system of claim 14, wherein the one or more processors comprises one or more machine learning or artificial intelligence based processors, wherein the processing system is configured to perform modeling or simulation using the one or more machine learning or artificial intelligence based processors, one or more machine learning or AI based algorithms stored in the one or more storage media, or a combinations thereof.

20. A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause one or more processors to: access a real-time pumping schedule for a pump unit configured to pump one or more fluids downhole into a wellbore via coiled tubing, wherein the real-time pumping schedule specifies one or more operational parameters relating to pumping of the one or more fluids; generate a first model configured to predict values of one or more measurable input parameters relating to pumping of the one or more fluids; access current measurements of the one or more measurable input parameters detected by one or more sensors; generate a second model configured to predict one or more unmeasurable input parameters relating to pumping the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and the current measurements of the one or more measurable input parameters; and estimate one or more additional unmeasurable input parameter based at least in part on the one or more measurable input parameters and the one or more unmeasurable input parameters.

Description:
METHODS FOR IMPROVING PERFORMANCE OF AUTOMATED COILED TUBING OPERATIONS

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application claims priority to and the benefit of U.S. Provisional Patent Application Serial No. 63/212,916, entitled “Methods for Improving Performance of Automated Coiled Tubing Operations,” filed June 21, 2021, which is hereby incorporated by reference in its entirety for all purposes.

BACKGROUND

[0002] The present disclosure generally relates to systems and methods for automatically improving performance of coiled tubing operations in substantially real time.

[0003] This section is intended to introduce the reader to various aspects of art that may be related to various aspects of the present techniques, which are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as an admission of any kind.

[0004] In many well applications, coiled tubing is employed to facilitate performance of many types of downhole operations. Coiled tubing offers versatile technology due in part to its ability to pass through completion tubulars while conveying a wide array of tools downhole. A coiled tubing system may comprise many systems and components, including a coiled tubing reel, an injector head, a gooseneck, lifting equipment (e.g., a mast or a crane), and other supporting equipment such as pumps, treating irons, or other components. Coiled tubing has been utilized for performing well treatment and/or well intervention operations in existing wellbores such as hydraulic fracturing operations, matrix acidizing operations, milling operations, perforating operations, coiled tubing drilling operations, and various other types of operations.

SUMMARY

[0005] A summary of certain embodiments described herein is set forth below. It should be understood that these aspects are presented merely to provide the reader with a brief summary of these certain embodiments and that these aspects are not intended to limit the scope of this disclosure.

[0006] In one non-limiting embodiment, a method may include accessing, via a processing system, a real-time pumping schedule for a pump unit configured to pump one or more fluids downhole into a wellbore via coiled tubing. The real-time pumping schedule specifies one or more operational parameters relating to pumping of the one or more fluids downhole into the wellbore via the coiled tubing. The method may also include executing, via the processing system, a forward model to predict values of one or more measurable input parameters relating to pumping of the one or more fluids. The method may further include accessing, via the processing system, current measurements of the one or more measurable input parameters detected by one or more sensors. In addition, the method may include executing, via the processing system, an inverse model to predict one or more unmeasurable input parameters relating to pumping of the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and the current measurements of the one or more measurable input parameters. The method may also include estimating, via the processing system, one or more additional unmeasurable input parameters based at least in part on the one or more measurable input parameters and the one or more unmeasurable input parameters.

[0007] In another example embodiment, a processing system may include one or more processors, one or more storage media, and one or more analysis modules comprising computer- executable instructions and associated data. The computer-executable instructions, when executed by the one or more processors, may cause the one or more processors to generate a plurality of models stored and updated in the one or more storage media. The plurality of models may include a forward model configured to predict values of one or more measurable input parameters relating to pumping one or more fluids downhole into a wellbore via coiled tubing. The plurality of models may also include an inverse model configured to predict one or more unmeasurable input parameters relating to pumping the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and current measurements of the one or more measurable input parameters.

[0008] In another example embodiment, a non-transitory computer-readable medium may include instructions that, when executed by one or more processors, cause the one or more processors to access a real-time pumping schedule for a pump unit configured to pump one or more fluids downhole into a wellbore via coiled tubing, wherein the real-time pumping schedule specifies one or more operational parameters relating to pumping of the one or more fluids; to generate a first model configured to predict values of one or more measurable input parameters relating to pumping of the one or more fluids; to access current measurements of the one or more measurable input parameters detected by one or more sensors; to generate a second model configured to predict one or more unmeasurable input parameters relating to pumping the one or more fluids based on a comparison of the predicted values of the one or more measurable input parameters and the current measurements of the one or more measurable input parameters; and to estimate one or more additional unmeasurable input parameter based at least in part on the one or more measurable input parameters and the one or more unmeasurable input parameters.

[0009] Various refinements of the features noted above may be undertaken in relation to various aspects of the present disclosure. Further features may also be incorporated in these various aspects as well. These refinements and additional features may exist individually or in any combination. For instance, various features discussed below in relation to one or more of the illustrated embodiments may be incorporated into any of the above-described aspects of the present disclosure alone or in any combination. The brief summary presented above is intended to familiarize the reader with certain aspects and contexts of embodiments of the present disclosure without limitation to the claimed subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Various aspects of this disclosure may be better understood upon reading the following detailed description and upon reference to the drawings, in which:

[0011] FIG. 1 illustrates a schematic diagram of an example coiled tubing system, in accordance with embodiments of the present disclosure; [0012] FIG. 2 illustrates a well control system including a surface processing system to control the coiled tubing system of FIG. 1, in accordance with embodiments of the present disclosure;

[0013] FIG. 3 illustrates example flow modeling used to automate certain decisions, in accordance with embodiments of the present disclosure;

[0014] FIG. 4 illustrates an example forward model used in substantially real time, in accordance with embodiments of the present disclosure;

[0015] FIG. 5 illustrates an example inverse model used in substantially real time, in accordance with embodiments of the present disclosure;

[0016] FIG. 6 illustrates a wellhead pressure as a function of fluid levels to true vertical depth, in accordance with embodiments of the present disclosure;

[0017] FIG. 7 illustrates a wellhead pressure as a function of fluid levels to true vertical depth of a bottom hole assembly, in accordance with embodiments of the present disclosure;

[0018] FIG. 8 illustrates flow and pressure during a flow test, in accordance with embodiments of the present disclosure; and

[0019] FIG. 9 illustrates an example plot of stabilized values of flow versus reservoir pressure relative to a given wellbore pressure, in accordance with embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] One or more specific embodiments of the present disclosure will be described below. These described embodiments are only examples of the presently disclosed techniques. Additionally, in an effort to provide a concise description of these embodiments, all features of an actual implementation may not be described in the specification. It should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers’ specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another. Moreover, it should be appreciated that such a development effort might be complex and time consuming, but would nevertheless be a routine undertaking of design, fabrication, and manufacture for those of ordinary skill having the benefit of this disclosure.

[0021] When introducing elements of various embodiments of the present disclosure, the articles “a,” “an,” and “the” are intended to mean that there are one or more of the elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Additionally, it should be understood that references to “one embodiment” or “an embodiment” of the present disclosure are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the recited features.

[0022] As used herein, the terms “connect,” “connection,” “connected,” “in connection with,” and “connecting” are used to mean “in direct connection with” or “in connection with via one or more elements”; and the term “set” is used to mean “one element” or “more than one element.” Further, the terms “couple,” “coupling,” “coupled,” “coupled together,” and “coupled with” are used to mean “directly coupled together” or “coupled together via one or more elements.” As used herein, the terms “up” and “down,” “uphole” and “downhole”, “upper” and “lower,” “top” and “bottom,” and other like terms indicating relative positions to a given point or element are utilized to more clearly describe some elements. Commonly, these terms relate to a reference point as the surface from which drilling operations are initiated as being the top (e.g., uphole or upper) point and the total depth along the drilling axis being the lowest (e.g., downhole or lower) point, whether the well (e.g., wellbore, borehole) is vertical, horizontal or slanted relative to the surface.

[0023] As used herein, a fracture shall be understood as one or more cracks or surfaces of breakage within rock. Fractures can enhance permeability of rocks greatly by connecting pores together and, for that reason, fractures can be induced mechanically in some reservoirs in order to boost hydrocarbon flow. Certain fractures may also be referred to as natural fractures to distinguish them from fractures induced as part of a reservoir stimulation. Fractures can also be grouped into fracture clusters (or “perf clusters”) where the fractures of a given fracture cluster (perf cluster) connect to the wellbore through a single perforated zone. As used herein, the term “fracturing” refers to the process and methods of breaking down a geological formation and creating a fracture (i.e., the rock formation around a well bore) by pumping fluid at relatively high pressures (e.g., pressure above the determined closure pressure of the formation) in order to increase production rates from a hydrocarbon reservoir.

[0024] In addition, as used herein, the terms “real time”, “real-time”, or “substantially real time” may be used interchangeably and are intended to described operations (e.g., computing operations) that are performed without any human-perceivable interruption between operations. For example, as used herein, data relating to the systems described herein may be collected, transmitted, and/or used in control computations in “substantially real time” such that data readings, data transfers, and/or data processing steps occur once every second, once every 0.1 second, once every 0.01 second, or even more frequent, during operations of the systems (e.g., while the systems are operating). In addition, as used herein, the terms “automatic” and “automated” are intended to describe operations that are performed are caused to be performed, for example, by a processing system (i.e., solely by the processing system, without human intervention).

[0025] The embodiments described herein generally include systems and methods that facilitate operations of well-related tools (e.g., surface tools, downhole tools). In certain embodiments, a variety of data (e.g., downhole data and/or surface data) may be collected to enable optimization of operations related to the well-related tools. In certain embodiments, the collected data may be provided as advisory data (e.g., presented to operators of wells to inform control actions performed by the operators) and/or used to facilitate automation of downhole processes and/or surface processes (e.g., which may be automatically performed by a computer implemented surface processing system (e.g., a well control system), without intervention from the operators). In certain embodiments, the systems and methods described herein may enhance downhole operations by improving the efficiency and utilization of data to enable performance optimization and improved resource controls of the downhole operations. In certain embodiments, a downhole well tool may be deployed downhole into a wellbore via coiled tubing. In certain embodiments, the systems and methods described herein may be used for displaying or otherwise outputting desired (e.g., optimal) actions to the operators so as to enable improved decision-making regarding the operations of the well-related tool (e.g., operations of a downhole or surface system/device).

[0026] In certain embodiments, downhole parameters are obtained via, for example, downhole sensors while a downhole well tool is disposed in the wellbore. In certain embodiments, the downhole parameters may be obtained by the downhole sensors in substantially real time (e.g., as the downhole data is detected while the downhole well tool is being operated) and sent to the surface processing system (or other suitable processing system) via wired or wireless telemetry. The downhole parameters may be combined with surface parameters. In certain embodiments, the downhole and/or surface parameters may be processed during operations of the downhole well tool to enable automatic optimization (e.g., by the surface processing system, without human intervention) with respect to the operations of the downhole well tool during subsequent stages of well tool operation.

[0027] The embodiments described herein may be used to overcome certain disadvantages or shortcomings of existing systems and methods. For example, the embodiments described herein may facilitate the control of downhole and surface pressures and flow rates during coiled tubing operations by, for example, orchestration of pump and flowback controls, and further optimization via substantially real-time downhole and/or surface measurements. In certain embodiments, pressure and flow rate measurements at both pumps and flowback equipment, in addition to integrated choke control and pump controls, may be used by the surface processing system described herein (e.g., including programmable logic controllers (PLCs)).

[0028] In addition, the embodiments described herein generally relate to the use of flow modeling to generate flow-related data that may not be measured in order to make real-time decisions and real-time predictions on the outcome of future potential actions to be taken by engineers or artificial intelligence to optimize operation performance. As described in greater detail herein, in certain embodiments, a general method for parameter inference for any uncertain parameters deemed important when designing cleanout operations may be utilized. In certain embodiments, a pre-conditioning method for the determination of a reservoir pressure parameter may be used to reduce the effect of its uncertainty on design fidelity. In addition, in certain embodiments, a pre-conditioning method for the determination of a reservoir inflow performance parameter may be used to reduce the effect of its uncertainty on design fidelity.

[0029] With the foregoing in mind, FIG. 1 illustrates a schematic diagram of an example coiled tubing system 10. As illustrated, in certain embodiments, a coiled tubing string 12 may be run into a wellbore 14 that traverses a hydrocarbon-bearing reservoir 16. While certain elements of the coiled tubing system 10 are illustrated in FIG. 1, other elements of the coiled tubing system 10 (e.g., blow-out preventers, wellhead “tree”, etc.) may be omitted for clarity of illustration. In certain embodiments, the coiled tubing system 10 includes an interconnection of pipes, including vertical and/or horizontal casings 18, coiled tubing 20, and so forth, that connect to a surface facility 22 at the surface 24 of the coiled tubing system 10. In certain embodiments, the coiled tubing 20 extends inside the casing 18 and terminates at a tubing head (not shown) at or near the surface 24. In addition, in certain embodiments, the casing 18 contacts the wellbore 14 and terminates at a casing head (not shown) at or near the surface 24.

[0030] In certain embodiments, a bottom hole assembly (“BHA”) 26 may be run inside the casing 18 by the coiled tubing 20. As illustrated in FIG. 1, in certain embodiments, the BHA 26 may include a downhole motor 28 that operates to rotate a drill bit 30 (e.g., during drilling operations) or other downhole tools. In certain embodiments, the downhole motor 28 may be driven by hydraulic forces carried in fluid supplied from the surface 24 of the coiled tubing system 10. In certain embodiments, the BHA 26 may be connected to the coiled tubing 20, which is used to run the BHA 26 to a desired location within the wellbore 14. It is also contemplated that, in certain embodiments, the rotary motion of the drill bit 30 may be driven by rotation of the coiled tubing 20 effectuated by a rotary table or other surface-located rotary actuator. In such embodiments, the downhole motor 28 may be omitted.

[0031] In certain embodiments, the coiled tubing 20 may also be used to deliver fluid 32 to the drill bit 30 through an interior of the coiled tubing 20 to aid in the drilling process and carry cuttings and possibly other fluid or solid components in return fluid 34 that flows up the annulus between the coiled tubing 20 and the casing 18 (or via a return flow path provided by the coiled tubing 20, in certain embodiments) for return to the surface facility 22. It is also contemplated that the return fluid 34 may include remnant proppant (e.g., sand) or possibly rock fragments that result from a hydraulic fracturing application, and flow within the coiled tubing system 10.

Under certain conditions, fracturing fluid and possibly hydrocarbons (oil and/or gas), proppants and possibly rock fragments may flow from the fractured reservoir 16 through perforations in a newly opened interval and back to the surface 24 of the coiled tubing system 10 as part of the return fluid 34. In certain embodiments, the BHA 26 may be supplemented behind the rotary drill by an isolation device such as, for example, an inflatable packer that may be activated to isolate the zone below or above it and enable local pressure tests.

[0032] As such, in certain embodiments, the coiled tubing system 10 may include a downhole well tool 36 that is moved along the wellbore 14 via the coiled tubing 20. In certain embodiments, the downhole well tool 36 may include a variety of drilling/cutting tools coupled with the coiled tubing 20 to provide a coiled tubing string 12. In the illustrated embodiment, the downhole well tool 36 includes the drill bit 30, which may be powered by the downhole motor 28 (e.g., a positive displacement motor (PDM), or other hydraulic motor) of the BHA 26. In certain embodiments, the wellbore 14 may be an open wellbore or a cased wellbore defined by the casing 18. In addition, in certain embodiments, the wellbore 14 may be vertical or horizontal or inclined. It should be noted the downhole well tool 36 may be part of various types of BHAs 26 coupled to the coiled tubing 20.

[0033] As also illustrated in FIG. 1, in certain embodiments, the coiled tubing system 10 may include a downhole sensor package 38 having multiple downhole sensors 40. In certain embodiments, the sensor package 38 may be mounted along the coiled tubing string 12, although certain downhole sensors 40 may be positioned at other downhole locations in other embodiments. In certain embodiments, data from the downhole sensors 40 may be relayed uphole to a surface processing system 42 (e.g., a computer-based processing system) disposed at the surface 24 and/or other suitable location of the coiled tubing system 10. In certain embodiments, the data may be relayed uphole in substantially real time (e.g., relayed while it is detected by the downhole sensors 40 during operation of the downhole well tool 36) via a wired or wireless telemetric control line 44, and this real-time data may be referred to as edge data. In certain embodiments, the telemetric control line 44 may be in the form of an electrical line, fiber optic line, or other suitable control line for transmitting data signals. In certain embodiments, the telemetric control line 44 may be routed along an interior of the coiled tubing 20, within a wall of the coiled tubing 20, or along an exterior of the coiled tubing 20. In addition, as described in greater detail herein, additional data (e.g., surface data) may be supplied by surface sensors 46 and/or stored in a memory location 48. By way of example, historical data and other useful data may be stored in the memory location 48 such as a cloud storage 50.

[0034] As illustrated, in certain embodiments, the coiled tubing 20 may deployed by a coiled tubing unit 52 and delivered downhole via an injector head 54. In certain embodiments, the injector head 54 may be controlled to slack off or pick up the coiled tubing 20 so as to control the tubing string weight and, thus, the weight on bit (WOB) acting on the drill bit 30 (or the downhole well tool 36). In certain embodiments, the downhole well tool 36 may be moved along the wellbore 14 via the coiled tubing 20 under control of the injector head 54 so as to apply a desired tubing weight and, thus, to achieve a desired rate of penetration (ROP) as the drill bit 30 is operated. Depending on the specifics of a given application, various types of data may be collected downhole, and transmitted to the surface processing system 42 in substantially real time to facilitate improved operation of the downhole well tool 36. For example, the data may be used to fully or partially automate downhole operations, to optimize the downhole operations, and/or to provide more accurate predictions regarding components or aspects of the downhole operations.

[0035] In certain embodiments, fluid 32 may be delivered downhole under pressure from a pump unit 56. In certain embodiments, the fluid 32 may be delivered by the pump unit 56 through the downhole hydraulic motor 28 to power the downhole hydraulic motor 28 and, thus, the drill bit 30. In certain embodiments, the return fluid 34 is returned uphole, and this flow back of the return fluid 34 is controlled by suitable flowback equipment 58. In certain embodiments, the flowback equipment 58 may include chokes and other components/equipment used to control flow back of the return fluid 34 in a variety of applications, including well treatment applications.

[0036] As described in greater detail herein, the pump unit 56 and the flowback equipment 58 may include advanced sensors, actuators, and local controllers, such as PLCs, which may cooperate together to provide sensor data to, receive control signals from, and generate local control signals based on communications with, respectively, the surface processing system 42.

In certain embodiments, as described in greater detail herein, the sensors may include flow rate, pressure, and fluid rheology sensors, among other types of sensors. In addition, as described in greater detail herein, the actuators may include actuators for pump and choke control of the pump unit 56 and the flowback equipment 58, respectively, among other types of actuators.

[0037] FIG. 2 illustrates a well control system 60 that may include the surface processing system 42 to control the coiled tubing system 10 described herein. In certain embodiments, the surface processing system 42 may include one or more analysis modules 62 (e.g., a program of computer-executable instructions and associated data) that may be configured to perform various functions of the embodiments described herein. In certain embodiments, to perform these various functions, the one or more analysis modules 62 may execute on one or more processors 64 of the surface processing system 42, which may be connected to one or more storage media 66 of the surface processing system 42. Indeed, in certain embodiments, the one or more analysis modules 62 may be stored in the one or more storage media 66.

[0038] In certain embodiments, the computer-executable instructions of the one or more analysis modules 62, when executed by the one or more processors 64, may cause the one or more processors 64 to generate one or more models (e.g., forward model, inverse model, mechanical model, and so forth). Such models may be used by the surface processing system 42 to predict values of operational parameters that may or may not be measured (e.g., using gauges, sensors) during well operations.

[0039] In certain embodiments, the one or more processors 64 may include a microprocessor, a microcontroller, a processor module or subsystem, a programmable integrated circuit, a programmable gate array, a digital signal processor (DSP), or another control or computing device. In certain embodiments, the one or more processors 64 may include machine learning and/or artificial intelligence (AI) based processors. In certain embodiments, the one or more storage media 66 may be implemented as one or more non-transitory computer-readable or machine-readable storage media. In certain embodiments, the one or more storage media 66 may include one or more different forms of memory including semiconductor memory devices such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; optical media such as compact disks (CDs) or digital video disks (DVDs); or other types of storage devices. Note that the computer-executable instructions and associated data of the analysis module(s) 62 may be provided on one computer-readable or machine-readable storage medium of the storage media 66, or alternatively, may be provided on multiple computer-readable or machine-readable storage media distributed in a large system having possibly plural nodes. Such computer-readable or machine-readable storage medium or media are considered to be part of an article (or article of manufacture), which may refer to any manufactured single component or multiple components. In certain embodiments, the one or more storage media 66 may be located either in the machine running the machine-readable instructions, or may be located at a remote site from which machine-readable instructions may be downloaded over a network for execution.

[0040] In certain embodiments, the processor(s) 64 may be connected to a network interface 68 of the surface processing system 42 to allow the surface processing system 42 to communicate with the multiple downhole sensors 40 and surface sensors 46 described herein, as well as communicate with the actuators 70 and/or PLCs 72 of the surface equipment 74 (e.g., the coiled tubing unit 52, the pump unit 56, the flowback equipment 58, and so forth) and of the downhole equipment 76 (e.g., the BHA 26, the downhole motor 28, the drill bit 30, the downhole well tool 36, and so forth) for the purpose of controlling operation of the coiled tubing system 10, as described in greater detail herein. In certain embodiments, the network interface 68 may also facilitate the surface processing system 42 to communicate data to the cloud storage 50 (or other wired and/or wireless communication network) to, for example, archive the data or to enable external computing systems 78 to access the data and/or to remotely interact with the surface processing system 42.

[0041] It should be appreciated that the well control system 60 illustrated in FIG. 2 is only one example of a well control system, and that the well control system 60 may have more or fewer components than shown, may combine additional components not depicted in the embodiment of FIG. 2, and/or the well control system 60 may have a different configuration or arrangement of the components depicted in FIG. 2. In addition, the various components illustrated in FIG. 2 may be implemented in hardware, software, or a combination of both hardware and software, including one or more signal processing and/or application specific integrated circuits. Furthermore, the operations of the well control system 60 as described herein may be implemented by running one or more functional modules in an information processing apparatus such as application specific chips, such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), systems on a chip (SOCs), or other appropriate devices. These modules, combinations of these modules, and/or their combination with hardware are all included within the scope of the embodiments described herein.

[0042] As described in greater detail herein, the embodiments described herein facilitate the operation of well-related tools. For example, a variety of data (e.g., downhole data and surface data) may be collected to enable optimization of operations of well-related tools such as the downhole well tool 36 illustrated in FIG. 1 by the surface processing system 42 illustrated in FIG. 2 (or other suitable processing systems). In certain embodiments, the data may be provided as advisory data by the surface processing system 42 (or other suitable processing systems). However, in other embodiments, the data may be used to facilitate automation of downhole processes and/or surface processes (i.e., the processes may be automated without human intervention), as described in greater detail herein, by the surface processing system 42 (or other suitable processing system). The embodiments described herein may enhance downhole operations by improving the efficiency and utilization of data to enable performance optimization and improved resource controls.

[0043] As described in greater detail herein, in certain embodiments, downhole parameters may be obtained via, for example, downhole sensors 40 while the downhole well tool 36 is disposed within the wellbore 14. In certain embodiments, the downhole parameters may be obtained in substantially real-time and sent to the surface processing system 42 via wired or wireless telemetry. In certain embodiments, downhole parameters may be combined with surface parameters by the surface processing system 42. In certain embodiments, the downhole and surface parameters may be processed by the surface processing system 42 during use of the downhole well tool 36 to enable automatic (e.g., without human intervention) optimization with respect to use of the downhole well tool 36 during subsequent stages of operation of the downhole well tool 36.

[0044] Examples of downhole parameters that may be sensed in real time include, but are not limited to, weight on bit (WOB), torque acting on the downhole well tool 36, downhole pressures, downhole differential pressures, and other desired downhole parameters. In certain embodiments, downhole parameters may be used by the surface processing system 42 in combination with surface parameters, and such surface parameters may include, but are not limited to, pump-related parameters (e.g., pump rate and circulating pressures of the pump unit 56). In certain embodiments, the surface parameters also may include parameters related to fluid returns (e.g., wellhead pressure, return fluid flow rate, choke settings, amount of proppant returned, and other desired surface parameters). In certain embodiments, the surface parameters also may include data from the coiled tubing unit 52 (e.g., surface weight of the coiled tubing string 12, speed of the coiled tubing 20, rate of penetration, and other desired parameters). In certain embodiments, the surface data that may be processed by the surface processing system 42 to optimize performance also may include previously recorded data such as fracturing data (e.g., close-in pressures from each fracturing stage, proppant data, friction data, fluid volume data, and other desired data). [0045] In certain embodiments, depending on the type of downhole operation, the downhole data and surface data may be combined and processed by the surface processing system 42 to prevent stalls and to facilitate stall recovery with respect to the downhole well tool 36. In addition, in certain embodiments, processing of the downhole and surface data by the surface processing system 42 may also facilitate cooperative operation of the coiled tubing unit 52, the pump unit 56, the flowback equipment 58, and so forth. This cooperation provides synergy that facilitates output of advisory information and/or automation of the downhole process, as well as appropriate adjustment of the rate of penetration (ROP) and pump rates for each individual stage of the operation, by the surface processing system 42. It should be noted that the downhole data and surface data may also be used by the surface processing system 42 to provide advisory information and/or automation of surface processes, such as pumping processes performed by the coiled tubing unit 52, the pump unit 56, the flowback equipment 58, and so forth.

[0046] In certain embodiments, use of the downhole data and surface data enables the surface processing system 42 to self-1 earn (e.g., modeling or simulation using the machine learning or artificial intelligence (AI) based processors, machine learning or AI based algorithms stored in the one or more storage media 66, or a combinations thereof) to provide, for example, optimum downhole WOB and torque in an efficient manner. This real-time modeling by the surface processing system 42, based on the downhole and surface parameters, enables improved prediction of WOB, torque acting on the downhole well tool 36, downhole pressures, and pressure differentials. Such modeling by the surface processing system 42 also enables the downhole process to be automated and automatically optimized by the surface processing system 42. For instance, the modeling based on the downhole parameters may be used by the surface processing system 42 to predict wear on the downhole motor 28 and/or the drill bit 30, and to advise as to timing of the next trip to the surface for replacement of the downhole motor 28 and/or the drill bit 30.

[0047] In certain embodiments, the modeling based on the downhole parameters also enable use of pressures to be used by the surface processing system 42 in characterizing the reservoir 16. Such real-time downhole parameters also enable use of pressures by the surface processing system 42 for in situ evaluation and advisory of post-fracturing flow back parameters, and for creating an optimum flow back schedule for maximized production of, for example, hydrocarbon fluids from the surrounding reservoir 16. Data available from a given well may be utilized in designing the next fracturing schedule for the same pad/neighbor wells as well as predictions regarding subsequent wells.

[0048] For example, downhole data such as WOB, torque data from a load module associated with the downhole well tool 36, and bottom hole pressures (internal and external to the bottom hole assembly 26/downhole well tool 36) may be processed via the surface processing system 42. The processed data may then be utilized by the surface processing system 42 to control the injector head 54 to generate, for example, a faster and more controlled rate of penetration (ROP). Additionally, the processed data may be updated by the surface processing system 42 as the downhole well tool 36 is moved to different positions along the wellbore 14 to help optimize operations. The processed data also enables automation of the downhole process through automated controls over the injector head 54 via control instructions provided by the surface processing system 42.

[0049] In certain embodiments, data from downhole may be combined by the surface processing system 42 with surface data received from injector head 54 and/or other measured or stored surface data. By way of example, surface data may include hanging weight of the coiled tubing string 12, speed of the coiled tubing 20, wellhead pressure, choke and flow back pressures, return pump rates, circulating pressures (e.g., circulating pressures from the manifold of a coiled tubing reel in the coiled tubing unit 52), and pump rates. The surface data may be combined with the downhole data by the surface processing system 42 with in real time to provide an automated system that self-controls the injector head 54. For example, the injector head 54 may be automatically controlled (e.g., without human intervention) to optimize ROP under direction from the surface processing system 42.

[0050] In certain embodiments, data from drilling parameters (e.g., surveys and pressures) as well as fracturing parameters (e.g., volumes and pressures) may be combined with real-time data obtained from sensors 40, 46. The combined data may be used by the surface processing system 42 in a manner that aids in machine learning and/or artificial intelligence to automate subsequent jobs in the same well and/or for neighboring wells. The accurate combination of data and the updating of that data in real time helps the surface processing system 42 improve the automatic performance of subsequent tasks.

[0051] In certain embodiments, depending on the type of operation downhole, the surface processing system 42 may be programmed with a variety of algorithms and/or modeling techniques to achieve desired results. For example, the downhole data and surface data may be combined and at least some of the data may be updated in real time by the surface processing system 42. This updated data may be processed by the surface processing system 42 via suitable algorithms to enable automation and to improve the performance of, for example, downhole well tool 36. By way of example, the data may be processed and used by the surface processing system 42 for preventing motor stalls. In certain embodiments, downhole parameters such as forces, torque, and pressure differentials may be combined by the surface processing system 42 to enable prediction of a next stall of the downhole motor 28 and/or to give a warning to a supervisor. In such embodiments, the surface processing system 42 may be programmed to make self-adjustments (e.g., automatically, without human intervention) to, for example, speed of the injector head 54 and/or pump pressures to prevent the stall, and to ensure efficient continuous operation.

[0052] In addition, in certain embodiments, the data and the ongoing collection of data may be used by the surface processing system 42 to monitor various aspects of the performance of downhole motor 28. For example, motor wear may be detected by monitoring the effective torque of the downhole motor 28 based on data obtained regarding pump rates, pressure differentials, and actual torque measurements of the downhole well tool 36. Various algorithms may be used by the surface processing system 42 to help a supervisor on site to predict, for example, how many more hours the downhole motor 28 may be run efficiently. This data, and the appropriate processing of the data, may be used by the surface processing system 42 to make automatic decisions or to provide indications to a supervisor as to when to pull the coiled tubing string 12 to the surface to replace the downhole motor 28, the drill bit 30, or both, while avoiding unnecessary trips to the surface.

[0053] In certain embodiments, downhole data and surface data also may be processed via the surface processing system 42 to predict a time when the coiled tubing string 12 may become stuck. The ability to predict when the coiled tubing string 12 may become stuck helps avoid unnecessary short trips and, thus, improves coiled tubing pipe longevity. In certain embodiments, downhole parameters such as forces, torque, and pressure differentials in combination with surface parameters such as weight of the coiled tubing 20, speed of the coiled tubing 20, pump rate, and circulating pressure may be processed via the surface processing system 42 to provide predictions as to the time when the coiled tubing 20 will become stuck.

[0054] In certain embodiments, the surface processing system 42 may be designed to provide warnings to a supervisor and/or to self-adjust (e.g., automatically, without human intervention) either the speed of the injector head 54, the pump pressures and rates of the pump unit 56, or a combination of both, so as to prevent the coiled tubing 20 from getting stuck based on the predictions described herein. By way of example, the warnings or other information may be output to a display of the surface processing system 42 to enable an operator to make better, more informed decisions regarding downhole or surface processes related to operation of the downhole well tool 36. In certain embodiments, the speed of the injector head 54 may be controlled via the surface processing system 42 by controlling the slack-off force from the surface. In general, the ability to predict and prevent the coiled tubing 20 from becoming stuck substantially improves the overall efficiency, and helps avoid unnecessary short trips if the probability of the coiled tubing 20 getting stuck is minimal. Accordingly, the downhole data and surface data may be used by the surface processing system 42 to provide advisory information and/or automation of surface processes, such as pumping processes or other processes.

[0055] In addition, the embodiments described herein generally relate to the use of flow modeling to generate flow-related data that cannot be measured in order to make real-time decisions and real-time predictions on the outcome of future potential actions to be taken by engineers or artificial intelligence to optimize operation performance. As described in greater detail herein, in certain embodiments, a general method for parameter inference for any uncertain parameters deemed important when designing cleanout operations may be utilized. In certain embodiments, a pre-conditioning method for the determination of a reservoir pressure parameter may be used to reduce the effect of its uncertainty on design fidelity. In addition, in certain embodiments, a pre-conditioning method for the determination of a reservoir inflow performance parameter may be used to reduce the effect of its uncertainty on design fidelity.

[0056] Cleanout operations with coiled tubing 20 generally consist of pushing solid particles, such as sand or proppant from previous fracturing jobs, to the surface 24 by injecting fluids 32 though the coiled tubing 20 and the BHA 26 next to where the solids lay in the wellbore 14. By supplying enough flow, the particles may remain suspended in the injected fluids 32 and be transported to surface 24.

[0057] In order to design a cleanout job, engineers may use simulators that can model relevant physical phenomena occurring during such operations. Using such simulators, the engineers may investigate options such as pump rates, fluids to be pumped, coiled tubing movements that may provide an optimum cleanout. The options may be constrained by certain events that should be prevented. Such events may include excessive fluid leak-off into the reservoir 16 or excessive inflow from the reservoir 16. Other constraints may be related to the risk of damaging the coiled tubing string 12 by exposing the coiled tubing string 12 to undesired internal pressures (e.g., low or high).

[0058] In many situations, certain input parameters required by the simulators are not known with sufficient accuracy for the predictions to be reliable. For example, predicting the amount of leak-off into or inflow from the reservoir 16 requires the reservoir pressure to be known with relatively high accuracy. Another example is related to the initial position and size of the solids fill in the wellbore 14 prior to running the coiled tubing 20 into the wellbore 14. The consequences of insufficient accuracy for the predictions in a cleanout operation may include risk of getting the coiled tubing 20 stuck, not being able to transport the solids to surface 24, collapsing or bursting the coiled tubing 20, not correctly dimensioning the volume of fluids 32 required to be shipped to location prior to the job, and so forth.

[0059] With the preceding in mind, FIG. 3 illustrates example flow modeling 100 used to automate certain decisions. The flow modeling 100 may be a part of the surface processing system 42. The flow modeling 100 may include a modeling component 102 (e.g., a simulator) that includes a forward model (FM) 104 and a system parameter inference unit 106. The modeling component 102 may receive input data 108, run simulations using the FM 104 based on the input data 108, and generate potential automation outputs or decisions 110. In certain embodiments, the system parameter inference unit 106 may infer certain data from the input data 108, update the FM 104, and run the simulations with improved accuracy.

[0060] The embodiments described herein may solve problems caused by insufficient accuracy for predictions by improving the performance of automated coiled-tubing operations by using flow modeling in substantially real time to enable an engineer or artificial intelligence analyzing the measured data and the output from the flow modeling to take optimal decisions for operation success. The embodiments described herein are also intended to reduce the amount of uncertainty encountered in such operations, thereby further improving their performance and minimizing operational risks. In particular, the embodiments described herein include real-time inference of the reservoir pressure, reservoir inflow performance, and any other non-explicitly specified operational parameters that may be identified as important during automated cleanout operations. The inference described herein is used to update and run a simulator with more accurate reservoir pressure, reservoir inflow performance, and other non-explicitly specified operational parameters, in substantially real time. Using updated parameters allows engineers and/or any automatic planner to take better real-time decisions on how to complete the operations.

[0061] To solve the flow modeling 100, the surface processing system 42 requires certain input data (e.g., the input data 108). For example, in certain embodiments, the input data 108 may include static data 112, such as a hole survey of the wellbore 14, wellbore geometry, completion diagrams (e.g., inner diameters, outer diameters, mean diameters, and so forth), properties of the fluids 32, properties of the reservoir 16, and properties of the coiled tubing 20 (e.g., inner diameters, outer diameters, and so forth), among other static data. In addition, in certain embodiments, the input data 108 may include dynamic data 114, used as boundary conditions, which may include pumping or coiled tubing schedule, pump rates for all injected fluids 32, wellhead pressure, injection pressure, downhole pressure, movement of the coiled tubing 20, and so forth. In certain embodiments, the potential automation outputs or decisions 110 may include outputs from the FM 104 that may include, among other data, predicted pressure and temperature profiles and evolution everywhere along the coiled tubing 20 and the wellbore 14; predicted fluid velocities and profiles and evolution inside the coiled tubing 20, along the annulus (e.g., between the coiled tubing 20 and the wellbore 14) and below the lower end of the coiled tubing 20; predicted flow rates between wellbore and reservoir fluids and solids volume fractions in the coiled tubing 20, along the annulus (e.g., between the coiled tubing 20 and the wellbore 14) and below the lower end of the coiled tubing 20. Using such parameters, the surface processing system 42 may derive other quantities of interest, such as return rates of solids at the surface 24, amount of leak-off and/or inflow between the wellbore 14 and the reservoir 16, rotation rate of the mill used on the BHA 26, and so forth. The outputs from the FM 104 and the derived quantities may be used by the surface processing system 42 to, for example, automatically adjust the speed of the injector head 54 and/or pump pressures to prevent the stall, and to ensure efficient continuous operation.

[0062] Using the flow modeling 100 in substantially real time, the surface processing system 42 may perform real-time decisions by analyzing the outputs from the FM 104, and to perform real-time decisions by using the flow modeling 100 to simulate potential future actions to be taken based on current conditions. Such decisions may be taken by an engineer or by any artificial intelligence potentially linked to the coiled tubing system 10. For example, in certain embodiments, the outputs of the FM 104 may provide a warning for undesired situations such as excessive leak-off and/or inflow from/into the reservoir 16, excessive pressure difference across the coiled tubing 20 and risk of bursting the coiled tubing 20, considerable low pressure difference across the coiled tubing 20 and risk of collapse of the coiled tubing 20, considerable low fluid velocity and risk of solids sedimentation before reaching the surface 24, and so forth.

[0063] Actions that may be taken based on the real-time outputs of the FM 104 may include, for example, change in pump rates of the pump unit 56, change in nature of the fluids 32 being pumped by the pump unit 56, opening of the wellhead choke, changing the speed of the coiled tubing 20, changing the operational plan (e.g., deciding to bring the coiled tubing 20 to a point of interest at a time that was not planned ahead of time), stopping the operation, performing a shut- in, pulling out of the hole (POOH), and so forth. In the particular context of cleanout operations, FIG. 3 illustrates how the flow modeling 100 may be used to automate certain decisions. In this case, decisions such as planning ahead of time how to define the next coiled tubing steps and rates to optimize the remaining tasks ahead (e.g., optimal coiled tubing (CT) sweep invest), given the current conditions, taking control on the bottom hole pressure (BHP), leak-off/inflow rates and annular velocities by changing a pumping schedule, and so forth.

[0064] In addition, in certain embodiments, some of the outputs of the FM 104 may also be used by a mechanical model (MM) to ensure that the MM performs accurate predictions when calculating forces applied to the coiled tubing 20. Therefore, real-time coupling of the FM 104 and the MM may improve predictions of the state of the operation and what future actions may provide the optimum results.

[0065] The embodiments described herein may include a method for real-time estimation of reservoir pressure, denoted as p res , and of any other operational parameters deemed important for designing cleanout operations. In particular, the reservoir pressure is just one example that is of particular interest for cleanout operations. However, as described in greater detail herein, the estimation may be performed for other static input (e.g., static data 112) to the FM 104 that cannot be measured. In certain embodiments, the estimation uses actual physical measurements (e.g., as measured by the downhole and surface sensors 40, 46) that are detected in substantially real time during operations. In certain embodiments, the surface processing system 42 may use a real-time pumping schedule (e.g., stored in the storage media 66) as a dynamic input to run the real-time simulation. In general, the real-time pumping schedule specifies what fluids 32 are currently being injected from an outlet of the pump unit 56, at what flow rates the fluids 32 are being pumped from the pump unit 56, the value of pressure in the wellbore 14 at a given depth along the wellbore 14, and a speed of movement of the coiled tubing 20, among other operational parameters. In certain embodiments, the dynamic input of the real-time pump schedule may change over time. In addition, in certain embodiments, the surface processing system 42 may also use static input parameters that do not change over time. For example, in certain embodiments, the reservoir pressure and the trajectory of the wellbore 14 at any given point along the wellbore 14 may be static inputs to the surface processing system 42.

[0066] As described herein, nf refers to the number of fluids (e.g., of the fluid 32 illustrated in FIG. 1) that are being injected at any given time. In addition, refers to the injection rate of fluid number i that varies between 1 and ry. In addition, p ref refers to the current value of the pressure measured at a reference depth z ref in the wellbore 14 or inside the coiled tubing 20.

For example, if z ref = 0, then p ref could represent the wellhead pressure. z ref could also correspond to the depth of a fixed downhole pressure gauge in the wellbore 14 or any pressure gauge attached to the BHA 26 (e.g., in which case z ref is changing with movement of the coiled tubing 20). In addition, v ct refers to the speed of the coiled tubing 20.

[0067] In certain embodiments, if other measurements, such as additional pressure measurements at a depth other than z ref or flow rates at other locations than the outlet of the pump unit 56, are available, such measurements may be compared with the prediction of the surface processing system 42 in substantially real time. The prediction of the surface processing system 42 may be referred to as the forward model (FM). In certain embodiments, FM resolution includes the surface processing system 42 reading a current pump schedule (e.g., as dynamic input) with the value of static input(s) in memory (e.g., in the storage media 66 of the surface processing system 42 and/or the cloud storage 50), and solving the pressure fields, temperature fields, velocity fields, and fluid concentration fields that correspond to these inputs.

[0068] In certain embodiments, an inverse model (IM) may be used by the surface processing system 42 for the purpose of estimating unknown or uncertain (e.g., unmeasurable) input parameters of the FM by comparing the FM’s output (e.g., predicted properties) with available actual measurements of particular parameters. For example, if it is assumed that the reservoir pressure p res is uncertain, the surface processing system 42 may solve the FM with an estimate of p res and then compare the FM’s predicted injection pressure (e.g., pressure at the outlet of the pump unit 56) with the actual value of the injection pressure, if it is available. Then, in certain embodiments, p res may be adjusted by the surface processing system 42 until the predicted and measured injection pressures are substantially close (e.g., within a 1% of each other, within 0.1% of each other, or even closer). At this point, a new estimated p res is now available.

[0069] As used herein, S(t) may refer to a pumping schedule (e.g., dynamic input) at time t, and may be denoted as:

[0070] In addition, P may refer to a set of static inputs and Y (t) may refer to a set of available real-time measurements not already included in 5, and may be denoted as: [0071] In addition, Ỹ(t) may refer to the set of the FM’s predicted values of Y(t). Finally, X(t) may refer to other FM’s predictions that are not included in Ỹ (t). FIG. 4 illustrates an example forward model (FM) 120 used in substantially real time. For increasing time steps (e.g., t-dt, t, t+dt , ...), S(t) is input into the FM (with known P), which predicts X(t) and Ỹ(t).

[0072] In particular, at an arbitrary time t, the FM 120 reads an FM input 122, including the schedule S(t ' ) and the Pset of static inputs P and predicts an FM output 124 including X(t) and Ỹ (t) using the previous time step’s state as initial condition (e.g., X(t — dt ) and Ỹ(t — dt )). At the next time step t + dt, the FM 120 reads the schedule S(t + dt), and predicts X(t + dt) and Ỹ(t + dt) using X(t) and Ỹ(t) as initial condition, and so on. A process 126 of running the FM 120 from time t = 0 up to time t is denoted as {PM( 0, t)}. The following notations are used to describe the process 126 further herein:

[0073] FIG. 5 illustrates an example inverse model (IM) 140 used in substantially real time. For increasing time steps (e.g., t-dt, t, t+dt, ...), an IM input 142 including the S(t) is input into the IM 140, which predicts an IM output 144 including X(t), Ỹ(t), and P. tA process 146 is donated as an intermediate process of running the IM 140 at an arbitrary time t. In the process 146, the IM 140 reads the pump schedule S(t), and runs {PM( 0, t)} the process 126, {FM( 0, t)} , with the current P and outputs {Ẋ}(t) and {Ỹ}(t). An error e(t) between predicted {Ẋ}(t), {Ỹ}(t) and measured {X}(t), {Y}(t) is evaluated and P is iteratively adjusted until the error e(t) is minimized. One possible way to measure the error is: where nt is the number of time step, t L is the time number t. Other measures of the error e(t) are possible. a k is a normalization constant used when the magnitude of the absolute values of the measurements y k may vary significantly. For clarity, the method has been presented with constant time steps, but it may be generalized trivially to any distribution of discrete times t t separated by non-constant time steps.

[0074] In certain embodiments, a variant of the method described above consists of using {FM(t',t)} instead of {FM( 0, t)} with t' being one of the discrete times satisfying 0 < t' < t. This modified method may require less computation, but may give rise to some re-actualization of P with time, even though P should be constant in time (i.e., be a static input). This might be justifiable when the FM does not capture accurately all the physical phenomena occurring during such operations, by absorbing some of the approximations into an effective time-varying P. For example, the reservoir productivity or injectivity is often assumed to be constant while it varies in time. Allowing time-variations of P's p res components (e.g., p res ) may account for such changes.

[0075] Non-linear programming methods used by the surface processing system 42 for minimizing e(t) by adjusting P may be numerous. Such methods be based on deterministic algorithms or stochastic algorithms. Multiple algorithms may be combined by the surface processing system 42, and their choice also depends on how many components P has. A non- exhaustive list may include: (1) gradient methods, (2) dichotomy, Fibonacci, and Golden section, (3) Newton-Raphson and quasi-Newton, (4) Kalman filters, (5) back-substitutions with relaxation, (6) Monte Carlo, and so forth.

[0076] In addition to the general techniques described above, in certain embodiments, pre- conditioning for reservoir pressure may be performed by the surface processing system 42. For example, in certain embodiments, the surface processing system 42 may estimate p res , as one of P‘s components, prior to using the parameter inference techniques described above. Such a priori estimate may help the IM 140 minimize e(t) more efficiently. In addition, in certain embodiments, bounds or constraints to the IM 140 may be used by the surface processing system 42. As used herein, the term “a priori” is intended to refer to data that is not based on the downhole sensor data or the surface sensor data, both of which are described herein, or any other data relating to actual operation of the downhole well tool 36 and/or the other equipment described herein, but rather is knowledge that is based on theoretical characteristics and/or operational parameters of operation of the downhole well tool 36 and/or the other equipment described herein.

[0077] In certain embodiments, the BHA 26 may include a pressure gauge as one of the downhole sensors 40 described herein. In such embodiments, the downhole well tool 36 may be run into the wellbore 14 to a depth as close as possible to a production interval, without pumping any fluids 32 via the pump unit 56, and without producing any return fluid 34. In general, since solids are expected at or close to the production interval, it is not desirable to bring the BHA 26 too close to the production interval without pumping any fluids 32. Therefore, it may be assumed that the BHA 26 stops at some distance before (e.g., above, or uphole from) the top of the production interval and may reach that depth without pumping any fluids 32. [0078] Using a pressure gauge mounted on the outside of the BHA 26, a wellbore pressure may be measured near the BHA 26 in substantially real time. This pressure may be denoted as P BHA (t), and it may be considered as one of the measurement yi(t) described above. As soon as the BHA 26 reaches the wellhead, P BHA is equal to a wellhead pressure, denoted as p WH. As the BHA 26 runs into wellbore 14, it may encounter various fluid levels. For example, the BHA 26 may encounter a level between the reservoir gas or air and the reservoir oil, then it may encounter a level between the reservoir oil and water (e.g., water may come from the reservoir or be the water used in a previous intervention). Levels are indicated by a change of the slope of P BHA versus the true vertical depth, TVD BHA , of the BHA 26. Between two successive levels, the slope remains relatively constant (e.g., deviating by less than 2%, less than 1%, less than 0.5%, or even less) because no fluids 32 are flowing (i.e., there is no friction pressure).

[0079] FIGS. 6 and 7 illustrate a wellhead pressure as a function of fluid levels to true vertical depth, TVD , and to true vertical depth of the BHA 26, TVD BHA , respectively. Each of the FIGS, 6 and 7 depicts three different fluids 32 (e.g., pumped via the pump unit 56): fluid 1, fluid 2, and fluid 3, with four successive levels 150: fluid level 0 (at zero depth), fluid level 1 between the fluid 1 and fluid 2, fluid level 2 between the fluid 2 and fluid 3, and fluid level 4 (at TVD in FIG. 6, or at TVD BHA in FIG. 7). Between two successive levels, such as the fluid level 0 and fluid level 1, the fluid level 1 and fluid level 2, or the fluid level 2 and fluid level 4, the slope remains relatively constant.

[0080] Between two successive levels l and l + 1, the fluid density is also relatively constant (e.g., deviating by less than 2%, less than 1%, less than 0.5%, or even less), equal to pi , and the wellbore pressure p w evolves as follows: where z x and z 2 are two measured depths between the two successive levels l and l + 1. Furthermore, it may be assumed that once the BHA 26 is at the final depth, denoted as z BHAfinal before fluids 32 are being pumped or return fluids 34 are being produced, the fluid nature (e.g., the fluid density) remains the same all the way from the BHA 26 to the production interval, then the pressure p w in the wellbore 14 at a measured depth z along the production interval is as follows:

[0081] Since the well is not flowing, p w (z) is an estimate of p res. This estimate may be used in the first time when the IM 140 is invoked. In certain embodiments, bounds on p res may also be defined by using higher values of p i+1 in the case it is assumed that the wellbore fluid nature may change below z BHA final. In general, only those fluids 32 with densities greater than P l+1 may potentially be present beyond z BHA final. The p l+1 may be determined in substantially real time for a short time period before reaching z BHA final by algorithmically measuring the slope of p w (z) versus vertical depth VD(z).

[0082] In certain embodiments, a fixed downhole pressure gauge (e.g., a pressure gauge that is disposed at a fixed location within the wellbore 14) may be used as one of the various downhole sensors 40 described herein. In such embodiments, for example, where only a fixed downhole pressure gauge is available at a depth z DHPG , close to the production interval, it may not be possible to estimate the fluid density around z DHPG as doing so requires measuring pressures at two different depths. In such embodiments, the pressure at the fixed downhole pressure gauge may be defined as p w (z DHPG ), and it may be considered as one of the measurements y i (t) described above.

[0083] Using p WH and p w (z DHPG ), an average fluid density (p) between z = 0 and z =

Z D HPG may be determined by the surface processing system 42 using the following equation:

Pw(0) = PW(Z D HPG) + 9.81 x (p) x (TVD(0) - TVD(Z DHPG )) (in SI) (7)

[0084] If (p) of a fluid matches that of the densest fluid (e.g., water) that is present in the wellbore 14, then it may be assumed that the fluid is present everywhere in the wellbore 14. As such, the wellbore pressure at a measured depth z along the production interval is as follows: p w (z) = p w (z DHPG ) + 9.81 x (p) x (TVD(z) - TVD(Z DHPG )) (in SI) (8)

[0085] Since the well is not flowing, p w (z) is an estimate of p res . This estimate may be used the first time the IM 140 is invoked.

[0086] If (p) of the fluid does not match that of the densest fluid (e.g., water) that is present in the wellbore 14, then the exact nature of the fluid beyond z DHPG is uncertain. In such instances, upper and lower bounds may be defined using the largest and smallest densities of the fluids 32 that are present in the wellbore 14. Such calculations and bounds may be obtained by the surface processing system 42 in substantially real time at the start of the operation.

[0087] Furthermore, in addition to the general techniques described above, in certain embodiments, pre-conditioning for reservoir productivity/injectivity may be performed by the surface processing system 42. The reservoir productivity/injectivity is related to an amount of flow Q occurring between the wellbore 14 and the reservoir 16 for a given wellbore pressure p ref at a known depth z ref , and for a given far-field reservoir pressure p res . Ideally, z ref should be the depth at which p res is evaluated, but at times, z ref is set to another depth at which the pressure may be physically measured. At worse, this would be at z ref = 0 for the wellhead pressure, or preferably at z ref = z DHPG if a downhole pressure gauge is available. One approach to model flow exchange between the wellbore 14 and the reservoir 16 is the use of a Productivity Index (PI) formula, also known as inflow performance relationship (IPR):

[0088] This PI formula assumes steady-state flow between the reservoir 16 and the wellbore 14 for sufficiently long-time scales. That is, the PI formula is not time dependent as long as p ref and p res do not change with time. There are many correlation formulas available, such as linear, quadratic, backpressure, normalized back pressure, Forchheimer, Single Forchheimer, Vogels, undersaturated, Joshi, and Babuodeh, among others.

[0089] The PI formula has parameters, and for a given reservoir/zone, the PI formula may be estimated using past production data whereby different Q are tabulated for different p ref (note that p res is supposed to be constant over time) so that the parameters of the PI formula may be calibrated by the surface processing system 42 to reproduce the tabulated data as closely as possible. However, the PI formula may not reflect the current productivity of the reservoir 16 at the time a cleanout operation is conducted. This is because the relationship between Q , p ref and p res is not constant with respect to time but rather evolves with time because of numerous factors, including fluid compressibility, phase changes, past interventions, and so forth. Therefore, the PI formula parameters are candidates as some of the P‘s components that could be inferred using the IM 140 in substantially real time.

[0090] With Pres, the surface processing system 42 may obtain more accurate estimations of the PI formula parameters prior to pumping any fluids 32. As described above, one objective of the embodiments described herein is to cause the BHA 26 to reach Z BHA-final without pumping fluids 32 from the pump unit 56. The method assumes that p ref measurement is available at z ref- The p ref may be P BHA (Z BHA-final ), Pwh. or PDHPG - Once Z BHA-final is reached, the well is set to flow by opening the wellhead. Once flow is established, operators may wait until the flow is stabilized, record the corresponding Q and p Te f for the assumed p res then change the flow conditions by changing the wellhead chokes or by, for example, injecting nitrogen through the coiled tubing 20. Each time the flow conditions are changed, the corresponding stabilized Q and p ref may be tabulated. Eventually, a set of Q vs. p ref table may be used as a lookup table during any FM simulation to calibrate the parameters of pre-defined PI formula to be used by the

FM. Such flow tests may be automated and interpreted in substantially real time.

[0091]

(10)FIG. 8 illustrates flow and pressure during a flow test. A solid curve 160 represents the amount of flow Q occurring at different states of the well operations: well shut, flow period 1, flow period 2, and flow period 3. A dashed curve 162 represents the wellbore pressure p ref occurring at the different states of the well operations. In each of the flow periods

1, 2, or 3, the amount of flow Q increases as time evolves until reaching a stabilized flow value

(e.g., Q 1 , Q 2 , or Q 3 ) Similarly, in each of the flow periods 1, 2, or 3, the wellbore pressure p ref decreases as time evolves until reaching a stabilized pressure value (e.g,. p ref1 , p ref2 , or p ref3) . [0092] The flow test may be represented using the linear PI formula with a parameterll P:

[0093] FIG. 9 illustrates an example plot of stabilized values of the amount of flow Q versus reservoir pressure p res relative to a given wellbore pressure p ref . Plotting stabilized values of ( P res — P ref ) and Q as represented in FIG. 9, it is possible to adjust the parameter P to obtain a line of best fit 170 that passes through scattered data points (e.g., corresponding to the stabilized values of ( p res P ref ) and Q ) and best expresses the relationship between the data points. The value of the parameter P corresponding to the line of best fit 170 may subsequently be used by the surface processing system 42 during the real-time simulations.

[0094] The specific embodiments described above have been illustrated by way of example, and it should be understood that these embodiments may be susceptible to various modifications and alternative forms. It should be further understood that the claims are not intended to be limited to the particular forms disclosed, but rather to cover all modifications, equivalents, and alternatives falling within the spirit and scope of this disclosure.

[0095] The techniques presented and claimed herein are referenced and applied to material objects and concrete examples of a practical nature that demonstrably improve the present technical field and, as such, are not abstract, intangible or purely theoretical. Further, if any claims appended to the end of this specification contain one or more elements designated as “means for [perform ]ing [a function], . or “step for [performing [a function], . it is intended that such elements are to be interpreted under 35 U.S.C. 112(f). However, for any claims containing elements designated in any other manner, it is intended that such elements are not to be interpreted under 35 U.S.C. 112(f).