A pi-clformer-based risk prediction model for sticking

By integrating drilling physics models and deep learning into the Pi-CLFormer model, the accuracy and efficiency issues in stuck pipe risk prediction are solved, enabling early warning and efficient monitoring. It is applicable to oil drilling and downhole tool condition monitoring.

CN120257824BActive Publication Date: 2026-06-23SOUTHWEST PETROLEUM UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2025-03-31
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient accuracy, low computational efficiency, and weak early warning capabilities in predicting stuck drill risks. In particular, data-driven models ignore physical laws, while physical models struggle to handle high-dimensional dynamic data.

Method used

The Pi-CLFormer model is adopted, which integrates the drilling speed model, friction torque model and drill string mechanics model, and combines the Physical Information Neural Network (PINN) with the improved Transformer architecture. It introduces local attention mechanism and gating mechanism to realize the dynamic fusion of physical features and data features for stuck drill risk prediction.

Benefits of technology

It improves the accuracy and computational efficiency of drill bit stuck risk prediction, enables early identification of early signs of drill bit stuck, provides reliable early warning capabilities, and is suitable for equipment safety monitoring under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_9
    Figure QLYQS_9
Patent Text Reader

Abstract

The present application relates to a kind of Pi-CLFormer-based pipe sticking risk prediction model, belong to the field of oil engineering drilling safety monitoring, to solve the problems such as insufficient precision of traditional pipe sticking prediction model, low calculation efficiency and serious data dependence.The physical information neural network is embedded into the hybrid architecture of CNN-Transformer, the calculation complexity is reduced by local attention mechanism, and then the adaptive gating mechanism is combined to realize high-precision real-time prediction of pipe sticking risk.The present application solves the problems such as high calculation complexity of standard Transformer, which is difficult to be used for real-time detection, and physical information is diluted in deep network, significantly improves the accuracy and timeliness of pipe sticking prediction, and can be widely used in the field of oil drilling safety monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent monitoring technology in petroleum engineering, specifically to a stuck drill risk prediction model based on Pi-CLFormer. Background Technology

[0002] In oil drilling engineering, stuck pipe accidents are one of the main risks leading to unplanned drilling shutdowns, equipment wear and tear, and increased operating costs. Stuck pipe is usually caused by factors such as abnormal friction between the drill string and the wellbore, cuttings accumulation, or sudden formation changes. Its occurrence is sudden and insidious, and if not warned in time, it may lead to serious consequences such as drill string breakage and wellbore instability.

[0003] With the increasing complexity of drilling conditions and the rise in data dimensionality, traditional stuck pipe risk prediction methods have gradually revealed the following limitations: insufficient data-driven capabilities, such as statistical regression or threshold-based early warning mechanisms based on historical data; disconnect between physical mechanisms and data models, for example, while mechanical models based on finite element analysis can describe drill string vibration characteristics, their calculations are time-consuming and difficult to update in real time, while purely data-driven models such as LSTM and CNN can extract temporal features but cannot explain the physical meaning of key risk indicators (such as torque gradient and lateral vibration); and weak early warning capabilities, for example, methods based on support vector machines (SVM) have low sensitivity to low signal-to-noise ratio features, and while convolutional neural networks (CNN) can capture local patterns, they are difficult to establish long-range dependencies and cannot effectively link early anomalies with subsequent risk evolution.

[0004] In existing technologies, while purely data-driven models (such as LSTM and CNN) can extract temporal features, they neglect the constraints of physical laws; and while physical models are highly interpretable, they struggle to handle high-dimensional dynamic data. Therefore, an innovative method that integrates physical laws and deep learning is urgently needed. Against this backdrop, this invention proposes to construct the Pi-CLFormer model, which combines the advantages of physical law guidance and data-driven approaches, by fusing a Physical Information Neural Network (PINN) with an improved Transformer architecture. This aims to overcome the performance bottlenecks of traditional methods and provide reliable technical support for intelligent drilling. Summary of the Invention

[0005] This invention primarily overcomes the shortcomings of existing technologies, aiming to address issues such as insufficient accuracy, low computational efficiency, heavy data dependence, and weak early warning capabilities. It provides a Pi-CLFormer-based stuck drill risk prediction model. This model extracts the physical features of the drill bit during operation by incorporating drilling speed, friction torque, and drill string mechanics models into a PINN; it reduces computational complexity by combining local attention mechanisms and convolutional neural networks; it introduces a gating mechanism to periodically fuse physical features and deep learning features; and it outputs the stuck drill risk level based on multi-scale features and a classification head network. The overall Pi-CLFormer model structure flowchart of this invention is shown below. Figure 1 As shown.

[0006] To achieve the above technical objectives, the present invention adopts the following technical solution:

[0007] A Pi-CLFormer-based stuck drill risk prediction model, characterized in that the model algorithm implementation includes the following steps:

[0008] S1: Data Acquisition and Preprocessing: Sensors acquire real-time data on drill bit weight (WOB), rotational speed (RPM), torque, triaxial vibration, well inclination angle, and depth; data is preprocessed through data cleaning, wavelet transform denoising, physical feature engineering, Z-score normalization, and time window alignment;

[0009] S2: The PINN module extracts physical model features from preprocessed drilling data, including normal operation, signs of stuck pipe, critical stuck pipe conditions, drilling speed, friction torque, and drill string mechanics during stuck pipe conditions. These features are then combined to form a stuck pipe risk profile. The PINN flowchart is shown below. Figure 2 As shown;

[0010] S3: Combine the data features generated by the PINN module with the original data features;

[0011] S4: Utilize 1D convolutional layers with residual connections to process the combined features;

[0012] S5: Perform position encoding;

[0013] S6: The data features are further processed using a Transformer model (Longformer) with a local attention mechanism. During this process, the physical feature vectors generated by PINN are periodically fused with the output of the local attention module through a physical feature gating fusion mechanism to ensure that the physical features are not diluted during feature extraction. The flowchart of the physical feature gating fusion mechanism is shown below. Figure 3 As shown;

[0014] S7: Uses multi-scale feature fusion and a classification head network for classification prediction, and outputs four types of stuck drill risk levels.

[0015] Furthermore, the physical feature engineering in step S1 includes card residual features, gradient feature extraction, and filtering, which provide important information for PINN to compensate for the deficiencies of the theoretical model.

[0016] Furthermore, the drilling rate model in step S2 is as follows:

[0017] ;

[0018] In the formula, ROP is the drilling speed, WOB is the drilling pressure, RPM is the rotational speed, UCS is the uniaxial compressive strength, and k, a, b, and c are model parameters.

[0019] Furthermore, the friction torque model in step S2 is as follows:

[0020] ;

[0021] ;

[0022] ;

[0023] ;

[0024] ;

[0025] In the model Based on the coefficient of friction, The dynamic friction coefficient, The well inclination angle is an influencing factor. As a deep impact factor, It is a drilling fluid influencing factor. For cutting torque, Where is the drill bit diameter, and WOB is the drill pressure. The factor affecting rotational speed. For frictional torque, For total torque, This represents the friction cutting torque ratio.

[0026] Furthermore, the drill string mechanical model in step S2 is as follows:

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] In the model, Lav represents lateral vibration. Radial clearance influence factor, As a length-related factor, It is an axial vibration. To comprehensively measure the vibration amplitude, This represents the lateral axial vibration ratio.

[0032] Furthermore, the characteristics of the pre-stuck drill bit signs extracted by PINN in step S2 can be described by the indicators of a sharp increase in torque, abnormal lateral vibration, abnormal lateral-axial ratio, and the interaction between lateral vibration and torque gradient, as mathematically expressed below:

[0033] Indicator of sharp increase in torque:

[0034] ;

[0035] in For torque gradient, It is the sigmoid function;

[0036] Transverse vibration anomaly indicators:

[0037] ;

[0038] Abnormal index of lateral-axial ratio:

[0039] ;

[0040] Torque gradient interaction:

[0041] ;

[0042] Furthermore, in step S3, the 1D convolutional layer has kern_size=3, simultaneously capturing information from three consecutive time steps, and residual connections are achieved through the Add layer;

[0043] Furthermore, the local attention mechanism in step S5 is as follows: Given an input sequence [B,T,D], where B is the batch size, T is the sequence length, and D is the feature dimension, the input sequence is sequentially subjected to linear projection transformation, multi-head segmentation and transformation, local window attention calculation, attention score calculation, weight normalization, and output transformation. The local attention mechanism can be represented by the following mathematical model:

[0044] Perform linear projection transformation:

[0045] ;

[0046] Multi-head splitting and transformation:

[0047] ;

[0048] ;

[0049] ;

[0050] Local window attention calculation:

[0051] ;

[0052] ;

[0053] Attention score calculation:

[0054] ;

[0055] Weight normalization and output transformation:

[0056] ;

[0057] ;

[0058] ;

[0059] Furthermore, the physical feature gating mechanism in step S6 is implemented using the following formula, thereby controlling the injection frequency of physical information in the deep network:

[0060] ;

[0061] ;

[0062] In the formula Represents the Hadamard product. Control the weights of attention output. It is the Sigmoid activation function. For learnable weight matrix, For learnable paranoia, It is the output of the local attention mechanism. It refers to physical characteristics.

[0063] Furthermore, the risk level classification rules in step S7 are as follows: no risk: 0.00-0.25, low risk: 0.25-0.5, medium risk: 0.50-0.75, and high risk: 0.75-1.00;

[0064] Furthermore, the model adopts the following optimization strategy: using the AdamW optimizer with weight decay and gradient clipping, as shown in the following formula:

[0065] ;

[0066] gradient through Cut it. Time weight decay coefficient; the learning rate scheduling uses the ReduceLROnPlateau strategy, which reduces the learning rate when the validation loss stops improving.

[0067] This invention provides a Pi-CLFormer-based stuck pipe risk prediction model, which constructs a physically interpretable prediction framework by deeply integrating drilling physics mechanisms with deep learning technology. The model innovatively employs a multi-physical feature dynamic fusion mechanism, embedding three core physical equations—drilling rate model, friction torque model, and drill string mechanics model—into PINN, and using a gated attention mechanism to achieve dynamic weighted fusion of physical features and data-driven features. By employing a local sliding window attention mechanism and multi-scale feature fusion technology, it effectively captures short-term abrupt changes and long-term trend features of stuck pipe precursors. Combined with a periodic physical constraint injection strategy, it significantly improves prediction accuracy while ensuring model generalization ability. This architecture is not only applicable to oil and gas drilling scenarios, but its physical-data dual-drive framework can also be extended to industrial fields such as geological exploration and downhole tool condition monitoring, providing a general technical solution for equipment safety prediction under complex operating conditions.

[0068] Beneficial Effects: This invention provides a stuck pipe risk prediction model based on Pi-CLFormer. By deeply embedding the drilling speed model, friction torque model, and drill string mechanics model into the Transformer architecture, a physically interpretable feature extraction framework is constructed. A dynamic gated feature fusion mechanism is proposed, which effectively captures the transient impact signals and progressive degradation trends of early signs of stuck pipe through sliding window local attention and multi-scale residual connection technology. This overcomes the problems of insufficient early warning capability, high computational complexity, and disconnect between physical mechanisms and data models in existing technologies. This model framework is not only applicable to oil and gas drilling condition monitoring, but can also be extended to industrial scenarios such as geological structure identification and downhole tool failure early warning after parameter adaptation, providing a general solution for the safety prediction of complex dynamic systems. Attached Figure Description

[0069] Figure 1 Here is a flowchart of the overall model structure of Pi-CLFormer;

[0070] Figure 2 Here is a flowchart of the PINN structure;

[0071] Figure 3 A flowchart illustrating the principle of the physical feature gating fusion mechanism;

[0072] Figure 4 This is a confusion matrix diagram;

[0073] Figure 5 The graph shows the model loss and accuracy. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0075] Example: A stuck drill risk prediction model based on Pi-CLFormer, the specific implementation method includes the following steps:

[0076] S1: Data is collected from the drilling sensors of drill bits that have experienced stuck pipe events. The raw data is cleaned and normalized. Based on the sensor data and the actual stuck pipe situation, the stuck pipe risk level is labeled. The stuck pipe risk level is divided into four categories with values ​​from 0 to 1: No risk: 0.00-0.25, Low risk: 0.25-0.5, Medium risk: 0.50-0.75, and High risk: 0.75-1.00. The dataset includes drilling pressure, drilling speed, torque, depth, well inclination angle, X-axis vibration, Y-axis vibration, Z-axis vibration, and the labeled stuck pipe risk level.

[0077] S2: Train the Pi-CLFormer model using the dataset described above;

[0078] The dataset in S2 is divided as follows: 70% training set, 15% validation set, and 15% test set. The core parameters of the Pi-CLFormer model are configured as follows: the time step size of the input sequence (time_steps) is set to 50, the hidden layer dimension (d_model) is set to 512, the number of attention heads (n_heads) is set to 4, the number of Transformer encoder layers (n_encorder_layers) is set to 4, the window size of the local attention (windows_size) is set to 8, the dropout rate (dropout_rate) is set to 0.25, the number of units in the physics information neural network layer (pinn_units) is set to 32, the 1D convolutional layer (kern_size) is set to 3, the stride is set to 1, the activation function is set to ReLU, and the physics fusion interval (physics_fusion_interval) is set to 2.

[0079] The model uses a sparse classification cross-entropy loss function with class weights:

[0080] ;

[0081] In the formula Indicates the loss value. It is the sample size. It is the number of categories. It is a category Weights (used to balance the importance of different categories) It is a sample Real labels in categories One-hot encoding on The model predicts the sample. Category The probability of.

[0082] The following optimization techniques were applied to the model:

[0083] The AdamW optimizer is used with weight decay and gradient pruning. The learning rate scheduling adopts the ReduceLROnPlateau strategy, which reduces the learning rate when the validation loss stops improving. The ReduceLROnPlateau strategy can be implemented using the ReduceLROnPlateau library in Keras. An early stopping strategy is adopted: monitor the validation loss with patience=15, and stop training and restore the optimal weights when the validation loss no longer decreases.

[0084] S3: Analyze the model's classification results, generate accuracy, precision, recall, and F1-score metrics, and output a confusion matrix for visualization. Figure 4 As shown, the output loss versus accuracy curve is as follows: Figure 5 As shown.

[0085] S4: Once all indicators are qualified, the trained drill bit stuck risk prediction model can be used to predict the drill bit stuck risk in real time.

[0086] The classification results of the Pi-CLFormer-based stuck drill risk prediction model are shown in Table 1.

[0087] Table 1. Model Classification Performance Indicators

[0088] Accuracy Precision Recall F1-Score 0.9487 0.9504 0.9563 0.9533

[0089] This invention provides a Pi-CLFormer-based stuck pipe risk prediction model. Based on the drilling rate dynamics equation, friction torque model, and drill string mechanics equation, it deeply embeds these three core physical laws into the Transformer architecture to construct a physically interpretable feature extraction system. A dynamic gated physical fusion mechanism is proposed, effectively capturing early signs of stuck pipe and progressive degradation trends through sliding window local attention and multi-scale residual connection techniques. The model employs a periodic physical constraint injection strategy, intermittently fusing interpretable feature vectors at the Transformer encoding layer. This technical framework is not only applicable to real-time monitoring of oil and gas drilling conditions but can also be extended to industrial scenarios such as downhole tool failure early warning after parameter adaptation, providing a general solution for the safe prediction of complex dynamic systems that combines physical interpretability and engineering applicability.

[0090] The above description is not intended to limit the present invention in any way. Although the present invention has been disclosed through the above embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A stuck drill risk prediction model based on Pi-CLFormer, characterized in that, Includes the following steps: S1: Real-time acquisition of multi-source sensor data during the drilling process, including drilling pressure (WOB), rotational speed (RPM), torque, triaxial vibration, well inclination angle, and depth; S2: Preprocessing and physical feature engineering of the raw data, including data cleaning, wavelet transform denoising, physical feature engineering, Z-score normalization and time window alignment; S3: Extract relevant physical features of stuck drill through the Physical Information Neural Network (PINN) layer; S4: After splicing and fusing physical features and data features, the data is then processed through a 1D convolutional layer with residual connections. S5: Perform position encoding; S6: Input the location-encoded features into the Transformer model with a local sliding window attention mechanism to further extract data features, and use a gating fusion mechanism to dynamically weight physical features and data features; The local sliding window attention mechanism includes performing a linear projection transformation on the input sequence to obtain a query vector Q, a key vector K, and a value vector V, and calculating an attention score and weights based on the sliding window constraint; and dynamically weighting physical features and data features using a gating fusion mechanism, which includes concatenating the output of the local attention mechanism with physical features, generating control weights through a sigmoid activation function, and performing a weighted summation of the output of the local attention mechanism and physical features based on these weights. S7: Integrates features at different levels of abstraction through a multi-scale feature fusion layer, inputs them into the classification head network, and outputs the risk level of the stuck drill.

2. The stuck drill risk prediction model as described in claim 1, characterized in that, The Physical Information Neural Network (PINN) layer in step S3 specifically includes: a drilling speed model, a friction torque model, and a drill string mechanics model.

3. The stuck drill risk prediction model as described in claim 1, characterized in that, The Transformer model with a local sliding window attention mechanism in step S6 includes the following components: local sliding window attention mechanism; periodic physical feature fusion: physical feature fusion is performed every 3 Transformer layers; physical information gating fusion mechanism.

4. The stuck drill risk prediction model as described in claim 3, characterized in that, The mathematical expression for the physical information gating fusion mechanism is: ; ; In the formula G represents the Hadamard product, where G controls the attention output weights. It is the Sigmoid activation function. For learnable weight matrix, For learnable paranoia, It is the output of the local attention mechanism. It refers to physical characteristics.

5. The stuck drill risk prediction model as described in claim 1, characterized in that, The Pi-CLFormer model parameters are configured as follows: Transformer encoder layers: 4 layers, hidden layer dimension: 512; multi-head attention heads: 4 heads; Dropout ratio: 0.

25.

6. The stuck drill risk prediction model as described in claim 1, characterized in that, The model training employs the following strategies: Optimizer: AdamW with weight decay; Early stopping strategy: Training terminates when the validation set loss fails to decrease for 15 consecutive rounds; The loss function is cross-entropy with class weights, and the formula is: ; Indicates the loss value. It is the sample size. It is the number of categories. It is a category The weights are used to balance the importance of different categories. It is a sample Real labels in categories One-hot encoding on The model predicts the sample. Category The probability of.