Well path drilling trajectory and control for geosteering

Geosteering can be used in a drilling operation to create a wellbore that is used to extract hydrocarbons from a defined zone within the subterranean formation. According to some aspects, generating paths for the wellbore may include using path-planning protocols and pure-pursuit protocols. The pure-pursuit protocol may be executed to output a plurality of candidate drilling paths. The output may also include control parameters for controlling the drill bit. A trajectory optimizer may determine a result of multi-objective functions for each candidate path. A cost function may represent a cost or loss associated with a candidate path. Additionally, the trajectory optimizer may perform an optimization protocol, such as Bayesian optimization, on the cost functions to determine which candidate path to select. The selected candidate path may correspond to new control parameters for controlling the drill bit to reach the target location.

TECHNICAL FIELD

The present disclosure relates generally to wellbore drilling for hydrocarbon production in subterranean formations. More specifically, but not by way of limitation, this disclosure relates to geosteering for a wellbore drilling operation by executing path-planning and pure-pursuit protocols to determine drilling control parameters.

BACKGROUND

Drilling a wellbore involves controlling a drill bit to follow a predefined well path in a subterranean formation. The physical constraints of the drill bit and the uncertainty of conditions within the subterranean formation, however, often cause the drill bit to veer off course from the predefined well path. Precise techniques for tracking the drill bit along the predefined well path may be lacking. Additionally, if the drill bit veers off course, controlling the drill bit to reach a target location may cause increased wear on equipment.

DETAILED DESCRIPTION

Certain aspects and features of the present disclosure relate to geosteering of a drilling subsystem to guide a drilling operation using pure-pursuit protocols. Geosteering can involve adjusting a direction of the drilling subsystem in drilling a wellbore to reach a target location in a subterranean formation. Geosteering can be used in a drilling operation to create a wellbore that is used to extract hydrocarbons from a defined zone (e.g., a pay zone) within the subterranean formation. The pure-pursuit protocol may include code that, when executed, determines the curvature of a path designed to move the drill bit to a target location. The pure-pursuit protocol may output one or more candidate drilling paths for the drill bit to follow to reach the target location. The output may also include control parameters for controlling movement of the drill bit.

In some implementations, a trajectory optimizer may determine a result of one or more cost functions for each candidate path. A cost function may represent a cost or loss associated with a candidate path to the target location. Further, the trajectory optimizer may perform an optimization protocol, such as Bayesian optimization, on the cost functions to determine which candidate path to select. For example, the Bayesian optimization may identify the candidate path associated with the lowest cost function as compared to the other cost functions. The selected candidate path may correspond to new control parameters for controlling the drill bit to follow a new drilling path to reach the target location.

Some examples can involve generating drilling trajectories and control parameters for controlling the drill bit under the physical constraints of the drill bit. For example, the physical constraints of the drill bit may include kinematics (e.g., dogleg severity) and dynamics (e.g., velocity) constraints. Certain aspects include utilizing geosteering information based on machine learning for drilling automation. Additionally, certain aspects may relate to generating multiple possible paths using the pure-pursuit protocol and selecting an optimum path based on a Bayesian optimization of the cost functions. In some examples, the cost functions may be comprised of multi-objectives during well path planning and real-time drilling under a single optimization framework.

A system according to some examples can improve the efficiency of predicting a well path and setting controllable parameters, such as rate of penetration (ROP) and weight of bit (WOB), for drilling operations. The controllable parameters and the well path can be generated and utilized for real-time, closed-loop control and automation of drilling along the well path.

A process flow for enhancing wellbore planning and tracking can be implemented in some examples. The process flow may comprise: (1) generating possible reference path(s) between start and end locations (in a three-dimensional (3D) or two-dimensional (2D) physical space) in the presence of obstacles by using any path planning algorithms, such as, rapidly exploring random tree (RRT), RRT*, robotic planning techniques, such as A* search, D* search, HD* search, and other suitable search algorithms; (2) generating a drilling path that satisfies kinematic, safety, and velocity constraints of a drill bit using any path-planning algorithms and the pure-pursuit algorithm, which results in well path, well trajectory and control parameters for controlling drill bit motion along the trajectory; (3) selecting a well path, which satisfies objective functions, from possible paths generated by performing a Bayesian optimization or any other suitable optimization algorithm; (4) characterizing each possible path using an overall cost function to represent the cost or loss associated with the path; and (5) coupling geosteering information relating to subsurface obstacles and drilling parameter optimization with the trajectory optimization under the Bayesian optimization framework.

Using some examples of the present disclosure, a reference well path between start and end locations can be generated based in part on a presence or absence of obstacles. The reference well path may be used for path planning purposes. Further, the system may generate a drilling path using a pure-pursuit algorithm, physical constraints of the drill bit (e.g., kinematic constraints or dynamic constraints), and the reference well path. The system can generate possible well paths from a drill location to a target location by executing the pure-pursuit protocol. The system can generate a drilling path based on a selected objective function and control a drill bit to move along the drilling path.

FIG.1is a cross-sectional view of an example of a well system100, according to some aspects. A wellbore may be created by drilling into the subterranean formation102using the drilling system100. The drilling system100may be configured to drive a bottom hole assembly (BHA)104positioned or otherwise arranged at the bottom of a drill string106extended into the subterranean formation102from a derrick108arranged at the surface110. The derrick108includes a kelly112used to lower and raise the drill string106. The BHA104may include a drill bit114operatively coupled to a drill string116, which may be moved axially within a drilled wellbore118as attached to the drill string106. Drill string116may include one or more sensors109to determine a location of the drill bit and wellbore or conditions of the subterranean formation. The one or more sensors109may return sensor data for various parameters to the surface through cabling (not shown) or by wireless signal. The combination of any support structure (in this example, derrick108), any motors, electrical connections, and support for the drill string and tool string may be referred to herein as a drilling arrangement.

During operation, the drill bit114penetrates the subterranean formation102and thereby creates the wellbore118. The BHA104provides control of the drill bit114as it advances into the subterranean formation102. Fluid or “mud” from a mud tank120may be pumped downhole using a mud pump122powered by an adjacent power source, such as a prime mover or motor124. The mud may be pumped from the mud tank120, through a stand pipe126, which feeds the mud into the drill string106and conveys the same to the drill bit114. The mud exits one or more nozzles (not shown) arranged in the drill bit114and in the process cools the drill bit114. After exiting the drill bit114, the mud circulates back to the surface110via the annulus defined between the wellbore118and the drill string106, and in the process returns drill cuttings and debris to the surface. The cuttings and mud mixture are passed through a flow line128and are processed such that cleaned mud is returned down hole through the stand pipe126once again.

The drilling arrangement and any sensors109(through the drilling arrangement or directly) are connected to a computing device132. The computing device132can be positioned at the well surface110or elsewhere (e.g., offsite). The computing device132may be in communication with the drill string116, the sensor109, or another electronic device. For example, the computing device132can have a communication interface for transmitting information to and receiving information from another communication interface of the tool string.

In some examples, the computing device132can receive information from downhole (or elsewhere) in substantially real time, which can be referred to as real-time data. The real time data can include information related to the well system100. For example, the drill string116can stream real-time data to the computing device132, where the real-time data may include information about the orientation or location of the drill bit114in the wellbore118, or a rate of movement of the drill bit114through the wellbore118. The computing device132can use the real-time data to provide an ROP of the drill bit114through the subterranean formation102and to provide a location of the drill bit relative to a drill path, waypoints, and obstacles, such as obstacle130. Computing device132can generate drilling paths for wellbore118and generating commands for controlling drill bit114by executing the pure-pursuit protocol, according to some aspects.

FIG.2depicts an example of the computing device132, according to some aspects. The computing device132can include a processing device202, a bus204, a communication interface206, a non-transitory or non-volatile memory device208, a user input device224, and a display device226. In some examples, some or all of the components shown inFIG.2can be integrated into a single structure, such as a single housing. In other examples, some or all of the components shown inFIG.2can be distributed (e.g., in separate housings or in separate locations) and in wired or wireless communication with each other.

The processing device202(e.g., a Field-Programmable Gate Array (“FPGA”), an application-specific integrated circuit (“ASIC”), a microprocessing device, Graphics Processing Unit (GPU), Vector Processor, etc.) can be communicatively coupled to the memory device208via the bus204. The non-volatile memory device208may include any type of memory device that retains stored information when powered off. Non-limiting examples of the memory device208include electrically erasable and programmable read-only memory (“EEPROM”), flash memory, or any other type of non-volatile memory. In some examples, at least some of the memory device208can include a non-transitory medium from which the processing device202can read instructions. A non-transitory machine-readable storage medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device202with computer-readable instructions or other program code. Non-limiting examples of a computer-readable medium include (but are not limited to) magnetic disk(s), memory chip(s), read-only memory (ROM), random-access memory (“RAM”), an ASIC, a configured processing device, optical storage, or any other medium from which a computer processing device can read instructions. The instructions can include processing device-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, etc.

In some examples, the memory device208can store earth model210, such as the locations of waypoints, starting and ending locations, subsurface conditions, and obstacles within a subterranean formation. The memory device208can also store constraints211. The constraints may include the kinematics constraints (e.g., dogleg severity), safety constraints, or velocity constraints (e.g., force, torque, or drag constraints that maximize ROP of a drill bit) related to the drill string and drill bit of a drilling subsystem. In some examples, the memory device208can store executable computer program instructions in pure pursuit212for executing a pure-pursuit protocol to generate new drilling paths with updated control parameters. The memory device208can store executable computer program code instructions in path planning213for executing a path-planning protocol, which makes use of stored reference paths216. The memory device208can store executable computer program instructions optimizer214for performing optimization calculations for the drill path. Results from executing the pure pursuit212, path planning213, or optimizer214can be stored as output values215in the memory device208.

In some examples, the computing device132includes a communication interface206. The communication interface206can represent one or more components that facilitate a network connection or otherwise facilitate communication between electronic devices. Examples include, but are not limited to, wired interfaces such as Ethernet, USB, IEEE 1394, and/or wireless interfaces such as IEEE 802.11, Bluetooth, near-field communication (NFC) interfaces, RFID interfaces, or radio interfaces for accessing cellular telephone networks (e.g., transceiver/antenna for accessing a CDMA, GSM, UMTS, or other mobile communications network).

In some examples, the computing device132includes a user input device224. The user input device224can represent one or more components used to input data. Examples of the user input device224can include a keyboard, mouse, touchpad, button, or touch-screen display, etc.

In some examples, the computing device132includes a display device226, which can render and display a visual realization of the planned well paths or the drilling operation in real time and other information used in the process described herein. The display device226can represent one or more components used to output data. Examples of the display device226can include a liquid-crystal display (LCD), a television, a computer monitor, a touch-screen display, etc. In some examples, the user input device224and the display device226can be a single device, such as a touch-screen display.

FIG.3is a block diagram illustrating an example of a network environment300configured to control operation of the drilling system100, according to some aspects. In some implementations, network environment300may include earth model310, trajectory optimizer320, and ROP optimizer330connected over network340. Network environment300may enable computing device132or the various distributed components of computing device132to generate commands that control the drill bit114of drilling system100to follow certain drilling paths.

Earth model310may be generated using well logs to represent the subsurface information of a subterranean formation. A well log may be a detailed record of geological properties or formations detected by a borehole penetrating the subterranean formation. Earth model310may indicate the presence or absence of obstacles, such as salt bodies, faults, areas with high mud loss or porosity levels. The earth model310may indicate subsurface properties that may represent obstacles to the trajectory optimizer320. Illustrative examples of subsurface properties include permeability, porosity, facies, faults, pore pressure, well locations, and other suitable subsurface properties. The permeability and porosity may be determined using well logs and neural networks in a well pad. The permeability and porosity properties may be used to predict subsurface salt bodies (e.g., where the permeability and porosity is low).

Trajectory optimizer320may be a processor configured to execute instructions stored in a computer memory. Executing the instructions may cause the trajectory optimizer320to generate drilling paths for the drill bit114using the pure-pursuit protocol and an optimization protocol. As an illustrative example, trajectory optimizer320may receive as input (1) a start location (e.g., the location of the drill bit114), (2) a target location, (3) one or more waypoints through which the well path must pass, and (4) the location of obstacles, as indicated by the earth model310. Trajectory optimizer320may execute the pure-pursuit protocol to evaluate the inputs and generate a drill path that avoids the obstacles and passes through any waypoints.

The ROP optimizer330may be a processor configured to execute instructions stored in a computer memory. Executing the instructions may cause the ROP optimizer330to generate control parameters for controlling the rate of penetration of the drill bit114and other controllable aspects of the drill bit114. The ROP optimizer330may evaluate the earth model310to detect subsurface properties of the subterranean formation along the well path generated by the trajectory optimizer320. ROP optimizer330may adjust the controllable parameters of the drill bit114based on the detected subsurface parameters.

FIG.4is a flow diagram illustrating a process400for planning a well path for hydrocarbon production, according to some aspects. Process400may be performed before a drilling operation begins. For example, process400may generate control parameters for controlling the drill bit114to follow a well path. Illustrative examples of control parameters may include bit trajectory, azimuth, direction, inclination, and other suitable controllable parameters.

Process400may begin at step410, where the start location, the end location, and the obstacle data may be inputted into the trajectory optimizer320. The obstacle data may represent the presence or absence of obstacles, as indicated by the earth model310. The trajectory optimizer320, as shown inFIG.4, may also include the ROP optimizer330. Any number of other data points may be inputted into the trajectory optimizer320, such as the location of one or more waypoints.

The trajectory optimizer320may execute a path-planning protocol using the start location, the end location, and the obstacle data. The path-planning protocol may include executing any path-planning algorithm, such as rapidly exploring random tree (RRT), RRT*, robotic planning techniques (e.g., A* search, D* search, HD* search), and other suitable search algorithms. Due to the uncertainty of the subsurface conditions represented by earth model310, executing the path-planning protocol may result in multiple candidate well paths, as shown in step420. Step420represents an example of the output of the trajectory optimizer320. For example, trajectory optimizer320may generate candidate well paths421,422, and423. Each of candidate well paths421,422, and423may pass through waypoints434and435.

In some implementations, trajectory optimizer320may rank the candidate well paths421,422, and423using one or more objective functions. As illustrative examples, objective functions may include the following:

Here L is distance between drill bit and target locations; κ, τ represent curvature and torsion along the well path, respectively; lT, l0represent target and drill bit locations; ROP represents a predicted optimum rate of penetration along the well path; ROPmaxrepresents a maximum possible ROP for normalization purposes; S represents a well path length; h and hsrepresent initial and final characteristic heights of drill bit cutting elements, respectively; and A1, A2, A3, B1, C1are constants.

where n represents the number of path intervals, Lc represents the total path distance, Lcsi represents the path in interval i, Lxsi represents the shortest possible path between start point and end point.

3. Productivity missed due to pay zone.

H1, H2 and (WOB/db)max represent inputs for the bit class. dbrepresents the drill bit diameter.

5. Overall cost of drilling and safety related:
Ocost,safety(Equation 5)

Area represents the cross-sectional area of the drill bit.

The overall cost function is the sum of the objectives below:
Cost of a well path=Og+Itort+Oprod+Owear+Ocost,safety(Equation 8)

Equation 8 can be optimized along with the ROP and mechanical specific energy (MSE). ROP and MSE may be a function of WOB, RPM, inclination, azimuth (from the path), and sub-surface properties.

The trajectory optimizer320may perform an optimization protocol, such as a Bayesian optimization, on the multi-objective functions (e.g., Equations 1 through 7 above) to select a candidate well path that is associated with the lowest cost (as determined in Equation 8). The candidate well path associated with the lowest cost, as compared to the other remaining candidate well paths, may represent the target or optimal well path for the drill bit114to follow. The selected candidate well path may correspond to control parameters (e.g., ROP, azimuth, inclination) for controlling the drill bit114to follow the selected candidate well path.

FIG.5is a flow diagram illustrating a process for dynamically controlling a drill bit during drilling operation, according to some aspects. Process500may be performed during a drilling operation while the drill bit114is drilling in the subterranean formation along the well path selected inFIG.4. Process500may generate a new well path from a location of the drill bit114to the target location. For example, trajectory optimizer320may generate a new well path during the drilling operation if the drill bit114has veered off course from the well path selected inFIG.4. The new well path may correspond to new control parameters for the drill bit114to follow the new well path.

Process500may begin at step510, where the well path and one or more physical constraints of the drill bit114may be inputted into the trajectory optimizer320. For example, the physical constraints of the drill bit114may include a kinematic constrain, such as a dogleg severity, and a dynamics constraint, such as a constraint governing the velocity of the drill bit114. The trajectory optimizer320, as shown inFIG.5, may also include the ROP optimizer330. Any number of data points may be inputted into the trajectory optimizer320.

Trajectory optimizer320may receive the input of the well path and the one or more physical constraints of the drill bit. Trajectory optimizer320may execute the pure-pursuit protocol using the inputted information. As an illustrative example, the pure-pursuit algorithm may include the following steps: (1) determine a current location of the drill bit114in a global coordinate system, (2) identify the closest point on the well path to the drill bit114, (3) select a constant look-ahead distance, (4) identify coordinates on the well path that is the look-ahead distance away from the current location of the drill bit114, (5) determine the curvature and steering angle for the drill bit114to reach the coordinates on the well path, and (6) generate commands to control the drill bit114to reach the coordinates on the well path. The trajectory optimizer320may generate output520including a new drilling path and the corresponding control parameters for controlling the drill bit114to follow the new drilling path. Similar to the description ofFIG.4, the trajectory optimizer320may generate multiple candidate well paths due to the uncertainty of the subsurface conditions. The trajectory optimizer320may evaluate the multiple candidate well paths using Equations (1) through (8) and perform an optimization, such as a Bayesian optimization, to select the candidate well path associated with the minimum or lowest cost (e.g., the result of Equation (8)).

In some implementations, trajectory optimizer320may perform the pure-pursuit protocol even if the drill bit114has not veered off course from the well path. For example, during the drilling operation, the one or more sensors109of the drill bit114may generate sensor data530. The sensor data530may include the subsurface conditions of the subterranean formation that are not represented in the earth model310. The earth model310may be updated by the sensor data530due to the natural uncertainty of subsurface information. If the sensor data530, which is collected during the drilling operation, indicates that the well path may penetrate an unexpected obstacle, the trajectory optimizer320may execute the path-planning protocol and the pure-pursuit protocol to generate a new well path that avoids the unexpected obstacle.

FIG.6is a flowchart illustrating an example of a process600for planning a wellbore path, according to some aspects. Process600may be performed by computing device132, the trajectory optimizer320, or the ROP optimizer330. Further, process600may be performed to generate a well path for a drilling operation.

Process600may begin with block602, where, for example, computing device132may generate a well path between the drill bit and a target location by executing the path-planning protocol. The computing device132may input the start location (e.g., the location of the drill bit114), the target location, the location of one or more waypoints, and any obstacles indicated by the earth model310into the path-planning protocol. The computing device132may generate one or more well paths as an output of executing the path-planning protocol.

At block604, the computing device132may determine a result of one or more objective functions for each well path generated at block602. Each of Equations (1) through (7) may be an objective function. Each objective function may represent an aspect of a well path. For example, Equation (2) may represent a cost associated with the tortuosity (e.g., a property of a curve being twisted) of a candidate well path. At block606, computing device132may execute an optimization protocol, such as a Bayesian optimization, to obtain the values that yield the lowest result of the cost function (Equation 8). Examples of the optimization protocol include deterministic optimization algorithms and stochastic algorithms. In implementations where a single well path is generated at block602, the optimization protocol may evaluate Equations (1) through (7) for the path to identify the variables that yield the lowest cost (from Equation 8). The identified variables may be used to design the well path and the control parameters for the drill bit114. In implementations where multiple well paths are generated at block602, the optimization protocol may evaluate Equations (1) through (7) to identify the candidate path with the lowest cost. At block608, the candidate path associated with the lowest cost may be determined to be optimal amongst the remaining candidate paths. At decision block610, computing device132may iteratively perform blocks602through606at regular or irregular time intervals. A termination condition may be set for stopping the iterations. For example, the termination condition may be satisfied after n iterations.

FIG.7is a flowchart illustrating an example of a process700for generating a new wellbore path while the drill bit is operating, according to some aspects. Process700may be performed by computing device132, the trajectory optimizer320, or the ROP optimizer330. Further, process700may be performed to generate a new well path during a drilling operation.

Process700may begin with block702, where, for example, the computing device132may generate multiple paths between the location of the drill bit114and the target location by executing the path-planning protocol. Any waypoints may also be included. At block704, the computing device132may determine a result for multi-objective functions based on the physical constraints of the drill bit114. For example, the computing device132may determine the results of Equations (1) through (8) for each well path of the multiple well paths generated at block702. The variables of a well path (e.g., the length of the path, the tortuosity of the path, and so on) may be used to determine the results of Equations (1) through (8).

At block706, the computing device132may evaluate the results of the mufti-objective functions to select a well path associated with the lowest cost (e.g., the result of Equation 8). As an illustrative example, the computing device132may perform a Bayesian optimization on the results of the multi-objective functions to identify which well path is associated with the lowest cost. The selected well path may correspond to control parameters for controlling the drill bit114to follow the selected well path during the drilling operation.

At block708, the computing device132may generate commands that control the drill bit114to follow the selected well path. Additionally, during the drilling operation, the one or more sensors109of the drill bit114may collect sensor data of subsurface conditions of the subterranean formation. The collected sensor data may be transmitted back to the computing device132to update the earth model310and potentially update the selected well path. At decision block710, computing device132may iteratively perform blocks702through708at regular or irregular time intervals. A termination condition may be set for stopping the iterations. For example, the termination condition may be satisfied after n iterations.

FIG.8is a flowchart illustrating an example of a process for evaluating multiple candidate paths, according to some aspects. Process800may be performed by computing device132, earth model310, the trajectory optimizer320, or the ROP optimizer330. Further, process800may be performed to evaluate the results of multi-objective functions to select a well path from multiple well paths.

Process800may begin with block802, where, for example, the computing device132may generate the earth model310from well logs characterizing a subterranean formation. The earth model310may indicate the presence or absence of subsurface obstacles. At block804, the computing device132may execute a path-planning protocol and a pure-pursuit protocol to generate sample paths. At block806, the computing device132may determine the hydrocarbon production for each sample path. The hydrocarbon production may be determined using the earth model and a machine-learning model (e.g., a neural network) to generate predictions of the hydrocarbon production along each sample path.

At block808, the computing device132may determine the results of Equations (1) through (8) for each sample path generated at block804. At block810, the computing device132may generate a prediction of an optimal path from amongst the sample paths based on the results of the cost functions determined at block808. As an illustrative example, the computing device may perform a Bayesian optimization on the multi-objective functions and cost functions generated at block808. At decision block812, computing device132may iteratively perform blocks804through810at regular or irregular time intervals. A termination condition may be set for stopping the iterations. For example, the termination condition may be satisfied after n iterations.

FIG.9is an example of an interface900displaying an output, according to some aspects. The interface900may display a visual representation of the subterranean formation that is continuously updated as the drilling operation proceeds. The interface900may be displayed on the computing device132. As an illustrative example, the visual indicator902for the drill bit may represent the location of the drill bit114in the subterranean formation. The visual indicator906for the well path may pass through the visual indicator904for the waypoint.

FIGS.10-13illustrate examples of well path realizations in a 3D environment, according to some aspects.FIGS.10-12illustrate the different path realizations generated by the path-planning protocol.FIG.13illustrates a target ROP for the path.

In some aspects, drilling paths and control parameters of a drilling operation can be generated according to one or more of the following examples. As used below, any reference to a series of examples is to be understood as a reference to each of those examples disjunctively (e.g., “Examples 1-4” is to be understood as “Examples 1, 2, 3, or 4”).

Example 1 is a system comprising: a processing device; and a non-transitory medium comprising instructions that are executable by the processing device to cause the processing device to perform operations comprising: generating, based on a presence or absence of obstacles within a subterranean formation, a reference well path for a drill bit adapted to drill in the subterranean formation, the reference well path including a start location and a target location; generating a drilling path for the drill bit using the reference well path and a physical constraint of the drill bit, the drilling path corresponding to a control parameter for controlling the drill bit, and the control parameter satisfying the physical constraint of the drill bit; tracking a location of the drill bit while the drill bit is drilling along the drilling path in the subterranean formation; generating, by executing a pure-pursuit protocol, a plurality of candidate well paths from the location of the drill bit to the target location; determining a result of an objective function for each candidate well path of the plurality of candidate well paths; selecting, based on the result of the objective function, a candidate well path from the plurality of candidate well paths, the selected candidate well path representing a target path from the location of the drill bit to the target location, and the selected candidate well path corresponding to a new control parameter for controlling the drill bit; and outputting one or more commands for controlling the drill bit according to the new control parameter of the selected candidate well path.

Example 2 is the system of example 1, wherein the operations further comprise: outputting the one or more commands for controlling the drill bit according to the control parameter of the drilling path using the pure-pursuit protocol; detecting that the location of the drill bit is off course from the drilling path; and in response to detecting that the location of the drill bit is off course from the drilling path, generating the plurality of candidate well paths using the pure-pursuit protocol, each candidate well path of the plurality of candidate well paths being configured to control the drill bit to the target location.

Example 3 is the system of example(s) 1-2, wherein the operations further comprise: receiving the start location of the drill bit before drilling has occurred in the subterranean formation; receiving a waypoint; receiving the target location; receiving an earth model indicating the presence or absence of obstacles within the subterranean formation; executing a path-planning protocol using the start location, the waypoint, the target location, and the earth model; and generating the reference well path based on a result of executing the path-planning protocol.

Example 4 is the system of example(s) 1-3, wherein the operations further comprise: displaying a visual representation of the subterranean formation; displaying a first visual indicator representing the location of the drill bit; displaying a second visual indicator representing the drilling path; updating a location of the first visual indicator to match the location of the drill bit while the drill bit is operating; and updating the second visual indicator from representing the drilling path to representing the selected candidate well path.

Example 5 is the system of example(s) 1-4, wherein the operations further comprise: calculating a plurality of objective functions for each candidate well path of the plurality of candidate well paths, the plurality of objective functions including the objective function; calculating a cost function for each candidate well path of the plurality of candidate well paths, wherein the cost function is a combination of two or more objective functions of the plurality of objective functions; and performing an optimization protocol on the plurality of objective functions, the performance of the optimization protocol resulting in the selection of the candidate well path from the plurality of candidate well paths, and the cost function associated with the selected candidate well path being a minimum from amongst the plurality of cost functions.

Example 6 is the system of example(s) 1-5, wherein the operation of performing the optimization protocol includes generating the new control parameter for controlling the drill bit according to the selected candidate well path.

Example 7 is the system of example(s) 1-6, wherein the operation of generating the drilling path includes executing the pure-pursuit protocol to generate the drilling path, wherein the execution of the pure-pursuit protocol generates the drilling path in a manner that satisfies a kinematic constraint or a velocity constraint of the drill bit.

Example 8 is a computer-implemented method comprising: generating, based on a presence or absence of obstacles within a subterranean formation, a reference well path for a drill bit adapted to drill in the subterranean formation, the reference well path including a start location and a target location; generating a drilling path for the drill bit using the reference well path and a physical constraint of the drill bit, the drilling path corresponding to a control parameter for controlling the drill bit, and the control parameter satisfying the physical constraint of the drill bit; tracking a location of the drill bit while the drill bit is drilling along the drilling path in the subterranean formation; generating, by executing a pure-pursuit protocol, a plurality of candidate well paths from the location of the drill bit to the target location; determining a result of an objective function for each candidate well path of the plurality of candidate well paths; selecting, based on the result of the objective function, a candidate well path from the plurality of candidate well paths, the selected candidate well path representing a target path from the location of the drill bit to the target location, and the selected candidate well path corresponding to a new control parameter for controlling the drill bit; and outputting one or more commands for controlling the drill bit according to the new control parameter of the selected candidate well path.

Example 9 is the computer-implemented method of example 8, further comprising: outputting the one or more commands for controlling the drill bit according to the control parameter of the drilling path using the pure-pursuit protocol; detecting that the location of the drill bit is off course from the drilling path; and in response to detecting that the location of the drill bit is off course from the drilling path, generating the plurality of candidate well paths using the pure-pursuit protocol, each candidate well path of the plurality of candidate well paths being configured to control the drill bit to the target location.

Example 10 is the computer-implemented method of example(s) 8-9, further comprising: receiving the start location of the drill bit before drilling has occurred in the subterranean formation; receiving a waypoint; receiving the target location; receiving an earth model indicating the presence or absence of obstacles within the subterranean formation; executing a path-planning protocol using the start location, the waypoint, the target location, and the earth model; and generating the reference well path based on a result of executing the path-planning protocol.

Example 11 is the computer-implemented method of example(s) 8-10, further comprising: displaying a visual representation of the subterranean formation; displaying a first visual indicator representing the location of the drill bit; displaying a second visual indicator representing the drilling path; updating a location of the first visual indicator to match the location of the drill bit while the drill bit is operating; and updating the second visual indicator from representing the drilling path to representing the selected candidate well path.

Example 12 is the computer-implemented method of example(s) 8-11, further comprising: calculating a plurality of objective functions for each candidate well path of the plurality of candidate well paths, the plurality of objective functions including the objective function; calculating a cost function for each candidate well path of the plurality of candidate well paths, wherein the cost function is a combination of two or more objective functions of the plurality of objective functions; and performing an optimization protocol on the plurality of objective functions, the performance of the optimization protocol resulting in the selection of the candidate well path from the plurality of candidate well paths, and the cost function associated with the selected candidate well path being a minimum from amongst the plurality of cost functions.

Example 13 is the computer-implemented method of example(s) 8-12, wherein performing the optimization protocol further comprises: generating the new control parameter for controlling the drill bit according to the selected candidate well path.

Example 14 is the computer-implemented method of example(s) 8-13, wherein generating the drilling path further comprises: executing the pure-pursuit protocol to generate the drilling path, wherein the execution of the pure-pursuit protocol generates the drilling path in a manner that satisfies a kinematic constraint or a velocity constraint of the drill bit.

Example 15 is a computer-program product tangibly embodied in a non-transitory machine-readable storage medium, including instructions configured to cause a processing apparatus to perform operations including: generating, based on a presence or absence of obstacles within a subterranean formation, a reference well path for a drill bit adapted to drill in the subterranean formation, the reference well path including a start location and a target location; generating a drilling path for the drill bit using the reference well path and a physical constraint of the drill bit, the drilling path corresponding to a control parameter for controlling the drill bit, and the control parameter satisfying the physical constraint of the drill bit; tracking a location of the drill bit while the drill bit is drilling along the drilling path in the subterranean formation; generating, by executing a pure-pursuit protocol, a plurality of candidate well paths from the location of the drill bit to the target location; determining a result of an objective function for each candidate well path of the plurality of candidate well paths; selecting, based on the result of the objective function, a candidate well path from the plurality of candidate well paths, the selected candidate well path representing a target path from the location of the drill bit to the target location, and the selected candidate well path corresponding to a new control parameter for controlling the drill bit; and outputting one or more commands for controlling the drill bit according to the new control parameter of the selected candidate well path.

Example 16 is the non-transitory machine-readable storage medium of example(s) 15, wherein the operations further comprise: outputting the one or more commands for controlling the drill bit according to the control parameter of the drilling path using the pure-pursuit protocol; detecting that the location of the drill bit is off course from the drilling path; and in response to detecting that the location of the drill bit is off course from the drilling path, generating the plurality of candidate well paths using the pure-pursuit protocol, each candidate well path of the plurality of candidate well paths being configured to control the drill bit to the target location.

Example 17 is the non-transitory machine-readable storage medium of example(s) 15-16, wherein the operations further comprise: receiving the start location of the drill bit before drilling has occurred in the subterranean formation; receiving a waypoint; receiving the target location; receiving an earth model indicating the presence or absence of obstacles within the subterranean formation; executing a path-planning protocol using the start location, the waypoint, the target location, and the earth model; and generating the reference well path based on a result of executing the path-planning protocol.

Example 18 is the non-transitory machine-readable storage medium of example(s) 15-17, wherein the operations further comprise: displaying a visual representation of the subterranean formation; displaying a first visual indicator representing the location of the drill bit; displaying a second visual indicator representing the drilling path; updating a location of the first visual indicator to match the location of the drill bit while the drill bit is operating; and updating the second visual indicator from representing the drilling path to representing the selected candidate well path.

Example 19 is the non-transitory machine-readable storage medium of example(s) 15-18, wherein the operations further comprise: calculating a plurality of objective functions for each candidate well path of the plurality of candidate well paths, the plurality of objective functions including the objective function; calculating a cost function for each candidate well path of the plurality of candidate well paths, wherein the cost function is a combination of two or more objective functions of the plurality of objective functions; and performing an optimization protocol on the plurality of objective functions, the performance of the optimization protocol resulting in the selection of the candidate well path from the plurality of candidate well paths, and the cost function associated with the selected candidate well path being a minimum from amongst the plurality of cost functions.

Example 20 is the non-transitory machine-readable storage medium of example(s) 15-19, wherein the operation of performing the optimization protocol includes generating the new control parameter for controlling the drill bit according to the selected candidate well path.