Rig State detection
Live provides an solution that user a finite state machine algorithm to analyze and determine the current and past well states called Rig State
The rig state plugin can be found in the marketplace
Global Parameters
The global parameters are initially configured with values predefined by the RigState plugin itself, but can be modified by the user. Changing these parameters is reflected in all rigs that do not have a customized set of parameters (Presets), resulting in a global impact on the Live.
Steps to configure:
Access the RigState configuration screen.

Find the parameter you wish to update and enter the new value and save.

Physical Model Configuration - Presets
Presets are sets of customizable hyperparameters for rigs, allowing different rigs to use distinct parameters in the RigState state detection algorithms. By default, each rig receives an initial Preset that reflects the values of the global parameters. Additionally, it is possible to create, duplicate, and delete new Presets as needed.

Steps to use Presets:
The Physical Model Configuration modal can be accessed through the Asset Rig configuration dropdown menu.

Create Preset
Click the "Create New Preset" button and enter a name for the Preset.


Change the parameters as necessary and save.

Update Preset
Select the Preset you wish to duplicate.

Click the Duplicate button.

Enter the name of the new Preset.

Change the parameters as necessary and save the modifications.
Delete Preset
Select the Preset you wish to delete.
Click the Delete button.

Confirm the deletion of the Preset.

Activate Preset
Select the preset you wish to activate.
Click the activate button.

Pipes functions
State detection is performed through Pipes functions that must be used in the Pipes console. Below is an example of a Pipes query to apply the RigState algorithm, according to the configuration of the RigState screen.
-- Be sure that the channels below are configured in "Identification" column in "Standard Channels" page.
def @@mnemonics:
(@@channels.weight_on_bit,
@@channels.hole_depth,
@@channels.rotary_speed,
@@channels.rate_of_penetration,
@@channels.bit_depth,
@@channels.fluid_flow,
@@channels.block_position,
@@channels.weight_on_hook,
@@channels.standpipe,
@@channels.torque);
def @@event:'SomeEventType':const; -- The 'SomeEventType' should be replaced by type of generated event in Rigs Data Management.
def @@rigName:'SomeRigName':const; -- The 'SomeRigName' should be replaced by the Rig name.
@@event .timestamp:adjusted_index_timestamp mnemonic!:@@mnemonics
=> @rig_state_full @@rigName, null, @@mnemonics

Available Functions
The Rig State plugin offers the following functions for state calculations:
@rig_state
This function generates a simplified list of events, presenting only the title of the state and the corresponding color that represents it.


@rig_state_full
This function generates a comprehensive list of events, presenting the states in detail. It includes the title of the state, the corresponding color, indicators, parameters used, and information about missing data.


@normalized_indicators
This function calculates all the indicators used by the RigState algorithm based on the normalized events and returns these indicators, along with the parameters used in the calculations.


The old opmode functions are still available for compatibility reasons:
drilling.normalized_opmode
normalized_operation_mode
To use the configuration of a specific rig one can use one of the functions that receive the rig name as the first parameter:\
drilling.rig_state
drilling.normalized_rig_state
Above an example of the query used to retrieve the rig state of a rig by name:
def @@mnemonics: (@@channels.weight_on_bit, @@channels.hole_depth, @@channels.rotary_speed, @@channels.rate_of_penetration, @@channels.bit_depth, @@channels.fluid_flow, @@channels.block_position, @@channels.weight_on_hook); event_type .timestamp:adjusted_index_timestamp mnemonic!:@@mnemonics
=> expand drilling.normalized_rig_state("rigName", adjusted_index_timestamp#, mnemonic, value#, uom, @@mnemonics!) every 15 seconds => @set operating_mode != prev(operating_mode) ? random(), 0 as r => @throttle 2 min by operating_mode, r => @filter operating_mode != 'UNDEFINED' && operating_mode != null => @yield newmap(operating_mode, 1:object(), 'timestamp', timestamp#, '__color', newmap(operating_mode, __color)\
Dashboards
In the following image, it is possible to see the result of the stand length changed in the rig configuration, for the same time period on the dashboard the representation is updated due to the new value passed to the physical model algorithm.\
Unit configuration
It is possible to configure the rig state detection units constants per rig

Default Value - RigState Parameters
This topic describes how to configure the Rig State detection and it defines all parameters considered and how they impact the Rig State detection.
Parameter
Description and use in RigState
Pipe Lenght
Drill pipe or Casing/Liner joint length
Stand Length
The number of drill pipes or joints that compose a stand. If the bit depth moves more than one stand 'is tripping' is set as true.
Block Weight
Weight of Block or hook load when the drillpipe is 'in slips'. It is the sum of Travelling block weight and Top Drive Weight (Derrick Info).
Minimum Fluid Flow
The minimum fluid flow to set true as 'is circulating'.
Flow rate > minimum fluid flow --> is circulating
Flow rate <= minimum fluid flow -> is not circulating
Minimum Rotary Speed
The minimum Rotatory Speed to set true as 'is rotating'.
Rotatory Speed > minimum Rotatory Speed -> is rotating
Rotatory Speed <= minimum Rotatory Speed -> is not rotating
Minimum Rotary Speed
The minimum Rotatory Speed to set true as 'is rotating'.
Rotatory Speed > minimum Rotatory Speed -> is rotating
Rotatory Speed <= minimum Rotatory Speed -> is not rotating
Minimum Weight On Bit
The minimum Weight On Bit to set true as 'has weight on bit'.
Rotatory Speed > minimum Rotatory Speed -> is rotating
Rotatory Speed <= minimum Rotatory Speed -> is not rotating
Minimum Torque
The Minimum Torque to set true as 'has torque'.
Torque > minimum torque -> has torque
Torque <= minimum torque -> has not torque
Minimum Standpipe Pressure
The Minimum Standpipe Pressure to set true as 'has spp’.
Standpipe pressure > Minimum Standpipe Pressure -> has standpipe pressure
Standpipe pressure <= Minimum Standpipe Pressure -> has no standpipe pressure
Minimum Rate Of Penetration
The Minimum Rate Of Penetration to set true as 'is penetrating'.
ROP > Minimum Rate Of Penetration-> is penetrating
ROP <= Minimum Rate Of Penetration -> is not penetrating
Bottom Depth Tolerance
The threshold to define if the bit is on bottom or off bottom.
Hole depth - bit depth > bottom depth tolerance -> off bottom
Hole depth - bit depth < bottom depth tolerance -> on bottom
Movement Threshold
Movement threshold is used to define if the bit depth and hole depth are constant or not.
Block Weight Tolerance Threshold
Used to define if the hook load is near Travelling Block Weight or not
Hook Load Ratio Threshold
Used to define which variation the hook load is increasing or decreasing
Connection Timeout
Maximum connection time
Minimum Operation
Minimum time to leave of one specific micro rig state (minimum duration of the rigState).
Low Bit Depth Threshold
BHA length. When bit depth is lower than this length the rig state is defined as Column Assembly.
Data Period
Data periodicity (1s, 5s, etc) - Used to calculate the Sliding window length. Impact on OP Mode switch delay.
Default settings and guidelines for adjustment per rig
Parameter
Default Values
Guideline
Range (Metris)
Guideline
Range (Imperial)
Pipe Lenght
9.14m
30ft
7-15 m
23-49ft
Stand Length
3
1-5
Block Weight
250000N
25tf
55klft
10-100tf
22-220 klbf
Minimum Fluid Flow
0.0008m3/s
50lpm
13 gpm
30-150l/min
8-40gpm
Minimum Rotary Speed
0.21 rad/s
2 RPM
1-4 RPM
Minimum Weight On Bit
2000 N
200 kgf
440 lbf
50-500 kgf
110-1100 lbf
Minimum Torque
500 N.m
370 lbf.ft
200-800 N.m
150-590 lbf.ft
Minimum Standpipe Pressure
500000 Pa
5 bar
73 psi
2 - 7 bar
30-100 psi
Minimum Rate Of Penetration
0.0003 m/s
1m/h
3 ft/h
0.5 - 2 m/h
1.6-6.5 ft/h
Bottom Depth Tolerance
0.45 m
1.5 ft
0.3 - 0.7m
1 - 2.5ft
Movement Threshold
0.2 m
0.7 ft
0.1 - 0.3 m
0.3 - 1ft
Block Weight Tolerance Threshold
0.15
0.05 - 10
Hook Load Ratio Threshold
0.5
0.1-10
Connection Timeout
1200 s
20 min
10-60 min
Minimum Operation
10000 ms
10 s
5-60s
Low Bit Depth Threshold
400m
1300 ft
200-600m
650-1970ft
Data Period
1 s
1-20s
Last updated
Was this helpful?