Downhole motor stall detection

A drilling system includes a drill string, a plurality of sensors, and a computing system. The drill string includes a downhole motor. The sensors are coupled to the drill string. The computing system is coupled to the sensors. The computing system is configured to compute, based on measurements provided by the sensors, a motor stall index, and to determine, by comparing the motor stall index to a motor stall threshold, whether the downhole motor has stalled. The computing system is also configured to, responsive to a determination that the downhole motor has stalled, adjust operation of the drill string to restart the downhole motor.

BACKGROUND

The present disclosure relates generally to subterranean drilling operations for the ultimate recovery of oil, gas, or minerals. More particularly, the disclosure relates to systems and methods for predicting and detecting downhole motor stall, preemptively addressing a potential motor stall, and correcting an actual motor stall in real time or near real time.

In drilling a borehole into an earthen formation, such as for the recovery of hydrocarbons or minerals from a subsurface formation, it is conventional practice to connect a drill bit onto the lower end of a drillstring formed from a plurality of pipe joints connected together end-to-end, and then rotate the drill string so that the drill bit progresses downward into the earth to create a borehole along a predetermined trajectory. In addition to pipe joints, the drillstring typically includes heavier tubular members known as drill collars positioned between the pipe joints and the drill bit. The drill collars increase the vertical load applied to the drill bit to enhance its operational effectiveness. Other accessories commonly incorporated into drill strings include stabilizers to assist in maintaining the desired direction of the drilled borehole, and reamers to ensure that the drilled borehole is maintained at a desired gauge (i.e., diameter). In vertical drilling operations, the drillstring and drill bit are typically rotated from the surface with a top dive or rotary table.

During the drilling operations, drilling fluid or mud is pumped under pressure down the drill string, out the face of the drill bit into the borehole, and then up the annulus between the drill string and the borehole sidewall to the surface. The drilling fluid, which may be water-based or oil-based, is typically viscous to enhance its ability to carry borehole cuttings to the surface. The drilling fluid can perform various other valuable functions, including enhancement of drill bit performance (e.g., by ejection of fluid under pressure through ports in the drill bit, creating mud jets that blast into and weaken the underlying formation in advance of the drill bit), drill bit cooling, and formation of a protective cake on the borehole wall (to stabilize and seal the borehole wall).

Recently, it has become increasingly common and desirable in the oil and gas industry to drill horizontal and other non-vertical or deviated boreholes (i.e., “directional drilling”), to facilitate greater exposure to and production from larger regions of subsurface hydrocarbon-bearing formations than would be possible using only vertical boreholes. In directional drilling, specialized drill string components and bottom hole assemblies (BHAs) are often used to induce, monitor, and control deviations in the path of the drill bit, so as to produce a borehole of the desired deviated configuration.

Directional drilling is typically carried out using a downhole or mud motor provided in the BHA at the lower end of the drillstring immediately above the drill bit. Downhole motors typically include a stator with a helical internal bore in which a helical rotor is positioned and can eccentrically rotate. The outer surface of the rotor and the inner surface of the stator are both helical and together create hollow chambers between their contact points. These chambers advance from one end of the stator towards the other end during the rotation of the rotor relative to the stator. Each of these chambers is isolated and sealed from the other chambers. An elastomeric material is commonly used as a coating on the stator inner walls that contact the rotor. The elastomeric material of the stator can be damaged when the stress and strain limits of the elastomer are exceeded, as well as when the temperature of the elastomeric material exceeds its rated temperature for a prolonged period of time. Damage to the elastomeric material can reduce the operational effectiveness of the mud motor and/or result in failure of the mud motor.

SUMMARY

In one embodiment, a drilling system includes a drill string, a plurality of sensors, and a computing system. The drill string includes a downhole motor. The sensors are coupled to the drill string. The computing system is coupled to the sensors. The computing system is configured to compute, based on measurements provided by the sensors, a motor stall index, and to determine, by comparing the motor stall index to a motor stall threshold, whether the downhole motor has stalled. The computing system is also configured to, responsive to a determination that the downhole motor has stalled, adjust operation of the drill string to restart the downhole motor.

In another embodiment, a method for operating a drilling system includes receiving measurements from a plurality of sensors coupled to a drill string. The drill string includes a downhole motor to turn a drill bit. A motor stall index is computed, by a computing system coupled to the drill string and the sensors. Whether the downhole motor has stalled is determined, by the computing system, by comparing the motor stall index to a motor stall threshold. Operation of the drill string is adjusted, by the computing system, to restart the downhole motor responsive to determining that the downhole motor has stalled.

In yet another embodiment, a non-transitory computer-readable medium is encoded with instructions that when executed by a processor cause the processor to receive measurements from a plurality of sensors coupled to a drill string, and to compute a motor stall index based on the measurements. The drill string comprises a downhole motor to turn a drill bit. The instructions also cause the processor to determine whether the downhole motor has stalled by comparing the motor stall index to a motor stall threshold, and to adjust operation of the drill string to restart the downhole motor responsive to determining that the downhole motor has stalled.

Embodiments described herein comprise a combination of features and characteristics intended to address various shortcomings associated with certain prior devices, systems, and methods. The foregoing has outlined rather broadly the features and technical characteristics of the disclosed embodiments in order that the detailed description that follows may be better understood. The various characteristics and features described above, as well as others, will be readily apparent to those skilled in the art upon reading the following detailed description, and by referring to the accompanying drawings. It should be appreciated that the conception and the specific embodiments disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes as the disclosed embodiments. It should also be realized that such equivalent constructions do not depart from the spirit and scope of the principles disclosed herein.

DETAILED DESCRIPTION

In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . .” Also, the term “couple” or “couples” is intended to mean either an indirect or direct connection. Thus, if a first device couples to a second device, that connection may be through a direct engagement between the two devices, or through an indirect connection that is established via other devices, components, nodes, and connections. In addition, as used herein, the terms “axial” and “axially” generally mean along or parallel to a particular axis (e.g., central axis of a body or a port), while the terms “radial” and “radially” generally mean perpendicular to a particular axis. For instance, an axial distance refers to a distance measured along or parallel to the axis, and a radial distance means a distance measured perpendicular to the axis. Any reference to up or down in the description and the claims is made for purposes of clarity, with “up”, “upper”, “upwardly”, “uphole”, or “upstream” meaning toward the surface of the borehole and with “down”, “lower”, “downwardly”, “downhole”, or “downstream” meaning toward the terminal end of the borehole, regardless of the borehole orientation. As used herein, the terms “approximately,” “about,” “substantially,” “close,” and the like mean within 10% (i.e., plus or minus 10%) of the recited value. Thus, for example, a recited angle of “about 80 degrees” refers to an angle ranging from 72 degrees to 88 degrees.

The following abbreviations and initialisms apply:

CPU: central processing unit

GPU: graphics processing unit

GUI: graphic user interface

IP: Internet Protocol

LAN: local area network

OS: operating system

psi: pounds per square inch

RF: radio frequency

ROC: rate of change

RPM: revolutions per minute

SP: set point

As previously described, damage to the elastomeric material of the stator of a mud motor can result in reduced performance of the mud motor and/or failure of the mud motor. The abrupt and/or inadvertent stall of a mud motor during drilling operations can damage the elastomeric material. Consequently, it is desirable to avoid stalls. In many conventional drilling operations, motor stalls are not identified until well after the fact such as when tripping the drillstring out of the borehole. In addition, most conventional drilling operations do not provide a means to predict or detect motor stalls as humans often control and monitor drilling operations but may not be able to simultaneously consider all the factors potentially contributing to motor stall, may respond slower than desired to a possible motor stall, may suffer from inconsistency or errors in assessing potential motor stalls, or combinations thereof. Accordingly, disclosed herein are embodiments for downhole motor stall detection, correction, and prevention. The embodiments provide for detection of downhole motor stalls by observing data in real time. In this context, the phrase “real time” may indicate with little delay and in a manner to provide for adequate correction. Alternatively, the phrase “real time” may indicate that components communicate data upon generation of that data. For instance, the embodiments provide for observing data within 30 seconds of their availability. If a motor stall occurs, then correction and prevention of future stalls may be performed automatically. The embodiments therefore offer the potential to reduce a likelihood of motor stalls or near motor stalls.

FIG.1is a schematic diagram of a drilling system100for drilling a borehole155in a subsurface earthen formation145. The drilling system100includes a derrick160mounted on a rig floor140. A crown block120is mounted at a top of the derrick160, and a traveling block125hangs from the crown block120by means of a cable105. One end of the cable105is connected to drawworks135, which is a reeling device that adjusts a length of the cable105so that the traveling block125moves up and down the derrick160. A top drive130rests on a hook110attached to a bottom of the traveling block125. The top drive130is coupled to a top of a drill string180, which extends through a wellhead175and into the borehole155below the rig floor140. The top drive130rotates the drill string180inside the borehole155as a bit195drills the borehole155.

A BHA includes a bottom portion of the drill string180, as well as a sensor185, a motor190, and the bit195. The motor190runs the bit195. The drilling system100further includes additional sensors115,150,170and a computing system165located above the rig floor140. Together, the sensors115,150,170,185make up a sensor system that monitors drilling components of the drilling system100, generates data related to operation of the components, and transmits that data to the computing system165. The sensors115,150,170,185do so in a wired or wireless manner. The computing system165collects the data and analyzes the data in order to instruct further operation of the drilling system100. Though the computing system165is shown in proximity to the other components of the drilling system100, the computing system165may be located remotely from the other components.

When the drilling system100is in operation, it may undergo large pressure spikes, which may cause the motor190to stall. There may be no opportunity to prevent the motor190from stalling. In conventional operation, workers then inspect the drilling system100, identify data associated with the drilling system100when the motor stall occurred, and provide that data to manufacturers and/or operators of the drilling system components in order to prevent future stalling. The workers must also manually remove the bit195. Even if the motor190does not stall, large pressure spikes may degrade the motor190and other components. The drilling system100observes data of the drilling system100in real time and automatically adjusts operation in a manner that reduces a likelihood of motor stalls or near motor stalls.

FIG.2is a schematic diagram of a computing system200in accordance with the present disclosure. The computing system200may be an implementation of the computing system165in the drilling system100inFIG.1. The computing system200includes input ports210, a receiver220, a user I/O device230, a memory240, a processor250, a storage260, an OS270, a transmitter280, and output ports290. The input ports210input data from, for instance, the sensor system in the drilling system100. The receiver220processes data from the input ports210for presentation to the processor250. For instance, the receiver220converts data from the input ports210from RF signals to digital electrical signals. The user I/O device230receives data from the processor250and displays the data in a graphical manner for presentation to a user. For example, the user I/O device230may include a liquid crystal or other display for presenting data to a user in the form of a GUI. The user I/O device230may also include a touch screen that receives feedback from the user. The memory240stores programs for execution by the processor250. The programs stored in the memory240may include instructions and data that the processor250reads during execution of the programs.

The processor250may include a general-purpose microprocessor, a digital signal processor, a GPU and/or any other device that executes instructions retrieved from the memory240to provide the functionality disclosed herein. The storage260is a tape drive, magnetic disk, a solid-state drive, or another medium suitable for storing data or programs for use by the processor250.

The OS270may be stored in and/or executed from the memory240. The OS270may be NOVOS™ or another OS suitable for analyzing data from the sensor system and generating instructions to operate the drilling system100based on that data or otherwise. The instructions from the OS270reduce the number of manual button selections made by workers. The OS270may be stored in the memory240, and the processor250executes the OS270. The OS270is described further below. When the OS270is described as performing a function, an application in or associated with the OS270may perform the function. The transmitter280processes data from the processor250for presentation to external components. For instance, the transmitter280converts data from the processor250from digital electrical signals to RF signals. Finally, the output ports290output data from the transmitter280to, for instance, components of the drilling system100.

FIG.3is a flowchart illustrating a method300of operating a drilling system with downhole motor stall detection, correction, and prevention according to an embodiment of the disclosure. Though depicted sequentially as a matter of convenience, at least some of the actions shown can be performed in a different order and/or performed in parallel. Additionally, some implementations may perform only some of the actions shown. The drilling system100performs at least a portion of the method300. The method300may be a geographically local method, meaning it is unique to the drilling system100, including the subsurface earthen formation145, or to a well area. The computing system165may execute at least a portion of the method300in real time and automatically.

At step310, the OS270, an application executed by the OS270, or an application otherwise executed by the computing system165is configured to identify a stall of the motor190, and to detect the operational conditions in the drilling system100that are indicative of a stall in the motor190. In some implementations of the drilling system100, configuring the OS270to detect a stall of the motor190includes training a machine learning model to detect a stall of the motor190, and to detect the operational conditions in the drilling system100that are indicative of a stall in the motor190. Information regarding training of a machine learning model to identify a stall in the motor190is provided inFIG.10and corresponding explanatory text.

At step320, the OS270, and a machine learning model trained to identify a stall in the motor190, is deployed at a wellsite as part of the drilling system100.

At step330, the drilling system100is operated. For instance, the OS270automatically instructs the drilling system100to operate. Alternatively, a worker manually initiates the drilling system100. Operation of the drilling system100includes actuating the motor190to rotate the bit195and remove material from the subsurface earthen formation145.

At step340, detection is performed. For instance, the OS270obtains, from the sensor system, data in the form of monitoring parameters. In implementations including a machine learning model to detect a stall in the motor190, the OS270provides the monitoring parameters to the machine learning model. OS270detects whether a motor stall has occurred based on how those monitoring parameters change over time. The OS270does so in a continuous manner or at set intervals. In some embodiments, the monitoring parameters include a measurement of RPM, a measurement of surface torque, a measurement of flow rate, and a measurement of SPP. The RPM is a rotational velocity of the motor190and is measured in a number of rotations of the motor190per minute. The surface torque is a rotational force the top drive130, a rotary table, or the motor190applies to the bit195and is measured in foot-pounds, joules, or Newton-meters. The flow rate is a rate of flow of drilling fluid in the bit195and may be measured in gallon per minute. The SPP is a total pressure loss in the drilling system100that occurs due to fluid friction and may be measured in pounds per square inch (PSI).

At decision350, whether the detection indicates that the motor190is stalled is determined. If the motor190is not stalled, then the method300returns to step340. If the motor190is stalled, then the method300proceeds to step360.

To determine whether the motor190is stalled, the OS270may determine whether the following inequality is satisfied:
motor stall index>motor stall threshold.  (1)
In inequality (1), the motor stall threshold is determined by analysis of identified motor stalls in the training process, and may change based on variation in operating conditions that cause the motor190to stall. The motor stall index is represented by the following formula:
motor stall index=α*[(RPM index)*(surface torque index)]+β*[(flow rate index)*(SPP index)]  (2)
where:
0≤motor stall index≤1;
0≤α≤1;
0≤β≤1; and
α+β=1.
α and β are coefficients that control the degree of torque and SPP influence on motor stall index, and guarantee the motor stall index is between 0 and 1. The values of α and β may be varied based on operational conditions (such as: composition of the subsurface earthen formation145being drilled, whether the top drive130is rotating the drill string180, etc.). For example, if the top drive130is not rotating the drill string180, then the value of α may be reduced to decrease the contribution of torque to the motor stall index, and the value of β may be increased to increase the influence of SPP on the motor stall index.

The RPM index, the surface torque index, the flow rate index, and the SPP index are performance indices that compare performance of an activity of the drilling system100during operation at step330to reference performance of the activity. The reference performance may be of the drilling system100in the subsurface earthen formation145during a period prior to step330, the drilling system100in a different subsurface earthen formation, or a different drilling system. As an example, the RPM index, the surface torque index, the flow rate index, and the SPP index use the following general formula:

index=11+e-k⁡(-ROC+SP)(3)
where:index may be the RPM index, the surface torque index, the flow rate index, or the SPP index;e is a mathematical constant that is approximately equal to 2.71828;k is a constant learned during a training process;ROC is computed by the computing system165based on the received measurements, and is a measure of how much the RPM, the surface torque, the flow rate, or the SPP has changed over a given period of time and is in constant units; andSP is a constant threshold, determined in the training process, that varies depending on the index and is used to scale units to a range between 0 and 1.

The RPM and the flow rate are system inputs because the OS270modifies them to achieve desired behavior during operation. The surface torque and the SPP are system outputs because the OS270monitors them as the OS270modifies the RPM and the flow rate. Equation (2) correlates how the system inputs affect detection of a motor stall or a near motor stall by monitoring the corresponding system outputs. If the RPM and the flow rate are stable, then the surface torque and the SPP should also be stable under normal conditions. However, if the RPM and the flow rate are stable, but the surface torque and the SPP begin to move towards a limit of safe operation, then a motor stall may occur.

Equations (2) and (3) correlate the RPM, the surface torque, the flow rate, and the SPP in a unit-less manner, which is helpful for analyzing scenarios where units and thresholds are constantly changing. For example, the RPM of a first rig is 30-35 and the RPM of a second rig is 100-150. A change of 2 RPM has a bigger impact on the first rig than it does on the second rig. Moreover, the resulting surface torque will be different for the first rig and the second rig. In order to implement machine learning, it is important to normalize those differences. Equations (2) and (3) provide such normalization by using indices instead of raw data.

Both the RPM index and the flow rate index may be referred to as penalty terms in equation (2). The RPM index increases or is close to 1 when the RPM is stable or changes within the RPM threshold, and the RPM index decreases or is close to 0 when the RPM changes beyond the RPM threshold. The surface torque index increases when the surface torque is above the surface torque threshold and is otherwise 0. When the RPM index is relatively smaller, the surface torque has less of an effect on whether a motor stall has occurred because a change in RPM typically corresponds to a change in surface torque. Similarly, the flow rate index increases or is close to 1 when the flow rate is stable or changes within the flow rate threshold, and the flow rate index decreases or is close to 0 when the flow rate changes beyond the flow rate threshold. The SPP index increases when the SPP is above the SPP threshold and is otherwise 0. When the flow rate index is relatively smaller, the SPP has less of an effect on whether a motor stall has occurred because a change in the flow rate typically corresponds to a change in the SPP.

At least five cases may occur. In a first case, the RPM index, the surface torque index, the flow rate index, and the SPP index remain the same or undergo negligible changes, so the motor stall index remains the same, thus indicating no motor stall has occurred. In a second case, the RPM index and the flow rate index remain the same or undergo negligible changes, and the surface torque index and the SPP index increase, so the motor stall index increases, thus indicating a motor stall has occurred. In a third case, the RPM index either increases or decreases, the flow rate index remains the same or undergoes a negligible change, and the surface torque index and the SPP index increase, so the motor stall index decreases, thus indicating no motor stall has occurred. In a fourth case, the RPM index remains the same or undergoes a negligible change, the flow rate index either increases or decreases, and the surface torque index and the SPP index increase, so the motor stall index decreases, thus indicating no motor stall has occurred. In a fifth case, the RPM index and the flow rate index either increase or decrease, and the surface torque index and the SPP index increase, so the motor stall index decreases, thus indicating no motor stall has occurred.

At step360, the motor190is stalled, and correction is performed to restart the motor190. For instance, the OS270instructs the user I/O device230to display a warning that motor stall has occurred and that the drilling system100will enter a motor stall correction procedure. The OS270may instruct the top drive130to decrease its RPM to 0, and the OS270may instruct the drilling system100to decrease the flow rate or turn the mud pumps off. The drilling system100may then perform a control unwind of top drive torque until trapped torque is below a threshold. The drilling system100may then hoist the bit off bottom and perform a control unwind of top drive torque if necessary. In some implementations of the drilling system100, the computing system165may implement multiple simultaneous actions to correct a stall in the motor190. For example, the computing system165may simultaneously control the drawworks135to reduce weight on bit, control (e.g., reverse rotation of) the top drive130(or rotary table) to reduce torque in the drill string180, and control a mud pump reduce fluid pressure in the drill string180.

At step370, the OS270takes action to prevent the motor190from stalling in the future. For example, the OS270instructs components of the drilling system100to change their behavior in order to reduce the likelihood of a motor stall or a near motor stall occurring in the future. Actions taken by the OS270to prevent future stalls of the motor190may include reducing the weight on bit by a predetermined amount (e.g., a predetermined percentage of the weight on bit at the time the motor190stalled), reducing the flow rate of the drilling fluid by a predetermined amount (e.g., a predetermined percentage of the drilling fluid flow rate at the time the motor190stalled), and/or changing another drilling parameter that affects operation of the motor190.

The OS270or an application of the OS270may perform steps340,360, and370and execute decision350as part of an algorithm stored in the memory240.

FIGS.4-9show examples of the RPM, flow rate, torque and SPP measurement values and indices used in the drilling system100to identify a stall or near stall of the motor190.FIG.4shows flow rate402, SPP404, RPM406, and torque408produced by operation of the drilling system100under conditions that may indicate a stall of the motor190. In interval412, SPP404and torque408increase substantially, and flow rate402and RPM406decrease substantially, which may indicate that the motor190has stalled.

FIG.5shows the flow rate402, the ROC502of the flow rate402, and the flow rate index504derived from the ROC502using equation (3). The flow rate index504transitions from 1 to 0 as the ROC502of the flow rate402changes substantially in interval412.

FIG.6shows the SPP404, the ROC602of the SPP404, and the SPP index604derived from the ROC602using equation (3). The SPP index604transitions from 1 to 0 as the ROC602of the SPP604increases substantially in interval412.

FIG.7shows the RPM406, the ROC702of the RPM406, and the RPM index704derived from the ROC702using equation (3). The RPM index704transitions from 1 to 0 as the ROC702of the RPM406changes substantially in interval412.

FIG.8shows the torque408, the ROC802of the torque408, and the torque index804derived from the ROC802using equation (3). The torque index804does not change in interval412.

FIG.9shows the SPP404, the torque408, and the motor stall index902. The motor stall index902is derived from the flow rate index504, the SPP index604, the RPM index704, and the torque index804using equation (2). Given the values of the flow rate index504, the SPP index604, the RPM index704, and the torque index804illustrated inFIGS.5-8, the motor stall index902transitions from 0 to 1 in the interval412indicating that the motor190may be stalled. Given different torque, SPP, flow rate, and RPM measurements, the motor stall index may transition to a different value, and comparison to one or more threshold values may indicate that the motor190is stalled or may be close to stalling.

FIG.10is a flowchart illustrating a generalized method1000of machine learning according to an embodiment of the disclosure. Though depicted sequentially as a matter of convenience, at least some of the actions shown can be performed in a different order and/or performed in parallel. Additionally, some implementations may perform only some of the actions shown. The OS270or an application of the OS270may perform the method1000as part of an algorithm stored in the memory240.

At step1002, drilling system operational data is received. The operational data may include parameters of the motor190(e.g., recommended operational pressure, maximum recommended pressure, etc.), and measurements of RPM, surface torque, flow rate, and SPP acquired while drilling one or more wells. For example, the operational data may include measurements of RPM, surface torque, flow rate, and SPP acquired while drilling many wells prior to initiation of drilling using the drilling system100, and/or the operational data may include measurements of RPM, surface torque, flow rate, and SPP acquired while drilling the borehole155.

At step1004, the operational data is analyzed to identify motor stall incidents and/or near motor stall incidents, and the operational conditions leading to or precipitating the stall or near stall incidents. For example, increases in torque and/or increases in SPP, decreases in RPM, decreases in flow rate indicative of motor stall or near motor stall are identified. Features of the operational data (i.e., features of the measurements), such as ROC of the measurements at or about the time of a motor stall or near motor stall are determined.

In step1006, the operational data is labeled identify motor stalls, near motor stalls, and measurement parameters relevant thereto.

In step1008, the labeled operational data is applied to train a machine learning model to identify motor stalls and/or near motor stalls. The training includes applying the labeled operational data to determine values for α and β of equation (2), a value of SP for RPM index, flow rate index, torque index and SPP index for use in equation (3), and threshold value for comparison to the motor stall index in inequality (1). For example, SP may be determined as a threshold value of an ROC of a measurement indicating instability in the measurement, and α and β may be determined as coefficients of relative importance of SPP and torque to identifying a stall of the motor190.

The step1010, the trained machine learning model is deployed in the drilling system100, and executed to identify motor stalls. Deployment of a trained machine learning model may include providing the values of α, β, and SP determined in step1008to the computing system165for storage in memory and use in equations (2) and (3) to compute the RPM index, flow rate index, torque index, SPP index, and motor stall index in the method300.

The steps of the method1000may be repeated as needed to update the training of the machine learning model and improve detection of motor stalls and near motor stalls in the drilling system100. For example, the method100may be repeated as the drilling system100is drilling the borehole155, using measurements collected during the drilling, to improve detection of motor stalls.

FIG.11depicts a system diagram illustrating a drilling rig software system for automated drilling.FIG.11is described in international patent application number PCT/US17/54446 titled “Drilling Rig Software System Controls Rig Equipment to Automate Routine Drilling Processes” filed on Sep. 29, 2017 by National Oilwell Varco, L.P. (“'xxx Application”), which is incorporated by reference.FIG.11includes a rig computing system1100connected to one or more network devices1110across a network1105. Rig computing system1100may be, for example, a detailed version of computing system165ofFIG.1. Network device1110may include any kind of device accessible across network1105, with which rig computing system1100may communicate. For example, network device1110may be an additional rig computing system, a server, or a remote computer. Network1105may include many different types of computer networks available today, such as the Internet, a corporate network, a LAN, or a personal network such as those over a Bluetooth connection. Each of these networks can contain wired or wireless programmable devices and operate using any number of network protocols (e.g., TCP/IP). Network1105may be connected to gateways and routers, servers, and end user computers.

Rig computing system1100may include, for example, a storage1120, a memory1125and processor1115. Processor1115may include a single processor or multiple processors. Further, processor1115may include different kinds of processors, such as a CPU and a GPU. Memory1125may include a number of software or firmware modules executable by processor1115. Memory1125may include a single memory device or multiple memory devices. As depicted, memory1125may include a rig OS1135and one or more drilling applications1140. The rig OS1135may be a process automation platform that manages rig equipment to execute drilling applications1140. Drilling applications1140may import well plans that describe, for example, the desired drilling directions, and the rig OS performs the planned operations until the target depth is reached. the well plans may be performed at the direction of one or more drilling applications1140. Thus, multiple drilling applications1140may control a single well plan. The rig OS1135may receive tool-agnostic instructions from the drilling applications1140and coordinate the instructions with the tools and other components of drilling components1145to implement the well plan. The drilling applications1140may provide instructions for drilling operations without knowing details regarding the drilling components545, such as the specific tools or how the tools are operated. The rig OS1135may translate the tool-agnostic instructions to tool-specific instructions and deploy those tool-specific instructions to operate the drilling components1145in compliance with the well plan. As an example, the drilling application1140may request a tool command such as a certain top drive rotation speed, but the application may have no context to the top drive's specifications or configurations. The rig OS1135may take the request and translate the correct message to the rig tool. Data related to the drilling operation1130may be stored in a storage1120in the rig computing system. Storage1120may include a single storage device or multiple storage devices. Although components are depicted within a single computing device, the components and functionalities described with respect to the rig computing system1100may instead be reconfigured in a different combination or may be distributed among multiple computing devices.

Rig computing system1100may communicate with one or more network devices1110across network1105. The rig computing system1100may transmit drilling data or other information from the rig computing system1100to the network device1110. For example, rig computing system1100may transmit data related to one or more of the drilling applications1140to a network device1110associated with an entity that manages the particular drilling application1140. Further, the network device1110may include end user computers or servers utilized in conjunction with rig computing system1100.

Multiple drilling applications may be utilized during drilling. The drilling applications may be managed by different entities, such as unique operators, contractors, or owners. Thus, a first activity for a process may be directed by a first application and managed by a first entity, whereas a second activity for the process may be directed by a second application managed by a second entity. The rig computing system may toggle between utilizing the various drilling applications. Further, drilling data generated while a particular entity is controlling an activity may be partitioned into a separate storage from drilling data generated while another entity is controlling an activity. The separate storage may be, for example, a separate physical storage device, a storage partition in a physical storage device, or a different data structure on a storage device. Thus, ownership of an activity may be managed for example, based on depth, formation, or section of a well plan.

FIG.12is a flow diagram illustrating components of a rig computing system. Specifically,FIG.12provides a schematic of a data flow within the rig computing system1200. The rig computing system1200may include rig applications1206, and a rig operating system1208. In addition, the rig computing system1200may include a well program1204, which may facilitate management of the rig. The rig operating system may include several layers in which data flows. The rig operating system1208may receive instructions from the rig applications1206. As described above, the rig application1206may provide tool-agnostic instructions. That is, rig applications1206may be written for generic drilling components, and the rig operating system1208may translate the tool-agnostic instructions into tool-specific instructions to direct the specific downhole tools1202accessible by the rig computing system1200.

The rig operating system1208may include multiple components or layers that are utilized to translate tool-agnostic well plans into tool-specific instructions to direct downhole tools1202to implement the well plan. The rig operating system1208may include a service layer1210, an activity layer1212, and a set of controller modules1214. The service layer1210may coordinate with a tool-agnostic request to an activity layer. The service layer may identify one or more activities required to complete a requested service or process. As an example, the service layer1210may receive instructions from a drilling application with instructions to perform a drill function to a particular depth or in a particular formation. The service layer1210may manage the activities needed to perform the different process functions required to achieve the objective from a current drilling state. The service layer1210may switch between processes or objectives manually based on user input or dynamically based on a predefined well plan or other instructions provided by a rig application1206or well program1204. Further, the process may be dynamically switched based on a model or algorithm input. For example, the service layer1210may switch the process objective from drilling to tripping or to reaming based on the input.

The service layer1210may coordinate with the activity layer1212to manage the various activities required to complete the requested process or service. The activity layer may coordinate with one or more controller modules1214to implement a particular activity. As an example, the activity layer1212may identify various controller modules required to implement an activity as directed by the service layer1210. Further, the activity layer1212may determine whether one or more controller modules1214are available for performing a necessary activity. If a controller module1214is not available, then the activity layer1212may trigger a notification such that the particular activity may be driven by a user.

The controller modules1214act as an abstraction layer that allows rig applications1206to be tool-agnostic and controller module1214to translate the instructions for specific downhole tools1202or other drilling components. Controller modules1214may include state machine logic to start and stop downhole tools1202and other components and bridge the process to the machine. The controller modules1214may translate tool-agnostic instructions into tool-specific instructions based on the specific downhole tools1202or other components available on a rig, thereby driving the tools. The controller modules1214may be tool specific. That is, a controller module may be associated with a particular tool or tools such that the controller module generates tool-specific instructions for that particular tool. Further, the controller modules1214may be associated with multiple tools or components or may be associated with a particular function of a particular tool. As an example, the top drive130may be utilized for processes or activities such as circulation, rotation, and pipe handling. Each of circulation, rotation, and pipe handling may be managed by a separate controller module1214. The controller module1214associated with a particular tool may drive that tool to implement actions to perform the activity. Further, controller modules1214may be associated with particular functionality. For example, one or more controller modules1214may be associated with rotation, whereas another one or more controller modules1214may be associated with circulation. In this example, each controller module1214may be associated with a particular set of drilling components based on functionality and may include the capability to translate tool-agnostic instructions into tool-specific instructions for tools associated with the particular functionality.

The service layer1210may manage the scheduling of the various processes by the activity layer1212and the controller modules1214. For example, the service layer may determine a current drilling state and, based on the drilling state, trigger the activity layer1212and thus the controller modules1214to perform an action. For example, if the objective is to drill, the controller modules1214may initiate pumps to prepare for a particular flow and initiate a top drive for a particular circulation.

In addition, the service layer1210may manage the rig applications1206from which instructions are received. The service layer1210may toggle between rig applications based on a drilling state. A drilling state may be determined based on sensor data from sensors185. The drilling state may include contextual data either from or determined by the sensors185or contain environmental contextual data. For example, a first rig application1206may drive the drilling operation to a particular depth, at which point a second rig application1206may take over. Thus, the service layer1210may monitor a current depth or other drilling state information and toggle between the various rig applications1206accordingly.

Further, the well program1204may include a well plan, which may include a set of parameters based on formations and sections and utilized to perform drilling operations. Well program1204may monitor various drilling measurements to ensure that the various drilling components perform within certain thresholds. As an example, thresholds may determine safe operation of the components or may be utilized for resource management, such as power savings, or to limit wear and tear on machinery. The thresholds may be set by the well plan1204or another rig application1206. Further, the thresholds may be dynamically modified, for example, through user input during operation of the rig. The thresholds may be set based on various drilling parameters, such as drilling state (e.g., a current activity, a current depth, or other contextual information). The drilling parameters may be determined, for example, based on sensor data from sensors185. If a rig application1206causes a threshold to be exceeded, then the well program1204may modify the process or activity directed by the application such that the drilling parameter remains within a threshold. For example, if the threshold values at a particular depth indicate that the rotation should be between 125 and 550 RPM and an actual reading from a sensor on the top drive indicates that the actual rotation is 40 RPM, then the well program1204may override the rig application1206to ensure that the minimum rotation is met. Conversely, if the actual rotation is 600 RPM, then the well program1204may direct the rig operating system1208to direct the top drive to lower the rotation speed. The rotation or any other measured parameter may be increased or decreased by a predetermined measurement, a particular percentage, or any other method.