Quantizer Block
Rounds input signal to the nearest multiple of a specified interval (discretizes amplitude). Supports ADC mode with min/max/bits.
Open Quantizer in BlockWerk →# Quantizer Block
Description
Rounds the input signal to the nearest multiple of a specified interval, producing a staircase-like output. Models ADC resolution, digital sensor quantization, and discrete-level systems.
Mathematical Model
y(t) = q \cdot \text{round}\left(\frac{u(t)}{q}\right)
Parameters
interval
The quantization step size. Smaller values give finer resolution.
mode
Type: select (Default: "resolution")
Mode parameter description placeholder.
minValue
Type: number (Default: 0)
Min Value parameter description placeholder.
maxValue
Type: number (Default: 5)
Max Value parameter description placeholder.
bits
Type: number (Default: 8)
Number of Bits parameter description placeholder.
Remarks
- Quantisation error: The difference between input and output is at most ±interval/2; smaller intervals reduce error but increase the number of output levels
- ADC simulation: Use Quantizer to model analog-to-digital converter resolution (e.g., interval = 5/1024 for a 10-bit ADC with 5V reference)
- Staircase output: The output changes in discrete steps of the interval value, producing a characteristic staircase waveform
- Zero-centred: Quantization is symmetric around zero — negative inputs step through negative multiples of the interval
- Performance: Negligible computational cost; safe for high-sample-rate simulation
Examples
- Zie de ingebouwde voorbeelden in de handleiding voor een demonstratie van dit blok.
See Also
- MathFunction: round/floor/ceil for integer rounding
- DeadZone: Zero-output band around zero