Understanding Oversampling: A quick Guide

Oversampling

Skip to 02:12 Oversampling Explained

A Quick Primer on Sampling Theory

The signals we use in the real world, such as our voices, are called “analog” signals.  To process these signals in computers, we need to convert the signals to “digital” form.  While an analog signal is continuous in both time and amplitude, a digital signal is discrete in both time and amplitude.  To convert a signal from continuous time to discrete time, a process called sampling is used.  The value of the signal is measured at certain intervals in time. Each measurement is referred to as a sample. 

When the continuous analog signal is sampled at a frequency F, the resulting discrete signal has more frequency components than did the analog signal.  To be precise, the frequency components of the analog signal are repeated at the sample rate.  That is, in the discrete frequency response they are seen at their original position, and are also seen centered around +/- F, and around +/- 2F, etc.

How many samples are necessary to ensure we are preserving the information contained in the signal?  If the signal contains high frequency components, we will need to sample at a higher rate to avoid losing information that is in the signal.  In general, to preserve the full information in the signal, it is necessary to sample at twice the maximum frequency of the signal.  This is known as the Nyquist rate.  The Sampling Theorem states that a signal can be exactly reproduced if it is sampled at a frequency F, where F is greater than twice the maximum frequency in the signal.

What happens if we sample the signal at a frequency that is lower that the Nyquist rate?  When the signal is converted back into a continuous time signal, it will exhibit a phenomenon called aliasing.  Aliasing is the presence of unwanted components in the reconstructed signal.  These components were not present when the original signal was sampled.  In addition, some of the frequencies in the original signal may be lost in the reconstructed signal.  Aliasing occurs because signal frequencies can overlap if the sampling frequency is too low.  Frequencies “fold” around half the sampling frequency – which is why this frequency is often referred to as the folding frequency.

Sometimes the highest frequency components of a signal are simply noise, or do not contain useful information.  To prevent aliasing of these frequencies, we can filter out these components before sampling the signal.  Because we are filtering out high frequency components and letting lower frequency components through, this is known as low-pass filtering. 

Demonstration of Sampling

The original signal in the applet below is composed of three sinusoid functions, each with a different frequency and amplitude.  The example here has the frequencies 28 Hz, 84 Hz, and 140 Hz.  Use the filtering control to filter out the higher frequency components.  This filter is an ideal low-pass filter, meaning that it exactly preserves any frequencies below the cutoff frequency and completely attenuates any frequencies above the cutoff frequency. 

Notice that if you leave all the components in the original signal and select a low sampling frequency, aliasing will occur.  This aliasing will result in the reconstructed signal not matching the original signal.  However, you can try to limit the amount of aliasing by filtering out the higher frequencies in the signal.  Also important to note is that once you are sampling at a rate above the Nyquist rate, further increases in the sampling frequency do not improve the quality of the reconstructed signal.  This is true because of the ideal low-pass filter.  In real-world applications, sampling at higher frequencies results in better reconstructed signals.  However, higher sampling frequencies require faster converters and more storage.  Therefore, engineers must weigh the advantages and disadvantages in each application, and be aware of the tradeoffs involved. 

The importance of frequency domain plots in signal analysis cannot be understated.  The three plots on the right side of the demonstration are all Fourier transform plots.  It is easy to see the effects of changing the sampling frequency by looking at these transform plots.  As the sampling frequency decreases, the signal separation also decreases.  When the sampling frequency drops below the Nyquist rate, the frequencies will crossover and cause aliasing.

Experiment with the following applet in order to understand the effects of sampling and filtering.

What is Oversampling?
Oversampling is a common feature found in many plugins that increases the sampling rate of the processed signal by a fixed multiple, such as 2 or 4. For instance, if your session’s sampling rate is 48kHz, enabling 2x oversampling will elevate it to 96kHz. While oversampling enhances signal accuracy, it can be resource-intensive and impact CPU performance.

What Does Oversampling Do?
Oversampling addresses three potential signal distortions: aliasing, clipping, and quantization distortion. These distortions become noticeable during extensive processing or when pushing a processor to its limits. Firstly, oversampling reduces aliasing distortion by allowing the processor to handle higher frequencies. Secondly, it improves the encoding of signal amplitude, crucial in avoiding clipping distortion. Lastly, it refines quantization accuracy, reducing quantization distortion.

When Should I Use Oversampling?
Oversampling is beneficial in sessions with lower sampling rates that involve substantial processing. It is recommended for both mixing and mastering, especially when employing aggressive processing. For instance, when using a limiter and pushing the signal to 0dB, higher oversampling ensures more accurate signal encoding, reducing the risk of clipping distortion.

What is Aliasing Distortion?
Aliasing distortion arises when the signal fed into a processor exceeds the maximum frequency it can accurately represent, as determined by the sampling rate. This leads to unwanted harmonic and phase distortions. For example, with a 48kHz sampling rate, exceeding 24kHz may result in aliasing distortion, manifesting at 16kHz.

Do I Need to Worry About Aliasing Distortion?
Although most signals stay within the 20kHz range covered by a 44.1kHz sampling rate, aliasing can be a concern when processing high frequencies with distortion plugins. If distortion starts at 15kHz, generating harmonics, it can extend beyond the sampling rate range, causing aliasing. This is especially true with aggressive limiting and clipping in high frequencies.

Oversampling and Analog Emulation
For precise analog emulation, oversampling is essential to reduce aliasing. Despite its subtlety, aliasing can accumulate among multiple signals and processors, resulting in a digital, metallic, or brittle sound. Developers, especially those focusing on analog emulation, are increasingly incorporating oversampling into their plugins for a more authentic and less digital sound.

Does Oversampling Even Matter?
While oversampling may seem insignificant at first, it plays a crucial role in achieving clean mixes and masters by addressing various distortions. If you prioritize reducing clipping and aliasing distortion, along with minimizing quantization distortion, oversampling is highly recommended. Additionally, for accurate analog emulation without digital-sounding aliasing, oversampling proves valuable, especially at lower sampling rates like 44.1 or 48kHz.

Leave a Reply

Your email address will not be published. Required fields are marked *