Rig State Classification Using Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes for Invisible Lost Time Evaluation
Abstract
1. Introduction
2. Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes
3. Development Process of the Rig State Recognition Model
3.1. Data Preprocessing
3.2. Development of the Pseudo-Dynamic Bayesian Model
3.3. Determination of Attribute Weights
- (1)
- Initialization: Assign an initial weight of 1 to each attribute. Using the initialized weight matrix, along with the previously determined state transition probabilities and likelihood probabilities, construct the class-specific attribute-weighted pseudo-dynamic Bayes (CAWPDB) model.
- (2)
- Prediction: Apply the constructed model to predict each training sample. For each training sample , calculate the posterior probability under the weight matrix , where represents the true class label.
- (3)
- Optimization: Substitute into the conditional log-likelihood formula to compute the objective function. Employ the gradient descent method to minimize the negative conditional log-likelihood. Iteratively update the attribute weights until convergence or the maximum number of iterations is reached. Return the optimized attribute weight matrix upon completion of the optimization process.
4. Results and Analysis
4.1. Model Evaluation
4.2. Comparison with Other ML Algorithms
5. Case Study: Connection Time Efficiency Analysis
5.1. Key Performance Indicator Assessment
- Weight-to-slip: Elapsed time from lifting the bit off the bottom after drilling a stand to setting the drill string into slips. This interval may include operational states such as Static, RihPumpRot, PoohPumpRot, StaticPumpRot, Rih, and Pooh.
- Slip-to-slip: Duration between setting the drill string into slips and subsequently removing it, typically encompassing the Slip and DrillLine states.
- Slip-to-weight: Time required to run the drill string back to the bottom following slip removal. This interval can include states such as Static, RihPumpRot, PoohPumpRot, StaticPumpRot, Rih, and Pooh.
- Weight-to-weight: Total connection cycle time—from pulling the bit off the bottom after drilling a stand, through the full connection process, to returning the bit to the bottom. It is the sum of the weight-to-slip, slip-to-slip, and slip-to-weight intervals.
5.2. ILT Evaluation
5.3. Economic Impact Assessment
6. Discussion
7. Conclusions
- (1)
- Drilling data exhibit inherent temporal dependencies. By incorporating expert knowledge into a state transition probability matrix, the pseudo-dynamic Bayes model effectively captures these temporal patterns while maintaining superior interpretability compared to conventional machine learning approaches.
- (2)
- Class-specific attribute weighting successfully addresses the conditional independence limitation of standard Naive Bayes. Benchmark comparisons demonstrate that CAWPDB significantly outperforms Random Forest and Naive Bayes classifiers, particularly for low-frequency rig states, achieving 99.985% overall accuracy.
- (3)
- Field application confirms CAWPDB’s reliability in identifying rig states from surface drilling data. The resulting classifications enable accurate KPI computation and ILT quantification, providing valuable metrics for crew performance evaluation and operational optimization.
- (4)
- While this study demonstrates CAWPDB’s effectiveness, several limitations suggest directions for future research. Future work should expand the dataset to improve probability estimates and validate model performance across diverse drilling environments to ensure broader applicability. The reliance on expert-defined state transition matrices, though ensuring interpretability, may limit scalability—future work should explore automated probability learning while maintaining domain knowledge integration. Additionally, developing online learning capabilities for real-time adaptation, improving robustness to sensor noise, and extending the framework to identify complex operational patterns represent promising research directions. Integration with automated drilling systems and transfer learning approaches could further enhance practical deployment across varied drilling operations.
- (5)
- The CAWPDB model’s Bayes framework, enhanced by expert-derived state transition matrices, enables effective classification with relatively limited training data compared to deep learning approaches. This characteristic makes the model particularly suitable for field deployment where comprehensive labeled datasets may be difficult to obtain, facilitating rapid implementation in new drilling operations.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Nomenclature
| NPT | Non-Productive Time |
| ILT | Invisible Lost Time |
| CAWPDB | Class-specific attribute weighted pseudo-dynamic Bayes |
| MD | Measure Depth |
| BMD | Bit Movement Direction |
| HKLD | HookLoad |
| HKMD | HookLoad Movement Direction |
| RPM | Revolutions Per Minute |
| WOB | Weight on Bit |
| SPP | Stand Pipe Pressure |
| MFIA | Inflow rate |
| DrillRot | Rotary drilling |
| DrillSlide | Slide drilling |
| InSlips | Drilling string in slips |
| DrillLine | Change the line |
| Static | Bit depth not changed. No circulation and no rotation |
| StaticPumpRot | Bit depth not changed. Have circulation and rotation |
| StaticPump | Bit depth not changed. Have circulation and no rotation |
| StaticRot | Bit depth not changed. Have rotation and no circulation |
| Rih | Bit depth increased. No circulation and no rotation |
| Pooh | Bit depth decreased. No circulation and no rotation |
| RihPumpRot | Bit depth increased. Have circulation and rotation |
| PoohPumpRot | Bit depth decreased. Have circulation and rotation |
| RihRot | Bit depth increased. Have rotation and no circulation |
| PoohRot | Bit depth decreased. Have rotation and no circulation |
| RihPump | Bit depth increased. Have circulation and no rotation |
| PoohPump | Bit depth decreased. Have circulation and no rotation |
| Null | Bit is not in well |
| OutofSlips | Lift drill string out of slips |
| RF | Random forest |
| NB | Naive Bayes |
| KPI | Key performance indicator |
References
- Barakat, M.; Abu El Ela, M.; Khalaf, F. Integrating risk management concepts into the drilling non-productive time. J. Pet. Explor. Prod. 2021, 11, 887–900. [Google Scholar] [CrossRef] [Scilit]
- Youcefi, M.R.; Boukredera, F.S.; Ghalem, K.; Hadjadj, A.; Ezenkwu, C.P. Development of an expert-informed rig state classifier using naive bayes algorithm for invisible loss time measurement. Appl. Intell. 2024, 54, 7659–7673. [Google Scholar] [CrossRef] [Scilit]
- De Oliveira, G.L.; Zank, C.A.; Costa, A.F.; Mendes, H.M.; Henriques, L.F.; Mocelin, M.R.; de Oliveira Neto, J. Offshore drilling improvement through automating the rig state detection process-implementation process history and proven success. In Proceedings of the SPE/IADC Drilling Conference and Exhibition, Fort Worth, TX, USA, 1 March 2016; p. D031S024R006. [Google Scholar] [CrossRef] [Scilit]
- Sun, T.; Zhao, Y.; Yang, J.; Yin, Q.; Wang, W.; Chen, Y. Real-Time Intelligent ldentification Method under Drilling Conditions Based on Support Vector Machine. Pet. Drill. Tech. 2019, 5, 28–33. [Google Scholar] [CrossRef]
- Yin, Q.; Yang, J.; Cao, B.; Long, Y.; Chen, K.; Fan, Z.; He, X. Real-time intelligent rig activities classification model of deep-water drilling using Long Short-Term Memory (LSTM) network. Oil Drill. Prod. Technol. 2022, 1, 97–104. [Google Scholar] [CrossRef]
- Ma, L. Drilling Condition Identification and Application Based on Logging Data. Master’s Thesis, China University of Petroleum, Beijing, China, 2023. [Google Scholar] [CrossRef]
- Tran, T.; Pham, N.T.; Lundgren, J. A deep learning approach for detecting drill bit failures from a small sound dataset. Sci. Rep. 2022, 12, 9623. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ben, Y.; James, C.; Cao, D. Development and application of a real-time drilling state classification algorithm with machine learning. In Proceedings of the Unconventional Resources Technology Conference, Denver, CO, USA, 22–24 July 2019; Society of Exploration Geophysicists: Tulsa, OK, USA; pp. 3053–3066. [Google Scholar] [CrossRef] [Scilit]
- Yin, Q.; Yang, J.; Hou, X.; Tyagi, M.; Zhou, X.; Cao, B.; Xu, D. Drilling performance improvement in offshore batch wells based on rig state classification using machine learning. J. Pet. Sci. Eng. 2020, 192, 107306. [Google Scholar] [CrossRef] [Scilit]
- Murdoch, W.J.; Singh, C.; Kumbier, K.; Abbasi-Asl, R.; Yu, B. Definitions, methods, and applications in interpretable machine learning. Proc. Natl. Acad. Sci. USA 2019, 116, 22071–22080. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yang, X.; Zhang, Y.; Zhou, D.; Ji, Y.; Song, X.; Li, D.; Zhu, Z.; Wang, Z.; Liu, Z. Drilling conditions classification based on improved stacking ensemble learning. Energies 2023, 16, 5747. [Google Scholar] [CrossRef] [Scilit]
- Zhang, W.J.; Jiang, L.X.; Zhang, H.; Hu, C. Bayesian classification learning framework based on bias-variance trade-off. Sci. Sin. Informationis 2023, 6, 1078–1095. [Google Scholar] [CrossRef] [Scilit]
- Friedman, N.; Geiger, D.; Goldszmidt, M. Bayesian network classifiers. Mach. Learn. 1997, 29, 131–163. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Sheng, S. Learning weighted naive Bayes with accurate ranking. In Proceedings of the Fourth IEEE International Conference on Data Mining, ICDM’04, Washington, DC, USA, 1–4 November 2004; IEEE: New York, NY, USA, 2004; pp. 567–570. [Google Scholar] [CrossRef] [Scilit]
- Jiang, L.; Zhang, L.; Yu, L.; Wang, D. Class-specific attribute weighted naive Bayes. Pattern Recognit. 2019, 88, 321–330. [Google Scholar] [CrossRef] [Scilit]
- Ghahramani, Z. Learning dynamic Bayesian networks. International School on Neural Networks; In Adaptive Processing of Sequences and Data Structures; Springer: Berlin/Heidelberg, Germany, 1997; pp. 168–197. [Google Scholar] [CrossRef] [Scilit]
- Zhu, C.; Byrd, R.H.; Lu, P.; Nocedal, J. Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound-constrained optimization. ACM Trans. Math. Softw. 1997, 23, 550–560. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H. Research on Fine-Grained AttributeWeighting Methods for Naive Bayes. Ph.D. Thesis, China University of Geosciences, Wuhan, China, 2023. [Google Scholar]
- Mao, G.; Song, X.; Ding, Y.; Cui, M.; Liu, Y.; Zhu, Z. Drilling condition identification method based on gradient boosting decision tree. Oil Drill. Prod. Technol. 2023, 5, 532–539. [Google Scholar] [CrossRef]
- Shokry, A.; Elgibaly, A.; Salem, A. Implementation of a novel eccentric dog leg reamer in oil well drilling. J. Pet. Explor. Prod. 2021, 11, 1199–1209. [Google Scholar] [CrossRef] [Scilit]
- Raza, S.A.; Al-Braik, H.; Attalah, M.; Corona, M.; Kojadinovic, N. Performance enhancement of drilling and completions operations in giant offshore field Abu Dhabi by tracking and monitoring invisible lost time and defined KPIs. In Proceedings of the Abu Dhabi International Petroleum Exhibition and Conference, Abu Dhabi, United Arab Emirates, 13 November 2017; p. D011S020R002. [Google Scholar] [CrossRef] [Scilit]







| Attribute | ||||||
|---|---|---|---|---|---|---|
| Class | ||||||
| MD | BMD | HKLD | HKMD | RPM | Torque | WOB | SPP | MFIA | Rig State |
|---|---|---|---|---|---|---|---|---|---|
| Fixed | Down | Greater | Down | High | High | 0 | Low | Low | RihRot |
| Increase | Down | Greater | Down | High | High | High | High | High | DrillRot |
| Fixed | Fixed | Fixed | Up | 0 | Low | 0 | 0 | 0 | InSlips |
| Fixed | Fixed | Greater | Fixed | Low | Low | 0 | 0 | 0 | Static |
| Fixed | Down | Greater | Down | Low | Low | 0 | Low | 0 | Rih |
| Fixed | Up | Greater | Up | Low | 0 | 0 | 0 | Low | Pooh |
| Fixed | Fixed | Fixed | Fixed | 0 | 0 | 0 | 0 | 0 | Null |
| Fixed | Down | Greater | Down | Low | Low | 0 | High | High | RihPump |
| Increase | Down | Greater | Down | Low | Low | High | High | High | DrillSlide |
| Fixed | Fixed | Greater | Fixed | High | High | 0 | Low | Low | StaticRot |
| Rig States | Attributes | Attribute Values | |
|---|---|---|---|
| MD | Increase, Fixed | ||
| BMD | Up, Fixed, Down | ||
| DrillRot | DrillSlide | HKLD | Greater, Near, Fixed |
| InSlips | DrillLine | HKMD | Up, Fixed, Down |
| Static | StaticPumpRot | RPM | High, Low, 0 |
| StaticPump | StaticRot | Torque | High, Low, 0 |
| Rih | Pooh | WOB | High, Low, 0 |
| RihPumpRot | PoohPumpRot | SPP | High, Low, 0 |
| RihRot | PoohRot | MFIA | High, Low, 0 |
| RihPump | PoohPump | In well | Yes, No |
| Null | OutofSlips | HKLD change | Increase, Fixed, Decrease |
| In bottom | Yes, No | ||
| RPM change | Increase, Fixed, Decrease | ||
| DrillRot | DrillSlide | InSlips | Rih | Pooh | RihPumpRot | PoohPumpRot | |
|---|---|---|---|---|---|---|---|
| DrillRot | 0.8 | 0.18 | 10−5 | 10−5 | 10−5 | 10−5 | 0.01 |
| Operation | P (Up/Operation) | P (Fixed/Operation) | P (Down/Operation) |
|---|---|---|---|
| DrillRot | 0.01 | 0.04 | 0.95 |
| DrillSlide | 0.005 | 0.025 | 0.97 |
| InSlips | 0.25 | 0.5 | 0.25 |
| Rih | 0.01 | 0.01 | 0.98 |
| Pooh | 0.987 | 0.01 | 0.003 |
| RihPumpRot | 0.002 | 0.02 | 0.978 |
| PoohPumpRot | 0.99 | 0.008 | 0.002 |
| Attribute | MD | BMD | HKLD | HKMD | RPM | Torque | WOB | SPP | MFIA | |
|---|---|---|---|---|---|---|---|---|---|---|
| State | ||||||||||
| DrillRot | 0.92 | 0.82 | 0.72 | 0.61 | 0.93 | 0.92 | 0.94 | 0.80 | 0.60 | |
| DrillSlide | 0.79 | 0.77 | 0.63 | 0.94 | 0.90 | 0.96 | 0.75 | 0.87 | 0.85 | |
| InSlips | 0.83 | 0.70 | 0.65 | 0.92 | 0.67 | 0.66 | 0.78 | 0.78 | 0.72 | |
| Rih | 0.84 | 0.57 | 0.76 | 0.95 | 0.94 | 0.65 | 0.63 | 0.68 | 0.91 | |
| Pooh | 0.78 | 0.67 | 0.70 | 0.91 | 0.68 | 0.63 | 0.95 | 0.58 | 0.70 | |
| RihPumpRot | 0.82 | 0.82 | 0.82 | 0.63 | 0.69 | 0.83 | 0.90 | 0.62 | 0.63 | |
| PoohPumpRot | 0.78 | 0.84 | 0.75 | 0.62 | 0.82 | 0.95 | 0.93 | 0.82 | 0.65 | |
| Rig State (Class ) | Precision (%) | Recall (%) | F1-Core (%) | |||
|---|---|---|---|---|---|---|
| DrillRot | 25,000 | 25,000 | 25,000 | 100 | 100 | 100 |
| InSlips | 5020 | 5019 | 5017 | 99.960 | 99.940 | 99.950 |
| Static | 474 | 474 | 474 | 100 | 100 | 100 |
| StaticPumpRot | 1403 | 1407 | 1403 | 99.716 | 100 | 99.858 |
| StaticPump | 2675 | 2675 | 2675 | 100 | 100 | 100 |
| StaticRot | 140 | 140 | 140 | 100 | 100 | 100 |
| Rih | 1350 | 1351 | 1349 | 99.852 | 99.926 | 99.889 |
| Pooh | 46 | 46 | 46 | 100 | 100 | 100 |
| RihPumpRot | 5328 | 5327 | 5326 | 99.981 | 99.963 | 99.972 |
| PoohPumpRot | 16,539 | 16,537 | 16,537 | 100 | 99.988 | 99.994 |
| RihPump | 104 | 104 | 104 | 100 | 100 | 100 |
| PoohPump | 36 | 36 | 36 | 100 | 100 | 100 |
| OutofSlips | 288 | 287 | 287 | 100 | 99.653 | 99.826 |
| Overall | Total number of instances | Number of correctly predicted instances | Accuracy (%) | |||
| 58,223 | 58,214 | 99.985 | ||||
| Model | RF | NB | CAWPDB | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Rig State (Class ) | Precision (%) | Recall (%) | F1-Core (%) | Precision (%) | Recall (%) | F1-Core (%) | Precision (%) | Recall (%) | F1-Core (%) |
| DrillRot | 99.94 | 99.94 | 99.94 | 99.91 | 99.96 | 99.94 | 100 | 100 | 100 |
| InSlips | 99.50 | 99.76 | 99.63 | 99.72 | 99.82 | 99.77 | 99.96 | 99.94 | 99.95 |
| Static | 92.61 | 97.89 | 95.18 | 97.87 | 97.05 | 97.46 | 100 | 100 | 100 |
| StaticPumpRot | 93.00 | 97.65 | 95.27 | 98.58 | 98.72 | 98.65 | 99.72 | 100 | 99.86 |
| StaticPump | 98.47 | 98.36 | 98.41 | 99.25 | 98.69 | 98.97 | 100 | 100 | 100 |
| StaticRot | 100 | 99.29 | 99.642 | 100 | 99.29 | 99.64 | 100 | 100 | 100 |
| Rih | 99.11 | 98.44 | 98.77 | 98.82 | 99.63 | 99.23 | 99.85 | 99.93 | 99.89 |
| Pooh | 90.91 | 65.22 | 75.95 | 89.74 | 76.09 | 82.35 | 100 | 100 | 100 |
| RihPumpRot | 97.86 | 95.25 | 96.54 | 98.82 | 99.27 | 99.05 | 99.98 | 99.96 | 99.97 |
| PoohPumpRot | 98.75 | 99.38 | 99.06 | 99.74 | 99.88 | 99.81 | 100 | 99.99 | 99.99 |
| RihPump | 55.56 | 19.23 | 28.57 | 88.46 | 44.23 | 58.97 | 100 | 100 | 100 |
| PoohPump | 63.64 | 38.89 | 48.28 | 55.26 | 58.33 | 56.76 | 100 | 100 | 100 |
| OutofSlips | 87.62 | 98.26 | 92.63 | 97.92 | 98.26 | 98.09 | 100 | 99.65 | 99.83 |
| Overall | Accuracy (%) | Accuracy (%) | Accuracy (%) | ||||||
| 98.939 | 99.588 | 99.985 | |||||||
| Operation Time | KPI | Savings Potential Time | Savings Potential Time (%) | |
|---|---|---|---|---|
| Well A | 21 h, 27 min | 24.00 min | 1 h, 51 min | 8.61% |
| Well B | 31 h, 48 min | 29.25 min | 3 h, 3 min | 9.57% |
| Total | 53 h, 15 min | - | 4 h, 54 min | 9.18% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wu, J.; Wang, J.; Li, B.; Lou, W.; Wang, X. Rig State Classification Using Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes for Invisible Lost Time Evaluation. Processes 2026, 14, 405. https://doi.org/10.3390/pr14030405
Wu J, Wang J, Li B, Lou W, Wang X. Rig State Classification Using Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes for Invisible Lost Time Evaluation. Processes. 2026; 14(3):405. https://doi.org/10.3390/pr14030405
Chicago/Turabian StyleWu, Jiaming, Jianmin Wang, Baixue Li, Wenqiang Lou, and Xueying Wang. 2026. "Rig State Classification Using Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes for Invisible Lost Time Evaluation" Processes 14, no. 3: 405. https://doi.org/10.3390/pr14030405
APA StyleWu, J., Wang, J., Li, B., Lou, W., & Wang, X. (2026). Rig State Classification Using Class-Specific Attribute-Weighted Pseudo-Dynamic Bayes for Invisible Lost Time Evaluation. Processes, 14(3), 405. https://doi.org/10.3390/pr14030405

