• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

How does "up-sampling" differ from "over-sampling"?

wgscott

Active Member
Joined
Mar 1, 2016
Messages
179
Likes
37
How does "up-sampling" differ from "over-sampling"?

I thought the two terms were synonymous, but others have told me this is wrong.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,878
Likes
16,652
Location
Monument, CO
Handwaving follows.

The Nyquist criteria says you must sample >2x the highest signal frequency (the Nyquist frequency) to be able to reconstruct the signal. Oversampling is sampling at more than that, typically at least a factor of two or more. For example, if we assume the highest signal frequency is 20 kHz, then the CD sampling rate of 44.1 kS/s meets the Nyquist criteria and allows capture of signal up to (but not including) 22.05 kHz. 88.2 kS/s is oversampled by a factor of two, and so forth.

Oversampling provides margin for the filters needed to band-limit the signal and you can improve the signal-to-noise ratio (SNR). By doubling (or more) the sampling rate, quantization noise (the noise generated when you convert from analog to digital samples) is spread over a larger frequency range. The noise is determined by the number of conversion bits, so if you keep the number of bits and the frequency bandwidth the same, you gain 3 dB in SNR by filtering out half the noise (that is, the noise above Nyquist, say above 20 kHz).

Delta-sigma and other data converters take advantage of oversampling by using high oversampling ratios, noise shaping that "pushes" the conversion noise past (higher than) the signal band, and then using high-order filters to reduce the noise to achieve much higher in-band SNR.

Upsampling takes data sampled at one rate and samples it (the same data) again (resamples) at a higher rate. You can theoretically gain SNR as in oversampling, but you must somehow "fill-in" or generate new signal samples between the actual samples. If the samples you have are 1 and 3, then if you upsample by two an interpolation algorithm can generate a new intermediate sample of 2. The catch is the algorithm cannot know exactly what the original signal was like before it was sampled, so the prediction (interpolated sample) may be wrong. How to design an optimal interpolation filter is the topic of many classes, texts, and proprietary algorithms.

HTH - Don
 
Last edited:

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
...you must somehow "fill-in" or generate new signal samples between the actual samples. If the samples you have are 1 and 3, then if you upsample by two an interpolation algorithm can generate a new intermediate sample of 2. The catch is the algorithm cannot know exactly what the original signal was like before it was sampled, so the prediction (interpolated sample) may be wrong. How to design an optimal interpolation filter is the topic of many classes, texts, and proprietary algorithms.
How does this differ from what a brick wall reconstruction filter does already? If the input is correctly band limited then the reconstruction filter interpolates perfectly (within real world tolerances). Doesn't the algorithm, in fact, know exactly what the original sample was like before it was sampled?

If you wish to re-sample at a higher sample rate for some reason (compatibility with another system?), you only need to reproduce what a brick wall reconstruction filter does.
 

Jakob1863

Addicted to Fun and Learning
Joined
Jul 21, 2016
Messages
573
Likes
155
Location
Germany
@wgscott ,

as DonH56 already hinted it is mainly the ratio between the new and old sample rate that makes the difference. Historically the term "oversampling" as used by Philips, in their attempt to get the same good measured numbers from their first cd players as the japanese although Philips only had a 14 bit DA converter ic, means that the ratio is an even natural number like "2, 4, 8, 16 ...." (ratio by which the new sample rate is higher than the original one) while the term "upsampling" is used in cases where the new sample rate is higher but the ratio between new and old sample rate can be any number (within the constraints given by technology).

@Cosmik ,

mainly correct.
Mathematically correct is to used the term "interpolation" in the case we discuss in this thread because it means to derive a new data point _between_ two other data points that are already given, but it is a special case called "ideal interpolation" as theoretically the original signal - that was sampled - is perfectly described by this samples.

But in reality DonH56 is right, as the sampling process can´t sample in the needed ideal way so it isn´t perfect. Additionally there may still exist technological reasons, especially if upsampling has to be done in real time, that might lead to different results. The usually incorporated noise shaping brings further complexity in this process.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,878
Likes
16,652
Location
Monument, CO
How does this differ from what a brick wall reconstruction filter does already? If the input is correctly band limited then the reconstruction filter interpolates perfectly (within real world tolerances). Doesn't the algorithm, in fact, know exactly what the original sample was like before it was sampled?

If you wish to re-sample at a higher sample rate for some reason (compatibility with another system?), you only need to reproduce what a brick wall reconstruction filter does.

Interpolation between two known samples when there is no higher-frequency content possible (oversampling) is not in general the same as predictive interpolation applied when the sampling rate is raised (upsampling). Some use the term "extrapolation" when upsampling to indicate it is potentially adding signals that do not lie between the two original samples. (Two is to make it easier to see; it is in generally a number of samples before and after the current sample that are used to determine the new sample value.) When you oversample the input signal bandwidth does not change. When you upsample you open the door to adding frequency (and amplitude) content beyond what was in the original signal. That can lead to things like intersample clipping that has been discussed here (and elsewhere).

Upsampling can be performed without increasing the output bandwidth, of course.

Whenever you play a CD at higher than CD rate and resolution. Play it back at 24/96 and the algorithm may just zero out the lower bits or may try to fill them in based on what it thinks the signal would have been, and ditto for frequency content. Since Nyquist is 48 kHz instead of 22.05 kHz the algorithm may try to "add back" high-frequency content it predicts was lost in the original recording. You could (as you say) prevent (constrain) the algorithm, or add a filter to roll off the extra HF content, but that is not a general case IME/IMO/etc. Certainly I have read plenty of marketing talk about the advantages of upsampling your CDs into the latest greatest hi-rez format.
 

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
Interpolation between two known samples when there is no higher-frequency content possible (oversampling) is not in general the same as predictive interpolation applied when the sampling rate is raised (upsampling). Some use the term "extrapolation" when upsampling to indicate it is potentially adding signals that do not lie between the two original samples. (Two is to make it easier to see; it is in generally a number of samples before and after the current sample that are used to determine the new sample value.) When you oversample the input signal bandwidth does not change. When you upsample you open the door to adding frequency (and amplitude) content beyond what was in the original signal. That can lead to things like intersample clipping that has been discussed here (and elsewhere).

Upsampling can be performed without increasing the output bandwidth, of course.

Whenever you play a CD at higher than CD rate and resolution. Play it back at 24/96 and the algorithm may just zero out the lower bits or may try to fill them in based on what it thinks the signal would have been, and ditto for frequency content. Since Nyquist is 48 kHz instead of 22.05 kHz the algorithm may try to "add back" high-frequency content it predicts was lost in the original recording. You could (as you say) prevent (constrain) the algorithm, or add a filter to roll off the extra HF content, but that is not a general case IME/IMO/etc. Certainly I have read plenty of marketing talk about the advantages of upsampling your CDs into the latest greatest hi-rez format.
Ah, I didn't realise the intention was to fabricate information that isn't already there. This sounds more like the 'Aural Exciter' (TM).
An exciter (also called a harmonic exciter or aural exciter) is an audio signal processing technique used to enhance a signal by... harmonic synthesis of (usually) high frequency signals, and through the addition of subtle harmonic distortion.
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,586
Likes
239,410
Location
Seattle Area
The general goal with resampling/upsampling is to increase the sample rate while fully preserving the original signal. In other words, not adding distortion, rolling off the frequency response, adding ringing, etc. An ideal resampler then, doesn't add anything.

Attempting to add information while resampling is a different animal and is mostly done in images and sometimes video. Terms like "super-resolution" are used. While they can do remarkable things with hand picked content, they usually produce hideous artifacts in others.

There are some other approaches used in cameras and projectors to shift the sensor and sample again. Then combine the two to generate higher resolution images.
 
Top Bottom