Optimizing the separation factor along a directional well trajectory to minimize collision risk

Optimizing the trajectory of directional wellbores is essential to minimize drilling costs and the impacts of potential drilling problems. It poses multi-objective optimization challenges. Well-design optimization models initially focus on wellbore-length minimization, but ideally also need to consider minimizing the surface torque during drilling and address, among other constraints, collision avoidance with offset wells. A novel trajectory-optimization model is described that computes the separation factor along the wellbore. It employs a genetic optimization algorithm with an objective function that maximizes the minimum separation factor along the entire length of a wellbore. Plausible well trajectories are identified within a feasible solution space defined by user-identified constraints. The simplicity and effectiveness of the proposed model are demonstrated using a case study involving real well data from the Reshadat oil field offshore southern Iran. In the case considered, a proposed well trajectory is identified as unsafe in terms of its minimum separation factor with an offset well and is re-planned with the proposed model to achieve a safer trajectory.


Introduction
The gas and oil drilling industry in recent years has become focused on optimizing its performance from various perspectives, in particular safety, cost, time and more generally achieving the objectives stated in approved drilling plans. Many optimization models have emerged in recent years with various objective functions related to key drilling variables such as weight on bit (WOB) revolutions per minute (RPM) rate of penetration (ROP), some focusing on multiple objectives (Guria et al. 2014;Mansouri et al. 2015;Wang et al. 2016).
Minimizing wellbore length for complex directional well trajectories taking into account a range of constraints including, inclinations, build rates, azimuths, dog-leg severity (DLS) and frictional torque on the drill string has been the focus of several studies (Atashnezhad et al. 2014;Mansouri et al. 2015;Wood 2016a), some using a range of evolutionary optimizers and metaheuristic algorithms (Wood 2016b;Khosravanian et al. 2018). Well-design optimization also involves a number of other considerations, such as casing placement scenarios (Khosravanian and Aadnoy 2016) and well-collision issues (Wang et al. 2016).
An issue more regularly impacting the industry is the increase in directional drilling of cluster wells, i.e., multiple wellbores drilled from a single surface site, both on land with pad drilling for the development of unconventional oil and gas resources (Buchanan et al. 2013) and offshore from field platforms. In such cases, a major concern is potential collisions between new and existing wellbores. Collisions between wells can have potentially catastrophic consequences, particularly if the offset well impacted is a producing well. Well planning to avoid collisions has typically used trial-and-error approaches with close approach warnings leading to certain trajectories being rejected (Clouzeau et al. 1998). The error and uncertainty in downhole survey measurements has also lead to an interest in direct downhole detection methods of offset well proximity (Yin et al. 2015).
Over the past 20 years or more, with the increase in directional drilling, it has become routine to conduct anti-collision analysis and risk assessment as part of the well plan for each new borehole to be drilled (Williamson 1998). This needs to be applied alongside routine wellbore trajectory modeling (Strømhaug 2014) as part of directional well planning. Over the past 40 years many models have been proposed to analyze the subsurface position of wellbore trajectories and the position uncertainties and errors associated with those trajectories (see ISCWSA 2010, for a list of the pre-2011 models).
Wolff and de Wardt (1981) provided a mathematical basis for determining the subsurface position of directionally drilled wellbores and the uncertainties associated with such calculations. Although the treatment of errors has since been refined (Williamson 2000) and is now more typically based on a probabilistic approach establishing position covariances between normal distributions of position errors (Gjerde 2008;Gjerde et al. 2011), the position analysis concepts of Wolff and de Wardt (1981) remain relevant and widely applied. That methodology involves the determination of the separation factor (SF) between a reference well and offset wells, which is now recognized as a key part of common and standard practice in collision avoidance models (Poedjono et al. 2009;ICSWSA 2013ICSWSA , 2014. In this study, we further develop an existing wellbore trajectory-optimization model employing a multi-objective genetic algorithm (Mansouri et al. 2015) to consider an anti-collision objective. We include a wellbore anti-collision constraint to the optimizer taking into account close approach information with offset wells by calculating the SF at closely spaced points along a reference well and its relevant offset wells. The main objective function of this study is the maximization of the minimum wellbore separation factor, while recent wellbore optimization studies have focused on the optimization of wellbore length, torque and drag, etc. (Atashnezhad et al. 2014;Mansouri et al. 2015;Wood 2016a;Khosravanian et al. 2018). To demonstrate and validate the effectiveness of this novel and easy-to-apply approach, we apply the model to an example well cluster from an offshore platform in the Persian Gulf. Here, the anti-collision constraint is applied as the primary objective function. In practice, that constraint would be one of multiple objectives that would be used to determine the optimum trajectory of a planned well.

Objective of anti-collision wellbore trajectory model
The model developed here is designed to plan the trajectory of a directional wellbore maximizing the separation factor along the well path in relation to all other adjacent wellbores. The wellbore example used to describe the model involves data from a horizontal well drilled into the Reshadat oil field located in the southern Persian Gulf offshore Iran. The initial simplistic trajectory design is shown schematically in Fig. 1. This well is one of 30 wells drilled from the surface site (platform) making the wells in the near surface section quite closely spaced and with a high risk of collision for new well from that surface location.

Avoiding collision between wellbores
Avoiding collisions between wells has become a more significant problem in recent years, because most wells are drilled directionally and in unconventional reservoirs the number of total wells drilled and their spacing has increased. Collisions between wells can lead to significant downtime, repair costs and significant potential safety and environmental impacts with consequential liabilities. Consequently, it is paramount to avoid collisions between new infill wells and existing wellbores. In mature oil field, involving a dense collection of existing wells with complex well paths when considered in three dimensions, this can be a challenging task.
Determining with accuracy the likelihood of collisions for a new well with existing wellbores in a field (i.e., from each Fig. 1 The vertical plane of a horizontal wellbore trajectory used as the case study for the anti-well collision model developed. This is a trajectory for a well actually drilled with a measured depth of 4200 m (true vertical depth of 2160 m). (A 0 , I 0 , A 1 , I 1 are initial and final azimuth and inclinations, respectively) surface site or platform and nearby well sites or platforms) is essential to manage and mitigate well-collision risks. Based on experience with real well planning and execution, we have developed an efficient and easy-to-apply, anti-collision model that is consistent with prevailing industry standards (ISCWSA 2013(ISCWSA , 2014. When planning a new wellbore from any surface drilling location or platform, it is essential to carefully consider the trajectories and subsurface locations of all historical wells drilled in the vicinity. This can be straightforward for locations where very few wells have yet been drilled. However, as fields and well sites mature this process becomes progressively more involved and complex. Indeed, for some aging oil fields hundreds of wells may have been drilled (Poedjono et al. 2007(Poedjono et al. , 2009) over a time span exceeding 30 years. Moreover, the subsurface survey information for some of the oldest wells drilled may not be reliable, thereby adding to the overall collision risk.

Anti-well-collision calculations
The analysis of the distances between two wellbores (1) and (2), where wellbore (1) is the subject or reference well already in situ, being planned, and wellbore (2) is the object well or offset well, is referred to as proximity analysis (Fig. 2). Such analysis is traditionally performed using three distinct methods (Poedjono et al. 2007): • Normal plane • Horizontal plane • 3-D least distance The outputs from proximity analysis involve four key measurements: • Center-to-center (CC) distance • Ellipse of uncertainty (EOU) distance • Separation factor (SF) • Alert radii (AR)

Center-to-center distance (CC)
CC is the actual distance between the offset well and the reference well subsurface borehole positions (Fig. 3). The CC points on each wellbore are assumed to be the center of ellipses referred to as ellipses (or ellipsoids) of uncertainty (EOU) as distinguished in Fig. 3 (Poedjono et al. 2007).

Ellipse of uncertainty (EOU) distance
Due to uncertainty in subsurface borehole survey measurements, each survey point along a wellbore is associated with an uncertainty surrounding that point. Geomagnetic referencing has made it possible in recent years to obtain accurate real-time directional survey data (Buchanan et al. 2013). This improved well-survey accuracy has reduced subsurface position uncertainty for more recently drilled wells compared with those drilled historically with gyrotype survey tools (Jamieson 2005). However, survey data tend to involve more errors in the horizontal dimensions than vertical dimension and the accumulated position errors of about 1% of the total measured depth are not unusual. For long wellbores, this error or envelope of uncertainty can be Center-to-center (CC) distance and ellipse of uncertainty (EOU) distance distinguished diagrammatically significant, i.e., in the order 30 m. This uncertainty is typically expressed as an ellipse or ellipsoid centered around the survey point, i.e., the ellipse of uncertainty (Muhammadali 2017). The EOU is calculated by survey-positioning uncertainty models (Wolff and de Wardt 1981;ISCWSA 2013ISCWSA , 2014. The EOU distance between two wells excludes the radii of the EOU associated with each wellbore (Fig. 3). The EOU is calculated as the CC distance minus the sum of the EOU semi-major axes of the offset and reference wellbores (Poedjono et al. 2007).

Separation factor (SF)
SF is a decision metric that involves both of the separation measures defined between two wellbores at specific points on each wellbore, i.e., CC and EOU. The separation factor is calculated using Eq. 1 (Schlumberger 2002).
The SF value readily distinguishes the relative proximity of the EOU on the reference and offset wells, thereby highlighting the collision risks: • SF > 1 => two ellipses do not overlap • SF = 1 => two ellipses just touch • SF < 1 => two ellipses overlap The anti-collision, well-design optimization model proposed uses a limiting SF value of 1.5, i.e., well designs with SF values of < 1.5 should be rejected because their collision risks are too high. To calculate a meaningful suite of SF values, it is necessary to determine multiple EOU values along the wellbore trajectories of both reference and offset wells.

Alert radii (AR)
The alert radii are used in real time while drilling to warn of nearby wells that are potential collision hazards as the separation distances to nearby wells fall within a specified area around the well being drilled. The specified areal distance that establishes the collision-hazard region is defined in terms of an initial alert radius at the surface. That collisionhazard region progressively increases with depth according to a growth-rate relationship linked to true vertical depth (TVD) as the well drills deeper, thereby defining a growth cone (Fig. 4). The growth cone's areal dimensions are typically defined in a well's drilling plan according to the operator's anti-collision policies or rules (Schlumberger 2002;Poedjono et al. 2007) and are influenced by the magnitude of uncertainty (increasing with depth) associated with the subsurface location-survey data.

Wellbore position uncertainty
The issue that increases the need of careful anti-collision monitoring of a reference wellbore over its entire trajectory is the uncertainty about the wellbore positions of the reference well and all relevant offset wells. This uncertainty can be caused by several factors, such as a compass error in the azimuth measurement, misalignment and inclination errors, and depth measurement errors. In the proposed model we apply the Wolff and de Wardt (1981) model for uncertainty determination, which is described mathematically by Eqs. 2-17.
For wellbore position (E, N, V) the Cartesian coordinates and a vector named ⃗ a need to be calculated in each survey point from the point number 1 down to the point number k (Wolff and de Wardt 1981) using Eqs. 2-8.
(2) At each depth for which an EOU is required, the matrix H by Eqs. 9-14 also needs to be calculated (Wolff and de Wardt 1981). Matrix H (with elements h 11 , h 21 , etc.) represents the uncertainty ellipse in each survey point. ( h 31 = h 13 = ΔC 2 10 a 11 a 13 + ΔC 2 20 a 21 a 23 + ΔC 2 30 a 31 a 33 + ΔI 2 to a 41 a 43 + 2 − ΔI 2 m N.V The constant values typically used in Eqs. 9-14 are listed in Table 1 (Wolff and de Wardt 1981). In these equations E, N and V are the Cartesian coordinates of the wellbore, A and I are the azimuth and inclination and D AH is the measured depth at each survey point.
The ellipse in the horizontal plane is characterized by the attitude angle φ defined clockwise from north, which is defined by equation: The half-axes of the ellipsoid (i.e., that is the half-major and half-minor axes) in each survey point are then defined by Eqs. 16 and 17.
Theoretically the uncertainty around the wellbore increases from its uppermost section beginning at the surface to its lowermost section (i.e., at total depth-TD). This means we have a more uncertain position for the last survey than the first one. This is illustrated schematically in Fig. 4. (After Schlumberger 2002;Poedjono et al. 2007).

Well trajectory calculation
The anti-collision model developed here involves a welltrajectory design algorithm that maintains the reference wellbore at an acceptable distance (i.e., a specified separation factor-SF ≥ 1.5) from all nearby offset wells. The wellbore trajectory calculations are performed for simplicity using the average angle method (Adams and Charrier 1985). Several other methods could be used for determining curved 3D wellbore trajectories (Wilson 1968;Craig and Randall 1976;Adams and Charrier 1985;Bourgoyne et al. 1991;(13) Guo et al. 1992;Liu and Shi 1997). The calculations for the average angle method are described by Eqs. 18-20.

Anti-collision algorithm
The algorithm developed establishes the "closest approach", or least distance in three dimensions, between the reference well and the relevant offset wells to calculate the separation factor (SF) between the wells. Each EOU is calculated by applying the Wolff and de Wardt (1981) model (Eqs. 9-14). It then establishes the maximum of the halfaxes (Eqs. 15-17) to define the radius of uncertainty (Fig. 4). It then uses the defined radii of uncertainty to calculate SF with Eq. 1. A genetic algorithm (GA) (Haupt and Haupt 2004;Gen et al. 2008) is applied as the customized (Mansouri et al. 2015) optimization search engine to find the optimum trajectory for the reference well. The GA initializes a predetermined number of solutions (N) as its first population of solutions to explore the feasible space. For each of the 1 to N initial solutions for the reference well in that population, the separation factor is calculated between the reference well and all relevant offset wells. The minimum separation factor constraint (i.e., SF = 1.5 in the case considered) is applied along the entire length of the reference well. With that constraint imposed, the GA objective function is set to locate the solution with the maximize SF within the feasible solution space. Essentially, the GA is configured to seek a solution (or solutions) that maximize the minimum separation factor.
Initialization of the GA population is conducted to produce N random solutions for the reference well. All of the solutions generated are constrained between predetermined boundaries defined by the initial kick of point (KOP), dogleg severities (DLS) inclinations, azimuths, etc., specified in the well plan. For each reference-well solution, SF is then calculated along the wellbore trajectory at 30-m intervals (i.e., evaluating Eq. 1, with input calculations from Eqs. 2-17). A K by L matrix of SF calculations is created for each (1 to N) solution in the population, where K is the number of points along the trajectory (18) ΔTVD = ΔMD × cos I 1 + I 2 2 of the reference well for which SF is calculated, and L is the number of relevant offset wells. Considering N initial solutions, N matrices with K by L dimensions are established. Within each of those matrices there is a point with a minimum SF value for that specific trajectory solution. For the population of N solutions that means there is a 1 by N matrix of minimum SF values. It is that 1 by N minimum SF matrix that is set as the objective function for the GA to maximize. Once the solutions for the initial population are compiled, the GA sorts those solutions based on their objective functions and select some of the most favorable ones (i.e., high minimum SF) as parents from which to produce the next generation of solutions. The parents are recombined and processed using metaheuristic routines including cross-over, mutation and some random combination to produce new individual solutions to evaluate as the next generation. These newly created solutions replaced with the worst performing solutions in the previous generation to compile a new generation of N solutions for evaluation and ranking. This procedure then continues for a specified number of iterations (M) completed or a pre-determined computational time has elapsed.
A pseudo-code for the anti-collision GA model is as follows:  Figure 5 provides a flow diagram that illustrates the sequence of steps involved in the anti-collision well planning optimization model.

Model implementation and results
The Reshadat oil field, located in the Persian Gulf about 100 km off southwest of Lavan Island, includes 30 production and injection wells drilled from two offshore platforms. Here, one of those wells that identified as unsafe in term of its separation factor is used as a case study to demonstrate how the proposed trajectory-optimization model can be effectively applied. The trajectory of the case study well is revised using the proposed model to define a maximum (safe) separation factor to adjacent wells.
A first step in applying the model requires the initial parameters defining the trajectories of the reference well and offset wells to be specified. Table 2 shows the original planned trajectory for the reference well. More than 20 existing offset wells have been drilled historically from the same platform. Some of the offset wells have lateral sections drilled subsequently from the initial borehole (Fig. 6).
The SF calculations made by the model for the reference well demonstrate that it is unsafely positioned relative to one the surrounding wells. Consequently, the trajectory of that unsafe well is re-planned with the aid of the anti-collision GA model. Figures 7 and 8 show the SF versus measured depth relationship for the original planned trajectory for the reference well. Figure 9 displays an alternative planned trajectory for the reference well. In this revised trajectory some deviation from the original directional path has been allowed, but the azimuth of the final reservoir section (Table 2) is maintained fixed at 125 o as a constraint. This trajectory deviation results in a minimum separation factor along the entire wellbore length to be maintained at 1.5 or greater. The revised trajectory results in a 300-m increase in measured depth from 4200 (Table 2) to 4500 m (Table 3) for the reference well. Table 3 shows the defining metrics for the revised trajectory for the reference well.
In different execution runs the anti-collision algorithm's convergence to the optimal solution is very fast, irrespective of its initial randomly generated solution for a specific well trajectory that provides an independent starting point for the algorithm's iterations.  This well trajectory calculates a minimum separation factor of < 1.5, so it is deemed to be at high risk of a collision with the offset well (i.e., the blue trajectory in Fig. 7 Figure 10 shows the SF versus measured depth for the optimized trajectory of the reference well with a minimum SF maintained at acceptable values of > 1.5 considered to significantly reduce the risk of well collisions. As the minimum separation factor is located at a point along the desired horizontal section within the reservoir of the revised trajectory for the reference wellbore, the only alternative trajectories that could achieve higher minimum separation factors for this reference well involve deviating the well to the right or left of the desired azimuth for that specific reservoir location. Figure 11 and Table 4 show the details of an alternative (sub-optimal from the collision-risk perspective) solution for the revised trajectory for the reference well. This solution achieves a min SF of ~ 1.25, making it "riskier" than the optimum solution, but substantially safer than the originally planned trajectory for the reference well with respect to potential well collisions.
A brief comparison analysis is shown in Table 5 that compares the total measured depth and algorithm run time for the different scenarios including: (1) no limitation on SF (original plan) Fig. 6 Reference well (shown in red) from a platform in the example field with offset wells (shown in purple; one highlighted in blue). The reference well is identified as unsafe in relation to the blue offset well based on the minimum separation factor calculated Fig. 7 Calculated separation factor versus measured depth (md) for the original trajectory planned for the reference well. It shows that SF is close to 1 at 3000 m md with one of offset wells (diagram from the original well plan for the reference well, after Halliburton). This diagram is taken from Landmark Software, and the levels 1-3 are the user-defined separation factors that indicate the risk of the wells approach. In this case, level 1 is specified as the separation factor of 1.5 that is not considered to be a high risk. Level 2 is the separation factor of 1.25 that means that care should be taken. Level 3 is a separation factor of 1.0 that is considered to represent a high risk of collision. Plots by Anti-Collision toolbox of LANDMARK software (2) Min SF > 1.25 (3) Min SF > 1.5 The following table (Table 5) shows the results:

Discussion
In the case study described for the reference well in the Reshadat field, the anti-collision wellbore optimization model applies a simple "build and hold" strategy for the well trajectory. This limitation reduces the number of feasible "safe" trajectory solutions to choose from to achieve the desired target in the reservoir. The model has the capability of utilizing other more complex drilling profiles, such as a double-build profiles (Fig. 12).
The more complex the build profiles allowed, the more feasible trajectory solutions that exist. However, these more complex trajectories are likely to involve more directional drilling costs (Joshi 2003) to actually execute. Moreover, they would likely be associated with higher surface torque therefore running greater risks of other drilling problems occurring.
The anti-collision optimization model can choose among several wellbore-trajectory-defining parameters when establishing feasible trajectory solutions. For example, in the case of a simple build and hold profile constraint, the trajectory parameters that can be adjusted are: kick-off point (KOP), end of curvature (EOC, sometimes referred to as end of build or EOB), and azimuth. Figure 13 illustrates two scenarios applied to the reference well in the Reshadat oil field: (1) applies a fixed EOC, specifying the exact TVD (as a constraint) from which the well trajectory will remain fixed for the final section to be drilled; and (2) applying a variable EOC; letting the TVD point vary in determining the point from which the final non-curved section is drilled. A variable EOC provides more feasible solutions to evaluate. However, for many reservoirs, such as those where the pay zone is thin, or the best reservoir conditions are within tightly constrained vertical limits, a fixed EOC may be more appropriate. Thick, homogeneous pay-zones allow more flexibility in terms of TVD for the EOC position. Alternative plan for the trajectory of the reference well enforcing a minimum SF of > 1.5 along the entire wellbore. See Table 3 for the defining metrics of this optimum trajectory solution 1 3 There is potential to further improve the flexibility and capabilities of the proposed anti-collision optimization model. For example, more options can be included to allow the user to define a wider range of allowable wellbore trajectories by increasing the number of trajectory definition input variables. On the other hand, the more constraints that are imposed (e.g., restricting the acceptable well trajectories to higher SF restriction), the greater the computation time involved for the model, because there are less feasible solutions that exist. Figure 14 illustrates the effect of imposing different allowable separation factors on the computational run time of the anti-collision optimization model.
The Wolff and de Wardt (1981) model for determining the ellipse of uncertainty and the separation factor for anticollision purposes imposes some limitations on the model. The model is more functional and provides more practically relevant optimal solutions if it is initialized with specific operational limitations to impose as constraints. For example, specifying a reservoir section target range of TVD at the objective subsurface location, geo-mechanical restrictions, motor and bottom-hole assembly (BHA) limitations as constraints limits the number of feasible solutions. In some cases, it is necessary to assess whether it is worth taking greater well-collision risks (i.e., lowering the minimum SF that is accepted by the model) in order to achieve a more acceptable trajectory in the desired reservoir section. In such cases, wellbore anti-collision may not be the top priority of the drilling team, but the anti-collision optimization model can still provide valuable information with which to quantify the well-collision risks being taken by specific well trajectories being considered.

Conclusions
The anti-collision optimization model developed applies a simple genetic optimization algorithm to adjust the wellbore trajectory so that an optimum trajectory is found that delivers the desired reservoir location with a wellbore that  Table 3 for the defining metrics of this optimum trajectory solution

Fig. 11
An alternative wellbore trajectory for the reference well to the optimum solution (i.e., Figs. 9 and 10, Table 3) is shown here. It involves a deeper kick-off point (KOP) and higher dog-leg section (DLS) to reach the desired target. It also involves a higher risk of collision than the optimum solution (min SF ~ 1.25), but lower risk of collision than the original planned trajectory. See Table 4 for the defining metrics of this alternative, more-risky-but-safe trajectory solution  Double build (build-turn-hold)

Fig. 12
Double-build profiles versus build and hold wellbore trajectory profile demonstrate that by involving more complex wellbore profiles (e.g., with double-build profiles involving two build sections in the profile) the anti-collision optimization model has a greater number of feasible solutions to select from 1 3 is safely positioned with respect to offset wells. It successfully determines an acceptable minimum separation factor for an optimum wellbore trajectory based on ellipse of uncertainty calculations at multiple points along a reference well relative to relevant offset wells to this. The application of the model to optimize the case study well (Reshadat field, offshore Iran) demonstrates that this relatively simple optimization algorithm can deliver reliable results based upon the input information provided for the reference and offset wells involved. This anti-collision optimizer is functional (effective and rapid to execute) for use as a primary tool to identify whether a planned wellbore trajectory is safely positioned, or not, with respect to existing offset wells. It is also able to adjust the wellbore trajectory metrics to safer positions, reducing the risk of well collisions, relative to a number of specified constraints that maintain other objectives (e.g., minimum measured depth, dogleg severity, etc.,).
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source,

Fig. 13
Two scenarios compared for the reference well from the example field: Fixed TVD for the end of curvature (EOC) section; and, variable TVD allowed for the EOC Fig. 14 Various separation-factor constraints versus computation time for the anti-collision optimization model applied to the reference well example. Higher values for the SF-constraint restriction limits the number of acceptable solutions and typically requires more deviation and greater measured depth and/or dog-leg severity in the optimum solutions found. Finding these more constrained solutions takes more computational time provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.