FC 166 - Integrator

The integrator function code computes the integral of an input signal using the trapezoidal rule of integration and double precision arithmetic. The result of the integration times the gain (S7) is the output. Integration begins at an initial value (S3). High (S5) and low (S6) limits affect the output (N).

 

Specification S2 specifies the time units: seconds, minutes or hours.

 

The automatic reset option (S8 equals one) restarts the integration from the initial value when the integrator reaches the high or low limit. In the automatic reset mode, the limit flag is set for one cycle after the integrator reaches a limit. In automatic reset mode, a counter or second integrator can count overflows from the integrator, forming a multistage integration.

 

 

Outputs:

Blk

Type

Description

N

R

Value of Integral

N+1

B

Limit Flag:

0 = good

1 = high or low limit reached

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

5

I

Note 1

Block address of process variable

S2

N

1

I

0 - 2

Time base of integration:

0 = seconds

1 = minutes

2 = hours

S3

N

5

I

Note 1

Block address of initial value

S4

N

0

I

Note 1

Block address of reset signal:

0 = reset

1 = run

S5

Y

9.2E18

R

Full

High Limit

S6

Y

-9.2E18

R

Full

Low Limit

S7

Y

1.000

R

Full

Gain

S8

Y

0

B

0 or 1

Automatic reset:

0 = off

1 = on

S9

Y

0.000

R

Full

Spare

 

NOTES:

1. Maximum values are:9,998 for the BRC-100, IMMFP11/12 and 31,998 for the HAC

 

 

 

166.1   Explanation

 

The integrator block computes the area under a curve using the trapezoid rule:

 

where :

h =

Time between sample points on the curve (step size). The integrator block reads the segment control block to

determine the scan time for the segment that the integrator block is in.

 

n =

Number of samples taken. The samples are always taken at equal intervals (h).

 

Y =

Value of the integrated signal. Y0 equals the signal at

the start of the integration, and Yn equals the signal at

interval n of the integration.

 

The trapezoid rule executes by the integrator block with h equal to scan time. This provides the smallest possible step size.  Since the error in the trapezoid rule is a function of step size, the smallest step size results in the smallest error. The integrator block then scales the result of the integration based on the value of S2. Specification S2 reflects the time base of the integrated signal. For example, if input flow is in gallons per minute, S2 equals one (minute).

 

The integrator block operates in two modes: normal and track. In normal mode, the block integrates the values from the input block S1 on the time basis selected with S2. In track mode, the output tracks the input and integration does not take place.

 

NOTE: The two modes, normal and track, are based on the reset input signal set in S4. When S4 is set to one, integration takes place. When S4 is set to zero, it tracks the S3 input.

 

166.1.1  Specifications

 

S1 - X

Block address of the desired signal.

 

S2 - TB

Time base of the integration.

0 = seconds

1 = minutes

2 = hours

 

S3 - INIT

Block address of the initial value. The initial value is the output value during start-up and after an automatic or forced reset.

 

S4 - RESET

Block address of the reset signal. When <S4> equals zero, the integral output N initializes to the initial value <S3>. When <S4> equals one, integration takes place.

 

S5 - HL

High output limit. When the output reaches or exceeds this value and S8 equals one, the block resets to the initial value.

 

S6 - LL

Low output limit. When the output reaches or falls below this value and S8 equals one, the block resets to the initial value.

 

S7 - K

Gain value. This specification scales the output N to a desired value range.

 

S8 - AR

Automatic reset flag. In the automatic reset mode, the block resets to a defined initial input <S3> value after the output value reaches either limit.

0 = off (no reset)

1 = on (automatic reset)

 

 

 

166.1.2  Outputs

 

N

Value of the integral. If the value of the integral reaches or exceeds either of the limits and S8 equals zero, the output holds at the limit and the limit flag is set.

 

N+1

Limit flag. This output is a boolean signal that indicates when the integral output N has reached or exceeded the high or low limit specified by S5 or S6. If the block is in automatic reset mode, this value goes to one for one cycle when the integral reaches either limit. After the cycle, the value returns to zero. If the block is not in automatic reset mode, this value goes to one and remains there as long as the integral is at the limit.

0 = good

1 = limit reached or exceeded