A Simulation Environment for Automatic Managed Pressure Drilling Control

A Simulation Environment for Automatic Managed Pressure Drilling Control

Proceedings of the 2nd IFAC Workshop on Automatic Control in Proceedings of 2nd IFAC Offshore Oil and Gas Production Proceedings of the the 2nd IFAC W...

764KB Sizes 32 Downloads 138 Views

Proceedings of the 2nd IFAC Workshop on Automatic Control in Proceedings of 2nd IFAC Offshore Oil and Gas Production Proceedings of the the 2nd IFAC Workshop Workshop on on Automatic Automatic Control Control in in Proceedings of the 2nd IFAC Workshop on Automatic Control in Offshore Oil and Gas Production Available online at www.sciencedirect.com May 27-29, 2015. Florianópolis, Brazil Offshore Oil and Gas Production Offshore Oil2015. and Gas Production May 27-29, Florianópolis, Brazil May May 27-29, 27-29, 2015. 2015. Florianópolis, Florianópolis, Brazil Brazil

ScienceDirect

A A A

IFAC-PapersOnLine 48-6 (2015) 128–133

Simulation Environment for Automatic Simulation Simulation Environment Environment for for Automatic Automatic Managed Pressure Drilling Control Managed Pressure Drilling Control Managed Pressure Drilling Control

Narendra Vishnumolakala ∗∗ Eduardo Gildin †† Sam Noynaert ‡‡ Narendra Narendra Vishnumolakala Vishnumolakala ∗∗ Eduardo Eduardo Gildin Gildin †† Sam Sam Noynaert Noynaert ‡‡ Narendra Vishnumolakala Eduardo Gildin Sam Noynaert ∗ ∗ Petroleum Engineering at Texas A &M University, Texas, USA ∗ Petroleum Engineering at Texas A &M University, Texas, USA ∗ Petroleum at (e-mail: [email protected]). Petroleum Engineering Engineering at Texas Texas A A &M &M University, University, Texas, Texas, USA USA (e-mail: [email protected]). † (e-mail: [email protected]). Petroleum Engineering at Texas A &M University (e-mail: (e-mail: [email protected]). † † Engineering at Texas A &M University (e-mail: † Petroleum Petroleum at [email protected]) Petroleum Engineering Engineering at Texas Texas A A &M &M University University (e-mail: (e-mail: [email protected]) ‡ [email protected]) at Texas A &M University (e-mail: [email protected]) ‡ Petroleum Engineering ‡ Petroleum Engineering at Texas A &M University (e-mail: ‡ Petroleum at [email protected]) Petroleum Engineering Engineering at Texas Texas A A &M &M University University (e-mail: (e-mail: [email protected]) [email protected]) [email protected]) Abstract: Drilling automation initially gained acceptance in the oil & gas industry as a solution Abstract: Drilling automation gained acceptance in the oil & gas industry as a solution Abstract: Drilling automation initially gained acceptance in & gas as to increase rigsite safety. While initially safety-related drilling automation has been implemented, many Abstract: Drillingsafety. automation initially gaineddrilling acceptance in the the oil oilhas & been gas industry industry as aa solution solution to increase rigsite While safety-related automation implemented, many to increase rigsite safety. While safety-related drilling automation has been implemented, many companies are beginning to recognize that drilling automation offers possibilities of performance to increase are rigsite safety. to While safety-related drilling automation has been implemented, many companies beginning that drilling offers possibilities of companies arealso. beginning to recognize thatincrease drilling automation automation offers possibilities of performance performance enhancement There to hasrecognize been a rapid in the number of wells being drilled, primarily companies are beginning recognize that drilling automation offers possibilities of performance enhancement also. There has been a rapid increase in the number of wells being drilled, primarily enhancement also. There been a increase in the of in unconventional reservoirs with the diminishing of easy oil. In unconventional plays, primarily managed enhancement also. reservoirs There has has with beenthe a rapid rapid increase of in easy the number number of wells wells being being drilled, drilled, primarily in unconventional diminishing oil. In unconventional plays, managed in unconventional reservoirs with the diminishing of easy oil. In unconventional plays, managed pressure drilling has been gaining importance because of its many advantages. Pressure balance in unconventional reservoirs with the diminishing of easy oil. In unconventional plays, managed pressure drilling has been gaining importance because of its many advantages. Pressure balance pressure drilling has been gaining importance because of its many advantages. Pressure balance through a choke manifold is the principle of Managed Pressure Drilling. Automatic choke control, pressure drilling manifold has been isgaining importance because of its many advantages. Pressure balance through a of Managed Pressure Drilling. Automatic choke control, through a choke choke manifold is the the principle principle of provides Managed better Pressure Drilling. Automatic chokeDifferent control, as opposed to manual operation on field, control on the operations. through a choke manifold is the principle of Managed Pressure Drilling. Automatic choke control, as opposed to manual operation on field, provides better control on the operations. Different as opposed to operation on provides control on control methodologies (viz. PID, MPC etc.) can be better designed to implement the controlDifferent system. as opposed to manual manual (viz. operation on field, field, provides better control on the the operations. operations. Different control methodologies PID, MPC etc.) can be designed to implement the control system. control methodologies (viz. PID, MPC etc.) can be designed to implement the control system. It is important to test the designs on a simulator to determine the optimal methodology before control methodologies (viz. PID, MPC etc.) can be designed to implement the control system. It is designs on determine optimal methodology before It is important importantitto toontest test the designs on a a simulator simulator todesigned determine the optimalwith methodology before implementing thethe field. A Drilling Simulatorto in the LabVIEW in-built control It is important to test the designs on a simulator to determine the optimal methodology before implementing it field. Simulator implementing it on on the thefunctions field. A A Drilling Drilling Simulator designed in in LabVIEW LabVIEW with with in-built in-built control control design and simulation solves this purpose.designed implementing it on the field. A Drilling Simulator designed in LabVIEW with in-built control design and simulation functions solves this purpose. design and simulation functions solves this purpose. design and simulation functions solves this purpose. © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Drilling Automation, Managed Pressure Drilling, PID Control, LabVIEW, Keywords: Keywords: Drilling Automation, Automation, Managed Managed Pressure Pressure Drilling, Drilling, PID PID Control, Control, LabVIEW, LabVIEW, Simulation.Drilling Keywords: Drilling Automation, Managed Pressure Drilling, PID Control, LabVIEW, Simulation. Simulation. Simulation. 1. INTRODUCTION and maximized with the introduction of automated drilling 1. INTRODUCTION and with of 1. INTRODUCTION and maximized with the the introduction of automated automated drilling rigs.maximized This is indeed theintroduction main objective of any drilling 1. INTRODUCTION and maximized with the introduction of automated drilling rigs. This is indeed the main objective of drilling rigs. This is isprocess: indeed increase the main main objective of any anythat drilling Put simply, automation is the replacement of human la- rigs. automation safety by ensuring well This indeed the objective of any drilling Put simply, automation is human process: increase by well Put simply, automation is the the replacement ofengineering human lala- automation automation process: increase safety by ensuring ensuring that well bor by machines. This may be replacement true in manyof dynamics does not exceed the safety ones specified by itsthat natural Put simply, automation is the replacement of human laautomation process: increase safety by ensuring that well bor by may many engineering bor by machines. machines. This may be be true in many engineering dynamics dynamics does not not exceed exceed the the ones ones specified specified by by its its natural natural disciplines, but in This this paper wetrue will in refer to Automation behavior. does bor by machines. This may be true in many engineering dynamics does not exceed the ones specified by its natural disciplines, but in this paper we will refer to Automation behavior. disciplines, but in this paper we will refer to Automation behavior. as a technique that makes a system to operate automatidisciplines, but in this paper system we will refer to Automation behavior. as aa technique automatiWith respect to efficiency, there are many drawbacks in as technique that makes system to to operate operate automatically assisting inthat the makes human a decision-making process. Since With as a technique that makes aadecision-making system to operate automatirespect to are many in With respectdrilling to efficiency, efficiency, there are because many drawbacks drawbacks in cally assisting in the human process. Since the manual process,there mostly of the conWith respect to efficiency, there are many drawbacks in cally assisting in the human decision-making process. Since the Industrial Revolution, there have beenprocess. innumerable cally assisting in the human decision-making Since the manual drilling process, mostly because of the conthe manual drilling process, mostly because of the conthe Industrial Revolution, there have been innumerable straints on human labor. Most drilling rigs are located in manual drillinglabor. process, mostly because oflocated the conthe Industrialadvances Revolution, have been technological usedthere to help humans work more the the Industrial Revolution, there havehumans been innumerable innumerable straints on human Most drilling rigs are in straints on human labor. Most drilling rigs are located in technological advances used to help work more harsh environments, which produce considerable amount straints on human labor. Most drilling rigs are located in technological advances useduseto toofhelp help humans work more harsh environments, which produce considerable amount efficiently. From the simple pulley systems to highly technological advances used humans work more harsh environments, which produce considerable amount efficiently. From the of to of stress on the peoplewhich working there.considerable The combined effect environments, produce amount efficiently. From the simple simple use use of pulley pulley systems systems to highly highly sophisticated Human-Robot Interactions (HRI), many in- harsh efficiently. From the simple use of pulley systems to highly of stress on the people working there. The combined effect of stress on the people working there. The combined effect sophisticated Human-Robot Interactions (HRI), many inan employee‘s workload, stress and fatigue affects perof stress on the people working there. The combined effect sophisticated Human-Robot Interactions (HRI), many industries have Human-Robot been quick toInteractions adopt these(HRI), advancements, sophisticated many in- of an employee‘s workload, stress and fatigue affects perof an employee‘s workload, stress and fatigue affects perdustries have been quick to adopt these advancements, formance, creating a greater chance for human error. In an an employee‘s workload, stress and fatigue affectsInperdustries havehave beenprogressed quick to to at adopt these pace. advancements, while some a slower Two ex- of dustries have been quick adopt these advancements, formance, creating aathose greater chance for human error. an formance, creating greater chance for human error. In an while some have progressed at a slower pace. Two exautomated system, same limitations are essentially formance, creating a greater chance for human error. In an while some have progressed at aviation slower and pace. Two exex- automated system, those same limitations are essentially amplessome that have standprogressed out are the automotive while at aa slower pace. Two automated system, those same same limitations are essentially essentially amples that stand are and eliminated and drastically reduce the occurrence of such system, those limitations are amples that stand out out Florence, are the the aviation aviation and automotive automotive industries (Thorogood, Iverson 2013). Both have automated amples that stand out are the aviation and automotive eliminated and drastically reduce the occurrence of such eliminated and drastically reduce the occurrence of such industries (Thorogood, Florence, Iverson 2013). Both have errors. When it comes down to it, an automated system eliminated and drastically reduce the occurrence of such industries (Thorogood, Florence, Iverson 2013). Both have achieved high levels of Florence, automation in their processes, so errors. When it comes down to it, an automated system industries (Thorogood, Iverson 2013). Both have errors. When it comes down to it, an automated system achieved high levels of automation in their processes, so is faster, more reliable, and more consistent compared to When itreliable, comes down to it,consistent an automated system achieved high levels of automation in their processes, processes, so errors. why not in thelevels case of of automation oil and gas in drilling? Perhaps it‘s achieved high their so is faster, more and more compared to is faster, more reliable, and more consistent compared to why not in the case of oil and gas drilling? Perhaps it‘s human operations none of which compare to its positive is faster, more reliable, and more consistent compared to why not in the the case of oil oil was andconsidered gas drilling? drilling? Perhaps it‘s all the years where drilling an art basedit‘s on why not in case of and gas Perhaps operations none of to human operations none (Iversen of which whichetcompare compare to its its positive positive all the where drilling was an art based on human impact on human safety al. 2013). human operations none of which compare to its positive all the years yearsrather wherethan drilling was considered considered art based on experience science, effectivelyan creating a lag all the years where drilling was considered an art based on impact on human safety (Iversen et al. 2013). impact on human safety (Iversen et al. 2013). experience rather than science, effectively creating a lag human safety (Iversen etofal.drilling 2013).automation. experience rather than than science, effectively effectively creating lag impact in the adaptation of automation. Just recently, though, Safety ison the most important aspect experience rather science, creating aa lag in the adaptation of automation. Just recently, though, Safety is the most important aspect of drilling automation. in the adaptation of automation. Just recently, though, the industry has seen rapid changes in terms of drilling Safety is the most important aspect of drilling automation. Automating a drilling rig means performing the drilling in the adaptation of automation. Just recently, though, Safety is the most important aspectperforming of drilling automation. the industry has seen rapid changes in terms of drilling Automating a drilling rig means the drilling the industry where has seen seen rapid changes changes in terms terms of systems drilling Automating automation completely automated drilling Automating a drilling rig means performing the systems drilling activities with the help of automated control the industry has rapid in of drilling a drilling rig means performing the drilling automation where completely automated drilling systems activities with the help of automated control systems automation where completely automated drilling systems are becomingwhere a reality (Eustes automated 2007). activities with the labor. help of ofThis automated control systems rather than human results in a reduction of automation completely drilling systems activities with the help automated control systems are rather than labor. This results in aa reduction of are becoming becoming a a reality reality (Eustes (Eustes 2007). 2007). rather than human human labor. This results in away reduction of the number of people on the rig floor, from the are becoming a reality (Eustes 2007). rather than human labor. This results in a reduction of The main objective for any driller is to simultaneously drill the number of people on the rig floor, away from the the number ofDrilling peopleason ona the the rigisfloor, floor, away from prothe The main objective for to drill process area. of whole a veryaway complex number people rig from the The maindrill objective for any any driller driller isand to simultaneously simultaneously drill the fast and safe, ensuring quickis accurate execution The main objective for any driller is to simultaneously drill process area. Drilling as aa whole is aasuch very complex proprocess area. Drilling as whole is very complex profast and drill safe, ensuring quick and accurate execution cess with several key sub-activities as the rotary, area. Drilling as a whole is asuch veryascomplex profast and drill drill safe,Typically, ensuring drilling quick accurate (Noynaert 2014). faster meansexecution less time process fast and safe, ensuring quick and and accurate execution cess with key rotary, cess with several several key sub-activities sub-activities such and as the the rotary, (Noynaert 2014). Typically, drilling faster means less time pipe racking, pumping, cementing, casing, directional cess with several key sub-activities such as the rotary, (Noynaert 2014). Typically, drilling faster means less time spent drilling, which in turn works to reduce costs. At (Noynaert 2014). Typically, drilling fasterreduce means costs. less time pipe racking, pumping, cementing, casing, and pipe racking, pumping, cementing, casing,systems and directional directional spent drilling, in works At drilling systems to name a few. These contain racking, pumping, cementing, casing, and directional spent drilling, which in turn turn works to reduce costs. At pipe the same time,which though, people are to a reduce company’s most spent drilling, which in turn works to costs. At drilling systems to name aa few. These systems contain drilling systems to name few. These systems contain the same time, though, people are a company’s most several parameters for the driller and his crew to monitor drilling systems to name a few. These systems contain the same time, though, people are a company’s most valuable asset and keeping their are wellabeing intact most is of several parameters for the driller and his crew to monitor the sameasset time,and though, people company’s several parameters for the the driller driller and his crew to to monitor monitor valuable their well intact is and control. An automated systemand canhis ultimately provide parameters for crew valuable asset and keeping keeping their well being being intact is of of several the utmost importance. These objectives can be achieved valuable asset and keeping their well being intact is of and control. An automated system can ultimately provide and control. An automated system can ultimately provide the utmost importance. These objectives can be achieved and control. An automated system can ultimately provide the utmost utmost importance. importance. These These objectives objectives can can be be achieved achieved the Copyright 2015 IFAC 128 Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © 2015, IFAC (International Federation of Automatic Control) Copyright 2015 IFAC 128 Copyright © 2015 IFAC 128 Peer review© of International Federation of Automatic Copyright ©under 2015 responsibility IFAC 128Control. 10.1016/j.ifacol.2015.08.020

IFAC Oilfield 2015 May 27-29, 2015. Florianópolis, Brazil Narendra Vishnumolakala et al. / IFAC-PapersOnLine 48-6 (2015) 128–133

better control over these parameters. This is even more evident in emergency scenarios due to the system’s ability to immediately recognize abnormalities. To this end, simulation environments that can handle these challenges are of great value in training personnel in this new paradigm of drilling automation. It also serve as a test bench for rigorously validating physical drilling models and in testing new forms of advanced control systems applied to several drilling processes. This paper introduces a simulation environment for the case of a Managed Pressure Drilling (MPD) operation. In Automatic MPD, one is concerned with automatically controlling the downhole pressure via a surface choke. Here, we use LabVIEW as a tool for creating this simulation environment. LabVIEW is a simple, user-friendly interface with associated graphics that can be developed such that even non-technical people (rigsite personnel in our case) can operate the program (Bishop 2007). We also developed a joystick-based control capability and designed a PID controller to obtain the desired pressure trajectory. In the next sections, we provide some historical perspective and the status of drilling automation and MPD and then introduce the mathematical background and software developments used here. We finish the paper with some results obtained with our simulation environment and the introduction of PID control for MPD.

129

deal with multiple service companies, rig contractors, equipment manufacturers, etc. Apart from the digital infrastructure, the availability of proper instrumentation devices has also hindered progress. Special sensors and other devices are required in the drilling process because 1) the sensors are required to provide real-time data, and 2) many measurements are made in sub-surface environments (Cayeux, Daireaux, Dvergsnes, Florence 2014). SPE and the International Association of Drilling Contractors (IADC) are working towards bringing automation in drilling to market in the near future. SPE has a specific technical section aimed at these advancements termed the SPE DSATS (Drilling Systems Automation Technical Section). One of the group’s focuses here is on standardizing communication protocol for the industry. The two current standards being considered are namely WITSML and OPC UA. IADC has also put together a committee working on comprehensive automation of the drilling process alongside the integration of surface and down-hole systems (Macpherson et al. 2013). The next decade is likely to have even more exciting advancements in this area of drilling technology, especially with the current research going on. At this rate, it can safely be said that drilling automation is not a theory anymore and is fast becoming a reality. 3. MANAGED PRESSURE DRILLING

2. DRILLING AUTOMATION - CURRENT STATE OF AFFAIRS Automation in the drilling industry is less advanced compared to other industries (Thorogood, Aldred, Florence and Iversen 2010). Failure to adopt new technology in any industry can occur for a variety of reasons. The oil and gas industry and the drilling sector in particular, has always been slow to take up new technologies due to economics, safety concerns and the drilling environment. In addition, a mistrust of automation exists, especially of automation of downhole pressure control. This mistrust is based on the inaccurate assumption that a human can better process the data and make better decisions. Another reason for this slow adoption can be attributed to the fact that drilling activity takes place in extreme working conditions, above ground in unhospitable areas and downhole with high temperature, high pressure (HTHP) formations. Finding control equipment and sensors to handle this environment is difficult. It is also important to note that the drilling process is not standard for all wells every wellbore’s construction is unique in its own way. Therefore, the modeling of this process cannot be definite, but, instead has to be adaptive. All of these contributing factors make automation in drilling a difficult task. However, with each technological advancement, these limitations are being overcome. It is also no surprise that the recent boom in unconventional reservoirs is adding more motivation for transitioning into automation. Unlike the automotive or aviation industries, one of the greatest things holding industry back is the lack of a common communication protocol or standards pertaining to drilling automation. This is primarily due to the highly segmented nature of the drilling industry where we must 129

Managed Pressure Drilling is a technique used in the Oil & Gas industry to drill wells which have limitations concerning the pressures which can be applied to the wellbore. Although there is not a formal definition, MPD is defined by a subcommittee of the International Association of Drilling Contractors (IADC) as “An adaptive drilling process used to precisely control the annular pressure profile throughout the wellbore. The objectives are to ascertain the downholepressure-environment limits and to manage the annular hydraulic pressure profile accordingly. The intention of MPD is to avoid continuous influx of formation fluids to the surface. Any influx incidental to the operation will be safely contained using an appropriate process.” Not every well drilled requires MPD and it is only applied when required due to complexity and cost. However, if MPD is required, it becomes a vital part of the drilling process. This is due to its importance regarding factors such as wellbore stability as well as the fact it becomes a primary barrier in the well control process, preventing kicks and potentially blowouts. The MPD process is particularly useful in drilling reservoirs where the pore pressure and fracture pressure gradient window is narrow. Any significant variation (typically loss of annular friction pressure caused due to mud pump shutdown etc.) in pressure causes the bottom-hole pressure (BHP) to go out of the pressure gradient window (or drilling window) resulting in situations like kick or lost circulation. It is not practically possible to balance the pressure variations with hydrostatic (mud) head. As can be seen in Fig. 1, the mud weight in the wellbore must be kept above or the right of the pore pressure gradient in order to avoid taking a kick or influx of hydrocarbons. However, the pressure must also be kept below or the left of the

IFAC Oilfield 2015 130 May 27-29, 2015. Florianópolis, Brazil Narendra Vishnumolakala et al. / IFAC-PapersOnLine 48-6 (2015) 128–133

using mass balance in the annulus (Godhavn 2010). To this end we write: d (ρV ) = ρQin + ρQbp − ρQout (1) dt where Qin indicates mud pump flow rate in to the drill pipe ; Qout is mud flow rate out of the annulus ; Qbp is flow rate due to the additional back pressure pump; ρ is mud density; V is annular volume Assuming that changes in annular volume are negligible and the difference in density values along the borehole length are insignificant, we can derive the relation for the rate of change of density as: ρ (Qin + Qbp − Qout ) dρ = dt V Fig. 1. Rough sketch of Managed Pressure Drilling using Constant Bottom-hole pressure technique fracture gradient to avoid fracturing the formation and losing mud and wellbore integrity. While formation pressures are generally controlled with hydrostatic pressure, it is not practically possible to balance the pressure variations with hydrostatic (mud) head for the entire length of the wellbore. Therefore, the standard method is to set a new casing string anytime this is not possible. In areas with a narrow window between the two, such as in deepwater fields, this can result in much higher costs due to the number of casing strings required. MPD offers a solution to some of these problems. There are different techniques under the MPD umbrellas such as Constant Bottom-hole pressure (CBHP), Pressurized Mud-cap drilling, Dual gradient technique and others. CBHP technique has been used in our model. It is a process in which the bottom-hole pressure is maintained at a constant pressure (pressure window in practice) specific to a depth, irrespective of pressure variations. The application of MPD technique becomes vital in offshore wells which are some of the most difficult and most expensive wells to drill and complete. Most of the current offshore resources are difficult to drill economically using the conventional drilling methods. There are even cases where the pore pressure and fracture pressure gradient curves almost overlap making it extremely difficult to maintain wellbore integrity. Significant non-productive time (NPT) is caused by kicks, lost circulation and other problems in the high pressure, yet low strength formations. These issues can be resolved and other advantages like ROP enhancement and better well control can be achieved using MPD in the offshore wells (Noynaert 2014).

(2)

By introducing compressibility factor, the density rate changes can be expressed in terms of pressure rate changes as follows: 1 ∂P dρ dP ⇒ = βρ ρ ∂ρ dt dt Qin + Qbp + Qout dP = dt βV

β=

(3) (4)

The system can be modeled as a closed-loop system by compensating for the pressure losses with a back pressure pump through a choke manifold. The flow rate out of the choke and pressure are related with choke characteristics. The choke opening (position), z is the control variable of the system.  P (5) Qout = Cv (z) ρ A PID controller (control variable z) has been used in this model to control the choke pressure and track the set bottom-hole pressures (reference variable).  de K e.dt + KTd (6) z = Ke + Ti dt The non-linearities in the system can be compensated by linearizing the model using nominal values (denoted by ’0’) and with careful tuning of the PID controller, it can be represented as a first order system.

4. MATHEMATICAL MODEL - MPD

2 Qout0 Cv (z0 ) a∆z + c∆q ∆P = 1 + Tp s ∂P ∂P −1 |0 ; c = a= |0 ; Tp = ˙ |0 ∂P ∂z ∂Qout

The MPD process is a closed loop mechanism as opposed to the open loop system in conventional drilling processes. A back pressure coupled with a choke manifold is used to compensate for the pressure variations in the wellbore. A simple mathematical model is developed for the setup

The values of the unknowns can be found from field data. The work by Godhavn (2010) has detailed description of the model. This control system for automatic MPD was successfully implemented at the Kvitebjorn field in the North Sea.

P0 = ρ0



(7) (8)

∂P

130

IFAC Oilfield 2015 May 27-29, 2015. Florianópolis, Brazil Narendra Vishnumolakala et al. / IFAC-PapersOnLine 48-6 (2015) 128–133

131

To provide real-time measurements of bottom-hole pressure for the feedback system in the simulation, the BHP is calculated as a sum of all the annular pressures including hydrostatic pressure (due to mud column), annular friction pressure losses (due to circulation), surge, swab pressures as well as any surface pressures. API Power Law model has been used to model the friction pressure losses. BHP = Hyd + AF P + BP P AF P = ∆PDP + ∆PDC + ∆PN ozzle +∆PDC−Ann + ∆PDP −Ann +∆Psurge + ∆Pswab

*Other pressure losses are neglected. where BHP is Bottom-Hole Pressure; Hyd is Hydrostatic pressure due to mud column; BPP is Pressure due to back pressure pump; AFP is Annular Friction Pressure losses 5. DRILLING SIMULATOR IN LABVIEW LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a National Instruments’ software development environment. It has wide variety of industrial applications with major application areas such as Automation, Control and Data Acquisition. As its name suggests, LabVIEW provides an environment in which engineers can design their own laboratory instruments quickly and easily. These personally-designed laboratory instruments are called Virtual Instruments (VIs). LabVIEW’s simple interface and easy-to-learn programming language make it a perfect choice for developing control applications (Bishop 2007). Data acquisition (DAQ) is handled easily with predefined block functions. Signals read from DAQ components are manipulated with standard block functions and the results of the program can be easily sent to an output board, which in turn sends signals to the plant. In this work, LabVIEW has been used to develop a simulation environment for experimental purposes. Automated models can be developed for various stages of the drilling process and the models can be simulated and tested on this LabVIEW simulator. The system parameters or control algorithms can be modified and changes in performance of the system can be studied. This means the process are simulated and tested in a safe, no-cost environment on the LabVIEW simulator before implementation in real-world systems. The simulator serves as a tool in wide range of applications for students, drillers and operators. Students can use the simulator to implement any type of control architecture for different operations. If virtual modules in the program are replaced with data acquisition devices, the simulator can be used by driller/ operator to control an actual drilling operation.

Fig. 2. Front Panel of Drilling Simulator our case) can operate the program. Even the programming is intuitive with drag and drop graphical icons instead of writing several lines of text. Hardware integration - Data acquisition tools that can acquire data from almost any type of device are available. With the help of these tools, it is possible to use the same simulated program developed for mathematical automated models for real-world implementation on field as well just by replacing few blocks in the program. This deployability feature in LabVIEW i.e. the deployment of Virtual Instrument (VI) directly into the field allowing HIL/SIL applications is one of the main advantages of building simulator in LabVIEW. Advanced Control - There are several in-built functions (such as PID Autotuning, MPC controller among others) in the software, Control Design and Simulation toolkit in particular which is of high relevance to the drilling automation applications. Any control algorithm from basic PID to non-linear control can be used directly in the program. There are provisions to execute multiple parallel loops also at high speeds on FPGAs and real-time processors. 5.2 Drilling Simulator A Drilling Simulator has been designed in LabVIEW to serve as a basic simulation environment for testing and simulation purposes. The performance of the model and the designed control system can be studied from the simulation results. A PID controller is designed and simulated for MPD operations in the drilling simulator. Other control methodologies like MPC (Breyholtz, Nygaard, Nikolaou, 2011) can also be modeled and implemented in the simulator. The model is a simplistic one with several limitations. The model is based on the assumption that bottom-hole pressure reading is available in real-time. In this paper, we assume an ideal model such that the bottom-hole pressure reading is available in eral-time. This imposes some limitations that can be easily fixed in real scenarios. The structure of the simulator is described below.

5.1 Why LabVIEW? 5.3 Front Panel Interactive GUI - A simple, user-friendly interface (called ’Front panel’) with graphics can be developed on this platform such that even non-technical people (Rig men in 131

This is the face of the (virtual) instrument. The front panel of the drilling simulator is a user-friendly GUI that

IFAC Oilfield 2015 132 May 27-29, 2015. Florianópolis, Brazil Narendra Vishnumolakala et al. / IFAC-PapersOnLine 48-6 (2015) 128–133

depicts the control room at the drilling rig site. The user has option to select the type of formation to be drilled. The user has to input various drilling parameters being used in the drilling operation such as drill pipe dimensions, drill collar dimensions and bit nozzle sizes (these are used to calculate annular friction pressure losses). In addition, the user has to input control parameters viz. plant model variables calculated based on the field data. Once all the inputs are given as shown in Fig. 2, the simulation can be started. The drilling operation can be started by lowering the pipe either by increasing depth manually, using a slider or by using a joystick to control the movement of drill pipe. As the simulation is running, the user has control over parameters like mud pump operation - ON/OFF, mud flow rate and mud weight that causes variations in the BHP. There are display options for pressure gauges, choke position monitor, BHP variation chart window and any other information needed by the operator. There are also options for manual control of equipment that are automated in the simulator viz. choke opening or set point of BHP. (The simulator runs by default in automatic mode).

Fig. 3. Major function blocks used in Block Diagram of Drilling Simulator

5.4 Block Diagram This part of the simulator runs in the background, which is where the actual programming is done. LabVIEW has an exclusive toolkit for design of control systems called ”Control Design & Simulation” Tookit. The drilling simulator was developed using many of the in-built functions of the toolkit. The main part of the program is built inside the Simulation loop function. Some important functions used are PID Controller, PID Autotuning, Construct Transfer Function, Simulation Timing and Feedback node among others. (shown in Fig. 3). These functions were used in the program to track reference bottom-hole pressures at various depths. These reference points are set using a lookup table function. Data acquisition functions are used to read values from joystick. Graphics functions like 3-D picture control were used to display 3-D animations of the formation and drill pipe as the process of drilling in the formation was carried out. 5.5 Highlights Remote Control - The drilling simulator can be accessed by other users from any other location over internet. LabVIEW has different tools to accomplish this. In realworld application, the drilling program can be hosted by a driller at the drill rig site and the program can be shared with other users (can be supervisor at office, contractors and others). The users have the provision to monitor the drilling activity as well as control the drilling operations from their locations through a web browser. We have used a simple web publishing tool in LabVIEW to share the drilling simulator with other users. This application is useful in situations where frequent access to the rig site is not possible. 3-D Graphics - The drilling activity can be seen as a 3-D animation (with 360 degree camera control) on front panel 132

Fig. 4. Joystick Control of the Drilling Simulator in real-time as the simulation is running. The movement of the drill-pipe (including rotation) and the formation being drilled are shown in the animation. Other equipment like mud pump, back pressure pump, choke manifold can be included in the animation further. Manual Over-rides - It is important to have manual override controls for all the operations that are automated. This is to have a better control in case unpredictable incidents occur. In the drilling simulator, there are manual controls for choke operation and setting bottom-hole pressure. Realistic simulation - To provide a feel of the real-world drilling operation, control of the movement of drill pipe (up and down the borehole) is done using a joystick (Windows Xbox 360 controller in this case). The joystick is treated as an input device and data is acquired in to the program. Other parameters that can be controlled using the joystick are mud pump ON/OFF operation, manual over-ride toggle switches etc. as shown in Fig. 4. A vibration feedback can also be included in the program to indicate when the drill pipe is on-bottom for example.

IFAC Oilfield 2015 May 27-29, 2015. Florianópolis, Brazil Narendra Vishnumolakala et al. / IFAC-PapersOnLine 48-6 (2015) 128–133

133

7. CONCLUSION In this paper we developed a simulation environment for drilling automation. In particular we developed an automatic control for a managed pressure drilling (MPD) operation using PID control techniques. Although the level of realism in the drilling process was not the main focus of the paper, the simulation environment allows us to replace the controller with modern techniques such as model predictive control (MPC) and nonlinear/robust robust control techniques. REFERENCES [1]

Fig. 5. BHP is maintained with set-point tracking 6. EXPERIMENTS IN THE LABVIEW DRILLING SIMULATOR The Drilling Simulator developed in LabVIEW was tested on synthetic field data. Plant parameters are chosen arbirtarily. There is provision to manually adjust PID gains. However, a LabVIEW in-built function ’PID Auto-tuning’ can be incorporated instead. With this setup, the simulation is run over a depth of 0 - 14,000 ft. Several test cases as mentioned below are applied to test proper functioning of automatic MPD operation in the simulator. (1) Normal drilling operation with mud circulation Constant BHP is maintained (2) Mud Pump is switched OFF - BHP adjusted by the back pressure (choke operation) (3) Manual BHP control - Desired BHP can be maintained at a depth (4) Manual Choke control - choke opening to adjust pressure variations (5) Changes in drilling parameters like mud weight, flow rate etc. The objective of the control system is to track the set pressure values such that bottom-hole pressure is maintained constant in any case. As shown in Fig. 5, the required BHP (represented by white line) is efficiently tracked (red line represents measured BHP) by the controller. At around 525 seconds (not real time) mud pump is switched OFF which led to a drop in BHP (as there is no annular friction pressure now). It can be seen from the figure that the required BHP is achieved (after transients) at around 550 seconds. The set-point tracking can also be seen when the reference BHP value is increased at 375 seconds. As mentioned, the simulation is performed with fabricated data. The well profile is not described exclusively here because the example is very general and the simulator allows the user to change the well model seamlessly to explore any other formulations. The novelty here is that the simulator can be used as a platform for implementing any kind of control technique. Other test cases are not described due to lack of space. More examples will be explored in a forthcoming paper. 133

Eustes, A. W. The Evolution of Automation in Drilling. - 2007, January 1. Society of Petroleum Engineers. doi:10.2118111125-MS. [2] Iversen, F., Gressgard, L. J., Thorogood, J., Balov, M. K., and Hepso, V. Drilling Automation: Potential for Human Error. - Society of Petroleum Engineers. doi:10.2118151474-PA. March 1, 2013. [3] Robert H. Bishop LabVIEW 8 2007. Pearson Prentice Hall, NJ, 619 p. [4] Cayeux, E., Daireaux, B., Dvergsnes, E. W., and Florence, F. Toward Drilling Automation: On the Necessity of Using Sensors That Relate to Physical Models. - June 1, 2014. Society of Petroleum Engineers. doi:10.2118163440-PA. [5] Macpherson, J. D., de Wardt, J. P., Florence, F., Chapman, C., Zamora, M., Laing, M., and Iversen, F. Drilling-Systems Automation: Current State, Initiatives, and Potential Impact. - 2013, December 1. Society of Petroleum Engineers. doi:10.2118166263PA. [6] S. Noynaert and E. Gildin Going Beyond the Tally Book: A Novel Method for Analysis, Prediction and Control of Directionally Drilled Wellbores using Mechanical Specific Energy. To be Presenteed at the SPE Annual Technical Conference and Exhibition - SPE ATCE. Amsterdan, Netherlands, Oct. 27-29, 2014. [7] J.-M. Godhavn Control Requirements for Automatic Managed Pressure Drilling System. SPE Drilling & Completion, 2010, September 1. Society of Petroleum Engineers. doi:10.2118119442-PA [8] Breyholtz, O., Nygaard, G., and Nikolaou, M. Managed-Pressure Drilling: Using Model Predictive Control To Improve Pressure Control for During Dual-Gradient Drilling. - 2011, June 1. Society of Petroleum Engineers. doi:10.2118124631-PA. [9] Cayeux, E., Daireaux, B., Dvergsnes, E. W., Leulseged, A., Bruun, B. T., and Herbert, M. C. Advanced Drilling Simulation Environment for Testing New Drilling Automation Techniques and Practices. - December 1, 2012. Society of Petroleum Engineers. doi:10.2118150941-PA. [10] Thorogood, J., Aldred, W. D., Florence, F., and Iversen, F. Drilling Automation: Technologies, Terminology, and Parallels With Other Industries. - 2010,Society of Petroleum Engineers. doi:10.2118119884-PA.