Content deleted Content added
merge |
Copying discussion from quantization noise article (now merged) to this talk page. |
||
Line 17:
See discussion at [[Talk:Quantization_noise#Don.27t_Merge]].
== Copying discussion from quantization noise article (now merged) to this talk page. ==
{{physics|class=|importance=}}
"The noise is additive and independent of the signal when the number of bits <math> Q </math> is greater than 4, that is, more than 16 digitizing levels, <math> L = 2^Q </math>."
:Why?
:Also, the letter L is used for both "load" and "number of levels" — [[User:Omegatron|Omegatron]] 14:07, August 30, 2005 (UTC)
== Derivation ==
Trying to find a derivation for the quantization noise power equations and subsequent SNR per bit resolution values. I can't find the type of derivation I am thinking of online. Some scribbled, incoherent notes from class (I was probably asleep, and can't find the source I copied them from):
<math>\sigma^2_{e_t} = </math>
{| class="wikitable" style="text-align: center;"
! !! [[Signed number representations|Signed magnitude]] !! [[Two's complement]]
|-
! [[Truncation]]
| <math>5 \cdot 2^{-2b} \over 24</math> || <math>2^{-2b} \over 12</math>
|-
! [[Rounding|Round-off]]
| <math>2^{-2b} \over 12</math> || <math>2^{-2b} \over 12</math>
|}
<math>\sigma^2_{e_t} = {5 \over 2} \sigma^2_{e_r}</math>
[[Least significant bit|LSB]]-1: <math>\sigma^2_{e_l} = {2^{-2b} \over 3}</math>
<math>\sigma^2_{e_l} = 4 \sigma^2_{e_r}</math>
----
Mean squared error or quantization noise
<math>{1 \over \Delta} \int_{-\Delta/2}^{\Delta/2} \epsilon^2\, d \epsilon = {1 \over \Delta} \left( {\epsilon^3 \over 3} \right) \Bigg|_{-\Delta/2}^{\Delta/2} = {1 \over \Delta} \left( {\Delta^3 \over 8 \cdot 3} + {\Delta^3 \over 8 \cdot 3} \right) = {\Delta^2 \over 12}</math>
with a note making sure I remember that it's ''not always'' Δ<sup>2</sup>/12. The external link I included shows a more thorough derivation of q<sup>2</sup>/12. — [[User:Omegatron|Omegatron]] 06:04, 17 October 2005 (UTC)
----
I keep forgetting that Google Print exists. [http://print.google.com/print?hl=en&id=OzpZ76CQcqYC&pg=PA154&lpg=PA154&dq=quantization+noise+12&prev=http://print.google.com/print%3Fhl%3Den%26ie%3DUTF-8%26q%3Dquantization%2Bnoise%2B12%26lr%3D%26sa%3DN%26start%3D10&sig=eoMbf_HCvKYNcljTzakWDZoxCWw ]
=== Thesis ===
I have previously derived the SNR formulas in my thesis. Sorry for the unconventional symbols, i use Q for LSB (in volts) and N for the number of resolution bits and m=2^N for the number of levels. umax and umin are the max and min voltage corresponding to the quantized interval of Q*m
The noise power is assumed to be uniform:
<math>P_\mathrm{noise}=\frac{1}{T}\int_{0}^{T}\left[(\frac{t}{T}-\frac{1}{2})Q\right]^{2}dt=2\int_{0}^{1/2}(tQ)^{2}dt=\frac{Q^{2}}{12}</math>
where Q is the quantization step (often called LSB):
<math>Q=\frac{u_\mathrm{max}-u_\mathrm{min}}{m}</math>
In the case of a uniformly distributed signal (ramped, triangle etc) the signal power is
<math>P_\mathrm{signal}^\mathrm{ramp}=\frac{1}{T}\int_{0}^{T}\left[(\frac{t}{T}-\frac{1}{2})(u_\mathrm{max}-u_\mathrm{min})\right]^{2}dt=\frac{(mQ)^{2}}{12}</math>
where i use m=2^N for the number of levels (does not have to be a power of two!). And thus the SNR
<math>\mathrm{SNR_{ramp}}=m^{2}=2^{2N}.</math>
In decibels this is
<math>\mathrm{SNR_{ramp}}[\textrm{dB}]=10\log_{10}(2^{2N})=2N\cdot10\log_{10}(2)=6.02N</math>
Next case: A sine wave test tone. This one has more power than the ramped, namely:
<math>P_\mathrm{signal}^\mathrm{sine}=\frac{1}{T}\int_{0}^{T}\left[\sin(2\pi\frac{t}{T})\frac{u_\mathrm{max}-u_\mathrm{min}}{2}\right]^{2}dt=\frac{(mQ)^{2}}{8}</math>
And the SNR becomes
<math>\mathrm{SNR_{sine}}=\frac{3}{2}m^{2}=\frac{3}{2}2^{2N}.</math>
in decibels:
<math>\mathrm{SNR_{sine}}[\textrm{dB}]=10\log_{10}(\frac{3}{2}2^{2N})=2N\cdot10\log_{10}(2)+10\log_{10}(3/2)=6.02N+1.76</math>
/ Johan [[User:Stigwall|Stigwall]]
:Wonderful. Thank you. — [[User:Omegatron|Omegatron]] 14:44, 6 December 2005 (UTC)
== Don't Merge ==
Quantisation error is not Quantisation noise - it's a complicated topic and worthy of several pages to make the distinctions needed, especially when weighting and dither are brought in. --[[User:Lindosland|Lindosland]] 16:18, 5 February 2006 (UTC)
: Well they're not even close to a page right now, so I figured the subjects were close enough to merge into one topic. — [[User:Omegatron|Omegatron]] 01:57, 13 March 2006 (UTC)
Since quantization noise is entirely caused by [[quantization error]], I'm in favor of merging.
How can you possibly describe quantization noise without first describing quantization error?
And if this article describes both, what is the purpose of another description of either one alone?
--[[User:68.0.120.35|68.0.120.35]] 01:05, 25 May 2007 (UTC)
:Quantization noise is a misnomer, and really just a model. Quantization noise should redirect to quantization error, and the article on quantization error should explain the "noise" model, under what conditions it is useful, etc.
== Error In Example? ==
I think there is a discrepancy in the formula for sawtooth SNR and the example given. The formula is approximated as 6.02 · n, where n=4 for 16 bit audio. However, the example provided comes up with the answer 6.02 · 16 = 96.3 dB, which is not in agreement with the formula.
[[User:One stinky bum|One stinky bum]] 01:35, 14 January 2007 (UTC)
== the right formula ==
Which of the following 4 formulas is the right way to calculate the quantization noise relative to a full-scale sinewave?
The "quantization noise" article currently gives the formulas
* 1 : <math>\mathrm{SNR_{ADC}} = 20 \log_{10}(2^Q) \approx 6.02 \cdot Q\ \mathrm{dB} </math>
* 2 : <math>\mathrm{SNR_{ADC}} = \left ( 1.761 + 6.02 \cdot Q \right )\ \mathrm{dB} </math>
(Are those 2 formulas contradictory?)
The article
[http://www.commsdesign.com/showArticle.jhtml;jsessionid=V1CZ1K5WY44RIQSNDLRCKHSCJUNN2JVN?articleID=196601604 "Creating the Digital World: Step One" ] by Rob Howald
gives a formula with one additional term
* 3 : SQNR (dB) = ( 6.02 N + 10 log [ f<sub>sample</sub>/ 2 f<sub>bandwidth</sub>] + 1.76 ) dB
(The formulas (2) and (3) would give the same answer in the case where f<sub>sample</sub> == 2 f<sub>bandwidth</sub>.)
Also, the [[SQNR]] page gives a formula that looks completely different:
* 4 : <math>SQNR|_{dB}=P_{x^\nu}+6\nu+4.8</math>
Which is the right way to calculate the quantization noise relative to a full-scale sinewave?
--[[User:68.0.120.35|68.0.120.35]] 01:05, 25 May 2007 (UTC)
|