hashmapinc / Tempus

Hashmap IIoT Accelerator Framework
Apache License 2.0
29 stars 10 forks source link

List of initial drilling state switches and equations to be available in Tempus #701

Open Mike-d-s opened 6 years ago

Mike-d-s commented 6 years ago

Child of #588

Based on a quick review of several basic drilling monitoring log formats and viewers, here is the initial list of drilling status flags and equations I think we should start with.

** Need to details out each calculation with it's attendant preliminary calcs.

Drilling state and flags:

  1. Drilling state engine
  2. Bit on bottom, =1 when hole depth - bit depth < 1 ft, =0 otherwise.
  3. Block direction, ="up" when block_position(n) - block_position(n-1) >0, = "down" when block_position(n) - block_position(n-1)<0, ="stopped" otherwise.

Drilling base calculations:

  1. Stick Slip RPM peak to peak = max of RPM - min of RPM over time window X
  2. Stick Slip Torque peak to peak = max of Torque - min of Torque over time window X
  3. Block Velocity = [block_position(n) - block_position(n-x)] / [timestamp(n) - timestamp(n-x)]
  4. Mud Pressure at depth
  5. ECD
cherrera2001 commented 6 years ago

This needs a lot of clarification.

Drilling state: For now dont worrry about the drilling state engine.

2 and 3, the logic is detailed (just create new tags with the result using the time stamp/depth stamp of the data that was used to calculate it

@Mike-d-s will fill out the rest

Mike-d-s commented 5 years ago

First off, I've removed a couple of the more finicky domain computations, See detailed info for the remaining computations using the linked google sheet.

https://drive.google.com/open?id=1GFunKJZZ5RQwzfFO_ocGCpGNtfMslMju_fF9__uipL0

I've provided details for each computation. The if-then-else logic may not be the most efficient from a coding practice, I just built them out to help you understand how it should work logically.

shgupta22 commented 5 years ago

Implement drilling state engine

shgupta22 commented 5 years ago

Analysis of Drilling State Engine

To start follow the Google Drive link: https://drive.google.com/drive/u/0/folders/1HX1JSJwTyigUjVTZRVuhX6KXAtacRz5t?ogsrc=32

Tags required to compute Drilling State : BitDepth HoleDepth PreviousBitDepth TotalPumpOutput RotaryRPM BitOnBottom InSlipStatus StandpipePressure

Out of above-mentioned tags, "PreviousBitDepth" and "BitOnBottom" can be calculated.

Apart from these two, rest of the tags BitDepth, HoleDepth, TotalPumpOutput, RotaryRPM, InSlipStatus, and StandpipePressure we will get in depth data.

Finally, we need to implement the logic provided in "Anadarko thresholds onshore operation_indicator_offshore.txt" file. This will provide us the Drilling State Engine.

For more information regarding the implementation, we can refer to the "Current" named sheet in "Anadarko rig state matrix.xlsx" file. This sheet contains the logic of how all the parameters are used in the computation.

@Mike-d-s , we have few questions related to Drilling State Engine, as follows :

  1. In "Rotating Only", "Circulating & Rotating" and "Circulate Hole" state computation, the value of (abs(BitDepth-PreviousBitDepth)) is compared with 0.5 in "Anadarko thresholds onshore operation_indicator_offshore.txt" whereas its comparison value is 0.05 in "Anadarko rig state matrix.xlsx" file "Current" sheet. Which one we should consider?

  2. For computing "Tripping Out Pumps On" and "Tripping Out Pumps Off" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" for ON and OFF simultaneously in a single condition. We think its need to be checked only once. According to "Anadarko rig state matrix.xlsx" file "Current" sheet, "BitOnBottom" should only be checked for "OFF". Please verify this and let us know.

  3. For computing "InSlips" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" status. But, according to "Anadarko rig state matrix.xlsx" file "Current" sheet "InSlips" doesn't depends on "BitOnBottom". Can you please verify.

Mike-d-s commented 5 years ago

Shubham,

Sorry for the delay, still catching up from the vacation days.

I will work on reviewing the logic and help clean these up to make it easier to understand over the weekend.

My notes below.

Mike

Mike Sturm Director Industrial Practice Hashmap Inc. mike.sturm@hashmapinc.com mailto:mike.sturm@hashmapinc.com Cell: 713-254-4108

On Dec 31, 2018, at 2:34 AM, Shubham Gupta notifications@github.com wrote:

Analysis of Drilling State Engine

To start follow the Google Drive link: https://drive.google.com/drive/u/0/folders/1HX1JSJwTyigUjVTZRVuhX6KXAtacRz5t?ogsrc=32 https://drive.google.com/drive/u/0/folders/1HX1JSJwTyigUjVTZRVuhX6KXAtacRz5t?ogsrc=32 Rig State documnet.ppt: explains what drilling state engine is. It also explains why and how it needs to be computed. Anadarko thresholds onshore operation_indicator_offshore.txt: have the logic to calculate Drilling State, based on different tags received in-depth data. Anadarko rig state matrix.xlsx: This document has more detailed information about how drilling state is being computed. Tags required to compute Drilling State : BitDepth HoleDepth PreviousBitDepth TotalPumpOutput RotaryRPM BitOnBottom InSlipStatus StandpipePressure

Out of above-mentioned tags, "PreviousBitDepth" and "BitOnBottom" can be calculated.

PreviousBitDepth: BitDepth needs to save for next depth data. BitOnBottom: this can be calculated using BitDepth and HoleDepth. We are not using the prewritten BitOnBottom Computation, as there will a dependency which will block us from computing Drilling State. [MDS] I updated the details for Bit on Bottom in the powerpoint slides. I had originally changed them and forgot to pass on the newest version, but I have updated the version in Google drive linked above. I also added a new card (#972) in Waffle as a child of #797 for the bit on bottom flag to also have an error state when the bit depth is significantly deeper than Hole Depth as this indicates a data quality issue normally.
Apart from these two, rest of the tags BitDepth, HoleDepth, TotalPumpOutput, RotaryRPM, InSlipStatus, and StandpipePressure we will get in depth data.

[MDS] in the line above you say you will get these in depth data, but these value should be pulled from the time indexed data stream. Even though they are often available in both the time and depth indexed stream, the values for the rig state should be pulled from the time indexed stream. Finally, we need to implement the logic provided in "Anadarko thresholds onshore operation_indicator_offshore.txt" file. This will provide us the Drilling State Engine.

For more information regarding the implementation, we can refer to the "Current" named sheet in "Anadarko rig state matrix.xlsx" file. This sheet contains the logic of how all the parameters are used in the computation.

@Mike-d-s https://github.com/Mike-d-s , we have few questions related to Drilling State Engine, as follows :

In "Rotating Only", "Circulating & Rotating" and "Circulate Hole" state computation, the value of (abs(BitDepth-PreviousBitDepth)) is compared with 0.5 in "Anadarko thresholds onshore operation_indicator_offshore.txt" whereas its comparison value is 0.05 in "Anadarko rig state matrix.xlsx" file "Current" sheet. Which one we should consider?

[MDS] For the moment, do not use either of these values, use 1.0 ft for the delta threshold. We may lower this later, but let’s start with a wider range. Note comment above that use of absolute value ignores potential error state where bit depth can be deeper than hole depth due to dat quality issue. Absolute value would actually drive the bit on bottom flag to “off bottom” using absolute value. Additionally, rather than using a bit depth window, we should use block direction computation to determine direction of motion. Bit depth may not always be set especially during non drilling activity, but block movement is typical always available no matter what. I will work on updating the Anadarko sheets to help clean up the logic train.
For computing "Tripping Out Pumps On" and "Tripping Out Pumps Off" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" for ON and OFF simultaneously in a single condition. We think its need to be checked only once. According to "Anadarko rig state matrix.xlsx" file "Current" sheet, "BitOnBottom" should only be checked for "OFF". Please verify this and let us know.

[MDS] I had not gone through 100% of the Boolean logic for this sheet. This is wacky. I will work on editing the document. But to answer your question, BitOnBottom has to be OFF for any Tripping status (In or Out) with or without pumping. For computing "InSlips" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" status. But, according to "Anadarko rig state matrix.xlsx" file "Current" sheet "InSlips" doesn't depends on "BitOnBottom". Can you please verify.

[MDS] In the “Anadarko rig state matrix.xlsx” they use a simplified version of the bit on bottom flag. If you look in column G for "Hole Depth or with Bit Depth combo”, you’ll see they calculate BD[i] < HD[I] which is checking to see if bit depth less than hole depth. Though they don’t use a threshold, this is essentially the same logic as BitOnBottom flag and we should use BitOnBottom flag. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hashmapinc/Tempus/issues/701#issuecomment-450620234, or mute the thread https://github.com/notifications/unsubscribe-auth/Akx7d6DL4RFRJjkXVuQO4Jcn1Oqh6ltaks5u-cwMgaJpZM4WVoLn.

Mike-d-s commented 5 years ago

Shubham,

In the shared drive I added a new file called “Tempus Rig States” where I mapped the Tempus rig states to the Anadarko Matrix and filled in the flag states for each rig state.

If you can point me to the dat et you are using to test, I will give you the list of data channels we need to use to drive the state flags based on that data set,

Thanks, Mike

Mike Sturm Director Industrial Practice Hashmap Inc. mike.sturm@hashmapinc.com mailto:mike.sturm@hashmapinc.com Cell: 713-254-4108

On Jan 4, 2019, at 12:58 PM, Mike Sturm mike.sturm@hashmapinc.com wrote:

Shubham,

Sorry for the delay, still catching up from the vacation days.

I will work on reviewing the logic and help clean these up to make it easier to understand over the weekend.

My notes below.

Mike

Mike Sturm Director Industrial Practice Hashmap Inc. mike.sturm@hashmapinc.com mailto:mike.sturm@hashmapinc.com Cell: 713-254-4108

On Dec 31, 2018, at 2:34 AM, Shubham Gupta <notifications@github.com mailto:notifications@github.com> wrote:

Analysis of Drilling State Engine

To start follow the Google Drive link: https://drive.google.com/drive/u/0/folders/1HX1JSJwTyigUjVTZRVuhX6KXAtacRz5t?ogsrc=32 https://drive.google.com/drive/u/0/folders/1HX1JSJwTyigUjVTZRVuhX6KXAtacRz5t?ogsrc=32 Rig State documnet.ppt: explains what drilling state engine is. It also explains why and how it needs to be computed. Anadarko thresholds onshore operation_indicator_offshore.txt: have the logic to calculate Drilling State, based on different tags received in-depth data. Anadarko rig state matrix.xlsx: This document has more detailed information about how drilling state is being computed. Tags required to compute Drilling State : BitDepth HoleDepth PreviousBitDepth TotalPumpOutput RotaryRPM BitOnBottom InSlipStatus StandpipePressure

Out of above-mentioned tags, "PreviousBitDepth" and "BitOnBottom" can be calculated.

PreviousBitDepth: BitDepth needs to save for next depth data. BitOnBottom: this can be calculated using BitDepth and HoleDepth. We are not using the prewritten BitOnBottom Computation, as there will a dependency which will block us from computing Drilling State. [MDS] I updated the details for Bit on Bottom in the powerpoint slides. I had originally changed them and forgot to pass on the newest version, but I have updated the version in Google drive linked above. I also added a new card (#972) in Waffle as a child of #797 for the bit on bottom flag to also have an error state when the bit depth is significantly deeper than Hole Depth as this indicates a data quality issue normally.
Apart from these two, rest of the tags BitDepth, HoleDepth, TotalPumpOutput, RotaryRPM, InSlipStatus, and StandpipePressure we will get in depth data.

[MDS] in the line above you say you will get these in depth data, but these value should be pulled from the time indexed data stream. Even though they are often available in both the time and depth indexed stream, the values for the rig state should be pulled from the time indexed stream. Finally, we need to implement the logic provided in "Anadarko thresholds onshore operation_indicator_offshore.txt" file. This will provide us the Drilling State Engine.

For more information regarding the implementation, we can refer to the "Current" named sheet in "Anadarko rig state matrix.xlsx" file. This sheet contains the logic of how all the parameters are used in the computation.

@Mike-d-s https://github.com/Mike-d-s , we have few questions related to Drilling State Engine, as follows :

In "Rotating Only", "Circulating & Rotating" and "Circulate Hole" state computation, the value of (abs(BitDepth-PreviousBitDepth)) is compared with 0.5 in "Anadarko thresholds onshore operation_indicator_offshore.txt" whereas its comparison value is 0.05 in "Anadarko rig state matrix.xlsx" file "Current" sheet. Which one we should consider?

[MDS] For the moment, do not use either of these values, use 1.0 ft for the delta threshold. We may lower this later, but let’s start with a wider range. Note comment above that use of absolute value ignores potential error state where bit depth can be deeper than hole depth due to dat quality issue. Absolute value would actually drive the bit on bottom flag to “off bottom” using absolute value. Additionally, rather than using a bit depth window, we should use block direction computation to determine direction of motion. Bit depth may not always be set especially during non drilling activity, but block movement is typical always available no matter what. I will work on updating the Anadarko sheets to help clean up the logic train.
For computing "Tripping Out Pumps On" and "Tripping Out Pumps Off" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" for ON and OFF simultaneously in a single condition. We think its need to be checked only once. According to "Anadarko rig state matrix.xlsx" file "Current" sheet, "BitOnBottom" should only be checked for "OFF". Please verify this and let us know.

[MDS] I had not gone through 100% of the Boolean logic for this sheet. This is wacky. I will work on editing the document. But to answer your question, BitOnBottom has to be OFF for any Tripping status (In or Out) with or without pumping. For computing "InSlips" states according to "Anadarko thresholds onshore operation_indicator_offshore.txt" we are checking "BitOnBottom" status. But, according to "Anadarko rig state matrix.xlsx" file "Current" sheet "InSlips" doesn't depends on "BitOnBottom". Can you please verify.

[MDS] In the “Anadarko rig state matrix.xlsx” they use a simplified version of the bit on bottom flag. If you look in column G for "Hole Depth or with Bit Depth combo”, you’ll see they calculate BD[i] < HD[I] which is checking to see if bit depth less than hole depth. Though they don’t use a threshold, this is essentially the same logic as BitOnBottom flag and we should use BitOnBottom flag. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hashmapinc/Tempus/issues/701#issuecomment-450620234, or mute the thread https://github.com/notifications/unsubscribe-auth/Akx7d6DL4RFRJjkXVuQO4Jcn1Oqh6ltaks5u-cwMgaJpZM4WVoLn.