Choosing a Range Collection Method

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. The tool allows you to review the data type proposals and then apply them selectively to objects in your model.

You can use the Fixed-Point Tool to select data types automatically for your model using the following methods.

Automatic Data Typing MethodAdvantagesDisadvantages

Using simulation minimum and maximum values

  • Useful if you know the inputs to use for the model.

  • You do not need to specify any design range information.

  • Not always feasible to collect full simulation range.

  • Simulation might take a very long time.

Using design minimum and maximum values

You can use this method if the model contains blocks that range analysis does not support. However, if possible, use simulation data to propose data types.

  • Design range often available only on some input and output signals.

  • Can propose data types only for signals with specified design minimum and maximum values.

Using derived minimum and maximum values

You do not have to simulate multiple times to ensure that simulation data covers the full intended operating range.

  • Derivation might take a very long time.

Workflow FeatureConversion Using Simulation DataConversion Using Range Analysis
Iterative workflowMerge ranges of multiple simulations. This iterative process allows you to collect ranges from multiple input cases.Results will not change from one derivation to the next unless you manually change design ranges in the model.
Range coverageProposed data types are based on simulation ranges. The proposals provided by the Fixed-Point Tool are as good as the test bench provided.Range analysis typically delivers a more conservative data type proposal.
Input to systemComprehensive set of input signals that exercise the full range of your design are required for data type proposals.Ranges reported from derivation based upon provided design ranges
Design rangesSimulation ranges are verified against design range specification and violations are reported in the Diagnostic Viewer.Design ranges must be specified on the model.
Supported FeaturesAll model objects are supported for instrumentation and range collectionRange analysis supports a subset of model objects. For more information, see Unsupported Simulink Software Features.
Modeling constructsRanges always converge during simulation.Some modeling constructs, such as feedback loops, may require more design range information before converging.
Tunable parameters with known rangesYou must exercise tunable range as an inputDesign ranges of tunable parameters are reported.
Data type proposalsData type proposals based on collected minimum and maximum values.
Simulation modeInstrumentation data is only collected during Normal mode. No instrumentation data is collected while a model is running in accelerator or rapid accelerator mode. If you know that simulation will take a long time, you may want to derive ranges for your model.Simulation mode has no affect on range analysis.

Related Topics