Page 226 - Mechanical Engineers' Handbook (Volume 2)
P. 226

4 Data Conditioning  215

                           sors change. A parametric model (equation) can be used to convert between types of units
                           or to correct for changes in the parameters of the model. The parameters for this equation
                           may be derived through a process known as calibration (Chapter 1 covers much of the process
                           of calibration and sampling). This involves determining the parameters of some equation by
                           placing the sensor in known environmental conditions (such as freezing or boiling water)
                           and recording the voltage or other measurable quantity it produces. Some (normally simple)
                           calculations will then produce the parameters desired. (See the following discussion of simple
                           linear fit for the procedure for a simple, two-parameter equation.) The complexity of the
                           model increases when the measured value is not directly proportional to the desired units
                           (nonlinear). Additionally, as sensors get dirty or age, the parameters might need adjusting.
                           There are a variety of control techniques to assist with compensating for changes in the
                           environment around the sensor, including adaptive control.


            4.1  Simple Linear Fit
                           The simplest formula for converting a measured value to the desired units is a simple linear
                           equation. The form of the equation is y   ax   b, where x is the measured value, y represents
                           the value in the units desired, and a and b are parameters to adjust the slope and offset,
                           respectively. The procedure for finding a and b is as follows:
                              1. Create a known state for the sensor in the low range. An example would be to put
                                 a temperature sensor in ice water.
                              2. Determine the value obtained from the sensor.
                              3. Create a known state for the sensor in the high range. An example would be to
                                 immerse the sensor in boiling water.
                              4. Determine the value obtained from the sensor
                              5. Calculate the values of a and b from these values using the equations
                                                    actual high value   actual low value
                                              a                                                  (1)
                                                  measured high value   measured low value
                                              b   actual low value   (a   measured low value)    (2)
                           Figure 3 demonstrates example relationships between measured values and engineering units.


            4.2  Nonlinear Relationships
                           Often, there is not a simple linear relationship between the engineering units and the mea-
                           sured units (Fig. 4). Instead, for a constantly rising pressure or temperature, the measured
                           value would form some curve. If possible, we use a portion of the sensor’s range where it
                           is linear, and we can use Eqs. (1) and (2). When this is not possible, we have to characterize
                           the sensor by a different equation, which could be a polynomial, a transcendental, or a
                           combination of a series of functions.
                              One can imagine several sensors which are linear in different ranges to be used in
                           conjunction to create a larger range of operational data. This variety of formulas should
                           make one point clear: Without an understanding of the basic model of the sensor, one cannot
                           know what type of conversion to use. Many sensors have known differences in output de-
                           pending on the range of sensed data. Be aware of the effect environmental conditions have
                           on the sensor readings. If the characteristics of a sensor are unknown, then the sensor must
                           be measured under a variety of conditions to determine the basic relationship between the
   221   222   223   224   225   226   227   228   229   230   231