eeTimes eeTimes eeTimes
Forgot password Register
Print - Send - -

Power management

Sample multiple channels 'simultaneously' with a single ADC

September 16, 2011 | Kendall Castor-Perry | 222903351
Sample multiple channels 'simultaneously' with a single ADC Kendall Castor-Perry (aka The Filter Wizard) explains that despite its title, this is indeed an article about a filtering technique. Using it, you can sample a number of analog input channels sequentially with a single ADC in such a way that the data appears to have been acquired at the same instant in time on every channel. It sounds like magic but it's just Wizardry!
Page 1 of 7

So: sequential sampling, whats the problem? After all, if youve got, let us say, four
channels that you need to sample at some rate Fs, and an ADC thatll sample fully at 4Fs and that can be driven through a 4-way multiplexer, then isnt that a nice economical way of getting the job done?

Heres the catch. If you need to do any sample-by-sample processing involving data from more than one channel, youre going to have to pretend that readings you took from different channels at different times actually happened at the same time, so that you can combine them in a calculation.

Say you want to calculate the instantaneous energy being absorbed in an AC power circuit. You sample the voltage and the current, and multiply those readings together. The result gives you the energy, when multiplied by the length of time you assumed the samples were valid over essentially, the sample period. Integrate these readings over time and you accumulate the total energy. Hey Presto, its an electricity meter!

But! If you use a multiplexed ADC, you didnt take the voltage and the current readings at the same time. By pretending that you did, youve introduced a time delay between the voltage and the current sequences. This is equivalent to a small phase shift, which really messes up any calculation thats sensitive to the phase difference between voltage and current.

The error doesnt come from the sampling process itself, but from our choice of how to interpret and manipulate the sample values. Lets set up an example with four channels; much of this material is taken from a real project I architected for a super-precise electricity meter built with PSoC3. Lets refer to the four channels by the letters W through Z, and with sample number i written as W(i), and so on. With our ADC multiplexing round the four channels in order, its pretty clear that the sequence of data words straight out of that ADC goes like sequence {1} and arrives at rate 4Fs:

Our problems come when we take the simplistic approach of breaking this stream up into four separate streams in which we assume that samples with the same index can be treated as simultaneous, as in the set of sequences {2}, each now at rate Fs:

The standard way of breaking up sequence {1} is to stuff zeros into the locations where other channels are being sampled, to get four streams, sequences {3}. This is an example of interpolation:

These streams are all running at 4Fs, and they clearly dont line up any more. Its meaningless to do any arithmetic on values that are vertically aligned when written out as in {3}, i.e. happening at the same time. One of any pair is guaranteed to be zero, and therefore so is their product. Whats more, by taking the readings from each channel at Fs and producing an output stream that repeats at 4Fs, weve created images of the frequency spectrum of our signals, centred on multiples of Fs; see Figure 1, taken from the National Instruments website. This high frequency information wasnt present on our W~Z inputs originally. Havent we made things even worse now?

1 | 2 | 3 | 4 | 5 | 6 | 7 | Next page

Please login to post your comment - click here
Related News
Technical papers
Do you find reference designs help speed your design cycle?