Customizing Fieldbus Function Blocks

Allowing field devices to perform higher-level calculations adds to the advantages of distributed control. Function block programming inside devices makes that easier for a variety of applications, including production estimation and wet gas measurement. A brief refresher on fieldbus systems provides context for these application advantages.

By Dick Wismeijer November 1, 2004

AT A GLANCE

Fieldbus refresher

Function block application

Wet gas measurement

Production estimation

Allowing field devices to perform higher-level calculations adds to the advantages of distributed control. Function block programming inside devices makes that easier for a variety of applications, including production estimation and wet gas measurement. A brief refresher on fieldbus systems provides context for these application advantages.A fieldbus system is a local area network (LAN) for instruments used in process automation. The LAN is composed of field devices and control and monitoring equipment integrated into the physical environment of the process facility, providing computing power across the network. This distributed intelligence allows for fundamental regulatory control, sequencing and customized calculation routines, while still allowing operation and tuning from the control room using digital communication.

The gas-liquid ratio in a gas-lift well production estimation can be calculated from the measured lift gas rate, the formation gas-oil ratio, and the water cut.

As a solution-centric approach, the fieldbus network concept works with data from a field device readily available to any computer application residing on the LAN and business network. Thus, data generated at the field level can now be processed to support real-time production optimization applications, eliminating the need for dedicated application infrastructure. The field-centric approach of fieldbus recognizes that end-users must be able to view, trend, and execute tasks and applications in field devices that go well beyond the scope of process control.

The Fieldbus Foundation provides a framework for describing these systems as a collection of physical devices interconnected by a fieldbus network. FOUNDATION fieldbus devices are interoperable, which means devices from different manufacturers can communicate and work together. This has been achieved (in part) by standardizing function blocks residing in field devices, such as pressure (P), temperature (T), and differential-pressure (dP) transmitters.

Function blocks

Representing the basic automation functions performed by the function block application, each function block processes input parameters received in real-time to calculate an output parameter, according to a specified algorithm and an internal set of control parameters. The function block provides a common structure for defining things, such as analog input (AI), analog output (AO), proportional-integral-derivative (PID) control, as well as the capability to develop customized function blocks. Physical devices perform their portion of the control/monitoring strategy through activation and linking of one or more function blocks within a single field device or over the fieldbus network across devices. This simplifies identification of characteristics common to function blocks in accomplishing distributed field-based control architecture.

Customized function blocks

FOUNDATION fieldbus specifications and definitions allow vendors to add their own parameters, which permits extending function block definitions as new requirements are discovered.

In continuous monitoring applications, the calculated output value of the ISO 5167 orifice flow calculation function block will be used as the gas injection rate input into the production estimation function block.

Typical oil and gas field production application requirements embrace such processes as wet gas measurement and oil well production measurement. These applications are made up of modular industry standard flow measurement algorithms.

These algorithms have existed for a long time, however, they were previously performed in dedicated computation units, resulting in an additional cost and relying on 4-20 mA signal transmission. Subject to the manufacturer, these applications developed as customized FOUNDATION fieldbus function block, are transportable to other devices, and do not add extra hardware—only software. Fieldbus users can therefore afford to perform computation and configuration of the non-proprietary customized function block in any device that offers the same functions, such as P, T, and dP transmitters.

Fieldbus has taken signal integrity and accuracy beyond that what can be achieved with 4-20 mA analog transmissions in traditional distributed control and enterprise business systems. Measurement and control variables passed between function blocks not only have a value, but a status that indicates characteristics, such as signal quality. The signal quality can indicate, for example, if a measurement is good, bad, or uncertain (for example, out of range by a few percent).

Buying less equipment and improved signal integrity are not the only advantages of doing computations in field devices rather than in dedicated field and/or auxiliary room instruments. Because calculating values in the field next to the point of measurement reduces the amount of equipment the system needs, it increases reliability and can lower maintenance requirements.

Application description

The following application descriptions, though not comprehensive with regard to current development, do serve to illustrate the implementation concept of modular, customized FOUNDATION fieldbus function blocks designed to meet multiple and repetitive application requirements.

Production estimation: the differential pressure, dP, across a flow line restriction—such as the production choke or fixed restriction—is a function of the liquid and gas flow rates. The liquid flow rate can be calculated from dP when the gas-liquid ratio is known. For a gas-lift well, the gas-liquid ratio can be calculated from the measured lift gas rate, the formation gas-oil ratio, and the water cut. The latter two parameters are determined by well testing. (See “Gas-lift well production estimation” graphic.)

To compensate for over reading due to wet gas, the de Leeuw wet gas correlation algorithm serves as the functional specification for the de Leeuw customized function block.

The algorithm of production estimation applies to natural producing, gas-lifted, ESP-lifted and pumped-oil wells. For gas-lifted wells, the gas that passes through the flow line restriction consists of 80-90% lift gas. The measured lift gas rate is used as an input to the production estimation algorithm. The concept of production estimation trending makes it possible to reduce the number of well tests, instantaneously identify production changes of a well, and optimize the production continuously and generate gas lift performance curves in real-time.

Wet gas measurement: from a measurement point of view, wet gas is defined as gas well streams in which liquids are physically present, though treated as a single-phase flow measurement. The liquid fraction is generally low, with the gas volume fraction (GVF) larger than approximately 90-95%. Wet gas flow measurement is merely a subset of multiphase metering.

The exact value of the wet gas boundary on the two-phase flow map is undefined. Instead, the liquid fraction expressed as Lockhart-Martinelli ( X ) parameter is often used to determine whether a condition should be considered as wet gas measurement—the region of X & 0.3. The flowmeter applied is based on the differential pressure measurement principle in accordance with international standard ISO 5167. It uses a Venturi device based on the single-phase gas flow rate algorithm in conjunction with the semi-empirical “de Leeuw” correction algorithm, applied for the systematic error introduced due to the small amounts of liquids.

Implementation

Production estimation: empirical equations for gross and net oil production estimation serve as the functional specification for the production estimation customized function block. For the continuous monitoring of oil well performance, the standard FOUNDATION fieldbus AI function blocks of the respective flow-line tubing head pressure (FTHP) and production differential pressures devices are used as input to the production estimation function block within the differential pressure field device.

In case of a gas-lift well, lift gas line pressure and temperature are measured using their respective field device AI function block, which is used as input for flow compensation within the respective differential pressure measurement device. The equation for compensated volumetric flow according to ISO 5167 is used as the functional specification for implementation in the ISO 5167 customized function block. The calculated output value of the ISO 5167 orifice flow calculation function block will be used as the “gas injection rate” input into the production estimation function block. (See “Production estimation for continuous monitoring” graphic.)

Wet gas measurement : the de Leeuw wet gas correlation algorithm serves as the functional specification for the de Leeuw customized function block to compensate for the over-reading due to wet gas. Similar to the above, the standard FOUNDATION fieldbus AI function blocks are being used as input for the ISO 5167 customized function block, 0 which, in turn, serves as input into the de Leeuw customized function block for wet gas over-reading compensation (see “De Leeuw wet gas” graphic).

For the purpose of the applications described above, the customized FOUNDATION fieldbus function block(s) have been hosted in the transmitter with the primary measurement input for the respective customized function block.

The overall (combined) block execution time for the customized function blocks referred to above is within 100 msec.

Author Information

Dick Wismeijer is a corporate discipline head for instrumentation, control and automation with a major oil company and has more than 33 years of experience in engineering projects, both onshore and offshore, in a variety of environments and socio-political landscapes.