Data Acquisition and Instrumentation: Data Processing and Calibration

In the previous article, Data Acquisition and Instrumentation: The DAS and Sensors, we looked at the electronics and sensors involved in data acquisition systems (DASs). In this second part, we look at what to do with the raw ADC data once it is acquired.

Acquisition and Processing Strategy

Channel data is processed as shown in the block diagram below. Each block represents a function (or “curve”), with input and output quantity. The channel input quantity to be measured, X , is transduced by the sensor into a sensor electrical quantity, S , such as resistance or voltage. The sensor circuit (such as a bridge) responds to the sensor and produces a voltage, V . The programmable-gain amplifier scales V by gain, G for input to the A/D converter, as V x G . Then the A/D converter, ADC, converts this voltage to a digital count, W .

The PGA and ADC together have offset and gain (slope) error. If PGA and ADC are linear, the error can be corrected in software by the next block, U (W ) (or LXFM). It uses the channel calibration parameters to transform the raw-data count, W , to U =V so that U represents the same value as V . In other words, U (W ) inverts or “undoes” or linearly “compensates” for the combined linear error of PGA and ADC. Mathematically, it is set to be

(In mathematical function notation, F (G ), F is a function of G ; that is, F is the output and is dependent upon G as the input.) U (W ) is a linear transform and cannot compensate for nonlinear sensors or sensor circuits; it can only invert linear functions. In the case where both sensor and circuit are nonlinear, U (W ) corrects only the linear error, and U (W ) is set to equal V .

For nonlinear sensors or circuits, the first nonlinear compensation block, Z (U ), compensates for the nonlinearity of the sensor circuit, and is set to V–1 (S ) = S (V ). The last block compensates for the nonlinearity of the sensor and is based on manufacturers’ sensor curves, Y (Z ) which correspond to X (S ) = S–1 (X ) of the actual sensor.

Overall, each software processing block performs the inverse of the analog DAS block so that, given W , X is recovered by undoing what each of the DAS blocks has done to X .

For example, consider a single RTD temperature sensor in a bridge circuit. X is temperature, measured in o C. The RTD changes resistance with temperature, producing R (X ). The bridge circuit voltage changes nonlinearly with R (X ) to produce an output voltage, V (R ) according to the voltage-divider formula,

where Rbr is the divider upper resistance, R is the sensor (lower) resistance and Vbr is the bridge voltage. The DAS digitizes this voltage and outputs a digital code, W (V ). Then U (W ) compensates for the DAS so that U = V in digital form. Next, U is applied to the first nonlinear function block, R (U ). It converts the count, U , into the resistance of the RTD using the divider formula above. (Because of the large dynamic range of the divider formula, floating-point math is often used and the resistance is returned as a floating-point value.)

The next nonlinear block converts resistance into temperature, in o C, and is the function T (R ). This is the sensor curve given by manufacturers. Y (Z ) inverts the sensor function and thereby linearizes it. To summarize the example, the goal is to achieve Y = X by letting

Bridge Voltage Compensation

Sensor bridge-circuit sensitivity is proportional to bridge voltage. The bridge output voltage, V (Vbr , R ) depends on both the sensor output quantity (which is resistance), S = R , and the bridge voltage, Vbr . It can be expressed as

This function can be diagrammed as follows.

The “x” multiplier block is an additional block that is compensated by breaking U (W ) into two blocks, shown below.

U(W) compensates for W (B ) so that U = B (R ). In addition, U (V ), executed by bridge compensation software, compensates for voltage drift in the bridge from its value at calibration. Vbr is measured through the bridge-voltage channel. Its last measured value and its value at calibration time, Vbr0 , are used to form a scaling factor for compensation.

Linear Calibration

Two-point calibration assumes that the sensors and DAS gains are linear. (For example, if the force sensor gain of 1 V/kN changes with the amount of applied force, it is nonlinear.) To find the offset and slope of linear transform U (W ) – the linear part of the DAS – μC programming constructs a line through two acquired data points, as shown below. The w -axis is the raw data, the digitized count from the ADC. The u -axis is the processed data, in given units. Two measurements are made with known input values u1 and u2 . The ADC outputs raw-data counts as w1 and w2 .

We then have two equations for which slope, m , and offset, b , are solved:

This results in the two-point calibration formulas:

The parameters, m and b , are used to transform raw-data values into processed values in the units used during calibration. For b , either right-hand-side expression can be used or both can be averaged.

For one-point calibration , b = 0 (no offset error is assumed), and the second data point, by default, is the origin, at (0, 0); only slope is calibrated.


DASs (or DAQs) have become a sub-specialty in electronics. They involve both analog and digital waveform processing. A general strategy of DAS acquisition and processing is to have the processing functions “undo” or perform the inverse of the acquisition functions, which are of necessity implemented in analog circuitry, some of which is nonlinear. Each stage of the analog acquisition is made to correspond to a stage of processing so that at the ADC the system folds upon itself, with acquisition stages mirrored by processing stages that undo what they did until the sensed quantity itself is all that remains of the overall process.

0 comments on “Data Acquisition and Instrumentation: Data Processing and Calibration

Leave a Reply