A parameter-controlled intelligent oilfield wellbore digital twin modeling method

Through the wellbore digital twin modeling method of multi-source data fusion and genetic algorithm optimization, combined with multi-sensor collaborative measurement and dynamic mechanical correction, the problems of insufficient accuracy and robustness in wellbore modeling are solved, and high-precision three-dimensional modeling and real-time update capabilities of wellbore trajectory are achieved.

CN120526085BActive Publication Date: 2025-09-19QINGDAO UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511022795.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-19
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Existing wellbore modeling technology has systematic defects in data acquisition, curvature modeling, coordinate generation and parametric control, resulting in insufficient wellbore trajectory accuracy, poor model robustness, inability to meet high-precision modeling requirements, and lack of automation and real-time updating capabilities.

Method used

The method of multi-source data fusion and genetic algorithm optimization is adopted, combined with multi-sensor collaborative measurement and dynamic mechanical correction model. The wellbore trajectory is optimized through the minimum curvature algorithm, geological factors are introduced to dynamically adjust the smoothing weight, and curvature second-order derivative constraints and anti-disturbance stability verification are performed to achieve high-precision three-dimensional modeling of the wellbore trajectory.

Benefits of technology

It significantly improves the measurement accuracy and anti-interference performance of wellbore trajectory, suppresses curvature mutations, enhances trajectory stability in complex formation sections, reduces the risk of geological structure collision, realizes cumulative error control in long-distance well sections, and improves modeling efficiency and real-time interaction capabilities between models and engineering data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526085B_ABST
    Figure CN120526085B_ABST
Patent Text Reader

Abstract

The present invention discloses a parameter-controlled intelligent oilfield wellbore digital twin modeling method, belonging to the field of petroleum engineering. The method comprises the following steps: generating wellbore trajectory data using multi-source data fusion, optimizing the multi-source data fusion weight coefficients using a genetic algorithm when generating measured depths; optimizing the wellbore trajectory curvature based on the minimum curvature principle, minimizing the second-order derivative of curvature as the objective function, and dynamically adjusting the smoothing weights using geological factors; dynamically correcting the curvature factor using a second-order Taylor expansion compensation term to generate three-dimensional coordinate data for the wellbore trajectory; and performing parameter-driven wellbore geometry modeling based on the three-dimensional coordinate data of the wellbore trajectory, achieving parametric and programmable control of the wellbore radius, wellbore wall thickness, and profile inclination angle. The present invention provides an efficient and accurate three-dimensional wellbore modeling solution and significantly improves wellbore modeling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of petroleum engineering, and in particular relates to a parameter-controlled intelligent oilfield wellbore digital twin modeling method. Background Art

[0002] As oil and gas exploration and development gradually extend to deep, ultra-deep and complex structural areas, the precise characterization of wellbore trajectories and three-dimensional wellbore modeling technology have become the core links in optimizing drilling projects and reducing development risks. Traditional wellbore modeling methods are mainly based on geometric interpolation algorithms of discrete measuring points, including the average angle method and the minimum curvature method, which generate trajectory curves through linear or circular assumptions. However, such methods have systematic defects in data acquisition, curvature modeling, coordinate generation and parameterized control. The lack of coordination of multi-source sensors in the well leads to the lack of elastic deformation and thermal expansion correction of the measured depth. The well inclination is significantly affected by the accelerometer zero bias drift and dynamic vibration noise. The error of the azimuth angle under magnetic interference or gyroscope cumulative drift is difficult to suppress, and the quality of the original data cannot meet the requirements of high-precision modeling.

[0003] Existing curvature modeling algorithms generally rely on the constant curvature assumption and ignore the constraints of the second-order derivative of curvature on trajectory smoothness, resulting in trajectory jumps and geometric distortion in high-curvature well sections. Traditional sliding average or low-pass filtering methods do not dynamically adjust weights based on formation parameters, resulting in limited effectiveness in suppressing sudden curvature changes in complex geological structures. Furthermore, the lack of an anti-disturbance testing and verification mechanism results in insufficient model robustness. Furthermore, vertical depth calculations fail to incorporate formation anisotropy correction terms, leading to vertical projection deviations and further compromising the accuracy of trajectory matching with the geological model. During the 3D coordinate generation process, the traditional model, lacking segmented compensation terms for sudden azimuth changes, can result in horizontal projection coordinate jump errors of up to ±0.5m. In long-well section modeling scenarios, the lack of a closed-loop suppression mechanism for cumulative errors causes vertical depth closure errors to exceed API specification limits. The traditional calculation formula for the curvature factor (RF) exhibits significant errors in high-dogleg scenarios and lacks optimization through a second-order Taylor expansion compensation term, limiting the engineering applicability of coordinate generation.

[0004] Current wellbore 3D modeling technology relies heavily on manual intervention, lacking a programmatic control interface for adjusting geometric parameters (radius, wall thickness, and profile orientation), resulting in inefficient model iteration. Existing methods lack real-time comparison of measurement-while-drilling data and mechanisms for re-optimizing abnormal sections, causing model updates to lag behind actual drilling progress. Incompatible 3D coordinate output formats hinder multi-software collaboration and virtual simulation applications. While the introduction of digital twin technology offers a new paradigm for wellbore modeling, its application remains limited by bottlenecks such as low data fidelity, weak algorithm adaptability, and insufficient automation.

[0005] In response to these issues, scholars at home and abroad have proposed some improvements. For example, they have adopted multi-sensor fusion to improve data acquisition accuracy, or introduced dynamic weighting to optimize trajectory smoothness. However, these improvements still have the following shortcomings: data preprocessing is disconnected from trajectory optimization, and a dynamic coupling mechanism between geological parameters and smoothing strength has not been established; the coordinate generation algorithm has not broken through the mathematical bottleneck of curvature factor approximation error, and the accuracy of large curvature sections remains insufficient; the modeling process lacks closed-loop verification and automated parameter control, making it impossible to achieve full-link adaptation from "data to model to engineering." Summary of the Invention

[0006] In order to solve the above problems, the present invention proposes a parameter-controlled intelligent oilfield wellbore digital twin modeling method. Based on multi-source data fusion and minimum curvature algorithm optimization and genetic algorithm optimization, it realizes high-precision three-dimensional modeling of wellbore trajectories and dynamic generation of parametric wellbore structures. This method comprehensively applies ground drill string accumulation, downhole encoder real-time measurement and dynamic mechanical correction model, and combines the multi-sensor collaboration of accelerometers, magnetometers and gyroscopes to construct a wellbore trajectory core parameter acquisition system with temperature drift compensation, elastic deformation correction and geological anisotropy correction. In the data processing stage, the objective function reconstruction technology with curvature second-order derivative constraints is adopted, combined with local difference calculation and weighted average algorithm to suppress curvature mutations. The smoothing weight is dynamically adjusted by geological factors to achieve adaptive optimization of wellbore trajectory curvature and anti-disturbance stability verification, effectively solving the problem of high-frequency oscillation and geological structure mismatch in traditional methods.

[0007] The technical solutions of the present invention are as follows:

[0008] A parameter-controlled intelligent oilfield wellbore digital twin modeling method includes the following steps:

[0009] Step 1: Generate wellbore trajectory data by multi-source data fusion, where the wellbore trajectory data includes measured depth, well inclination, azimuth, and vertical depth; when generating measured depth, a genetic algorithm is used to optimize the multi-source data fusion weight coefficient;

[0010] Step 2: Optimize the wellbore trajectory curvature based on the minimum curvature principle, taking minimizing the second-order derivative of curvature as the objective function and introducing geological factors to dynamically adjust the smoothing weight;

[0011] Step 3: Propose a second-order Taylor expansion compensation term to dynamically correct the curvature factor and generate three-dimensional coordinate data of the wellbore trajectory;

[0012] Step 4: Perform parameter-driven wellbore geometry modeling based on the three-dimensional coordinate data of the wellbore trajectory to achieve parameterized programmable control of the wellbore radius, wellbore wall thickness, and profile inclination angle.

[0013] Furthermore, the specific process of step 1 is as follows:

[0014] Step 1.1: Calculate the actual measured depth using multi-source data fusion and genetic algorithm. The specific process is as follows:

[0015] Step 1.1.1. Obtain multi-source data, including initial measurement depth, downhole displacement, tension / compression, and thermal expansion;

[0016] The number of drill rods lowered and the length of each drill rod are recorded in real time by the ground winch sensor to calculate the initial measurement depth ;

[0017] Use the length measurement while drilling tool to measure the number of drill string rotations and drill string diameter , real-time calculation of downhole displacement ;

[0018] Calculate the tension / compression of the drill string under axial force based on Hooke's law ;

[0019] Calculate thermal expansion based on downhole temperature sensor data ;

[0020] Step 1.1.2: Perform multi-source data fusion and use genetic algorithm to optimize the weight coefficient of multi-source data fusion to build the actual measurement depth calculation model;

[0021] Step 1.1.3, applying the actual measured depth calculation model to the newly acquired multi-source measurement data to calculate the actual measured depth;

[0022] Step 1.2: Measure the well inclination angle by combining dual accelerometer redundancy check and gyroscope auxiliary compensation;

[0023] Step 1.3: Use the gyroscope method to measure the azimuth angle;

[0024] Step 1.4, calculating the vertical depth using a geometric model based on the well inclination, azimuth, and measured depth;

[0025] Step 1.5: Comprehensive generation of wellbore trajectory data.

[0026] Furthermore, the specific process of step 1.1.2 is as follows:

[0027] Step 1.1.2.1: The collected initial measurement depth, downhole displacement, tension / compression, and thermal expansion are combined into a training sample set. ,in, For the samples, is the total number of samples; The samples contain Initial measurement depth of samples , Downhole displacement , stretch / compression , thermal expansion ;

[0028] Step 1.1.2.2: Obtain the reference measurement depth corresponding to the training sample set ,in For the Reference measurement depth of each sample;

[0029] Step 1.1.2.3: Use genetic algorithm to optimize weight coefficients; the specific process is as follows:

[0030] Randomly generate the initial population , For the Individuals, is the total number of individuals; each individual represents a set of candidate weight coefficients, and the initial weight coefficients are randomly generated in the interval [[0,1];

[0031] Calculate the actual measured depth of the sample corresponding to each individual in the population:

[0032] ;

[0033] in, For the population The corresponding individual The actual measured depth of each sample; 、 、 、 For the The four weight coefficients contained in each individual;

[0034] according to and , use the negative value of the mean absolute error to calculate the The fitness value of each individual ;

[0035] Based on the fitness value, the roulette wheel method is used to select high-quality individuals;

[0036] The selected individuals are paired and crossover is performed to generate new individuals. The arithmetic crossover method is used. For the selected parent individuals and , generating offspring and ;

[0037] Perform mutation operation on individuals with preset mutation probability, and Individual , randomly select weight coefficients for small perturbations;

[0038] After crossover and mutation, New individuals , perform weight normalization processing;

[0039] Set the number of elites to be retained , the most fit species in the contemporary population Individuals are directly copied to the next generation, setting the maximum number of iterations , when the maximum iteration number is reached, the algorithm terminates;

[0040] Extract the individual with the highest fitness from the final population and obtain four optimal weight coefficients 、 、 、 ;

[0041] Step 1.1.2.4: Construct the actual measurement depth calculation model based on the optimal weight coefficient:

[0042] ;

[0043] in, The actual measured depth.

[0044] Furthermore, the specific process of step 1.2 is as follows:

[0045] Step 1.2.1. First, use a three-axis accelerometer to measure the components of gravity on the X-axis, Y-axis, and Z-axis of the tool coordinate system. 、 、 , and calculate the well inclination angle; then, gyroscope-assisted compensation is performed, using a fiber optic gyroscope to measure the drill string angular velocity, and the accelerometer data is fused through Kalman filtering;

[0046] Step 1.2.2: For the static mode, collect 10 to 20 sets of data using an electronic single-point or multi-point inclinometer. Remove outliers and take the average to output the static wellbore inclination angle. For the dynamic mode, collect accelerometer data in real time, use a low-pass filter to suppress high-frequency vibration, and set the output frequency to 1 to 10 Hz, with an intensification of 10 Hz in critical well sections.

[0047] Step 1.2.3: Perform well inclination correction. First, calibrate the accelerometer scale factor and bias using the six-position method, and calculate the calibrated acceleration measurement. Then, establish a temperature-bias relationship model to compensate for temperature drift:

[0048] ;

[0049] in, is zero bias; 、 、 are the different coefficients of the temperature-bias relationship model; is temperature;

[0050] Finally, correct the well inclination:

[0051] ;

[0052] in, is the well inclination angle after real-time correction; To measure the well inclination; is the eccentricity; is the undeformed length of the drill string;

[0053] Step 1.2.4: Perform a dual accelerometer redundancy check; integrate two sensors in the same probe and trigger a warning when the data difference is greater than 0.05°.

[0054] Furthermore, in step 1.3, the angular velocity of the drill string is measured using a gyroscope method, and the azimuth angle is calculated by integration;

[0055] In step 1.4, the vertical depth is calculated using the minimum curvature method, and then the vertical depth calculation result is corrected according to the formation dip and strike:

[0056] ;

[0057] in, is the corrected vertical depth; is the initial vertical depth; To measure the depth change; is the well inclination angle; is the azimuth; Towards; is the formation dip;

[0058] The specific process of step 1.5 is as follows: first, synchronously obtain the measured depth, well inclination, azimuth and auxiliary parameters, including temperature and vibration; then, use the temperature / magnetic interference compensation algorithm to eliminate outliers; then, calculate the vertical depth, and finally obtain the required wellbore trajectory data.

[0059] Furthermore, the specific process of step 2 is as follows:

[0060] Step 2.1: Calculate the curvature of the wellbore trajectory ;

[0061] Step 2.2, convert the measured depth, vertical depth, well inclination, and azimuth into a three-dimensional rectangular coordinate system; then perform Z-score normalization on the coordinates of the X-axis, Y-axis, and Z-axis;

[0062] Step 2.3: Reconstruct the objective function by minimizing the second-order derivative of curvature:

[0063] ;

[0064] in, 、 、 Respectively 、 、 The curvature value of each point; is the total number of trajectory points;

[0065] Introducing geological factors to dynamically adjust smoothing weights:

[0066] ;

[0067] in, For the Dynamic weight of each point; is the geological factor; For the The stratigraphic mutation index of a point is as follows:

[0068] ;

[0069] Step 2.4: Using the three-point difference method, based on the coordinates of three adjacent points 、 、 , calculate the first point, 、 The local discrete curvature value of the point 、 、 , and then respectively 、 、 Substitute into the formation mutation index formula to obtain the formation mutation index corresponding to the local discrete curvature; when substituted, 、 、 Replaced by 、 、 ; 、 、 Respectively The coordinates of a point on the X-axis, Y-axis, and Z-axis in three-dimensional space; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space;

[0070] Step 2.5, calculate the smoothed curvature value of each point, and adjust the position of the original wellbore trajectory point using the least square method or gradient descent method according to the smoothed curvature value;

[0071] Step 2.6: Construct the optimization objective function to optimize the wellbore trajectory curvature:

[0072] ;

[0073] in, To optimize the objective function; For the The second derivative of curvature at each point; is the fidelity weight.

[0074] Furthermore, the specific process of step 3 is as follows:

[0075] Step 3.1: After step 2, the optimized wellbore trajectory curvature is obtained. The optimized measured depth, vertical depth, well inclination angle, and azimuth angle are obtained through the wellbore trajectory curvature. The coordinates of the wellbore trajectory in three-dimensional space are generated based on these data.

[0076] Step 3.2, calculate the parameters between well sections, including the measured depth change, average well inclination, and average azimuth;

[0077] For every two adjacent points and , calculate the change in measured depth , average well inclination , average azimuth ;

[0078] Step 3.3, calculate the curvature factor and perform dynamic correction of the curvature factor;

[0079] The dogleg degree is calculated based on the well inclination angle, average azimuth angle, and average well inclination angle; then the curvature factor is calculated based on the dogleg degree:

[0080] ;

[0081] in, is the curvature factor; It is a dog-leg degree;

[0082] For the dynamic correction of the curvature factor, a second-order Taylor expansion compensation term is proposed:

[0083] ;

[0084] in, is the curvature factor after dynamic correction;

[0085] Step 3.4, calculate the three-dimensional coordinate increment and reversely correct the coordinates;

[0086] First, the coordinate increments of the wellbore on the X-axis, Y-axis, and Z-axis are calculated based on the curvature factor, measured depth change, average well inclination, and average azimuth. 、 、 ;

[0087] Then, the azimuth jump compensation term is introduced to perform segmented compensation for azimuth mutation:

[0088] ;

[0089] ;

[0090] in, 、 They are 、 The value after compensation; is the azimuth change;

[0091] Finally, the coordinates are reversely corrected using the least squares method, and the formula is:

[0092] ;

[0093] in, is the corrected coordinate; is the original coordinate; is the measured coordinate; To calculate the coordinates; is the dynamic weight factor;

[0094] Step 3.5: Generate three-dimensional coordinates by accumulating increments point by point. The specific formula is as follows:

[0095] ;

[0096] ;

[0097] ;

[0098] in, 、 、 Respectively The three-dimensional coordinates of a point are generated by accumulating increments on the X-axis, Y-axis, and Z-axis; 、 、 Respectively The X-axis, Y-axis, and Z-axis coordinates of a point in three-dimensional space.

[0099] Furthermore, the specific process of step 4 is as follows:

[0100] Step 4.1. Store the 3D coordinate data of the wellbore trajectory generated in Step 3 as a standardized format file and import it into the modeling software for path generation. The specific process is as follows: read and parse the data into a coordinate sequence that can be recognized by the modeling software using the pandas library; then, the modeling software creates a 3D curve object based on the coordinate sequence and defines the curve type as a POLY spline.

[0101] Step 4.2: Define a semicircular section generation function. Dynamically create a semi-closed curve section by inputting the wellbore radius and the number of segments, generating a set of semicircular points. Control the section smoothness by the number of segments. Control the section rotation angle around the path axis by the section inclination parameter. In the modeling software, traverse the path points and set the inclination angle for each point. Convert the angle to radians using the math tool function math.radians() provided by the Python standard library math module. Dynamically and adaptively modify the angle value by inputting external parameters. The section orientation is associated with the wellbore trajectory azimuth, and the angle value is the sum of the azimuth offset and the fixed correction value.

[0102] Step 4.3: Use the Solidify modifier in the modeling software to add the wellbore wall thickness to the wellbore model. The thickness value is dynamically adjusted through program parameter input. The modifier direction is set to positive offset. Convert the curve object to a mesh object and apply smooth shading and subdivision surface algorithms to eliminate geometric jaggedness.

[0103] Step 4.4: Encapsulate the wellbore radius, wellbore wall thickness, and section inclination angle parameters as configurable input items; perform rendering operations based on the Python script of the modeling software to obtain the final wellbore 3D geometric model.

[0104] The beneficial technical effects brought about by the present invention include: through the comprehensive application of multi-sensor collaborative acquisition, multi-source data fusion, genetic algorithm optimization of multi-source data fusion weight coefficients, and dynamic mechanical correction models, the measurement accuracy and anti-interference performance of the core parameters of the wellbore trajectory are significantly improved. Combined with high-precision inertial navigation and redundant verification mechanisms, the accurate calculation of well inclination, azimuth, and vertical depth is achieved. An innovative optimization model based on high-order curvature constraints is constructed, integrating the dynamic adjustment mechanism of geological parameters with the local smoothing algorithm to effectively suppress sudden changes in trajectory curvature and enhance trajectory stability in complex formation sections, significantly reducing the risk of geological structure collision. Curvature factor compensation correction and azimuth sudden change adaptive compensation methods are proposed to significantly improve the coordinate generation accuracy of large curvature well sections, and accurate control of cumulative errors in long-distance well sections is achieved through a reverse closed-loop verification mechanism. Based on programmed parameter association and scripted modeling technology, adaptive dynamic adjustment of wellbore geometric characteristic parameters and efficient generation of three-dimensional models are achieved, significantly improving modeling efficiency and enhancing the real-time interaction between models and engineering data, providing a high-precision, highly adaptable intelligent solution for the digital modeling and full lifecycle management of oilfield wellbores. BRIEF DESCRIPTION OF THE DRAWINGS

[0105] Figure 1 This is a flow chart of a parameter-controlled intelligent oilfield wellbore digital twin modeling method of the present invention.

[0106] Figure 2 It is a three-dimensional curve diagram of wellbore modeling in an embodiment of the present invention.

[0107] Figure 3 This is a comparison diagram of the complete wellbore modeling and the rendering output model in the modeling platform of the present invention; among them, (a) is the rendering output model of the complete wellbore, and (b) is the three-dimensional shape of the complete wellbore.

[0108] Figure 4 It is a comparison diagram of the cross-sectional wellbore modeling and the rendering output model in the modeling platform of the present invention; among them, (c) is the cross-sectional wellbore rendering output model, and (d) is the three-dimensional shape of the cross-sectional wellbore. DETAILED DESCRIPTION

[0109] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0110] Digital twins make full use of data such as physical models, sensors, and operation history, integrate multi-disciplinary, multi-physical, multi-scale, and multi-probability simulation processes, and complete mapping in virtual space, thereby reflecting the entire life cycle of the corresponding physical equipment. The present invention proposes a full-link solution that integrates multi-sensor dynamic correction, curvature optimization algorithm, genetic algorithm optimization, and programmed parameter control. It improves data accuracy through real-time measurement of downhole encoders and dynamic mechanical correction models, reconstructs the objective function based on curvature second-order derivative constraints to suppress trajectory mutations, introduces azimuth jump compensation terms and reverse checkpoint closed-loop mechanisms to optimize coordinate generation, and realizes rapid generation and dynamic adjustment of wellbore models based on scripted parameter control, providing technical support for the construction of intelligent drilling and digital twin platforms, and providing innovative solutions for high-precision modeling and engineering applications of complex wellbore trajectories, thereby providing an efficient and accurate wellbore three-dimensional modeling solution that can meet the needs of complex wellbore trajectory modeling and greatly improve modeling efficiency.

[0111] The core innovation of this invention lies in the use of multi-source data fusion and genetic algorithm to optimize the multi-source data fusion weight coefficient to generate wellbore trajectory data; it proposes the generation of three-dimensional coordinates based on the dynamic correction curvature factor, performs nonlinear correction on the curvature factor through the second-order Taylor expansion compensation term, and combines the two-term compensation algorithm of azimuth mutation to significantly improve the coordinate calculation accuracy of the large curvature well section. In order to solve the problem of cumulative error control, the reverse check point closed-loop correction method is introduced. The geological tolerance verification and abnormal section re-optimization are realized through the comparison of drilling measurement data, ensuring that the modeling error of the long well section can be controlled. In the model construction stage, a programmatic parameter control interface is developed, and geometric features such as wellbore radius, wall thickness, and profile orientation are defined as adjustable variables. The parametric reconstruction of the wellbore three-dimensional model and the enhancement of engineering adaptability are achieved through the dynamic generation of semicircular sections and Solidify topology optimization. This method realizes the seamless connection between drilling engineering data and the three-dimensional modeling platform through a standardized data interface, and uses POLY spline fitting technology to ensure the spatial fidelity of the wellbore trajectory. An innovative parameterized tilt adjustment mechanism dynamically maps azimuth offsets to profile orientation control, supporting directional drilling requirements under complex geological conditions. The model output stage is compatible with multiple industry-standard formats such as STL and OBJ, and features real-time rendering and virtual reality interaction capabilities. This provides a high-precision digital twin for drilling plan optimization, wellbore integrity analysis, and accident warning. It offers key support for intelligent drilling, digital oilfield construction, and geological guidance technology, reducing single-well costs while adapting to extreme trajectories, demonstrating outstanding engineering value in complex well types. This method reduces manual intervention, is applicable to wells, and possesses strong scalability. It can be widely applied to other types of 3D modeling, such as modeling underground structures like mines and tunnels, possessing significant technical advantages and broad application prospects.

[0112] like Figure 1 As shown, a parameter-controlled intelligent oilfield wellbore digital twin modeling method includes the following steps:

[0113] Step 1. Collect information related to wellbore trajectory data: Through the comprehensive application of ground accumulation, real-time measurement of downhole encoders and dynamic mechanical correction models, combined with the multi-sensor collaboration of accelerometers, magnetometers and gyroscopes, the core parameters of the wellbore trajectory (measurement depth, vertical depth, well inclination, azimuth) are obtained to achieve improved measurement accuracy. The wellbore trajectory data is generated by adopting the multi-source data fusion method and genetic algorithm to optimize the multi-source data fusion weight coefficient. Wellbore trajectory data acquisition is the core part of the downhole measurement process, involving the acquisition and recording of multiple measurement parameters. Usually, multiple instruments and measurement methods are used to ensure the accuracy and reliability of the data. The specific process is as follows:

[0114] Step 1.1: Measure the measured depth by integrating surface accumulation, downhole real-time displacement monitoring, and dynamic mechanical correction. The measured depth (MD) is the cumulative length from the wellhead to the measurement point along the actual wellbore trajectory. Its accurate measurement is the basis for wellbore trajectory control. This method uses multi-source data fusion and genetic algorithms to calculate the actual measured depth. The specific process is as follows:

[0115] Step 1.1.1. Obtain multi-source data, including initial measurement depth, downhole displacement, tension / compression, and thermal expansion;

[0116] First, perform an initial accumulation of drill string length on the ground; use the ground winch sensor to record the number of drill rods lowered and the length of each drill rod (9.5m or 12m) in real time to calculate the initial measurement depth. ; The formula is:

[0117] ;

[0118] in, is the number of drill pipes lowered; For the Length of drill rod;

[0119] Then, real-time displacement monitoring is carried out downhole; the number of drill string rotations is measured using a PWD tool with a built-in wheel or optical encoder. and drill string diameter , real-time calculation of downhole displacement ; The formula is:

[0120] ;

[0121] Finally, dynamic mechanical correction is performed; dynamic mechanical correction includes elastic deformation correction and temperature expansion correction;

[0122] Among them, the stretch / compression of the drill string under axial force is calculated based on Hooke's law , perform elastic deformation correction, the formula is:

[0123] ;

[0124] in, The axial force of the drill string is calculated by the downhole tension sensor or the surface hook load; is the undeformed length of the drill string; is the elastic modulus of drill steel (about 200 GPa); is the cross-sectional area of ​​the drill string;

[0125] Calculate thermal expansion based on downhole temperature sensor data , perform temperature expansion correction, the formula is:

[0126] ;

[0127] in, is the thermal expansion coefficient of drill steel; It is the temperature difference between the underground and the ground, obtained by the underground temperature sensor.

[0128] Step 1.1.2: Perform multi-source data fusion and use genetic algorithms to optimize the weight coefficients of multi-source data fusion to build a calculation model for actual measurement depth. The specific process is as follows:

[0129] Step 1.1.2.1: The collected initial measurement depth, downhole displacement, tension / compression, and thermal expansion are combined into a training sample set. ,in, For the samples, is the total number of samples; The samples contain Initial measurement depth of samples , Downhole displacement , tension / compression , thermal expansion , and the corresponding weight coefficients are 、 、 、 .

[0130] Step 1.1.2.2: Obtain high-precision reference measurement depth corresponding to the training sample set through high-precision measurement methods or geological calibration points ,in For the The reference measurement depth of each sample.

[0131] Step 1.1.2.3, optimize the weight coefficient using genetic algorithm;

[0132] For encoding and initialization, real number encoding is used to represent weight coefficients 、 、 、 , randomly generate the initial population , For the Individuals, is the total number of individuals; each individual represents a set of candidate weight coefficients, and the initial weight coefficients are randomly generated in the interval [[0,1]. Ensure that each individual in the initial population meets the constraints + + + =1 and , is the weight coefficient number, .

[0133] For fitness evaluation, calculate the first The actual measured depth of the samples:

[0134] ;

[0135] in, For the population The corresponding individual The actual measured depth of each sample; 、 、 、 For the The four weight coefficients contained in each individual;

[0136] According to The reference measurement depth of the sample, The corresponding individual The actual measured depth of the samples is calculated using the negative value of the mean absolute error. The fitness value of each individual ; The formula is:

[0137] ;

[0138] For the selection operation, based on the fitness value, the roulette wheel method is used to select high-quality individuals. The probability of an individual being selected Proportional to its fitness:

[0139] ;

[0140] in, For the The fitness value of each individual; is the total number of individuals when summing;

[0141] For the crossover operation, the selected individuals are paired for crossover operation to generate new individuals. The arithmetic crossover method is used. For the selected parent individuals and , generating offspring and :

[0142] ;

[0143] ;

[0144] in, is the cross coefficient, which is usually a random number in the interval [0,1].

[0145] For mutation operation, the mutation probability is preset Perform mutation operation on individuals, and select the mutation Individual , randomly select the weight coefficients for small perturbations:

[0146] ;

[0147] in, For the The individual's Weight coefficients; After mutation The individual's Weight coefficients; is a random disturbance that obeys Gaussian distribution;

[0148] For normalization processing, after crossover and mutation, New individuals , perform weight normalization to ensure that the constraints are met:

[0149] ;

[0150] in, After normalization The individual's Weight coefficients; After mutation The individual's A weight coefficient.

[0151] Set the number of elites to be retained , the most fit species in the contemporary population Individuals are directly copied to the next generation to ensure that high-quality genes are not lost. Set the maximum number of iterations , which usually ranges from 100 to 500. When the maximum number of iterations is reached, the algorithm terminates.

[0152] Extract the individual with the highest fitness from the final population and obtain four optimal weight coefficients 、 、 、 ;

[0153] Step 1.1.2.4: Construct the actual measurement depth calculation model based on the optimal weight coefficient:

[0154] ;

[0155] in, is the actual measured depth;

[0156] Step 1.1.3: Apply the actual measured depth calculation model to the newly acquired multi-source measurement data to calculate the high-precision actual measured depth.

[0157] Step 1.1.4, error sources and error control;

[0158] Impact of drill tool assembly: The length of non-magnetic drill collar is not included in the drill pipe accumulation and its length needs to be added manually; Downhole environmental interference: The friction resistance of the well wall causes the actual movement of the drill string to lag behind the surface record, which needs to be corrected by the friction resistance model; Data synchronization error: The delay in data transmission between the surface and downhole leads to timestamp deviation. High-speed electromagnetic wave transmission (instead of mud pulse) is required to reduce the delay and ensure the synchronization of surface and downhole data; Real-time reverse calibration: At the casing shoe or formation interface of known depth, the measured depth is reverse calibrated using LWD (logging while drilling) data.

[0159] Step 1.2: Measure the inclination angle. The inclination angle is the angle between the wellbore axis and the vertical line (0° to 90°). Its accurate measurement is the core of wellbore trajectory control. The inclination angle is measured by combining dual accelerometer redundancy check and gyroscope auxiliary compensation. The specific process is as follows:

[0160] Step 1.2.1, multimodal sensor integration and data acquisition;

[0161] Well inclination measurement is based on the component decomposition of the gravity field in the tool coordinate system, and is mainly achieved by accelerometers. Accelerometer orthogonal measurement: a three-axis accelerometer is used to measure the components of gravity in the tool coordinate system X-axis, Y-axis, and Z-axis respectively. 、 、 , and calculate the well inclination . Well inclination angle The calculation formula is:

[0162] ;

[0163] When the wellbore is completely vertical ( ), the gravity acts entirely on the Z axis, and the acceleration components of the X and Y axes are zero, that is, g, ; When the wellbore is horizontal ( ), the Z-axis component is zero, and gravity acts entirely on the X-axis or Y-axis, that is, , or g.

[0164] Next is gyroscope-assisted compensation, which uses a fiber optic gyroscope (FOG) to measure the angular velocity of the drill string and fuses the accelerometer data through Kalman filtering to suppress dynamic noise.

[0165] Step 1.2.2, static and dynamic measurements;

[0166] In static mode (while drilling), drilling is stopped for 5 minutes or longer. An electronic single-shot or multi-shot inclinometer collects 10 to 20 sets of data, removes outliers, and takes the average to output the static wellbore inclination angle with an accuracy of ±0.02°. In dynamic mode (while drilling), accelerometer data is collected in real time and filtered through a low-pass filter (cutoff frequency 1 to 5 Hz) to suppress high-frequency vibrations. The output frequency is set to 1 to 10 Hz, with an intensification of 10 Hz in critical sections.

[0167] Step 1.2.3, calibration and error compensation;

[0168] Six-position calibration: Calibrate the accelerometer scale factor and zero bias in a zero-gravity laboratory, and calculate the calibrated acceleration measurement value. The formula is:

[0169] ;

[0170] ;

[0171] ;

[0172] in, 、 、 They are 、 、 The acceleration measurement value after calibration; 、 、 They are 、 、 The accelerometer scale factor of 、 、 They are 、 、 Zero bias;

[0173] Temperature drift compensation: High temperature causes the accelerometer's zero bias to drift, so a temperature-zero bias relationship model needs to be established:

[0174] ;

[0175] in, is zero bias; 、 、 are the different coefficients of the temperature-bias relationship model; is temperature;

[0176] The zero bias is corrected in real time through the downhole temperature sensor.

[0177] Eccentricity error correction: If the accelerometer deviates from the drill string axis, the well inclination angle is corrected by the geometric formula:

[0178] ;

[0179] in, is the well inclination angle after real-time correction; To measure the well inclination; is the eccentricity; is the undeformed length of the drill string.

[0180] Step 1.2.4, dual accelerometer cross-validation (dual accelerometer redundancy check);

[0181] Integrate dual sensors in the same probe, triggering a warning when the data difference is greater than 0.05°;

[0182] Step 1.2.5, gravity field consistency monitoring;

[0183] Real-time calibration of the accelerometer output vector sum, when it deviates from 1g±5%, it is marked as abnormal data; vector sum The formula is:

[0184] ;

[0185] Step 1.2.6, Error sources and error control;

[0186] Sensor zero drift: The cause is that high temperature causes the performance of electronic components to degrade, resulting in a typical error range °~ °; Dynamic vibration noise: caused by drill string rotation and downhole tool vibration, resulting in an error range ° (without filtering); Installation tilt: The cause is the misalignment between the accelerometer and the drill string axis, resulting in an error range of The error control measures include multi-point static calibration: drilling stops every 300-500 meters to conduct static measurements and calibrate the drilling data; redundant sensor design: dual accelerometers are placed in the same probe to cross-validate data consistency; and real-time quality control: monitoring the accelerometer output range (should be close to 1g) and triggering warnings when it exceeds the limit.

[0187] Step 1.3: Measure the azimuth. The azimuth is the angle between the projection of the wellbore axis on the horizontal plane and the reference direction (magnetic north or true north). Its accurate measurement is crucial for controlling the horizontal projection of the wellbore trajectory.

[0188] The gyroscope method is used for measurement. Its principle is based on the Sagnac effect (phase difference of light in a rotating ring). Fiber optic gyroscope (FOG) or laser gyroscope (RLG) measures the angular velocity of the drill string and calculates the azimuth by integration. The formula is:

[0189] ;

[0190] in, is the initial azimuth (obtained through ground calibration or GPS); is the drill string angular velocity; 、 The time between two calibrations when calculating the time boundary of the azimuth angle; For time. Tool type is gyro inclinometer: high precision ( °), suitable for cased wells and high-latitude areas (magnetic inclination > 75°); Inertial Navigation System (INS): integrates gyroscopes and accelerometers to achieve fully autonomous azimuth solution.

[0191] Tool type is gyro inclinometer: high precision ( °), suitable for cased wells and high-latitude areas (magnetic inclination > 75°); Inertial Navigation System (INS): integrates gyroscopes and accelerometers to achieve fully autonomous azimuth solution.

[0192] The gyroscope method is resistant to magnetic interference and suitable for complex environments. However, its high cost and the need for regular bias calibration to suppress cumulative errors are minor drawbacks. Gyroscope bias drift is caused by temperature changes or mechanical vibrations that cause gyro output offsets. Control measures include hourly drill stop and zero-bias calibration. Scale factor error is caused by gyro sensitivity varying with temperature and pressure. Control measures include laboratory calibration of the temperature-scale factor curve. Installation misalignment is caused by the deviation between the gyro axis and the drill string axis. Control measures include a mechanical stabilizer and software eccentricity compensation.

[0193] Step 1.4: Calculate vertical depth. True vertical depth (TVD) is the vertical projection depth of a measured point on the wellbore trajectory relative to sea level or a reference datum. Since TVD cannot be measured directly, it must be calculated using a geometric model based on well inclination, azimuth, and measured depth.

[0194] Step 1.4.1, multi-source data collection and preprocessing;

[0195] Basic parameter well inclination :Measured by high-precision quartz accelerometer, static correction and Kalman filtering to eliminate dynamic noise; azimuth : From the magnetometer or gyroscope, magnetic interference correction is required; measured depth: the actual length after elastic deformation and temperature correction.

[0196] Auxiliary data: Formation dip and strike: extracted in real time through resistivity imaging while drilling (LWD); Tool tilt angle: statically calibrated through a downhole three-axis accelerometer.

[0197] Step 1.4.2, calculation principle and geometric model;

[0198] The calculation of TVD requires projecting the 3D wellbore trajectory to the vertical direction. The algorithm that can be used for this is the minimum curvature method. The minimum curvature method assumes that the wellbore trajectory between adjacent measuring points is an arc with a constant curvature radius. The geometric model is as follows:

[0199] ;

[0200] in, is the vertical depth change; To measure the depth change; is the well inclination angle of the current point (referring to the current measuring point); is the well inclination angle of the next point; Dogleg Severity, unit: ° / 30m;

[0201] Step 1.4.3, formation anisotropy correction;

[0202] Correct the TVD calculation results according to the formation dip and strike:

[0203] ;

[0204] in, is the corrected vertical depth; is the initial vertical depth; is the formation dip; Towards; is the azimuth;

[0205] Step 1.4.4, tool tilt compensation and gravity field calibration;

[0206] First, the inclination angle is corrected. If there is an installation inclination angle between the tool axis and the wellbore axis, , the gravity component needs to be corrected.

[0207] Calibration method: Perform static multi-point measurements in the vertical well section to calibrate the tool tilt error.

[0208] Step 1.4.5, Error sources and error control;

[0209] Accumulated error of well inclination: the cause is accelerometer zero drift and vibration noise; model assumption error, caused by the minimum curvature method ignoring high-order curvature terms, resulting in error dogleg The error is significant when the depth is >30° / 30m; the formation dip is ignored: the cause is the uncorrected formation anisotropy. The error control measures are multi-point calibration: reverse calibration of TVD at the formation interface with known vertical depth; model switching: vertical well section (dogleg degree) <5° / 30m) using the average angle method, the inclined section (dogleg >5° / 30m) switches to the minimum curvature method, and complex trajectories use spline interpolation. Data fusion: Combines seismic while drilling (SWD) or adjacent well data to constrain TVD calculation results.

[0210] Step 1.5, comprehensive generation of wellbore trajectory data;

[0211] Step 1.5.1, data fusion process;

[0212] Raw data acquisition: synchronous acquisition of MD, well inclination, azimuth and auxiliary parameters (temperature, vibration).

[0213] Error preprocessing: Eliminate outliers (such as vibration out-of-limit data) and apply temperature / magnetic interference compensation algorithms.

[0214] Spatial coordinate calculation: Substitute the corrected parameters into the minimum curvature algorithm model and calculate the north coordinate (N), east coordinate (E), and vertical depth (TVD) point by point.

[0215] Trajectory visualization: Generate a 3D wellbore trajectory map and overlay the geological model for comparison with the designed target area.

[0216] Step 1.5.2, quality control standards;

[0217] API RP 59 specification: Well inclination error ≤ °, azimuth error ≤ ° (magnetometer) or ° (gyroscope). Closure error check: Calculate the spatial position closure error by adjacent measurement segments, and the requirement is ≤0.5% TVD.

[0218] Step 2. Optimize and smooth the curvature of the wellbore trajectory based on the minimum curvature principle: Process the wellbore trajectory parameters through three-dimensional coordinate transformation and standardization, reconstruct the objective function based on the curvature second-order derivative constraint, introduce geological factors to dynamically adjust the smoothing weight, suppress high-frequency noise while retaining geological characteristics, use local differential calculation and weighted average algorithm to suppress curvature mutations, and finally verify the trajectory smoothness through curvature gradient root mean square evaluation and anti-interference test; the core idea of ​​the minimum curvature algorithm is to achieve smooth fitting and precise coordinate calculation of the wellbore trajectory by constructing a three-dimensional space arc with the minimum curvature between adjacent measuring points. Its essence is to minimize the local curvature of the trajectory while satisfying the measurement data constraints, so as to more realistically reflect the actual drilling path. The specific process is:

[0219] Step 2.1, curvature and trajectory parameters;

[0220] Calculating trajectory curvature , the formula is:

[0221] ;

[0222] in, is the parameter variable of the curve, which represents the position parameter of the trajectory point; 、 The curves are The first derivative (velocity vector) and second derivative (acceleration vector) of For curve The coordinates of the points on 、 、 Represents the position function of the curve in the X-axis, Y-axis, and Z-axis directions respectively. Represents the cross product operation. This formula represents the curvature of a curve at a certain point. The larger the value, the greater the curvature of the curve at that point.

[0223] The original wellbore trajectory data mainly includes the following key parameters:

[0224] Measured Depth (MD): The cumulative depth of the wellbore along the drill path during drilling, usually measured in meters or feet.

[0225] Vertical depth (VD): The vertical depth from the ground to a certain point in the wellbore, indicating the vertical position of the wellbore.

[0226] Inclination: The angle at which the wellbore deviates from the vertical direction, usually a positive value, indicating the degree of inclination of the wellbore.

[0227] Azimuth: The angle of the wellbore on the horizontal plane relative to true north, usually expressed in degrees.

[0228] The original parameters (measured depth, vertical depth, well inclination, and azimuth) are converted into a three-dimensional rectangular coordinate system; the coordinates of the X-axis, Y-axis, and Z-axis are normalized by Z-score to eliminate the impact of dimensional differences on curvature calculation.

[0229] Step 2.2, three-dimensional coordinate mapping and data standardization;

[0230] Convert the original parameters (measured depth, vertical depth, well inclination, azimuth) into a three-dimensional rectangular coordinate system:

[0231] ;

[0232] ;

[0233] ;

[0234] in, 、 、 Respectively The coordinates of a point on the X-axis, Y-axis, and Z-axis in three-dimensional space; It is The measured depth of each point; It is The well inclination angle of each point; It is The azimuth of a point; It is The vertical depth of a point.

[0235] Perform Z-score normalization on the X-axis, Y-axis, and Z-axis coordinates to eliminate the impact of dimensional differences on curvature calculation:

[0236] ;

[0237] ;

[0238] ;

[0239] in, 、 、 Respectively The normalized coordinates of a point in three-dimensional space on the X, Y, and Z axes; 、 、 are the means of the X-axis, Y-axis, and Z-axis coordinates respectively; 、 、 are the standard deviations of the X-axis, Y-axis, and Z-axis coordinates, respectively.

[0240] Step 2.3, objective function reconstruction and dynamic weight;

[0241] For curvature acceleration constraints, the method of the present invention minimizes the second-order derivative of curvature, reconstructs the objective function, and suppresses curvature mutations:

[0242] ;

[0243] in, 、 、 Respectively 、 、 The curvature value of each point; is the total number of trajectory points;

[0244] Compared to traditional methods that minimize curvature values, this model eliminates high-frequency oscillations by constraining the acceleration of curvature changes, which is superior to conventional low-pass filtering or average weighting. This optimization process minimizes curvature changes and thus achieves data smoothing.

[0245] Adaptive dynamic smoothing weights for geological complexity:

[0246] ;

[0247] in, For the Dynamic weight of each point; It is a geological factor. The adjustment smoothing strength is a quantitative indicator of geological complexity. It integrates parameters such as rock hardness, formation dip, pore pressure, etc. to dynamically adjust the curvature smoothing strength.

[0248] For the The formation mutation index of each point is a quantitative indicator of the degree of local formation mutation in the wellbore trajectory, reflecting the abnormal changes in some parameters such as curvature, lithology, and formation dip. The formation mutation index is calculated by the curvature gradient method through the curvature change rate of adjacent measuring points:

[0249] ;

[0250] Step 2.4: local discrete curvature calculation and mutation detection;

[0251] By three-point difference method, based on the coordinates of three adjacent points 、 、 , calculate the local discrete curvature:

[0252] ;

[0253] in, For the The local discrete curvature value of each point; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space;

[0254] According to the formula of local discrete curvature, the 、 、 The local discrete curvature value of the point 、 、 , and then respectively 、 、 Substitute the above formation mutation index formula to obtain the formation mutation index corresponding to the local discrete curvature; when substituted, 、 、 Replaced by 、 、 .

[0255] Then, based on historical data statistics or engineering experience, a threshold for determining the mutation segment is set. The marking rules are as follows: for a single-point mutation, if the mutation index is greater than the mutation segment threshold, it is marked as a high-risk point; for continuous mutations, if the mutation index of multiple adjacent points is greater than the mutation segment threshold, it is marked as a high-risk point.

[0256] Step 2.5, curvature smoothing and constrained optimization;

[0257] Curvature smoothing: After calculating the local discrete curvature of each point, use weighted averaging or smoothing filtering algorithms to smooth the curvature value. By adjusting the curvature value of each point, high-frequency fluctuations in the curve are reduced. The formula for the weighted averaging method is:

[0258] ;

[0259] in, For the The curvature value after smoothing of each point is used to suppress local noise or mutation; For the The local discrete curvature value of each point is calculated using the calculation formula of the local discrete curvature in step 2.3; For the The dynamic weight of each point, obtained in step 2.2, is usually inversely proportional to the distance between the data points; is the window size, which controls the smoothing range.

[0260] Then, constrained optimization is solved and the optimization objective function is constructed to optimize the wellbore trajectory curvature:

[0261] ;

[0262] in, To optimize the objective function; For the The second derivative of curvature at each point is approximated by central difference; Fidelity weights balance smoothness and data fit.

[0263] Step 3: Accurately generate and dynamically correct 3D coordinates based on the minimum curvature algorithm: Based on the processed optimized data, the second-order Taylor expansion compensation term of the dynamically corrected curvature factor is used to address the error problem of the traditional minimum curvature method in large curvature sections. The 3D coordinate increment is calculated in combination with the azimuth angle mutation compensation term. A reverse checkpoint closed loop is used to suppress cumulative errors. Geological tolerances are verified through measurement while drilling. Reoptimization is triggered for abnormal sections, and standardized 3D coordinate data is ultimately output. The specific process is as follows:

[0264] Step 3.1, initialize coordinates;

[0265] After step 2, the optimized wellbore trajectory curvature is obtained. The wellbore trajectory curvature has reduced measurement errors and irregular fluctuations, ensuring the smoothness and accuracy of the trajectory. The optimized parameter data is obtained through the wellbore trajectory curvature, including:

[0266] Optimized measurement depth: used to calculate the relative position of the wellbore.

[0267] Optimized vertical depth: the depth of the wellbore in the vertical direction.

[0268] Optimized well inclination angle: the angle at which the wellbore deviates from the vertical direction.

[0269] Optimized azimuth: the angle between the wellbore and the north direction.

[0270] These data are further calculated and converted to generate the coordinates of the wellbore in three-dimensional space. Calibration is performed on the global coordinate system, with the drilling platform location as the origin (0, 0, 0), to ensure the mapping consistency between the three-dimensional coordinates and the geographic coordinate system.

[0271] Step 3.2, calculate the parameters between well sections;

[0272] For every two adjacent points and , the measured depth change is calculated by subtracting the measured depth of two adjacent points , the measured depth variation represents the depth difference between two adjacent measurement points; the formula is:

[0273] ;

[0274] in, 、 Respectively 、 The measured depth of the point is the actual depth of the wellbore. The next point is the The point is the current point;

[0275] The well inclination angle indicates the inclination of the wellbore relative to the vertical direction. The average well inclination angle is calculated as the average well inclination angle of two adjacent points. ; The formula is:

[0276] ;

[0277] in, and Respectively represent Point and The well inclination angle of each point.

[0278] The azimuth indicates the direction of the wellbore relative to the geographic North Pole. The average azimuth of two adjacent points is calculated as the average azimuth. , is the average of the azimuths of two adjacent points; the formula is:

[0279] ;

[0280] in, and Respectively represent Point and The azimuth of a point.

[0281] Step 3.3, calculating the curvature factor and performing dynamic correction of the curvature factor;

[0282] Dogleg indicates the degree of curvature of the wellbore trajectory and is typically used to quantify the turning angle between two points. Its calculation takes into account changes in well inclination and azimuth, quantifying the trajectory curvature between adjacent measurement points and avoiding local mutations. A larger dogleg value indicates a sharper turn in the wellbore. The formula for calculating dogleg is:

[0283] ;

[0284] The curvature factor is used to indicate the amount of wellbore curvature, with larger values ​​indicating greater curvature. It is directly related to the dogleg degree, and the traditional calculation formula is as follows:

[0285] ;

[0286] in, is the curvature factor; if the dogleg degree is small, the curvature factor value is close to 1. The error is significant when >30°.

[0287] The method of the present invention proposes a second-order Taylor expansion compensation term for the dynamic correction of the curvature factor:

[0288] ;

[0289] in, is the curvature factor after dynamic correction;

[0290] After correction, =50°, the error is reduced from 12% to 0.7%, significantly improving the accuracy of the large curvature section.

[0291] Step 3.4: Coordinate increment calculation and error control; the specific process is as follows:

[0292] Step 3.4.1, coordinate increment calculation model;

[0293] Based on the dynamically corrected curvature factor value, the three-dimensional coordinate increment is calculated. The specific formula is as follows:

[0294] ;

[0295] ;

[0296] ;

[0297] in, 、 、 Respectively represent the coordinate increments of the wellbore on the X-axis, Y-axis, and Z-axis, according to the curvature factor and the measured depth difference , average well inclination and the mean azimuth To calculate.

[0298] Step 3.4.2, segmented compensation for azimuth angle mutation;

[0299] The traditional formula is different when the azimuth angle suddenly changes ( 45°), The calculation is prone to jump errors. The method of the present invention is improved by introducing the azimuth jump compensation term:

[0300] ;

[0301] ;

[0302] in, 、 They are 、 The value after compensation; is the azimuth change;

[0303] After compensation, the coordinate jump error in the azimuth angle mutation section can be reduced.

[0304] Step 3.4.3, cumulative error closed-loop suppression;

[0305] Insert the checkpoints and insert the reverse checkpoints every 10 measuring points. Use the least squares method to reversely correct the previous coordinates to ensure that the cumulative error of the long well section is less than 0.1%. The formula is:

[0306] ;

[0307] in, is the corrected coordinate; is the original coordinate; is the measured coordinate; To calculate the coordinates; is a dynamic weight factor, which is adaptively adjusted according to the error amplitude.

[0308] Step 3.5: Generate and verify high-precision coordinates;

[0309] According to the coordinate increment obtained in the previous step, the three-dimensional coordinates of each data point are updated, that is, the increments are accumulated point by point to generate the three-dimensional coordinates. The specific formula is as follows:

[0310] ;

[0311] ;

[0312] ;

[0313] in, 、 、 Respectively The three-dimensional coordinates of a point are generated by accumulating increments on the X-axis, Y-axis, and Z-axis; 、 、 Respectively The X-axis, Y-axis, and Z-axis coordinates of a point in three-dimensional space.

[0314] Based on geological compatibility verification and actual drilling data comparison, the generated coordinates are compared with the measurement while drilling (LWD) data. If the deviation exceeds the geological tolerance, the abnormal section is automatically marked and step 2 re-optimization is triggered.

[0315] Step 4: Use the minimum curvature algorithm to process the generated three-dimensional coordinate data of the wellbore trajectory to perform parameter-driven wellbore geometry modeling, so as to achieve parameterized adjustment of the wellbore radius, wellbore wall thickness, and section inclination angle, realize structural optimization, and finally output the corresponding three-dimensional wellbore geometry model. The specific process is as follows:

[0316] Step 4.1: Import the 3D coordinate data of the wellbore trajectory and generate the path; the specific process is as follows:

[0317] Step 4.1.1. Store the 3D coordinate data generated in Step 3 as a standardized format file. For example, use a Python script to save the 3D coordinate data as an Excel file. The exported table contains three columns of data, corresponding to the X-axis, Y-axis, and Z-axis coordinates of each trajectory point, for further use or analysis. Import the standardized format file into a modeling standardized format file (such as the open-source 3D engine Blender modeling software) for path generation. Subsequently, parameterize the wellbore geometric properties (wellbore radius, wellbore wall thickness, and profile inclination angle) and combine curve construction, section adaptation, and thickness enhancement techniques to generate a dynamically adjustable 3D wellbore model.

[0318] Blender's Python script extracts 3D coordinates into Blender by reading data stored in an Excel spreadsheet. To ensure data integrity and accuracy, the script first opens and parses the Excel file, extracting columns containing X-, Y-, and Z-axis coordinates. Each coordinate point is stored as a Python list or array for subsequent modeling operations. The specific process for importing data includes the following steps:

[0319] Open and read Excel files: Load Excel files through Python libraries (openpyxl or pandas) and read the coordinate data in the table.

[0320] Extract coordinate data: Extract three columns of data from the Excel spreadsheet, representing the X-axis, Y-axis, and Z-axis coordinates of the track point. Each row of data represents the spatial position of a track point.

[0321] Data validation and formatting: Ensures that the read data is correct and complies with format requirements. If there are any data anomalies (such as missing or invalid data), clean and supplement them.

[0322] Step 4.1.2: Path generation; the specific process is as follows:

[0323] Data interface construction: The 3D coordinate data of the wellbore trajectory (measured depth difference, vertical depth, average well inclination, and azimuth) output in step 3 is stored in a standardized format (Excel, CSV). The data is read and parsed into a coordinate sequence that can be recognized by the modeling software using the pandas library.

[0324] 3D path generation: Create a 3D curve object based on the coordinate sequence and define the curve type as POLY spline to ensure that the path strictly fits the wellbore trajectory data.

[0325] The key parameters are curve dimension: 3D (supports curved paths in space); homogeneous coordinates: each coordinate point is written in the format of (x, y, z, 1) to ensure geometric transformation compatibility.

[0326] Step 4.2: Parametric control and adaptive inclination of wellbore sections;

[0327] Dynamic generation of semicircular sections: Define a semicircular section generation function, dynamically create a semi-closed curve section by inputting parameters radius (wellbore radius) and segments (number of segments), and generate a semicircular point set; the number of segments controls the smoothness of the section, and the larger the value, the finer the geometric details.

[0328] Parametric adjustment of profile orientation: The tilt (profile inclination angle) parameter is used to control the rotation angle of the section around the path axis to achieve directional adjustment of the wellbore profile.

[0329] Technical Implementation: In the open-source 3D engine Blender, path points are traversed and the tilt angle (point.tilt = math.radians(angle)) is set for each point. The math.radians() function, provided by the Python standard library math module, implements standardized conversion from angles to radians, ensuring precise control of wellbore cross-sectional orientation in 3D modeling and meeting the parametric modeling requirements of the modeling software. The angle value (angle) can be dynamically and adaptively modified using external parameter input. The cross-sectional orientation is linked to the azimuth of the wellbore trajectory to support geosteering requirements. The angle value is the sum of the azimuth offset and the fixed correction value (angle = azimuth offset + fixed correction value).

[0330] Step 4.3: Wellbore geometric property enhancement and structural optimization;

[0331] Parametric control of wellbore wall thickness: The Solidify modifier in the open source 3D engine Blender software is used to add wellbore wall thickness to the wellbore model. The thickness value is dynamically adjusted through program parameter input.

[0332] Technical Details: The modifier direction is set to a positive offset (offset=1) to ensure that the thickness extends along the cross-section normal. The thickness parameter is dynamically linked to the wellbore engineering requirements.

[0333] Model topology optimization: Convert curve objects to mesh objects, apply smooth shading and subdivision surface algorithms, and eliminate geometric jaggedness.

[0334] Step 4.4: Model output and parameterized interface packaging;

[0335] After modeling, optimizing, and setting materials, Blender's Python script performs rendering, presenting the final 3D model as a high-quality image or animation. Camera angle, light intensity, and shadow effects are set as needed to ensure the rendering is realistic. Blender supports multiple rendering engines, and you can choose the appropriate one based on your needs. The rendering process involves the following aspects:

[0336] Parametric interface design: Encapsulates wellbore radius (radius), wellbore wall thickness (thickness), and profile inclination angle (tilt) parameters as configurable input items, supporting user adjustment through the GUI or configuration files.

[0337] Model Output and Compatibility: After rendering, the results are saved as image or video files. These files can be used for project presentations, reports, and virtual reality (VR) or augmented reality (AR) applications. Export File Formats: If the model is needed for further engineering design or analysis, the Blender script also supports exporting the generated 3D model to standard 3D file formats such as STL, OBJ, and FBX for further processing and analysis.

[0338] Resource cleanup and efficiency optimization: Automatically delete temporarily generated auxiliary objects (such as semicircular cross-section curves) to reduce memory usage.

[0339] The present invention optimizes and processes wellbore trajectory data through a minimum curvature algorithm to perform programmed parameter-controlled cross-sectional wellbore modeling. That is, the geometric features of the wellbore model are defined as adjustable variables through programming, and the parameters and model are dynamically associated and the model is automatically generated based on script code, thereby providing an efficient and accurate wellbore three-dimensional modeling solution and significantly improving the efficiency of wellbore modeling.

[0340] In order to demonstrate the feasibility and superiority of the present invention, the following examples are given.

[0341] This example primarily studies and experiments a parameter-controlled intelligent oilfield wellbore digital twin modeling method, verifying its effectiveness. Taking Well-001 in an oilfield as an example, the raw data contained 90 sets of wellbore trajectory parameters (measured depth, vertical depth, inclination, azimuth, and total displacement). By using multi-sensor fusion and a dynamic mechanical correction model to eliminate the effects of drillstring vibration and magnetic interference, the correction reduced the inclination and azimuth errors to ±0.5° and ±1.0%, respectively. Subsequently, a second-derivative curvature dynamic smoothing algorithm, combined with dynamic weighting of geological complexity, achieved significant optimization results for the fault zone segment (measured depth 1500-1800m). By applying dynamic curvature factor correction and compensating for sudden azimuth changes, 90 sets of high-precision 3D coordinates were generated, keeping the cumulative error within 0.08% of the measured depth for the long well segment. A Blender-based Python script implements procedural modeling. The wellbore radius is adjusted dynamically based on the formation, and the profile orientation sets the inclination angle (tilt = −73°) and wall thickness based on the mean azimuth. The model is then exported after enhancement using the Solidify modifier. This shortens the modeling cycle and improves efficiency. Actual drilling comparisons show an absolute coordinate error of ≤0.3% of the measured depth. This example demonstrates the method's high precision, adaptability, and engineering practicality in complex trajectory modeling, providing reliable technical support for intelligent drilling and digital oilfield development. This invention achieves automated modeling, providing an efficient and accurate wellbore 3D modeling solution and significantly improving wellbore modeling efficiency.

[0342] Figure 2 This is a 3D graph of the wellbore modeling in an embodiment of the present invention. This graph depicts the 3D spatial path of the wellbore trajectory. This graph, optimized using the minimum curvature algorithm, clearly depicts the wellbore's curved shape, reflecting changes in the wellbore at different depths and ensuring the accuracy of the wellbore modeling.

[0343] Figure 3 Comparison diagram of the complete wellbore modeling and rendered output model in the modeling platform Blender of the present invention, Figure 3 The image (b) shows the complete 3D shape of the wellbore modeled in Blender, while (a) shows the final effect after rendering. Figure 4 This is a comparison diagram of the cross-section wellbore modeling and the rendering output model in the modeling platform Blender of the present invention. Figure 4 The image (d) shows the 3D shape of the cross-section wellbore modeled in Blender, while (c) shows the final effect after rendering. Figure 3 and Figure 4It can be seen that through Blender's Python programming interface, the original three-dimensional coordinate data was successfully converted into visual complete wellbore and cross-sectional wellbore models, further optimizing the modeling process. The rendering results presented the true shape of the wellbore, facilitating further engineering analysis and application.

[0344] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.

Claims

1. A parameter-controlled intelligent oilfield wellbore digital twin modeling method, characterized in that: The steps include: Step 1: Generate wellbore trajectory data by multi-source data fusion, where the wellbore trajectory data includes measured depth, well inclination, azimuth, and vertical depth; when generating measured depth, a genetic algorithm is used to optimize the multi-source data fusion weight coefficient; Step 2: Based on the minimum curvature principle, the wellbore trajectory curvature is optimized, with minimizing the second-order derivative of curvature as the objective function, and geological factors are introduced to dynamically adjust the smoothing weight. The specific process is as follows: Step 2.1: Calculate the curvature of the wellbore trajectory ; Step 2.2, convert the measured depth, vertical depth, well inclination, and azimuth into a three-dimensional rectangular coordinate system; then perform Z-score normalization on the coordinates of the X-axis, Y-axis, and Z-axis; Step 2.3: Reconstruct the objective function by minimizing the second-order derivative of curvature: ; in, 、 、 Respectively 、 、 The curvature value of each point; is the total number of trajectory points; Introducing geological factors to dynamically adjust smoothing weights: ; in, For the Dynamic weight of each point; is the geological factor; For the The stratigraphic mutation index of a point is as follows: ; Step 2.4: Using the three-point difference method, based on the coordinates of three adjacent points 、 、 , calculate the first point, 、 The local discrete curvature value of the point 、 、 , and then respectively 、 、 Substitute into the formation mutation index formula to obtain the formation mutation index corresponding to the local discrete curvature; when substituted, 、 、 Replaced by 、 、 ; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space; 、 、 Respectively The coordinates of the point on the X-axis, Y-axis, and Z-axis in three-dimensional space; Step 2.5, calculate the smoothed curvature value of each point, and adjust the position of the original wellbore trajectory point using the least square method or gradient descent method according to the smoothed curvature value; Step 2.6: Construct the optimization objective function to optimize the wellbore trajectory curvature: ; in, To optimize the objective function; For the The second derivative of curvature at each point; is the fidelity weight; Step 3: Propose a second-order Taylor expansion compensation term to dynamically correct the curvature factor and generate three-dimensional coordinate data of the wellbore trajectory; Step 4: Perform parameter-driven wellbore geometry modeling based on the three-dimensional coordinate data of the wellbore trajectory to achieve parameterized programmable control of the wellbore radius, wellbore wall thickness, and profile inclination angle.

2. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 1, characterized in that: The specific process of step 1 is: Step 1.1: Calculate the actual measured depth using multi-source data fusion and genetic algorithm. The specific process is as follows: Step 1.1.

1. Obtain multi-source data, including initial measurement depth, downhole displacement, tension / compression, and thermal expansion; The number of drill rods lowered and the length of each drill rod are recorded in real time by the ground winch sensor to calculate the initial measurement depth ; Use the length measurement while drilling tool to measure the number of drill string rotations and drill string diameter , real-time calculation of downhole displacement ; Calculate the tension / compression of the drill string under axial force based on Hooke's law ; Calculate thermal expansion based on downhole temperature sensor data ; Step 1.1.2: Perform multi-source data fusion and use genetic algorithm to optimize the weight coefficient of multi-source data fusion to build the actual measurement depth calculation model; Step 1.1.3, applying the actual measured depth calculation model to the newly acquired multi-source measurement data to calculate the actual measured depth; Step 1.2: Measure the well inclination angle by combining dual accelerometer redundancy check and gyroscope auxiliary compensation; Step 1.3: Use the gyroscope method to measure the azimuth angle; Step 1.4, calculating the vertical depth using a geometric model based on the well inclination, azimuth, and measured depth; Step 1.5: Comprehensive generation of wellbore trajectory data.

3. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 2 is characterized in that: The specific process of step 1.1.2 is as follows: Step 1.1.2.1: The collected initial measurement depth, downhole displacement, tension / compression, and thermal expansion are combined into a training sample set. ,in, For the samples, is the total number of samples; The samples contain Initial measurement depth of samples , Downhole displacement , tension / compression , thermal expansion ; Step 1.1.2.2: Obtain the reference measurement depth corresponding to the training sample set ,in For the Reference measurement depth of each sample; Step 1.1.2.3: Use genetic algorithm to optimize weight coefficients; the specific process is as follows: Randomly generate the initial population , For the Individuals, is the total number of individuals; each individual represents a set of candidate weight coefficients, and the initial weight coefficients are randomly generated in the interval [[0,1]; Calculate the actual measured depth of the sample corresponding to each individual in the population: ; in, For the population The corresponding individual The actual measured depth of each sample; 、 、 、 For the The four weight coefficients contained in each individual; according to and , use the negative value of the mean absolute error to calculate the The fitness value of each individual ; Based on the fitness value, the roulette wheel method is used to select high-quality individuals; The selected individuals are paired and crossover is performed to generate new individuals. The arithmetic crossover method is used. For the selected parent individuals and , generating offspring and ; Perform mutation operation on individuals with preset mutation probability, and Individual , randomly select weight coefficients for small perturbations; After crossover and mutation, New individuals , perform weight normalization processing; Set the number of elites to be retained , the most fit species in the contemporary population Individuals are directly copied to the next generation, setting the maximum number of iterations , when the maximum iteration number is reached, the algorithm terminates; Extract the individual with the highest fitness from the final population and obtain four optimal weight coefficients 、 、 、 ; Step 1.1.2.4: Construct the actual measurement depth calculation model based on the optimal weight coefficient: ; in, The actual measured depth.

4. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 3 is characterized in that: The specific process of step 1.2 is as follows: Step 1.2.

1. First, use a three-axis accelerometer to measure the components of gravity on the X-axis, Y-axis, and Z-axis of the tool coordinate system. 、 、 , and calculate the well inclination; Then, gyroscope-assisted compensation is performed, using a fiber optic gyroscope to measure the drill string angular velocity and fusing the accelerometer data through a Kalman filter; Step 1.2.2: For the static mode, collect 10 to 20 sets of data using an electronic single-point or multi-point inclinometer. Remove outliers and take the average to output the static wellbore inclination angle. For the dynamic mode, collect accelerometer data in real time, use a low-pass filter to suppress high-frequency vibration, and set the output frequency to 1 to 10 Hz, with an intensification of 10 Hz in critical well sections. Step 1.2.3: Perform well inclination correction. First, calibrate the accelerometer scale factor and bias using the six-position method, and calculate the calibrated acceleration measurement. Then, establish a temperature-bias relationship model to compensate for temperature drift: ; in, is zero bias; 、 、 are the different coefficients of the temperature-bias relationship model; is temperature; Finally, correct the well inclination: ; in, is the well inclination angle after real-time correction; To measure the well inclination; is the eccentricity; is the undeformed length of the drill string; Step 1.2.4: Perform a dual accelerometer redundancy check; integrate two sensors in the same probe and trigger a warning when the data difference is greater than 0.05°.

5. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 4 is characterized in that: In step 1.3, the angular velocity of the drill string is measured using a gyroscope method, and the azimuth angle is calculated by integration; In step 1.4, the vertical depth is calculated using the minimum curvature method, and then the vertical depth calculation result is corrected according to the formation dip and strike: ; in, is the corrected vertical depth; is the initial vertical depth; To measure the depth change; is the well inclination angle; is the azimuth; Towards; is the formation dip; The specific process of step 1.5 is as follows: first, synchronously obtain the measured depth, well inclination, azimuth and auxiliary parameters, including temperature and vibration; then, use the temperature / magnetic interference compensation algorithm to eliminate outliers; then, calculate the vertical depth, and finally obtain the required wellbore trajectory data.

6. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 5 is characterized in that: The specific process of step 3 is: Step 3.1: After step 2, the optimized wellbore trajectory curvature is obtained. The optimized measured depth, vertical depth, well inclination angle, and azimuth angle are obtained through the wellbore trajectory curvature. The coordinates of the wellbore trajectory in three-dimensional space are generated based on these data. Step 3.2, calculate the parameters between well sections, including the measured depth change, average well inclination, and average azimuth; For every two adjacent points and , calculate the change in measured depth , average well inclination , average azimuth ; Step 3.3, calculate the curvature factor and perform dynamic correction of the curvature factor; The dogleg degree is calculated based on the well inclination angle, average azimuth angle, and average well inclination angle; then the curvature factor is calculated based on the dogleg degree: ; in, is the curvature factor; It is a dog-leg degree; For the dynamic correction of the curvature factor, a second-order Taylor expansion compensation term is proposed: ; in, is the curvature factor after dynamic correction; Step 3.4, calculate the three-dimensional coordinate increment and reversely correct the coordinates; First, the coordinate increments of the wellbore on the X-axis, Y-axis, and Z-axis are calculated based on the curvature factor, measured depth change, average well inclination, and average azimuth. 、 、 ; Then, the azimuth jump compensation term is introduced to perform segmented compensation for azimuth mutation: ; ; in, 、 They are 、 The value after compensation; is the azimuth change; Finally, the coordinates are reversely corrected using the least squares method, and the formula is: ; in, is the corrected coordinate; is the original coordinate; is the measured coordinate; To calculate the coordinates; is the dynamic weight factor; Step 3.5: Generate three-dimensional coordinates by accumulating increments point by point. The specific formula is as follows: ; ; ; in, 、 、 Respectively The three-dimensional coordinates of a point are generated by accumulating increments on the X-axis, Y-axis, and Z-axis; 、 、 Respectively The X-axis, Y-axis, and Z-axis coordinates of a point in three-dimensional space.

7. The parameter-controlled intelligent oilfield wellbore digital twin modeling method according to claim 6, characterized in that: The specific process of step 4 is as follows: Step 4.

1. Store the 3D coordinate data of the wellbore trajectory generated in Step 3 as a standardized format file and import it into the modeling software for path generation. The specific process is as follows: read and parse the data into a coordinate sequence that can be recognized by the modeling software using the pandas library; then, the modeling software creates a 3D curve object based on the coordinate sequence and defines the curve type as a POLY spline. Step 4.2: Define a semicircular section generation function. Dynamically create a semi-closed curve section by inputting the wellbore radius and the number of segments, generating a set of semicircular points. Control the section smoothness by the number of segments. Control the section rotation angle around the path axis by the section inclination parameter. In the modeling software, traverse the path points and set the inclination angle for each point. Convert the angle to radians using the math tool function math.radians() provided by the Python standard library math module. Dynamically and adaptively modify the angle value by inputting external parameters. The section orientation is associated with the wellbore trajectory azimuth, and the angle value is the sum of the azimuth offset and the fixed correction value. Step 4.3: Use the Solidify modifier in the modeling software to add the wellbore wall thickness to the wellbore model. The thickness value is dynamically adjusted through program parameter input. The modifier direction is set to positive offset. Convert the curve object to a mesh object and apply smooth shading and subdivision surface algorithms to eliminate geometric jaggedness. Step 4.4: Encapsulate the wellbore radius, wellbore wall thickness, and section inclination angle parameters as configurable input items; perform rendering operations based on the Python script of the modeling software to obtain the final wellbore 3D geometric model.

Citation Information

Patent Citations

  • Improved multi-target particle swarm optimization-based complicated well track optimization method

    CN110134006A

  • Well track prediction method, system and equipment based on deep learning and digital twinning and medium

    CN118153420A