Thursday, December 19, 2013

Linear sensors measurement introduction, static measurements

Within this document a general model for linearized sensors is examined. After a general introduction, a numeric example will be introduced. Instrument-specific calibration and test procedures, can be found on the instrument test section of the site, where available.

A sensor responds to a physical stimuli and transmits a corresponding electrical signal.
For a wide range of sensors, the relationship between input $$x$$ and output $$y$$ can be approximated as linear. There are cases, however, where the relation cannot be linearized.
The linearized sensor input-output characteristic is assumed to be a straight-line and towards that goal, the purpose of the calibration procedure is to find the straight-line that fits best the real sensor characteristic.

Digital sensors can be modelled in the same manner of the analog ones. The better the resolution (in bits) of the sensor output, better model accuracy is achieved.

Defining the sensor sensitivity or slope $$m$$, the offset $$o$$ and $$\epsilon$$ as a random, normally distributed error variable $$N(0,\sigma^2)$$, the linear input-output measurement model is

Equation ILS.1
$$y(t)=x(t)m(t,T,x_n)+o(t,T,x_n)+\epsilon$$

Refer to figure ILS.1 for a graphical representation.

Figure ILS.1 Ideal linear sensor input-output characteristic

The last equation explicitly accounts for the time $$t$$ and temperature $$T$$ impact on the output. Any other negligible or uncompensated for deviation sources are formally represented by $$x_n$$. For example, in the case of a ratio-metric sensor, $$x_n$$ can be the power voltage value. In general $$x_n$$ should account for every environmental factor such as vibrations, humidity and acoustic noise level. Sensor datasheets are commonly available on the internet and publish the upper-bound of the main error sources. $$x_n$$ can be incorporated in Eq. ILS.1 with a corresponding increase in the $$\sigma$$ deviation value of $$\epsilon$$ error variable.

Equation ILS.2
$$y(t)=x(t)m(t,T)+o(t,T)+\epsilon$$

The slope and offset values are time dependent. The variation with time of this parameters have two different time scales. The long scale variation is reported on data-sheets as “long term drift”, “aging” or with similar terms. That accounts for the fact that even a stored sensor is subject to aging and consequently the input-output relationship is time dependent.

For calibration and test purposes, aging related effects can be neglected. If a reliable sensor is required then the calibration of the sensor itself should be periodically retested.
Refer to the following figure to visualize the impact of slope and offset variation.

Figure ILS.2 Variation of slope, left. Variation of offset, right

The following equation will be used during linear sensor calibration.

Equation ILS.3
$$y(t)=x(t)m(T)+o(T)+\epsilon$$

Generally, $$m$$ and $$o$$ are affected by two main thermal related issues, the initial warm up of the sensor and the operating environmental temperature.
$$o$$ drift is reported in data-sheets as '”offset thermal drift” or with similar terms under the thermal characteristics section. Τhe indicated drift is the total variation inside the sensor operating temperature range. The drift of the offset value after an initial power up period is called “power up offset drift”, “warm up thermal shift” or with similar terms.

We define $$y_{span}$$ as the output span or range and $$x_{span}$$ as the input span or range, hence

Equation ILS.4
$$m=\frac {y_{span}} {x_{span}}$$

It is uncommon to find in data-sheets explicit descriptions on slope/sensitivity variation with temperature. Instead, it is quite common to have indications about input and output span deviations; usually in the thermal effects section.

Another useful piece of data reported in data-sheets is the “linearity error”. The general concept is that linearity error accounts for the differences between the sensors measurements and a best fit straight-line.

Figure ILS.3 Sensor deviation from linearized characteristic.
Linearized characteristic in black and real sensor characteristic in blue.
$$\epsilon$$ error band not shown

To operate in a static or quasistatic condition, it is necessary to check the response time of the sensor. Generally this value is reported as the time to reach a certain percent of the true output value.
To be sure you are operating at low frequencies check that your sample time is at least six times the time required by the sensor to reach 68% of output value. For the majority of sensors this will be an overly conservative value.

In the next post a numeric example will be introduced.