Understanding Quantization Error in ADCs and DACs
Share
In this Anabit tutorial we will look at what is Quantization error and how it affects the accuracy of your data converter circuit. Quantization error is the difference between an analog signal’s true value and its nearest digital representation after conversion. It’s an inherent limitation of any system that maps a continuous signal, that can have an infinite number of values, into finite discrete steps — like analog-to-digital converters (ADCs) and digital-to-analog converters (DACs).
Every time an ADC measures a voltage, it has to “round” that voltage to the closest available digital code. Similarly, when a DAC generates a voltage from digital data, it can only output one of its discrete voltage levels. That rounding process is where quantization error comes from.
Mathematically, for a given analog value x and quantized value Q(x):
Quantization Error = Qe = x − Q(x)
The magnitude of this error is bounded by half of one least significant bit (LSB):
∣Qe∣ ≤ 1/2 LSB
Calculating Quantization Step Size
Each ADC or DAC has a finite resolution defined by its number of bits N and its full-scale voltage range Vfs. The quantization step size (LSB) is:
LSB = Vfs / 2N
Example with a 12-bit ADC with a ±2.5 V input range has:
Vfs = 5 V and 212 = 4096 so LSB = 5 V / 4096 = 1.22mV
So the maximum quantization error is: ± 1/2 LSB = ±0.61mV
That means every reading from this ADC can differ from the true analog voltage by up to ±0.61 mV even under ideal, noise-free conditions.
Diagram from OpenLearn (open.edu)
The above chart provides a good diagram of measurements from a 3-bit ADC to visualize quantization error. The line in black is the continuous analog signal that is being measured. The circles on top of the vertical blue lines represent the codes the ADC returns for each analog measurement value. You can see, especially in the first measurement, that the codes (represented by the blue dots) do not line up perfectly with the analog signal. The separation between the actual analog signal value and the code returned is quantization error. Since we do not know where in between two codes the actual signal value is we assume the worst error of 1/2 LSB.
Quantization Error Modeled as Noise
When the analog signal moves randomly relative to the quantization boundaries (such as when it includes a bit of natural noise), quantization error behaves statistically like white noise. In that case, the quantization error has a uniform probability distribution between ±½ LSB, and the resulting rms quantization noise is:
RMS Quantization Error = LSB / √12 ≈ 0.289LSB (rms)
This approximation is very useful for calculating an ADC or DAC’s theoretical signal-to-noise ratio (SNR). SNR is an important specification when measuring low level AC signals or communication signals.
Theoretical SNR from Quantization
For an ideal ADC or DAC (no internal or external error contributors), the quantization noise sets the ultimate noise floor. The signal-to-quantization-noise ratio (SQNR) for an N-bit converter is:
SQNR = (6.02 x N) + 1.76 dB
A 12 bit ADC or DAC: SQNR = (6.02×12) + 1.76 = 74dB
A 16 bit ADC or DAC: SQNR = (6.02×16) + 1.76 = 98dB
This shows why higher bit resolution directly improves dynamic range — each additional bit yields roughly +6 dB of SNR.
Quantization Error in ADCs
In analog-to-digital converters, quantization error appears as uncertainty in each digital measurement. The ADC approximates the input signal with discrete voltage bins spaced one LSB apart.
Effects on ADC Performance
- Limits Precision: Even if the analog circuitry is perfect, the output code can only represent voltages in finite LSB increments.
- Introduces Noise Floor: Quantization noise defines the lowest measurable signal level (i.e., effective number of bits, or ENOB).
- Creates Distortion in Periodic Signals: For signals that don’t dither across code boundaries (e.g., clean sine waves), the error becomes correlated and can produce harmonic distortion rather than random noise.
Mitigation Techniques
- Add dither (small random noise) to decorrelate quantization steps.
- Use oversampling and averaging to reduce the noise floor (Tutorial on oversampling).
- Use higher-resolution ADCs for finer granularity.
Quantization Error in DACs
For digital-to-analog converters, quantization error appears as stair-step ripple between the ideal analog signal and the reconstructed output.
Effects on DAC Performance
- Static Error: The DAC can only produce discrete output levels, so smooth waveforms are approximated by steps.
- Harmonic Distortion: For periodic signals (e.g., sine outputs), quantization introduces small harmonics above the fundamental.
- Output Smoothing: Filtering the DAC output (with an analog low-pass or reconstruction filter) helps remove the higher-frequency artifacts caused by quantization.
Example, 10-bit DAC with a 0–5 V range has:
LSB = 5V / (1024 - 1) = 4.89mV so Qe = ±2.445mV
This is the minimum step size and the maximum instantaneous deviation between the desired analog voltage and the DAC’s output.
Physical Interpretation and Conclusion
- In an ADC, this noise sets the theoretical noise floor. The ADC can’t distinguish voltages smaller than the quantization step. The resulting SNR limit is approximately 6.02N+1.76 dB for an N-bit converter.
- In a DAC, it represents the small “ripples” or stepwise deviations from the ideal analog waveform. After low-pass filtering, these appear as a constant background noise level.
In this tutorial we looked at what quantization error is and how it is present in every ADC and DAC. Quantization error ultimately affects the ADC or DAC's accuracy but is caused by limitations in resolution, since resolution cannot be infinite. To reduce quantization error you can use a higher resolution data converter or techniques such as oversampling (click here to access our tutorial on oversampling). Below are some references for further reading on quantization error.
- OpenLearn's tutorial "Quantisation of a signal"
- From Texas Instruments "ADC noise measurement methods & parameters" by Chris Hall & Bryan Lizon provides a great overview of various noise types including noise from quantization error
- From Analog Devices "The Effect of DAC Resolution on Spurious Performance" by Ken Gentile provides a more detailed dive of quantization error in DACs
