Patent Description:
In an embodiment, a computer-readable medium is encoded with computer-executable instructions for automated drilling of a borehole in a subsurface formation. When executed the computer-executable instructions cause a processor to control drilling of a first interval of the borehole using a set of control variables populated with a set of first values, and to determine a first value of a drilling performance objective corresponding to drilling of the first interval of the borehole. The instructions also cause the processor to control drilling of a second interval of the borehole using the set of control variables populated with a set of second values, and to determine a second value of the drilling performance objective corresponding to drilling of the second interval of the borehole. According to the invention as defined in the claims, the instructions also cause the processor to control drilling of a third interval of the borehole using the set of control variables populated with a set of third values. The processor selects the third set of values based on a determination of which of the first and second values of the drilling performance objective is closest to a predetermined optimal value of the drilling performance objective.

It is to be understood that both the foregoing summary and the following detailed description are exemplary of the invention and are intended to provide an overview or framework for understanding the nature and character of embodiments of the invention claimed herein. The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification.

The following is a description of the figures in the accompanying drawings. The figures are not necessarily to scale, and certain features and certain views of the figures may be shown exaggerated in scale or in schematic form in the interest of clarity and conciseness.

Certain terms are used throughout the following description and claims to refer to particular system components. As one skilled in the art will appreciate, companies may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. 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 connection, or through an indirect connection via other devices and connections. The recitation "based on" is intended to mean "based at least in part on. " Therefore, if X is based on Y, X may be based on Y and any number of additional factors.

The drawings and discussion herein are directed to various embodiments of the invention. The embodiments disclosed are not intended, and should not be interpreted, or otherwise used, to limit the scope of the disclosure, including the claims. In addition, one skilled in the art will understand that the following description has broad application, and the discussion of any embodiment is meant only to be exemplary of that embodiment, and not intended to intimate that the scope of the disclosure, including the claims, is limited to that embodiment. Additional features of the disclosed embodiments will be set forth below.

In an example not forming part of the invention, as illustrated in <FIG>, an apparatus <NUM> for automated drilling of a borehole <NUM> in a subsurface formation <NUM> includes a derrick <NUM> on a rig floor <NUM>. A crown block <NUM> is mounted at the top of the derrick <NUM>, and a traveling block <NUM> hangs from the crown block <NUM> by means of a cable or drilling line <NUM>. One end of the cable or drilling line <NUM> is connected to drawworks <NUM>, which is a reeling device operable to adjust the length of the cable or drilling line <NUM> so that the traveling block <NUM> moves up and down the derrick <NUM>. A top drive <NUM> is supported on a hook <NUM> attached to the bottom of the traveling block <NUM>. The top drive <NUM> is coupled to the top of a drill string <NUM>, which extends through a wellhead <NUM> into the borehole <NUM> below the rig floor <NUM>. The top drive <NUM> is used to rotate the drill string <NUM> inside the borehole <NUM> as the borehole <NUM> is being drilled in the subsurface formation <NUM>. A bottomhole assembly <NUM> is provided at the bottom of the drill string <NUM>. The bottomhole assembly <NUM> includes a bit <NUM> and a downhole motor <NUM> and may include other components not specifically identified but known in the art, e.g., a sensor package.

Although not shown, the automated drilling apparatus <NUM> includes a mud tank, which contains drilling fluid or "mud," a mud pump for transferring the drilling fluid to a mud hose, and a mud treatment system for cleaning the drilling fluid when it is laden with subsurface formation cuttings. The mud hose, in use, would be fluidly connected to the drill string so that the drilling fluid can be pumped from the mud tank into the drill string. The drilling fluid would be returned to the mud treatment system via a return path between the borehole and the drill string or inside the drill string, i.e., if the drill string is a dual-bore drill string. After the drilling fluid is cleaned in the mud treatment system, the clean drilling fluid would be returned to the mud tank. The details of the fluid circulation system are not shown in the drawing of <FIG> because these details are known in the art.

In an example not forming part of the invention, the automated drilling apparatus <NUM> includes sensors (or instruments) <NUM> for measuring drilling variables. A variety of drilling variables may be measured by the sensors <NUM>. The locations of the sensors in the automated drilling apparatus <NUM> and the types of sensors <NUM> will be determined by the drilling variables to be measured by the sensors <NUM>. Examples of drilling variables that may be measured by the sensors <NUM> include, but are not limited to, weight on bit, bit or drill string rotational speed, drill string rotational torque, rate of penetration, bit diameter, and drilling fluid flow rate. The drilling variables may be measured directly or indirectly. In the indirect measurement, the desired drilling variable is derived from other measurable drilling variables. The drilling variables may be measured at the surface and/or in the borehole. For example, drill string rotational torque may be measured at the surface using a sensor <NUM> on the top drive <NUM>. Alternatively, pressure differential across the downhole motor <NUM> may be measured using a sensor <NUM> downhole, and the drill string rotational torque may be derived from the pressure differential. In another example, the load on hook <NUM> may be measured using any suitable means at the surface, and weight on bit may be inferred from the hook load. Various other drilling variables not specifically mentioned above may be measured, or derived, as required by the drilling process.

In an example not forming part of the invention, the automated drilling apparatus <NUM> includes one or more drilling controllers, such as drilling controller <NUM>. In one embodiment, the drilling controller <NUM> includes a processor <NUM>, memory <NUM>, a display <NUM>, a communications interface (or device(s)) <NUM>, and an input interface (or device(s)) <NUM>. The drilling controller <NUM> receives input from a user via the input interface <NUM>. The drilling controller <NUM> communicates with components of the drilling apparatus <NUM> via the communications interface <NUM>. The drilling controller <NUM> can send control set-points to the components of the drilling apparatus <NUM> via the communications interface <NUM>. The drilling controller <NUM> can receive measurement of drilling variables from the various sensors <NUM> of the automated drilling apparatus <NUM> via the communications interface <NUM>. Information related to operation of the drilling controller <NUM> may be presented on the display <NUM>. The drilling controller logic may be loaded in the memory <NUM>, or stored in some other computer-readable media <NUM> for subsequent loading into the memory <NUM>. The processor <NUM> processes the drilling controller logic in memory <NUM> and interacts with the other components of the drilling controller <NUM>.

The drilling controller <NUM> includes or is provided with a set of control variables. A set of control variables may have one or more control variables. Each control variable has a numerical value that indicates a control set-point for a component of the drilling apparatus <NUM>. The components of the drilling apparatus <NUM> of interest are those that can be controlled via set-points. As previously mentioned, the drilling controller <NUM> sends the control set-points (i.e., numerical values of the control variables) to the appropriate drilling apparatus components via the communications interface <NUM>. For example, the drilling controller <NUM> can send a control set-point to the top drive <NUM> that indicates an amount of drill string torsional torque to be outputted by the top drive <NUM>. A feedback loop may be provided between the drilling apparatus components and the drilling controller <NUM> so that the drilling controller <NUM> can monitor variations in the outputs of the drilling apparatus components. For example, if a control set-point to the top drive <NUM> indicates that drill string torsional torque should be set at some value T, the top drive <NUM> may actually output anywhere from T-α to T+α, where α is the variation in the output. The drilling controller <NUM> may collect information about such variations for later use. Although the drilling controller <NUM> is shown primarily at the surface in <FIG>, it should be noted that in other embodiments a portion or all of the drilling controller <NUM> may be located downhole. For example, drilling controller logic responsible for receiving and processing sensor data may be located downhole near where the sensor data is collected.

In an example not forming part of the invention, the automated drilling apparatus <NUM> includes one or more drilling performance optimizers, such as drilling performance optimizer <NUM>. In one embodiment, the drilling performance optimizer <NUM> includes logic for populating the set of control variables associated with the drilling controller <NUM> or the drilling process with a set of numerical values for the purpose of optimizing the drilling process according to a prescribed objective. How the drilling performance optimizer <NUM> works will be further described below in the context of a method for automated drilling of a borehole in a subsurface formation. The drilling performance optimizer logic may be stored on a computer-readable media. The drilling performance optimizer <NUM> may be separate from the drilling controller <NUM> or may be integrated with the drilling controller <NUM>. Where the drilling performance optimizer <NUM> is separate from the drilling controller <NUM>, it may include or be associated with a processor and memory for executing the drilling performance optimizer logic, a communications interface for communicating with the drilling controller <NUM>, and an input interface for receiving input from a user. In other words, the drilling performance optimizer <NUM> may have a structure similar to that of the drilling controller <NUM>, except for the underlying logic. Where the drilling performance optimizer <NUM> is integrated with the drilling controller <NUM>, the drilling performance optimizer logic may reside in memory <NUM>, or in some other computer-readable media <NUM> for subsequent loading into memory <NUM>. In this case, the processor <NUM> would execute the drilling performance optimizer logic.

In <FIG>, the drilling controller <NUM> and drilling performance optimizer <NUM> are shown at the drilling site. However, it is possible to have either or both of the drilling controller <NUM> and the drilling performance optimizer <NUM> at a location remote from the drilling site, with appropriate infrastructure provided to enable communication between the drilling controller <NUM> and desired components of the automated drilling apparatus <NUM>. In one example, as illustrated in <FIG>, the logic of the drilling controller <NUM> and the logic of the drilling performance optimizer <NUM> are loaded onto a server <NUM> at a remote site. Analysts at the remote site can interact with the drilling controller <NUM> and drilling performance optimizer <NUM> via computers <NUM> connected, e.g., via a local area network or wide area network or world wide web, to the server <NUM>. A client <NUM> can be provided at the drilling site. The client <NUM> can receive signals from components, e.g., sensors, of the automated drilling apparatus and can transmit signals to components, e.g., components requiring control set-points, of the automated drilling apparatus. The client <NUM> communicates with the server <NUM> over a network <NUM>, e.g., the World Wide Web. Through the network <NUM>, the logic of the drilling controller <NUM> can transmit control set-points to the client <NUM>, which the client <NUM> will provide to components of the automated drilling apparatus <NUM>. Also, through the network <NUM>, the logic of the drilling controller <NUM> can receive measurement data from the client <NUM>, which the client <NUM> will obtain from components of the automated drilling apparatus <NUM>. In a modification of <FIG>, the drilling controller <NUM> may take the place of the client <NUM>, with the logic of the drilling performance optimizer <NUM> still on the server <NUM>. The drilling controller <NUM> could then communicate with the drilling performance optimizer <NUM> via the network <NUM>. The logic of the drilling controller <NUM> and the drilling performance optimizer <NUM> may be provided as tangible products on computer-readable media. The logic on the computer-readable media, when executed, will perform automated drilling of a borehole, as will be described below.

In an example not forming part of the invention, as illustrated in <FIG>, a APPARATUS AND METHOD FOR AUTOMATED DRILLING OF A BOREHOLE IN A SUBSURFACE FORMATION includes, at <NUM>, defining a set of control variables. This set of control variables will be included in or associated with the drilling controller (<NUM> in <FIG>). The set of control variables defined will depend on the drilling process, i.e., what drilling variables are to be controlled during the drilling process. Examples of control variables are weight on bit, bit rotational speed, drill string rotational torque, rate of penetration, and bit diameter. In general, the set of control variables CV may be expressed as <MAT> where pi represents a control variable. In a practical application, for example, a set of control variables could include bit rotational speed (p<NUM>), weight on bit (p<NUM>), drill string rotational torque (p<NUM>), and rate of penetration (p<NUM>). Prior to use in a drilling process, each control variable will be assigned a numerical value according to a scheme that will be described in more detail below. As previously noted, the numerical value will be a control set-point for a component of the automated drilling apparatus (<NUM> in <FIG>).

The method includes, at <NUM>, defining a drilling performance objective to be optimized during the drilling process. The drilling performance objective is defined in terms of one or more drilling variables. Examples of drilling variables include, but are not limited to, mechanical specific energy, rate of penetration, weight on bit, and bit rotational speed. In general, a drilling performance objective Fj may be defined as <MAT> where Pi represents a drilling variable to be optimized. Some practical examples of drilling performance objectives, which are not intended to limit the invention as otherwise described herein, follow.

In one practical example, a drilling performance objective, F<NUM>, is defined as <MAT> In one example, <MAT> where MSE psi is mechanical specific energy, Em is mechanical efficiency, WOB Ib is weight on bit, D in is bit diameter, Nb rpm is bit rotational speed, T ft-Ib is drill string rotational torque, and ROP ft/hr is rate of penetration. (See, <NPL>, held at the Wyndam Greenspoint in Houston, Texas, April <NUM>-<NUM>, <NUM>, AADE-<NUM>-NTCE-<NUM>. ) The numerical value of F, can be adjusted by adjusting the numerical value of any of the drilling variables in Equation (<NUM>). Typically, Em and D are fixed through at least a portion of a drilling process. WOB, Nb, T, and ROP on the other hand are adjustable at anytime during the drilling process by adjusting the numerical values of the control variables provided by the drilling controller to the drilling apparatus components. In this example, the drilling optimization problem can be expressed as minimizing F, subject to a set of constraints on the drilling variables.

In another practical example, a drilling performance objective, f<NUM>, is defined as <MAT> In one example, <MAT> The value of F<NUM> can be adjusted by adjusting the numerical value of the variable in Equation (<NUM>), and the numerical value of the variable in Equation (<NUM>) can be adjusted by adjusting the numerical values of the control variables provided by the drilling controller to the drilling apparatus components. For example, ROP is affected by weight on bit and bit rotational speed. Adjustment of these variables will affect the value of ROP. In this example, the drilling optimization problem can be expressed as maximizing F<NUM> subject to a set of constraints on the drilling variables.

In another practical example, a drilling performance objective, F<NUM>, is defined as <MAT> Specific forms of f<NUM>(MSE) and f<NUM>(ROP) are not given herein, but the forms of f<NUM>(MSE) and f<NUM>(ROP) will be different from the expressions given in Equations (<NUM>) and (<NUM>), respectively, since it is not possible to directly sum MSE and ROP and MSE and ROP are oppositely related. The value of F<NUM> can be adjusted by adjusting MSE and ROP, and MSE and ROP can be adjusted during a drilling process by adjusting the numerical values of the control variables provided by the drilling controller to the drilling apparatus components. In this example, the drilling performance optimization problem can be expressed as maximizing or minimizing F<NUM>, depending on how f<NUM>, and f<NUM> are defined, subject to constraints on the drilling variables. For example, it is possible to define f<NUM>, and f<NUM> such that when F<NUM> is maximized, MSE is minimized and ROP is maximized.

The method includes, at <NUM>, monitoring variability in control set-points. This involves providing a variety of control set-points to the components of the drilling apparatus and monitoring the outputs of the components to determine how able the system is to operate at the specified set-points. For the remainder of the description of the method illustrated in <FIG>, three sets of test values are defined for the control variables: a set of current test values, a set of reference test values, and a set of previous test values. Also, three values of the drilling performance objective are defined: a current value corresponding to the set of current test values, a reference value corresponding to the set of reference values, and a previous value corresponding to the set of previous test values. These test and performance values will be generated during the automated drilling of the borehole. Initially, the method includes, at <NUM>, generating the set of current test values for the control variables. Any suitable method may be used to generate the set of current test values. For example, a midpoint of the allowable range of values for each control variable may be selected as the current test value of the control variable. The drilling controller (<NUM> in <FIG>) may generate the set of current test values, or the set of current test values may be generated externally, e.g., by a user or other entity, and supplied to the drilling controller.

The method includes, at <NUM>, drilling an interval of the borehole in the subsurface formation using the set of control variables with the set of current test values. For this step, the drilling controller (<NUM> in <FIG>) sends the set of current test values to the components of the drilling apparatus, and the components control the drilling process according to the set-points indicated in the set of current test values. During the drilling, at least the drilling variables that would allow calculation of the drilling performance objective defined at <NUM> are measured. During the drilling, additional data may be collected on set-point variability, as described at <NUM>. The method includes, at <NUM>, sampling the data measured during the drilling of <NUM> and using the sampled data to determine the current value of the drilling performance objective. In one embodiment, the drilling controller (<NUM> in <FIG>) provides the necessary data to calculate the value of the drilling performance objective (as defined at <NUM>) to the drilling performance optimizer (<NUM> in <FIG>), and the drilling performance optimizer subsequently performs the calculation. It is also possible to manually calculate the value of the drilling performance objective, i.e., instead of the drilling performance optimizer performing the calculation. The method includes, at <NUM>, transferring the set of current test values into the set of reference values and transferring the current value of the drilling performance objective into the reference value of the drilling performance.

The method includes, at <NUM>, regenerating the set of current test values for the control variables so that the set of current test values is different from the set of reference test values. In one embodiment, the drilling performance optimizer (<NUM> in <FIG>) automatically regenerates the set of current test values. In other embodiments, a user or other entity may regenerate the set of current test values. The set of current test values is created as an offset of the set of reference test values in a selected search direction. The search direction may be selected automatically by the drilling performance optimizer or may be supplied by a user or other entity. A simple illustration of a set of current test values that is created as an offset of a set of reference test values for a set of control variables CV = {p<NUM>, p<NUM>, p<NUM>, p<NUM>} is shown in <FIG>. In this figure, <NUM> represents a set of reference test values (a<NUM>, a<NUM>, a<NUM>, a<NUM>) for the control variables and <NUM> represents a set of current test values (a<NUM>, a<NUM>, b<NUM>, a<NUM>) for the control variables. In the particular example shown in <FIG>, the reference and current test values for each of the control variables p<NUM>, p<NUM>, and p<NUM> are identical. However, the reference and current test values of the control variable p<NUM> are not identical. Therefore, the offset between the set of current test values and the set of reference values is achieved by modifying the value of control variable p<NUM>. In general, the value of one or more control variables may be modified to generate an offset. In <FIG>, the control variable p<NUM> has a reference test value of as and a current test value of b<NUM>, where b<NUM> is as plus a step value δ. Thus, the amount of offset is step value δ. Below, it will be further illustrated that the offset is directional. The step value by which the value of a control variable is modified may be based on history of set-point variability and may be modified at each repeat of step <NUM>. In general, the step value should be small, but not too small as to be negligible in the noise of the data. Step <NUM> may be referred to as a near search because it involves taking a small step away from the set of reference test values.

<FIG> illustrates offset between a set of current test values and a set of reference test values in one dimension. In <FIG>, a control variable p<NUM> from a set of control variables, e.g., CV = {p<NUM>, p<NUM>,. , pn}, has a reference test value a<NUM>. A step value δ is added to a, in a direction <NUM> to obtain a current test value b<NUM> for the control variable p<NUM>. Alternatively, the step value δ could be added to a, in a direction <NUM> to obtain a current test value b<NUM>° for the control variable p<NUM>. <FIG> illustrates offset between a set of current test values and set of reference values in two dimensions. Two control variables p<NUM> and p<NUM> from a set of control variables, e.g., CV = {p<NUM>, p<NUM>,. , pn}, have the reference test values a<NUM> and a<NUM>, respectively. The current test values of the control variables p<NUM> and p<NUM> are b<NUM> and a<NUM>, respectively, where b<NUM> is a, plus step value δ along the direction <NUM>. Along direction <NUM>, there is no difference between the reference and current test values of pz. Examples of alternate offset directions are indicated at <NUM>, <NUM>, <NUM>, and <NUM>. Along directions <NUM>, <NUM>, and <NUM>, there will be a difference between the reference and current test values of p<NUM>. The envelope <NUM> indicates the allowable search area. If a set of current values is created that is outside of the search area, the set of current values will be discarded and a new set of current values will be created. <FIG> illustrates offset between a set of current test values and a set of reference test values in three dimensions. In <FIG>, control variables p<NUM>, p<NUM>, p<NUM> from a set of control variables, e.g., CV = {p<NUM>, p<NUM>,. , pn}, have reference test values a<NUM>, a<NUM>, a<NUM>, respectively. The current test values of the control variables p<NUM>, p<NUM>, pa are b<NUM>, b<NUM>, and b<NUM>, respectively. The distance between (a<NUM>, a<NUM>, a<NUM>) and (b<NUM>, b<NUM>, b<NUM>) along the direction <NUM> is step value δ. The envelope <NUM> indicates the allowable search area. As noted above, the search direction may be selected automatically by the drilling performance optimizer or may be supplied by a user or other entity. In the former case, the drilling performance optimizer may have access to a set of search directions from which it may make a selection or it may include logic to automatically generate a search direction.

The drilling performance optimizer (<NUM> in <FIG>), or a user or other entity, provides the set of current test values generated at <NUM> to the drilling controller (<NUM> in <FIG>), and the drilling controller in turn provides the set of current test values as control set-points to the components of the drilling apparatus. The method includes, at <NUM>, drilling another test interval of the borehole using the set of control variables set to the set of current test values. During the drilling, at least the drilling variables that would allow calculation of the drilling performance objective are collected. During the drilling, additional data may be collected on variability of the outputs of the components relative to the control set-points. The method includes, at <NUM>, sampling the data measured during the drilling of <NUM> and using the sampled data to determine the current value of the drilling performance objective. In one embodiment, the drilling controller provides the necessary data to calculate the current value of the drilling performance objective to the drilling performance optimizer (<NUM> in <FIG>), and the drilling performance optimizer performs the calculation. The method includes, at <NUM>, transferring the set of current test values into the set of previous test values and transferring the current value of the drilling performance objective to the previous value of the drilling performance objective.

The method includes, at <NUM>, regenerating the set of current test values for the control variables so that the set of current test values is different from the set of previous test values at <NUM> and the set of reference test values at <NUM>. The drilling performance optimizer (<NUM> in <FIG>) can automatically regenerate the set of current test values as an offset of the set of previous test values or an offset of the set of reference test values, depending on how the previous value of the drilling performance objective compares to the reference value of the drilling performance objective. If the previous value of the drilling performance objective is preferred over, i.e., greater than in the context of a maximization problem or less than in the context of a minimization problem (closer to a predetermined optimum value (maximum or minimum) of the drilling performance objective), the reference value of the drilling performance objective, then the set of current test values will be created as an offset of the set of previous test values. This involves continuing the search along the previous direction used at <NUM>. Searching along a previous direction is illustrated in <FIG> using the previous example of <FIG>. In <FIG>, the current test values of the control variables p<NUM> and p<NUM> are c<NUM> and a<NUM>, respectively, where c<NUM> is b<NUM> plus step value δ along the search direction <NUM>, which is the same as the previous search direction <NUM>. Searching along a previous direction may be referred to as a focused search because it involves taking a small step in a previous search direction that has been found to yield a preferred result.

However, if the reference value of the drilling performance objective is preferred over, i.e., greater than in the context of a maximization problem or less than in the context of a minimization problem, the previous value of the drilling performance objective, then search for the set of current test values will be taken along a different direction than previously used at <NUM>. This is illustrated in <FIG> for the previous example of <FIG>. In <FIG>, the current test values of the control variables p<NUM> and p<NUM> are a<NUM> and c<NUM>, respectively, where c<NUM> is a<NUM> plus step value δ along a new search direction <NUM>. The new search direction <NUM> is relative to the set of reference test values. The previous search direction that did not yield a preferred result is shown at <NUM>. The new search direction <NUM> is just an example. Other new search directions are possible, examples of which are illustrated in <FIG>. Searching along a new search direction, such as new search direction <NUM> in <FIG>, is also an example of a near search because it involves taking a small step away from the set of reference test values. As previously indicated, the new search direction may be automatically selected or generated by the drilling performance optimizer or a user or other entity may supply the new search direction.

The method includes returning to step <NUM> with the set of current test values generated at step <NUM> and repeating steps <NUM> to <NUM> a plurality of times. After repeating steps <NUM> to <NUM> a plurality of times, the method includes, at <NUM>, checking whether the reference value of the drilling performance objective has changed over the plurality of times. If the reference value of the drilling performance objective has not changed, it may be a sign that the search is stuck. Some reasons why a search may become stuck will be discussed below. In the case of a stuck search, the method includes, at <NUM>, regenerating the set of current values for the control variables using a larger step value than used during the repeat of steps <NUM> to <NUM>. The larger step value may be a multiple of the smaller step value used during the repeat of steps <NUM> to <NUM>, i.e., mδ, where m > <NUM>. The set of current values is regenerated as an offset of the set of reference values, as described in step <NUM>, but with the larger step value. The direction of the offset may be the same as a previous direction or may be a new direction. The method includes repeating steps <NUM> to <NUM> a plurality of times using the set of current values generated at <NUM>. The effect of using a larger step value in step <NUM> is to move the search to a different section of the search area. The search at step <NUM> may be referred to as a far search because it involves moving the search to a different section of the section area. Steps <NUM> to <NUM> can be repeated as many times as desired during a drilling process.

Table <NUM> below shows an example of a search sequence based on the drilling performance objective indicated in Equation (<NUM>) and a drilling optimization problem of maximizing ROP.

Claim 1:
A non-transitory computer-readable medium encoded with computer executable instructions for automated drilling of a borehole (<NUM>) in a subsurface formation, characterised in that when executed the computer-executable instructions cause a processor to:
control drilling of a first interval of the borehole (<NUM>) using a set of control variables populated with a set of first values;
determine a first value of a drilling performance objective corresponding to drilling of the first interval of the borehole (<NUM>);
control drilling of a second interval of the borehole using the set of control variables populated with a set of second values;
determine a second value of the drilling performance objective corresponding to drilling of the second interval of the borehole;
generate a set of third values for the set of control variables by:
applying a first offset value to one of the set of first values and the set of second values of the control variables, the first offset value comprising a magnitude and direction;
selecting one of the set of first and set of second values of the control variable to which the first offset value is applied by comparing the first value of the drilling performance objective and the second value of the drilling performance objective to a predetermined value of the drilling performance objective, and selecting the direction of the first offset value based on which of the set of first and set of second values of the control variable is applied to produce the value of the drilling performance objective nearest to the predetermined value of the drilling performance objective; and
control drilling of a third interval of the borehole using the set of control variables populated with the set of third values.