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

Time resolution of Redbook (16/44) PCM

Status
Not open for further replies.

charleski

Major Contributor
Joined
Dec 15, 2019
Messages
1,098
Likes
2,240
Location
Manchester UK
That might be very true ;)



I get that you can get steeper transients with a higher sample rate. But I find it a bit strange why that would be the only relevant measure? You cannot hear the higher components of the transient above 20 kHz anyway. So why would timing resolution only be relevant in transients?

Am I correct in assuming that the timing resolution of a digital system, measured in degrees of phase is constant over frequency?



Oh, I'm not worried at all, just want to understand where I'm wrong in my understanding.
I think the issue here is that the term 'timing resolution' is just not really very useful, and I think it's generating some confusion. Any timing error is going to produce a group delay, but what matters is that this is constant (i.e. the system is linear phase).

Let ω be the angular frequency (2πf). If we introduce a delay τ into a sine wave sin(ωt + θ), then the result is sin(ωt + θ - ωτ) where ωτ is the phase shift which is a linear function of angular frequency. If we want to find out the time resolution of the system, we want to know the maximum phase shift (i.e. phase error) that it will allow, which happens at the maximum frequency that the system can reproduce. Any phase errors at lower frequencies will have a correspondingly lower phase shift and can be ignored.
 
U

UKPI

Guest
So, how would the formula change when the effect of dithering is considered (with no noise shaping)? There is going to be added noise, but changes that are tens of decibels smaller than the magnitude of a LSB at a certain point of time are also recorded. Would this mean that digital audio with dither has theoretically infinite time resolution? (Yes. I know that this is certainly a dumb statement. But I learned that one of the best ways to get the right answer on the Internet is to post something wrong on purpose. ;) )
 

audio2design

Major Contributor
Joined
Nov 29, 2020
Messages
1,769
Likes
1,830
I think the issue here is that the term 'timing resolution' is just not really very useful, and I think it's generating some confusion. Any timing error is going to produce a group delay, but what matters is that this is constant (i.e. the system is linear phase).


That would not be error. That would be a constant. The actual error is a matter of SNR, which is a function of quantization noise, "regular" noise and jitter.
 

audio2design

Major Contributor
Joined
Nov 29, 2020
Messages
1,769
Likes
1,830
So, how would the formula change when the effect of dithering is considered (with no noise shaping)? There is going to be added noise, but changes that are tens of decibels smaller than the magnitude of a LSB at a certain point of time are also recorded. Would this mean that digital audio with dither has theoretically infinite time resolution? (Yes. I know that this is certainly a dumb statement. But I learned that one of the best ways to get the right answer on the Internet is to post something wrong on purpose. ;) )

To be honest, I don't know exactly the effect, but from a first principles standpoint, no there would not be infinite time resolution as that would imply infinite SNR or infinite bandwidth. When you increase SNR over a narrow frequency band, you also decrease the bandwidth, so I have a feeling that while not constant, the timing error would be bounded not too far from unshaped noise.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,891
Likes
16,696
Location
Monument, CO
From decades-ago design for an RF system, empirically adding about 1 lsb wideband dither allowed signal resolution of another few lsbs, slightly degraded the SNR, and slightly improved the effective timing errors. My vague memory is that the net improvement was around 1/2~1 bit. I think I improved things about 3 dB; 6 dB would be one bit in SNR, but SNR degraded about half a bit (3 dB) so I gained about half a bit. So maybe if you increased b by 1 in the equation it would approximate the improvement.

That was long ago, for a lower-resolution system, operating at much higher bandwidths than audio.

Chances are @j_j knows for sure. My design shifted to using narrowband dither that accomplished much the same improvement but without the SNR penalty in the signal band of interest, gaining about a full bit in performance.
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
I get all this. I get that a step response models the whole system, so in that sense, you could say that this dictates the timing resolution. So far I'm with you. But that still doesn't mean that I can encode a 1 kHz sine with the same phase resolution (in time) as a 10 kHz sine. Does it matter, probably not, but that is still correct, isn't it? Let's say we have a stereo track in a 16 bit system, both tracks contain a 1 kHz sine. Now on one of them we shift the sine by 300ps. You cannot encode this difference. Now, do the same for a 10 kHz sine: you can encode that difference. Am I wrong here?



I'm not even sure what direction that is :facepalm:

When you shift the data by 300ps, how do you do that? Do you do it slowly (low bandwidth) or suddenly (wide bandwidth). The wide band behavior will create frequencies commensurate with the rate of change.

If you only have a narrowband signal (1k, 20k whatever) the point at which the change happens will not be detectable. If you do it quickly, it will be. Of course if you do it on a zero slope point, it will still be tiny, making it still "low bandwidth".

This is why bandwidth matters. You have to capture the change as well as the before and after.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,703
Location
Hampshire
Who wants to do an experiment? Suppose we have two signals, both consisting of a 1 kHz sine wave, the only difference being that one is shifted in time. The difference between these signals will then also be a 1 kHz sine save with phase and magnitude dependent on the amount of time shift. With a time difference of 300 ps, the difference signal is a pure tone at about -114 dB:
1620817337423.png


If we round both signals to 16-bit precision (without dither) before calculating the difference, we get a very different result:
1620817360824.png


The difference is barely large enough to change the LSB of a few samples. The difference spectrum has components every 100 Hz, all around the same level. With this level of precision, all we can say is that something changed.

Adding TPDF dither before rounding to 16 bits gives a very different result:
1620817921023.png


Although, the waveform still bears little resemblance to a sine wave, the spectrum now shows a single spike of the correct frequency and amplitude. Compared to the reference, the only difference is the addition of uniform noise. It should be noted, however, that this spectrum was averaged over several seconds.

With a 10 kHz signal, keeping the 300 ps time shift, the difference is 10x larger in amplitude:
1620818979940.png


With rounding to 16 bits, the difference spectrum is still ugly, though now the 10 kHz component stands out from the rest at roughly the correct amplitude:
1620819172896.png


Once again, adding TPDF dither before rounding fixes things:
1620819531007.png


I'm not sure if this actually answers any of the questions posed above.
 

audio2design

Major Contributor
Joined
Nov 29, 2020
Messages
1,769
Likes
1,830
Whether it answers the question or not, it certainly poses new ones :) ...

Measurements are usually limited by a fraction of wavelength. If you think of ultrasonics, high frequencies are used because it yields higher resolution, and this is all time of arrival based, so it stands to reason that that same would apply to audio.

However, I think Shannon-Hartley is still going to apply, so we need to consider how both influence.

I do detect one flaw, but I am not sure the implications. You didn't detect a 300psec delay. You already knew it existed, and used that knowledge to create a difference signal. I am not sure that is true to the question we are discussing? Not only did you know the time difference, but you knew there was a 1KHz or 10KHz signal.


Lots more questions, but have to go to the day job now.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,703
Location
Hampshire
Whether it answers the question or not, it certainly poses new ones :) ...

Measurements are usually limited by a fraction of wavelength. If you think of ultrasonics, high frequencies are used because it yields higher resolution, and this is all time of arrival based, so it stands to reason that that same would apply to audio.

However, I think Shannon-Hartley is still going to apply, so we need to consider how both influence.

I do detect one flaw, but I am not sure the implications. You didn't detect a 300psec delay. You already knew it existed, and used that knowledge to create a difference signal. I am not sure that is true to the question we are discussing? Not only did you know the time difference, but you knew there was a 1KHz or 10KHz signal.

Lots more questions, but have to go to the day job now.
Feel free to suggest a different experiment.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,384
Likes
18,319
Location
Netherlands
Would be fun to use the same formula for DSD.
I'm not sure if this actually answers any of the questions posed above.

This is fantastic :cool: . It basically confirms what I’ve been saying. Obviously dither changes things a bit, which makes sense, since you virtually extend the dynamic range.
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
Would be fun to use the same formula for DSD.


This is fantastic :cool: . It basically confirms what I’ve been saying. Obviously dither changes things a bit, which makes sense, since you virtually extend the dynamic range.

Well, the problem is that the "same formula" does not apply to DSD. Its SNR at fs/2 is not very good at all.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,384
Likes
18,319
Location
Netherlands
Well, the problem is that the "same formula" does not apply to DSD. Its SNR at fs/2 is not very good at all.

That’s actually exactly what I was wondering about. If dithering changes things, it will also not work for DSD. So how do we approach the DSD question?
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
That’s actually exactly what I was wondering about. If dithering changes things, it will also not work for DSD. So how do we approach the DSD question?

Well, first you have to decide the bandwidth in question. Another reason one uses bandwidth. Sorry, but that's how.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,703
Location
Hampshire
That’s actually exactly what I was wondering about. If dithering changes things, it will also not work for DSD. So how do we approach the DSD question?
DSD has a dynamic range of about 120 dB in the audible range. That's what matters.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,384
Likes
18,319
Location
Netherlands
DSD has a dynamic range of about 120 dB in the audible range. That's what matters.

So about 20 bits. Less after about 10 kHz.


Well, first you have to decide the bandwidth in question. Another reason one uses bandwidth. Sorry, but that's how.

Well, if we look at impulse response, DSD certainly has the upper hand..
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
So about 20 bits. Less after about 10 kHz.




Well, if we look at impulse response, DSD certainly has the upper hand..


Again, you have to define the actual bandwidth you're looking at. An impulse response with a 1 MHz bandwidth is going to be sharper. But it may also be noisier. Not a simple problem to solve.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,384
Likes
18,319
Location
Netherlands
Again, you have to define the actual bandwidth you're looking at. An impulse response with a 1 MHz bandwidth is going to be sharper. But it may also be noisier. Not a simple problem to solve.

Indeed.. if it were simple I would not have to ask ;). Is bandwidth even enough, since dynamic range is not constant over frequency with DSD. And when looking at bandwidth.. is that up to where the signal dominates over noise? At that point dynamic range will be very small.
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
Indeed.. if it were simple I would not have to ask ;). Is bandwidth even enough, since dynamic range is not constant over frequency with DSD. And when looking at bandwidth.. is that up to where the signal dominates over noise? At that point dynamic range will be very small.


For your system, which is not technically limited in bandwidth in audio terms, you measure the noise at the chosen bandwidth, vs. the chosen bandwidth.
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,788
Location
My kitchen or my listening room.
Ok, here is a plot. I generated a frequency limited pulse of DC to the stated version, at a sampling rate of 64*48000.

Notice size and shape of plot at that sampling frequency vs. bandwidth.

impulses.jpg

NOW do you get it?
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,384
Likes
18,319
Location
Netherlands
No, not quite. What’s the x-axis? Microseconds? I get that you can make the plots, but how to “choose” the bandwidth? You obviously cannot arbitrarily do that. For PCM there is a clear limit dictated by sample rate, for DSD, it’s not so clear, or is it?
 
Status
Not open for further replies.
Top Bottom