Example 28: 5.3 Linearization

You might also like

You are on page 1of 4

DIGITAL SIGNAL CONDITIONING

EXAMPLE A network application is used with a control system that limits cycle time to 450 ms be-
28 cause of heavy bus usage. One of the control systems is to regulate periodic variations of
temperature in a reaction chamber. Assuming the computer processing time is negligible,
what is the maximum temperature variation frequency that can be controlled?
Solution
The 450 ms corresponds to the time for requesting a sample from the sensor and then re-
ceiving this sample. The total reaction time of the control system should include the time
to get a signal back to the final control element. Thus, we add another 225 ms to the total
processing time. In this case, the sampling frequency is given by
fs = 1兾(0.45 + 0.225) = 1.48 Hz
The maximum frequency of the temperature variation is found from Equation (31):
fmax = fs兾10 = 0.148 Hz,
or a period of about 6.8 seconds.

5.3 Linearization
In many cases, the input binary number and the controlled variable are not linearly related.
In such cases, it is necessary to execute a program that will linearize the binary number so
that it is proportional to the controlled variable value. There are two common approaches:
equation inversion and table look-up.

Linearization by Equation When an equation is known that relates the value of


the controlled variable and the binary number in the computer, an equation can be devel-
oped to determine the linearized value of the variable. For example, suppose that a trans-
ducer outputs a voltage related to pressure by
V = K[p]1兾2 (32)
This voltage is converted to a binary number, DV, by an ADC. Then it is also true that the
binary number and pressure are still related by the square root:
DV varies as [p]1兾2 (33)
What we want is a binary number that is linearly related to pressure. The way to get this is
to square DV:
DP = DV * DV varies as p (34)
Thus, the program would input a sample DV and multiply it by itself. The resulting
number would be linearly related to the pressure. Of course, there may have to be scale
shifts and offsets before we have a number equal to the pressure, as the following ex-
ample shows.

173
DIGITAL SIGNAL CONDITIONING

EXAMPLE Pressure from 50 to 400 psi is converted to voltage by the relation


29
V = 0.385[p]1兾2 - 2.722
This is input to an ADC with a 5.0-V reference, which provides 00H to FFH over the pres-
sure range. A program uses an instruction DV = UDF(1) to input the data from the ADC
as a base 10 number DV that varies from 0 to 255 over the pressure range. Develop a lin-
earization equation to give a quantity, p, in the program that is equal to the actual pressure.
Solution
We have enough information to work backward through the ADC, signal conditioning, and
measurement. Thus, we know the voltage is related to DV by the ADC transformation
DV = (V兾Vref)256 = (V兾5)256
or
V = (5兾256)DV
Then, using the known relation for V in terms of p,
0.385[p]1兾2 - 2.722 = (5兾256)DV
and solving for p,
p = (0.0507 DV + 7.071)2
This number p in the program is equal to the actual pressure value, 50 to 400 psi.

Linearization by Table Look-up There are many measurement processes


where it is impossible to find a simple equation such as Equation (32) to relate the
controlled variable and the binary number. Also, when the program must be written in
assembly language, it may be difficult to evaluate even simple equations such as that
of Example 29. In these cases, it becomes much easier to use the look-up table
approach.
This is really just what we humans do when we use thermocouple tables, for ex-
ample. We measure the voltage, go to a table and look up the temperature, and sometimes
interpolate. It is the exact same thing with the software approach. The table of input val-
ues and corresponding physical variable values are stored in a table in memory. Follow-
ing a measurement, the input value is looked up in the table and the correct measured
value found.
Figure 35 shows a software approach for table look-up in flowchart format. It is as-
sumed that the input values are stored in ascending value in N memory locations and the
corresponding physical variable values are stored in the following N locations. Thus, if the
input is found at the Ith memory location from the start of the table, then the actual variable
value is found at the N + I location.
Of course, there are many other methods of table construction and search. In many
cases, it is necessary to write interpolation routines by programming equations to refine
the values between table values.

174
DIGITAL SIGNAL CONDITIONING

FIGURE 35
Linearization by table look-up can be
accomplished by the operations in this
flowchart.

SUMMARY

This chapter provides a digital electronics background to make the reader conversant with
the elements of digital signal conditioning and able to perform simple analysis and design
as associated with process control.
1. The use of digital words enables the encoding of analog information into a digital
format.
2. It is possible to encode fractional decimal numbers as binary, and vice versa, using
N10 = b12-1 + b22-2 + p + bm2-m (1)
3. Boolean algebraic techniques can be applied to the development of process alarms and
elementary control functions.
4. Digital electronic gates and comparators allow the implementation of process Boolean
equations.
5. DACs are used to convert digital words into analog numbers using a fractional-number
representative. The resolution is
¢V = VR2-n (8)
6. An ADC of the successive approximations type determines an output digital word for
an input analog voltage in as many steps as bits to the word.

175

You might also like