Model notes
Ported from ADCToolbox 0.9.1. models/sar.py: sar_apply_cap_mismatch, sar_convert, sar_reconstruct; calibration/: calibrate_weight_sine; spectrum/: quick_sndr and analyze_spectrum. This page is the interactive companion to its examples exp_d18, exp_d16 and exp_d01; python/adc_training_length.py runs ADCToolbox on the same chips and every number here matches it.
The setup is exp_d18's. Eight chips of the same design, each with its own capacitor mismatch: a capacitor built from n units carries σ/√n of relative error, so the big MSB capacitors come out closest to size and the small ones worst. Each chip is calibrated from a short coherent capture of its own, and the weights that fall out are then used to read a 4096-sample capture at a different frequency and phase, which they have never seen.
The gap between the two lines is the whole lesson. The dashed line is what the calibrated weights say about the very capture they were solved from — always flattering, sometimes absurd: with strict binary weights and thirty-two samples, one of these chips reads thirty-three bits on its own training data. The solid line is the same weights on an unseen capture, and at that length it is worse than no calibration at all. Somewhere above a hundred samples the two lines meet, and that is the number you were looking for.
Redundancy is what makes a calibration teachable. A strict binary array has exactly one way to reach each level, so a short capture visits few enough patterns that the fit can solve them all exactly and learn nothing general. The radix-1.8 array reaches most levels several ways, the bit patterns spread out, and the fit has to explain them all — which is the same reason redundancy helps the converter settle in the first place.
The array itself is drawn on the right: the bar is how each capacitor came out, the dot is what the calibration decided it was. Watch them agree bit by bit as the training record grows, and watch the smallest capacitors — the ones with the most relative error and the least influence on the output — be the last to be learnt.
Sixteen weights, each half the last. Nothing is spare, so a short training capture can fit itself perfectly and still be wrong everywhere else.