DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

How do you interpret ADC result?

Started by sanaysan ●November 7, 2010
On 09-11-2010 at 12:37:38 sanaysan <sanaysan@n_o_s_p_a_m.gmail.com> wrote:

> Hi, Fred, > > The method you wrote: > >> voltage in = Uref * code out / 255 > > or, in common form,
Remember that it depends on specific ADC.
> voltage in = Uref * [X] / [Xmax] where 0<=[X]<=Xmax Xmax=2^n-1 > (n is ADC bit number) > > is erroneous. It can be proven very simple:
Below you just proved that it is right.
> Consider the ADC with Uref=1, n=2, and normal (not shifted) transfer > function. A code of 0 ([X]=0) will correspond with an interval (of input > voltages) from 0 to 0.25, and you interpret it as 0/3=0.0, etc... The > all 4 > cases can be represented as the following table: > > Input voltage Intepretation Comment > interval result > [0.00; 0.25) 0/3=0.00 in interval, error -0.00/+0.25 > [0.25; 0.50) 1/3=0.33 in interval, error -0.08/+0.17 > [0.50; 0.75) 2/3=0.67 in interval, error -0.17/+0.08 > [0.75; 1.00] 3/3=1.00 in interval, error -0.25/+0.00 > LSB=0.25, no shift maximum error +0.25/-0.25 > -LSB/+LSB > > But any computational algotith and the DSP theory awaits from you > accuracy > of LSB/2 !!! Is not it?
Really? Which theory? And what common has the algorithm to a voltage measurement?
> Then, your expression for the error with n=8 >> +/- 0.5/255 > is not rigth. > > Now, look at the shifted transfer function case: > > Input voltage Intepretation Comment > interval result > [0.000; 0.125) 0/3=0.000 in interval > [0.125; 0.375) 1/3=0.333 in interval > [0.375; 0.625) 2/3=0.667 (!!!) OUT OF INTERVAL (!!!) > [0.625; 1.000] 3/3=1.000 in interval > LSB=0.25, shift=-LSB/2=-0.125 > > One point is out of interval. (It is for any n >=2.) > Did you think about this earlier?
You shifted it that mean you inserted an error to the calculations so what you expected? Theroretical result plus offset.
> Also, you can state that the interpetation result is the same in both > cases: it is totally alienated from the ADC matter (i.e. transfer > function).
I wouldn't use the "transfer function" name with respect to ADC. It's missleading. Have you ever seen any. I didn't. Just read about quantization and coding. Go to a very basics. http://www.eetimes.com/design/analog-design/4025078/Understanding-analog-to-digital-converter-specifications http://www.analog.com/en/embedded-processing-dsp/learning-and-development/content/mixed_signal_dsp_design_book/fca.html http://www.lr.ttu.ee/irm/sideseadmete_mudeldamine/AD_MT_Tutorial.pdf -- Mikolaj