Analog dynamic range, accuracy and number of bits

Nov 02, 2012 253 Replies

Hi all,



Anyone could tell me what are the relations between Analog dynamic range (figure with no dimension), accuracy over this range and number of bits ? In other words, how to compute the number of bits of an ADC knowing the analog range and the accuracy wanted over this range.



Ex : Analog range = 1:500 accuracy over this range : +-0.1% number of bits = ?



Best Regards, Habib


I do not know how you define dynamic range, but the old rule of thumb is that the signal to noise ratio SNR (signal power to quantization noise power) expressed in decibels, can be calculated simply as

SNR = 6 x number_of_bits

Habib Bouaziz-Viallet a écrit :

Depending on what you want/have to do there are a lot of parameters that can enter into the equation.

Better to tell us what you want to do.

Thanks, Fred.

Sounds more like a 'test' question, but here goes: if accuracy is +/- 1/1000 and the smallest range to largest implies

500X, 1/500000; which is a little more than 19 bits, so therefore you need AT LEAST 20 bits.

12 bits!
John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators

For AC, where you have to fit the p-p signal into the ADC and the DC offset doesn't count as signal, it's

SNR_max = 6.02*N + 10*log(1.5).

The odd-looking 10 log 1.5 (1.76 dB) comes in because you lose a factor of 8 in power (2*sqrt(2) in voltage) from accommodating the peak-to-peak sine wave signal, but you gain a factor of 12 in power because the RMS noise due to sampling is sqrt(1/12)* (1 LSB).

If it's DC, where the offset counts as signal, you get back the factor of 8, so it's

SNR_max = 6.02*N + 10*log(12), or roughly 6N+10.8 dB.

This only applies where Widrow's theorem is valid, i.e. the signal is at least a few LSBs in size, so that it's a good approximation to treat quantization as additive noise of sqrt(1/12) LSB.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net

Or maybe 19, but if it's a test question, show your work.

In fact i'm far from a test question ... it's real life and i've got the same approach.

Energy Watt-Meter 0,1% accuracy, 230Volts/50Hz. I range (0,02In .. In,

10 In)), U range (0,8Un .. Un .. 1,5Un)

--> 24bits on ADC for currents measurements.

Any objection from gurus of the analog ?

Habib

I've done revenue-quality energy meters with as few as 7 bits of ADC.

10 or 12 is plenty. We did one nice meter using an HC05 microprocessor and its on-chip ADC. The trick is to add some noise to the current signals to smear the bits, and do the downstream algorithms properly.

But nowadays, several people make metering chips that do all the work for you.

John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators

While adding dithering noise, oversampling and postprocessing low pass filtering will certainly give you some extra bits, at least if the actual ADC is monotonous, I am a bit suspicious of the accuracy of that meter (I am not claiming that it would be worse than traditional electromechanical kWh meters).

The situation would be easy if only resistive loads existed, but in the real world, the voltage waveform contains a lot of distortion, current drawn by a non-PFC electronics loads (such as "energy saving" lamps) complicate the situation further.

However, if it can be assumed that the load remains constant for several cycles (e.g. 1 s) averaging will help and less bits are needed in the ADC.

Except that the accuracy is in percent.

If that's percent of full range, then it's 0.2% overall -- ah ha! This is probably where the 1:500 comes in.

If what the OP really means is that he needs to know the input to one part in 500, then he needs an ADC with an effective number of bits (ENOB) of 500, or a 9-bit ADC.

In truth, the OP needs to look at his candidate ADCs various error specifications to figure out which one will work. All he knows from the above estimate that it needs to be nine or more.

(And note: there are plenty of ADCs out there that have eight good bits and four more for marketing: bit count Does Not Mean that the accuracy will be sufficient).

Tim Wescott Control system and signal processing consulting www.wescottdesign.com

To know how many bits you need to use in the converter, you have to define if you want to calculate the power to 0.1% or if you want to measure the voltage and the current to 0.1% and you need to know if the

0.1% accuracy is applied to the full range of measurement or if it is relative to the largest value measured.

If you need to calculate the power to 0.1%, then you need each measurement to 0.05% since the percentage errors will add as you multiply to get power. If you want to know the total energy consumed to

0.1% you also need to be accurate over the full range since a given user may only consume at lower levels.

So the lsb of your converter must be no larger than 0.05% of your lowest current measurement in addition to the 500:1 current range or 1 part in

1,000,000. (excuse my use of periods and commas being different from yours.)

This would imply a 20 bit converter for the current, but don't assume a converter with 24 bits is accurate to 24 bits. There are mostly two types of converters with 24 bit results, slower ones for scales and other measurements at rather low sample rates which I don't think you can use. Then there are audio type converters which will sample at higher rates, but are specified for AC performance mostly. The useful number of bits (ENOB - effective number of bits) is sometimes given, but usually they spec SNR which is a similar number in dB. You will get 1 bit for each 6.02 dB of SNR minus a small factor to account for quantization noise (~1.5 dB IIRC).

So 24 bits may be good enough, but make sure you have at least 122 dB of SNR ((20 * 6.02) + 1.5). This is not so easy in a small, low power chip.

How fast do you plan to sample? You will get some improvement in SNR by averaging multiple measurements, either over a cycle or over multiple cycles of the power line. Random errors will average out (or more "accurately" they average down since they never go away). "Accuracy" is also impacted by systematic errors which won't average out.

One thing that bugs me is that they measure the current of the meter so you pay to power the durn measuring device! I would expect the power company to treat that as part of it's own operating costs...

Rick

The mechanical disk meters are actually amazingly good, not easy to match with electronics.

If you simultaneous-sample (or nearly ss) the voltage and current waveforms, and multiply-integrate, you get true power regardless of waveform, as long as nothing clips.

Voltage waveforms aren't bad and don't need dithering. Current is nasty, ugly waveforms and a huge, like 20,000:1, dynamic range.

ADC channel crosstalk is one gotcha that has to be managed. Magnetic coupling, too.

Energy is a long-term integral, millions or billions of samples in a billing period, so that works out. Even damand metering seldom averages over less than about 5 minutes, still a lot of samples.

John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

Le 02/11/12 21:12, rickman a écrit :

Yes most of ADC 24bits are nearly 18bits ENOB but they (AD, TI, Cirrus ...etc) claims that Gaussian noise gives the major part in the SINAD. Gaussian noise on I and U would canceled themselves on the power calculation (mean (discrete sum (U, I)) on 1s) because the two acquisitions sequences are not correlated each other ... we will see even if with GNU-Octave (awgn() ....) the results are something like spectacular !

We plan to get 8Ksamples/s (out of the FIR filter after the Delta-Sigma modulator of the ADC)

i do the hacks they pay for ... like everyone else ! the most important is the next holidays in Greece or elsewhere with my wife !

Habib

Le 02/11/12 16:46, John Larkin a écrit :

Pardon me John but i really doubt that you could achieve to implement any power meter with even a real 12 bits ADC over the 1:500 range of current, no offense John.

Hey John, some guys are paying me to implement a good IEC62053-21 class

0.2S power meter ... they will whip me out if i repeat you words ... Please John don't try to ruin my next Holidays !

Habib

To get good accuracy you also need the two converters to be very well synchronized. You can do the calculations to see just *how* synchronized.

Where are you from that you use U for voltage? I haven't seen that before. I thought this was something standardized by SI? I also saw you use In and Un. What does that mean?

How will you verify the accuracy of the meter? Using a simple resistive load is pretty easy, but how can you verify its accuracy in a real world situation with spikes and inductive loads?

Rick

But I've done it many times. With ADCs of 7 bits, 8 bits, 12 bits, and once 16 bits.

This works:

formatting link

It uses a 16 bit ADC, because it can do DC measurements too. You don't need so many bits for AC, because you can dither and average.

I've done meters that passed the ANSI C12 meter requirements using a 7 bit single-slope ADC.

Oh. Sorry.

What sort of current sensor do you plan to use? That's the nasty part.

John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

You don't need a high sample rate for power metering. The Nyquist criterion isn't relevant. I designed the C180, a nice 16-channel meter that sampled at 27 Hz per voltage:current pair; sold thousands of them for utility end-use studies.

Hey, they are on ebay now!

formatting link

formatting link

John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

A reasonable ADC could sample current then voltage (in that order!) maybe 10 usec apart. That's only about 0.2 degrees. Since the front-end analog stuff probably includes some lowpass filtering, it's easy to skew the filter time constants to take out that 0.2 degree error.

John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

ge

s ?

e

I don't recommend counting on dithering and such, better to just do straight forward ADC. else certain waveforms will cause strange power measurements. I highly recommend TI's ADC used in the soundcards. I get 22.5+ bits out of them and sometimes better.

There is a company in South Africa I use to compare my power meter design to, both cost and performance. They were good, low cost AND accurate, really tough competitor, but memory is not so good and lost the name with those pesky 8 hard drive crashes ALL in a two year period.

From memory, we did the power meter esign with an analog multiplying chip AND my current transformer was a different design so didn't take any metal. I used air core, almost, just a small bit of core whose permeability could be initially over 10 to 1 and when operating change

30 to 1 and still keep in spec.pretty forgiving current sensor.

Don't forget to put in 'exterior' field sensors to cause the meter's reading to skyrocket if some one tries to use a magnet to disable your meter. That's what we did to punish those who attempted to saturate the current sensor core to lower the power reading. I'll bet they were surprised the first time they tried that and had to pay more!

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required