What is undersampling and oversampling?

I know the topic of undersampling and oversampling is in debate among audiophiles. So today I will tell you about my experience with DSP. In Digital Signal Processing (DSP), the concepts of undersampling and oversampling are the two methods of ensuring the quality of data processing, analysis, and storage. it this article I will explain the basic concepts and key points and how to use them correctly.
non oversampling (NOS): Everything You Need to Know
Basic Concepts undersampling and oversampling
Sampling is the process of converting a continuous signal (such as a sound wave) into digital form by measuring its values at specific points in time. The frequency at which these measurements are taken is called the sampling rate and is expressed in Hertz (Hz).
What is Undersampling
Undersampling occurs when the sampling rate is below the Kotelnikov-Shannon sampling theorem. According to this theorem, to accurately reconstruct a signal after it has been sampled, the sampling frequency must be at least twice the maximum frequency of the original signal. This condition is also called the Nyquist frequency.
Difficulties with Kotelnikov-Shannon sampling theorem
Often the Kotelnikov theorem is taken too literally and elevated to the absolute. How many articles have I read from die-hard skeptics about the wonderful MP3 and CDDA formats and about crazy audiophiles who foist off their useless DVD-Audio and DSD on everyone? Of course, their main argument is the Kotelnikov theorem.
Let’s start with the fact that the Nyquist frequency is insufficient in practice to transmit an accurate waveform. Due to non-ideal conditions, noise and distortion inevitably appear as quantization noise when recording an audio signal, rounding noise when processing and playing it, and more. It is generally accepted that quantization noise cannot be less than half of the least significant quantization digit. This is because when quantizing an audio signal, rounding is done to the nearest digit, up or down. Rounding noise also cannot be less than half of the least significant digit, or, as it is also called, the quantization step. There is also the intrinsic noise of the ADC and DAC, but it is difficult to give an exact figure for them because they are affected by a large number of factors: a specific implementation, the number and quality of components, and even the environment. Intrinsic noise usually makes up several quantization digits.
It follows that the sampling frequency must be significantly higher than the Nyquist frequency to compensate for the losses during digitization and subsequent playback of the digital recording.
Consequences of undersampling:
Aliasing: When the sampling rate is too low, high-frequency components of the signal are “stacked” on top of low-frequency ones, distorting the original signal. This makes it impossible to restore the original signal. Loss of Information: Undersampling results in data loss, rendering signal processing useless in most practical applications.
Example: If you record audio at a maximum frequency of 10 kHz, the sample rate must be at least 20 kHz. If it is lower, for example, 12 kHz, aliasing will occur and the signal will be distorted.
What is Oversampling
Oversampling technology has been used since the days of multi-bit DACs to compensate for noise losses. The principle of oversampling is that intermediate samples are added to the existing discrete samples, which repeat the approximate waveform. The intermediate samples are either calculated using mathematical interpolation or filled with zero values and passed to a digital filter. Usually, both approaches are called interpolation, and the digital filter is called interpolating. The simplest method of interpolation is linear interpolation, and the simplest digital filter can be a low-pass filter.
Advantages of oversampling:
- Reducing Quantization Noise: Quantization is the process of rounding signal amplitude values to the nearest level. Oversampling reduces quantization errors.
- Antialiasing Filtering: High sampling rates make it easier to filter out high-frequency components, minimizing signal distortion.
- Improved Processing Quality: Oversampling is useful when applying digital effects such as equalization or compression.
Disadvantages of Oversampling:
Increased data volume: Oversampling requires more memory to store the signal.
Increased computational costs: Processing data at high sampling rates requires more powerful computing resources.
Example: In the audio industry, oversampling is used to record and process audio to ensure high quality. The CD format uses 44.1 kHz, but modern studios often work at 96 or 192 kHz to achieve greater detail.
Application in practice Optimal sampling rate:
For audio: 44.1 kHz is sufficient for CD audio playback, but 96 kHz is often used for professional audio. For video: Sampling rates depend on resolution and frame rate.
Antialiasing filters: Before sampling the signal, a low-pass filter must be applied to remove components above the Nyquist frequency.
Upsampling and resampling: Upsampling increases the sampling rate, which is useful in some audio filters. Resampling (resampling) is used to bring the signal to the required format.
Conclusion:
In my opinion, undersampling and oversampling are two opposing aspects of the signal conversion process. To avoid loss of quality and distortion, it is important to choose the correct sampling frequency, focusing on the characteristics of the source signal and the purpose of processing. Given modern technology, resampling has become a standard tool for improving the accuracy and quality of digital data processing. if you want to know more please let us know in the comment section below.