Predicting Failures and Optimizing Performance in Rod...

17
13 th Annual Sucker Rod Pumping Workshop Renaissance Hotel Oklahoma City, Oklahoma September 12 15, 2017 Predicting Failures and Optimizing Performance in Rod Pumps using Data Science Models Mike Pennell Chief Data Scientist OspreyData

Transcript of Predicting Failures and Optimizing Performance in Rod...

Page 1: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

13th Annual Sucker Rod Pumping

WorkshopRenaissance Hotel

Oklahoma City, Oklahoma

September 12 – 15, 2017

Predicting Failures and Optimizing

Performance in Rod Pumps using

Data Science Models

Mike Pennell

Chief Data Scientist

OspreyData

Page 2: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Objectives

▪ Understand how machine learning (ML, aka AI)

can be applied to sucker rod pumps

▪ Learn key ML terms and concepts

▪ Understand how ML models work

▪ Model Types and Value

▪ See the results and benefits

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 2

People Manage Machines

Machines Monitor Machines

Page 3: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Monitoring Multiple “Dimensions”

▪ Monitoring for indicative patterns across all signals and dynacards

▪ ”High Dimensionality” = Many signals

▪ “SME” = Subject Matter Expert = You!

▪ “Labels” = Periods or events marked by SMEs

▪ “Machine Learning” = Training mathematical models to find labeled patterns

Normal Predictive

Dia

gn

os

tic

3

Diagnostic

Casing Pressure

Tubing Pressure

Pump Fillage

Percent Run

Peak Load

Min Load

Fluid Load

Tubin

g F

ailu

re

Page 4: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Features &

Normalization

▪Normalization = signal compared to normal signal for well

▪Normalized feature is comparable across wells

▪Easily interpretable by mathematical models, not humans

▪Does not require configuration for each individual well

▪Many different approaches for different purposes 4

Raw Signal

Normalized Value

Raw Signal

Normalized Variance

• Smooth/consistent

• Outliers removed

• Scales from –5 to 5, 0 = normal

• Scales from 0 to 10, <1 = normal

• Obvious increase in variability

Fluid Load

Min Load

• Obvious drop

from normal

Page 5: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Confusion Matrix - Evaluate Success

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 5

▪ True Positive (TP)

▪ Predicted/diagnosed failure and failed

▪ False Positive (FP)

▪ Predicted/diagnosed failure and didn’t fail

▪ False Negative (FN)

▪ Did not Predict/diagnose failure but did actually fail

▪ True Negative (TN)

▪ Did not Predict/diagnose failure and didn’t fail

▪ Measured for particular time

▪ Failed when predicted/diagnosed

▪ Measure for particular failure/event

▪ Failed at some time

▪ Detection = Detected event in time

▪ Enough time to act (> 4 hours prior)

▪ Not too early (within 5 days)

Page 6: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Models and Performance

▪ Key performance measurements

▪ Accuracy = correct (TP + TN) / total (TP + FP + TN + FN)

▪ Precision = correct positive (TP) / all predicted/diagnosed (TP + FP)

▪ Recall/Sensitivity = correct positive (TP) / all actual events (TP + FN)

▪ Most models use decision trees

▪ Random forest (RF) & gradient boosted trees (GBT) most common

▪ Ensemble model combines 10s – 100s of trees that each vote

▪ Training set versus test set

▪ Training set = wells it has trained on, Test set = wells it has not seen

▪ Cross validation = performance on all wells as if model has not seen any wells

Page 7: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Precision-Recall Tradeoffs

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 7

▪ Performance is

adjustable

▪ Better Precision =>

Lower Recall

▪ Fewer False

Positives

=> More Misses

▪ Some events occur

without warning –

not predictable

▪ Some conditions

look like failure but

do not fail

Improving

Precision

Reduces

Detection

Looks Like Failure

But Does Not Fail

Recommended

Operating

Point

Page 8: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Neural Network (AI) Models

▪ Neural networks better for interpreting shapes

▪ Learn like human brain

▪ Associate patterns with “classes”

▪ Classify dynacardshapes

▪ Not sufficient to be predictive

▪ Input to predictive and diagnostic models

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 8

Page 9: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

How Ensemble Models Work

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 9

Layer Purpose

Event

Classification

- Resolve Conflicts Between Underlying Models

- Make Final Prediction Based on Input for All Models

- Scores Confidence of Each Possible Class

Event Diagnostic - Gather Full Event Information (Contiguous Periods)

- See Potential Begin, Middle, End to Assess Likelihood

- Provides a Score for the Entire Event

- Prevents Anomaly Predictions for Individual Periods

Base Period

Diagnostic

- Identifies Period of High Risk based on Similarity of Features/Patterns

- Trained Using Prior Labeled Signals

- Provides a Confidence Score that can be Thresholded

Feature Extraction - Calculates Required Features for Higher Level Models

- Looks Back Over History (State Space)

- Normalizes to Enable Comparison Across Wells and Timeframes

Data and Machine

State

- Ensure Data and Operation Are Functioning and Providing Adequate

Data for Accurate Modeling

Page 10: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Top Features Indicator

Fluid Load Low

Tubing Pressure variability Low

Tubing Pressure Low

Pump Fillage High

Pump Fillage variability Low

Peak Load Low

Casing Pressure Low

Peak Load variability Low

Casing Pressure variability Low

Polished Rod HP Low

Min Load High

Fluid Load trending Up or Down

Fluid Load Low

Tubing Pressure variability Low

Tubing Pressure Low

• Random Forest

• 24 Features (of 100’s Available)

• Max Depth: 19

• Number of Trees: 22

• Training:

• Precision: .60

• Accuracy: .99

• Cross Validation

• Precision: .50

• Accuracy: .99

Tubing Failure

Failure Model

Page 11: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Model Types and Value

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 11

Model Type Value Creation

Diagnostics - Immediate Alert of Faulty State

- Reduce Downtime

Near Term Predictions - Plan Into Failures

- Reduce Downtime

Long Term Predictions - Extend Asset Life

- Lower Operating Costs

- Avoid Downtime

Sub-optimal Production - Increased Production

- Extend Asset Life

- Lower Operating Costs

Page 12: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Long Term Lifespan Predictions

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 12

Predicted

Tubing

Lifespan

Actual

Tubing

Lifespan

▪ Predict tubing lifespan

months/years in advance

▪ Based on well, pump,

operating characteristics

▪ Adjust to extend life

Error

Age

▪ Predictions improve

over time

Page 13: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Assumption: Oil Price = $45 / BBL

Confusion Matrix - Hourly

Condition Training Cross V

False Negative 109 1,530

False Positive 3,399 3,745

True Negative 604,020 603,939

True Positive 5,354 3,670

Description Training Cross V

Total Events 180 180

Detected Events 139 126

Detection Rate 77% 70%

Accuracy 99% 99%

Precision 61% 50%

True Interventions 139 126

False Interventions 89 126

Training Cross Validation

Potential Downtime Reduction 7.32 days 7.32 days

Downtime Reduction per Event $31,700 $31,700

Estimated Downtime Reduction ~ $4,500,000 ~ $4,000,000

Cost of False Intervention ($1,000) ($1,000)

Total Cost of False Interventions ($89,000) ($126,000)

Diagnostic Model Value Created $4,411,000 $3,874,000

Tubing Failure ROI Case Study

• Based on 500 wells for 1 year

Page 14: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Its Not Just About Failures

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop 14

Bad Load Cable Traveling Valve Hung Open

Sub-Optimal State

SO Duration

(Days)

Expected

Production

Actual

Production

Total Barrels

Lost (BBLs) % Lost

Bad Load Cable 918 58,252 44,007 14,245 24.5%

Junk Card 500 40,755 33,845 6,910 17.0%

Traveling Valve Hung Open 132 13,856 11,369 2,486 17.9%

Total 1,551 112,862 89,221 23,641 20.9%

Junk Card

• Fix load cable, change POC settings or treat well can resolve conditions

• Timely interventions can saved an estimated $2500 per pump per year

Page 15: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

DETECT & PREDICT

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop

E S P

· GAS INFLUX, SLUGGING, LOCK

· HOLE IN TUBING

· BROKEN SHAFT

· DOWNTHRUST

· RISING TEMPERATURE

· VOLTAGE IMBALANCE

· GROUNDED DOWNHOLE

· EXCESSIVE PUMPOFF

· HIGH RISK OPERATION

· PUMP FAILURE

· DOWNHOLE PROBLEM

· SCALE/WAX

· RECYCLING

· CORROSION

· CABLE SHORT

· COMMUNICATION LAPSE

· GAS OIL RATIO CHANGE

· PRESSURE CHANGES/ANOMOLIES

· LONG TERM ABRASION

· …

R O D P U M P

· TUBING FAILURE

· PUMP FAILURE

· ROD FAILURE

· BAD LOAD CABLE

· IMPROPER POC SETTINGS

· LEAKING/STUCK TRAVELING VALVE

· LEAKING/STUCK STANDING VALVE

· EXCESSIVE PUMP OFF

· FLUID POUND

· GAS POUND

· GAS INTERFERENCE

· FLOWING WELL

· PUMP TAGGING TOP/BOTTOM

· FRICTION

· …

G A S L I F T

· OVER INJECTION

· UNDER INJECTION

· LEAKING VALVE

· STUCK VALVE

· FLOWLINE RESTRICTION

· VALVE FAILURE

· COMPRESSOR FAILURE

· EXCESSIVE BACK PRESSURE

· EXCESSIVE BACK PRESSURE

· …

Questions ?

Page 16: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Copyright

16

Rights to this presentation are owned by the company(ies) and/or author(s) listed on the title page. By submitting this presentation to the Sucker Rod Pumping Workshop, they grant to the Workshop, the Artificial Lift Research and Development Council (ALRDC), and the Southwestern Petroleum Short Course (SWPSC), rights to:

▪ Display the presentation at the Workshop.

▪ Place it on the www.alrdc.com web site, with access to the site to be as directed by the Workshop Steering Committee.

▪ Place it on a CD for distribution and/or sale as directed by the Workshop Steering Committee.

Other use of this presentation is prohibited without the expressed written permission of the author(s). The owner company(ies) and/or author(s) may publish this material in other journals or magazines if they refer to the Sucker Rod Pumping Workshop where it was first presented.

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop

Page 17: Predicting Failures and Optimizing Performance in Rod ...alrdc.org/workshops/2017_2017SuckerRodPumpingWorkshop...Classify dynacard shapes Not sufficient to be predictive Input to predictive

Disclaimer

17

The following disclaimer shall be included as the last page of a Technical Presentation or Continuing Education Course. A similar disclaimer is included on the front page of the Sucker Rod Pumping Web Site.

The Artificial Lift Research and Development Council and its officers and trustees, and the Sucker Rod Pumping Workshop Steering Committee members, and their supporting organizations and companies (here-in-after referred to as the Sponsoring Organizations), and the author(s) of this Technical Presentation or Continuing Education Training Course and their company(ies), provide this presentation and/or training material at the Sucker Rod Pumping Workshop "as is" without any warranty of any kind, express or implied, as to the accuracy of the information or the products or services referred to by any presenter (in so far as such warranties may be excluded under any relevant law) and these members and their companies will not be liable for unlawful actions and any losses or damage that may result from use of any presentation as a consequence of any inaccuracies in, or any omission from, the information which therein may be contained.

The views, opinions, and conclusions expressed in these presentations and/or training materials are those of the author and not necessarily those of the Sponsoring Organizations. The author is solely responsible for the content of the materials.

The Sponsoring Organizations cannot and do not warrant the accuracy of these documents beyond the source documents, although we do make every attempt to work from authoritative sources. The Sponsoring Organizations provide these presentations and/or training materials as a service. The Sponsoring Organizations make no representations or warranties, express or implied, with respect to the presentations and/or training materials, or any part thereof, including any warrantees of title, non-infringement of copyright or patent rights of others, merchantability, or fitness or suitability for any purpose.

Sept. 12-15, 2017 2017 Sucker Rod Pumping Workshop