Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SPE-189230-MS

Applying Edge Computing to Autonomous Well Control

Jason Pitcher and Mike Pry, Safoco Inc

Copyright 2017, Society of Petroleum Engineers

This paper was prepared for presentation at the SPE Symposium: Production Enhancement and Cost Optimisation held in Kuala Lumpur, Malaysia, 7-8 November 2017.

This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents
of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect
any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written
consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may
not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.

Abstract
In production operations, a lot of effort has been devoted to monitoring well head and flow line parameters.
Connecting sensors to monitoring systems, collating, and transmitting the data off site for manual or
automated review requires infrastructure build out and processes developing to analyze and action the data,
consuming additional resources. The concept of edge computing, moving the analysis and decision closer
to the well is a challenging problem which requires the addition of controlling elements. The objective is
not just to monitor the conditions, but also to take action based upon the observations without unnecessary
intervention.
This paper introduces a new method of closed loop production control, integrating production tree master
valve, emergency shut down system and choke management into a single automated, autonomous system.
By implementing microprocessor control at the wellsite, basic management functions can be automated
with sequencing to mitigate risk of procedural errors, improve well integrity, and minimize downtime. The
key elements of such a system comprise of master valve actuation, wing valve actuation and production
choke actuation linked by a single co-dependent system that can perform condition based monitoring and
self-diagnose system issues.
A discussion of the design and function of the method, with due regard to limitations, best practices
and workflows will be demonstrated, providing an examination of the results of design experiments. The
potential for further implementation is examined as well as highlighting operational differences vs current
technology that deliver value to producers and operators.
Expanding the capability of wellsite autonomous control to address operational concerns and reduce
operational costs is within the reach of technology that is integrated into monitoring systems, moving the
decision point closer to the well. With a proven ability to monitor and action analyses, communicating
the results of the action for operational status updates substantially reduces the need for large bandwidth
infrastructure and in the right applications, increased well and equipment uptime without risk of costly
integrity issues. This enables autonomous systems to be deployed in more remote areas, allowing the same
level of assurance in control afforded to more infrastructure rich environments.
2 SPE-189230-MS

Introduction
Fluid control from a well is governed at surface by valves that open and close off the fluid, and restrictors
(chokes) that control the rate the well flows into the gathering system. For the purposes of this discussion,
we are limiting our scope to surface wellheads, although similar principals apply to the subsea environment.
Within the scope of production operations, there are traditional methods of controlling production from
surface wellheads. Valves are typically single flow systems, either open or closed, and chokes are used to
control the flow of production (figure 1). These devices are predominantly manual in operation, or in the
case of chokes often a fixed orifice with no adjustment available. The type of valve used in the wellhead to
shut off flow is determined by flow rate, flow medium and pressure. The distinct types of valve and selection
criteria are documented in Zappa & Smith (2004) with some operators using simple ball valves for low
pressure, low rate wells with benign chemistry. Higher pressures, rates, mixed flow media and corrosive
mixtures has necessitated the use of valves of assorted designs, operated via handwheel.

Figure 1—Example of a surface production tree

A similar process has influenced the type and use of choke valves. A common mechanism is the
handwheel adjustable choke that is used to regulate flow from wells that are flowing without recourse to
artificial lift. These valves use various mechanisms to restrict flow (see King, 2017), with a common element
in the adjustment mechanism of a handwheel to raise or lower the restricting element as seen in figure 2.
SPE-189230-MS 3

Figure 2—Hand Wheel Actuated Choke Valve

With the evolution of control systems, the ability to control both valves and chokes has become common.
This involves the addition of actuators to the systems. Actuators for gate valves are typically pneumatic
or hydraulic and can be fail open, fail closed, or double acting. Some electric systems are also available,
although less common. Choke valves also have had actuator systems added to them. These can be hydraulic,
pneumatic or electric and are often combined with a position sensor to provide information on the relative
position of the choke.
In combination, valves and actuators allow wells to be controlled remotely. The remote controls are
implicitly not on the tree itself, providing separation between the operator and the flow control device.
The next step in control was to include some form of electronic control to allow the operator to be much
more remote. These systems have become commonplace, with programmable logic controllers (PLC) and
supervisory control and data acquisition (SCADA) systems installed at many well sites. This has led to the
development of extensive IT infrastructure to move data from the wellsite and to move commands back to
the site to perform actions. This extensive infrastructure is at a premium, with engineers and operators in
control rooms to make decisions on which wells contribute and what that contribution should be.
An alternative approach would be to shift the decision process back to the wellsite. This approach could
limit the supervisory overhead to exception mitigation or top-level goal setting for assets, rather than detailed
and mundane management. To enable this level of management, there follows a discussion of autonomy
and how this can be applied to single well assets.

What is autonomy?
When discussing autonomous well control, a clear definition of terms is needed. Autonomous is often used
as a synonym for "intelligent", but that implies a self-determining and reasoning system, akin to a human
operator. A much lower level of intelligence, using the definitions from Isermann and Raab (1993) where
the system can model, reason and learn could be applicable, with the basic requirements of autonomy in
such a system as follows:
1. Control
a. Adaptive nonlinear control
4 SPE-189230-MS

b. Optimization of dynamic performance


c. Supervision and fault diagnosis
2. Knowledge base
a. Parameter and state estimation
b. Design methods
3. Heuristic knowledge
a. Learned behavior storage and application
4. Inference mechanism
a. Decision process for control
b. Decision process for fault diagnosis
5. Communication
a. Internal communication within and between subsystems
b. External communications
With these requirements, an autonomous system should adapt to potentially nonlinear behavior, storing
dependent parameters and supervising outcomes. This is in addition to performing fault diagnosis that
describes the level and severity of failure, taking appropriate action (Isermann and Raab, Op.Cit.).

Hydraulic & Pneumatic Actuated Gate Valve Autonomy


Gate valves form the core assembly of many surface production trees for hydrocarbons (figure 3). They are
typically only used for "on/off" applications, as the gate and seat assembly will erode relatively quickly if the
valve is used to throttle flow. Almost any gate valve can be actuated, and the type of actuator used is usually
dictated by the valve size and operating pressure. There are often other considerations, such as operating
environment, which dictate the type of actuator. As these are open / close decisions, the application of
autonomous decision making seems limited, but the decision to open or close a well may have far reaching
consequences.

Figure 3—Common manual gate valve used in production trees.


SPE-189230-MS 5

A variant of the gate valve is used in emergency shut down (ESD) systems. These systems are designed
so that if a high pressure or low-pressure event occurs, the valve will automatically close. A basic system
that has been in operation for many years is shown in figure 4.

Figure 4—Conventional ESD control system

The basic premise is that the actuator has a spring internal to the housing that in its relaxed state holds
the gate valve closed. The actuator (hydraulic or pneumatic) is filled with fluid to a pressure sufficient to
overcome the spring and open the valve. The pressure inside the actuator must also be sufficient to counter
the line pressure. A simple pilot system is then engaged that will dump the actuator pressure, allowing
the valve to close, if a high pressure or low-pressure event occurs. An example would be if a flowline
downstream of the well is perforated, allowing the pressure to drop. These analog systems often include
an electronic sensor that is connected to a SCADA or PLC to provide an indication of operation, but not
the cause of the operation.
The latest generation ESD systems use electronic pressure transducers to measure pressure and decide
based on the pressure condition to release the actuator pressure. Instead of sending the signals to a PLC
for processing and action, small microprocessor based systems constantly monitor the pressures and decide
locally to act without intervention. The systems are configurable to actuate the ESD on other conditions
not usually associated with emergency conditions, such as gate entry sensors, or tank level sensors. As
standalone processors, they are not dependent on host infrastructure to maintain their integrity, with fail safe
mechanisms local to the system. As described, switching to microprocessor controlled ESD systems is a
minor upgrade over analog systems. When principals of autonomy are applied, locally controlled decision
processes become inherently valuable.
Any ESD system can fail in its primary task if the valve fails to close, partially closes or closes
unnecessarily. Adding autonomous systems to local microprocessor controls allows for diagnostic
monitoring that reduces the potential for non-predictive failure, without increasing the infrastructure
overhead required for remote analysis and control. An example of this is adding the ability to monitor the
6 SPE-189230-MS

internal pressure of a pneumatic or hydraulic actuator. This would be in addition to the primary pressure
monitoring duties of the controller, but allows for actuator condition monitoring and system diagnostics. A
simple extension of this is for the processor to manage the actuator pressure. This allows the system to add
gas/fluid to the actuator if needed, mitigating partial closure of the valve and potential damage to the valve.
By including heuristics, the pressure in the actuator can be maintained at optimal levels.
Following this path could allow the system to perform some diagnostic tests using the actuator to
determine the condition of the valve. One scenario would be to allow the valve to close momentarily by
releasing the actuator pressure, then recording the pressure profile as the actuator is opened. If this procedure
is repeated periodically, the system could learn how the valve is responding over time. This could give
indications of issues such as asphaltine build up, sedimentation or scale build up, which over time can cause
the valve to fail to operate, either partially or completely.
With hydraulic actuated valves, a common requirement of high integrity pressure protection systems
(HIPPS) is the partial stroke test. This is where a small amount of hydraulic fluid is bled off the actuator
to allow the valve to move to a partially closed position, then immediately pressurized to full open. This
process, if measured, could allow local microprocessor control to perform condition based monitoring on the
valves, as this would effectively allow the processor to model the thrust of the actuator, a primary indicator
of gate valve wear. In figure 5 the thrust response curve of a hydraulic actuator is shown. As pressure is
applied to the actuator, thrust increases (a) as the gate moves against the differential pressure. When the
gate breaks differential (b), the actuator thrust drops (c) as the actuator is not acting against the differential
pressure across the valve. In this case the pump is filling the actuator as it travels at a rate slightly faster than
the actuator can accommodate, resulting in the positive slope (d). At point (e) the valve stops travelling and
the thrust force rapidly increases until the system stops. This data is from a new valve / actuator, with no
wear. With wear, the profile would be different, either in the slope of the initial thrust curve or the difference
between point (b) and point (c), indicating changing thrust required to operate and wear in the system. As the
system learns the rate of change of thrust, it could extrapolate the failure point from the internal knowledge
base and take remediating action at the appropriate point.

Figure 5—Actuator force response during valve opening.


SPE-189230-MS 7

Adjustable Choke Autonomy


Production chokes in their most basic form are a fixed orifice that restricts the flow from the well, causing
a pressure drop across the orifice. Adjustable chokes have a mechanism to adjust the flow area of the
orifice. Different technologies have been used to actuate chokes, including electro-mechanical devices to
turn the choke stem in place of the handwheel, pneumatic linear actuators that push the stem down without
rotation and hydraulic versions of the same process. Each solution has its own merits and drawbacks from
engineering and commercial perspectives, but the challenge in an autonomous system is to use the strengths
of a solution to overcome the challenge of the problem.
Any actuated choke system at the very basic level needs to emulate a conventional adjustable choke.
Chokes are commonly used as a well is put into production to either limit flow or limit pressure. A typical
process would be for the operator to begin to open a well following a set process. Operators have well
described processes for bringing a well on line and an abbreviated sequence can be described as follows:

• Check all surface valves are closed

• Open lower master valve

• Open upper master valve

• Open swab valve

• Open production wing valves

• Open Choke to predetermined point.

• Check pressure / flow rate

• Adjust Choke to achieve desired rate

The initial setting of the choke will be determined either through empirical experience, or calculated,
or a combination of both. Depending on the critical determining factor, which could be upstream pressure,
downstream pressure or production rate, the choke would be manually adjusted to satisfy the critical factor.
An example of this would be if the operator has a limited take away capacity, the choke would be adjusted
so as not to exceed this rate as determined by a flow meter, often the lease automated custody transfer
(LACT) unit. If the choke is too restrictive and the required flow rate not achieved on opening the well,
the choke is opened and when the flow rate stabilizes the process is repeated until the desired flow rate is
achieved. At a basic level, an actuated choke needs to allow the operator to perform the same operations.
The control unit should allow the operator to input a choke flow area setting and a rate of change setting,
then open on command.
This process is amenable to automation if appropriate measurements are made and utilized by the
automation system. There are several critical measurements that need to be made that can allow an
automated system to successfully operate a choke. The relationship between orifice size, pressure
differential and flow rates has been studied extensively, with original work published in 1954 by Gilbert. In
different reservoirs, modifications to Gilberts work are common (Leal, 2013). A brief historical review was
published in 2017 by Ghorbani, but for the purposes of this discussion, a limited example in a dry gas, single
phase well is given in Eq. 1 (from Beggs, 1991). Note that there are many different equations to model gas
or fluid flow through a choke. Equation 1 is shown as an example only.

Equation 1

 Cd = discharge coefficient, dimensionless


8 SPE-189230-MS

 d = pipe diameter, in.


 k = specific heat capacity ratio, dimensionless
 psc = standard pressure, psia
 pwh = wellhead pressure, psia
 qg = gas flow rate, Mscf/D
Tsc = standard temperature, T, °R
Twh = wellhead temperature, T, °R
 y = ratio of downstream pressure to upstream pressure, p1/p2, dimensionless
Z = gas compressibility factor, dimensionless
γg= gas specific gravity, dimensionless
From an automation perspective, measuring critical parameters can allow for automatic adjustments of
an actuated choke. From equation 1, during production (rather than flowback), the critical variables that
need to be constantly monitored are the wellhead pressure, downstream pressure, wellhead temperature and
the size of the orifice. If these can be determined accurately, then the variance in modeled flow rate from
this equation to an actual measured flow rate can potentially be quantified. This is valuable in an automated
system as a change in the flow rate model to actual variance, if enough variables are controlled, should be
related to wear in the orifice. Once this relationship is established a condition based monitoring algorithm
would allow the processor to determine the rate of wear and the critical point when intervention is necessary.
In automatic chokes, the measurement of pressure and temperature is straightforward. The challenge is
to accurately measure the flow area of the orifice. Gilbert (op.cit) stated that an error of 1/128 " in bean size
can effect an error of 5 to 20 percent in pressure estimates. Measuring the flow area of the orifice is typically
done with some form of device that measures stem travel, using an analogue or digital mechanism. With
rotary control systems, the position measurement system is often measured by a radial counter. The majority
of the position measurement systems are subject to backlash and have proven to be imprecise in relating
stem position to flow area. With manual actuation, the lack of precision in adjusting the choke is tolerated,
as the adjustment is related to a flow or pressure measurement, rather than absolute flow area. To automate a
choke to allow a measure of self-determination and diagnostics, more precision in the measurement of flow
area is required as this point in the system has the greatest impact on system performance. As the orifice
and needle, or the ports on a plug and cage choke wear, the total flow area for any given stem position
will become larger. This results in increased downstream pressure and flow, without apparent choke stem
movement. Working from this, if the well is not changing in flow characteristics rapidly, and a given choke
flow area gives a known flowrate, if the choke needs to be closed to maintain that flowrate that is indicative
of wear in the system. If the choke is required to open to maintain the same flowrate, that would be indicative
of a decline in the wells deliverability profile rather than an issue with the choke. With accurate choke
position characterization, the modelled flow can be compared to actual, or the current flow characteristics
can be compared to the initial installation characterization to provide the controller with diagnostic datasets.
Leal et. al. (2013), based on a study of analytical models used in Saudi Arabia, concluded that there
is no equation that can fulfill all pressure drop conditions. To reduce errors, they used a dedicated well
testing database to modify the gas calculation equation used in predicting gas rate volumes. One challenge
in automation is to incorporate such a database into the system to effectively allow the system autonomy.

Integrated Systems
To be more effective, a system needs to be capable of opening and closing the choke, but also have autonomy
to monitor and protect the well by controlling the master and / or wing valve on the tree. This requires the
processor to be tightly integrated into the control loop allowing control of the well opening and closing
sequence to prevent incorrect operation of individual components. By using a single processor system
to perform basic management tasks such as stroke tests, pressure / flow calibrations and condition based
SPE-189230-MS 9

monitoring, single point failures can be more effectively managed. A wing valve that fails a stroke test,
for example, may not be critical to production and the system can report the maintenance requirement
rather than shut the well with the master. A choke that is reporting excessive wear should report out until
a critical point is reached where damage to the choke body will result if allowed to continue. At that
point of criticality, an integrated system should close the choke as far as possible, then shut the wing
valve. In current implementation, the ESD wing valve would only close if the choke body had already lost
integrity. By integrating the controlling process, the condition of the choke is monitored and in the event
of a wear limit being reached, the choke will move to a closed position. This does not stop flow in a worn
choke from allowing fluid to flow as it cannot seal. In this instance, the controller should identify that the
choke has reached the wear limit, close the choke as far as possible, then close the wing valve. If flow
is still occurring, then the controller can shut the master valve on the tree. In this scenario, no venting of
hydrocarbon has occurred and the controller has informed the operator of the action it has taken. Simple
functionality additions could allow the controller to schedule maintenance and with tight integration could
tell the maintenance team what parts are required to effect repair.

Microprocessor controller
For such an autonomous system, a controller needs to meet multiple criteria. As surface wellhead
locations are often exposed to harsh environments, extreme temperature capability is necessary, along
with the ability to work on self-contained power in remote locations. Keeping system complexity to a
minimum with integrated capabilities and functions is also desirable as this can reduce the failure rate of
interconnected components. A small chip microprocessor with integrated program storage has advantages
over Programmable Logic Controller (PLC) systems with substantially lower power requirements and
flexibility in interfacing with peripheral equipment as well as existing SCADA systems. The microprocessor
programs are stored in non-volatile memory so there are no internal keep alive battery requirements resulting
in very low maintenance requirements. Almost all PLC’s use some type of microprocessor with an operating
system that provides a user interface such as ‘Ladder Logic Programming’. Typically, the PLC will examine
a number of inputs, execute the program and then set the outputs based on the results. Microcontroller
are tailored to execute inputs and outputs based on the system requirements. The PLC systems by design
carry certain overheads that may not be required to affect effective system control. The micro controller
system is tailored to meet the requirements of the task without these operating system overheads, resulting in
lower power requirements. Microcontrollers can have enough capacity for dedicated autonomous systems,
provided the system is limited in scope, although dividing tasks on well sites to dedicated processors allows
individual systems autonomy without the inherent compromises a ‘big box’ system forces.

Conclusions
In a recent article about artificial intelligence (Eggleton, 2017) the author made the point that "shifting the
paradigm from ad hoc reactionary activities to proactive automated surveillance routines with self-service
diagnostics opens up a new world of optimization opportunities". The author is speaking in context of using
the vast amounts of data generated to produce actionable interpretations that can pre-empt issues impacting
productivity, in effect, giving engineers tools to predict failure before it occurs, improving well productivity.
This concept needs to move beyond the model of big data gathering systems that crunch number to estimate
trends and predictive models to localized autonomous systems. The engineer no longer needs to interpret
a graph to estimate when failure might occur. The data has already been through an interpretive diagnostic
system that has determined what additional data points are needed, then collected the data, adjusted the
interpretation and decided that intervention will become necessary. If the communications from the system
are not actioned, the autonomous system would act to protect the integrity of the well, informing the
production team of the decisions in real time, rather than waiting for the supervisory team to decide.
10 SPE-189230-MS

Microprocessor / microcontroller systems that are increasing in power and sophistication enable this
level of autonomy. Multiple small systems that are dedicated to specific tasks that can manage autonomous
decision processes can be integrated much more effectively than single higher-level systems that are not
fault tolerant. The challenge of the engineering teams is maturing the level of trust in autonomous systems
beyond simple monitoring and using the new systems effectively, allowing more effective allocation of
engineering resources.

Acknowledgements
The authors would like to thank Safoco Inc., for permission and support in publishing this work.

References
Zappe, R. W., and Peter Smith. 2004. Valve selection handbook: engineering fundamentals for selecting the right valve
design for every industrial flow application. Amsterdam: Elsevier.
King, G. E. 2017. Choke. http://gekengineering.com/Downloads/Free_Downloads/Choke.pdf PDF accessed August 2017.
Isermann, R. and Raab, U., Intelligent actuators—Ways to autonomous actuating systems, Automatica, Volume 29, Issue
5, September 1993, Pages 1315–1331
Beggs, H. D. 1991. Production Optimization Using Nodal Analysis, 123–127. Tulsa, Oklahoma: OGCI Publications.
Azin, R., Chahshoori, R., Osfouri, S., Lak, A., Sureshjani, M. H. H., Gerami, S., 2014. Integrated analysis of choke
performance and flow behaviour in high-rate, deviated gas-condensate wells. Gas. Process. J. 1, 8e18 (Publisher,
College of Engineering, University of Isfahan, I.R. Iran).
Gilbert, W. E. 1954. Flowing and Gas-lift well Performance. American Petroleum Institute.
Leal, J., Al-Dammen, M., Villegas, R., Bolarinwa, S., Aziz, A., Azly, A., Buali, M. and Garzon, F. 2013. A New Analytical
Model to Predict Gas Rate Volume Measurement Through Well Head Chokes. International Petroleum Technology
Conference.
Ghorbani, Hamzeh & Moghadasi, Jamshid & Wood, David. 2017. Prediction of gas flow rates from gas condensate
reservoirs through wellhead chokes using a firefly optimization algorithm. Journal of Natural Gas Science and
Engineering.
Eggleton, G., 2017. Don’t Be Fooled By The Artificial Intelligence Hype. Article published in Hart’s E&P Magazine,
pp. 68–69, August 1st

You might also like