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 , which is used in this example, is defined as:
thus, an error in (volts) translates into as follows:
where is the full scale range of the adc and is the number of bits of the adc.
linearity errors are also commonly reported in normalized units with respect to the full scale range:
another unit sometimes used for linearity errors used is percent full scale. percent full scale is defined as normalized units multiplied by 100:
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:
where is the slope of the input ramp/sawtooth signal in lsb/s, and is the adc's conversion start frequency.
see also
|