Documentation

Automatic Data Typing Using Simulation Data

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 collects range data for model objects, either from design minimum and maximum values that objects specify explicitly, from logged minimum and maximum values that occur during simulation, or from 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.

Workflow for Automatic Data Typing Using Simulation Data

Before beginning conversion, Set up the model. There are two phases of conversion: data typing, and verification. Steps one through five deal with the data typing phase, while steps six and seven deal with the verification phase.

Data Typing

  1. Select system under design

  2. Run the model to gather floating-point benchmark

    1. Set range collection using doubles

    2. Simulate using doubles

  3. Propose data types

  4. Examine results to resolve conflicts

  5. Apply proposed data types

Validation

  1. Verify new settings

    1. Set range collection using specified types

    2. Simulate using fixed-point data types

    3. Compare runs in Simulation Data Inspector

  2. Clean Up Model Settings

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

Related Examples

Was this topic helpful?