# Oversampling

In signal processing, oversampling is the process of sampling a signal with a sampling frequency significantly higher than twice the bandwidth or highest frequency of the signal being sampled. Oversampling helps avoid aliasing, improves resolution and reduces noise.

## Oversampling factor

An oversampled signal is said to be oversampled by a factor of β, defined as

$\beta \ \stackrel{\mathrm{def}}{=}\ \frac{f_s}{2 B} \,\!$

or

$f_s = 2 \beta B \,\!$.

where:

• fs is the sampling frequency
• B is the bandwidth or highest frequency of the signal; the Nyquist rate is 2B.

## Motivation

There are three main reasons for performing oversampling:

### Anti-aliasing

Oversampling can make it easier to realize analog anti-aliasing filters. Without oversampling, it is very difficult to implement filters with the sharp cutoff necessary to maximize use of the available bandwidth without exceeding the Nyquist limit. By increasing the bandwidth of the sampled signal, design constraints for the anti-aliasing filter may be relaxed.[1] Once sampled, the signal can be digitally filtered and downsampled to the desired sampling frequency. In modern integrated circuit technology, digital filters are easier to implement than comparable analog filters.

### Resolution

In practice, oversampling is implemented in order to achieve cheaper higher-resolution A/D and D/A conversion. For instance, to implement a 24-bit converter, it is sufficient to use a 20-bit converter that can run at 256 times the target sampling rate. Combining 256 consecutive 20-bit samples can increase the signal-to-noise ratio by a factor of 16 (the square root of the number of samples averaged), adding 4 bits to the resolution, producing a single sample with 24-bit resolution.

The number of samples required to get $n$ bits of additional data precision is:

$\text{NumSamples} = (2^n)^2 = 2^{2n}$

The sum of $2^{2n}$ samples is divided by $2^n$ to get the mean sample scaled up to an integer with $n$ additional bits:

$\text{result} = \frac{\text{sum(Data)}}{2^n}$

Note that this averaging is possible only if the signal contains perfect equally distributed noise which is enough to be measured by the A/D converter. If not, all $2^n$ samples will have the same value, the average will be identical to this value, and the oversampling will have no effect, so the conversion result will be as inaccurate as if it had been measured by the low-resolution core A/D. This is an interesting counter-intuitive example where adding some dithering noise can improve the results instead of degrading them.

### Noise

If multiple samples are taken of the same quantity with uncorrelated noise added to each sample, then averaging N samples reduces the noise power by a factor of 1/N.[2] If, for example, we oversample by a factor of 4, the signal-to-noise ratio in terms of power improves by factor of 4 which corresponds to a factor of 2 improvement in terms of voltage.

Certain kinds of A/D converters known as delta-sigma converters produce disproportionately more quantization noise in the upper portion of their output spectrum. By running these converters at some multiple of the target sampling rate, and low-pass filtering the oversampled down to half the target sampling rate, it is possible to obtain a result with less noise than the average over the entire band of the converter. Delta-sigma converters use a technique called noise shaping to move the quantization noise to the higher frequencies.

## Example

For example, consider a signal with a bandwidth or highest frequency of B = 100 Hz. The sampling theorem states that sampling frequency would have to be greater than 200 Hz. Sampling at 200 Hz would result in β = 1. Sampling at four times that rate (β = 4) requires a sampling frequency of 800 Hz. This gives the anti-aliasing filter a transition band of 300 Hz ((fs/2) − B = (800 Hz/2) − 100 Hz = 300 Hz) instead of 0 Hz if the sampling frequency was 200 Hz.

Achieving an anti-aliasing filter with 0 Hz transition band is unrealistic whereas an anti-aliasing filter with a transition band of 300 Hz is not difficult to create.

After being sampled at 800 Hz, the signal (ostensibly with a bandwidth of 400 Hz) could be digitally filtered to have a bandwidth of 100 Hz and then downsampled to a 200 Hz sample frequency without aliasing.

## References

1. Nauman Uppal (2004-08-30). Upsampling vs. Oversampling for Digital Audio. Retrieved 2012-10-06. "Without increasing the sample rate, we would need to design a very sharp filter that would have to cutoff at just past 20kHz and be 80-100dB down at 22kHz. Such a filter is not only very difficult and expensive to implement, but may sacrifice some of the audible spectrum in its rolloff."
• John Watkinson, The Art of Digital Audio, ISBN 0-240-51320-7
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 9, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9083312749862671, "perplexity_flag": "middle"}