стр. 26 |

or

T = AIN(3)

and the result, for the same example, is T = 60% (or 0.6).

In DCSs that work in engineering units, the range of the transmitter providing

the controlled variable must be supplied to the PID controller (there are different

ways to do so). With this information, the controller converts both the variable and

the set point to percent values before applying the PID algorithm. This is done

because the error is calculated in %TO. Remember, the KC units are %CO/%TO.

Thus the controller output is then %CO. A possible way to вЂњcallвЂќ a PID controller

could be

OUT = PID(controlled variable, set point, low value of range, span of transmitter)

or

OUT = PID(T, 75, 50, 100)

This command instructs the DCS to control a variable T at 75 (degrees) that is sup-

plied by a transmitter with a range from 50 to 150 (degrees). The controller output

(OUT) is in percent (%CO).

5-1.2 Programming

There are two ways to program the mathematical manipulations in DCSs: block-

oriented programming and software-oriented programming.

76 RATIO, OVERRIDE, AND SELECTIVE CONTROL

Block-Oriented Programming. Block-oriented programming is software in a

subroutine-type form, referred to as computing algorithms or computing blocks.

Each block performs a speciп¬Ѓed mathematical manipulation. Thus, to develop a

control strategy, the computing blocks are linked together, the output of one block

being the input to another block. This linking procedure is often referred to as con-

п¬Ѓguring the control system.

Some typical calculations (there are many others) performed by computing

blocks are:

1. Addition/subtraction. The output signal is obtained by adding and/or sub-

tracting the input signals.

2. Multiplication/division. The output signal is obtained by multiplying and/or

dividing the input signals.

3. Square root. The output signal is obtained by extracting the square root of the

input signal.

4. High/low selector. The output signal is the highest/lowest of two or more input

signals.

5. High/low limiter. The output signal is the input signal limited to a preset

high/low limit value.

6. Function generator, or signal characterization. The output signal is a function

of the input signal. The function is deп¬Ѓned by conп¬Ѓguring the x, y coordinates.

7. Integrator. The output signal is the time integral of the input signal. The indus-

trial term for integrator is totalizer.

8. Lead/lag. The output signal is the response of the transfer function given

below. This calculation is often used in control schemes, such as feedforward,

where dynamic compensation is required.

t ld s + 1

Output = в—Љ input

t lg s + 1

9. Dead time. The output signal is equal to a delayed input signal. This calcula-

tion is very easily done with computers but is extremely difп¬Ѓcult to do with

analog instrumentation.

Table 5-1.1 shows the notation and algorithms we use in this book for mathe-

matical calculations. Often, these blocks are linked together graphically using stan-

dard вЂњdrag-and-dropвЂќ technology.

Software-Oriented Programming. Manufacturers have developed their own pro-

gramming languages, but they are all similar and resemble Fortran, Basic, or C. Table

5-1.2 presents the programming language we use in this book; this language is similar

to those used by different manufacturers.

5-1.3 Scaling Computing Algorithms

When signals are handled as a percent, or fraction, of span, additional calcula-

tions must be performed before the required mathematical manipulations can be

77

SIGNALS AND COMPUTING ALGORITHMS

TABLE 5-1.1 Computing Blocks

OUT = output from block

I1, I2, I3 = input to blocks

K0, K1, K2, K3 = constants that are used to multiply each input

B0, B1, B2, B3 = constants

Summer: OUT = K 1 I1 + K 2 I 2 + K 3 I 3 + B0

I1

I1

S OUT

OUT I2

I2

SUM

I3

I3

K 0 (K 1 I1 + B1 ) (K 2 I 2 + B2 )

Multiplier/divider: OUT = + B0

K 3 I 3 + B3

I1

I1

ВҐ OUT

OUT

MUL

I2

I2

I1

I1

в€Џ OUT

OUT

DIV

I3

I3

Square root: OUT = K 1 I1

вЂ”

Г·

OUT

I1

K0 (t ld s + 1)

Lead/lag: OUT = I1

t lg s1 + 1

стр. 26 |