Autoscaling Using the Fixed-Point Tool

The Fixed-Point Tool is a user interface that automates the task of specifying fixed-point data types in a Simulink® model. The tool collects range data for model objects. The range data comes from:

  • Design minimum and maximum values that objects specify explicitly on the block

  • 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. You can then review the data type proposals and apply them selectively to objects in your model. This process is also known as autoscaling. Using the Fixed-Point Tool you can:

Workflow for Automatic Data Typing

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.

  1. Prepare System for 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 specify multiple simulation scenarios using a Simulink.SimulationInput object. Specify signal tolerances to use to verify the behavior of the converted system.

    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 makes configuration recommendations for autoscaling.

  2. Collect Ranges

    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.

  3. Convert Data Types

    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.

  4. Verify New Settings

    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.

  5. Explore Additional Data Types

    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.

To begin the fixed-point conversion process, see Set Up the Model.

Related Topics