Drill jamming risk prediction model based on Pi-CLFormer
Through the Pi-CLFormer model, the accuracy and efficiency problems of the traditional drilling prediction model are solved, and high-precision drilling risk prediction and early warning are achieved, which is suitable for oil drilling and underground tool monitoring.
Patent Information
- Application Number
- CN202510388089.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-03-31
AI Technical Summary
The traditional drilling risk prediction model has insufficient accuracy, low computing efficiency, and serious data dependence, weak early warning capabilities, and it is difficult for the existing technology to effectively combine physical laws and data-driven methods.
The Pi-CLFormer model is adopted, and by fusing the drilling speed model, friction resistance torque model and drill string mechanics model, combined with the local attention mechanism and gating mechanism, a physical information neural network (PINN) and a Transformer architecture are constructed to realize the dynamic fusion of physical characteristics and data characteristics, and to capture the short-term mutation characteristics and long-term trend characteristics of the precursor of the drilling.
It significantly improves the accuracy and timeliness of drilling risk prediction, provides early warning capabilities, is suitable for oil drilling safety monitoring and can be extended to geological exploration and downhole tool status monitoring.
Smart Images

Figure BDA0005336653920000031 
Figure BDA0005336653920000032 
Figure BDA0005336653920000033
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring in petroleum engineering, and particularly relates to a sticking risk prediction model based on Pi-CLFormer. Background Art
[0002] In petroleum drilling engineering, sticking accidents are one of the main risks leading to unplanned drilling stops, equipment wear, and increased operating costs. Sticking is usually caused by factors such as abnormal friction between the drill string and the wellbore, cuttings accumulation, or formation mutation. Its occurrence is sudden and concealed. If not timely warned, it may cause serious consequences such as drill string fracture and wellbore instability.
[0003] With the complexity of drilling conditions and the increase in data dimensions in traditional sticking risk prediction methods, the following limitations of the existing technology have gradually emerged: insufficient data-driven ability, such as statistical regression or threshold warning mechanisms based on historical data; disconnection between physical mechanisms and data models. For example, although the mechanical model based on finite element analysis can describe the vibration characteristics of the drill string, its calculation is time-consuming and difficult to update in real time. While pure data-driven models such as LSTM and CNN can extract time series features, they cannot explain the physical meaning of key risk indicators (such as torque gradient and lateral vibration); weak early warning ability. For example, the method based on support vector machine (SVM) is less sensitive to low signal-to-noise ratio features, and although the convolutional neural network (CNN) can capture local patterns, it is difficult to establish long-range dependencies and cannot effectively associate early anomalies with subsequent risk evolution.
[0004] In the existing technology, pure data-driven models (such as LSTM and CNN) can extract time series features but ignore the constraints of physical laws; while physical models have strong interpretability but are difficult to process high-dimensional dynamic data. Therefore, there is an urgent need for an innovative method that combines physical laws and deep learning. The present invention is proposed in this context. By integrating the physics-informed neural network (PINN) and the improved Transformer architecture, a Pi-CLFormer model with the advantages of both physical law guidance and data-driven is constructed to break through the performance bottleneck of traditional methods and provide reliable technical support for intelligent drilling. Summary of the Invention
[0005] The present invention mainly overcomes the deficiencies in the prior art. The present invention aims to solve the problems of insufficient accuracy, low calculation efficiency, serious data dependence, and weak early warning ability, and provides a sticking risk prediction model based on Pi-CLFormer. By adding a drilling rate model, a friction and torque model, and a drill string mechanics model to the PINN to extract the physical characteristics of the drill bit during operation; combining a local attention mechanism and a convolutional neural network to reduce the computational complexity; introducing a gating mechanism to periodically fuse physical features and deep learning features; and outputting the sticking risk level based on multi-scale features and a classification head network. The overall model structure flowchart of the Pi-CLFormer of the present invention is as Figure 1 shown.
[0006] To achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] A sticking risk prediction model based on Pi-CLFormer, characterized in that the model algorithm implementation includes the following steps:
[0008] S1: Data collection and preprocessing: Sensors collect the weight on bit (WOB), rotary speed (RPM), torque, three-axis vibration, well inclination angle, and well depth in real time; the data is preprocessed through data cleaning, wavelet transform denoising, physical feature engineering, Z-score standardization, and time window alignment.
[0009] S2: The PINN module extracts the physical model features of the drilling rate, friction torque, and drill string mechanics during normal operation, sticking precursors, sticking critical points, and sticking from the preprocessed drilling data, and interacts these features to combine them into sticking risk features. The PINN structure flowchart is as Figure 2 shown;
[0010] S3: Combine the data features generated by the PINN module and the original data features.
[0011] S4: Process the combined features using a 1D convolutional layer with residual connections.
[0012] S5: Perform positional encoding.
[0013] S6: Further process the data features using a Transformer model (Longformer) with a local attention mechanism. During this process, the physical feature vectors generated by the PINN will be 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 the feature extraction process. The principle flowchart of the physical feature gating fusion mechanism is as Figure 3 shown;
[0014] S7: Perform classification prediction using multi-scale feature fusion and a classification head network, and output four types of sticking risk levels.
[0015] Furthermore, in the physical feature engineering of step S1, it includes stuck pipe residual features, gradient feature extraction, and filtering, which are important information for compensating for the deficiencies of the theoretical model of PINN.
[0016] Furthermore, the penetration rate model in step S2 is as follows:
[0017]
[0018] In the formula, ROP is the penetration rate, WOB is the weight on bit, RPM is the rotational speed, UCS is the uniaxial compressive strength, and k, a, b, c are model parameters.
[0019] Furthermore, the friction torque in step S2 is as follows:
[0020] μ d = μ b ·F incl ·F depth ·F mud
[0021]
[0022] T = T c + T f
[0023]
[0024] In the model, μ b is the base friction coefficient, μ d is the dynamic friction coefficient, F incl is the well deviation angle influence factor, F depth is the well depth influence factor, F mud is the drilling fluid influence factor, Tc is the cutting torque, D bit is the bit diameter, WOB is the weight on bit, F rpm is the rotational speed influence factor, T f is the friction torque, T is the total torque, and Fcr is the friction cutting torque ratio.
[0025] Furthermore, the drill string mechanical model in step S2 is as follows:
[0026]
[0027] In the model, Lav is the lateral vibration, C f is the radial clearance influence factor, L f is the length influence factor, Axv is the axial vibration, Vim is the comprehensive vibration amplitude, and Lar is the lateral-axial vibration ratio.
[0028] Furthermore, the characteristics of the stuck drill precursor extracted by PINN in step S2 can be described by the torque sharp rise index, the lateral vibration anomaly index, the lateral axial ratio anomaly index, and the interaction between lateral vibration and torque gradient. The mathematical expressions are as follows:
[0029] Torque sharp rise index:
[0030]
[0031] where is the torque gradient, and σ is the sigmoid function;
[0032] Lateral vibration anomaly index:
[0033] Lateral_Vibration_Anomaly = σ(3.0·Lav - 1.0)
[0034] Lateral axial ratio anomaly index:
[0035] Ratio_Anomaly = σ(Lar - 2.0)
[0036] Torque gradient interaction:
[0037]
[0038] Furthermore, in step S3, kern_size = 3 in the 1D convolutional layer, capturing the information of three consecutive time steps simultaneously, and implementing residual connection through the Add layer;
[0039] Furthermore, the process of the local attention mechanism in step S5 is as follows: Given the 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 splitting 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:
[0040] Perform linear projection transformation:
[0041] Q = XW Q , K = XW K , V = XW V
[0042] Multi-head splitting and transformation:
[0043] Q′ = Reshape(Q, [B, T, H, d k )
[0044] K′ = Reshape(K, [B, T, H, d k )
[0045] V' = Reshape(V, [B, T, H, d k )
[0046] Local window attention calculation:
[0047]
[0048] Attention score calculation:
[0049]
[0050] Weight normalization and output transformation:
[0051] Attention_Weightsi = Softmax(Scores i )
[0052] Output i = Attention_Weights i ·V' start_idx:end_idx
[0053] Final_Output = Concat(Output)·W O
[0054] Furthermore, the implementation formula of the physical feature gating mechanism in step S6 is as follows to control the injection frequency of physical information in the deep network:
[0055] G = σ(W g ·[A, P] + b g )
[0056] Output = G⊙A + (1 - G)⊙P
[0057] where ⊙ represents the Hadamard product, G controls the attention output weight, σ is the Sigmoid activation function, W g is the learnable weight matrix, b g is the learnable bias, A is the output of the local attention mechanism, and P is the physical feature.
[0058] Furthermore, the four - category risk level division rules in step S7 are: Risk - free: 0.00 - 0.25, Low risk 0.25 - 0.5, Medium risk 0.50 - 0.75, and High risk 0.75 - 1.00;
[0059] Furthermore, the model adopts the following optimization strategy: Use the AdamW optimizer with weight decay and gradient clipping, and the formula is as follows:
[0060]
[0061] The gradient is clipped by η, where λ is the weight decay coefficient; the learning rate scheduling uses the ReduceLROnPlateau strategy to reduce the learning rate when the validation loss stops improving.
[0062] A sticking risk prediction model based on Pi-CLFormer provided by the present invention constructs a physically interpretable prediction framework by deeply integrating the physical mechanisms in the drilling field and deep learning techniques. The model innovatively adopts a multi-physical feature dynamic fusion mechanism, embeds three core physical equations, namely the drilling rate model, the friction and torque model, and the drill string mechanics model, into PINN, and realizes the dynamic weighted fusion of physical features and data-driven features through a gated attention mechanism. By adopting a local sliding window attention mechanism and multi-scale feature fusion technology, it effectively captures the short-term mutation features and long-term trend features of sticking precursors, and combines a periodic physical constraint injection strategy to significantly improve the prediction accuracy while ensuring the generalization ability of the model. This architecture is not only applicable to the oil and gas drilling scenario, but its physical-data dual-driven framework can also be extended to industrial fields such as geological exploration and downhole tool status monitoring, providing a general technical solution for equipment safety prediction under complex working conditions.
[0063] Advantages:
[0064] Compared with the prior art, the present invention has the following advantages:
[0065] The present invention provides a sticking risk prediction model based on Pi-CLFormer. By deeply embedding the drilling rate model, the friction torque model, and the drill string mechanics model into the Transformer architecture, a physically interpretable feature extraction framework is constructed. A dynamic gated feature fusion mechanism is proposed. Through the sliding window local attention and multi-scale residual connection technology, it effectively captures the transient impact signal and progressive degradation trend of sticking precursors, overcoming the problems of insufficient early warning ability for sticking, high computational complexity, and disconnection between physical mechanisms and data models in the prior art. This model framework is not only applicable to the monitoring of oil and gas drilling working conditions, but can be extended to industrial scenarios such as geological structure identification and downhole tool failure warning after parameter adaptation, providing a general solution for the safety prediction of complex dynamic systems. Brief Description of the Drawings
[0066] Figure 1 It is the overall model structure flow chart of Pi-CLFormer;
[0067] Figure 2 It is the structure flow chart of PINN;
[0068] Figure 3 It is the principle flow chart of the physical feature gated fusion mechanism;
[0069] Figure 4 It is the confusion matrix diagram;
[0070] Figure 5 For the model loss and accuracy curves; Specific implementation manners
[0071] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0072] Embodiment:
[0073] A sticking risk prediction model based on Pi-CLFormer, and the specific implementation method includes the following steps:
[0074] S1: Collect data from the downhole sensors of the drill bits that have experienced sticking, and perform data cleaning and normalization on the original data. Combine the sensor data to label the sticking risk level according to the actual sticking situation of the drill string. The sticking risk level is divided into four categories with values from 0 to 1, namely: 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 data set includes weight on bit, rotary speed, torque, well depth, well inclination angle, vibration in the X-axis, vibration in the Y-axis, vibration in the Z-axis, and the labeled sticking risk level;
[0075] S2: Use the above data set to train the Pi-CLFormer model;
[0076] The data set division method in S2 is as follows: 70% for the training set, 15% for the validation set, and 15% for the test set. The core parameter configurations in the Pi-CLFormer model are as follows: the time step time_steps of the input sequence is set to 50, the dimension d_model of the model hidden layer is set to 512, the number of attention mechanism heads n_heads is set to 4, the number of Transformer encoder layers n_encorder_layers is set to 4, the window size windows_size of the local attention is set to 8, the Dropout ratio dropout_rate is set to 0.25, the number of units pinn_units in the physical information neural network layer is set to 32, the kern_size of the 1D convolutional layer is set to 3, the stride stride is 1, the activation function is set to relu, and the physical feature fusion interval physics_fusion_interval is set to 2.
[0077] The model uses a sparse categorical cross-entropy loss function with class weights:
[0078]
[0079] In the formula represents the loss value, N is the number of samples, C is the number of classes, and w c is the weight of class c (used to balance the importance of different classes), y i,c is the one-hot encoding of the true label of sample i on class c, and p i,c is the probability that the model predicts that sample i belongs to class c.
[0080] The following optimization techniques are adopted for the model:
[0081] Use the AdamW optimizer with weight decay and gradient clipping. 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 ReduceLROnPlateau in the Keras library. Adopt the early stopping strategy: monitor the validation set loss, patience = 15, and stop training and restore the best weights when the validation loss no longer decreases.
[0082] S3: Analyze the classification results of the model, generate metrics such as accuracy, precision, recall, and F1-score, and output the confusion matrix for visualization as Figure 4 shown, and output the loss-accuracy curve as Figure 5 shown.
[0083] After all indicators are qualified, the trained sticking risk prediction model can be used to predict the real-time sticking risk of the drill bit.
[0084] The classification result metrics of the sticking risk prediction model based on Pi-CLFormer are shown in Table 1.
[0085] Table 1 Model classification performance metrics
[0086] Accuracy Precision Recall F1-Score 0.9487 0.9504 0.9563 0.9533
[0087] A stuck-pipe risk prediction model based on Pi-CLFormer provided by the present invention uses the drilling rate equation, the friction and torque equation, and the drill string mechanics equation as the basic theoretical framework. By deeply embedding the three core physical laws into the Transformer architecture, a feature extraction system with physical interpretability is constructed. A dynamic gating physical fusion mechanism is proposed, and through the sliding window local attention and multi-scale residual connection technologies, the signals of stuck-pipe precursors and the progressive deterioration trend are effectively captured. The model adopts a periodic physical constraint injection strategy to intermittently fuse interpretable feature vectors in the Transformer encoding layer. This technical framework is not only applicable to the real-time working condition monitoring of oil and gas drilling, but can be extended to industrial scenarios such as downhole tool failure warning after parameter adaptation, providing a general solution with both physical interpretability and engineering applicability for the safety prediction of complex dynamic systems.
[0088] As mentioned above, there is no restriction on the present invention in any form. 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 form equivalent embodiments with equivalent changes within the scope of the technical solution of the present invention. However, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A stuck pipe risk prediction model based on Pi-CLFormer, characterized in that, It includes the following steps: S1: Real-time collect multi-source sensing data during the drilling process, including weight on bit (WOB), rotary speed (RPM), torque, three-axis vibration acceleration, well inclination angle, and well depth; S2: Preprocess the original data and perform physical feature engineering, including denoising, missing value filling, Z-score normalization, etc.; S3: Extract physical features related to stuck pipe through a physics-informed neural network (PINN) layer, including indicators such as drilling speed gradient, torque gradient, and three-axis vibration anomalies; S4: After splicing and fusing the physical features and data features, pass through a 1D convolutional layer; S5: Input the features into the Pi-CLFormer model, further extract data features through a local sliding window attention mechanism, and use a gated fusion mechanism to dynamically weight the physical features and data features; S6: Integrate features at different abstraction levels through a multi-scale feature fusion layer, and input to the classification head network to output the stuck pipe risk level.
2. The stuck pipe risk prediction method according to claim 1, wherein The physics-informed 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 sticking risk prediction method according to claim 1, wherein The Pi-CLFormer model in step S5 includes the following components: a local sliding window attention mechanism; periodic physical feature fusion: perform physical feature fusion every 3 layers of Transformer; a physics-informed gated fusion mechanism.
4. The sticking risk prediction method according to claim 3, wherein The mathematical expression of the physics-informed gated fusion mechanism is: G = σ(W g ·[A, P] + b g ) Output = G ⊙ A+(1 - G) ⊙ P, where ⊙ represents the Hadamard product, G controls the attention output weight, σ is the Sigmoid activation function, W g is a learnable weight matrix, b g is a learnable bias, A is the output of the local attention mechanism, and P is the physical feature.
5. The stuck pipe risk prediction method according to claim 1, characterized in that, The parameter configuration of the Pi-CLFormer model in step S5 is: number of Transformer encoder layers: 4 layers, hidden layer dimension is 512; number of multi-head attention heads: 4 heads, key-value dimension is 64; feed-forward neural network: two layers of fully connected, activation function is GeLU, number of hidden units is 2048; Dropout ratio: 0.25, layer normalization parameter ε size is 1e-6.
6. The stuck pipe risk prediction method according to claim 1, wherein The multi-scale feature fusion in step S6 is specifically implemented as: perform global average pooling on the outputs of the first 3 layers of Transformer, splice and then fuse through a fully connected layer, and the classification head network includes residual connections.
7. The sticking risk prediction method according to claim 1, wherein The following strategy is adopted for model training: optimizer: AdamW, initial learning rate 3e-4, weight decay coefficient 0.01; early stopping strategy: terminate training when the validation set loss does not decrease for 10 consecutive rounds, and the loss function uses cross-entropy with class weights, and the formula is: represents the loss value, N is the number of samples, C is the number of classes, and w c is the weight for class c (used to balance the importance of different classes), and y i,c is the one-hot encoding of the true label of sample i on class c, and p i,c is the probability that the model predicts sample i belongs to class c.
Citation Information
Patent Citations
Transform-based drilling machine jamming prediction method
CN117312931A
Method for predicting real-time drilling speed of drilling machine based on Transform framework
CN118734036A
Intelligent recognition method for while-drilling safety risk based on convolutional neural network
US20230074074A1
Cited By
Early identification method and device for rockburst based on physical information injection and medium
CN120656302A
