Quantization
When developing a dynamic system using floating-point arithmetic, you generally do not have to worry about numerical limitations since floating-point data types have high precision and range. Conversely, when working with fixed-point arithmetic, you must consider these factors when developing dynamic systems:
Quantization
Fixed-point values are rounded. Therefore, the output signal to the plant and the input signal to the control system do not have the same characteristics as the ideal discrete-time signal.
Overflow
Adding two sufficiently large negative or positive values can produce a result that does not fit into the representation.
Computational noise
The accumulated errors that result from the rounding of individual terms within the realization introduce noise.
Limit cycles
In the ideal system, the output of a stable transfer function (digital filter) approaches some constant for a constant input. With quantization, limit cycles occur where the output oscillates between two values in steady state.
Topics
Scaling, Range and Precision
- Scaling, Range, and Precision
Learn how fixed-point types are scaled and how to interpret the range and precision of a data type from its scaling. - Compute Slope and Bias
Describes slope-bias scaling and how to compute it. - Net Slope and Net Bias Precision
Net slope and bias precision, detecting precision loss, underflow, and overflow. - Determine the Range of Fixed-Point Numbers
Fixed-point variables have a limited range because digital systems represent numbers with a finite number of bits. - Recommendations for Arithmetic and Scaling
Scaling in your fixed-point design based on the limitations of fixed-point arithmetic. - Maximize Precision
To maximize precision, make the slope as small as possible while keeping the range adequately large. - Detect Fixed-Point Constant Precision Loss
This example shows how to detect fixed-point constant precision loss.
Quantization
- Arithmetic Operations
Choose data types and scaling for best results when performing fixed-point arithmetic. - Rounding Modes
Learn about the different rounding modes available in Fixed-Point Designer™. - Choose a Rounding Mode
What to consider when choosing a rounding mode.
Overflow
- Saturation and Wrapping
Saturation and wrapping describe a particular way that some processors deal with overflow conditions. - Underflow and Overflow Logging Using fipref
Examples of usingfiprefobjects to set logging preferences forfiobjects. - Handle Overflows in Simulink Models
Control the warning messages you receive when a model contains an overflow. - Guard Bits
Eliminate the possibility of overflow by appending the appropriate number of guard bits to a binary word.
