I have been looking at SNR of quantisation noise and was impressed by an article titled: Taking the Mystery out of the Infamous Formula, "SNR = 6.02N + 1.76dB," and Why You Should Care by Walt Kester The article first derives the equation based on sine tone as: snr = 6.02n + 1.76 (n = bitwidth of ADC) Then it further adds a term for tone bandwidth: snr = 6.02n + 1.76 + 10log(Fs/(2*bw) it then talks about a term due to fft resolution as 10log(fft_resolution/2) What is not clear is the relation between above two log terms. In a second article the same author confirms what we all do when we measure SNR of an ADC using tone: we subtract the term 10log(fft_resolution/2) from fft noise floor to get ADC SNR. It seems to me there is overlap of above two log terms. More specifically my question is: is snr of tone = 6.02n + 1.76 or snr of tone 6.02n + 1.76 + 10log(Fs/(2*bw) if the current test practice agrees with snr = 6.02n + 1.76 then is the article wrong by adding bw term? Any reply appreciated Kadhiem
ADC SNR testing using tone
Started by ●August 1, 2012
Reply by ●August 1, 20122012-08-01
The first equation represents the snr over the bandwidth from dc to fs/2 and has nothing to do with frequency domain analysis. The 2nd equation is the ratio between the fft signal power and the average fft noise power you would find in a non-signal fft bin. It makes an assumption that the quantization noise is completely uncorrelated. It's not the true snr. If the fft noise bins do not show any obvious spectral components you can eyeball the fft floor and add the correction factor and get an approximate true snr. The assumption that the noise is uncorrelated is dangerous so be careful about this. Note one mistake people often make is to calculate the integrated noise floor by averaging the abs of each fft bin. This is not correct, you need to add the powers not the magnitudes. Note that if you use a window things are slightly more complicated as the signal power is spread over a few bins. The correct way to deal with this is to add the power of the signal bins together and call this this signal power, and then add the power of the noise bins together and call that the noise power. There is a small error in doing this because there is some noise power in the signal bins that you are excluding, but if the fft is large this is a very small error. A really good way to get accurate snr for short time records is to use a sine wave curve fit algorithm. This is well covered in the literature. Bob
Reply by ●August 1, 20122012-08-01
>The first equation represents the snr over the bandwidth from dc to fs/2an=>d has nothing to do with frequency domain analysis. > >The 2nd equation is the ratio between the fft signal power and the average=>fft noise power you would find in a non-signal fft bin. It makes anassumpt=>ion that the quantization noise is completely uncorrelated. It's not thetr=>ue snr. If the fft noise bins do not show any obvious spectral componentsy=>ou can eyeball the fft floor and add the correction factor and get anappro=>ximate true snr. The assumption that the noise is uncorrelated isdangerous=> so be careful about this. =20 > >Note one mistake people often make is to calculate the integrated noiseflo=>or by averaging the abs of each fft bin. This is not correct, you need toa=>dd the powers not the magnitudes. > >Note that if you use a window things are slightly more complicated as thes=>ignal power is spread over a few bins. The correct way to deal with thisis=> to add the power of the signal bins together and call this this signalpow=>er, and then add the power of the noise bins together and call that thenoi=>se power. There is a small error in doing this because there is some noise=>power in the signal bins that you are excluding, but if the fft is largeth=>is is a very small error. > >A really good way to get accurate snr for short time records is to use asi=>ne wave curve fit algorithm. This is well covered in the literature. > >Bob >Thanks for the reply. I don't have problems proving in the frequency analysis the formula of snr(fullscale tone) = 6.02n+1.76 and I can see the effect of fft resolution and bitwidth in action agreeing well with formula. However, my question was about bandwidth term, and its relation to fft term? Does it mean we include bandwidth term when we only are interested in the tone section of frequency domain? as this explains the bandwidth term effect but sounds strange to call it SNR. I have yet another observation: The effect of fft resolution is obvious with tone case but does not show for a bandlimited signal. Are the rules different then between tone and bandlimited signal Kadhiem
Reply by ●August 1, 20122012-08-01
On Wednesday, August 1, 2012 4:35:27 AM UTC-4, kaz wrote:> I have been looking at SNR of quantisation noise and was impressed by an > > article titled: > > Taking the Mystery out of the Infamous Formula, "SNR = 6.02N + 1.76dB," and > > Why You Should Care by Walt Kester > > > > The article first derives the equation based on sine tone as: > > snr = 6.02n + 1.76 (n = bitwidth of ADC) > > > > Then it further adds a term for tone bandwidth: > > snr = 6.02n + 1.76 + 10log(Fs/(2*bw) > > > > it then talks about a term due to fft resolution as > > 10log(fft_resolution/2) > > > > What is not clear is the relation between above two log terms. > > > > In a second article the same author confirms what we all do when we measure > > SNR of an ADC using tone: we subtract the term 10log(fft_resolution/2) from > > fft noise floor to get ADC SNR. > > > > It seems to me there is overlap of above two log terms. > > More specifically my question is: > > is snr of tone = 6.02n + 1.76 > > or snr of tone 6.02n + 1.76 + 10log(Fs/(2*bw) > > > > if the current test practice agrees with snr = 6.02n + 1.76 then is the > > article wrong by adding bw term? > > > > > > Any reply appreciated > > > > KadhiemNow that I actually looked at the article, I think I understand your question better :) If you have a signal that occupies a limited bandwidth, and outside this bandwidth you have ADC quantization noise, you can get a higher snr by applying a bandpass filter that passes the signal and rejects the bins that only contain noise. That following equation describes this improvement in SNR snr = 6.02n + 1.76 + 10log(Fs/(2*bw) The second equation 6.02n + 1.76 + 10log(fft_resolution/2) is the signal-to-noise ratio where you are measuring the noise in a single fft bin. This assumes the noise added to the desired signal is purely white. So if you are looking at an FFT output (actually hopefully you have power-averaged a bunch of FFT's together so that the noise part of the spectrum is pretty much a flat line), and you want to compute the ADC noise level, you can add 10log(fft_resolution/2) to the average FFT bin value to get the noise over the full bandwidth from 0 to fs/2. Bob
Reply by ●August 2, 20122012-08-02
>On Wednesday, August 1, 2012 4:35:27 AM UTC-4, kaz wrote: >> I have been looking at SNR of quantisation noise and was impressed byan>>=20 >> article titled: >>=20 >> Taking the Mystery out of the Infamous Formula, "SNR =3D 6.02N +1.76dB,"=> and >>=20 >> Why You Should Care by Walt Kester >>=20 >>=20 >>=20 >> The article first derives the equation based on sine tone as: >>=20 >> snr =3D 6.02n + 1.76 (n =3D bitwidth of ADC) >>=20 >>=20 >>=20 >> Then it further adds a term for tone bandwidth: >>=20 >> snr =3D 6.02n + 1.76 + 10log(Fs/(2*bw) >>=20 >>=20 >>=20 >> it then talks about a term due to fft resolution as >>=20 >> 10log(fft_resolution/2) >>=20 >>=20 >>=20 >> What is not clear is the relation between above two log terms. >>=20 >>=20 >>=20 >> In a second article the same author confirms what we all do when wemeasu=>re >>=20 >> SNR of an ADC using tone: we subtract the term 10log(fft_resolution/2)fr=>om >>=20 >> fft noise floor to get ADC SNR. >>=20 >>=20 >>=20 >> It seems to me there is overlap of above two log terms. >>=20 >> More specifically my question is: >>=20 >> is snr of tone =3D 6.02n + 1.76=20 >>=20 >> or snr of tone 6.02n + 1.76 + 10log(Fs/(2*bw) >>=20 >>=20 >>=20 >> if the current test practice agrees with snr =3D 6.02n + 1.76 then isthe>>=20 >> article wrong by adding bw term? >>=20 >>=20 >>=20 >>=20 >>=20 >> Any reply appreciated >>=20 >>=20 >>=20 >> Kadhiem > >Now that I actually looked at the article, I think I understand yourquesti=>on better :) >If you have a signal that occupies a limited bandwidth, and outside thisba=>ndwidth you have ADC quantization noise, you can get a higher snr byapplyi=>ng a bandpass filter that passes the signal and rejects the bins that only=>contain noise. That following equation describes this improvement in SNR > >snr =3D 6.02n + 1.76 + 10log(Fs/(2*bw) > >The second equation > > 6.02n + 1.76 + 10log(fft_resolution/2)=20 > >is the signal-to-noise ratio where you are measuring the noise in a single=>fft bin. This assumes the noise added to the desired signal is purelywhite=>. > >So if you are looking at an FFT output (actually hopefully you havepower-a=>veraged a bunch of FFT's together so that the noise part of the spectrumis=> pretty much a flat line), and you want to compute the ADC noise level,you=> can add 10log(fft_resolution/2) to the average FFT bin value to get theno=>ise over the full bandwidth from 0 to fs/2. > >Bob >Thanks Bob, The question that arises now is two fold: 1) Can we actually filter off quantisation noise. I thought we cannot because it is inherent in the digits. 2)the effect of sampling frequency at ADC on SNR is ignored in the original equation of 6.02n + 1.76 if we sample a tone at Fs and then at 2Fs wouldn't we expect 3dB increase of SNR. How do we fit that in the equation then. Is the term 10log(Fs/2bw) applicable here as well as the case of filtering? Kadhiem
Reply by ●August 2, 20122012-08-02
Hi,>> 2)the effect of sampling frequency at ADC on SNR is ignored in theoriginal equation of 6.02n + 1.76 you can read this equation as follows: For a full-scale sine wave signal, the predicted noise across the whole bandwidth is 6.02n+1.76 dB below the power of the full-scale sine wave. If you change the bandwidth, the noise spreads over a wider bandwidth, but its integrated power remains the same. Therefore, the bandwidth is not included in the equation. In the lab, do a least-squares fit of the test tone to the output signal and subtract it. What remains, is noise. If you use an integer number of cycles in your observation window, it's trivially done by FFT. The power of all other FFT bins combined should relate to the FFT bin of your test tone via 6.02n+1.76 (ideally).>> 1) Can we actually filter off quantisation noise. I thought we cannotbecause it is inherent in the digits. As above: Do a least-squares fit (i.e. via FFT) and subtract it (i.e. zero the test tone FFT bin and IFFT back to time domain). What remains is noise. There is a very small error here, as you'll disregard noise that happens to correlate with your signal. Use longer measurements (=> more FFT bins) to make the error arbitrarily small. Real-world ADCs are not exactly ideal quantizers. Expect "ballpark"-accuracy from the equation, not a match within a fraction of a dB. -markus
Reply by ●August 2, 20122012-08-02
If you double the sample rate and keep the same absolute bandwidth in hz, you gain 3 db. If you double the sample rate but include the entire frequency range from dc to fs/2, then there is no increase in snr. Bob
Reply by ●August 2, 20122012-08-02
>Hi, > >>> 2)the effect of sampling frequency at ADC on SNR is ignored in the >original equation of 6.02n + 1.76 > >you can read this equation as follows: >For a full-scale sine wave signal, the predicted noise across the whole >bandwidth is 6.02n+1.76 dB below the power of the full-scale sine wave. >If you change the bandwidth, the noise spreads over a wider bandwidth,but>its integrated power remains the same. Therefore, the bandwidth is not >included in the equation. >Hi markus, I don't think that is right. SNR is defined as ratio of mean powers so spreading of noise implies mean power will go down. There is this equation for oversampling effect on SNR: SNR(oversampling) = 10log(Fs_new/Fs) Thus it is relative. The thing that I try to understand in the context of a given tone how is oversampling defined. If my ADC speed is 100Msps and I used tone test; one tone at 1MHz, a second at 10MHz wouldn't I get same SNR? Kadhiem
Reply by ●August 2, 20122012-08-02
Hello, oversampling spreads the same, fixed quantization noise power of (6.02 + 1.76n dBc relative to a fullscale sine wave) over a wider bandwidth. Thus, the noise power density (and therefore the noise over a fixed observation bandwidth) reduces. But the total amount of noise, integrated over all frequencies, remains the same. Cheers Markus
Reply by ●August 2, 20122012-08-02
>Hello, > >oversampling spreads the same, fixed quantization noise power of (6.02 + >1.76n dBc relative to a fullscale sine wave) over a wider bandwidth. >Thus, the noise power density (and therefore the noise over a fixed >observation bandwidth) reduces. >But the total amount of noise, integrated over all frequencies, remainsthe>same. > >Cheers > >Markus >your statement is ok in terms of total power, yes but I was referring to SNR(Q). In fact I found one other article clearing up the issue but just: SNR(Q) = 6.02n + 1.76 + 10log(Fs_o/Fs) Fs : sampling frequency, Fs_o : oversampling frequency Thus it does include oversampling effect. However it does not define what is regarded as Fs or as Fs_o especially so with regard to a single tone test. Kadhiem






