9

I'm working through the example on this page: http://chimera.labs.oreilly.com/books/1234000001552/ch03.html

I totally understand why the maximum level of an audio system would be 0 because the log of 1 is 0.

However, I'm confused about the minimum. The definition of dBFS is

dBFS = 20 * log( [sample level] / [max level] )

In a 16 bit system there are 2^16 = 65536 values. So this means values from -32768 to +32767. Excluding 0, let's say the minimum value is 1. So plugging this into the formula gives:

dBFS = 20 * log( 1 / 32767 ) = -90.3

But the book is saying it should be -96dBFS. Where am I going wrong?

Aptary
  • 93
  • 1
  • 4

4 Answers4

8

You have used \$\dfrac{1}{32767}\$ and this is the peak signal level. The peak to peak signal level is therefore 2 LSBp-p. But you can have a smaller signal: -

The smallest signal is half of this (i.e. 1 LSBp-p) hence another 6dB takes you down to -96dBFS

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • 1
    Aha! I think I've understood. So the maximum wave has a p-p of -32768 to 32767 ie (65536), and the minimum has a peak to peak of, say 0 to 1, (ie 1) which gives me -96dB. (Originally I was thinking the minimum signal went from -1 to 1.) Do you think my (basic) reasoning here is ok? – Aptary Oct 15 '13 at 13:04
  • @Aptary sounds like you've got it - the symmetry fooled you! – Andy aka Oct 15 '13 at 13:06
  • Brill, thanks, will def give you an upvote when I get enough rep! – Aptary Oct 15 '13 at 13:10
3

You make the scale for symmetrical signals, but that notion is totally arbitrary. Each bit adds 6 dB SNR (more specifically signal-to-quantization noise), because it doubles the scale, and a factor 2 is 6 dB. So 16 bit is 16 x 6 dB = 96 dB.
More exact numbers: 20 log(2) = 6.02, therefore 16 x 6.02 dB = 96.33 dB.

radagast
  • 1,794
  • 3
  • 17
  • 28
3

You've almost found it yourself! Think in terms of unsigned value instead of signed, and you're perfect. In the formula

dBFS = 20 * log( [sample level] / [max level] )

Consider

[sample level]=1 and [max level]=65536 which will lead you to:

dBFS = 20 * log(1/65536)

dBFS = 20 * -4.816

dBFS = -96.3

RawBean
  • 857
  • 6
  • 17
1

When calculating SNR, you're comparing the full-scale signal power (usually a sinewave) to the quantization noise power. Power is calcuated based on the RMS value of the waveform.

Quantization noise is best modeled as a sawtooth wave, whose RMS value is (IIRC) \$1/\sqrt{12}\$ the peak value. When compared to a sine wave of the same peak amplitude, this is what gives you the additional 6 dB.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393