Math Blocks > Arithmetic function block

Arithmetic function block execution

The Arithmetic function block provides range extension and compensation through nine arithmetic types.

There are two inputs (IN and IN_LO) used in calculating PV. Inputs used to form the PV must come from devices with the desired engineering units. PV is then combined with up to three inputs (IN_1, IN_2, and IN_3) through the user-selected compensation function (ARITH_TYPE) to calculate the value of func. A gain is applied to func, and then a bias is added to get the value PRE_OUT. In AUTO, PRE_OUT is used for OUT.

Range extension and calculation of PV

When both IN and IN_LO are usable, the following formula is applied to calculate range extension for PV:

PV = G×IN+(1-G)×IN_LO

G is zero for IN less than or equal to RANGE_LO. It is one when IN is greater than RANGE_HI. It is interpolated from zero to one over the range of RANGE_LO to RANGE_HI. If the status of IN_LO is unusable and IN is usable and greater than RANGE_LO, then G will be set to one.

Compensation input calculations

For each of the inputs (IN_1, IN_2, IN_3), there is a gain and bias. The bias can be used to correct for absolute temperature or pressure. The gain can be used to normalize terms within a square root function. The compensation terms (t) are calculated as follows:

Application example

The Arithmetic block can be used for pressure and temperature compensation of a gas stream. IN is the measured flow from OUT of an Analog Input function block. IN_1 is the measured pressure, and IN_2 is the measured temperature, both from OUT of an Analog Input function block. If the flowmeter is a differential pressure type, the flow must be linearized in the instrument or in the AI function block.

ARITH_TYPE is flow compensation linear if a mass flowmeter is used or flow compensation square root if the flowmeter is differential pressure.

BIAS_IN_1 is a factor to convert measured pressure to absolute pressure. If pressure units are PSIG, for example, enter 14.696 for BIAS_IN_1.

GAIN_IN_1 is 1 / (reference pressure + factor to convert to absolute pressure). Reference pressure is the calibration pressure for the flowmeter. If the calibration pressure is 50 PSIG, for example, enter 0.01546 for GAIN_IN_1.

BIAS_IN_2 is a factor to convert measured temperature to absolute temperature. If temperature units are degF, for example, enter 459.7 for BIAS_IN_2.

GAIN_IN_2 is 1 / (reference temperature + factor to convert to absolute temperature). Reference temperature is the calibration temperature for the flowmeter. If the calibration temperature is 350 degF, for example, enter 0.001235 for GAIN_IN_2.

Block errors

The following conditions are reported in the BLOCK_ERR parameter:
  • Out of Service — The block is in Out of Service (OOS) mode.

  • Input failure/process variable has Bad status — The source of the block's process variable is bad.