Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
PARAMETER INFERENCE, DEPTH ESTIMATION, AND ANOMALY DETECTION FOR COILED TUBING OPERATION AUTOMATION
Document Type and Number:
WIPO Patent Application WO/2022/271589
Kind Code:
A1
Abstract:
Systems and methods presented herein facilitate coiled tubing operations, and generally relate to the use of mechanical models for the automation of such coiled tubing operations in the oil and gas industry. In particular, a framework is presented that includes three main building blocks: (1) a probabilistic tubing force and depth estimation package; (2) an anomaly detection package; and (3) a mechanical failure check package, each of which are software packages executable by a surface processing system.

Inventors:
SU TIANXIANG (US)
TARDY PHILIPPE MICHEL JACQUES (US)
VARVEROPOULOS VASSILIS (US)
FOSSATI LAURENCE CATHY (US)
SEGURA DOMINGUEZ JORDI JUAN (NO)
GEORGET STEPHANE (FR)
DVORAK FILIP (US)
Application Number:
PCT/US2022/034163
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:
E21B47/002; E21B17/04; E21B44/02; E21B47/04
Domestic Patent References:
WO2020236876A12020-11-26
WO2017105430A12017-06-22
WO2021072447A12021-04-15
Foreign References:
US9091139B22015-07-28
US20190071941A12019-03-07
Attorney, Agent or Firm:
FLYNN, Michael L. et al. (US)
Download PDF:
Claims:
CLAIMS

1. A method, comprising: executing, via a processing system, an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation; executing, via the processing system, a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states; and executing, via the processing system, a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile, wherein the surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

2. The method of claim 1, comprising automatically adjusting, via the processing system, one or more operational parameters of the coiled tubing operation based at least in part on the calculated surface weight.

3. The method of claim 1, wherein the one or more observable system states comprise a depth of the downhole well tool, a speed of the downhole well tool moving through the wellbore, or some combination thereof.

4. The method of claim 1, wherein the one or more uncertain system states comprise a friction coefficient, a stripper friction, or some combination thereof.

5. The method of claim 1, wherein executing, via the processing system, the inference model comprises using Bayes filtering.

6. The method of claim 1, wherein executing, via the processing system, the inference model comprises using optimization-based analyses.

7. The method of claim 1, comprising executing, via the processing system, a mechanical failure model to automatically monitor a mechanical safety of the coiled tubing based at least in part on the calculated tubing force profile along the coiled tubing.

8. The method of claim 1, comprising executing, via the processing system, an anomaly detection model to automatically detect downhole anomalies relating to the downhole well tool based at least in part on the calculated surface weight of the downhole well tool and the coiled tubing and the uncertainty bounds around the calculated surface weight.

9. A tangible non-transitory computer-readable media comprising process- executable instructions that, when executed by one or more processors, cause the one or more processors to: execute an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation; execute a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states; and execute a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile, wherein the surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

10. The tangible non-transitory computer-readable media of claim 9, wherein the process-executable instructions, when executed by one or more processors, cause the one or more processors to adjust one or more operational parameters of the coiled tubing operation based at least in part on the calculated surface weight.

11. The tangible non-transitory computer-readable media of claim 9, wherein the one or more observable system states comprise a depth of the downhole well tool, a speed of the downhole well tool moving through the wellbore, or some combination thereof.

12. The tangible non-transitory computer-readable media of claim 9, wherein the one or more uncertain system states comprise a friction coefficient, a stripper friction, or some combination thereof.

13. The tangible non-transitory computer-readable media of claim 9, wherein the process-executable instructions, when executed by one or more processors, cause the one or more processors to execute the inference model using Bayes filtering.

14. The tangible non-transitory computer-readable media of claim 9, wherein the process-executable instructions, when executed by one or more processors, cause the one or more processors to execute the inference model using optimization-based analyses.

15. The tangible non-transitory computer-readable media of claim 9, wherein the process-executable instructions, when executed by one or more processors, cause the one or more processors to execute a mechanical failure model to automatically monitor a mechanical safety of the coiled tubing based at least in part on the calculated tubing force profile along the coiled tubing.

16. The tangible non-transitory computer-readable media of claim 9, wherein the process-executable instructions, when executed by one or more processors, cause the one or more processors to execute an anomaly detection model to automatically detect downhole anomalies relating to the downhole well tool based at least in part on the calculated surface weight of the downhole well tool and the coiled tubing and the uncertainty bounds around the calculated surface weight.

17. A system, comprising: a surface processing system configured to: execute an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation; execute a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states; and execute a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile, wherein the surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

18. The system of claim 17, wherein the surface processing system is configured to adjust one or more operational parameters of the coiled tubing operation based at least in part on the calculated surface weight.

19. The system of claim 17, wherein the surface processing system is configured to execute a mechanical failure model to automatically monitor a mechanical safety of the coiled tubing based at least in part on the calculated tubing force profile along the coiled tubing.

20. The system of claim 17, wherein the surface processing system is configured to execute an anomaly detection model to automatically detect downhole anomalies relating to the downhole well tool based at least in part on the calculated surface weight of the downhole well tool and the coiled tubing and the uncertainty bounds around the calculated surface weight.

Description:
PARAMETER INFERENCE, DEPTH ESTIMATION, AND ANOMALY DETECTION FOR COILED TUBING OPERATION AUTOMATION

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application claims priority to and the benefit of U.S. Provisional Patent Application Serial No. 63/212,915, entitled “Parameter Inference, Depth Estimation, and Anomaly Detection for Coiled Tubing Operation Automation,” 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 automating coiled tubing operations utilizing a framework for parameter inference, depth estimation, and anomaly detection.

[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] Certain embodiments of the present disclosure include a method that includes executing, via a processing system, an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation. The method also includes executing, via the processing system, a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states. The method further includes executing, via the processing system, a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile. The surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

[0007] Certain embodiments of the present disclosure also include a tangible non-transitory computer-readable media comprising process-executable instructions that, when executed by one or more processors, cause the one or more processors to execute an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation; to execute a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states; and to execute a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile. The surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

[0008] Certain embodiments of the present disclosure also include a system that includes a surface processing system configured to execute an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool into a wellbore via coiled tubing during a coiled tubing operation; to execute a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing based at least in part on the one or more observable system states and/or the one or more uncertain system states; and to execute a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool and the coiled tubing and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile. The surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

[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 is a schematic illustration of a well system that obtains sensor data to dynamically update information related to operation and control of a coiled tubing system, in accordance with embodiments of the present disclosure; [0012] FIG. 2 illustrates a well control system that may include a surface processing system to control the well system described herein, in accordance with embodiments of the present disclosure;

[0013] FIG. 3 illustrates three main building blocks for using mechanical models to automate coiled tubing operations, in accordance with embodiments of the present disclosure;

[0014] FIG. 4 is an illustration of a workflow for using mechanical models to automate coiled tubing operations, in accordance with embodiments of the present disclosure;

[0015] FIG. 5 is an illustration of an iterative Bayes inference model, in accordance with embodiments of the present disclosure; and

[0016] FIG. 6 is a flow diagram of a process for operating a surface processing system, in accordance with embodiments of the present disclosure.

DETAILED DESCRIPTION

[0017] 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.

[0018] 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.

[0019] 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 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. [0020] 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.

[0021] 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). [0022] The embodiments described herein generally include systems and methods that facilitate operation of well-related 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 human operators of the well to inform control actions performed by the human 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 human 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 human operators so as to enable improved decision-making regarding operation of the well tool (e.g., operation of a downhole or surface system/device).

[0023] In certain embodiments, downhole parameters are obtained via, for example, downhole sensors while the 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 operation of the well tool downhole to enable automatic optimization (e.g., by the surface processing system, without human intervention) with respect to the operation of the well tool during subsequent stages of well tool operation.

[0024] The embodiments described herein overcome disadvantages and shortcomings of existing systems and methods. For example, the embodiments described herein facilitate the control of downhole and surface pressures and flow rates during coiled tubing operations by, for example, orchestration of the pump and flowback controls, and further optimization via substantially real-time downhole and/or surface measurements. For example, in certain embodiments, pressure and flow rate measurements at both the 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)).

[0025] In addition, the embodiments described herein relate to the use of mechanical models for the automation of coiled tubing operations in the oil and gas industry. As described in greater detail herein, such mechanical models may enable a computational framework of three main building blocks including: (1) a probabilistic tubing force and depth estimation package; (2) an anomaly detection package; and (3) a mechanical failure check package, each of which may be software packages that are executable by a surface processing system.

[0026] With the foregoing in mind, FIG. l is a schematic illustration 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 well (e.g., blow-out preventers, wellhead “tree”, etc.) have been 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.

[0027] 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. 2, 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 tool. 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.

[0028] 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 and 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.

[0029] 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 a drill bit 30, which may be powered by a motor 28 (e.g., a positive displacement motor (PDM), or other hydraulic motor) of a BHA 26. In certain embodiments, the wellbore 14 may be an open wellbore or a cased wellbore defined by a 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.

[0030] As also illustrated in FIG. 1, in certain embodiments, the coiled tubing system 10 may include a downhole sensor package 38 having a plurality of 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 memory locations 48. By way of example, historical data and other useful data may be stored in a memory location 48 such as cloud storage 50.

[0031] 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 on the coiled tubing 20 so as to control the tubing string weight and, thus, the weight on bit (WOB) acting on the bit of the drill bit 30 (or other 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 the downhole operation, to optimize the downhole operation, and/or to provide more accurate predictions regarding components or aspects of the downhole operation.

[0032] 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 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.

[0033] 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.

[0034] 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, an analysis module 62 executes 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.

[0035] 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 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.

[0036] 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 various 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 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.

[0037] 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.

[0038] 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 system). In certain embodiments, the data may be provided as advisory data by the surface processing system 42 (or other suitable processing system). 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.

[0039] 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.

[0040] 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). [0041] 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 data (e.g., downhole data and surface data) also may 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.

[0042] In certain embodiments, use of this data enables the surface processing system 42 to self-learn 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, 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. The downhole parameters also 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. [0043] 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. The 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.

[0044] 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. This processed data may then be employed by the surface processing system 42 to control the injector head 54 to generate, for example, a faster and more controlled ROP. Additionally, the 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 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.

[0045] 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.

[0046] 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 (e.g., 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.

[0047] 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.

[0048] 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.

[0049] In certain embodiments, downhole data and surface data also may be processed via the surface processing system 42 to predict 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 when the coiled tubing 20 will become stuck.

[0050] 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. 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.

[0051] The embodiments described herein generally relate to the use of mechanical models for the automation of coiled tubing operations in the oil and gas industry. As illustrated in FIG.

3, the embodiments described herein include three main building blocks: (1) a probabilistic tubing force and depth estimation package 80; (2) an anomaly detection package 82; and (3) a mechanical failure check package 84. These three packages 80, 82, 84 are software packages executable by the surface processing system 42, as described in greater detail herein. [0052] The embodiments described herein support the following automated processes that may be caused to be performed by the surface processing system 42 based at least in part on the analysis performed by the surface processing system 42, as described in greater detail herein, to automatically adjust certain operational parameters of a coiled tubing operation. (1) Pull test: The mechanical models optimize when and where to perform a pull test based on a tubing fatigue calculation. Also, the mechanical models automatically infer parameters such as friction coefficient from the pull test data and determine in substantially real-time whether the pull test passes or fails. (2) Dynamic speed adjustment: By early detection of anomalies, the mechanical models help make decisions to slow down the speed of the coiled tubing 20 to automatically recover the operation to a normal condition. (3) Dynamic weight limit adjustment: By quantifying the uncertainty of the predicted surface weight, the mechanical models automatically set and update the safe weight limit. (4) Stripper control and leak detection: By iteratively inferring the stripper friction from surface measurements, the mechanical models help control the stripper pressure to optimize the stripper performance. (5) Automatic depth correlation: By probabilistically fusing the surface measurements, tubing force model predictions and downhole data, the mechanical models automatically perform depth correlation. (6) Coil fatigue monitoring: The mechanical models monitor and track the fatigue of the coiled tubing 20. (7)

Coil collapse prevention: The mechanical models monitor and prevent burst or collapse of the coiled tubing 20 during the operation. (8) Obstruction detection and tagging: By using an anomaly detection method, the mechanical models automatically detect and tag downhole obstructions.

[0053] The main purpose of the probabilistic tubing force and depth estimation package 80 is to predict the forces along the coiled tubing 20, the surface weight (e.g., of the downhole well tool 36 and the coiled tubing 20) and the depth of the downhole well tool 36. In order to perform such predictions, the surface processing system 42 receives certain parameters as inputs. Among these parameters, some may be relatively difficult to measure directly, for example, the friction coefficient between the coiled tubing 20 and the casing 18. Therefore, the probabilistic tubing force and depth estimation package 80 first uses real-time measurements to automatically infer those uncertain (e.g., unmeasurable) parameters as well as the current system states (e.g., current tool depth in the wellbore 14). In certain embodiments, such inference may be performed iteratively by the surface processing system 42 whenever the anomaly detection package 82 indicates that the current operation is under normal conditions. In certain embodiments, the inference engine not only outputs the predicted parameters and states, but also the uncertainties around those predicted values. The updated states and parameters may then be used by the surface processing system 42 to predict the forces along the coiled tubing 20, as well as the surface weight with uncertainty bounds.

[0054] The anomaly detection package 82 uses statistical methods to compare the predicted and measured surface weight to detect anomalies during operations (e.g., stuck pipe that leads to an increase in the measured surface weight, or tubing lockup that leads to a sudden weight drop). The anomaly detection package 82 considers not only the absolute difference between the predictions and measurements, but also the uncertainty around the predictions, the measurement uncertainty due to noise of certain sensors 40, 46, and trends of the surface weight (e.g., is it increasing, decreasing, stabilizing, etc.). From these factors, the anomaly detection package 82 automatically classifies whether the current operation is under normal conditions. [0055] Finally, the mechanical failure check package 84 uses the predicted tubing force to monitor different failure modes (e.g., burst, collapse, fatigue, buckling, and so forth) to ensure that the coiled tubing 20 is operating within its safety envelope.

[0056] For coiled tubing operations, the surface weight (e.g., of the downhole well tool 36 and the coiled tubing 20) is an important measurement for detecting downhole anomalies. For example, if the weight keeps increasing during a pull test, it is likely that the downhole well tool 36 is getting stuck somewhere downhole. In certain embodiments, to detect such anomalies, the surface processing system 42 may utilize: (1) a tubing force model that predicts the surface weight when the operation is under normal conditions, (2) a depth measurement or depth estimation model, (3) a parameter inference engine to update the parameters that are relatively difficult to measure, and (4) an anomaly detection method that uses the predicted and measured surface weight to detect anomalies.

[0057] In general, the tubing force model used by the surface processing system 42 may rely on two different types of inputs: (a) a current depth of the downhole well tool 36 (e.g., in a vertical well, the deeper the downhole well tool 36 is, the heavier weight observed at the surface 24), and (b) system parameters such as well surveys, friction coefficients, densities of the coiled tubing 20, diameters of the coiled tubing 20, and so forth. Using these inputs, the model calculates the forces along the coiled tubing 20 (e.g., gravity, fluid frag, Coulomb friction, buoyancy, and so forth) and predicts the surface weight. As opposed to conventional tubing force modules, the embodiments described herein take uncertainty of the surface weight predictions into account. Without uncertainty quantification, anomaly detection based on a comparison between the predicted and measured surface weight is relatively challenging. As such, the embodiments described herein address certain shortcomings of such conventional techniques.

[0058] In general, the tubing force model uses the current depth of the downhole well tool 36 as an input. In certain embodiments, either direct measurement of the depth (e.g., via one or more sensors 40, 46) or the use of a depth estimation model may be used by the surface processing system 42 to determine the current depth of the downhole well tool 36. In certain embodiments, the depth of the downhole well tool 36 may be measured from surface depth encoders (as one of the surface sensors 46) that record the length of the coiled tubing 20 passing through these sensors 46. In general, deformation and/or elongation of the coiled tubing 20 due to external forces after it leaves these encoders entering the wellbore 14 may be ignored, in certain embodiments. In addition, in certain embodiments, measurement uncertainty due to sensor noise may not be taken into account. In certain embodiments, a downhole casing collar detector (CCL) and/or gamma ray measurement may be available, which can help refine the surface depth measurements. In certain embodiments, the downhole measurements may be used instead of the surface measurements when they are determined to be more trustworthy as compared to the surface encoders. In certain embodiments, an operator may toggle between the two types of measurements as desired.

[0059] In general, the tubing force model also uses other system parameters as inputs. As described in greater detail herein, some of these system parameters may be relatively difficult to measure. For example, friction coefficient has a significant impact on the predicted surface weight, but it is difficult to obtain because of relatively uncertain downhole conditions. As another example, the friction exerted by a stripper on the coiled tubing 20 also has a direct impact on the surface weight, but it is relatively difficult to measure directly. One method of overcoming this is to occasionally log the measured surface weight, then fit the tubing force model to obtain the best-fitted friction coefficient. In certain embodiments, only the friction coefficient is fitted while all other uncertain parameters are treated as if they are known. The confidence levels of the fitting and the uncertainty of the fitted parameters are usually ignored and not quantified.

[0060] Finally, in certain embodiments, the surface processing system 42 may implement an anomaly detection method that uses the predicted and measured surface weight to detect anomalies. Conventional anomaly detection typically relies on operators to keep monitoring the measured versus predicted surface weight and use their experience to judge if there are any downhole issues. The embodiments described herein overcome the shortcomings of such conventional techniques by providing automated detection of anomalies.

[0061] In particular, the embodiments described herein include a model framework to automate the above parameter/state inference and anomaly detection workflow. FIG. 4 is an illustration of a workflow for using mechanical models to automate the coiled tubing operations described herein. Steps 1 through 3 are calculated using the probabilistic tubing force and depth estimation package 80 described herein, Step 4 corresponds to the anomaly detection package 82 described herein, and Step 5 is performed using the mechanical failure check package 84 described herein.

[0062] In Step 1, probabilistic certainty values of current observable system states (e.g., current depth of the downhole well tool 36, current speed of the downhole well tool 36, and so forth) and certain uncertain (e.g., unknown, unmeasured, and/or unmeasurable) parameters (e.g., friction coefficient, stripper friction, and so forth) may be updated by the surface processing system 42. The probabilistic certainty values are indicative of a degree of certainty that the observable system states and uncertain parameters are at least relatively accurate. For example, in certain embodiments, the probabilistic certainty values may include uncertainty bounds around an expected value within which the actual value is believed to be relative to the expected value.

[0063] In addition, in Step 2, a current tubing force profile along the coiled tubing 20 (e.g., a profile of real force and effective force against the coiled tubing 20 at different locations along the coiled tubing 20) may be updated by the surface processing system 42 based at least in part on the observable system states and uncertain parameters that are updated in Step 1. In addition, in Step 3, a probabilistic certainty value of a predicted current surface weight may be updated by the surface processing system 42 based at least in part on the current tubing force profile along the coiled tubing 20 that is updated in Step 2 and the observable system states and uncertain parameters that are updated in Step 1.

[0064] In addition, in Step 4, a mechanical safety of the coiled tubing 20 may be checked by the surface processing system 42 based at least in part on the current tubing force profile along the coiled tubing 20 that is updated in Step 2. In addition, in Step 5, downhole anomalies (e.g., stuck pipe, and so forth) may be detected by the surface processing system 42 using the predicted and measured surface weight that is updated in Step 3.

The parameter and depth inference model (Step 1)

[0065] This inference model belongs to the probabilistic tubing force and depth estimation package 80 illustrated in FIG. 3. In certain embodiments, surface measurements (e.g., depth from length encoders and weight for the injector head load cell) may be used to infer the system states and parameters and to quantify their uncertainties. There are two main alternative approaches that may be used by the surface processing system 42: (1) Bayes filtering approach, and (2) an optimization-based approach.

[0066] Bayes filters have been used extensively in different areas for state and parameter estimation. In general, they use a “forward measurement model” (e.g., one that predicts what measurements should occur given a set of states and parameters) to iteratively adjust the states and parameters based on the real measurements that are actually received. In general, they inverse the forward measurement model by inferring the input parameters from the measurements. FIG. 5 is an illustration of an iterative Bayes inference model. The hidden states 86 are the uncertain (e.g., unknown, unmeasured, and/or unmeasurable) parameters/states that are desired to be inferred and quantified (e.g., a friction coefficient, a stripper friction, and so forth). The observable variables (e.g., system states) 88 are those to be directly measured (e.g., depth of a downhole well tool 36, speed of a downhole well tool 36 moving through a wellbore 14, and so forth). Lastly, when downhole CCL/gamma ray data is available, it may resdie on the bottom layer labeled as “Maps” 90.

[0067] An advantage of the Bayes filters is that they are based on probability theories. The Bayes filters not only output the inferred parameters/states, but also quantify the uncertainty based on measurement noise (e.g., of the sensors 40, 46) and so-called “process noise” that characterizes the stochastic nature of the forward models. In general, the Bayes filters calculate the joint probability distribution between the parameter-state and the measured variables. They then use the received measurements to update the conditional probability distribution of the parameters/states (i.e., the updated probability distribution of the parameters/states, conditioned on the received measurements).

[0068] Another advantage of the Bayes filters is that it is relatively easy to incorporate prior knowledges into the inference framework. For example, if the friction coefficient is likely to be around 0.24 before a particular job, this friction coefficient may be input into the filter as a prior condition. In such a situation, the inference will automatically fuse this knowledge with the subsequent measurements based on their confident levels.

[0069] There are two ways Bayes filters may be setup to infer the parameters and the states: (1) a dual setup whereby a first Bayes filter is constructed to infer the system parameters while treating the system states as deterministic variables, and a second Bayes filter is constructed to do the opposite. In such a setup, the two filters work hand-in-hand to provide inference and uncertainty quantification to the parameters and the states; and (2) a joint setup whereby the system parameters and the states are combined together and a single Bayes filter infers this augmented state.

[0070] It should be noted that, for depth estimation (e.g., state inference), if downhole CCL/Gamma ray data is available, this data may also be integrated into the Bayes inference framework. In such a situation, the framework may consider the location of a collar casing (or other gamma ray source) as an additional uncertain state and probabilistically infer it together with the depth of the downhole well tool 36. This is similar to the so-called ID Simultaneous Localization and Mapping (SLAM) method commonly used for robot localization in the robotics community. [0071] There are various realizations of the Bayes filters. For example, in certain embodiments, Gaussian-based Bayes filters may be used whereby the uncertainty of the parameters and the states are assumed to be characterized by Gaussian distributions. The forward measurement model is assumed to be linear (at least locally around the current state). Kalman filters, extended Kalman filters (EKFs), unscented Kalman filters (UKFs), and information filters (IFs) belong to this class. Alternatively, in other embodiments, non-Gaussian filters may be used, which address the issue of many problems being highly nonlinear and non- Gaussian. Particle filters (PFs) and the transport map method belong to this class.

[0072] Alternatively, an optimization-based approach may be used to infer the system states and parameters from direct measurements (e.g., detected by the sensors 40, 46). In this approach, an objective function (e.g., the difference between the predicted versus measured values) may be determined and minimized with respect to the system states and parameters. In this approach, characterization of the uncertainty of the inferred parameters/states may be done by checking the quality of the minimization/fitting. For example, a good fitting indicates less uncertainty. More rigorously, the curvature of the objective function around the optimal (i.e., fitted) point characterizes the confidence level of the inference. For example, large curvature means there will generally be a relatively large penalty when moving away from the optimal point, thus, the inferred parameters are more certain.

[0073] Regardless of which approach (Bayes versus optimization) is used, the anomaly detection results may be used by the surface processing system 42 to decide when to perform the inference described herein. In other words, in certain embodiments, the parameter/state inference may only be performed by the surface processing system 42 when the anomaly detection model indicates that the operation is under normal conditions.

The tubing force calculation model (Step 2)

[0074] Many various types of models may be used by the surface processing system 42 to evaluate the force along the coiled tubing string 12. For example, certain conventional models output both the real tubing force and the effective tubing force, where the effective force ignores the contribution of the fluid pressure. It is noted that all existing models are deterministic in nature (i.e., they output one tubing force profile given a set of parameters and depth of the downhole well tool 36). However, the embodiments described herein are different in that Steps 1 through 3 described herein are combined to use a deterministic model with direct measurements to quantify the uncertainties of the parameters, the system states, and the tubing forces, making the overall computation package probabilistic. In particular, the tubing force profile along the coiled tubing 20 that is calculated by the tubing force calculation model may be based on both the direct measurements as well as the inferred system states described herein, some of which may include uncertainties, as described in greater detail herein.

The surface weight uncertainty quantification model (Step 3)

[0075] The surface weight uncertainty quantification model also belongs to the probabilistic tubing force and depth estimation package 80 illustrated in FIG. 3. With the system parameters and states inferred and their uncertainty quantified (e.g., in Steps 1 and 2), the surface processing system 42 may propagate these uncertainties using a surface weight model to output the uncertainty of the predicted surface weight. In other words, the uncertainty of the predicted surface weight comes from the parameter and state uncertainties through the surface weight uncertainty quantification model.

[0076] There are various different methods that may be used by the surface processing system 42 to perform such forward uncertainty quantification. For example, in certain embodiments, model linearization and Taylor expansion may be used to linearize the weight model with respect to the input parameters and states. In such embodiments, the linearization and the Taylor expansion coefficients may be used by the surface processing system 42 to relate the uncertainties of the inputs and the outputs. In other embodiments, an unscented transform method may be used by the surface processing system 42 to efficiently sample the input parameters and states around their mean values based on their uncertainties. In such embodiments, these samples (e.g., named the sigma points in the unscented transform) may then be passed to the surface weight uncertainty quantification model to generate samples of surface weight predictions, from each the surface weight uncertainty is quantified. In other embodiments, Monte Carlo sampling may be used by the surface processing system 42 for highly nonlinear models, where heavy samplings may be performed based on the distributions of the input parameters. In such embodiments, the samples may be passed to the surface weight uncertainty quantification model to generate surface weight samples. Distribution of the surface weight may be obtained by the surface processing system 42 by analyzing these output samples. In other embodiments, transport maps may be used by the surface processing system 42 by first parametrizing the surface weight distribution using a few base functions. In such embodiments, the surface processing system 42 may then perform efficient sampling to optimize the parameterized surface weight distribution. The mechanical failure model (Step 4)

[0077] The mechanical failure model may be used by the surface processing system 42 to check for potential mechanical failures of the coiled tubing string 12 by automatically monitoring the state of the coiled tubing 20 to make sure it is working within its safety envelope. Many various potential failure modes may be modeled. For example, in certain embodiments, maximum tubing stress of the coiled tubing 20 may be monitored and maintained smaller than a maximum allowed value. In addition, in certain embodiments, tubing burst and collapse of the coiled tubing 20 may be guarded against. Under axial load and differential pressures across the walls of the coiled tubing 20, the coiled tubing string 12 could potentially burst or collapse. The mechanical failure model may monitor the load and the pressures on the coiled tubing 20 to ensure that the coiled tubing 20 is safe. In addition, in certain embodiments, tubing fatigue of the coiled tubing 20 may be minimized. Repeatedly going through a gooseneck and a reel of the coiled tubing unit 52 at the surface 24 causes material fatigue in the coiled tubing 20, which reduces its service life. As described herein, fatigue models may be used by the surface processing system 42 to monitor the fatigue life of the coiled tubing 20, and also to optimize the operation (e.g., optimize the locations where a pull test may be performed) to avoid repeatedly putting fatigue on the coiled tubing 20.

[0078] In addition, in certain embodiments, potential buckling and lockup of the coiled tubing 20 may be minimized. Running a coiled tubing string 12 into a deviated wellbore 14 may cause compression in the coiled tubing 20 because of friction. Under relatively large compressive loads, the coiled tubing 20 could potentially buckle. A first buckle mode is named sinusoidal buckling, in which the coiled tubing 20 snakes along the bottom of the wellbore 14. This is a relatively benign failure mode as the operation can still continue without problem. However, as the coiled tubing 20 is continued to be pushed into the wellbore 14, a second buckle mode named helical buckling may be initiated, in which the coiled tubing 20 may deform into helices pressing against the inner wall of the casing/wellbore trying to expand radially to release the compression. In this second failure mode, tubing-casing/wellbore contact and frictional forces may increase rapidly. If this second failure mode is left unattended, the coiled tubing 20 may lock up, which should be avoided. Buckling and lockup may be monitored by the surface processing system 42 to check the tubing force profile. Using the real-time estimated friction coefficients, the surface processing system 42 may update the estimated lockup length (e.g., because it depends on the friction coefficient). If the current depth is near the updated lockup length, the operation may be slowed by the surface processing system 42 (e.g., by sending an appropriate control signal to the coiled tubing unit 52 and/or the pump unit 56) while the surface weight continues to be monitored by the surface processing system 42 to detect any sign of lockup of the coiled tubing 20. In certain embodiments, pump friction reducers may be injected via the pump unit 56 to reduce the friction and increase the lockup length.

The anomaly detection model (Step 5)

[0079] Instead of relying on an operator to monitor the surface weight, the embodiments described herein use the surface processing system 42 to use statistical methods to compare the measured versus predicted surface weight to automatically (e.g., without human intervention) detect anomalies. The surface weight uncertainty quantification model described above outputs the uncertainty bounds around the surface weight prediction, which can be used by the surface processing system 42 utilizing statistical methods to determine the likelihood of anomalies. The embodiments described herein also enable detection of anomalies not only based on single-point prediction versus measurement comparison. Rather, the embodiments described herein analyze trends of the surface weight (e.g., is it going up or down, how fast it is changing, is it stabilizing, and so forth) to make automated decisions based on the trends.

[0080] In particular, in certain embodiments, the surface processing system 42 may create an array to record the predicted and measured surface weight. In certain embodiments, the records in this array may be based on depth instead of time (i.e., if the coiled tubing 20 is not moving, the array won’t be updated by the surface processing system 42). As the coiled tubing 20 moves, the surface processing system 42 may populate/update the array with the predicted and measured surface weight at the current depth. Then, the surface processing system 42 may calculate the difference in trend (e.g., prediction versus measurement) around the current depth as well as the absolute difference between the predicted versus measured weight at the current depth. Then, the surface processing system 42 may plot these two differences onto a two-dimensional plane, and classify normal operation versus anomalies by drawing boundaries on this plane. For example, if the absolute difference is relatively significant, most likely there is an anomaly event regardless of the trend. On the other hand, if the trend agrees well, a moderate difference in the absolute weight may be acceptable. Initially, default boundaries may be defined by the surface processing system 42. However, as more data is collected by the sensors 40, 46, the boundaries may be automatically updated by the surface processing system 42 based on the historical data.

In certain embodiments, the surface processing system 42 may store the calculated differences as a history record (e.g., in the storage media 66 of the surface processing system 42 and/or the cloud storage 50), which may be indexed by the current depth and the current running direction. [0081] FIG. 6 is a flow diagram of a process 92 for operating the surface processing system 42 described herein. As illustrated, in certain embodiments, the process 92 may include executing, via the surface processing system 42, an inference model to automatically infer one or more observable system states and/or one or more uncertain system states relating to running a downhole well tool 36 into a wellbore 14 via coiled tubing 20 during a coiled tubing operation, for example, using Bayes filtering or optimization-based analyses (block 94). In addition, in certain embodiments, the process 92 may include executing, via the surface processing system 42, a tubing force calculation model to automatically calculate a tubing force profile along the coiled tubing 20 based at least in part on the one or more observable system states and/or the one or more uncertain system states (block 96). In addition, in certain embodiments, the process 92 may include executing, via the surface processing system 42, a surface weight uncertainty quantification model to automatically calculate a surface weight of the downhole well tool 36 and the coiled tubing 20 and uncertainty bounds around the calculated surface weight based at least in part on the one or more observable system states and/or the one or more uncertain system states and the calculated tubing force profile (block 98). The surface weight uncertainty quantification model accounts for one or more uncertainties related to the one or more uncertain system states.

[0082] In addition, in certain embodiments, the process 92 may include automatically adjusting, via the surface processing system 42, one or more operational parameters of the coiled tubing operation based at least in part on the calculated surface weight. In certain embodiments, the one or more observable system states may include a depth of the downhole well tool 36, a speed of the downhole well tool 36 moving through the wellbore 14, or some combination thereof. In addition, in certain embodiments, the one or more uncertain system states may include a friction coefficient, a stripper friction, or some combination thereof.

[0083] In addition, in certain embodiments, the process 92 may include executing, via the surface processing system 42, a mechanical failure model to automatically monitor a mechanical safety of the coiled tubing 20 based at least in part on the calculated tubing force profile along the coiled tubing 20. In addition, in certain embodiments, the process 92 may include executing, via the surface processing system 42, an anomaly detection model to automatically detect downhole anomalies relating to the downhole well tool 36 based at least in part on the calculated surface weight of the downhole well tool 36 and the coiled tubing 20 and the uncertainty bounds around the calculated surface weight.

[0084] 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.