ADC oversampling

MrChips

Joined Oct 2, 2009
34,809
I said, ignore the input frequency so long as you are not violating the sampling theorem.
You select the sampling frequency, not the input frequency. In the example given, the sampling frequency is 256Hz. That is good enough for 0-2.4Hz biological signals. The oversampling ratio is 2.4576MHz / 256Hz = 9600. This is a ratio, not a frequency.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
I said, ignore the input frequency so long as you are not violating the sampling theorem.
You select the sampling frequency, not the input frequency. In the example given, the sampling frequency is 256Hz. That is good enough for 0-2.4Hz biological signals. The oversampling ratio is 2.4576MHz / 256Hz = 9600. This is a ratio, not a frequency.
Let's use the target signal frequency of 1000Hz. Nyquist theorem says the sampling must be at least 2000Hz. Is 2000Hz not the same as sampling frequency? If it is, then it must be related to the input frequency by Nyquist theorem which says that the sampling frequency must be twice than that of the input frequency.

In the example where the sampling frequency is 256Hz. But if my input frequency is 1000Hz. Then the Nyquist theorem is not obeyed with the sampling being 1/4 that of the input frequency resulting in aliasing. What is wrong with my analysis? Unless sampling frequency is not the same as Nyquist frequency?

Also what did the DSP actually do? What if there is no DSP? Many thanks!
 

MrChips

Joined Oct 2, 2009
34,809
The sampling frequency and the Nyquist frequency are not the same.
Also target frequency is not important.

Let us say that you want to measure EKG with typical range of 60-120 beats per minute, i.e. 1-2Hz.
This could be your target range but what is more important is the range of frequencies in the signal. The frequency bandwidth can be 0-250Hz. Hence you can set the Nyquist limit at 250Hz and the sampling rate at 500sps, i.e. sampling frequency is 500Hz or twice the Nyquist limit.

Conversely, the Nyquist frequency is one-half the sampling frequency.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
The sampling frequency and the Nyquist limit are not the same.
Also target frequency is not important.

Let us say that you want to measure EKG with typical range of 60-120 beats per minute, i.e. 1-2Hz.
This could be your target range but what is more important is the range of frequencies in the signal. The frequency bandwidth can be 0-250Hz. Hence you can set the Nyquist limit at 250Hz and the sampling rate at 500sps, i.e. sampling frequency is 500Hz or twice the Nyquist limit.
Ok. But the frequency bandwidth I aim is 0 to 2000 Hz (for EMG). Hence the Nyquist limit is 2000Hz and the sampling rate is 4000sps. ie. sampling frequency is 4000Hz or twice the Nyquist limit. But for the device with the 2.4576MHz ADC. Can it do a 4000Hz sampling frequency? How do you compute if a device can keep up with the Nyquist as you push the frequency bandwidth higher. For the 2.4576Mhz ADC mentioned. How do you compute the highest bandwidth reachable that can still satisfy the Nyquist supposed its maximum frequency bandwidth is up to 6600Hz?
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
If the sampling frequency is 2.4576MHz then the Nyquist limit is 1.2288MHz
Oh. That's very good. But what is the purpose of the DSP? in the example of 256Hz, why does it have to compute for oversampling of 9600Hz? Why not just say the sampling frequency is 2.4576Mhz and be done with it. Pls show computations in your answer so we can visualize it all in maths.

Also does the above mean if the frequency bandwidth of the input is 1.2288Mhz. It can still satisfy the Nyquist theorem if the sampling frequency is 2.4576Mhz? Is this a common sampling frequency of average ADCs? Thanks.
 

MrChips

Joined Oct 2, 2009
34,809
The ADC might have a maximum sampling frequency of 2.4576MHz. That does not mean that you are compelled to run it at that rate. If your Nyquist limit is 256Hz then your minimum sampling rate is 512sps. You may choose to oversample by 16, i.e. the sampling frequency is now 512 x 16 = 8192Hz. The DSP can now average over 16 samples. Instead of averaging every 16 samples, the DSP can perform a running 16-point average, i.e. it performs digital low pass filtering.

2.4576MHz is not a common sampling frequency.

There is no such thing as an average ADC. ADC vary in design, architecture, interface mechanism, number of bits, sampling rates, and of course, price. ADC sampling rates range from 1Hz to greater than 1GHz.

If you want to label a successive approximation ADC as average, then 12-bit, 2Msps is typical.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
The ADC might have a maximum sampling frequency of 2.4576MHz. That does not mean that you are compelled to run it at that rate. If your Nyquist limit is 256Hz then your minimum sampling rate is 512sps. You may choose to oversample by 16, i.e. the sampling frequency is now 512 x 16 = 8192Hz. The DSP can now average over 16 samples. Instead of averaging every 16 samples, the DSP can perform a running 16-point average, i.e. it performs digital low pass filtering.
What is the difference between "average over 16 samples." vs "averaging every 16 samples".? Pls give a figure so I can imagine. And what does it mean to "average", why do you have to average it? Any figure as illustration. Many thanks!

2.4576MHz is not a common sampling frequency.

There is no such thing as an average ADC. ADC vary in design, architecture, interface mechanism, number of bits, sampling rates, and of course, price. ADC sampling rates range from 1Hz to greater than 1GHz.

If you want to label a successive approximation ADC as average, then 12-bit, 2Msps is typical.
 

MrChips

Joined Oct 2, 2009
34,809
What is an average?

Take the sum of n points and divide the result by n. This is the average or arithmetic mean.
The average tends to smooth out fluctuations, i.e. higher frequency variations such as noise. If the noise is randomly distributed you can gain additional bits of resolution. Averaging is similar to a low pass filter.

"Averaging every 16 samples" would mean you take 16 samples and compute the average. Then you take the next 16 samples and form the average. Hence you end up with a data set that is reduced by a factor of 16.

"Average over 16 samples" or a "16-point moving average" means you drop the oldest 16th sample and add the most recent sample and then compute the average. Your new data set is the same size as the original.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
What is an average?

Take the sum of n points and divide the result by n. This is the average or arithmetic mean.
The average tends to smooth out fluctuations, i.e. higher frequency variations such as noise. If the noise is randomly distributed you can gain additional bits of resolution. Averaging is similar to a low pass filter.

"Averaging every 16 samples" would mean you take 16 samples and compute the average. Then you take the next 16 samples and form the average. Hence you end up with a data set that is reduced by a factor of 16.

"Average over 16 samples" or a "16-point moving average" means you drop the oldest 16th sample and add the most recent sample and then compute the average. Your new data set is the same size as the original.


Thanks. Also I noticed "oversampling rate" is not the same as "oversampling ratio". But in the following description, they used the word "oversampling rate of 9600" at the end. Instead they should have used the words "oversampling ratio of 9600", isn't it?

"Each of the 16 analog to digital converters operates at 2.4576 MHz. Oversampling 64 times yields the internal sampling rate of 38.400 Hz (per channel and for all channels!). In addition, a powerful floating point Digital Signal Processor performs oversampling and real-time filtering of the biosignal data (between 0 Hz – 2.400 Hz). Therefore, a typical sampling frequency of 256 Hz yields an oversampling rate of 9.600.".

You wrote earlier "You select the sampling frequency, not the input frequency. In the example given, the sampling frequency is 256Hz. That is good enough for 0-2.4Hz biological signals. The oversampling ratio is 2.4576MHz / 256Hz = 9600. This is a ratio, not a frequency."
 

MrChips

Joined Oct 2, 2009
34,809
Back in post #9 you wrote 60Hz x 1024sps = 61440 Hz.
This is dimensionally incorrect.
The unit of Hz is \(s^{-1}\) and so is sps.
Hence the product would be \(s^{-2}\).

256Hz x 9600 = 2.4576MHz
Thus 9600 must be a unitless number and not a frequency.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
Just to clarify. In Europe. "." means ",". And "," means ".". So their 2.400 Hz is really 2,400Hz or 2400Hz.

When you said "You select the sampling frequency, not the input frequency. In the example given, the sampling frequency is 256Hz. That is good enough for 0-2.4Hz biological signals. The oversampling ratio is 2.4576MHz / 256Hz = 9600. ".

So were you aware the 2.4Hz is really 2400Hz? How can 256Hz be good enough for 2400Hz frequency bandwidth?

Thinking about it some more. Let's say you sampling a signal at 10 Gigahertz. And then only use sampling frequency of 256Hz. It can still cause aliasing because sampling at 10 Gigahertz is like the original image. What is important is really the real sampling frequency.
 

MrChips

Joined Oct 2, 2009
34,809
Just to clarify. In Europe. "." means ",". And "," means ".". So their 2.400 Hz is really 2,400Hz or 2400Hz.
Well that makes it very confusing.

The company gtec.at is in Austria.

Each of the 16 analog to digital converters operates at 2.4576 MHz. Oversampling 64 times yields the internal sampling rate of 38.400 Hz (per channel and for all channels!). In addition, a powerful floating point Digital Signal Processor performs oversampling and real-time filtering of the biosignal data (between 0 Hz – 2.400 Hz). Therefore, a typical sampling frequency of 256 Hz yields an oversampling rate of 9.600. This results in a very high signal to noise ratio, which is especially critical when recording evoked potentials (EP) in the EEG or identifying small amplitude changes in high-resolution ECG recordings. You are measuring far below the noise-range of conventional amplifiers.
Each of the 16 analog to digital converters operates at 2.4576 MHz. Oversampling 64 times yields the internal sampling rate of 38.400 Hz (per channel and for all channels!).
That implies that the internal sampling rate is 38400 Hz and each ADC operates at 2457600 Hz.

In addition, a powerful floating point Digital Signal Processor performs oversampling and real-time filtering of the biosignal data (between 0 Hz – 2.400 Hz).
This implies that the biosignal frequency range is 0-2400Hz.

Therefore, a typical sampling frequency of 256 Hz yields an oversampling rate of 9.600.
This means that while sampling at 2457600Hz, a sampling frequency of 256Hz represents oversampling by a factor of 9600. This would suggest that a sampling frequency of 256Hz is taken out of context and has nothing to do with a signal input of 0-2400Hz.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
Well that makes it very confusing.

The company gtec.at is in Austria.




That implies that the internal sampling rate is 38400 Hz and each ADC operates at 2457600 Hz.


This implies that the biosignal frequency range is 0-2400Hz.


This means that while sampling at 2457600Hz, a sampling frequency of 256Hz represents oversampling by a factor of 9600. This would suggest that a sampling frequency of 256Hz is taken out of context and has nothing to do with a signal input of 0-2400Hz.
Yes. That makes sense now. But for their 2.4576 Mhz figure. Shouldn't it be 2,4576 Mhz. or 2.4576 Ghz. Why didn't they not replace the "." with "," in "Each of the 16 analog to digital converters operates at 2.4576 MHz. Oversampling 64 times yields the internal sampling rate of 38.400 Hz (per channel and for all channels!)."?

Anyway. They are selling that product for $16000! Is it very expensive to create 16 channel ADC of that spec? Or is it common? In the Brainmaster Discovery. No oversampling is mentioned. I wonder what is its maximum frequency.

But then, it seems 2Mhz ADC is the norm now. And it is easy to oversample at the low frequency. Maybe the challenge is trying to sample signal at the Mhz? What ADC do you use to sample a signal that is say 3 Mhz? Are there GigaHertz ADCs?
 

MrChips

Joined Oct 2, 2009
34,809
2457600Hz is a convenient frequency and readily available quartz crystal. When divided by powers of 2 it gives standard baud values.

divisor => frequency
1 => 2457600Hz
2 => 1228800
4 => 614400
8 => 307200
16 => 153600
32 => 76800
64 => 38400
128 => 19200
256 => 9600
512 => 4800
1024 => 2400

Hence for 0-2400Hz biological signal range, one can sample at 2457600Hz, i.e. oversample by a factor of 512 to gain extra bits of resolution.
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
2457600Hz is a convenient frequency and readily available quartz crystal. When divided by powers of 2 it gives standard baud values.

divisor => frequency
1 => 2457600Hz
2 => 1228800
4 => 614400
8 => 307200
16 => 153600
32 => 76800
64 => 38400
128 => 19200
256 => 9600
512 => 4800
1024 => 2400

Hence for 0-2400Hz biological signal range, one can sample at 2457600Hz, i.e. oversample by a factor of 512 to gain extra bits of resolution.
sampling frequency usbamp.JPG


The above are the sampling frequencies that can be selected. So for biological signal of 0 to 2400Hz. I can choose 4800Hz but then even if the sample was first sampled at 2.4576Mhz and then 4800Hz. Wouldn't it act like it's just been sampled at 4800Hz which is the final sample frequency? What is the relevance of the 2.4576Mhz or oversample rate of 1200 when the end result is still 4800Hz?
 

Thread Starter

Gpand

Joined Dec 11, 2023
105
What is an average?

Take the sum of n points and divide the result by n. This is the average or arithmetic mean.
The average tends to smooth out fluctuations, i.e. higher frequency variations such as noise. If the noise is randomly distributed you can gain additional bits of resolution. Averaging is similar to a low pass filter.

"Averaging every 16 samples" would mean you take 16 samples and compute the average. Then you take the next 16 samples and form the average. Hence you end up with a data set that is reduced by a factor of 16.

"Average over 16 samples" or a "16-point moving average" means you drop the oldest 16th sample and add the most recent sample and then compute the average. Your new data set is the same size as the original.

I've been reading and analyzing all your messages. Many thanks for them. I'm also reading about oversampling and averaging.

ADC Oversampling to Decrease Noise and Increase Resolution - Phipps Electronics

oversampling and averaging.jpg
In the case of the 4800Hz sampling frequency for signal bandwidth of 0 to 2400Hz. For 2.4576Mhz. Oversampling rate is 2.4576Mhz/4800Hz = 512.

Does it mean the DSP runs the 4800Hz 512 times a second or does it run it one time only for 2.4576 Mhz sampling frequency? I'm trying to grasp your ideas.

The ADC might have a maximum sampling frequency of 2.4576MHz. That does not mean that you are compelled to run it at that rate. If your Nyquist limit is 256Hz then your minimum sampling rate is 512sps. You may choose to oversample by 16, i.e. the sampling frequency is now 512 x 16 = 8192Hz. The DSP can now average over 16 samples. Instead of averaging every 16 samples, the DSP can perform a running 16-point average, i.e. it performs digital low pass filtering.
I'm trying to compute in excel and visualize in graph your statements of the difference between "average over 16 samples." vs "averaging every 16 samples". Know any site that clearly illustrates these?

In the case where the ADC is only 512Hz and no oversampling of 16X to become 8192Hz. Where did your "averaging every 16 samples come from? Did you mean the DSP can choose either the algorithm of "average over 16 samples." vs "averaging every 16 samples". Or did you mean in the latter the ADC will acquire 512Hz every second 16 times or 16 seconds vs 512Hz in 1 second?
 
Top