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

Quantization Noise 101: Where does SNR about 6N dB come from?

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
This post attempts to explain where the SNR = 6N dB approximation comes from. ASR does not have the symbol font available, and after an hour or so of trying to fix things, I ended up just pasting the whole thing as an image. Sorry about that! I did attach a PDF of the original.

1689982212834.png

1689981323506.png
 

Attachments

  • Quantization Noise rev1.pdf
    195 KB · Views: 281
Last edited:

Curvature

Major Contributor
Joined
May 20, 2022
Messages
1,116
Likes
1,409
Could you explain why the error between two LSBs generates quantization noise?
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
Could you explain why the error between two LSBs generates quantization noise?
Say you have a signal that is 16 bits in amplitude, 2^16 = 65,536 different levels. A continuous analog signal has no steps at all (until the quantum level), but if you convert (quantize) that signal to sixteen bits, then you have 65,536 steps 1 unit (lsb) tall. Thinking of just one step going from 0 to 1, the analog signal can take on any value between 0 and 1, but when you convert it to a digital number you get 0 or 1 and nothing in between. The difference is the quantization (conversion) error. If the actual signal is 0.5, then you have an error of 0.5 between the real signal and what the converter says is the signal. For this example, the steps are all of value 1, so (0,1,2,3,4... 65,535). If the actual signal level is 3.141592654... (pi) then the error would be 0.141592654..., the difference to the nearest threshold (3). That error is (becomes) the quantization noise.

HTH - Don
 
Last edited:
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
Nice calculation, a bit lengthy but straightforward.
All my other derivations are longer and uglier, sorry... It took me long enough to type in this one, not used to equations in Word, then got blindsided because I couldn't copy and paste it here without losing the symbols.

I also have the derivation that yields the spurious-free dynamic range of ~9N but it is much more involved and I do not deem it worthwhile to try to explain here. Bessel functions and all that jazz...
 

Curvature

Major Contributor
Joined
May 20, 2022
Messages
1,116
Likes
1,409
Say you have a signal that is 16 bits in amplitude, 2^16 = 65,536 different levels. A continuous analog signal has no steps at all (until the quantum level), but if you convert (quantize) that signal to sixteen bits, then you have 65,536 steps 1 unit (lsb) tall. Thinking of just one step going from 0 to 1, the signal can take on any value between 0 and 1, but when you convert it to a digital number you get 0 or 1 and nothing in between. The difference is the quantization (conversion) error. If the actual signal is 0.5, then you have an error of 0.5 between the real signal and what the converter says is the signal. For this example, the steps are all of value 1, so (0,1,2,3,4... 65,535). If the actual signal level is 3.141592654... (pi) then the error would be 0.141592654..., the difference to the nearest threshold (3). That error is (becomes) the quantization noise.

HTH - Don
I don't fully understand the situation once I start asking myself more questions about real signal amplitudes, band limiting, sample rates and the work done by converters. I think I've reached the point that if I don't do the math for the whole path there's little to be gained from more description and the usual rules of thumb, like the one that motivated this thread, which are such crutches for laymen like me. If anything you've made me want school again.

Thanks very much.
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
I don't fully understand the situation once I start asking myself more questions about real signal amplitudes, band limiting, sample rates and the work done by converters. I think I've reached the point that if I don't do the math for the whole path there's little to be gained from more description and the usual rules of thumb, like the one that motivated this thread, which are such crutches for laymen like me. If anything you've made me want school again.

Thanks very much.
I suggest you follow the Technical Articles link in my signature and read about sampling and such. That may help understand this one.
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,678
Likes
241,092
Location
Seattle Area
On symbols, I am able to copy and past them from this site: https://coolsymbol.com/

= ∫

The issue is that you are using fancier rendering in Word, PDF, etc. which unfortunately requires a plug-in to render otherwise in a browser. Special export needs to be done on top of that for the renderer to understand it.

In the past, I have copied and pasted the text and for formulas, just grab a snapshot using snipping tool and paste only that part in as a picture.
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
On symbols, I am able to copy and past them from this site: https://coolsymbol.com/

= ∫

The issue is that you are using fancier rendering in Word, PDF, etc. which unfortunately requires a plug-in to render otherwise in a browser. Special export needs to be done on top of that for the renderer to understand it.

In the past, I have copied and pasted the text and for formulas, just grab a snapshot using snipping tool and paste only that part in as a picture.
The problem is that I had Greek symbols embedded throughout the text as well as in the equations so it was a lot to deal with. I did copy and convert all the equations to images in Word and pasted them in, but then still had Greek symbols interspersed throughout the text. I tried creating an image of just a Greek delta, for example, but never could get it to align and flow smoothly in the text. After wasting way too much time I just used Windows snip to create images of the pages I could just paste into the post. Lesson learned; I'll either avoid trying to create articles like this, or just copy and paste the sheets as images like I did this time.

I think you may be able to use special characters, but I don't have a program to automatically do the conversion, and ran out of time to pursue further. If/when I do this again I need to figure out a better solution.

All of which has nothing to do with quantization noise, sorry.
 

Doodski

Grand Contributor
Forum Donor
Joined
Dec 9, 2019
Messages
21,614
Likes
21,898
Location
Canada
I don't know what it means but great formatting, nice layout and everything is well done all around. :D
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
994
Likes
1,545
Could you explain why the error between two LSBs generates quantization noise?
I hope I won't muddy the waters further. Here we have a signal which is sampled but not quantized yet:
out1.png


Quantization will "pull" the samples' values to the nearest level:
out2.png


Intuitively it looks like degradation of our signal, but you can look at it as our original signal mixed-in with another signal - the quantization error/noise:
out3.png


(And yes, I didn't use dither here, sorry, but I think it's easier to see what is happening this way :) )
 

Billy Budapest

Major Contributor
Forum Donor
Joined
Oct 11, 2019
Messages
1,856
Likes
2,783
A continuous analog signal has no steps at all (until the quantum level),
Do you mean a wavelength that is equal to the Planck distance? (I am not very learned in quantum physics but it seems to me that the point where an analog signal would have steps rather than a continuous waveform would only be where the wavelength is as short as the Planck length, because any points between +/- the Planck length would not be measurable).
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
Do you mean a wavelength that is equal to the Planck distance? (I am not very learned in quantum physics but it seems to me that the point where an analog signal would have steps rather than a continuous waveform would only be where the wavelength is as short as the Planck length, because any points between +/- the Planck length would not be measurable).
I suppose but for real materials there are issues above that level. I don't want to go there in this thread; physicists already know that stuff so I'll let them explain it. My quantum mechanics and materials courses were long ago. This thread is all at the macro level where we consider analog "continuous" and digital "discrete", i.e. quantized in time and amplitude. For the SNR equation time drops out and we are left with just amplitude (and thus resolution, number of bits) determining the SNR.
 

Lunafag

Member
Joined
Apr 14, 2021
Messages
89
Likes
127
I thought undithered quantization produces distortion, not noise.
 

MaxwellsEq

Major Contributor
Joined
Aug 18, 2020
Messages
1,750
Likes
2,645
Malcolm Hawksford, is now Emeritus, but was a Professor at Essex University (UK) focusing on audio, used to write columns for UK HiFi magazines. He published a paper on "fuzzy noise" which might be of interest to you @DonH56 , although it's not specifically about digitisation quantisation noise/distortion. My brain is lazier now, but I did check it at the time, and the approach seemed reasonable.

The paper is chargeable on its own, but he published a bundle of his life's work for free, which includes the paper. The whole bundle makes for interesting reading!

Part of the premise is that as we approach vanishingly small signals, a new noise paradigm becomes significant, that he called popularised as "fuzzy noise". The paper has a question mark, so I don't know how confident he was that it existed, given how hard (impossible?) it might be to measure. But he argues that it would impose a finite limit on information transmission.

Malcom Hawksford "Fuzzy Distortion in Analog Amplifiers: A Limit to Information Transmission?"

If anyone has AES membership, here is some discussion

The complete amplifier bundle is here: Page 15 is the start of the Fuzzy Distortion paper
 

IAtaman

Major Contributor
Forum Donor
Joined
Mar 29, 2021
Messages
2,409
Likes
4,165
This post attempts to explain where the SNR = 6N dB approximation comes from. ASR does not have the symbol font available, and after an hour or so of trying to fix things, I ended up just pasting the whole thing as an image. Sorry about that! I did attach a PDF of the original.
Thanks for this. We are lucky to have you participating in this forum.

Here is a link where you can copy paste a lot of math symbols:

I hope I won't muddy the waters further. Here we have a signal which is sampled but not quantized yet:
On the contrary, I think this is a really good way of explaining quantization error. You know what they say, a picture speaks a thousand integrals :)

Although the images are very very good at explaining what quantization error is, they are a tiny bit inaccurate if I am not mistaken (not that you claimed they were 100% accurate). For example the sinusoidal that confirms to the samples around sample 40 would go over 1, and if the device can not go above 1, it would clip, if it can, the noise will be higher I think, no?. And around sample 120, the curve that passes through all the samples would have a high frequency component to it, and the quantization noise would be higher again, I think. Am I incorrect?


1690029700962.png
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
976
Likes
1,000
Location
Germany
Thanks for the pdf file. The equations are a bit too low res on the forum post. We really need a build in LaTeX editor on the forum :)
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,906
Likes
16,731
Location
Monument, CO
This article has a picture showing the signal and quantization error in the time domain at very low resolution (thus easy to see): https://www.audiosciencereview.com/forum/index.php?threads/digital-audio-sampling-101.1919/

Most of my articles present the information in the frequency domain (that seemed to be what most folk were interested in at the time). A couple of other members have done fairly detailed write-ups showing time-domain examples (I don't have them bookmarked, sorry). I have all sorts of time-domain examples but nothing written up for here (design reviews, other papers, etc.)
 
Top Bottom