Best AI Tools for Rig State Detection & NPT

Rig state detection illustration linking drilling equipment to sensor traces and an activity timeline

By Saad Iqbal

Rig state detection can help reconcile a familiar drilling dispute: the morning report records one duration for a connection, the tour sheet records another, and the sensor trace tells a more complicated story. The solution starts with timestamped evidence and an agreed activity dictionary—not with assuming every unexplained interval is non-productive time (NPT).

That is the pitch behind AI rig state detection, and it is now mature enough that several platforms run it live on real rigs rather than as a post-well analytics exercise. Here is what rig-state classification actually does under the hood, the tools upstream teams are running to catch NPT as it happens instead of finding it in the end-of-well report, and where the automation still needs a human checking its work.

What Counts as Non-Productive Time (and Why the Definition Keeps Moving)

NPT is time attributable to a verified unplanned event under the operator’s reporting rules. Invisible lost time (ILT) is excess duration relative to a defensible benchmark for comparable work. A slow connection is not automatically NPT: planned circulation, equipment checks or operating constraints may explain it. Maintain separate fields for activity, event cause and performance deviation.

Rig state detection assigns physical activities such as rotating, circulating, moving pipe or reaming from synchronized sensor data. Useful channels include bit depth, hole depth, hookload, block position, RPM, torque, flow and standpipe pressure. NPT is a contextual event annotation, not a sensor state. Missing data and ambiguous transitions must remain unknown until reviewed.

Rig state detection distinguishes equipment activity from NPT and invisible lost time
An unknown activity label is not evidence of non-productive time.

How Does Rig State Detection Work?

A rule-based baseline combines multiple channels with explicit units and hysteresis. Rotation alone cannot distinguish drilling from off-bottom rotation; bit-to-hole-depth separation, weight on bit and motion help resolve that ambiguity. Block motion alone cannot distinguish tripping from connection movement. Machine-learning classifiers may learn more complex patterns from reviewed labels, but their accuracy must be measured on held-out wells rather than assumed.

Keep an unknown class and report its duration. For rig state detection, an uncertainty flag should trigger investigation, not an automatic NPT charge. Operational definitions, clock alignment and sensor calibration remain engineering responsibilities.

Rig state detection workflow from sensor checks to activity labels, duration audit and engineer review
Illustrative workflow only. The plotted trace and time scale are schematic, not measured data or classifier thresholds.

The AI Tools Engineers Are Actually Running Rig-Side

1. Corva

Corva’s real-time drilling platform brings rig operations, monitoring and performance metrics together. Evaluate it as an analytics option: ask the vendor to demonstrate the exact rig state detection app, supported inputs, connection boundaries, export format and treatment of missing data on your own well. Do not assume all apps or AI features are included in one subscription.

2. NOV NOVOS

NOVOS sits a layer deeper than pure analytics — it is a rig control system that automates drilling sequences like connections and slip-to-slip cycles directly, which means a meaningful share of the NPT and ILT that other tools merely detect, NOVOS is designed to prevent by executing the sequence the same way every time. Where Corva-style platforms tell you a connection ran long, NOVOS is aimed at making the connection itself consistently short.

3. Pason

Pason’s rig-state documentation describes Rig Super State and Rig Sub State traces for EDR 19.4 and higher, available in EDR, DataHub and Pason Live at one-second frequency. Check compatibility with your installed system and review the state definitions before mapping them into an operator’s NPT codes.

4. Python and pandas for a Transparent Duration Audit

A transparent audit is a useful companion to vendor rig state detection. The example below validates the duration calculation after a state label has been assigned; it is not a trained AI classifier. It uses synthetic labels deliberately so the time-accounting logic can be checked independently of sensor thresholds.

Prerequisites: Python with pandas installed. Save the code as state_audit.py, then run python state_audit.py in that folder. In a new Python environment, install pandas with python -m pip install pandas. Real input needs a UTC timestamp and a reviewed state label for every observation. Preserve raw data separately.

import pandas as pd

# Synthetic data: each label applies until the next timestamp.
df = pd.DataFrame({
    "timestamp": ["2026-09-01T00:00:00Z",
                  "2026-09-01T00:00:10Z",
                  "2026-09-01T00:00:25Z",
                  "2026-09-01T00:00:30Z"],
    "state": ["Rotating", "Circulating", "Unknown", "Rotating"]
})
t = pd.to_datetime(df["timestamp"], utc=True, errors="raise")
if t.isna().any() or t.duplicated().any() or not t.is_monotonic_increasing:
    raise ValueError("Timestamps must be valid, unique and increasing")
if df["state"].isna().any():
    raise ValueError("Use an explicit Unknown label for missing states")
seconds = (t.shift(-1) - t).dt.total_seconds()
# Set this limit from the expected logging cadence, not convenience.
max_gap_seconds = 20
valid = seconds.notna() & (seconds > 0) & (seconds <= max_gap_seconds)
known = df.loc[valid].copy()
known["seconds"] = seconds[valid]
summary = known.groupby("state")["seconds"].sum()
print(summary)
print("Excluded gap seconds:", seconds[seconds > max_gap_seconds].sum())
print("Final sample has no duration without an explicit end time.")
assert summary.to_dict() == {"Circulating": 15.0, "Rotating": 10.0, "Unknown": 5.0}
assert summary.sum() == 30.0

Known answer: rotating 10 seconds, circulating 15 seconds, unknown 5 seconds: 30 seconds total. These are synthetic observations, not NPT or savings. The governing calculation is Δtᵢ = tᵢ₊₁ − tᵢ in seconds, and time in state s is the sum of valid Δtᵢ whose label equals s. A label is assumed constant between samples; transition precision cannot exceed the logging resolution.

Do not multiply row count by one second unless the cadence is verified. Do not forward-fill a long outage and call it activity. Treat gaps separately, define an explicit observation end time before allocating the last sample, and join independently reviewed event records only after the duration audit passes. For example, 15 seconds of circulation may be entirely planned.

How to Choose Between Them

  • Want NPT and ILT visible across a multi-rig program today? A platform like Corva, with rig-state as shared infrastructure other apps consume, is worth evaluating against your workflow and data contracts.
  • Trying to prevent the NPT rather than just report it? That is the case for a rig control layer like NOVOS, which is a bigger operational commitment but attacks the cause, not the symptom.
  • Data quality is the actual blocker? Fix the acquisition layer first — Pason’s EDR and data platform is the foundation most third-party classifiers assume is already solid.
  • Just need to know if this is worth the budget? A reproducible Python duration audit is a low-cost first check; demonstrating operational value still requires reviewed labels and comparable benchmarks.
Validation checklist for timestamps, ambiguous transitions, held-out wells and event logs
Validate the activity model before using its output in performance reporting.

Where Rig-State Automation Still Needs a Human Checking It

  • Sensor lag misclassifies transitions: a laggy standpipe pressure sensor can make the start of circulation look like a connection for a few seconds. Spot-check state transitions, not just totals.
  • Thresholds tuned on one rig do not travel: a top drive rig and a rotary table rig produce different torque and RPM signatures for the same activity — retune before trusting cross-rig comparisons.
  • Latency matters for prevention, not just reporting: if the goal is catching NPT as it starts rather than reporting it after the well, you need edge computing close to the rig, not a cloud pipeline with a multi-minute delay.
  • Auto-tagged ILT still deserves a sanity check: reconcile a sample of the classifier’s output against tour sheets before you present the numbers to anyone who can cut next year’s budget based on them.

How to Verify the Classifier Is Actually Right

Before rolling any rig-state classifier out across a program, pull one well you already have complete tour sheets for and run the tool against its raw sensor data. Line up the classifier’s timeline next to the driller’s log, hour by hour, and count the disagreements — not just the total NPT figure, which can match by coincidence even when individual states are wrong, but the actual state-by-state calls. Measure per-state precision, recall and duration error against independently reviewed event boundaries. Agree acceptance limits before the trial; tour sheets can also contain timestamp and labeling errors. If it is missing entire tripping sequences or mislabeling circulation as NPT, the sensor mapping is wrong before the model even gets a fair test.

Expect the rollout itself to take longer than the sales conversation suggests. Thresholds and, where a trained model is involved, the training data itself need to be recalibrated per rig type, and sometimes per rig, before the outputs are trustworthy enough to put in front of the people who approve next year’s budget. Use a defined validation period with sufficient representative operations before relying on management reports.

The honest case for rig-state AI is not that it replaces the driller’s judgment — it is that it finally makes the invisible lost time visible in the same place as the classic NPT everyone already argues about. If well control is the next piece of that real-time puzzle, our look at AI early kick detection covers the same sensor streams applied to a higher-stakes problem, and if you are still building the reporting side manually, see how to automate daily drilling reports with AI.

Saad Iqbal Avatar

About the author

Saad Iqbal

Petroleum Engineer · Well Intervention & Stimulation Specialist

Saad Iqbal is a petroleum engineer and well intervention and stimulation specialist with more than a decade of field experience in hydraulic fracturing, coiled tubing, CSG, tight sandstone and shale developments. He explores practical AI, automation and data-driven engineering for safer, smarter upstream operations.

Discover more from EnergyMindAI

Subscribe now to keep reading and get access to the full archive.

Continue reading