Width.ai

How Machine Learning in Oil and Gas Is Slashing Costs

Karthik Shiraly
·
September 29, 2021

BP, Shell, ExxonMobil, Total. These are some of the biggest players in oil and gas. Something else they have in common? They think machine learning in oil and gas can improve operations and reduce costs.

But why? World politics, electric vehicles, and climate change are pushing society away from oil. They have affected the entire oil supply chain from well to outlet. In response, oil and gas companies are looking to cut costs and improve efficiency.

Machine learning algorithms are helping the oil and gas industry do that. Let's see how.

Geoscience Data Analysis

Oil and gas companies are not new to large seismic data sets. They are primarily structured data in time series formats.

Decision trees have been the industry's machine learning models of choice for such structured data. For example, they have been used to classify subsurface rock facies by analyzing well log data. Their popularity is understandable given that their results are easy to justify to stakeholders. They are not black boxes like neural networks whose results are difficult to justify.

But don't ignore neural networks and labeled data. You may be missing out on dozens of opportunities in oil and gas exploration to reduce costs and improve efficiency.

Advances in computer vision and deep learning can provide unparalleled insights into unstructured data such as images of rock microstructure.

Deep learning excels at finding patterns in such unstructured data with high accuracy. A task that took hours for a geologist can now be done by a single system in minutes. One system can analyze images from dozens of wells in an hour. Less time, fewer mistakes, and repeatable results mean reduced costs.

For example, take hydraulic fracturing. It cracks shale rocks using water at high pressure to make the trapped oil flow. Engineers analyze the fractures to make better decisions about locations and pressures.

Object detection using deep neural networks has proved useful here. A deep neural net examines electron microscope images of rock slices to detect and measure these fractures.

Another innovation is enhancing your traditional physics models with parameters learned through machine learning.

For example, a physics model for rock porosity was improved using deep learning. The model's accuracy was boosted using an autoencoder, a special type of deep neural network that automatically selects the most characteristic visual features in images.

These features can then be fed to a classical or deep learning model. They yield higher accuracy compared to features selected manually. High accuracy translates to fewer mistakes and lower costs.

Predictive Models for Oil Field Development

Silhouette of oil machines

Predictive models can help you make informed decisions about field development and workflow to reduce costs. They can learn the optimum number of wells, best locations, and most efficient sequence of drilling.

An innovative machine learning method being used for this is Reinforcement Learning. An RL system learns to meet a goal while increasing a target value. Reducing cost or increasing supply are some examples of targets.

Deep RL is RL using deep neural networks. It's being used to create optimized field plans based on reservoir parameters, rock properties, and fluid properties. 

Here’s what it looks like: Your engineers run a large number of reservoir simulations with structural and fluid properties that resemble the real field. At each step, the RL agent randomly decides whether to drill or not. If it decides to, it picks a location. When a virtual well is drilled, the system simulates two-phase oil and water flow there. The agent then calculates the net present value for the entire field: its target value. This is repeated thousands of times for the agent to maximize the value. The end result is a field plan with an optimized net present value.

Predictive Analytics for Reservoir Engineering

Recovery factor is a key metric for a reservoir. It's the total oil that you can get economically. Some reservoirs are just not worth exploring because they may not be profitable over their lifetime. Predictive analytics to estimate recovery can prevent wasted time and costs before any drilling is even started.

BP uses Azure auto machine learning to estimate recovery. Auto ML is brilliant — it's a way of using machine learning for any use case without knowing anything about it! Just supply the data. Auto ML finds the best machine learning model by itself.

Machine learning can optimize other operations such as enhanced oil recovery too. For example, deep reinforcement learning is being used to select optimal values for parameters like water injection rates to reduce costs and maximize profits. It involves a 2D reservoir simulator that simulates two-phase flow of oil and water. At each step, the deep RL agent tries a different water injection rate, infers the simulator’s behavior through its pixels, calculates net present value, and changes the next step’s injection rate in a direction that improves net present value.

Machine Learning for Real-Time Drilling

Any deviation from the planned well path means downtime and higher costs. This is particularly true for directional drilling when drilling a curved path to an inaccessible reservoir. 

Directional drilling uses mud motors or rotary steering systems. A direction instruction, called a downlink, is passed down the well to the drill bit. The drill bit responds with feedback. Both are relayed via mud pulses or electric signals. These signals are in the form of time-series data.

An electronic signal detector may miss or mistake a downlink or feedback event. This can be very expensive. 

You can add real-time detector software to this workflow. They use deep learning to detect these events with high certainty. Early detection can prevent costly mistakes before it's too late.

One such method uses a segmentation neural network to detect these events. Normally, segmentation is a computer vision task run on images such as photos. But the line chart for a time series is an image too. Two U-Net deep networks examine the signal line chart to detect downlink events. They examine patterns embedded in the pixels of the signal line and learn to isolate periods corresponding to downlink events.

Another expensive problem in drilling is lost circulation. This is when drilled mud spreads out at the bottom instead of floating up. Machine learning is being used to detect and predict lost circulation. Sensor data such as pressures and temperatures from past incidents are input to the machine learning model. It learns to predict possible lost circulation events from real-time measurements.

Artificial Intelligence in Oil and Gas Production

It's in the production phase that machine learning in oil and gas can benefit you the most. A well does spend most of its lifetime in production, after all.

One production problem is flow metering. The stuff that’s brought up is a mixture of four things — crude oil, natural gas, water, and drilled earth. It's called multiphase flow. Each of them has to be measured and separated on-site.

But hardware flow meters are expensive and fragile.

A cheaper option is a virtual flow meter using machine learning. It can estimate flow rates just from pressure, temperature, and choke data.

One such virtual flow meter uses a Long Short-Term Memory recurrent neural network. Such deep recurrent networks are good at learning how things change with time and excel at forecasting. This one can forecast flow rates with high accuracy.

Another production problem is Enhanced Oil Recovery. EOR tries to extract every last drop of oil from a well. But should you proceed with an EOR operation at all? Will it be profitable? One innovative method uses a Generative Adversarial Network (GAN) to predict the production rate of an EOR operation before it's begun.

A GAN is like an arms race. Two machine learning systems square off against each other. Each tries to improve by examining the other's mistakes. One tries to generate better data. The other tries to get better at predicting the generated data. This way, one system ends up training the other to predict with high accuracy. It’s an innovative method that you should definitely think of including in all your optimization plans.

Predictive Maintenance Prevents Downtime

Gas worker at factory

Any downtime or failure is expensive. Predictive maintenance has become a flagship for machine learning in oil and gas.

You probably already use anomaly detection and failure prediction. They use data from Internet of Things sensors in the field. These IoT sensors measure pressures, temperatures, or flow rates, for example.

But did you know that recommender systems are also used? They suggest, in advance, which equipment and spares to purchase to prevent downtime, exactly like Amazon's "Customers also bought" feature. Sales data for equipment and spares is used to prepare a user-item table for collaborative filtering. A nearest neighbor machine learning model is applied to this table. It will tell you what typical equipment and spares you probably need to purchase.

Predictive Optimization in Safety and Environment

Machine learning can help improve your health, safety, environmental, and compliance procedures.

Natural Language Processing is a field that attempts to learn and understand textual content as a human does. Some of the most accurate automation methods in NLP use machine learning. Such methods are used to classify incident reports and extract useful data from reports. They use document classification and information extraction models on text content of reports to infer characteristics like risk type, incident type, and consequence type. By doing this efficiently with high accuracy compared to a human worker, it helps slash training and compliance costs.

Computer vision is another field that benefits from machine learning methods. Unsupervised learning is used on aerial images to map the extent of an oil spill. It uses unsupervised machine learning techniques like clustering and topic models to separate pixels that are clean water from pixels that seem to contain oil pollutants.

Decision-Making in Midstream

If you are a midstream company, you can use machine learning for pipeline maintenance and transport optimization.

For example, a ship's power is an indicator of its efficiency and emissions. Low efficiency or high emissions can result in high financial and regulatory costs. Machine learning is used to predict its propulsion power and estimate its efficiency. The system predicts propulsion power based on factors like coarse, heading, wind velocity, ship speeds, and steering control positions.

Cost Optimization in Downstream

The entire oil industry supply chain is highly sensitive to oil prices. If you can foresee a dip in a few months, you can take evasive actions now. Data analytics can help you forecast oil prices. 

One such method uses nonlinear regression models to forecast prices and evaluate the oil market. The forecasts are based on historical and current data for a variety of economic factors that are correlated with oil prices, such as stock indices, currency exchange rates, past fuel prices, and future contracts. From this data, a nonlinear model like a support vector machine with a nonlinear kernel works out how oil prices are correlated with these factors.

A different kind of downstream problem is scheduling your refinery’s output. Crude oil varies daily in quality. Your refinery has to plan its output suitably to remain profitable. You are probably already using Gantt charts and optimization methods from operations research for scheduling. 

Machine learning can help you improve your scheduling too. Deep belief networks are graph neural networks that can model task scheduling more accurately by learning parameters from historical data. One such deep belief network model can improve your refinery schedules. It accurately classifies the incoming crude oil’s composition in real-time and suggests a suitable schedule for the day.

Data Science for the Back Office

The back office is one place where there are plenty of opportunities to slash costs using machine learning.

For example, a natural language service like AWS Textract can extract data from diagrams and datasheets at high speeds with high accuracy. You can combine it with machine learning models for information extraction to obtain useful data from your engineering documents and drawings. A task that takes hours for human employees can be completed in minutes. The extracted data is used in inventory management and compliance reporting.

Another area where you can save costs is security. Object detection can be used for security and alerting on rigs. Your monitoring team is alerted whenever salient events like unexpected equipment movements or trespassing occur at the site. A series of machine learning models for object detection, object tracking, activity recognition, and image captioning work together to bring these alerts. They save you hiring and training costs.

Software for Data Scientists

Machine learning in oil and gas: Digital screen hovering over laptop

What software do oil and gas data scientists use? 

We have already seen the use of cloud services. Let's look at some more case studies:

Reduce Costs Using Deep Learning and Machine Learning in Oil and Gas

Oil companies are in an uncertain situation. Startups in the industry are not untouched. Domain expertise in oil may not be enough to be competitive. You need to adopt new technologies. You can increase your ROI and lower your costs by teaming up with data analytics and machine learning companies.

Scalr.ai focuses on using deep learning and machine learning algorithms to build software for you that increases ROI and product capabilities. Let's talk about how we can use our custom predictive analytics to automate and enhance your business in oil and gas.

Let's talk!