13.2 Relating 4 to 20 mA signals to instrument variables

A 4 to 20 mA current signal represents some signal along a 0 to 100 percent scale. Usually, this scale is linear as shown by this graph:

Being a linear function, we may use the standard slope-intercept linear equation to relate signal percentage to current values:

y = mx + b


= Output from instrument

= Input to instrument

= Slope

y-intercept point (i.e. the live zero of the instrument’s range)

Once we determine suitable values for and b, we may then use this linear equation to predict any value for given x, and vice-versa. This is very useful for predicting the 4-20 mA signal output of a process transmitter, or the expected stem position of a 4-20 mA controlled valve, or any other correspondence between a 4-20 mA signal and some physical variable.

Before we may use this equation for any practical purpose, we must determine the slope (m) and intercept (b) values appropriate for the instrument we wish to apply the equation to. Next, we will see some examples of how to do this.

For the linear function shown, we may determine the slope value (m) by dividing the line’s rise by its run. Two sets of convenient points we may use in calculating rise over run are 4 and 20 milliamps (for the rise), and 0 and 100 percent (for the run):

m = Rise=  (20−-4)-= -16
    Run    (100 − 0)  100
    ( 16)
y =  100  x+ b

To calculate the y-intercept (b), all we need to do is solve for at some known coordinate pair of and y. Again, we find convenient points3 for this task at 0 percent and 4 milliamps:

    (   )
4 =  100  0+ b
4 = 0+ b
b = 4

Now we have a complete formula for converting a percentage value into a milliamp value:

   (  16)
y =  100  x+ 4

We may now use this formula to calculate how many milliamps represent any given percentage of signal. For example, suppose we needed to convert a percentage of 34.7% into a corresponding 4-20 mA current. We would do so like this:

   ( 16 )
y =  100  34.7 +4
y = 5.552 + 4
y = 9.552

Thus, 34.7% is equivalent to 9.552 milliamps in a 4-20 mA signal range.

The slope-intercept formula for linear functions may be applied to any linear instrument, as illustrated in the following examples.

13.2.1 Example calculation: controller output to valve

An electronic loop controller outputs a signal of 8.55 mA to a direct-responding control valve (where 4 mA is shut and 20 mA is wide open). How far open should the control valve be at this MV signal level?

To solve for percentage of stem travel (x) at 8.55 milliamps of signal current (y), we may use the linear equation developed previously to predict current in milliamps (y) from signal value in percent (x):

   (    )
y =  -16  x+ 4
      (   )
8.55 =  -16  x +4
      ( 16 )
4.55 =  ---  x
( 100)
  16-  4.55 = x
x = 28.4

Therefore, we should expect the valve to be 28.4% open at an applied MV signal of 8.55 milliamps.

13.2.2 Example calculation: flow transmitter

A flow transmitter is ranged 0 to 350 gallons per minute, 4-20 mA output, direct-responding. Calculate the current signal value at a flow rate of 204 GPM.

One way we could solve for the amount of signal current is to convert the flow value of 204 GPM into a ratio of the flowmeter’s full-flow value, then apply the same formula we used in the previous example relating percentage to milliamps. Converting the flow rate into a “per unit” ratio is a matter of simple division, since the flow measurement range is zero-based:

204 GPM
---------= 0.583 per unit
350 GPM

Converting a “per unit” ratio into percent merely requires multiplication by 100, since “percent” literally means “per 100”:

0.583 per unit× 100% = 58.3%

Next, we plug this percentage value into the formula:

   (    )
y =  16-  58.3 +4
y = 9.33+ 4
y = 13.33

Therefore, the transmitter should output a PV signal of 13.3 mA at a flow rate of 204 GPM.

An alternative approach is to set up a linear equation specifically for this flowmeter given its measurement range (0 to 350 GPM) and output signal range (4 to 20 mA). We will begin this process by sketching a simple graph relating flow rate to current:

The slope (m) for this equation is rise over run, in this case 16 milliamps of rise for 350 GPM of run:

   (       )        (   )
     20-−-4-         -16
y =  350− 0  x+ b =  350  x + b

The y-intercept for this equation is 4, since the current output will be 4 milliamps at zero flow:

   (    )
y =  350  x+ 4

Now that the linear equation is set up for this particular flowmeter, we may plug in the 204 GPM value for and solve for current:

    (   )
y =  350  204+ 4
y = 9.33+ 4
y = 13.33

Just as before, we arrive at a current of 13.33 milliamps representing a flow rate of 204 GPM.

13.2.3 Example calculation: temperature transmitter

An electronic temperature transmitter is ranged 50 to 140 degrees Fahrenheit and has a 4-20 mA output signal. Calculate the current output by this transmitter if the measured temperature is 79 degrees Fahrenheit.

First, we will set up a linear equation describing this temperature transmitter’s function:

Calculating and substituting the slope (m) value for this equation, using the full rise-over-run of the linear function:

   (        )        (  )
     -20−-4--         16
y =  140− 50  x+ b =  90  x + b

The y-intercept value will be different4 for this example than it was for previous examples, since the measurement range is not zero-based. However, the procedure for finding this value is the same – plug any corresponding and values into the equation and solve for b. In this case, I will use the values of 4 mA for and 50 oF for x:

4 =  90  50+ b
4 = 8.89+ b
b = − 4.89

Therefore, our customized linear equation for this temperature transmitter is as follows:

y =  --  x − 4.89

At a sensed temperature of 79 oF, the transmitter’s output current will be 9.16 mA:

   ( 16)
y =  90  79− 4.89
y = 14.04 − 4.89
y = 9.16

We may apply the same alternative method of solution to this problem as we did for the flowmeter example: first converting the process variable into a simple “per unit” ratio or percentage of measurement range, then using that percentage to calculate current in milliamps. The “tricky” aspect of this example is the fact the temperature measurement range does not begin at zero.

Converting 79 oF into a percentage of a 50-to-140 oF range requires that we first subtract the live-zero value, then divide by the span:

Per unit ratio = 79−-50-= 0.3222
               140 − 50
Percentage = 0.3222 per unit× 100% = 32.22%

Next, plugging this percentage value into our standard linear equation for 4-20 mA signals:

    (    )
y =  -16  32.22+ 4
y = 5.16+ 4
y = 9.16

Again, we arrive at the exact same figure for transmitter output current: 9.16 milliamps at a measured temperature of 79 oF.

The choice to calculate transmitter current by first setting up a “customized” linear equation for the transmitter in question or by converting the measured value into a percentage and using a “standard” linear equation for current is arbitrary. Either method will produce accurate results, although it could be argued that the “customized equation” approach may save time if many different current values must be calculated.

Certainly, if you are programming a computer to convert a received milliamp signal value into a measurement range (such as degrees Fahrenheit), it makes more sense to have the computer evaluate a single equation rather than perform multiple steps of calculations as we do when using percentage values as an intermediate step between the input and output value calculations. Evaluating one equation rather than two saves processing time.

13.2.4 Example calculation: pH transmitter

A pH transmitter has a calibrated range of 4 pH to 10 pH, with a 4-20 mA output signal. Calculate the pH sensed by the transmitter if its output signal is 11.3 mA.

First, we will set up a linear equation describing this temperature transmitter’s function:

Note how we are free to set up 4-20 mA as the independent variable (axis) and the pH as the dependent variable (axis). We could arrange current on the axis and the process measurement on the axis as before, but this would force us to manipulate the linear equation to solve for x.

Calculating and substituting the slope (m) value for this equation, using the full rise-over-run of the linear function:

   (      )        (   )
y =  10−-4- x+ b =  -6  x + b
     20− 4          16

Solving for the y-intercept value using the coordinate values of 4 pH and 4 mA, we see again that this is an application where b  4 mA. This is due to the fact that the instrument’s input range (i.e. the domain of the mx function) does not begin at zero:

   (   )
4 =  6-  4+ b
4 = 1.5+ b
b = 2.5

Therefore, our customized linear equation for this pH transmitter is as follows:

   (   )
y =  6-  x+ 2.5

Calculating the corresponding pH value for an output current signal of 11.3 mA now becomes a very simple matter:

    (   )
y =   6-  11.3+ 2.5
y = 4.24 +2.5
y = 6.74

Therefore, the transmitter’s 11.3 mA output signal reflects a measured pH value of 6.74 pH.

13.2.5 Example calculation: reverse-acting I/P transducer signal

A current-to-pressure transducer is used to convert a 4-20 mA electronic signal into a 3-15 PSI pneumatic signal. This particular transducer is configured for reverse action instead of direct, meaning that its pressure output at 4 mA should be 15 PSI and its pressure output at 20 mA should be 3 PSI. Calculate the necessary current signal value to produce an output pressure of 12.7 PSI.

Reverse-acting instruments are still linear, and therefore still follow the slope-intercept line formula mx b, albeit with a negative slope:

Calculating and substituting the slope (m) value for this equation, using the full rise-over-run of the linear function. Note how the “rise” is actually a “fall” from 20 milliamps down to 4 milliamps, yielding a negative value for m:

    (4-−-20-)       ( − 16)       (  16)
y =  15 − 3 x + b =   12   x + b = − 12  x+ b

Solving for the y-intercept value using the coordinate values of 3 PSI and 20 mA:

     (  16)
20 =  − 12  3+ b
20 = − 4+ b
b = 24

Therefore, our customized linear equation for this I/P transducer is as follows:

    (  16)
y =  − --  x+ 24

Calculating the corresponding current signal for an output pressure of 12.7 PSI:

    (  16)
y =  − 12  12.7+ 24
y = − 16.93+ 24
y = 7.07

Therefore, a current signal of 7.07 mA is necessary to drive the output of this reverse-acting I/P transducer to a pressure of 12.7 PSI.

13.2.6 Example calculation: PLC analog input scaling

An Allen-Bradley SLC500 programmable logic controller (PLC) uses a 16-bit analog-to-digital converter in its model 1746-NI4 analog input card to convert 4-20 mA signals into digital number values ranging from 3277 (at 4 mA) to 16384 (at 20 mA). However, these raw numbers from the PLC’s analog card must be mathematically scaled inside the PLC to represent real-world units of measurement, in this case 0 to 700 GPM of flow. Formulate a scaling equation to program into the PLC so that 4 mA of current registers as 0 GPM, and 20 mA of current registers as 700 GPM.

We are already given the raw number values from the analog card’s analog-to-digital converter (ADC) circuit for 4 mA and 20 mA: 3277 and 16384, respectively. These values define the domain of our linear graph:

Calculating and substituting the slope (m) value for this equation, using the full rise-over-run of the linear function:

    (            )       (      )
y =   --700−-0--- x + b =  -700-  x+ b
      16384 − 3277          13107

Solving for the y-intercept value using the coordinate values of 0 GPM and 3277 ADC counts:

   (      )
0 =  13107  3277 + b
0 = 175+ b
b = − 175

Therefore, our PLC scaling equation for this particular flowmeter is as follows:

    (     )
y =  -700-  x− 175

This type of scaling calculation is so common in PLC applications that Allen-Bradley has provided a special SCL (“scale”) instruction just for this purpose. Instead of “slope” (m) and “intercept” (b), the instruction prompts the human programmer to enter “rate” and “offset” values, respectively. Furthermore, the rate in Allen-Bradley’s SCL instruction is expressed as the numerator of a fraction where the denominator is fixed at 10000, allowing fractional (less than one) slope values to be specified using integer numbers. Aside from these details, the concept is exactly the same.

Expressing our slope of 700 _ 13107 as a fraction with 10000 as the denominator is a simple matter of solving for the numerator using cross-multiplication and division:

 700     r
-----=  -----
13107   10000
r = 534

Thus, the SCL instruction would be configured as follows5

13.2.7 Graphical interpretation of signal ranges

An illustration some students find helpful in understanding analog signal ranges is to consider the signal range as a length expressed on a number line. For example, the common 4-20 mA analog current signal range would appear as such:

If one were to ask the percentage corresponding to a 14.4 mA signal on a 4-20 mA range, it would be as simple as determining the length of a line segment stretching from the 4 mA mark to the 14.4 mA mark:

As a percentage, this thick line is 10.4 mA long (the distance between 14.4 mA and 4 mA) over a total (possible) length of 16 mA (the total span between 20 mA and 4 mA). Thus:

            (               )
Percentage =  14.4-mA-−-4 mA  100%
              20 mA − 4 mA
           (        )
Percentage =  10.4-mA-- 100%
              16 mA
Percentage = 65%

This same “number line” approach may be used to visualize any conversion from one analog scale to another. Consider the case of an electronic pressure transmitter calibrated to a pressure range of −5 to +25 PSI, having an (obsolete) current signal output range of 10 to 50 mA. The appropriate current signal value for an applied pressure of +12 PSI would be represented on the number line as such:

Finding the “length” of this line segment in units of milliamps is as simple as setting up a proportion between the length of the line in units of PSI over the total (span) in PSI, to the length of the line in units of mA over the total (span) in mA:

17-PSI=  ?-mA--
30 PSI   40 mA

Solving for the unknown (?) current by cross-multiplication and division yields a value of 22.67 mA. Of course, this value of 22.67 mA only tells us the length of the line segment on the number line; it does not directly tell us the current signal value. To find that, we must add the “live zero” offset of 10 mA, for a final result of 32.67 mA.

Thus, an applied pressure of +12 PSI to this transmitter should result in a 32.67 mA output signal.

13.2.8 Thinking in terms of per unit quantities

Although it is possible to generate a “custom” linear equation in the form of mx for any linear-responding instrument relating input directly to output, a more general approach may be used to relate input to output values by translating all values into (and out of) per unit quantities. A “per unit” quantity is simply a ratio between a given quantity and its maximum value. A half-full glass of water could thus be described as having a fullness of 0.5 per unit. The concept of percent (“per one hundred”) is very similar, the only difference between per unit and percent being the base value of comparison: half-full glass of water has a fullness of 0.5 per unit (i.e. 1 2 of the glass’s full capacity), which is the same thing as 50 percent (i.e. 50 on a scale of 100, with 100 representing complete fullness).

Let’s now apply this concept to a realistic 4-20 mA signal application. Suppose you were given a liquid level transmitter with an input measurement range of 15 to 85 inches and an output range of 4 to 20 milliamps, respectively, and you desired to know how many milliamps this transmitter should output at a measured liquid level of 32 inches. Both the measured level and the milliamp signal may be expressed in terms of per unit ratios, as shown by the following graphs:

So long as we choose to express process variable and analog signal values as a per unit ratios ranging from 0 to 1, we see how (the slope of the line) is simply equal to the span of the process variable or analog signal range, and is simply equal to the lower-range value (LRV) of the process variable or analog signal range. The advantage of thinking in terms of “per unit” is the ability to quickly and easily write linear equations for any given range. In fact, this is so easy that we don’t even have to use a calculator to compute in most cases, and we never have to calculate b because the LRV is explicitly given to us. The instrument’s input equation is = 70+ 15 because the span of the 15-to-85 inch range is 70, and the LRV is 15. The instrument’s output equation is = 16+ 4 because the span of the 4-to-20 milliamp range is 16, and the LRV is 4.

If we manipulate each of the mx equations to solve for (per unit of span), we may express the relationship between the input and output of any linear instrument as a pair of fractions with the per unit value serving as the proportional link between input and output:

The question remains, how do we apply these equations to our example problem: calculating the milliamp value corresponding to a liquid level of 32 inches for this instrument? The answer to this question is that we must perform a two-step calculation: first, convert 32 inches into a per unit ratio, then convert that per unit ratio into a milliamp value.

First, the conversion of inches into a per unit ratio, knowing that 32 is the value of and we need to solve for x:

32 = 70x+ 15
32 − 15 = 70x
32 − 15
--70---= x
x = 0.2429 per unit (i.e. 24.29% )

Next, converting this per unit ratio into a corresponding milliamp value, knowing that will now be the current signal value using and constants appropriate for the 4-20 milliamp range:

y = 16x+ 4
y = 16(0.2429)+ 4
y = 3.886 + 4
y = 7.886 mA

Instead of deriving a single custom mx equation directly relating input (inches) to output (milliamps) for every instrument we encounter, we may use two simple and generic linear equations to do the calculation in two steps with “per unit” being the intermediate result. Expressed in general form, our linear equation is:

y = mx + b
Value = (Span)(Per unit)+ LRV
Value = (URV  − LRV )(Per unit)+ LRV

Thus, to find the per unit ratio we simply take the value given to us, subtract the LRV of its range, and divide by the span of its range. To find the corresponding value we take this per unit ratio, multiply by the span of the other range, and then add the LRV of the other range.

Example: Given a pressure transmitter with a measurement range of 150 to 400 PSI and a signal range of 4 to 20 milliamps, calculate the applied pressure corresponding to a signal of 10.6 milliamps.

Solution: Take 10.6 milliamps and subtract the LRV (4 milliamps), then divide by the span (16 milliamps) to arrive at 41.25% (0.4125 per unit). Take this number and multiply by the span of the pressure range (400 PSI − 150 PSI, or 250 PSI) and lastly add the LRV of the pressure range (150 PSI) to arrive at a final answer of 253.125 PSI.

Example: Given a temperature transmitter with a measurement range of −88 degrees to +145 degrees and a signal range of 4 to 20 milliamps, calculate the proper signal output at an applied temperature of +41 degrees.

Solution: Take 41 degrees and subtract the LRV (−88 degrees) which is the same as adding 88 to 41, then divide by the span (145 degrees − (−88) degrees, or 233 degrees) to arrive at 55.36% (0.5536 per unit). Take this number and multiply by the span of the current signal range (16 milliamps) and lastly add the LRV of the current signal range (4 milliamps) to arrive at a final answer of 12.86 milliamps.

Example: Given a pH transmitter with a measurement range of 3 pH to 11 pH and a signal range of 4 to 20 milliamps, calculate the proper signal output at 9.32 pH.

Solution: Take 9.32 pH and subtract the LRV (3 pH), then divide by the span (11 pH − 3 pH, or 8 pH) to arrive at 79% (0.79 per unit). Take this number and multiply by the span of the current signal range (16 milliamps) and lastly add the LRV of the current signal range (4 milliamps) to arrive at a final answer of 16.64 milliamps.

Back to Main Index of Book