Numerical Methods for Optimization of the Horizontal Directional Drilling (HDD) Well Path Trajectory

: Advances in the ﬁeld of material engineering, computerization, automation, and equipment miniaturization enable modernization of the existing technologies and development of new solutions for construction, inspection, and renovation of underground pipelines. Underground pipe installations are used in the energy sector, gas industry, telecommunications, water and sewage transport, heating, chemical industry, and environmental engineering. In order to build new pipeline networks, dig and no-dig techniques are used. Horizontal Directional Drilling (HDD) is one of the most popular trenchless technologies. The e ﬀ ectiveness of HDD technology application is mostly determined by its properly designed trajectory. Drilling failures and complications, which often accompany the application of the HDD technology, result from poor design of the well path in relation to the existing geological and drilling conditions. The article presented two concepts of Horizontal Directional Drilling well path trajectory design: Classic sectional, which is a combination of straight and curvilinear sections, and a single-section chain curve trajectory (catenary). Taking into account the advantages and disadvantages of the catenary trajectory relative to the sectional trajectory, the author’s solution was presented, which was the implementation of the sectional trajectory with a maximum shape similarity to the catenary trajectory. The new approach allowed us to take advantage of a chain curve trajectory and was easier to implement using the available technology. The least squares method, based on deviations from a catenary trajectory, was set as the matching criterion. The process of searching for a trajectory, being a combination of straight and curvilinear sections as similar as possible to a catenary-type trajectory, was carried out using two methodologies: State space search and a genetic algorithm. The article shows the pros and cons of both optimization methodologies. Taking into account the technical and technological limitations of HDD drilling devices, a new approach was proposed, combining the methodology of state space search with the genetic algorithm. A calculation example showed the application of the proposed methodology in an engineering design process. trajectory and the five-section trajectory determined by means of the presented methodology. Data Curation, R.W., P.Ł., and G.O.; Writing–Original Draft Preparation, R.W., P.Ł., and G.O.; Writing–Review & R.W., P.Ł., and G.O.; Visualization, R.W., P.Ł., and G.O.; Supervision, R.W.; Project Administration, R.W. All authors have read and agreed to the published version of the manuscript.


Introduction
Every year, many kilometers of underground cables and wires are installed around the world. In the last century, water, gas, electricity, sewerage, telephone, and internet wires have become widely available goods not only to residents of large urban agglomerations, but also to residents of small towns and villages. The development of material engineering, computerization, automation, and possibilities of equipment miniaturization enables the modernization old and development The use of trenchless technologies makes it possible to accelerate investment execution compared to traditional excavation methods. The increased durability of underground pipelines (less sensitivity to changes in atmospheric conditions than in case of surface pipelines) also supports the advisability of using drilling techniques in the construction of underground piping.
Some trenchless technologies, such as horizontal jacking, microtunneling, and Horizontal Directional Drilling (HDD), have been used in industrial practice for over 50 years. New technological solutions have also appeared on the market (direct pipe, reverse circulation, push hole-opening) and the existing ones have been modernized (HDD-intersect drilling) [2][3][4].
One of the most commonly used technologies for constructing underground pipelines is HDD (in classic version or as intersect drilling) [4]. Figure 1 presents the percentage comparison of primary Horizontal Directional Drilling markets.  [5]).
The article focuses on two concepts of HDD trajectory design: The classic one, which is a combination of straight and curvilinear sections, and a chain curve trajectory-catenary. An attempt was made to create a methodology of calculations using optimization methods, taking into account theoretical issues and engineering design practice. The article develops the subject of HDD trajectory design presented in detail by the authors in their previous article [6].

Concepts of Horizontal Directional Drilling Trajectory Design
The combination of straight and curvilinear sections [6,7] is one of the most commonly used concepts for designing HDD trajectories. The simplest variant of this method is to create a trajectory with one curvilinear section and a constant radius. Other variants are a combination of different numbers of straight and curvilinear sections. The practical experience shows that the optimum solution (from the technical, technological, organizational, and economic point of view) is a trajectory consisting of alternating straight and curvilinear sections (see Figure 2a). The article focuses on two concepts of HDD trajectory design: The classic one, which is a combination of straight and curvilinear sections, and a chain curve trajectory-catenary. An attempt was made to create a methodology of calculations using optimization methods, taking into account theoretical issues and engineering design practice. The article develops the subject of HDD trajectory design presented in detail by the authors in their previous article [6].

Concepts of Horizontal Directional Drilling Trajectory Design
The combination of straight and curvilinear sections [6,7] is one of the most commonly used concepts for designing HDD trajectories. The simplest variant of this method is to create a trajectory with one curvilinear section and a constant radius. Other variants are a combination of different numbers of straight and curvilinear sections. The practical experience shows that the optimum solution (from the technical, technological, organizational, and economic point of view) is a trajectory consisting of alternating straight and curvilinear sections (see Figure 2a).
The second concept for designing HDD trajectories is associated with the natural deflection of the casing described by a chain curve (see Figure 2b). The chain curve trajectory (catenary) has many advantages, such as easier insertion of a pipeline into a wellbore and longer pipeline life cycle due to natural stress distribution along the length. Unfortunately, this type of well path trajectory is difficult to perform in real conditions because the angle of deviation from the horizontal plane is variable. Standard deflecting drilling tools do not allow continuous change of the deviation angle [6].
At the AGH University of Science and Technology in Krakow at the Drilling and Geoengineering Department, Faculty Drilling Oil and Gas, algorithms enabling to design both types of the abovementioned Horizontal Directional Drilling trajectories have been created. They were described in detail in the monograph [8] and in the articles [6,9].

Methodology for Determining Fit of the Trajectory Being a Combination of Straight and Curvilinear Sections to a Catenary Trajectory
In the proposed methodology, a trajectory was designed as a chain curve, and then a sectional trajectory consisting of five sections was adapted to its shape. In order to find a sectional trajectory with the most similar shape to the catenary trajectory, it was necessary to define a function determining a similarity measure. In the article, the method of least squares known from statistical analysis was used [10].
Optimization criterion: The best fit in the least-squares sense minimizes the sum of squares (the difference between sectional trajectory yi values, and the catenary trajectory y value). A simplified concept is presented in Figure 3. The chain curve trajectory (catenary) has many advantages, such as easier insertion of a pipeline into a wellbore and longer pipeline life cycle due to natural stress distribution along the length. Unfortunately, this type of well path trajectory is difficult to perform in real conditions because the angle of deviation from the horizontal plane is variable. Standard deflecting drilling tools do not allow continuous change of the deviation angle [6].
At the AGH University of Science and Technology in Krakow at the Drilling and Geoengineering Department, Faculty Drilling Oil and Gas, algorithms enabling to design both types of the above-mentioned Horizontal Directional Drilling trajectories have been created. They were described in detail in the monograph [8] and in the articles [6,9].

Methodology for Determining Fit of the Trajectory Being a Combination of Straight and Curvilinear Sections to a Catenary Trajectory
In the proposed methodology, a trajectory was designed as a chain curve, and then a sectional trajectory consisting of five sections was adapted to its shape. In order to find a sectional trajectory with the most similar shape to the catenary trajectory, it was necessary to define a function determining a similarity measure. In the article, the method of least squares known from statistical analysis was used [10].
Optimization criterion: The best fit in the least-squares sense minimizes the sum of squares (the difference between sectional trajectory y i values, and the catenary trajectoryŷ i value). A simplified concept is presented in Figure 3. Figure 4 shows the reference catenary trajectory and five classic five-section trajectories designed to visualize the problem (geometrical parameters of the five-section trajectory are presented later in the article). For the presented trajectories, the sum of squares (SOS) between the catenary trajectory and the five-section trajectory was calculated with a step of 1m. The results are presented in Table 1.    The trajectories projection chart and calculated sums of squares (SOS) were presented above to show that a manual attempt to fit the trajectory is not a simple task. Based on Figure 4 and the results in Table 1, it can be seen that the proposed five-section trajectories differ significantly from the catenary trajectory. In this case, mathematical optimization needs to be done to calculate and search for sums of squares indicating the best fit (least squares).    Figure 4 shows the reference catenary trajectory and five classic five-section trajectories designed to visualize the problem (geometrical parameters of the five-section trajectory are presented later in the article). For the presented trajectories, the sum of squares (SOS) between the catenary trajectory and the five-section trajectory was calculated with a step of 1m. The results are presented in Table 1.  The trajectories projection chart and calculated sums of squares (SOS) were presented above to show that a manual attempt to fit the trajectory is not a simple task. Based on Figure 4 and the results in Table 1, it can be seen that the proposed five-section trajectories differ significantly from the catenary trajectory. In this case, mathematical optimization needs to be done to calculate and search for sums of squares indicating the best fit (least squares).  The trajectories projection chart and calculated sums of squares (SOS) were presented above to show that a manual attempt to fit the trajectory is not a simple task. Based on Figure 4 and the results in Table 1, it can be seen that the proposed five-section trajectories differ significantly from the catenary trajectory. In this case, mathematical optimization needs to be done to calculate and search for sums of squares indicating the best fit (least squares).

Trajectory Parameters and Their Value Ranges Resulting from Technological Limitations and Assumed Goals
In order to obtain a five-section trajectory with a shape similar to the catenary trajectory, the sum of squares of trajectories should be minimized. To achieve that, it is necessary to find appropriate values of the equation parameters-optimize the five-section trajectory relative to the catenary trajectory.
During the optimization process, at the beginning, it is necessary to define ranges for the values of the trajectory equation parameters. The permissible values may result from technological limitations such an entry and exit angle (determined by the capabilities of a drilling device and a casing technology), Energies 2020, 13, 3806 5 of 15 bending radii (limited by strength of casing or drilled rock layers), and so on. One of the restrictions may be a distance between the entry and exit points.
Parameters that can be used to calculate five-section trajectories: A-Horizontal displacement of the end point relative to the start point; H-Vertical displacement of the end point relative to the start point; L 1 -Length of the first section; L 3 -Length of the third section; ε 1 -Angle of deviation from the horizontal plane of the first section; ε 3 -Angle of deviation from the horizontal plane of the third section; ε 5 -Angle of deviation from the horizontal plane of the fifth section; R 2 -Radius of curvature of the second section; R 4 -Radius of curvature of the fourth section.
The geometrical dependencies for the five-section trajectory are presented in Figure 5.

Trajectory Parameters and Their Value Ranges Resulting from Technological Limitations and Assumed Goals
In order to obtain a five-section trajectory with a shape similar to the catenary trajectory, the sum of squares of trajectories should be minimized. To achieve that, it is necessary to find appropriate values of the equation parameters-optimize the five-section trajectory relative to the catenary trajectory.
During the optimization process, at the beginning, it is necessary to define ranges for the values of the trajectory equation parameters. The permissible values may result from technological limitations such an entry and exit angle (determined by the capabilities of a drilling device and a casing technology), bending radii (limited by strength of casing or drilled rock layers), and so on. One of the restrictions may be a distance between the entry and exit points.
Parameters that can be used to calculate five-section trajectories: A-Horizontal displacement of the end point relative to the start point; H-Vertical displacement of the end point relative to the start point; L1-Length of the first section; L3-Length of the third section; ε1-Angle of deviation from the horizontal plane of the first section; ε3-Angle of deviation from the horizontal plane of the third section; ε5-Angle of deviation from the horizontal plane of the fifth section; R2-Radius of curvature of the second section; R4-Radius of curvature of the fourth section.
The geometrical dependencies for the five-section trajectory are presented in Figure 5. The end point displacements relative to the start point are constant horizontally (A) and vertically (H). This is due to the selected entry and exit points and their location, which must be the same for both trajectories.
An additional design constraint may be determinant of the first straight L1 section length in such a way as to enable the drilling tool to reach stable soils in which the angle of deviation can be changed. In another variant, the length of the third rectilinear section L3 can be a constraint, where it is necessary to allow drilling under a terrain obstacle (river, mountain, highway), under which accurate measurements of the position of a drilling tool are difficult or impossible to perform.
Another constant parameter is the angle of deviation of the third section of the trajectory from the horizontal plane (ε3). The value of this parameter is 0°. The third section is most often horizontal, which enables easier passage under an obstacle.
Entry (ε1) and exit (ε5) angles range between 6° and 15°. This limitation is related to the capabilities of drilling equipment and the casing pullback process. For strength reasons, it is assumed that their values should decrease as the casing diameter increases. For the same reasons, it is also recommended that the entry angle have a higher value than the exit angle [11]. The latest The end point displacements relative to the start point are constant horizontally (A) and vertically (H). This is due to the selected entry and exit points and their location, which must be the same for both trajectories.
An additional design constraint may be determinant of the first straight L 1 section length in such a way as to enable the drilling tool to reach stable soils in which the angle of deviation can be changed. In another variant, the length of the third rectilinear section L 3 can be a constraint, where it is necessary to allow drilling under a terrain obstacle (river, mountain, highway), under which accurate measurements of the position of a drilling tool are difficult or impossible to perform.
Another constant parameter is the angle of deviation of the third section of the trajectory from the horizontal plane (ε 3 ). The value of this parameter is 0 • . The third section is most often horizontal, which enables easier passage under an obstacle.
Entry (ε 1 ) and exit (ε 5 ) angles range between 6 • and 15 • . This limitation is related to the capabilities of drilling equipment and the casing pullback process. For strength reasons, it is assumed that their values should decrease as the casing diameter increases. For the same reasons, it is also recommended that the entry angle have a higher value than the exit angle [11]. The latest bibliography gave even higher acceptable values of deviation angles: 8 • -30 • [12]. The authors of [13] stated that from the point of view of pipeline installation the ideal entry angle is 12 • and the exit angle is 10 • . In the article, values between 6 • -16 • were used for calculations.
The value of radii of curvature R 2 and R 4 depend on the diameter and type of casing. The larger the diameter, the larger the minimum radius. According to DCA [10], the radius of curvature was determined from the formula: Energies 2020, 13, 3806 6 of 15 400 mm < D < 700 mm → R = 1400 D 3 (3) D > 700 mm → R = 1250 D 3 (4) Table 2 shows sample calculations of minimum bending radius using Equation (4). Equations (2)-(4) are empirical, and the influence of the wall thickness on the bending stiffness of the pipe is neglected. Pipe stiffness increases along with the wall thickness, which makes bending more difficult. This tendency may result in higher soil reaction pressure exceeding, which may lead to breakdowns and drilling problems such as stuck pipe. These aspects were included in the below equation for the minimum bending radius [14], adding the variables C (variable dependent on the type of soil) and t (wall thickness). Table 3 shows sample calculations of minimum bending radius using Equation (5). In the optimization calculations (presented later in the article), a radius range of 1500-3000 m was adopted for the casing with a diameter of 1 m.

Five-Section Trajectory Optimization
The process of searching for a five-section trajectory, the most similar to a catenary trajectory, was carried out using two methodologies: Searching the entire solution space and using the genetic algorithm.

Trajectory Optimization by Searching the Entire Solution Space
The simplest method for determining a five-section trajectory similar to the catenary trajectory is to calculate the parameters of a sectional trajectory and the sum of squares for all possible variants. Then, it is necessary to find input parameters for which the sum of squares is the smallest. Figure 6 presents the simplified algorithm of the proposed methodology.
Determining the input data: Constants (A, H, N poz ), ranges of variables for which the optimization will be performed (L 1min , L 1max , R min , R max , ε min , ε max ), and calculation steps for the optimized parameters (L 1step , R step , ε step ).

2.
Calculation of spatial coordinates X, Y, and the alpha angle of the catenary trajectory.

3.
Calculation of spatial coordinates X, Y, and the alpha angle of the five-section trajectory for each possible variant of L 1 , R 2 , R 4 , ε 1 , ε 5 in nested iterations. At each calculation step, a sum of squares should be calculated for the corresponding points of the five-section and the catenary trajectory.

4.
Finding the minimum value from the calculated sums of squares and the corresponding values: L 1 , R 2 , R 4 , ε 1 , and ε 5 .

5.
Determining characteristic points of the trajectory being a combination of straight and curvilinear sections for the values determined in Item 4.
Advantages and disadvantages of the above methodology: Cons: • A high number of combinations to be calculated; • Time consuming. Pros: • Possibility to find the best solution (for a given calculation step).
Energies 2020, 13, x FOR PEER REVIEW 7 of 16 1. Determining the input data: Constants (A, H, Npoz), ranges of variables for which the optimization will be performed (L1min, L1max, Rmin, Rmax, εmin, εmax), and calculation steps for the optimized parameters (L1step, Rstep, εstep). 2. Calculation of spatial coordinates X, Y, and the alpha angle of the catenary trajectory. 3. Calculation of spatial coordinates X, Y, and the alpha angle of the five-section trajectory for each possible variant of L1, R2, R4, ε1, ε5 in nested iterations. At each calculation step, a sum of squares should be calculated for the corresponding points of the five-section and the catenary trajectory. 4. Finding the minimum value from the calculated sums of squares and the corresponding values: L1, R2, R4, ε1, and ε5. 5. Determining characteristic points of the trajectory being a combination of straight and curvilinear sections for the values determined in Item 4.
Advantages and disadvantages of the above methodology: Cons:  A high number of combinations to be calculated;  Time consuming. Pros:  Possibility to find the best solution (for a given calculation step).  The optimization algorithm for the variant with parameters (L 3 , R 2 , R 4 , ε 1 , ε 5 ) is analogous. (L 3 , L 3min , L 3max , L 3step ) should be used instead (L 1 , L 1min , L 1max , L 1step ).

Trajectory Optimization Using a Genetic Algorithm
The genetic algorithm is a method for solving optimization problems which belongs to evolutionary computation inspired by biology evolution. The idea of genetic algorithms is based on Darwin's theory of evolution. In most cases, Nature applies two fundamental principles. First, if genetic processing results in offspring with above-average parameters, it usually survives longer and has a better chance of creating children with better traits than the average individual. Second, offspring with parameters below average will usually not survive-they will be eliminated from the population. Genetic algorithms can be used in cases where standard optimization methods are not applicable, for example, a given function is discontinuous, stochastic, nondifferentiable, or nonlinear [15,16].
Genetic algorithms are associated with terms such as population, an individual, generation, mutation, crossover, and the fitness function. A solution space is searched not by one point, but evenly by many points (individuals). This means that we can treat each individual as a representative of a problem solution at a given moment. These elements of genetic algorithms have been described in the literature [15,17].
An important and unique element of each genetic algorithm is the fitness function. It enables us to assess a degree of adaptation of an individual in the population. A better fit is a higher score, or a better chance of survival. It is closely connected with the problem being solved. For the analyzed case related to trajectories, the fitness function can be defined as: where the Sum Of Squares( ) is determined from Equation (1). The value of the fitness function is within the range (0,1). The smaller the sum of squares, the greater the value of the fitness function. The genetic algorithm optimizes the parameters so that the value of the fitness function approaches 1. A general scheme of genetic algorithm is presented in Figure 7. The optimization algorithm for the variant with parameters (L3, R2, R4, ε1, ε5) is analogous. (L3, L3min, L3max, L3step) should be used instead (L1, L1min, L1max, L1step).

Trajectory Optimization Using a Genetic Algorithm
The genetic algorithm is a method for solving optimization problems which belongs to evolutionary computation inspired by biology evolution. The idea of genetic algorithms is based on Darwin's theory of evolution. In most cases, Nature applies two fundamental principles. First, if genetic processing results in offspring with above-average parameters, it usually survives longer and has a better chance of creating children with better traits than the average individual. Second, offspring with parameters below average will usually not survive-they will be eliminated from the population. Genetic algorithms can be used in cases where standard optimization methods are not applicable, for example, a given function is discontinuous, stochastic, nondifferentiable, or nonlinear [15,16].
Genetic algorithms are associated with terms such as population, an individual, generation, mutation, crossover, and the fitness function. A solution space is searched not by one point, but evenly by many points (individuals). This means that we can treat each individual as a representative of a problem solution at a given moment. These elements of genetic algorithms have been described in the literature [15,17].
An important and unique element of each genetic algorithm is the fitness function. It enables us to assess a degree of adaptation of an individual in the population. A better fit is a higher score, or a better chance of survival. It is closely connected with the problem being solved. For the analyzed case related to trajectories, the fitness function can be defined as: where the Sum Of Squares( ) is determined from Equation (1). The value of the fitness function is within the range (0,1). The smaller the sum of squares, the greater the value of the fitness function. The genetic algorithm optimizes the parameters so that the value of the fitness function approaches 1. A general scheme of genetic algorithm is presented in Figure 7.  [15,17]). Figure 7. A simplified flowchart of the genetic algorithm being used (own work based on [15,17]).

Comparative Analysis of Calculation Methods
In order to compare the presented methods, a number of numerical simulations was performed for the variant of optimized parameters: L 1 , R 2 , R 4 , ε 1 , ε 5 . Their value ranges are presented below.
The catenary reference trajectory:  Table 4 presents the results of numerical simulations of searching for a five-section trajectory similar to the catenary trajectory by means of searching the entire solution space. In subsequent series, the change of parameter values in iterations was smaller, thanks to which it was possible to find more suited trajectories (SOS decreases).  Table 5 and Figure 8 show the results of a simulation using a genetic algorithm with the fitness function from Equation (6). For this method, for simplifying data entry, no parameters calculation steps are required, and their value can be any rational number. The parameter that enables control of the accuracy of calculations is the maximum amount of generation or the minimum permissible value of the fitness function. SOS decreases as the fitness function increases.  The above tables (see Tables 4 and 5) present the results of calculation times and SOS values for two optimization methods. On their basis, both methods can be compared. Searching the entire solution space took 1066 ms to find a catenary-like trajectory with SOS = 845.62. For comparison, by means of the genetic algorithm, a similar trajectory was found in 112.4 ms, giving the value of SOS = 604.26. In subsequent series, the difference in computation time becomes apparent as can be seen in the comparison in Table 6. The above comparison is very general, but it simply shows a significant difference in computation times. The method using the genetic algorithm was much faster, and with an increase in the computation accuracy (reducing the SOS), the calculation time ratio increased in favor of the genetic algorithm.

An Example of the Application of the Presented Computation Methods in Engineering Design
Based on the analysis of computation times, it was demonstrated that the genetic algorithm method is much faster. The difference can be particularly observed when the expected accuracy of fitting increases. For the given parameters, while expecting to achieve high computational accuracy, performing search of the entire solution space is too time consuming. The speed of calculation using the genetic algorithm is very high. It should be noted here that the results obtained using the genetic algorithm are rational numbers. In the engineering approach, such parameter accuracy may be too high. For instance, measuring and drilling devices usually have an accuracy of 0.5 degrees to determine the inclination angle. For this reason, the authors propose to use the optimization method with a genetic algorithm at the initial design stage. It will save time if the designer performs many The above tables (see Tables 4 and 5) present the results of calculation times and SOS values for two optimization methods. On their basis, both methods can be compared. Searching the entire solution space took 1066 ms to find a catenary-like trajectory with SOS = 845.62. For comparison, by means of the genetic algorithm, a similar trajectory was found in 112.4 ms, giving the value of SOS = 604.26. In subsequent series, the difference in computation time becomes apparent as can be seen in the comparison in Table 6. The above comparison is very general, but it simply shows a significant difference in computation times. The method using the genetic algorithm was much faster, and with an increase in the computation accuracy (reducing the SOS), the calculation time ratio increased in favor of the genetic algorithm.

An Example of the Application of the Presented Computation Methods in Engineering Design
Based on the analysis of computation times, it was demonstrated that the genetic algorithm method is much faster. The difference can be particularly observed when the expected accuracy of fitting increases. For the given parameters, while expecting to achieve high computational accuracy, performing search of the entire solution space is too time consuming. The speed of calculation using the genetic algorithm is very high. It should be noted here that the results obtained using the genetic algorithm are rational numbers. In the engineering approach, such parameter accuracy may be too high. For instance, measuring and drilling devices usually have an accuracy of 0.5 degrees to determine the inclination angle. For this reason, the authors propose to use the optimization method with a genetic algorithm at the initial design stage. It will save time if the designer performs many comparative simulations. Once the narrowed down parameter ranges of the optimized trajectory are established, the method of searching the entire solution space should be used. It will enable the designer to obtain engineering calculation steps with reasonable computation time. The calculation schema may be presented in the following way:

Application Example
In order to show the practical application of the proposed methodology, calculations of the HDD trajectory under a terrain obstacle were made. The obstacle makes it impossible to conduct telemetry measurements. For this reason, it was decided that the section under the obstacle would be rectilinear and horizontal with the minimum length of 100 m. At the same time, it was desirable to obtain a trajectory shape as close to the catenary trajectory as possible.
The assumption regarding the minimum length of the third section of the trajectory means that a calculation variant with optimization of L 3 , R 2 , R 4 , ε 1 , ε 5 parameters should be used. Additional assumptions are presented in particular calculation steps.
(A) Determination of the catenary (reference) trajectory.
In the first step, the designer has to establish the main assumptions for calculating the reference trajectory. Assumptions for the analyzed case:

Results:
The catenary reference trajectory was determined on the basis of the algorithm presented in the article [6]. The results of the calculations are summarized in Table 7.  Table 8 presents initial values of five-section trajectory parameters calculated using a genetic algorithm. Parameters determining the fit and the computation time: Computation time = 672 (ms).
(C) Determination of narrowed down parameters ranges and calculation steps reasonable from engineering point of view.
Based on the results from the optimization with the genetic algorithm, the parameter ranges can be narrowed down. Calculation steps can be set with reasonable accuracy from the engineering point of view: (D) The use of the method of searching the entire solution space with the determined narrowed down parameters ranges and calculation steps.
Due to the narrowed down parameter ranges and engineering calculation steps, the computation time using the method of searching the entire solution space is short. This is possible to achieve due to significant reduction in the number of iterations (in calculations performed based on the algorithm presented in Figure 6).
Tables 9-11 present characteristic and geometric values of the trajectories obtained during the optimization process. Figure 9 shows the comparison between the catenary reference trajectory and the trajectory obtained from optimization. Table 9. Characteristic values of the best-fitted five-section trajectory determined using the method of searching the entire solution space with narrowed down parameters and engineering calculation steps.  100 2500 2400 −9 7.5 374. 16 11,979 1548 Parameters determining the fit and the computation time: • SOS = 374.16 (-); • Computation time = 1548 (ms).  Figure 9. Comparison of the shape of the catenary trajectory and the five-section trajectory determined by means of the presented methodology.

Conclusions
1. The effectiveness of the HDD technology is highly determined by its properly designed trajectory. Drilling failures and complications, which often accompany the application of HDD, result from a wrong selection of the well path trajectory in relation to the existing geological and drilling conditions. 2. In the design process, two concepts of HDD trajectory designing should be considered: Classic five-section, being a combination of straight and curvilinear sections, and a chain curve trajectory Figure 9. Comparison of the shape of the catenary trajectory and the five-section trajectory determined by means of the presented methodology.