Operating under harsh conditions, mud motors frequently stall, causing the rotor to seize and a buildup of torque and standpipe pressure throughout the drill string. When not recovered from correctly, this event can cause abrupt changes in drill string torque, potentially damaging the motor and other BHA components. Current recovery methods usually rely upon field crews to detect and react correctly to this event, with results depending on varying levels of training, awareness, and other factors. This paper seeks to outline a method to automatically detect mud motor stalls in real-time using machine learning. The method itself involves unique methods of representing time series data that have yet to be applied to drilling data in the literature and provides a flexible technique for pattern recognition in general.
With the assistance of subject matter experts, 200ms time series data for 100+ stalls were acquired and labeled to indicate the exact moments of a stall condition. The data itself consisted of surface values for torque, differential pressure, and other traces over which a model was developed that could successfully flag a particular instant as being in a stall. Significant effort was put towards feature engineering, and a novel application of spline regression was used to create robust features that were passed to a gradient-boosted random forest classification model to determine the probability of a stall occurring. During initial training, the model was validated against unseen stall data and achieved high (greater than 90%) precision and recall and had a reaction time superior to human operators, implying that it was a suitable candidate for integration into the control system. The model was then deployed to all rigs of this drilling contractor’s onshore rig fleet, providing a robust method for detecting even further motor stalls for additional training. The final model held acceptable performance and will be integrated into control systems to trigger automated stall recovery routines.