• 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!

What is the point of upsampling?

Holmz

Major Contributor
Joined
Oct 3, 2021
Messages
2,025
Likes
1,246
Location
Australia
Oversampling means the Nyquist frequency is higher than the original Nyquist frequency.
Yes, if the signal bandwidth is less than the original Nyquist bandwidth, nothing new is added.
If one had a filter after the microphone, or in your former case a some RF filter, then they could over sample the signal in the first stage of the AD.
As the sample rate is higher than Nyquist says it needs to be.

I am not sure what this means. Upsampling converts a signal acquired at one rate to the same signal acquired at a higher rate. There are different ways to implement it.
I am sure I don't care; this whole thread seems to have turned into a big debate about nothing.
Well the title of the thread is “what is the point”.

People seem assionate about it there is some golden things that are going to pop out.
The only point of it is to service the DAC or DSP approach… and usually in a way that is easiest or makes for the cheapest set of hardware chips.

Would the end user care? And should they?
I cannot imagine why, biut people talk about silicon chips in a similar way as some people discuss the water that got turned into a Shiraz.

And the stupidest example of a 192ksample/sec file which has the music band limited to 22kHz.

Time resolution is important in some applications like radar, which is where my career started.

As I said earlier, plenty of experts to argue every point, and I am just not that interested. Sorry I stepped into this one.
That seems more interesting than upsampling.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
But that is due to the characteristics of the specific filter (IIR) you have applied - which is causing a phase shift between the two component freqencies.

Apply a linear phase filter, and you will retain the waveform.

The point though is that the sampled wafeform fully defines the original waveform in continuous time. You have to reconstruct that properly though to get it on the output of your DAC.
@DonH56 talked about waveshape and Nyquist is only about frequency.
Read what I originally posted. Others already mentioned about frequency so I don't have to repeat others' posts. My post was to point out that Nyquist doesn't define the phase of the filters. Monty's video used a linear phase FIR, other filters (IIR, non-linear phase FIR) are also correct if these filters use the same bandlimited frequency, but the shape of the filtered waveform will be different. Pay attention that I have no dispute about frequency, just the shape of the waveform.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Also, since people are quoting Wikipedia and other papers in previous posts:
The upper portion of the article is describing something resembles an ADC:
Oversampling can make it easier to realize analog anti-aliasing filters.[1] 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 sampling system, design constraints for the anti-aliasing filter may be relaxed.[2] Once sampled, the signal can be digitally filtered and downsampled to the desired sampling frequency. In modern integrated circuit technology, the digital filter associated with this downsampling is easier to implement than a comparable analog filter required by a non-oversampled system.
However, the lower portion describe something resembles an DAC:
The term oversampling is also used to denote a process used in the reconstruction phase of digital-to-analog conversion, in which an intermediate high sampling rate is used between the digital input and the analog output. Here, digital interpolation is used to add additional samples between recorded samples, thereby converting the data to a higher sample rate, a form of upsampling. When the resulting higher-rate samples are converted to analog, a less complex and less expensive analog reconstruction filter is required.
What I read in this thread is some members think oversampling is about the upper paragraph but some other members are thinking about the lower paragraph, and caused all the confusion.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,520
Likes
18,583
Location
Netherlands
My post was to point out that Nyquist doesn't define the phase of the filters.
If we talk about perfect reconstruction, we take into account frequency and phase. IIR filters simply cannot approximate a perfect reconstruction filter. FIR filters are a far better approximation, exactly because they can preserve both phase and frequency much better.
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,798
Likes
1,535
but the shape of the filtered waveform will be different. Pay attention that I have no dispute about frequency, just the shape of the waveform.
Different from what?
The shape of the waveform (and phases) will be the same as the original band limited signal.
Only the band limiting changes the waveform? but of cause it dose.

The sampling theorem introduces the concept of a sample rate that is sufficient for perfect fidelity for the class of functions that are band-limited to a given bandwidth, such that no actual information is lost in the sampling process.
But the Band limeted signal is all we have on the CD and this band-limited signal can be "perfectly*" reconstructed in continuous time with all phase and shape information preserved.
*not actually perfect since quantitation adds noise
 

Holmz

Major Contributor
Joined
Oct 3, 2021
Messages
2,025
Likes
1,246
Location
Australia


What I read in this thread is some members think oversampling is about the upper paragraph but some other members are thinking about the lower paragraph, and caused all the confusion.

Just leave upsampling out of It

One can over sample on the input.
or
One can upsample, which is also then “oversampled”

There is a relationship between the sample rate Nyquist theory… Sample rate is required to be >=2x the frequency to avoid aliasing.
one either samples at Nyquist (which accounts for the bandpass filter of 20kHz bleeding out towards 22.05kHz), or they sample much higher like 192kHz and we assume that they are capturing frequencies out towards 90kHz.
If they are band limiting the signal to 20kHz, and sampling at 192, they are over sampled.


What one does to make life easy might very well be to upsample, but that like worrying about the oven temp, and forgetting about eating the cake that came out of it.
Unless one is learning to bake, it should not affect how one perceives that the cake should taste.
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,798
Likes
1,535
Obviously a different shape from a linear phase FIR filtered waveform
You are not congaing enough information in your post to reconstruct the meaning...

"Different shape from a linear phase FIR filtered waveform"
At what point?
if you apply linear phase FIR to a waveform (and the output has no frequency content over fs/2) are we now calling this FIR filtered waveform the original?

Because if you sample this waveform and reconstruct it you get the exact same waveform

But If you think you have a magic waveshape (without Frequency content over 20khz) that would loose phase or shape information by sampling at 44,1Khz show it to us in a higher sample rate and we call it original.
I’m confident in the sampling theorem and that i can down and back ups Sample every signal without losing information* and reserving the original signal.

*maybe some added quantitation noise
 
Last edited:

tuga

Major Contributor
Joined
Feb 5, 2020
Messages
3,984
Likes
4,286
Location
Oxford, England
If we talk about perfect reconstruction, we take into account frequency and phase. IIR filters simply cannot approximate a perfect reconstruction filter. FIR filters are a far better approximation, exactly because they can preserve both phase and frequency much better.
When the perfect reconstruction filter is not achievable in the real world, what defines the best filter (which parameters) and is there one filter which surpasses the others in all parameters?
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
if you apply linear phase FIR to a waveform
Exactly this "if". You only know about it if you record the analog signal yourself, but often it is not the case for consumers. So while it is true that linear phase FIR can retain waveshape, without knowing how the analog signal is originally recorded, there is no way to know the phase will be same or not (compared to the analog waveform) during playback. For example, some studio interfaces default to minimum phase FIR to optimize latency.
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,798
Likes
1,535
When the perfect reconstruction filter is not achievable in the real world, what defines the best filter
Have you red the Wikipedia article about the sampling theorem?
We can't make a perfect circle in the real world but know how it looks and we can calculate Pi with arbitrary precision.
Same with the filter.
"A mathematically ideal way to interpolate the sequence involves the use of sinc functions."


there is no way to know the phase will be same or not (compared to the analog waveform)
It is just by definition.
The Original is what you get on the CD. (or hat ever media). Every (band limited) signal can be Reproduced lossless after quantization
What ever happens before quantization has nothing to do with Nyquist–Shannon sampling theorem.

Microphones ,EQ, compression and all sorts of effects in the studio can cause Phases shifts. But this has nothing todo with it.

Can you Provide any band limited "analog waveform" sample that would loose phase information from quantitation?
 

antcollinet

Master Contributor
Forum Donor
Joined
Sep 4, 2021
Messages
7,966
Likes
13,517
Location
UK/Cheshire
Read what I originally posted. Others already mentioned about frequency so I don't have to repeat others' posts. My post was to point out that Nyquist doesn't define the phase of the filters. Monty's video used a linear phase FIR, other filters (IIR, non-linear phase FIR) are also correct if these filters use the same bandlimited frequency, but the shape of the filtered waveform will be different. Pay attention that I have no dispute about frequency, just the shape of the waveform.
The SHAPE of the waveform is also fully represented in the samples. As long as the reconstruction filter doesn’t have a frequency dependant time shift (as a linear phase filter does not) then the shape of the waveform will also be perfectly reproduced on the output of the filter. It is not only about frequencies.

Of course. You can choose a non linear phase filter and distort the shape if you wish. Not sure why you would though if you believe the shape distortion to be an issue.
 

tuga

Major Contributor
Joined
Feb 5, 2020
Messages
3,984
Likes
4,286
Location
Oxford, England
Have you red the Wikipedia article about the sampling theorem?
We can't make a perfect circle in the real world but know how it looks and we can calculate Pi with arbitrary precision.
Same with the filter.
"A mathematically ideal way to interpolate the sequence involves the use of sinc functions."

I was talking about performance: which real-world (not theoretical) filter is technically the best performing over all or most parameters?
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,520
Likes
18,583
Location
Netherlands
I was talking about performance: which real-world (not theoretical) filter is technically the best performing over all or most parameters?
The best one is the one that is the most brickwall:
- phase linear
- highest stopband attenuation
- largest passband bandwidth
- lowest passband ripple
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Microphones ,EQ, compression and all sorts of effects in the studio can cause Phases shifts. But this has nothing todo with it.
But for ADCs or resamplers (for downsampling) there are obviously choices about linear phase and non-linear phase filters, and consumers don't know about what settings were used.

Exactly this "if". You only know about it if you record the analog signal yourself
The Original is what you get on the CD. (or hat ever media).
Read this:
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,520
Likes
18,583
Location
Netherlands
But for ADCs or resamplers (for downsampling) there are obviously choices about linear phase and non-linear phase filters, and consumers don't know about what settings were used.
Let’s call it artistic freedom :). You can’t influence any of this. Fact remains that whatever was digitally captured has only one single correct output.
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,798
Likes
1,535
which real-world (not theoretical) filter is technically the best performing over all or most parameters?
The Filters are performed mathematical in the digital world you can chose how good you want it to be.
like (on your pc) you can choose how exact you want to know the circumference of a circle. but you can never know it to the last digit.

Or you can do it on your pocket calculator, it will only uses a view digits of Pi for the calculation but the result is "closes enough".
This is like letting your DAC do it with very limited computation power and time. it gets a "closes enough" result. but it’s never perfect and it will never be.

and consumers don't know about what settings were used.
If consumer mess up there setup because they don’t know how to uses there Equipment...
this changes nothing on the fact that a bandlimited signal can be perfectly reconstructed (yes with all phases information) after quantitation.
(If you don’t think so show us a example waveform)

If you apply filters to it before quantitation you change the original signal and maybe its phases. (so don’t do this...)
If you apply the wrong Filter after quantitation you may change the reconstructed signal or its phase. (so don’t do this...)
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,948
Likes
16,814
Location
Monument, CO
No, it isn't. This is the whole point of shannon/nyquist. If the sampled signal is band limited to <1/2 sample rate, then the samples fully define the signal - it can be perfectly reconstructed (except for the added quantisation noise). It is possible to do this in the digital domain, then resample that reconstructed waveform at any arbitrary sample rate you like.
I said nothing about Nyquist in my comment, that was for a general signal, no bandlimiting assumed. This one is on me; I got lost in all the verbiage and conflated things. One of my last design tasks was for an RF (microwave) system using bandpass ADCs and DACs, so the signal was aliased/imaged to baseband for processing and could be in any one of numerous Nyquist bands. Nyquist applies to signal bandwidth, not just DC to Fs/2, so if you are pulling from a high-frequency band there are multiple choices. We depended upon analog bandpass filters and some fancy processing involving multiple converters to determine which Nyquist band was correct. Tripped up by my own experience, which is broader than the baseband converters used in audio.

This was my comment:
One comment: A signal's waveshape is unknown so filling in the points between samples is a guess. Hopefully a good one. You can easily sketch out different waveshapes that will have the same sampling points. You can only mathematically define it if you know it. You are welcome to redefine upsampling and oversampling as you wish, no point in me trying to do it for you from various standards.

As for the rest, this still seems like a tempest in a teapot to me, and I shall try to stay out of it.

Enjoy - Don
 
Top Bottom