Tech Guides

Upsampling and oversampling

Differences and requirements. What is upsampling? And oversampling? Are they the same thing? Are they really necessary?

In 1982, when Naranjito was the star in our country, Philips and Sony presented the audio "revolution" with the Compact Disc (CD). Sony's CDP-101 was the first CD-Audio player, with the promise of offering better sound than "analog" media. But things did not turn out that way. Ironically, the CDs of the time sounded noticeably worse than expected.

The solution that did improve the standard came with oversampling, and more recently we have been hearing about upsampling. Some claim that both are mathematically identical techniques, while others find in each solution a vaguely noticeable acoustic improvement.

Oversampling arose from the need to avoid a defect inherent to digital mathematics, although there are different types of oversampling with different results.

Upsampling, which seems to be fashionable in certain audiophile circles, although it is a very popular technique in professional audio, has reached home audio with the aim of improving the CD-Audio listening experience even further. But does it really improve anything? Are there differences between oversampling and upsampling? What is each of them?

The differences between upsampling and oversampling have become a topic of debate among enthusiasts (especially the most audiophile ones). Many others take on board these opinions and create their own premises, sometimes without the minimum technical basis needed to understand what is being discussed. Part of the purpose of this article is to clear up these initial doubts.

As we were saying, the arrival of CD-Audio (both disc and player) was supposed to offer enthusiasts a medium of sufficient quality to dispel the idea of continuing to rely on analog media, including vinyl and magnetic tape. Although from that moment on the conventional cassette tape could be abandoned, that was not the case in the most audiophile circles, which quickly detected one of the limitations inherent to digital-to-analog (D/A) conversion.



Nyquist



Digital audio is the numerical representation of the changes in pressure that generate "music" (or sound).

In analog terms, we can represent sound as a waveform. This waveform is used to generate the series of binary numbers that forms a digital stream. In this analog-to-digital (A/D) conversion, samples of the signal's amplitude are taken at regular intervals. Naturally, we need a sufficient number of these samples to preserve the original waveform in numerical form.

In 1928, Harry Nyquist formulated a theory that is still valid today: the sampling frequency (that is, how often we take one sample after another) must be more than twice the highest frequency of the input signal. Taking this theorem into account, and the fact that at the time a certain convergence was needed between the chosen sampling frequency and the video signal, the value of 44.1 kHz was adopted. This value is more than twice the maximum frequency of an "analog" audio signal: 20,000 Hz.

A sampling frequency of 44.1 kHz means that we take the value of the analog signal's amplitude 44,100 times per second. This value is converted into a digital numerical value (although we should say binary), and encoded and stored on a CD. The next step is to restore the original waveform from this data, that is, digital-to-analog conversion.



Imperfect mathematics



Theory, and therefore mathematics, is usually perfect on paper, but electronic reality is something else entirely. During D/A conversion a very annoying defect appears: "aliasing" frequencies, or image frequencies. This is the name we give to the frequencies generated during D/A conversion above the Nyquist limit, in our case above 22.05 kHz. Roughly speaking, we could say that they are an "image" of the signal we want to regenerate. This unwanted information (unwanted because it does not exist in the original signal) must be eliminated, and to do so it would be enough to use a low-pass filter that rejected all sound or frequencies above 20 kHz.

Herein lies the problem with the first generations of CD-Audio players. Although mathematically it is easy to say "remove everything above 20 kHz", in practice it becomes a real headache. The reason is that the filter used at the time (and most current ones) does not have a steep cutoff slope. The limited margin between the maximum frequency of the signal to be restored (20 kHz) and the starting frequency at which the images or "aliasing" are generated (22.05 kHz) is barely 2.05 kHz, very little. That is why the first players sounded either very metallic and cold or lacked part of the upper end of the frequency response.



OVERSAMPLING



Shortly after the CD appeared (1982), Philips introduced the first CD-Audio player with 4x oversampling. By around 1986, the vast majority of players were already using oversampling to avoid the defects of the low-pass filter. Today, oversampling can reach multiplication factors of 8x or even more. But what does oversampling do?

The most common interpretation is that it "reads" more samples of the digital signal to reconstruct the waveform more accurately. This, which we have long taken as valid, is not exactly the case.

In reality, oversampling is a process that begins just after the binary data has been extracted from a CD (obviously at 44.1 kHz and 16 bits). This data passes through a digital filter (the oversampling filter), whose function is to apply a mathematical interpolation process with the aim of adding more reading or sampling points between two known points on a curve. Rarely, if ever, do these new interpolation points correspond to the same points that would have been generated if we had sampled at a higher frequency. In fact, the differences between one oversampling circuit and another lie in the application of the mathematical formula, that is, in the decision of "where to place" the new points. Some circuits use psychoacoustic matrices based on Fourier models.

The main aim of oversampling is not to generate a curve more or less identical to the real or original one (in fact, that is impossible), but to shift the onset of the "aliasing" frequencies considerably. Doubling the sampling frequency moves the "aliasing" frequency further away. If before we had a separation of only 2.05 kHz, with 2x oversampling (doubling) the separation is just under 22 kHz, and so on.

With this new separation, it is no longer even necessary to use such precise low-pass filters; analog filters can even be used. One might think that the higher the oversampling factor (which will always be a multiple: 2, 4, 8, 32, etc.), the better, and that is true, but the design cost and the reliability demands also increase.

Oversampling circuits in a player may be found as a separate integrated circuit (IC), that is, without needing to be integrated into the D/A converter circuit itself, or implemented in a DSP (digital signal processor). Some of the best-known DSPs are Motorola's solutions. We can also find oversampling processors as external devices, which use the CD-Audio player as a transport (via an S/PDIF link at 44.1 kHz and 16 bits). The external processor usually finishes the job with a low-pass filter applied to the analog signal, that is, after D/A conversion. For some, the main problem with this solution is that the problems of jitter in digital transfer are added to the system.



UPSAMPLING



The upsampling process always takes place in the digital domain, but at a different point from oversampling. In fact, some manufacturers wrongly speak of "upsampling" when what they are doing is two separate oversampling processes (one 2x followed by another 2x), so in this case upsampling and oversampling mean the same thing.

Technically, we speak of upsampling when we change the original sampling frequency (so we still capture the digital data from the CD at 44.1 kHz/16 bits). The difference is that instead of a 2x (or similar) conversion, the conversion is made to a non-equivalent value; for example, from 44.1 kHz to 48 kHz or 192 kHz.

We normally find devices with upsampling to 192 kHz (48 kHz only makes sense in professional environments), which makes it possible to use D/A converters compatible with this sampling frequency. But upsampling is not capable of (or should not be) adding any additional information either.

One of the advantages cited by those in favor of upsampling (such as Thierry Heeb, founder of the Swiss company Anagram Technologies) is that "part of the difference lies in jitter". This defect, a timing problem that occurs during digital data transmission, is more evident, according to Heeb, when oversampling is used. Even so, there is no evidence that upsampling and oversampling significantly improve the original signal.