| Fixed-Point Blockset | ![]() |
The Fixed-Point Blockset provides several fixed-point filter and system realizations. These realizations are intended to be used as design templates so you can easily see how to build filters and systems that suit your particular application needs. Realizations are provided for state-space, integrator, derivative, and lead or lag systems. For more information about realization structures, refer to Chapter 5, Realization Structures or the references included in Appendix B.
To display the filters and systems, type
fixptsys
at the MATLAB command line. Alternatively, you can access the realizations through the Filters & Systems: Examples block, which is available through Fixed-Point Blockset library. The filters and systems are shown below.
For each filter or system realization, you can:
This chapter presents a few realizations out of many possibilities. These realizations illustrate several important design rules that you should be aware of when modeling dynamic systems with fixed-point math.
Realizations and Data Types
In an ideal world where numbers, calculations, and storage of states have infinite precision and range, there are virtually an infinite number of realizations for the same system. In theory, these realizations are all identical to each other.
In the more realistic world of double-precision numbers, calculations, and storage of states, small nonlinearities are introduced due to the finite precision and range of floating-point data types. Therefore, each realization of a given system will produce different results. In most cases however, these differences are small.
In the world of fixed-point numbers where precision and range are limited, the differences in the realization results can be very large. Therefore, you must carefully select the data type, word size, and scaling for each realization element such that results are accurately represented. To assist you with this selection, design rules for modeling dynamic systems with fixed-point math are provided in Targeting an Embedded Processor.
Realizations and Scaling
As with all Fixed-Point Blockset models, you must select a scaling that gives the best precision, range, and performance for your specific fixed-point design.
The scaling for each filter and system demo is based on the default parameters. If these parameters are changed (for example, the magnitude of the input signal is increased), or if you are creating a new realization, you must define an appropriate scaling. For each system or filter, you can adjust the scaling manually with the dialog box, or automatically as illustrated in Simulation Results.
| Simulation 4: Individual Override | Targeting an Embedded Processor | ![]() |