November 16: Drilling Modeling and Control
Creating an Open Source Drilling Community
Modeling the drilling process allows us to understand the physics driving our systems. Proposed tools and procedures can be tested without the time and risks of rig trials. In the near future, it will be inconceivable to put a new tool in the ground or new control system on a rig without fully testing the full system for performance and stability.
ExxonMobil challenged the industry, contributed models, and gathered a coalition of experts to start this effort. Additional models have been submitted by Scientific Drilling, NORCE, Texas A&M, and the University of Calgary, with more coming. MathWorks has helped convert the initial ExxonMobil code to Simulink®, improve code stability, optimize the execution speed, and document how to use the models. All models, data, and test cases are freely available for academic and commercial use.
The University of Calgary is coordinating the organization’s web and GitHub sites. To join this effort, go to the Open Source Drilling Community and add your contact information to the mailing list on the Contribute tab.
Real-Time Control and Online Parameter Estimation for Drill String Dynamics Modeling
Accessing resources in the subsurface—hydrocarbons, thermal energy or at times, minerals—requires the drilling of a slender wellbore through varied geology. Power for the drillbit is transmitted through a combination of fluid power and mechanical energy along a drill string made up of segments of steel pipe. The aspect ratio of the system, where wellbore diameters range from 10 to 50 cm and depths extend up to 10 km, results in a system with system non-linear dynamics. Sensing of downhole parameters is typically limited and delayed, which presents the need for a sufficient drill string model for parameter estimation. In this talk, you’ll see one such model that has been developed and validated with field data that is based on the one-dimensional wave equation with a distributed friction term. An estimator for the model has been developed to provide an estimate of downhole torques and RPM and is used as a monitoring tool and for real-time control.
A Simulink Library for Drilling Modeling, Simulation, and Control
Mitigating drill string vibrations requires detailed and accurate information on downhole parameters. This data is not always available due to slow telemetry systems or a lack of sensors. An advanced drilling model is needed to estimate these parameters and make fast, informed decisions in real time. However, most drilling models used today are recreated multiple times, which requires substantial effort.
In this talk, we will present a prebuilt drilling library created in Simulink® and walk through a two-degrees-of-freedom drilling dynamics model where the differential equations are modeled in MATLAB® and Simulink. We will demonstrate how to set up the initial and operating conditions for simulation. Finally, we will inspect and compare data and simulation results to validate and iterate drilling model designs using the Simulation Data Inspector. This way, we can rapidly explore and implement designs without having to design custom libraries in low-level languages.
Nonlinear Model-Based Adaptive Robust Controller in an Oil and Gas Wireline Operation
11:30 a.m.–12:00 p.m.
This talk presents the design and implementation of a nonlinear model-based adaptive robust controller (ARC) for tool motion control, driven by a hydrostatic transmission used in an oil and gas wireline operation. A detailed physical system model was built for controller design and testing. The ARC controller was designed to address both parametric uncertainties and uncertain nonlinearities inherent in the nonlinear system dynamics. The controller software development and testing followed a Model-Based Design procedure. A microservice architecture based on Docker containers was adopted for the controller software which facilitated continuous integration and deployment. The preliminary testing results show the effectiveness of the ARC controller design.
Modeling Drilling Dynamics with Simulink
The drilling industry has substantially improved performance based on knowledge from physics-based, statistical, and empirical models of components and systems. However, open-source packages and several commercial software struggle with modeling drilling dynamics. Simulink® has several inbuilt capabilities that enable you to work more efficiently and improve your development of drilling models. Explore how you can:
- Manage models and data in one place in a collaborative, scalable environment with Simulink Projects
- Use Simulink to convert MATLAB® scripts to MATLAB functions that simplify the task of building models
- Create a custom interface with block masking to hide the block content and simplify the user interface to the model
- Create custom libraries for common drilling dynamics such as drill string, heavyweight drill pipe, drill bit, and mud motor
- Use the variant subsystem to easily swap out the active implementation and replace with alternate configurations without modifying the model
MATLAB Controller Linked to an ANSYS Structural Model for Directional Drilling Controller
Automation can lead to significant improvements in drilling practices. Maintaining tool face orientation and optimizing rate of penetration during the sliding operation is a challenging directional drilling process to automate. The control challenge arises primarily because of the complicated behavior of the drill string and the constantly changing operating and geological conditions. To develop a robust controller, a drill string structural model of high fidelity is required to simulate multiple scenarios in a realistic and efficient manner. To achieve this objective, a structural model for the drill string developed in ANSYS Mechanical FEA software is networked to a control algorithm based in MATLAB® in a feedback loop. This technique leverages the strengths of each software (MATLAB for the control algorithm and ANSYS for the structural model) and enables efficient evaluation of different control approaches.
Using Model-Based Design to Implement the Motor Control Logic of an Electric Downhole Flow-Control Valve
As part of the development process of a fully electric downhole flow-control valve, MathWorks Consulting Services worked with Schlumberger to achieve a major project milestone: the ability to demonstrate—from scratch, in less than a year, and in parallel to the design of the hardware—driving different models of electric motors as per client requirements. Simulation allowed validation of the control logic before any hardware was available, while code generation with Embedded Coder® enabled early integration and verification tests as soon as the first prototypes were released. Using Model-Based Design and generating code with Simulink® were essential to achieve the challenging objectives and timeline set by the client.
November 17: Geoscience and Production Modeling
Carbon Sequestration Using the MATLAB Reservoir Simulation Toolbox (MRST)
Modeling geological storage of carbon dioxide is characterized by scarce data, large spans in spatial and temporal scales, and delicate balances between different physical flow mechanisms. The MATLAB® Reservoir Simulation Toolbox (MRST) offers a set of simulators and workflow tools that have been specially designed to meet these challenges. The software combines results from more than a decade of academic research and development in CO2 storage modeling into a unified toolchain that is easy and intuitive to use.
You’ll see a demonstration of functionality from MRST applied to studying hypothetical carbon storage in large-scale aquifer systems from the Norwegian continental shelf. You’ll also discover tools and GUIs which can be used in a workflow from regional scale estimates to a detailed characterization of a specific storage site, including:
- Static capacity estimates
- Basic analysis of CO2 trapping mechanisms at a specific reservoir
- Interactive simulation of CO2 injection where various simulation parameters (well locations, injection rates, and boundary conditions) can be varied through a GUI
- Detailed simulation of a specific CO2 injection site
The reference application is free to download from the MathWorks website.
Modeling of Gas Processing Facilities Using Simscape
RAG Austria is one of the largest energy storage companies in Europe focusing on the sustainable use of depleted natural gas reservoirs for underground gas storage and the conversion of renewable energy to hydrogen. Upon extracting the gas from the reservoirs, a main gas-processing step is the dehydration of the gas by extracting water vapor from the water saturated gas stream. Two different dehydration methods are applied: gas dehydration by adsorption to silica gel and gas dehydration by absorption, also known as glycol dehydration.
In this session, we’ll give an overview of the successful development and application of simulation models for both dehydration methods using Simscape®. The physical description of the adsorption and absorption processes could be implemented successfully by applying the Simscape custom component functionalities to build detailed models of the adsorption and absorption column dynamics. We’ll present several use cases that show an excellent agreement with measurement data recorded at the gas dehydration plants.
Facies Classification with Wavelets and Deep Learning
With the dramatic growth and complexity of seismic data, manual labeling of seismic facies has become a significant challenge. In this talk, we will highlight how applying deep learning and wavelets in MATLAB® can help solve this challenge and provide a starting point to speed up interpretation by geoscientists. You will learn how to:
- Use MATLAB to simplify the application of advanced techniques like wavelets through interactive apps
- Create deep learning models with just a few lines of MATLAB code
- Explore a seismic volume with the Volume Viewer app
- Accelerate algorithms on NVIDIA® GPUs or in the cloud without specialized programming or extensive knowledge of IT infrastructure
Accelerating Grain and Pore Size Image Processing with MATLAB
11:30 a.m–12:00 p.m.
Digital imaging is widely used in the energy industry for better insights into the pore-fill, texture, and various petrophysical properties of reservoir rocks. In this talk, we focus on scanned images of rocks (digital rock) that are analyzed using computers to replace expensive and time-consuming laboratory experiments. Digital rock leverages image processing techniques to compute recognizable features from 3D images of rocks, grains, and pores. These features could be used to train deep learning networks which would eventually predict rock properties.
One of the key production bottlenecks in this workflow is the processing time. A 1300x1300x1330 pixel image used to take about 24 hours of processing time. Shell and MathWorks Consulting Services worked on optimizing the code and improving performance. The algorithms were reworked using MATLAB® and Image Processing Toolbox™. The optimized code was then tested on the deployment environment (cluster) and found to yield about a six times greater performance improvement. This talk presents the challenge, approach, outcome, and impact of this code optimization exercise.
Predictive Maintenance of a Heat Exchanger
By implementing a predictive maintenance program on a heat exchanger, process engineers can identify when to modify operations to extend heat exchanger life versus when to take the heat exchanger offline for cleaning. In this session, you will learn how you can use MATLAB® and Simulink® to aid in fouling monitoring and prediction by:
- Building a rigorous first principles model of the heat exchanger with Simscape™
- Building a digital twin of the heat exchanger by tuning the parameters of the model to match field data with Simulink Design Optimization™
- Generating synthetic data from the digital twin to simulate heat exchanger fouling
- Modeling an exponential degradation process for estimating the remaining useful life (RUL) of the heat exchanger with Predictive Maintenance Toolbox™
Simulation of a Multiphase Flow Sampling System
Measuring the production rate of oil, brine, and gas throughout the life of a well is essential for reservoir management optimization and early detection of water or gas breakthroughs. However, the measurement of phase flow rates in a multiphase flow is difficult. Most metering technologies are subject to errors due to slip between the phases and changes in flow regime. A new approach was proposed to periodically sample the whole flow for a short time while controlling the pipeline pressure so that the sampling action does not change the phase flow rates. To study the feasibility of this approach, a state-space model of the fluid pipeline coupled to the sampling system was developed in MATLAB®. Simulink® was used to model the system dynamics and determine whether the forces and response times required from actuators were achievable. Promising simulation results were followed by construction and testing of a prototype meter in a flow loop, where the actual system dynamics were confirmed to be well predicted by the simulation.
Thomas Hillman, Aramco Research Center–Houston
Max Deffenbaugh, Aramco Research Center–Houston