Ada Audits the Quantization and Filtering Numbers

Ada checks LSB size, measured noise, averaging, and coefficient filter work

foundations
math-foundations
quantization
signal-processing
intermediate
Ada ADA · CALCULATION AUDIT

Ada Audits the Quantization and Filtering Numbers

A clean ADC number is not just a big bit count. The voltage step, measured noise, and filter window decide whether firmware receives evidence or a smoother-looking guess.

A pressure sensor outputs 0.5 to 2.5 V into a 12-bit, 3.3 V ADC, giving a code step of about 0.806 mV — fine enough for a 5 mV meaningful change, but the chapter warns that 3 mV of input noise leaves most of the lowest bits describing noise rather than signal. This audit asks the question that gap invites: how many code steps does that 5 mV signal really span once the 3 mV noise floor is counted, and does a median filter actually recover the difference?

Companion to the chapter Quantization and Digital Filtering — every number here comes from that chapter.

1. The chapter's 12-bit example has a 0.806 mV code step

The worked example uses the existing 3.3 V reference and 4096 possible codes:

LSB = V_ref / 2^N = 3.3 V / 4096 = 0.000805664 V = 0.805664 mV

Rounded at the end, one code is 0.806 mV. The ideal rounding uncertainty is half a code: 0.805664 / 2 = 0.403 mV. A 5 mV meaningful change spans 5 / 0.805664 = 6.21 codes, so the ADC can represent that change before real noise is considered.

2. The 3 mV noise example is bigger than one LSB

The chapter says input noise can be around 3 mV. In code units:

noise_codes = 3 mV / 0.805664 mV = 3.72 codes

That is why extra nominal resolution is not automatically useful. The physics and electronics are moving the input by several code steps, so the lowest bits mostly describe uncertainty unless the noise source is reduced or averaged under the right assumptions.

3. Averaging helps only with the stated random, zero-mean noise case

The chapter's rule is square-root reduction, so the arithmetic is:

Averaging window Arithmetic shown Audit result
4 samples sqrt(4) = 2; 3 mV / 2 = 1.5 mV; 1.5 / 0.805664 1.86 LSB noise, with a 4-sample window
16 samples sqrt(16) = 4; 3 mV / 4 = 0.75 mV; 0.75 / 0.805664 0.93 LSB noise, with a 16-sample window
Ideal 12-bit SNR 6.02 × 12 + 1.76 74.0 dB before reference, timing, and input-noise losses

4. A coefficient filter is arithmetic sliding over evidence

For the chapter's unnormalized example, x = [1, 2, 3, 4, ...] and coeff = [1, 2, 3] produce these first outputs:

1; 2*1 + 1*2 = 4; 3*1 + 2*2 + 1*3 = 10; 4*1 + 3*2 + 2*3 = 16

What the audit buys you: amplitude resolution, random-noise averaging, and filter coefficients are separate review gates. Filtering can calm jitter after sampling, but it cannot recover information that aliased before the ADC; that physics boundary still belongs in the analog path.

Every number above is taken from this chapter's own worked example and re-derived step by step.