Are quantization steps equal in size & evenly distributed in the dynamic range? 2018-08-05 13:45:04 Hello.I’ve been doing some reading about the Sampling Theorem, and I find it all fascinating. I think I understand it enough now to rid myself of the typical DSP myths. However, I still have questions about some details.For instance, I want to be able to relate the 24 and 16 bit dynamic range to their respective quantization step size and distribution.When I’m working with my DAW, can I think of the quantization steps as having the same size and being evenly distributed throughout the entire dynamic range? Or do they have uneven sizes/distribution?I understand there’s Uniform Quantization (Mid-rise and mid-tread) and Non-Uniform Quantization. So which type do we use in our typical ADCs? I’m hoping it’s the former…--- Would it be accurate to say that in a 16-bit quantizer, each bit is represented by 2048 uniform quantization steps? Would each of the 16 bits have 6.02 dB of range represented by 2048 steps?(my reasoning is that there are 65,563 steps in a 16 bit quantizer. Then I must divide them by 2 because one half are to represent positive values of a signal and the other for negative values, so I simply divide the 32,768 actual steps by 16 to get the number of quantization steps per bit? Did I get this right?) --- Could I say that in a 16 bit signal, the LSB is represented by quantization steps 1 through 2,048 and its MSB by steps 30,721 through 32,768?I’m hoping it’s not, but something tells me things are a bit more complicated than that?Thank you for any comments.

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #1 – 2018-08-05 14:22:38 QuoteWhen I’m working with my DAW, can I think of the quantization steps as having the same size and being evenly distributed throughout the entire dynamic range? Or do they have uneven sizes/distribution?I understand there’s Uniform Quantization (Mid-rise and mid-tread) and Non-Uniform Quantization. So which type do we use in our typical ADCs? I’m hoping it’s the former…Almost all ADCs use uniform steps. Intger PCM is almost always uniform. Your DAW probably uses floating point which is not uniform, but the steps are so small you can think of them as uniform.QuoteWould it be accurate to say that in a 16-bit quantizer, each bit is represented by 2048 uniform quantization steps? Bits are not represented by steps, and there I no number of steps defined per bit. Every time you add a bit the number of steps doubles, so going from 15 to 16 gives you 2^16-2^15 additional steps (32768).QuoteCould I say that in a 16 bit signal, the LSB is represented by quantization steps 1 through 2,048 and its MSB by steps 30,721 through 32,768?In binary (like in normal decimal numbers) all bits determine the value of a number. The least significant bit determines if a number is even or odd, while the most significant bit decides if a value is greater or less than zero.

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #2 – 2018-08-05 16:41:16 Thank you for your answers, saratoga.Quote from: saratogaAlmost all ADCs use uniform steps. Intger PCM is almost always uniform. Ok. I’m glad you clear that up for me, because I was reading contradicting information that was confusing. So based on that fact, can I then say accurately that, given a bit depth (for instance 16 bits), the precision of a signal is always the same, whether it’s captured peaking at -6 dbFS or -50 dBFs, correct? The only difference would be that the latter is much closer to the noise floor (which would be obvious if one increases the gain back up), but other than that, in terms of precision, the signals would be equally “pure”, actually identical, yes?Quote from: saratogaYour DAW probably uses floating point which is not uniform, but the steps are so small you can think of them as uniform.Yes. It uses 32 bit floating point. So they are not uniform because of how the exponent part of the number works in floating point?I just read that in FP there’s a trade-off between range and precision. Is this the reason why?Is it true that 32 bFP represents lower values with less precision than larger values?Quote from: saratogaBits are not represented by steps, and there I no number of steps defined per bit. Maybe I mis-explained myself. I meant represented as in “covered by”, as you would see them represented in a graph. I thought one could relate signal level to bit number/quantization step/dBFS value, all three being equivalent in the Y axis, like this (please excuse my crude graphic)>But perhaps I’m looking at this all wrong and I still have some misconception lingering around?Quote from: saratogaIn binary (like in normal decimal numbers) all bits determine the value of a number. The least significant bit determines if a number is even or odd, while the most significant bit decides if a value is greater or less than zero.Ok, I see.Is it futile then to try to relate dynamic range to quantization steps?So what I’m trying to do doesn’t make much sense? Or is there some other way to relate them? I thought the graph above made sense!

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #3 – 2018-08-05 17:20:28 Quote from: FMiguelez on 2018-08-05 16:41:16The only difference would be that the latter is much closer to the noise floor (which would be obvious if one increases the gain back up), but other than that, in terms of precision, the signals would be equally “pure”, actually identical, yes?Yes, the quantization noise is the same.Quote from: FMiguelez on 2018-08-05 16:41:16Is it true that 32 bFP represents lower values with less precision than larger values?No. The relative precision is the same.Quote from: FMiguelez on 2018-08-05 16:41:16I thought the graph above made sense!Sorry, but it doesn't. Also IIUC, what you call "quantization step" is called a value (a signal value).For 16 bit signal:Maximum positive value : 32767, it's -0.000265... dBFS, and you need all 16 bits to represent itSome small positive value: 123, it's -48.23... dBFS, and you need 7 bits to represent itMinimum positive value : 1, it's -90.3... dBFS, and you need 2 bits to represent itZero value : 0, it's -infinity dBFS, and you need 1 bit to represent itMinimum negative value : -1, it's -90.3... dBFS, and you need 1 bit to represent itSome small negative value: -14, it's -67.38... dBFS, and you need 4 bits to represent itMaximum negative value : -32768, it's 0 dBFS, and you need all 16 bits to represent it

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #4 – 2018-08-05 17:46:55 Quote from: lvqclFor 16 bit signal:Maximum positive value : 32767, it's -0.000265... dBFS, and you need all 16 bits to represent itSome small positive value: 123, it's -48.23... dBFS, and you need 7 bits to represent itMinimum positive value : 1, it's -90.3... dBFS, and you need 2 bits to represent itZero value : 0, it's -infinity dBFS, and you need 1 bit to represent itMinimum negative value : -1, it's -90.3... dBFS, and you need 1 bit to represent itSome small negative value: -14, it's -67.38... dBFS, and you need 4 bits to represent itMaximum negative value : -32768, it's 0 dBFS, and you need all 16 bits to represent itThank you so much for that, lvqcl!! That’s EXACTLY what I wanted to know Now I see why my graph is totally off!I’m trying to digest your numbers and figure out how you got them now. Is there a formula I should know to get those relationships? I'd love to know, even if the math is over my head. I suppose that's the only way to really understand this...Oh, and thanks for the correction about it not being "quantization steps" but signal values. I'm thinking of the quantization steps as a "grid" that determines the precision and range of possible values. Does that make sense? Last Edit: 2018-08-05 18:15:43 by FMiguelez

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #5 – 2018-08-05 18:17:56 value: Nrelative value: N / 32768value in decibels: 20 * log10( N / 32768 )for example: value = 16384; relative value = 0.5; decibels = 20 * log10 (0.5) = -6.02 dBFS.

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #6 – 2018-08-07 18:27:59 Excellent. That will definitely help.Thank you very much, lvqcl !This is such a great forum!

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #7 – 2018-08-08 18:37:46 Quote from: FMiguelez on 2018-08-05 17:46:55I'm thinking of the quantization steps as a "grid" that determines the precision and range of possible values. Does that make sense?Yes, it makes sense and is correct as long as there's no noise entering the picture. The quantization steps are like the tick marks on a ruler.In a real system, there will be noise, because that's physically unavoidable. The ADC itself, for example will suffer from noise, which means that the ruler itself shakes and dithers a bit, so that there will be a small insecurity in quantization. The analog signal that is going to be quantized is also noisy. If you have enough noise, it will blur the quantization to such an extent, that the resolution limit of the quantization effectively disappears, and the whole thing is limited by the noise.In practice, you end up balancing noises, and rather than looking at bits and quantization steps, you look at noise levels and signal-to-noise ratios, which happen to be and mean the exact same thing as in analog audio.

Re: Are quantization steps equal in size & evenly distributed in the dynamic range? Reply #8 – Today at 15:01 Considering the size of the quantization step, to the size of the signals large and small, the quantization step is a greater proportion of the small signal. However this relationship between noise and signal size also exists in an analogue system and by using dither the effect is manipulated to have the same effect as noise in an analogue system . Last Edit: Today at 15:03 by KMD