The Fixed-Point Tool automates the task of specifying fixed-point data types in a Simulink® model. This process is also known as autoscaling. The tool can collect range data for model objects from:
Design minimum and maximum values that objects specify explicitly
Logged minimum and maximum values that occur during simulation
Minimum and maximum values derived using range analysis
Based on these values, the tool proposes fixed-point data types that maximize precision and cover the range.
Before you begin conversion, you need to set up the model in Simulink. For more detail, see Set up the model.
The conversion workflow consists of four main stages.
During this stage of the conversion, select the system to convert to fixed point. The Fixed-Point Tool will propose data types for the objects in the specified system.
Select whether to collect ranges through simulation, or derived range analysis. You can then automatically prepare the system under design for conversion by clicking the Prepare button in the Fixed-Point Tool toolstrip. The Fixed-Point Tool analyzes your model and make configuration recommendations for autoscaling.
Run the simulation or the derivation. When the simulation or derivation is complete, you can examine the ranges of objects in your model using the histograms in the Visualization of Simulation Data pane.
The Fixed-Point Tool proposes data types based on the ranges collected in stage two. You can edit the default word length and other proposal settings in the Settings menu. To generate proposals, click Propose Data Types. If you are satisfied with the proposals, click Apply Data Types.
Simulate your model using the newly applied fixed-point data types to examine the behavior of the fixed-point model. You can compare the floating point and fixed-point behavior using the Simulation Data Inspector.
After verification, if you determine that the behavior of the system is not acceptable, you can iterate through the conversion and verification steps until you settle on a design that satisfies your system requirements. For more information, see Explore Additional Data Types.
To begin the fixed-point conversion process, see Set Up the Model.