A method for batch allocation of wellhead targets and three-dimensional trajectory optimization design for cluster wells
Through the antiquarn search algorithm and the discrete design of the strata, the problem of the batch distribution of the cluster of the target of the overwriting well and the tedious design process of the well -eye three -dimensional trajectory is to improve the design efficiency and calculation simpleness.
Patent Information
- Application Number
- CN202111575643.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In the prior art, the batch allocation of clump wellhead targets and the three-dimensional trajectory optimization design process of the wellbore three-dimensional trajectory is cumbersome, the calculation time is complex and the efficiency is low, making it difficult to meet the actual engineering needs.
The ant colony search algorithm is adopted to achieve the batch distribution between the well and the target through the penalty function, and optimize the eye trajectory through the discrete design of the strata.
It improves the efficiency of the well -ending target distribution and trajectory design, simplifies the calculation process, and can better meet the actual engineering needs.
Smart Images

Figure CN114239415B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of oil and gas drilling, and in particular relates to a method for batch distribution of cluster wellhead targets and three-dimensional trajectory optimization design. Background Art
[0002] In order to meet the overall development needs of oil fields, reduce drilling operation costs, and improve the centralized management capabilities of oil wells, cluster well drilling technology has been widely used in oil fields. Cluster wells refer to drilling several or even hundreds of wells on a well site or platform. The wellheads of each well are several meters to tens of meters apart, and the bottom of each well extends to different directions according to the design requirements, that is, a group of directional wells are drilled on a platform (offshore platform, desert drilling platform, artificial island, etc.). However, since cluster wells are completed in a limited space. There will be a lot of operational difficulties during its operation. Therefore, how to reasonably and efficiently realize the batch allocation of cluster wellhead targets and the optimization of the three-dimensional trajectory of the wellbore becomes particularly important for the construction of cluster wells.
[0003] Research on batch allocation of wellhead targets mainly focuses on several aspects such as "minimum sum of horizontal displacement", "minimum sum of total well depth", "minimum sum of total well depth and total horizontal displacement". In the actual calculation process, there are problems such as high calculation time complexity and calculation results that are difficult to meet actual engineering needs.
[0004] The optimization design of the three-dimensional trajectory of the wellbore is mostly based on the optimization theory, with the shortest wellbore as the objective function, and the tool inclination rate, vertical depth of the inclination point, well inclination angle, azimuth angle, etc. as constraints. The Lagrangian function is constructed to transform the equality constraint problem into the inequality constraint problem, and then solve the mathematical equation group of the inequality constraint problem. The solution process is relatively cumbersome and the numerical solution algorithm is inefficient.
[0005] In summary, there is currently no complete theoretical research on the batch allocation of cluster wellhead targets and the three-dimensional trajectory optimization design method, which brings inconvenience to the design and construction guidance of cluster wells. Summary of the invention
[0006] In order to overcome the problems that the solution process of the existing wellhead target batch allocation model and the wellbore three-dimensional trajectory design model is cumbersome and the calculation effect is difficult to meet the actual engineering needs, the purpose of the present invention is to provide a cluster wellhead target batch allocation and three-dimensional trajectory optimization design method. The method is based on an ant colony search algorithm, realizes batch allocation between wellheads and targets through a penalty function, and realizes the optimization design of wellbore trajectories through formation discretization design.
[0007] In order to achieve the above object, the technical solution of the present invention is:
[0008] A method for batch allocation of cluster wellhead targets and three-dimensional trajectory optimization design includes the following steps:
[0009] Step 1: Load data: load the wellhead coordinates and target point coordinates of the block to be designed, where the number of wellheads is m and the number of target points is n;
[0010] Step 2: Initialize the parameters of the ant colony algorithm for wellhead target allocation, including the initial number of iterations NC, the number of artificial ants sumant, the initial ant sequence ant, the pheromone importance parameter pip, the heuristic factor importance parameter edp, the pheromone evaporation coefficient pec, the maximum number of iterations NC_max, the pheromone increase intensity pai, which starts at 1, and the penalty factor pf.
[0011] Step 3: Calculate the distance from each wellhead to the target point. The calculation formula is the distance formula between two points:
[0012]
[0013] Where D(i,j) is the distance from the i-th wellhead to the j-th target point; x hi ,y hi , z hi are the three-dimensional coordinates of the i-th wellhead; x bj ,y bj , z bj are the three-dimensional coordinates of the j-th target point;
[0014] Step 4: Randomly place the ants at any wellhead position;
[0015] Step 5: Calculate the spatial transfer probability of the remaining targets. The remaining targets refer to the targets that have not been visited by the ant. Calculate the spatial transfer probability space of the ant from the i-th wellhead to the j-th target. The spatial transfer probability calculation formula is as follows:
[0016]
[0017]
[0018]
[0019] Where, Eta(i,j) is the heuristic factor from the i-th wellhead to the j-th target, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; Tau is the pheromone matrix, then Tau(i,j) is the pheromone matrix from the i-th wellhead to the j-th target; Q(i,j) is the probability distribution from the i-th wellhead to the j-th target; P(i,j) is the spatial transfer probability from the i-th wellhead to the j-th target;
[0020] The ant moves from the i-th wellhead to the j-th target point along the direction where P(i,j) is the largest, completing a target allocation. The allocation result is that the j-th target point is allocated to the i-th wellhead. The calculation formula for the ant's travel path l(i) is as follows:
[0021] l(i)=D(i,j) (5)
[0022] Step 6: Calculate the spatial transfer probability of the remaining wellheads. The remaining wellheads refer to the wellheads that have not been visited by the ant. The distance from the ant's jth target point to the i-th wellhead is calculated as d(i, j). Calculate the spatial transfer probability of the ant from the jth target point to the i-th wellhead:
[0023]
[0024]
[0025]
[0026] Where eta(j,i) is the heuristic factor for the jth target to go to the i-th wellhead, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; tau is the pheromone matrix, then tau(j,i) is the pheromone value at position (j,i) in the pheromone matrix tau, and its physical meaning is the pheromone matrix of the jth target to go to the i-th wellhead; q(j,i) is the probability distribution of the jth target to go to the i-th wellhead; p(j,i) is the spatial transfer probability of the jth target to the i-th wellhead.
[0027] The ant moves from the jth target point to the ith wellhead along the direction where p(j,i) is the largest;
[0028] Step 7: Update the pheromone matrix from each wellhead to the target point and from each target point to the wellhead. In the pheromone matrix Tau, the element at the (i, j)th position represents the pheromone of the ant from the i-th wellhead to the j-th target point. In step 5, the ant moves along the direction with the maximum P(i, j), and the pheromone value at the (i, j)th position in the pheromone matrix Tau increases by 1. In the pheromone matrix tau, the element at the (j, i)th position represents the pheromone of the ant from the j-th target point to the i-th wellhead. In step 6, the ant moves along the direction with the maximum p(j, i), and the pheromone value at the (j, i)th position in the pheromone matrix tau increases by 1.
[0029] Step 8: Determine whether there is a path intersection, extract the X, Y coordinates of the wellhead target coordinates, draw a two-dimensional plane graph of the wellhead and target allocation, and determine whether there is an intersection. If there is an intersection, the pheromone value at the (i, j) position in the pheromone matrix Tau in step 7 is reassigned. The calculation formula is as follows:
[0030] Tau(i,j)′=Tau(i,j)·pai (9)
[0031] Where Tau(i,j) is the pheromone value at position (i,j) in Tau before assignment, and Tau(i,j)′ is the pheromone value at position (i,j) in Tau after reassignment;
[0032] Step 9: Determine whether the ant has any wellheads or targets that it has not passed through. If so, repeat and return to step 5. If not, solve the path and L of the ant. The solution formula is as follows:
[0033]
[0034] Step 10: Determine whether the ant sequence number is equal to the number of ants. If not, the ant sequence number ant is increased by 1, and the process returns to step 4. If the ant sequence number is equal to the number of ants, the process proceeds to step 11.
[0035] Step 11: Find the shortest path of all ants in this iteration. The solution formula is as follows:
[0036] Ln(NC)=min{L(1),L(2),L(3),…,L(sumant)} (11)
[0037] Step 12: Determine whether the number of iterations has reached the maximum number of iterations. If not, the number of iterations NC is increased by 1, and the process returns to step 2. If the maximum number of iterations has been reached, the optimal path is solved. The calculation formula is as follows:
[0038] Lbest=min{Ln(1),Ln(2),Ln(3),…,Ln(NC_max)} (12)
[0039] The matching relationship between each wellhead and target point in the optimal path Lbest is the final allocation method of the wellhead and target point;
[0040] Step 13: Discretize and divide the strata, dividing the strata in the study area into cubes with a specified side length of a;
[0041] Step 14: Extract drillable cubes. According to the discretization results of step 13, mark the discretized blocks of the strata through which the drilled trajectory or the designed well trajectory passes, extract the unmarked strata blocks for wellbore trajectory design, and number the layers according to the depth, with the maximum number being max.
[0042] Step 15: Establish wellbore trajectory optimization target:
[0043]
[0044] in:
[0045]
[0046] In the formula, x 1 is the depth of the deflection point, m; x 2 is the deflection capability, ° / 30m; x 3 is the length of the stable slope section, m; D max D is the maximum vertical depth of deflection allowed by engineering conditions, m; min is the minimum vertical depth of deflection allowed by engineering conditions, m; L bcmax L is the maximum length of the stable slope section allowed by engineering conditions, m; bcmin is the minimum length of the stable slope section allowed by engineering conditions, m; R 1max is the maximum value of the deflection tool’s deflection capacity, ° / 30m; R 1min is the minimum value of the deflection capability of the deflection tool, ° / 30m; α 1 is the well inclination angle at the end of deflection, °; φ 1 is the end azimuth of deflection, °; D c is the depth coordinate of target point C, m; N c is the north coordinate of target point C, m; E c is the east coordinate of target point C, m;
[0047] Step 16: Initialize the parameters of trajectory optimization ant colony algorithm, the number of iterations NC_tra, the initial number of iterations is 1, that is, NC_tra=1; the number of artificial ants sumant_tra; the initial ant sequence ant_tra; the pheromone importance parameter pip_tra); the heuristic factor importance parameter edp_tra; the pheromone evaporation coefficient pec_tra; the maximum number of iterations NC_max_tra; the pheromone increase intensity pai_tra, which is initially 1;
[0048] Step 17: Calculate the evaluation function value and spatial transition probability, evaluation function ΔJ ot The value of is the oth node objective function J o and the objective function value J of the tth node t The solution formula is:
[0049]
[0050] The spatial transition probability formula is:
[0051]
[0052] In the formula, is the spatial transition probability of the ant_tra th ant from the oth node to the tth node; τ otis the intensity of the pheromone of the ant from the oth node to the tth node; s is the taboo node in the process of the kth ant transferring from the oth node; τ os is the strength of the pheromone of the ant from the oth node to the sth node; α is the parameter of the importance of the pheromone; β is the parameter of the importance of the heuristic factor; ΔJ os is the objective function J of the oth node o and the objective function value J of the sth node s ratio; allowed ant_tra is the set of nodes where the ant can perform spatial transfer at the oth node; otherwise is the set of nodes where the ant cannot perform spatial transfer at the oth node;
[0053] Each ant is randomly distributed on the spatial grid. When ΔJ ot > 1, the artificial ant moves from the o neighborhood to the t neighborhood in the direction with the highest spatial transfer probability. ot When ≤1, replace the node and solve again;
[0054] Step 18: Find the distance that the ant has traveled in one transfer. The ant transfers from the oth node to the tth node according to the spatial transfer probability obtained in step 17. The distance that the ant has traveled is:
[0055]
[0056] Step 19: Determine whether the ant search is terminated. When the evaluation function values of all adjacent nodes of the current node are less than 1, the search is terminated. According to the stratum discretization sorting order of step 14, the path and path of the ant are solved. The calculation formula is as follows:
[0057]
[0058] Where:
[0059] t=o+1 (19)
[0060] And go to step 20; otherwise go to step 17 to continue the search for the next layer of the stratum discretization sorting;
[0061] Step 20: Determine whether the ant sequence number is equal to the number of ants. If not, increase the ant sequence number by 1 and return to step 14. If the ant sequence number is equal to the number of ants, proceed to step 21.
[0062] Step 21: Determine whether the number of iterations reaches the maximum number of iterations. If not, find the minimum path sum of the ants in this iteration:
[0063] L min(NC_tra)=min{L(1),L(2),L(3),…,L(sumant_tra)} (20)
[0064] Where, L min (i) represents the minimum path taken by all ants in the NC_tra iteration. Calculate the number of iterations plus 1 and return to step 14. If yes, proceed to step 22;
[0065] Step 22: Solve the optimal path. The calculation formula is as follows:
[0066] Lbest=min{L min (1),L min (2),L min (3),…,L min (NC_max_tra)} (21)
[0067] The shortest path saved is the trajectory design result from the wellhead to the target point;
[0068] Step 23: determine whether the batch design is completed. If the wellhead sequence number of the trajectory design result in step 22 is equal to the number of wellheads, the batch design is completed. Otherwise, the wellhead sequence number is increased by 1, and step 14 is entered to perform trajectory design of new wells until the trajectory design of all wells is completed.
[0069] Step 24: Display batch design results.
[0070] The present invention realizes batch allocation of wellhead targets and optimal design of wellbore trajectory based on ant colony search algorithm, combines cluster wellhead target allocation with trajectory optimization design, and greatly improves the efficiency of wellhead target allocation and trajectory design. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 This is a wellhead coordinate distribution diagram of the block to be designed in the present invention.
[0072] Figure 2 It is the target coordinate distribution diagram of the block to be designed in the present invention.
[0073] Figure 3 The ant colony algorithm parameter initialization table is allocated for the wellhead target in the present invention.
[0074] Figure 4 A two-dimensional plan view is allocated to the wellhead and target point in the present invention.
[0075] Figure 5 This is the final allocation result diagram of the wellhead and target in the present invention.
[0076] Figure 6This is the parameter initialization table for the trajectory optimization ant colony algorithm in the present invention.
[0077] Figure 7 A three-dimensional diagram is designed in batches for the wellbore trajectory in the present invention.
[0078] Figure 8 Vertical profiles are designed for batches of wellbore trajectories in the present invention. DETAILED DESCRIPTION
[0079] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0080] A method for batch allocation of cluster wellhead targets and three-dimensional trajectory optimization design includes the following steps:
[0081] Step 1: Load data, such as Figure 1 , Figure 2 As shown, the wellhead coordinates and target point coordinates of the block to be designed are loaded, where the number of wellheads is 12, i.e. m = 12; the number of target points is 12, i.e. n =12.
[0082] Step 2: Initialize the parameters of the ant colony algorithm for wellhead target allocation, such as Figure 3 As shown, the maximum number of iterations is 200, that is, NC_max=200; the initial number of iterations is 1, that is, NC=1; the number of artificial ants is 50, that is, sumant=50; the initial artificial ant sequence is 1, that is, ant=1; the pheromone importance parameter is 1, that is, pip=1; the heuristic factor importance parameter is 5, that is, edp=5; the pheromone evaporation coefficient is 0.5, that is, pec=0.5; the pheromone increase intensity coefficient is 10000, that is, pai=10000; the penalty factor is 0.8, that is, pf=0.8.
[0083] Step 3: Calculate the distance from each wellhead to the target point. The calculation formula is the distance formula between two points:
[0084]
[0085] Where D(i,j) is the distance from the i-th wellhead to the j-th target point; x hi ,y hi , z hi are the three-dimensional coordinates of the i-th wellhead; x bj ,y bj , z bj are the three-dimensional coordinates of the j-th target point respectively.
[0086] Step 4: Randomly place the ants at any wellhead position.
[0087] Step 5: Calculate the spatial transfer probability of the remaining targets. The remaining targets refer to the targets that have not been visited by the ant. Calculate the spatial transfer probability space of the ant from the i-th wellhead to the j-th target. The spatial transfer probability calculation formula is as follows:
[0088]
[0089]
[0090]
[0091] Where Eta(i,j) is the heuristic factor from the i-th wellhead to the j-th target, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; Tau is the pheromone matrix, then Tau(i,j) is the pheromone matrix from the i-th wellhead to the j-th target; Q(i,j) is the probability distribution from the i-th wellhead to the j-th target; P(i,j) is the spatial transfer probability from the i-th wellhead to the j-th target.
[0092] The ant moves from the i-th wellhead to the j-th target point along the direction where P(i,j) is the largest, completing a target allocation. The allocation result is that the j-th target point is allocated to the i-th wellhead. The calculation formula for the ant's travel path l(i) is as follows:
[0093] l(i)=D(i,j) (5)
[0094] Step 6: Calculate the spatial transfer probability of the remaining wellheads. The remaining wellheads refer to the wellheads that have not been visited by the ant. The distance from the ant's jth target point to the i-th wellhead is calculated as d(i, j). The formula for calculating the spatial transfer probability of the ant from the jth target point to the i-th wellhead is as follows:
[0095]
[0096]
[0097]
[0098] Where eta(j,i) is the heuristic factor for the jth target to go to the i-th wellhead, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; tau is the pheromone matrix, then tau(j,i) is the pheromone value at position (j,i) in the pheromone matrix tau, and its physical meaning is the pheromone matrix of the jth target to go to the i-th wellhead; q(j,i) is the probability distribution of the jth target to go to the i-th wellhead; p(j,i) is the spatial transfer probability of the jth target to the i-th wellhead.
[0099] The ant moves from the jth target point to the i-th wellhead along the direction where p(j,i) is the largest.
[0100] Step 7. Update the pheromone matrix from each wellhead to the target point and from each target point to the wellhead. In the pheromone matrix Tau, the element at the (i, j)th position represents the pheromone of the ant going from the i-th wellhead to the j-th target point. In step 5, the ant moves along the direction with the largest P(i, j), and the pheromone value at the (i, j)th position in the pheromone matrix Tau increases by 1. In the pheromone matrix tau, the element at the (j, i)th position represents the pheromone of the ant going from the j-th target point to the i-th wellhead. In step 6, the ant moves along the direction with the largest p(j, i), and the pheromone value at the (j, i)th position in the pheromone matrix tau increases by 1.
[0101] Step 8: Determine whether there is a path intersection, such as Figure 4 As shown, extract the X, Y coordinates of the wellhead target coordinates, draw a two-dimensional plane graph of the wellhead and target distribution, and determine whether there is an intersection. If there is an intersection, the pheromone value of the (i, j) position in the pheromone matrix Tau in step 7 is reassigned. The calculation formula is as follows:
[0102] Tau(i,j)′=Tau(i,j)·pai (9)
[0103] Where Tau(i,j) is the pheromone value at position (i,j) in Tau before assignment, and Tau(i,j)′ is the pheromone value at position (i,j) in Tau after reassignment.
[0104] Step 9: Determine whether the ant has any wellheads or targets that it has not passed through. If so, repeat and return to step 5. If not, solve the path and L of the ant. The solution formula is as follows:
[0105]
[0106] Step 10: Determine whether the ant sequence number is equal to the number of ants. If not, the ant sequence number ant is increased by 1, and the process returns to step 4. If the ant sequence number is equal to the number of ants, the process proceeds to step 11.
[0107] Step 11: Find the shortest path of all ants in this iteration. The solution formula is as follows:
[0108] Ln(NC)=min(L(1),L(2),L(3),…,L(sumant)) (11)
[0109] Step 12: Determine whether the number of iterations has reached the maximum number of iterations. If not, increase the number of iterations NC by 1 and return to step 2. If the maximum number of iterations has been reached, find the optimal path. The solution formula is as follows:
[0110] Lbest=min(Ln(1),Ln(2),Ln(3),…,Ln(NC_max)) (12)
[0111] The matching relationship between each wellhead and target in the optimal path Lbest is the final allocation method of the wellhead and target. The allocation effect is as follows: Figure 5 shown.
[0112] Step 13: Discretize and divide the strata in the study area into cubes with a specified side length a.
[0113] Step 14: Extract drillable cubes. According to the discretization results of step 13, mark the discretized blocks of the strata through which the drilled trajectory or the designed well trajectory passes, and extract the unmarked stratum blocks for wellbore trajectory design.
[0114] Step 15: Establish wellbore trajectory optimization target:
[0115]
[0116] in:
[0117]
[0118] In the formula, x 1 is the depth of the deflection point, m; x 2 is the deflection capability, ° / 30m; x 3 is the length of the stable slope section, m; D max D is the maximum vertical depth of deflection allowed by engineering conditions, m; min is the minimum vertical depth of deflection allowed by engineering conditions, m; L bcmax L is the maximum length of the stable slope section allowed by engineering conditions, m; bcmin is the minimum length of the stable slope section allowed by engineering conditions, m; R 1max is the maximum value of the deflection tool’s deflection capacity, ° / 30m; R 1min is the minimum value of the deflection capability of the deflection tool, ° / 30m; α 1 is the well inclination angle at the end of deflection, °; φ 1 is the end azimuth of deflection, °; D c is the depth coordinate of target point C, m; N c is the north coordinate of target point C, m; E c is the east coordinate of target point C, m.
[0119] Step 16: Initialize the parameters of trajectory optimization ant colony algorithm, such as Figure 6 As shown,
[0120] The maximum number of iterations is 200, i.e. NC_max_tra=200; the initial number of iterations is 1, i.e. NC_tra=1; the number of artificial ants is 50, i.e. sumant_tra=50; the initial artificial ant sequence number is 1, i.e. ant_tra=1; the pheromone importance parameter is 1, i.e. pip_tra=1; the heuristic factor importance parameter is 5, i.e. edp_tra=5; the pheromone evaporation coefficient is 0.5, i.e. pec_tra=0.5; the pheromone increase intensity coefficient is 10000, i.e. pai_tra=10000.
[0121] Step 17: Calculate the evaluation function value and spatial transition probability. Evaluation function (ΔJ ot ) is the value of the oth node objective function J o and the objective function value J of the tth node t The solution formula is:
[0122]
[0123] The spatial transition probability formula is:
[0124]
[0125] In the formula, is the spatial transition probability of the kth ant from the oth node to the tth node; τ ot is the intensity of the pheromone of the ant from the oth node to the tth node; s is the taboo node in the process of the kth ant transferring from the oth node; τ os is the strength of the pheromone of the ant from the oth node to the sth node; α is the parameter of the importance of the pheromone; β is the parameter of the importance of the heuristic factor; ΔJ os is the objective function J of the oth node o and the objective function value J of the sth node s ratio; allowed k is the set of nodes where the ant can perform spatial transfer at the o-th node; otherwise is the set of nodes where the ant cannot perform spatial transfer at the o-th node.
[0126] Each ant is randomly distributed on the spatial grid. When ΔJ ot > 1, the artificial ant moves from the o neighborhood to the t neighborhood in the direction with the highest spatial transfer probability. ot When ≤1, replace the node and solve again.
[0127] Step 18: Find the distance that the ant has traveled in one transfer. The ant transfers from the oth node to the tth node according to the spatial transfer probability obtained in step 17. The distance that the ant has traveled is:
[0128]
[0129] Step 19: Determine whether the ant search is terminated. When the evaluation function values of all adjacent nodes of the current node are less than 1, the search is terminated. According to the stratum discretization sorting order of step 14, the path and path of the ant are solved. The calculation formula is as follows:
[0130]
[0131] Where:
[0132] t=o+1 (19)
[0133] And go to step 20; otherwise go to step 17 to continue the search for the next layer of the stratum discretization sorting.
[0134] Step 20: Determine whether the ant sequence number is equal to the number of ants. If not, increase the ant sequence number by 1 and return to step 14. If the ant sequence number is equal to the number of ants, proceed to step 21.
[0135] Step 21: Determine whether the number of iterations reaches the maximum number of iterations. If not, find the minimum path sum of the ants in this iteration:
[0136] L min (NC_tra)=min{L(1),L(2),L(3),…,L(sumant_tra)} (20)
[0137] Where, L min (i) represents the minimum path taken by all ants in the NC_tra iteration. Calculate the number of iterations plus 1 and return to step 14. If yes, proceed to step 22.
[0138] Step 22: Solve the optimal path. The calculation formula is as follows:
[0139] Lbest=min{L min (1),L min (2),L min (3),…,L min (NC_max_tra)} (21)
[0140] The shortest path saved is the trajectory design result from the wellhead to the target point.
[0141] Step 23: Determine whether the batch design is completed. If the wellhead sequence number of the trajectory design result in step 22 is equal to the number of wellheads, the batch design is completed. Otherwise, the wellhead sequence number is increased by 1, and step 14 is entered to perform trajectory design of the new well until the trajectory design of all wells is completed.
[0142] Step 24: Batch design results display, such as Figure 7 , Figure 8 shown.
[0143] The present invention realizes batch allocation of wellhead targets and optimal design of wellbore trajectory based on ant colony search algorithm, combines cluster wellhead target allocation with trajectory optimization design, and greatly improves the efficiency of wellhead target allocation and trajectory design.
Claims
1. A method for batch allocation of wellhead targets and three-dimensional trajectory optimization design of cluster wells, characterized in that: The following steps are involved: Step 1: Load data, load the wellhead coordinates and target coordinates of the block to be designed, where the number of wellheads is m The number of targets is n ; Step 2: Initialize the parameters of the ant colony algorithm for wellhead target allocation, including the initial number of iterations NC, the number of artificial ants sumant, the initial ant sequence ant, the pheromone importance parameter pip, the heuristic factor importance parameter edp, the pheromone evaporation coefficient pec, the maximum number of iterations NC_max, the pheromone increase intensity pai, which is initially 1, and the penalty factor pf. Step 3: Calculate the distance from each wellhead to the target point; Step 4: Randomly place the ants at any wellhead position; Step 5: Calculate the spatial transfer probability of the remaining targets, which are the targets that have not been visited by the ant, and calculate the spatial transfer probability space of the ant from the i-th wellhead to the j-th target; Step 6: Calculate the remaining wellhead space transfer probability; Step 7: Update the pheromone matrix from each wellhead to the target point and from each target point to the wellhead. In the pheromone matrix Tau, the element at the (i, j)th position represents the pheromone of the ant from the i-th wellhead to the j-th target point. In step 5, the ant moves along the direction with the maximum P(i, j), and the pheromone value at the (i, j)th position in the pheromone matrix Tau increases by 1. In the pheromone matrix tau, the element at the (j, i)th position represents the pheromone of the ant from the j-th target point to the i-th wellhead. In step 6, the ant moves along the direction with the maximum p(j, i), and the pheromone value at the (j, i)th position in the pheromone matrix tau increases by 1. Step 8: Determine whether there is a path intersection, extract the X, Y coordinates of the wellhead target coordinates, draw a two-dimensional plane graph of the wellhead and target allocation, and determine whether there is an intersection. If there is an intersection, reassign the pheromone value of the (i, j) position in the pheromone matrix Tau in step 7; Step 9: Determine whether the ant has any wellheads or targets that it has not passed through. If so, repeat and return to step 5. If not, solve the path and L of the ant. The solution formula is as follows: Step 10: Determine whether the ant sequence number is equal to the number of ants. If not, the ant sequence number ant is increased by 1, and the process returns to step 4. If the ant sequence number is equal to the number of ants, the process proceeds to step 11. Step 11: Find the shortest path of all ants in this iteration. The solution formula is as follows: Ln(NC)=min{L(1),L(2),L(3),…,L(sumant)} (11) Step 12: Determine whether the number of iterations has reached the maximum number of iterations. If not, the number of iterations NC is increased by 1, and the process returns to step 2. If the maximum number of iterations has been reached, the optimal path is solved. The calculation formula is as follows: Lbest=min{Ln(1),Ln(2),Ln(3),…,Ln(NC_max)} (12) The matching relationship between each wellhead and target point in the optimal path Lbest is the final allocation method of the wellhead and target point; Step 13: Discretize and divide the strata, dividing the strata in the study area into cubes with a specified side length of a; Step 14: Extract drillable cubes. According to the discretization results of step 13, mark the discretized blocks of the strata through which the drilled trajectory or the designed well trajectory passes, extract the unmarked strata blocks for wellbore trajectory design, and number the layers according to the depth, with the maximum number being max. Step 15: Establish wellbore trajectory optimization target: in: Where, x1 is the depth of the deflection point, m; x2 is the deflection capacity, ° / 30m; x3 is the length of the stable deflection section, m; D max D is the maximum vertical depth of deflection allowed by engineering conditions, m; min is the minimum vertical depth of deflection allowed by engineering conditions, m; L bcmax L is the maximum length of the stable slope section allowed by engineering conditions, m; bcmin is the minimum length of the stable slope section allowed by engineering conditions, m; R 1max is the maximum value of the deflection tool’s deflection capacity, ° / 30m; R 1min is the minimum value of the deflection tool’s deflection capability, ° / 30m; α1 is the well inclination angle at the end of deflection, °; φ1 is the azimuth angle at the end of deflection, °; D c is the depth coordinate of target point C, m; N c is the north coordinate of target point C, m; E c is the east coordinate of target point C, m; Step 16: Initialize the parameters of trajectory optimization ant colony algorithm, the number of iterations NC_tra, the initial number of iterations is 1, that is, NC_tra=1; the number of artificial ants sumant_tra; the initial ant sequence ant_tra; the pheromone importance parameter pip_tra); the heuristic factor importance parameter edp_tra; the pheromone evaporation coefficient pec_tra; the maximum number of iterations NC_max_tra; the pheromone increase intensity pai_tra, which is initially 1; Step 17: Calculate the evaluation function value and spatial transition probability, evaluation function ΔJ ot The value of is the oth node objective function J o and the objective function value J of the tth node t The ratio of Step 18: Find the distance that the ant has traveled in one transfer. The ant transfers from the oth node to the tth node according to the spatial transfer probability obtained in step 17. The distance that the ant has traveled is: Step 19: determine whether the ant search is terminated. When the evaluation function values of all adjacent nodes of the current node of the ant are less than 1, the search is terminated. According to the stratum discretization sorting order of step 14, the path and the path of the ant are solved; and the process goes to step 20; otherwise, the process goes to step 17 to continue the stratum discretization sorting and search the next layer segment; Step 20: Determine whether the ant sequence number is equal to the number of ants. If not, increase the ant sequence number by 1 and return to step 14. If the ant sequence number is equal to the number of ants, proceed to step 21. Step 21: Determine whether the number of iterations reaches the maximum number of iterations. If not, find the minimum path sum of the ants in this iteration: L min (NC_tra)=min{L(1),L(2),L(3),…,L(summant_tra)} (20) Where, L min (i) represents the minimum path taken by all ants in the NC_tra iteration; calculate the number of iterations plus 1, return to step 14, if yes, go to step 22; Step 22: Solve the optimal path. The calculation formula is as follows: Lbest=min{L min (1),L min (2),L min (3),…,L min (NC_max_tra)} (21) The shortest path saved is the trajectory design result from the wellhead to the target point; Step 23: determine whether the batch design is completed. If the wellhead sequence number of the trajectory design result in step 22 is equal to the number of wellheads, the batch design is completed. Otherwise, the wellhead sequence number is increased by 1, and step 14 is entered to perform trajectory design of new wells until the trajectory design of all wells is completed. Step 24: Batch design results display; The calculation formula of step three is: Where D(i,j) is the distance from the i-th wellhead to the j-th target point; x hi ,y hi , z hi are the three-dimensional coordinates of the i-th wellhead; x bj ,y bj , z bj are the three-dimensional coordinates of the j-th target point; In the step 5, the spatial transfer probability calculation formula is as follows: Where, Eta(i,j) is the heuristic factor from the i-th wellhead to the j-th target, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; Tau is the pheromone matrix, then Tau(i,j) is the pheromone matrix from the i-th wellhead to the j-th target; Q(i,j) is the probability distribution from the i-th wellhead to the j-th target; P(i,j) is the spatial transfer probability from the i-th wellhead to the j-th target; The ant moves from the i-th wellhead to the j-th target point along the direction where P(i,j) is the largest, completing a target allocation. The allocation result is that the j-th target point is allocated to the i-th wellhead. The calculation formula for the ant's travel path l(i) is as follows: l(i)=D(i,j) (5); The step six is as follows: the remaining wellheads refer to the wellheads that have not been visited by the ant, the distance from the ant's jth target point to the i-th wellhead is calculated as d(i, j), and the spatial transfer probability of the ant from the j-th target point to the i-th wellhead is calculated as: Where eta(j,i) is the heuristic factor for the jth target to go to the i-th wellhead, which is set to the inverse of the distance here; α is the parameter of the pheromone importance; β is the heuristic factor importance parameter; tau is the pheromone matrix, then tau(j,i) is the pheromone value at the position (j,i) in the pheromone matrix tau, and its physical meaning is the pheromone matrix of the jth target to go to the i-th wellhead; q(j,i) is the probability distribution of the jth target to go to the i-th wellhead; p(j,i) is the spatial transfer probability of the jth target to the i-th wellhead; The ant moves from the jth target point to the ith wellhead along the direction where p(j,i) is the largest; The solution formula of step seventeen is: The spatial transition probability formula is: In the formula, is the spatial transition probability of the ant_tra th ant from the oth node to the tth node; τ ot is the intensity of the pheromone of the ant from the oth node to the tth node; s is the taboo node in the process of the kth ant transferring from the oth node; τ os is the strength of the pheromone of the ant from the oth node to the sth node; α is the parameter of the importance of the pheromone; β is the parameter of the importance of the heuristic factor; ΔJ os is the objective function J of the oth node o and the objective function value J of the sth node s ratio; allowed ant_tra is the set of nodes where the ant can perform spatial transfer at the oth node; otherwise is the set of nodes where the ant cannot perform spatial transfer at the oth node; Each ant is randomly distributed on the spatial grid. When ΔJ ot > 1, the artificial ant moves from the o neighborhood to the t neighborhood in the direction with the highest spatial transfer probability. ot When ≤1, replace the node and solve again; In step 19, the sum of the paths taken by the ants is calculated using the following formula: Where: t=o+1 (19).
2. A cluster wellhead target batch allocation and three-dimensional trajectory optimization design method according to claim 1, characterized in that: In the step eight, the pheromone value is reassigned, and the calculation formula is as follows: Tau(i,j)′=Tau(i,j)·pai (9) Where Tau(i,j) is the pheromone value at position (i,j) in Tau before assignment, and Tau(i,j)′ is the pheromone value at position (i,j) in Tau after reassignment.
Citation Information
Patent Citations
Method for optimizing well drilling sequence of offshore cluster well group
CN105117809A
Cluster platform well borehole track design method and device
CN111021957A