Difference between revisions of "Oversampling"

From Helpful
Jump to: navigation, search
m (Oversampling output)
m (Oversampling input)
Line 4: Line 4:
  
 
==Oversampling input==
 
==Oversampling input==
'''Oversampling''', a.k.a. '''supersampling''', refers to fetching more samples than you need.
+
'''Oversampling''', a.k.a. '''supersampling''', refers to fetching more samples than you strictly need for a purpose, but ''can'' use for other reasons.
  
  
This usually implies you are using and ADC to give fewer but stabler samples than that it actually runs at.
+
For example, you might want 10 temperature samples per second, but actually sample 1000 times per second and average every 100, to get a slightly stabler output value.
  
 
<!--
 
<!--
(Note that modern ADCs often do this implicitly, by not running them at their highest capability{{verify}})
+
(Note that modern ADCs often do something like this internally
 
-->
 
-->
 +
  
 
This is useful for a few different but related reasons.
 
This is useful for a few different but related reasons.
 +
  
  
Line 39: Line 41:
 
And you have a choice of having an analog filter before the ADC,
 
And you have a choice of having an analog filter before the ADC,
 
or doing it by and ADC that does supersampling, because supersampling is itself much like a lowpass (TODO: {{verify}}, characterize how).
 
or doing it by and ADC that does supersampling, because supersampling is itself much like a lowpass (TODO: {{verify}}, characterize how).
 +
 +
 +
Note that this averaging is essentially (cheap) resampling.
 
-->
 
-->
 +
  
 
===Imitate higher resolution, and lower noise===
 
===Imitate higher resolution, and lower noise===
  
 
<!--
 
<!--
At the same time, supersampling often means you you get fewer samples,  
+
Supersampling often means you you get fewer samples,  
but with less (sampling and other) noise, and (depending on some detail) you can pretend it has more resolution,
+
but in many practical cases they contain less (sampling and other) noise,
or rather, it shift's the sensor's noise floor down a bit, so effectively gives a bit more dynamic range.
+
and (depending on some detail) you can pretend it has more resolution.
 +
 
 +
It's not so much increasing accuracy as suppressing the noise floor somewhat, so still effectively gives you about a bit more of dynamic range.
  
  
This comes at the cost of sampling speed, and it lowers the highest frequency we can detect/represent.
 
If that's a problem, get an ADC more tuned to your needs.
 
  
  
Line 84: Line 90:
 
** switched-capacitor ADC
 
** switched-capacitor ADC
 
** successive approximation ADC [http://en.wikipedia.org/wiki/Successive_approximation_ADC]
 
** successive approximation ADC [http://en.wikipedia.org/wiki/Successive_approximation_ADC]
 +
 +
 +
 +
 +
 +
Say the temperature sensor example above may output temperatures rounded to 5 degrees.
 +
 +
If you get 30 35 30 30 30, you ''might'' want it to report 31.
 +
 +
While this is '''not''' a five-fold boost in accuracy, it may still be a more representative average of what you've sampled.
 +
 +
 +
If the sensor only does very occasional sampling, this may actually increase accuracy as well. (The details to this are a little more interesting than you might think, though)
 +
 +
 
-->
 
-->
  
Line 91: Line 112:
  
 
* http://www.designnews.com/author.asp?doc_id=246011
 
* http://www.designnews.com/author.asp?doc_id=246011
 
 
  
 
==Oversampling output==
 
==Oversampling output==

Revision as of 13:21, 9 June 2019

Template:Audio and signal processing

These are primarily notes
It won't be complete in any sense.
It exists to contain fragments of useful information.
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Oversampling input

Oversampling, a.k.a. supersampling, refers to fetching more samples than you strictly need for a purpose, but can use for other reasons.


For example, you might want 10 temperature samples per second, but actually sample 1000 times per second and average every 100, to get a slightly stabler output value.


This is useful for a few different but related reasons.


Avoid aliasing, and/or easier input filtering

Imitate higher resolution, and lower noise

See also

Oversampling output

Oversampling PWM

Upsampling DAC