A tool face angle real-time prediction method based on ground top drive parameters
By constructing an experimental rig for surface top drive parameters and using an LSTM neural network, high-precision real-time prediction of downhole tool face angles was achieved, solving the transmission delay and reliability problems of traditional measurement-while-drilling systems and improving the real-time control capability and efficiency of directional drilling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional measurement while drilling technology cannot achieve real-time, high-fidelity, long-distance transmission of tool face angles, resulting in insufficient accuracy and reliability of tool face angle prediction in long horizontal well sections, affecting drilling trajectory adjustment and operational efficiency.
By constructing an experimental rig based on ground top drive parameters, collecting simulated drill string dynamic data, and using an LSTM neural network to establish a nonlinear mapping relationship between measurable ground parameters and downhole tool face angles, high-precision real-time prediction of tool face angles is achieved.
It effectively solves the problems of large transmission delay, high cost and reliability constraints of traditional measurement-while-drilling systems due to the downhole environment, and significantly improves the real-time control capability and operational efficiency of the directional drilling process.
Smart Images

Figure CN121327425B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of real-time prediction of tool face angles, specifically to a method for real-time prediction of tool face angles based on ground top drive parameters. Background Technology
[0002] Tool face angle is one of the most critical parameters in sliding directional drilling. In sliding drilling operations, the bottom assembly (BHA) provides trajectory control through its directional mechanism. As the core characteristic parameter of the BHA attitude, the tool face angle directly determines the direction of the drill bit's azimuth and inclination adjustment in space, thus dominating the drilling trajectory and borehole quality. Its value is not only affected by static geometric factors such as drill string length and wellbore curvature, but also by dynamic conditions such as drilling pressure fluctuations, torque transmission delays, and changes in friction between the drill string and the wellbore. Especially in long horizontal drilling sections, the coupling effect of these factors leads to the tool face angle exhibiting strongly nonlinear and time-varying dynamic characteristics. However, traditional measurement while drilling (MWD) technology has inherent limitations in achieving real-time control of tool face angles. It relies on downhole-to-surface transmission methods such as mud pulses and electromagnetic transmission. Limited by the transmission rate (usually <10bps) and the complex downhole environment (high-salinity mud, severe vibration, electromagnetic interference), it is difficult to achieve real-time, high-fidelity, long-distance transmission of key parameters such as tool face angles. Data transmission delays (up to minutes) and signal distortion directly lead to lagging dynamic tool face angle analysis results and high error rates. This not only makes it difficult to support real-time trajectory adjustment decisions, but may also cause wellbore trajectory deviations and stuck pipe due to parameter misjudgments, seriously restricting efficient field operations.
[0003] Existing technologies have proposed multi-step tool face angle prediction models based on LSTM, MLP, and GBDT. These models use machine learning algorithms to mine the temporal correlations between parameters, providing a forward-looking approach to torsional vibration control. However, their training data mostly comes from laboratory simulation devices (such as short-distance fixed drill string test benches) or near-surface shallow well conditions, which cannot fully capture and simulate the real complex dynamic behavior of the drill string in long horizontal well sections, resulting in limited generalization ability of the models in actual deep well scenarios. In addition, the training of such models often relies heavily on drilling parameters transmitted from downhole to the surface. However, traditional measurement while drilling (MWD) technology cannot effectively achieve real-time, high-fidelity, and long-distance transmission of downhole operation parameters, including tool face angles. This results in poor real-time performance and high error rates in these data, thus restricting further improvement in the model's prediction accuracy and reliability. Summary of the Invention
[0004] To address the aforementioned technical problems, a real-time prediction method for tool face angle based on surface top drive parameters is provided. This technical solution solves the problems mentioned in the background technology, such as the inability to fully capture and simulate the real and complex dynamic behavior of the drill string in long horizontal well sections, which leads to limited generalization ability of the model in actual deep well scenarios and poor real-time performance and high error of the model's training data, thus restricting further improvement of the model's prediction accuracy and reliability.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A method for real-time prediction of tool face angle based on ground top drive parameters includes:
[0007] Based on the spatial structural characteristics of the drilling scenario, an experimental rig for obtaining model training parameters was constructed, and dynamic data of the simulated drill string under different combinations of ground top drive parameters were collected through the rig.
[0008] The collected simulated drill string dynamic data is preprocessed to calculate the initial tool face angle, and the initial tool face angle is unwound to obtain the real tool face angle time series data.
[0009] Using ground top drive parameters and corresponding real tool face angle time series data as training samples, the training set and test set are divided, and a prediction model based on LSTM neural network is constructed.
[0010] The test set data is input into the trained prediction model, which outputs the prediction tool face angle. RMSE, MAE, R², and prediction accuracy are used as evaluation metrics to verify the reliability of the model's prediction performance.
[0011] The step of constructing a model training parameter acquisition experimental rig based on the spatial structural characteristics of the drilling scenario, and collecting simulated drill string dynamic data under different combinations of surface top drive parameters using this rig, specifically includes:
[0012] Based on the spatial structural characteristics of the drilling scenario, a model training parameter acquisition experimental platform is constructed. The experimental platform consists of a power supply, a central control unit, an electrical box, a motor bracket, a servo motor, a coupling, a simulated drill string, a simulated drilling tool, a displacement attitude sensor, a universal joint, a simulated formation, a simulated wellbore, and an experimental platform.
[0013] By setting different combinations of ground top drive parameters at the central control terminal, test experiments were conducted using the controlled variable method, with the experiment under the same parameter combination repeated at least three times.
[0014] In each experiment, the servo motor was controlled to run according to the set parameter combination, and the dynamic data of the simulated drill string was collected synchronously through the displacement attitude sensor.
[0015] The collected simulated drill string dynamic data is transmitted to the central control unit via Bluetooth for storage;
[0016] The ground top drive parameters include at least: maximum motor output angle, maximum motor output speed, motor rotation cycle, signal sampling frequency, and drill rod length;
[0017] The simulated drill string dynamic data includes at least: rotational speed, maximum rotation angle, number of rotations, data update cycle, real-time rotation angle, and triaxial gravitational accelerations AccX, AccY, and AccZ.
[0018] The preprocessing of the acquired simulated drill string dynamic data, the calculation of the initial tool face angle, and the unwinding of the initial tool face angle to obtain the real tool face angle time series data specifically include:
[0019] With the installation center of the displacement attitude sensor as the origin, the x-axis points along the drill string axis, the y-axis points to the tangent of the bottom circle, and the z-axis is perpendicular to the y-axis and points to the center of the bottom circle, thus establishing a measurement coordinate system;
[0020] Based on the triaxial gravitational accelerations AccX, AccY, and AccZ collected by the displacement attitude sensor, the initial tool face angle is calculated under different ground top drive parameters based on the arctangent function.
[0021] The initial tool face angle data is processed based on the unwinding algorithm to obtain the real tool face angle timing data;
[0022] The actual tool face angle time series data is verified by calculating the absolute value of the difference between adjacent sampling points and determining whether all differences are less than the preset jump threshold.
[0023] If yes, the unwinding is successful, and the verified data is recorded as real tool face angle time series data for model training. If no, the data set is deemed unqualified and removed from the training samples.
[0024] The process of using ground top drive parameters and corresponding real toolface angle time-series data as training samples, dividing the data into training and testing sets, and constructing a prediction model based on an LSTM neural network specifically includes:
[0025] The input features of the training samples consist of ground top drive parameters within a fixed-length S-time window and corresponding real toolface angle time-series data;
[0026] The output target is the prediction tool facet angle one time step T after the S-time window;
[0027] The input features are preprocessed, including at least one-hot encoding of categorical variables, linear interpolation to fill missing data, and normalization of numerical features to the [0,1] interval.
[0028] The preprocessed dataset is divided into training and test sets proportionally, and the test set must contain samples with different combinations of top driving parameters.
[0029] Construct a neural network prediction model containing M LSTM layers, where the number of hidden units in the LSTM layers is H;
[0030] A loss function is constructed with the objective of minimizing the mean square error between the tool face angle predicted by the model and the actual tool face angle.
[0031] The Adam optimizer is used, the batch size is set to B, the model is trained iteratively, and an early stopping mechanism is used to prevent overfitting. The model that performs best on the test set after training is defined as the final prediction model based on LSTM neural network.
[0032] The process of inputting test set data into the trained prediction model, outputting the prediction tool facet angle, and using RMSE, MAE, R², and prediction accuracy as evaluation metrics to verify the reliability of the model's prediction performance specifically includes:
[0033] The ground top drive parameters of the test set are input into the prediction model based on the LSTM neural network, and the prediction tool face angle is output.
[0034] Based on the RMSE, MAE, and R² formulas, the root mean square error, mean absolute error, and coefficient of determination of the predicted tool face angle and the actual tool face angle are calculated respectively.
[0035] The number of statistical prediction tool face angles whose absolute difference from the actual tool face angle is no greater than a preset angle threshold is calculated, and the proportion of this number in the sample is used as the model prediction accuracy.
[0036] The reliability of the model's prediction performance is verified based on the values of RMSE, MAE, R², and prediction accuracy. The smaller the RMSE and MAE, the closer R² is to 1, the smaller the prediction error, and the better the model's fitting performance.
[0037] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0038] This invention proposes a real-time tool face angle prediction method based on surface top drive parameters. It involves constructing an experimental rig simulating a drilling scenario to collect dynamic drill string data, preprocessing the collected data to calculate the initial tool face angle, and then unwinding the initial tool face angle to obtain real tool face angle time-series data. A training sample set is then constructed. Based on this, a nonlinear mapping relationship between measurable surface parameters and downhole tool face angles is established using an LSTM neural network. This enables high-precision real-time prediction of downhole tool face angles using only surface top drive parameters, effectively solving the technical bottlenecks of traditional measurement-while-drilling systems, such as large transmission delays, high costs, and reliability limitations imposed by the downhole environment. This significantly improves the real-time control capability and operational efficiency of directional drilling processes, providing key technical support for intelligent drilling. Attached Figure Description
[0039] Figure 1 This is a flowchart of a real-time prediction method for tool face angle based on ground top drive parameters according to the present invention;
[0040] Figure 2 This is a schematic diagram of the composition of the experimental setup for obtaining model training parameters according to the present invention.
[0041] Figure 3 This is a schematic diagram of the assembly and debugging architecture of the training data acquisition experimental bench of the present invention;
[0042] Figure 4 This is a schematic diagram of the measurement coordinate system structure of the present invention;
[0043] Figure 5 This is a schematic diagram illustrating the phase winding principle of the present invention;
[0044] Figure 6 This is a schematic diagram comparing the actual tool facet angle after unwinding and the initial tool facet angle according to the present invention;
[0045] Figure 7 This is a schematic diagram of the three-layer network structure of the prediction model based on LSTM neural network of the present invention;
[0046] Figure 8 This is a schematic diagram illustrating the effect of different maximum motor output angles A on the LSTM prediction model according to the present invention;
[0047] Figure 9 This is a schematic diagram illustrating the prediction accuracy of the LSTM model of the present invention under different maximum motor output angles A.
[0048] Figure 10 This is a schematic diagram illustrating the relationship between the actual tool facet angle and the predicted tool facet angle under different operating conditions using the LSTM model of this invention.
[0049] Figure 11This is a schematic diagram of the evaluation index results of the LSTM model of the present invention;
[0050] Figure 12 This is a structural diagram of the electronic device proposed in this invention;
[0051] Figure 13 This is a schematic diagram of the structure of the computer-readable storage medium proposed in this invention. Detailed Implementation
[0052] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0053] Reference Figure 1 As shown, a method for real-time prediction of tool face angle based on ground top drive parameters includes:
[0054] Based on the spatial structural characteristics of the drilling scenario, an experimental rig for obtaining model training parameters was constructed, and dynamic data of the simulated drill string under different combinations of ground top drive parameters were collected through the rig.
[0055] The collected simulated drill string dynamic data is preprocessed to calculate the initial tool face angle, and the initial tool face angle is unwound to obtain the real tool face angle time series data.
[0056] Using ground top drive parameters and corresponding real tool face angle time series data as training samples, the training set and test set are divided, and a prediction model based on LSTM neural network is constructed.
[0057] The test set data is input into the trained prediction model, which outputs the prediction tool face angle. RMSE, MAE, R², and prediction accuracy are used as evaluation metrics to verify the reliability of the model's prediction performance.
[0058] This approach, by constructing an experimental rig simulating a drilling scenario, enables the safe, controllable, and low-cost acquisition of simulated drill string dynamic data covering different top drive parameter combinations on the ground. This provides a high-quality, highly reliable sample source for model training, overcoming the difficulties and high costs associated with direct downhole measurement data acquisition. Furthermore, by performing initial tool face angle calculations and unwinding on the raw data, jumps and phase ambiguities in the sensor data are effectively eliminated, resulting in true tool face angle time-series data that accurately reflects the drill string's motion state. This data forms the training sample set for the model, laying a solid foundation for the model to learn accurate dynamic patterns. Based on this, a prediction model is constructed using an LSTM neural network as its core, fully leveraging the LSTM's ability to capture long-term dependencies in time series data, enabling accurate... A nonlinear mapping relationship was established between surface top drive parameters and the tool face angle in complex downhole dynamics, enabling high-precision real-time prediction of downhole conditions based solely on surface parameters. Finally, the model performance was comprehensively verified using multi-dimensional evaluation indicators such as RMSE, MAE, R², and prediction accuracy, ensuring the reliability and generalization ability of the prediction results. This provides a reliable guarantee for the application of this method in actual drilling. Through the organic combination of the above technical features, this scheme effectively achieves high-precision real-time prediction of downhole tool face angle based solely on surface top drive parameters. It effectively solves the long-standing technical bottlenecks of traditional measurement while drilling (MWD) systems, such as large transmission delay, high cost, and reliability constrained by the harsh downhole environment. It significantly improves the real-time control capability and operational efficiency of directional drilling processes, providing key technical support for intelligent drilling.
[0059] The step of constructing a model training parameter acquisition experimental rig based on the spatial structural characteristics of the drilling scenario, and collecting simulated drill string dynamic data under different combinations of surface top drive parameters using this rig, specifically includes:
[0060] Based on the spatial structural characteristics of the drilling scenario, an experimental platform for obtaining model training parameters was constructed.
[0061] By setting different combinations of ground top drive parameters at the central control terminal, test experiments were conducted using the controlled variable method, with the experiment under the same parameter combination repeated at least three times.
[0062] In each experiment, the servo motor was controlled to run according to the set parameter combination, and the dynamic data of the simulated drill string was collected synchronously through the displacement attitude sensor.
[0063] The collected simulated drill string dynamic data is transmitted to the central control unit via Bluetooth for storage;
[0064] The ground top drive parameters include at least: maximum motor output angle, maximum motor output speed, motor rotation cycle, signal sampling frequency, and drill rod length;
[0065] The simulated drill string dynamic data includes at least: rotational speed, maximum rotation angle, number of rotations, data update cycle, real-time rotation angle, and triaxial gravitational accelerations AccX, AccY, and AccZ.
[0066] It can be explained that the collection and acquisition of training data is a prerequisite for ensuring that the subsequent model can make accurate predictions. Therefore, this solution builds an experimental platform for obtaining model training parameters, uses the controlled variable method to control a single variable, and collects data multiple times to ensure the comprehensiveness and accuracy of the training data.
[0067] Reference Figure 2 As shown, the specific architecture of the model training parameter acquisition experimental platform includes:
[0068] In the diagram, 0 represents the power supply, 1 the central control unit, 2 the electrical box, 3 the motor bracket, 4 the servo motor, 5 the coupling, 6 the simulated drill string, 7 the simulated drilling tool, 8 the displacement and attitude sensor, 9 the universal joint, 10 the simulated formation, 11 the simulated wellbore, and 12 the experimental platform. The power supply provides power for the experiment and is connected to the central control unit 1, the electrical box 2, and the servo motor 4. The central control unit 1 is equipped with servo motor control software. By setting the servo motor controller parameters on the computer software, the output speed of the servo motor can be controlled. It also has engineering parameter measurement sensor data acquisition software installed to display the tool surface parameters collected by the displacement and attitude sensor in real time. The parameters include, for example: rotational speed, maximum rotation angle, number of rotations, data update cycle, real-time rotation angle, and three-axis gravitational acceleration AccX, AccY, and AccZ. The electrical box 2 houses a servo motor controller to control the motor's movement. A Wi-Fi router is used to transmit commands and signals between the central control unit 1 and the electrical box 2, and also includes some related connection circuits. The motor bracket 3 fixes the servo motor 4 to the ground, ensuring that the output shaft of the servo motor 4 is coaxial with the simulated drill string 6. The servo motor 4 serves as the power unit for simulating the drill string, outputting rotational speed and torque, and is placed on the motor bracket 3. The output shaft is connected to the simulated drill string 6 using a coupling 5. The coupling 5 is used to connect the output of the servo motor 4. The shaft and simulated drill string 6 transmit the motion states, such as speed and torque, output by the servo motor to the simulated drill string 6. The simulated drill string 6 is made of PP-R tubing and is used to simulate the part of the drill string extending from the wellhead to the bottom of the well. It is placed on the simulated wellbore 11, and its two ends are respectively bonded to the output shaft of the servo motor 4 via couplings 5 and to the simulated formation 10 via universal joints 9. The simulated drilling tool 7 is a cylinder made of 3D-printed photosensitive resin, located at the bottom of the simulated drill string 6. It is used to simulate the bottom hole drilling tool and house the displacement attitude sensor 8. Each end is respectively connected to the universal joint 9 and bonded to the simulated drill string 6. The displacement attitude sensor is installed in the simulated drilling tool 7 and is used to collect real-time data on the drilling process during drill string movement. The well tool motion parameters and tool face change parameters (such as triaxial gravitational acceleration) are transmitted to the central control terminal 1 via Bluetooth. The universal joint 9 is used to connect the simulated drill string 6 and the simulated formation 10. The simulated formation 10 is composed of a magnetic powder brake, which is threadedly fixed on the experimental platform 12 and connected to the simulated drill string 6 through the universal joint 9. It is used to simulate the stick-slip phenomenon of the drill bit when it encounters the formation. The simulated wellbore 11 is used to simulate the real wellbore. It is welded to the experimental platform 12 and contacts the simulated drilling tool 7. The simulated drilling tool 7 moves and contacts the wellbore, which is the main scenario of tool face change. The experimental platform 12 is made of industrial aluminum profile and is used to place and fix the simulated wellbore 11 and the simulated formation 10.
[0069] Referring to Figure 3, the assembly and debugging of the experimental setup for acquiring training data specifically includes:
[0070] Set up N sets of data acquisition experiments, with the maximum motor output rotation angles being A1, A2, A3…An, corresponding to the maximum motor output speed V, the motor rotation period T, the signal sampling frequency f, and the drill pipe length L. Under the same conditions of maximum motor output speed V, motor rotation period T, signal sampling frequency f, and drill pipe length L, conduct N sets of experiments with motor output rotation angles A1, A2, A3…An:
[0071] After connecting the experimental instruments and plugging in the power, the Wi-Fi module automatically starts and generates a wireless signal;
[0072] Turn on the central control terminal of the computer, connect to the Wi-Fi signal, start the software, input the experimental parameters of group A1 into the corresponding fields and activate the function, and determine whether the dynamic parameters of displacement attitude sensor 8 can be read in real time and whether the motor is rotating in a cycle.
[0073] When the test bench is working properly, the dynamic data of the displacement attitude sensor 8 in the simulated well 11 is acquired in real time, and the ground top drive parameters are set at the central control terminal 1, namely the maximum output speed V of the motor, the motor rotation period T, the signal sampling frequency f, the drill pipe length L, and the maximum output angle of the motor A1.
[0074] After completing the first set of experiments, check the generated dynamic parameter file in the central control terminal 1. Based on expert experience, determine whether there is any reading disorder. If so, repeat the experiment. If not, record the experimental results. At the same time, conduct no less than three sets of experiments under the same conditions to avoid random errors in the later data processing.
[0075] Then, input the maximum rotation angles A2 / A3 / ...An of the motor output respectively, and repeat the above steps to obtain the dynamic data of the displacement attitude sensor 8 in the simulated wellbore 11 under the ground top drive variable;
[0076] Similarly, when the control variables are the maximum motor speed V1, V2, V3...Vn (drill rod length L1, L2, L3...Ln / motor rotation period T1, T2, T3...Tn / ) and other ground top drive parameters, the above experiment is repeated while keeping other conditions consistent.
[0077] After the experiment is completed, check the saved experimental data on the central control terminal 1 and save the data for subsequent data processing and model training.
[0078] The preprocessing of the acquired simulated drill string dynamic data, the calculation of the initial tool face angle, and the unwinding of the initial tool face angle to obtain the real tool face angle time series data specifically include:
[0079] With the installation center of the displacement attitude sensor as the origin, the x-axis points along the drill string axis, the y-axis points to the tangent of the bottom circle, and the z-axis is perpendicular to the y-axis and points to the center of the bottom circle, thus establishing a measurement coordinate system;
[0080] Based on the triaxial gravitational accelerations AccX, AccY, and AccZ collected by the displacement attitude sensor, the initial tool face angle is calculated under different ground top drive parameters based on the arctangent function.
[0081] The initial tool face angle data is processed based on the unwinding algorithm to obtain the real tool face angle timing data;
[0082] The actual tool face angle time series data is verified by calculating the absolute value of the difference between adjacent sampling points and determining whether all differences are less than the preset jump threshold.
[0083] If yes, the unwinding is successful, and the verified data is recorded as real tool face angle time series data for model training. If no, the data set is deemed unqualified and removed from the training samples.
[0084] It can be explained that extracting the tool face angle from the triaxial gravitational accelerations AccX, AccY, and AccZ collected by the displacement and attitude sensor is a crucial step in implementing this scheme. Therefore, coordinate alignment, tool face angle extraction, and correction are critical factors determining the accuracy of the extracted tool face angle data. Thus, this scheme establishes a measurement coordinate system, aligning the displacement and attitude sensor's measurement coordinate system with the global coordinate system to avoid tool face angle extraction errors caused by coordinate differences. Secondly, because the initial tool face angle obtained after transformation is affected by phase entanglement, there may be data jumps; that is, in the computer program, the angles in the first and second quadrants are (0, ...). The angles in the third and fourth quadrants are... If the arctangent function data transformation angle range should be within... Between, but the actual output is limited to The range, exceeding Part of it becomes The interval, the jump range is Therefore, this scheme combines an unwrapping algorithm to unwrap the initial tool face angle. The phase wrapping refers to a jump that occurs at a certain point when calculating the phase frequency characteristics of the data using the arctangent function. The unwrapping algorithm (e.g., the unwrap function in signal processing) identifies the jump point caused by phase wrapping by detecting the angle difference between adjacent data points, and then adjusts the angle by adding or subtracting 2... To eliminate jumps, the angle sequence is normalized to an integer multiple of the given value. The interval is used to obtain continuous and smooth real tool face angle time series data. The preset jump threshold is set based on the mathematical principle of phase winding, and its value is slightly less than... (For example, the value is) (90%-95%), to ensure effective detection and interception of near 2 caused by abrupt changes in the arctangent function range. Abnormal jumps in the drill string should be avoided, while misjudging reasonable angle changes that occur during normal rotation of the drill string.
[0085] The initial tool face angle expression is:
[0086]
[0087] In the formula, As the initial tool face angle, The component of gravitational acceleration along the y-axis, The component of gravitational acceleration along the z-axis, It is the arctangent function.
[0088] Reference Figure 4 As shown, the measurement coordinate system structure specifically includes:
[0089] The diagram illustrates a coordinate system based on the drilling tool face angle, sensor installation coordinates, and gravity tool face angle measurement. In this measurement coordinate system, the sensor installation center is taken as the origin (o), and the direction along the drill string axis is considered the measurement x-direction. Simultaneously, the y-axis points to the tangent direction of the bottom well circle, and the z-axis lies within the tool plane, pointing towards the center of the bottom well circle and perpendicular to the y-axis. This measurement coordinate system is used to accurately calculate the acceleration and angular velocity data measured by the sensor, providing a spatial reference for calculating the tool face angle. It is understood that, in this specific implementation example, the attitude displacement sensor is installed as follows... Figure 4 As shown in diagram a, a global coordinate system (S-South, W-West, N-North, E-East) and a measurement coordinate system o-xyz are established. In the measurement coordinate system, the sensor installation center is taken as the origin o, and the direction along the drill string axis is considered the measurement x-direction. Simultaneously, the y-axis points to the tangent direction of the bottom well circle, and the z-axis lies within the tool plane, pointing towards the center of the bottom well circle and perpendicular to the y-axis. Figure 4 Figure b shows a schematic diagram of drilling tool face angles. The angle between the drill pipe axis and the drill bit axis is called the structural bend angle, usually denoted by the symbol η, and the unit is degrees. The angle between the drill pipe axis and the gravity direction line is called the well inclination angle, usually denoted by the symbol α, and the unit is degrees. It should be noted that the drill string includes the drill pipe and the rest of the downhole tool string, and its drill string axis is consistent with the drill pipe axis; as shown in Figure b. Figure 4Figure c shows the gravity tool face angle measurement diagram of the drilling tool (and its fixedly mounted sensor) rotating from position P to position Q. Position P is the intersection of the line along the high side and the bottom circle (corresponding to the initial tool orientation), and position Q is the intersection of the line along the device orientation and the bottom circle (corresponding to the orientation after tool rotation). The angle through which the tool rotates clockwise from P to Q is the gravity tool face angle (corresponding to the initial tool face angle in the formula). The parameters shown in the figure... It represents the rotational angular velocity, and the dashed line with the arrow indicates the direction of rotation.
[0090] Reference Figure 5 As shown, the schematic diagram of the phase winding principle specifically includes:
[0091] As shown in the figure, if the phase angle rotates counterclockwise by 1.25 degrees from 0... It passes through the negative half of the x-axis into the third quadrant, and by definition, its angle will directly increase from 1.25. It becomes -0.75 This caused the value to jump by 2. Therefore, even if the change in the angle of the processed tool does not exceed When the value exceeds Even then, discontinuities will still occur.
[0092] The process of using ground top drive parameters and corresponding real toolface angle time-series data as training samples, dividing the data into training and testing sets, and constructing a prediction model based on an LSTM neural network specifically includes:
[0093] The input features of the training samples consist of ground top drive parameters within a fixed-length S-time window and corresponding real toolface angle time-series data;
[0094] The output target is the prediction tool facet angle one time step T after the S-time window;
[0095] The input features are preprocessed, including at least one-hot encoding of categorical variables, linear interpolation to fill missing data, and normalization of numerical features to the [0,1] interval.
[0096] The preprocessed dataset is divided into training and test sets proportionally, and the test set must contain samples with different combinations of top driving parameters.
[0097] Construct a neural network prediction model containing M LSTM layers, where the number of hidden units in the LSTM layers is H;
[0098] A loss function is constructed with the objective of minimizing the mean square error between the tool face angle predicted by the model and the actual tool face angle.
[0099] The Adam optimizer is used, the batch size is set to B, the model is trained iteratively, and an early stopping mechanism is used to prevent overfitting. The model that performs best on the test set after training is defined as the final prediction model based on LSTM neural network.
[0100] This can be explained by using ground top drive parameters, such as the maximum motor output speed V, motor rotation period T, signal sampling frequency f, drill pipe length L, and the experimentally measured actual tool face angle as inputs, and the predicted tool face angle as the output, to train the model. Finally, new ground top drive parameters are input into the trained LSTM prediction model, and the output predicted tool face angle is compared with the experimentally obtained actual tool face angle. This comparison is used to obtain the model accuracy and other relevant evaluation parameters. Therefore, this scheme uses an LSTM neural network trained on an existing training sample set to construct an LSTM neural network-based prediction model, thereby achieving accurate prediction of the tool face angle. In the prediction, the time window length S, time step T, number of network layers M, number of hidden units H, and batch size B are all key hyperparameters that need to be determined for building and training the LSTM prediction model. These hyperparameters together determine the model's structure, input-output relationship, and training dynamics. Their specific values need to be comprehensively set based on the data characteristics of actual drilling operations (such as the periodicity of tool face angle changes and signal frequency) and the accuracy and real-time requirements of the prediction task. By using conventional hyperparameter optimization methods (such as grid search, random search, or Bayesian optimization), with the goal of minimizing the prediction error (such as root mean square error) of the model on the reserved validation set, an effective set of parameters can be determined.
[0101] The process of inputting test set data into the trained prediction model, outputting the prediction tool facet angle, and using RMSE, MAE, R², and prediction accuracy as evaluation metrics to verify the reliability of the model's prediction performance specifically includes:
[0102] The ground top drive parameters of the test set are input into the prediction model based on the LSTM neural network, and the prediction tool face angle is output.
[0103] Based on the RMSE, MAE, and R² formulas, the root mean square error, mean absolute error, and coefficient of determination of the predicted tool face angle and the actual tool face angle are calculated respectively.
[0104] The number of statistical prediction tool face angles whose absolute difference from the actual tool face angle is no greater than a preset angle threshold is calculated, and the proportion of this number in the sample is used as the model prediction accuracy.
[0105] The reliability of the model's prediction performance is verified based on the values of RMSE, MAE, R², and prediction accuracy. The smaller the RMSE and MAE, the closer R² is to 1, the smaller the prediction error, and the better the model's fitting performance.
[0106] This approach uses evaluation metrics such as RMSE (Root Mean Square Error), MAE (Mean Absolute Error), R² (Coefficient of Determination), and model prediction accuracy to comprehensively assess the model's predictive performance. Specifically, RMSE reflects the magnitude of the deviation between the predicted and actual values and is more sensitive to larger errors; MAE measures the average deviation between the predicted and actual values, providing good interpretability; R² evaluates the model's ability to explain changes in real data, with a value ranging from 0 to 1, where a value closer to 1 indicates a better fit; and model prediction accuracy directly reflects the proportion of samples whose predicted values fall within the acceptable error range for engineering applications, providing a direct indication of the model's practicality. Through these multi-dimensional evaluations, LSTM models capable of accurately predicting the bottom-hole tool face angle using surface top drive parameters can be verified and selected. Furthermore, a comprehensive evaluation value can be constructed based on these metrics to quantitatively assess the model's performance. The preset angle threshold is set according to the precision requirements of drilling engineering for tool face angle control and the characteristics of experimental data, typically ranging from 3° to 5°, or 1.5 times the tool face angle measurement error.
[0107] In a preferred embodiment, code was written using the `unwrap` function to unwrap the initial toolface corners using PyTorch. The main execution code is shown in Table 1.
[0108] Table 1. Initial Toolface Corner Unwrapping Main Program and Comments
[0109]
[0110] The code in Table 1 expands the initial toolface angles and limits the angle interval to [-]. , It can smooth out "jumps" in a series of angles (e.g., an instantaneous jump from 179° to -179°), and then normalize the result to - arrive The first line defines the entire function, with the parameter `angle_deg` representing the angle value (in degrees). The second line converts the angle from degrees to radians, with the parameter `angle_rad` representing the radian value, because many angle operations in NumPy and PyTorch default to radians. The third line performs expansion: if the radian difference between two adjacent points exceeds [a certain value]... np.unwrap will automatically add or subtract 2. To make the curve as continuous as possible without sudden jumps, the idea is to smooth out "0 / 2". The jump at the "joint" ensures the smoothness of the curve. Line 4 converts the actual tool face angle unit obtained after unwinding back to "degrees". Line 5 reverses the actual tool face angle back to [-]. , The operation "unwrapped_deg+180" shifts the entire range within the given interval. "%360" returns the value to the range [0°, 360°) by taking the modulo of 360°; "-180" converts it back to [-180°]. , The purpose of this is to ensure that although the expansion makes the curve smooth, the value may fall outside the standard range (such as 540°), which makes subsequent calculations easier. The 6th line returns the calculation result.
[0111] In the preferred embodiment, the ground top drive variable in this case is the maximum rotation angle A of the motor output, which is set to 180°, 135° and 90° respectively. The length of the simulated drill string 6 is designed to be 2m, the maximum speed of the motor output is 20rpm, the rotation cycle is 20 times, and the sampling frequency is 50ms. For specific experimental parameters, please refer to Table 2.
[0112] Table 2 Ground Top Drive Parameter Settings
[0113]
[0114] After completing the joint debugging of the experimental device, the known ground top drive parameters in Table 2 were input into the software. Three sets of experiments were carried out in sequence according to the specific operation of the simulation experiment. During the experiment, the dynamic data transmitted by sensor 8 was recorded and saved to the central control terminal 1. The same set of experimental conditions was repeated three times to obtain the dynamic data of the simulated drill string collected by the displacement attitude sensor, as well as additional backup data, to prevent significant distortion of the result data.
[0115] Reference Figure 6 As shown, the comparison between the actual tool facet angle after unwinding and the initial tool facet angle is as follows:
[0116] As shown in the figure, the initial tool face angle exhibits discontinuous jumps, indicating data entanglement. After processing the initial tool face angle data using the unwinding algorithm, the amplitude change of the actual tool face angle is consistent with that before unwinding, but the image is continuous. This verifies the correctness of the actual tool face angle obtained after unwinding.
[0117] Reference Figure 7 As shown, the three-layer network structure of the prediction model based on the LSTM neural network includes:
[0118] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network (RNN). Compared to standard RNNs, LSTMs can more effectively solve the vanishing and exploding gradient problems in long sequences of data, and are better suited for handling time-dependent problems. LSTMs use one memory unit and three gating mechanisms to remember long-term information and selectively forget some irrelevant information. The principle is as follows: Figure 7 As shown:
[0119] In LSTM, memory cells are used to maintain data that changes over time and to determine whether to retain, update, or discard this information. These memory cells are controlled by gating mechanisms (forget gate, input gate, output gate). These gating mechanisms control the flow of information to determine which data is retained, transmitted, or forgotten.
[0120] The Gate of Oblivion decides to start from Cellular state at any moment How much information is discarded in the output It is a vector with values between [0,1] generated by the Sigmoid function, specifically:
[0121]
[0122] In the formula, for The output of the forget gate;
[0123] The input gate determines how much new information is stored in the cell state, and it consists of two parts:
[0124] The specific formula for the opening and closing signal of the input gate is as follows:
[0125]
[0126] In the formula, for The output of the input gate at any given moment not only represents the output of the input gate, but also represents the proportion of new information entering the memory cells;
[0127] The specific formula for candidate cell status is:
[0128]
[0129] In the formula, for The state of the candidate memory cell at any given time, together with the output of the input gate, determines how much new information will be written to the memory cell.
[0130] The specific formula for updating the current cell state by combining the outputs of the forget gate and the input gate is as follows:
[0131]
[0132] In the formula, for Cell state at any time for This operation, which considers the cell state at any given moment, enables selective forgetting of historical information and selective addition of new information.
[0133] Based on the current cell state, the specific formula for determining how much information to output to the hidden state is:
[0134]
[0135] In the formula, for The output of the output gate at any time controls how much cell state information will be output to the hidden state;
[0136] The hidden state of the final output The specific formula is determined by both the output gate and the cell state scaled by the hyperbolic tangent function:
[0137]
[0138] In the formula, for The hidden state at any given moment is also the output of the current time step;
[0139] Among them, regarding the parameters of the above formula, For the sigmoid function, It is the hyperbolic tangent function. For element-wise multiplication, , , , For learnable weight matrix, To be Hide state at all times and Input at any time A vector formed by concatenation. , , , This is the bias vector.
[0140] In the preferred embodiment, the specific parameters for the training parameters of the prediction model based on the LSTM neural network are detailed in Table 3;
[0141] Table 3 Ground Top Drive Parameter Settings
[0142]
[0143] This case study uses a training set / test set ratio of 8:2. For time series prediction of tool facets, this ratio ensures that the LSTM has a sufficient number of training samples to effectively learn data features, while also retaining enough test samples to evaluate the model's reliability. This allows for testing the model's generalization ability to future data. The model is configured with parameters such as the number of LSTM layers, the number of hidden layers, the dropout rate, and the learning rate. In the three-layer LSTM, each layer contains 256 units. To balance training accuracy and reduce overfitting, the dropout rate is set to 0.3. This case study uses Adam as the training optimizer with a learning rate of 0.001. The model training cycle is 200 epochs. To prevent overfitting during this process, an early stopping mechanism is implemented. The patience level of this mechanism is set to 15, with an increment of 0.0001. Therefore, if the validation loss does not improve by more than 0.0001 within 15 consecutive epochs, this mechanism will be activated, causing training to terminate. If the early stopping condition is not met, training will continue until the full 200 epochs are completed.
[0144] Reference Figure 8 As shown, the effects of different maximum output rotation angles A of the motor on the LSTM prediction model specifically include:
[0145] After 58 epochs of training with 2952 samples, the rotation amplitude within the three real tool face angle cycles was very close to the set maximum motor rotation angle. Figure 8 180° in a Figure 8 135° in b Figure 8 (90° in c), however, only Figure 8 The variation range of the actual tool face angle in a is less than the set 180°. Figure 8 b and Figure 8 In c, although the actual tool face angle changes were close to the experimental settings of 135° and 90°, they both exceeded the set values. This may be because when the maximum rotation angle of the motor is small, the motor is accelerating. When the motor output shaft rotates to the specified maximum rotation angle, the motor does not have time to decelerate and reverse, resulting in a certain angular displacement to consume the motor's energy. Nevertheless, the final range of change of the actual tool face angle is not significantly different from the maximum rotation angle of the motor, which has little impact on the overall trend of the model's prediction effect.
[0146] Reference Figure 9 As shown, the prediction accuracy of the LSTM model under different maximum motor output angles A specifically includes:
[0147] As shown in the figure, by comparing the results of the training set, test set, and overall (combined) data, the model maintains high prediction accuracy across all conditions, with a combined accuracy exceeding 84%. The highest performance was observed at 180°, with a combined accuracy of 93.50%, and training and testing accuracies of 93.33% and 94.21%, respectively. This indicates that when the rotation amplitude is large, the tool face angle change provides richer temporal features, enabling the model to learn the mapping more effectively. For the 135° condition, the combined accuracy remains as high as 90.93%, demonstrating strong generalization ability even under moderate rotation amplitudes. In contrast, the accuracy drops slightly to around 84% at 90°, possibly due to the smaller angle change range and lower signal fluctuations, limiting the model's sensitivity to small angle changes. In summary, the small differences between training and testing accuracy in all cases reflect the stability and generalization ability of the proposed network. The overall accuracy of 90.51% confirms that the developed LSTM-based model achieves reliable and accurate prediction performance for tool face angle estimation.
[0148] Reference Figure 10 As shown, the relationship between the true tool facet angle and the predicted tool facet angle under different operating conditions in the LSTM model specifically includes:
[0149] As shown in the figure, the scatter plot illustrates the relationship between the actual and predicted tool face angles of the LSTM model under different operating conditions. The dashed line corresponds to the ideal relationship y=x, and the color of each scatter point represents the absolute prediction error; the darker the color, the greater the error. Overall, the scatter points for all three cases are densely distributed along the ideal line, indicating a strong consistency between the predicted and actual values. Figure 10 a, Figure 10 b and Figure 10 As can be seen from c, as the maximum output angle of the motor decreases, the error between the predicted tool face angle and the actual tool face angle gradually increases. The absolute error of most data points is less than 10°, while only a small portion (about 2%–3%) shows a deviation greater than 20°, mainly occurring in the transient angle transition or low acceleration region. The data points follow a near-perfect linear trend consistent with the ideal line, confirming that the proposed model accurately captures the variation law of the tool face angle. Compared with the traditional static estimation method, the LSTM-based method shows superior time prediction capability and angle recognition accuracy. In summary, the model maintains high prediction stability and strong generalization performance under different speed and angle settings. The close match between the predicted and actual values verifies the effectiveness of the proposed real-time prediction of the tool face angle using surface top drive parameters in sliding directional drilling.
[0150] Reference Figure 11 As shown, the specific results of the LSTM model evaluation metrics include:
[0151] Figure 11 In model a, the RMSE increases as the maximum rotation angle decreases. The "combined" dataset shows the lowest RMSE, indicating that the model is most accurate for higher angles (180°) and consistently performs well on both the training and testing datasets. For smaller angles (90°), a higher RMSE indicates less accurate predictions, possibly due to fewer obvious features in small rotations, leading to higher errors.
[0152] Figure 11 The MAE in b shows a similar trend: as the rotation angle decreases from 180° to 90°, the MAE increases, and the model performs better at larger angles with lower errors. In particular, for the test dataset, the "combined" dataset outperforms the individual "training" and "test" datasets, reflecting good generalization across angles.
[0153] Figure 11 In c, the R² value remains high throughout. The "combined" dataset shows a strong correlation, while the "test" dataset performs best at 180° (R²≈1.0, near perfect fit). When the angle decreases to 90°, the R² decreases slightly due to the greater differences caused by less clear patterns in the smaller angle data.
[0154] according to Figure 11 The three evaluation metrics yielded the same conclusion: the model's predictive performance is optimal when the motor rotation angle is large. As the maximum rotation angle decreases, the performance gradually declines, but the overall predictive effect remains good.
[0155] Furthermore, the method according to the embodiments of this application can also be achieved by means of... Figure 12 The architecture of the electronic device shown is used to implement this. For example... Figure 12 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as the ROM 503 or the hard disk 507, may store the real-time prediction method for tool face angle based on ground top drive parameters provided in this application. The electronic device 500 may also include a user interface 508. Of course, Figure 12 The architecture shown is merely exemplary and can be omitted as needed when implementing different devices. Figure 12 One or more components in the illustrated electronic device.
[0156] Figure 13 This is a schematic diagram of a computer-readable storage medium structure provided in one embodiment of this application. Figure 13The diagram illustrates a computer-readable storage medium 600 according to one embodiment of this application. The computer-readable storage medium 600 stores computer-readable instructions. When executed by a processor, the computer-readable instructions can perform a real-time tool face angle prediction method based on ground top drive parameters according to an embodiment of this application, as described with reference to the above figures. The storage medium 600 includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0157] In summary, the advantages of this invention are: using top drive parameters located on the ground to predict the tool face angle thousands of meters underground, thus avoiding data distortion caused by slow data transmission and large packet loss during the transmission of downhole signals to the ground.
[0158] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for real-time prediction of tool face angle based on ground top drive parameters, characterized in that, include: Based on the spatial structural characteristics of the drilling scenario, an experimental rig for obtaining model training parameters was constructed, and dynamic data of the simulated drill string under different combinations of ground top drive parameters were collected through the rig. The collected simulated drill string dynamic data is preprocessed to calculate the initial tool face angle, and the initial tool face angle is unwound to obtain the real tool face angle time series data. Using ground top drive parameters and corresponding real tool face angle time series data as training samples, the training set and test set are divided, and a prediction model based on LSTM neural network is constructed. The test set data is input into the trained prediction model, and the predicted tool face angle is output. RMSE, MAE, R² and prediction accuracy are used as evaluation indicators to verify the reliability of the model's prediction performance. The method for obtaining real tool face time series data includes the following steps: With the installation center of the displacement attitude sensor as the origin, the x-axis points along the drill string axis, the y-axis points to the tangent of the bottom circle, and the z-axis is perpendicular to the y-axis and points to the center of the bottom circle, thus establishing a measurement coordinate system; Based on the triaxial gravitational accelerations AccX, AccY, and AccZ collected by the displacement attitude sensor, the initial tool face angle is calculated under different ground top drive parameters based on the arctangent function. The initial tool face angle data is processed based on the unwinding algorithm to obtain the real tool face angle timing data; The actual tool face angle time series data is verified by calculating the absolute value of the difference between adjacent sampling points and determining whether all differences are less than the preset jump threshold. If yes, the unwinding is successful, and the verified data is recorded as real tool face angle time series data for model training. If no, the data set is deemed unqualified and removed from the training samples.
2. The method for real-time prediction of tool face angle based on ground top drive parameters according to claim 1, characterized in that, The step of constructing a model training parameter acquisition experimental rig based on the spatial structural characteristics of the drilling scenario, and collecting simulated drill string dynamic data under different combinations of surface top drive parameters using this rig, specifically includes: Based on the spatial structural characteristics of the drilling scenario, a model training parameter acquisition experimental platform is constructed. The experimental platform consists of a power supply, a central control unit, an electrical box, a motor bracket, a servo motor, a coupling, a simulated drill string, a simulated drilling tool, a displacement attitude sensor, a universal joint, a simulated formation, a simulated wellbore, and an experimental platform. By setting different combinations of ground top drive parameters at the central control terminal, test experiments were conducted using the controlled variable method, with the experiment under the same parameter combination repeated at least three times. In each experiment, the servo motor was controlled to run according to the set parameter combination, and the dynamic data of the simulated drill string was collected synchronously through the displacement attitude sensor. The collected simulated drill string dynamic data is transmitted to the central control unit via Bluetooth for storage; The ground top drive parameters include at least: maximum motor output angle, maximum motor output speed, motor rotation cycle, signal sampling frequency, and drill rod length; The simulated drill string dynamic data includes at least: rotational speed, maximum rotation angle, number of rotations, data update cycle, real-time rotation angle, and triaxial gravitational accelerations AccX, AccY, and AccZ.
3. The method for real-time prediction of tool face angle based on ground top drive parameters according to claim 2, characterized in that, The process of using ground top drive parameters and corresponding real toolface angle time-series data as training samples, dividing the data into training and testing sets, and constructing a prediction model based on an LSTM neural network specifically includes: The input features of the training samples consist of ground top drive parameters within a fixed-length S-time window and corresponding real toolface angle time-series data; The output target is the prediction tool facet angle one time step T after the time window S; The input features are preprocessed, including at least one-hot encoding of categorical variables, linear interpolation to fill missing data, and normalization of numerical features to the [0,1] interval. The preprocessed dataset is divided into a training set and a test set according to the proportions. The test set must contain samples with different combinations of top driving parameters. Construct a neural network prediction model containing M LSTM layers, where the number of hidden units in the LSTM layers is H; A loss function is constructed with the objective of minimizing the mean square error between the tool face angle predicted by the model and the actual tool face angle. The Adam optimizer is used, the batch size is set to B, the model is trained iteratively, and an early stopping mechanism is used to prevent overfitting. The model that performs best on the test set after training is defined as the final prediction model based on LSTM neural network.
4. The method for real-time prediction of tool face angle based on ground top drive parameters according to claim 3, characterized in that, The process of inputting test set data into the trained prediction model, outputting the prediction tool facet angle, and using RMSE, MAE, R², and prediction accuracy as evaluation metrics to verify the reliability of the model's prediction performance specifically includes: The ground top drive parameters of the test set are input into the prediction model based on the LSTM neural network, and the prediction tool face angle is output. Based on the RMSE, MAE, and R² formulas, the root mean square error, mean absolute error, and coefficient of determination of the predicted tool face angle and the actual tool face angle are calculated respectively. The number of statistical prediction tool face angles whose absolute difference from the actual tool face angle is no greater than a preset angle threshold is calculated, and the proportion of this number in the sample is used as the model prediction accuracy. The reliability of the model's prediction performance is verified based on the values of RMSE, MAE, R², and prediction accuracy. The smaller the RMSE and MAE, the closer R² is to 1, the smaller the prediction error, and the better the model's fitting performance.
5. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform a real-time prediction method for tool face angle based on ground top drive parameters as described in any one of claims 1-4.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the real-time prediction method for tool face angle based on ground top drive parameters as described in any one of claims 1-4.
Citation Information
Patent Citations
Electromagnetic method for obtaining dip azimuth angle
CN104350396A
Sliding steering drilling tool face angle change experiment system and using method thereof
CN112412337A