main content

measuring offset and gain errors in adc -凯发k8网页登录

this example shows how offset error and gain error are calculated and how each affects the transfer curve of an adc. offset error and gain error characterize part of the linearity error in an adc.

offset error is the difference between the center of the least significant code and the center of the same code on an ideal adc with the same number of bits. offset error is usually reported in units of the least significant bit (lsb) of the converter. one lsb is equivalent to the converter's quantization interval.

gain error in lsb is the difference between the center of the most significant code after offset error correction and the center of the same code on an ideal adc with the same number of bits.

due to the difficulty in determining the precise location of the center of a code with a non finite boundary, these values are most commonly measured with respect to the first and last threshold of the converter, respectively.

units for offset error and gain error

the unit $lsb$, which is used in this example, is defined as:

$$1 \left[lsb\right] = \frac{fsr}{2^{n_{bits}}}$$

thus, an error in $v$ (volts) translates into $lsb$ as follows:

$$e \left[lsb\right] = 2^{n_{bits}}\frac{e \left[v\right]}{fsr
\left[v\right]}$$

where $fsr$ is the full scale range of the adc and $n_{bits}$ is the number of bits of the adc.

linearity errors are also commonly reported in normalized units with respect to the full scale range:

$$ e_{offset} = \frac{e_{offset} \left[v\right]}{fsr \left[v\right]}$$

another unit sometimes used for linearity errors used is percent full scale. percent full scale is defined as normalized units multiplied by 100:

$$e_{gain} \left[\%\right] = 100\frac{e_{gain} \left[v\right]}{fsr
\left[v\right]}$$

calculate offset error and gain error

use a 3-bit adc with dynamic range [-1 1]. define an offset error of 1 lsb and a gain error of 1 lsb.

nbits = 3;
range = [-1 1]; % adc full scale range
offseterror = 1;
gainerror = 1;
lsb = (max(range) - min(range)) / (2^nbits - 1);

the digital codes from the ideal adc are identical to those from the experimental adcs.

[tc0analog, tc0digital] = og2tc(nbits, range, 0, 0); % ideal adc transfer curve
tc1analog = og2tc(nbits, range, offseterror, 0); % offset error only
tc2analog = og2tc(nbits, range, 0, gainerror); % gain error only
tc3analog = og2tc(nbits, range, offseterror, gainerror); % both offset error and gain error
plotadctcforexample(tc0digital, tc0analog, tc1analog, tc2analog, tc3analog, nbits);

the sum of offset error and gain error is known as full-scale error. in monopolar converters zero error, essentially offset error defined at analog level 0, is identical to regular offset error. in bipolar converters such as those above, offset error and zero error are different quantities.

use of linearity errors as impairments

compare a flash adc with offset and gain error to one with no impairments.

model = 'offsetgainexample';
open_system(model);
open_system([model '/time scope']);
sim(model);

the adc dc measurement block confirms the values of the impairments to within a margin of error determined by the sample rate of the system. the offset error and gain error were both entered as 1 lsb. offset error was measured as 1.08 lsb and gain error was measured as 0.97 lsb. errors in these measurements are due to the converter not sampling exactly at its threshold values. the maximum expected error in lsb is:

$$e_{max} = \frac{m}{f_s}$$

where $m$ is the slope of the input ramp/sawtooth signal in lsb/s, and $f_s$ is the adc's conversion start frequency.

see also

|

网站地图