Quantization Error
Definition
Quantization error is the difference between the actual analog value of a signal sample and the nearest discrete quantization level assigned to it during analog-to-digital conversion.
Mathematically:
where:
- = original sample value
- = quantized value
- = quantization error
If the quantizer uses rounding to the nearest level, the error is usually confined to a small range around zero. If the quantizer uses truncation, the error may be biased and generally larger in a systematic direction.
Main Content
1. Quantization Process and Quantization Levels
- In digital communication, a continuous-time signal is first sampled, and each sample amplitude is then mapped to one of a finite number of levels.
- If an analog range is divided into discrete levels, then each sample is replaced by the nearest level, creating a small mismatch between the input and output values.
For example, suppose a signal amplitude lies between 0 V and 8 V, and the system uses 3 bits. Then:
- Number of levels
- Step size
Possible quantization levels may be 0 V, 1 V, 2 V, ..., 7 V, or centered versions depending on the quantizer design. If the actual sample is 2.6 V, it may be assigned to 3 V, producing an error of -0.4 V or 0.4 V depending on sign convention.
A simple visual idea is:
Analog value: 2.6 V
Nearest level: 3.0 V
Difference: 0.4 V
This difference is the quantization error.
2. Types of Quantization Error
Uniform quantization error
- occurs when levels are equally spaced. It is common in many communication systems and is easier to analyze mathematically.
Non-uniform quantization error
- occurs when quantization levels are unevenly spaced, usually to give finer resolution for low-amplitude signals and coarser resolution for high-amplitude signals.
Important distinctions:
Rounding error
- : the value is mapped to the nearest level, so the error is limited to about .
Truncation error
- : the value is always rounded down or toward zero, which introduces a consistent negative or directional bias.
For a uniform quantizer:
-
Error range is typically:
-
If the signal is much larger and varies randomly over many levels, the quantization error can often be treated as noise.
In practice, companding systems such as μ-law and A-law use non-uniform quantization to reduce perceptible distortion in voice communication.
3. Effects of Quantization Error in Digital Communication
- Quantization error introduces quantization noise, which degrades the fidelity of the reconstructed signal.
- If the number of quantization levels is small, the step size is large, and the error becomes more noticeable, causing distortion in audio, image, and data signals.
Key effects include:
Amplitude distortion
- : the reconstructed waveform does not exactly match the original one.
Signal-to-quantization-noise ratio (SQNR) reduction
- : lower resolution reduces quality.
Audible or visible artifacts
- : in audio, it may cause hiss or roughness; in images, it may cause banding or contouring.
Example:
- A 4-bit system has levels.
- An 8-bit system has levels.
An 8-bit system has much smaller quantization error than a 4-bit system because the levels are more closely spaced.
A useful ASCII illustration:
Original waveform: ~~~~~~~~
Quantized waveform: _/¯\_/¯\_
Difference: small mismatches at each sample
The mismatch at each sample point is the quantization error.
Working / Process
1. Sample the analog signal
- The continuous waveform is measured at discrete time instants.
- Each sample still has an exact amplitude that may be any real number within the signal range.
2. Assign the nearest quantization level
- The sample amplitude is compared with the available discrete levels.
- The closest level is selected according to the quantizer rule, such as rounding or truncation.
3. Compute the quantization error
- The difference between the original sample and the quantized output is found.
- This error is stored implicitly as distortion in the system and affects signal reconstruction quality.
For example, if the sample is 5.7 and the quantization levels are integers:
- Quantized value = 6
- Quantization error = 5.7 - 6 = -0.3
This process repeats for every sample in the signal, so quantization error is always present in digital representation unless infinite precision is available, which is not practical.
Advantages / Applications
Enables digital representation of analog information
- : Quantization error is the unavoidable trade-off that makes analog signals representable in digital systems such as telephones, computers, and data networks.
Helps in designing efficient communication systems
- : By understanding and controlling quantization error, engineers can choose suitable bit rates, dynamic ranges, and quantizer designs to balance quality and bandwidth.
Used in audio, image, and sensor signal processing
- : Quantization principles are essential in PCM voice systems, digital audio recording, medical instrumentation, image compression, telemetry, and IoT sensor data conversion.
Summary
- Quantization error is the difference between an original signal sample and its nearest discrete digital level.
- It appears because digital systems can only use a finite number of amplitude levels.
- Smaller step size means smaller quantization error and better signal quality.
- Important terms to remember: quantization, quantization level, step size, quantization noise, rounding, truncation