| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Fixed Point |
| Contents | Index |
| On this page… |
|---|
Prerequisites for Using the Fixed-Point Tool Running the Model to Gather a Floating-Point Benchmark |
| Fixed-Point Tool Workflow | ||
|---|---|---|
| 1. Prerequisites | ||
| 1.1 | Open your model in Simulink and set it up for use with the Fixed-Point Tool. | |
| 2. Run the model to gather floating-point benchmark | ||
| 2.1 | From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool to launch the Fixed-Point Tool. | |
| 2.2 | Enable signal logging for system or subsystem of interest:
For more information, see Signal Logging Options in the fxptdlg reference. | |
| 2.3 | In the Fixed-Point Tool Model Hierarchy pane, select the system or subsystem for which you want a scaling proposal. | |
| 2.4 | Set Data type override to True doubles. The Fixed-Point Tool performs a global override of the fixed-point data types and scaling using double-precision numbers, thus avoiding quantization effects. | |
| 2.5 | Set Fixed-point instrumentation mode to Minimums, maximums and overflows to log minimum value, maximum value, and overflow data for all blocks in the current system or subsystem during simulation. | |
| 2.6 | Click the Fixed-Point
Tool Start button
| |
| 3. Propose scaling | ||
| 3.1 | If you do not want to use simulation data for range information, uncheck the Use simulation min/max if design min/max is not available checkbox. | |
| 3.2 | If you have safety margins to apply, set Percent safety margin for design min/max and/or Percent safety margin for simulation min/max as necessary. For more information, see Percent safety margin for simulation min/max and Percent safety margin for design min/max in the fxptdlg reference. | |
| 3.3 | Click the Propose
fraction lengths button
If there are conflicts in your model, the Fixed-Point Tool displays the Results Need Attention dialog box. If you do not see this warning, there are no conflicts in your model, go to step 5. | |
| 4 . Examine results to resolve conflicts | ||
| 4.1 | Click OK on the Results Need Attention dialog box to close the dialog. | |
| 4.2 | Use the Show option on the Fixed-Point Tool toolbar to filter the results to show Conflicts with proposed data types. The Fixed-Point Tool alerts you to potential scaling issues for each result by displaying a block icon annotated with red, yellow, and green symbols. | |
| 4.3 |
To review the error and correct the problem:
| |
| 4.4 |
Review
the Autoscale Information for the
| |
| 4.5 | You have changed
the Simulink model, so the benchmark data is not up to date.
Click the Fixed-Point Tool Start button
The Fixed-Point Tool warns you that you have not applied proposals. Click the Ignore and Simulate button to continue. | |
| 4.6 | Click the Propose
fraction lengths button
| |
| 4.7 | Use the Show option on the Fixed-Point Tool toolbar to filter the results to show All results. | |
| 5. Apply scaling | ||
| 5.1 | Examine each
result. For more information about a particular result, select the
result then click the Show autoscale information for selected
result button
| |
| 5.2 | If you do not want to accept the proposal for a result, uncheck the Accept checkbox in the Fixed-Point Tool Contents pane for that result. | |
| 5.3 | Click the Apply
accepted fraction lengths button
| |
| 6. Store Reference Run | ||
| 6.1 | Click the Exchange
Active and Reference Results button
| |
| 7. Verify new settings | ||
| 7.1 | In the Fixed-Point Tool Model Hierarchy pane, select the system or subsystem for which you want a proposal. | |
| 7.2 | Change Data type override to Use local settings. This option enables each of the model's subsystems to use its locally specified data type settings. | |
| 7.3 | Verify that Fixed-point instrumentation mode is set to Minimums, maximums and overflows. | |
| 7.4 | Click the Fixed-Point
Tool Start button
| |
| 7.5 | Compare the ideal results stored in the reference run with the fixed-point results in the active run:
| |
To use the Fixed-Point Tool to generate scaling proposals for your model, you must first set up your model in Simulink.
Open your model in Simulink.
Select Simulation > Normal in the Simulink menu to ensure the model runs in Normal mode.
If you are using design minimum and maximum range information, add this information to blocks.
You specify a design range for model objects using parameters typically titled Output minimum and Output maximum. See Blocks That Allow Signal Range Specification for a list of blocks that permit you to specify these values.
Specify fixed-point data types for blocks and signals in your model. For blocks with the Data Type Assistant, use the Calculate Best-Precision Scaling button to calculate best-precision scaling automatically. For more information, see Specifying Fixed-Point Data Types with the Data Type Assistant.
Note If you have a floating-point model, use the Fixed-Point Advisor to facilitate converting your model to an equivalent fixed-point representation. To learn more about the Fixed-Point Advisor, see Fixed-Point Advisor. |
You can choose to lock some blocks against autoscaling by selecting the Lock output data type setting against changes by the fixed-point tools parameter. If an object's Lock output data type setting against changes by the fixed-point tools parameter is selected, the tool does not propose scaling for that object.
Select Update Diagram from the Simulink Edit menu to perform parameter range checking for all blocks in the model.
You first run the model with a global override of the fixed-point data types using double-precision numbers to avoid quantization effects. This provides a floating-point benchmark that represents the ideal output. The Simulink software logs the signal logging results to the MATLAB workspace. The Fixed-Point Tool displays the simulation results including minimum and maximum values that occur during the run.
Launch Fixed-Point Tool.
From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool.
Enable signal logging for the system or subsystem of interest. Using the Fixed-Point Tool you can enable signal logging for multiple signals simultaneously. For more information, see Signal Logging Options in the fxptdlg Reference.
To enable signal logging:
Select the system or subsystem in the Fixed-Point Tool Model Hierarchy pane.
Right-click to open the context menu.
Use the Enable Signal Logging option to enable signal logging, as necessary.
The Contents pane of the Fixed-Point Tool
displays an antenna icon
next to items that have
signal logging enabled.
In the Fixed-Point Tool Model Hierarchy pane, select the system or subsystem for which you want a proposal.
Set Data type override to True doubles to perform a global override of the fixed-point data types and scaling using double-precision numbers, thus avoiding quantization effects.
Set Fixed-point instrumentation mode to Minimums, maximums and overflows to log minimum value, maximum value, and overflow data for all blocks in the current system or subsystem during simulation.
Click the Fixed-Point Tool Start button
to run the simulation.
The Fixed-Point Tool generates scaling proposals for model objects that specify fixed-point data types unless an object's Lock output data type setting against changes by the fixed-point tools parameter is selected.
When generating scaling proposals, the Fixed-Point Tool collects the following types of range data for model objects:
Design minimum or maximum values — You specify a design range for model objects using parameters typically titled Output minimum and Output maximum. See Blocks That Allow Signal Range Specification for a list of blocks that permit you to specify these values.
Simulation minimum or maximum values — When simulating a system whose Fixed-point instrumentation mode parameter specifies Minimums, maximums and overflows, the Fixed-Point Tool logs the minimum and maximum values generated by model objects. For more information about the Fixed-point instrumentation mode parameter, see the documentation for the fxptdlg function.
The Fixed-Point Tool uses available range data to calculate scaling proposals according to the following rules:
Design minimum and maximum values take precedence over the simulation range.
The Percent safety margin for design min/max parameter specifies a range that differs from that defined by the design range. For example, a value of 20 specifies that a range of at least 20 percent larger is desired. A value of -10 specifies that a range of up to 10 percent smaller is acceptable.
The tool observes the simulation range only when the Use simulation min/max if design min/max is not available option is selected. Otherwise, the tool ignores the simulation range.
The Percent safety margin for simulation min/max parameter specifies a range that differs from that defined by the simulation range. For example, a value of 20 specifies that a range of at least 20 percent larger is desired. A value of -10 specifies that a range of up to 10 percent smaller is acceptable.
To use design min/max information only, uncheck the Use simulation min/max if design min/max is not available checkbox, otherwise leave it checked.
If you have safety margins to apply:
Enter Percent safety margin for design min/max, if applicable. For example, enter 10 for a 10% safety margin.
Enter Percent safety margin for simulation min/max, if applicable. For example, enter 10 for a 10% safety margin.
Click the Propose fraction lengths button
.
If there are conflicts in your model, the Fixed-Point Tool displays the Results Need Attention dialog box.
If you do not see this warning, there are no conflicts in your model, go to Applying Scaling.
You can examine each scaling proposal using the Autoscale Information dialog, which displays the rationale underlying the proposed scaling. Also, this dialog describes potential issues or errors, and it suggests methods for resolving them. To open the dialog:
In the Contents pane, select an object that has proposed scaling.
Click the Show autoscale Information for
selected result button
.
The dialog appears.

The sections that follow describe the information that the dialog displays.
This section describes a scaling proposal in terms of how it differs from the object's current data type. For cases when the Fixed-Point Tool does not propose scaling, this section provides an explanation.
This section lists potential issues and errors associated with scaling proposals. It displays the following icons to differentiate warnings from errors.
|
| Indicates a warning message. |
|
| Indicates an error message. |
Not only does this section describe such issues, but also it suggests methods for resolving them.
This section notifies you when data type requirements associated with other model objects impact the data type of the selected object. In this case, the dialog provides a hyperlink that you can click to highlight those items in the model. To eliminate such highlighting, from the model's View menu, select Remove Highlighting.
This section provides a table that lists a model object's attributes that influence its scaling proposal.
| Item | Description |
|---|---|
Currently Specified Data Type | Data type that an object currently specifies. |
Proposed Data Type | Data type that the Fixed-Point Tool proposes for this object. |
Proposed Representable Maximum | Maximum value that results from the proposed data type. |
Design Maximum | Design maximum value that an object specifies using, e.g., its Output maximum parameter. |
Simulation Maximum | Maximum value that occurs during simulation. |
Simulation Minimum | Minimum value that occurs during simulation. |
Design Minimum | Design minimum value that an object specifies using, e.g., its Output minimum parameter. |
Proposed Representable Minimum | Minimum value that results from the proposed data type. |
The table also includes a column titled Percent Proposed Representable. This column indicates the percentage of the proposed representable range that each value covers. Overflows occur when values lie outside this range.
Shared Values. When proposing scaling, the Fixed-Point Tool attempts to satisfy data type requirements that model objects impose on one another. For example, the Sum block provides an option that requires all of its inputs to have the same data type. Consequently, the table might also list attributes of other model objects that impact the scaling proposal for the selected object. In such cases, the table displays the following types of shared values:
Initial Values
Some model objects provide parameters that allow you to specify the initial values of their signals. For example, the Constant block includes a Constant value parameter that initializes the block output signal. The Fixed-Point Tool uses initial values to propose scaling for model objects whose design and simulation ranges are unavailable. When data type dependencies exist, the tool considers how initial values impact the scaling proposals for neighboring objects.
Model-Required Parameters
Some model objects require the specification of numeric parameters to compute the value of their outputs. For example, the Vector of input values and Table data parameters of a Lookup Table block specify values that the block requires to perform a lookup operation and generate output. The block converts the data types of those two parameters to match that of the input and output signals, respectively. When proposing scaling, the Fixed-Point Tool considers how these "model-required" parameter values impact the scaling proposals for neighboring objects.
Click OK on the Results Need Attention dialog box to close the dialog.
Use the Show option on the Fixed-Point Tool toolbar to filter the results to show Conflicts with proposed data types.

The Fixed-Point Tool lists its scaling proposals in the Contents pane under the ProposedDT column. The tool alerts you to potential scaling issues for each object in the list by displaying a green, yellow, or red icon.
|
| The proposed scaling poses no issues for this object. |
|
| The proposed scaling poses potential issues for this object. |
|
| The proposed scaling will introduce data type errors if applied to this object. |
Review and fix each
error.
Select the error, right-click and select Highlight Block In Model from the context menu to identify which block has a conflict
Click the Show autoscale information for
selected result button
to open the Autoscale
Information dialog box
Use the advice provided in the Needs Attention section of the Autoscale Information dialog box to resolve the conflict by fixing the problem in the Simulink model
Review the Autoscale Information for
the
warnings and correct
the problem if necessary.
You have changed the Simulink model, so the benchmark
data is not up to date. Click the Fixed-Point Tool Start button
to rerun the simulation.
The Fixed-Point Tool warns you that you have not applied proposals. Click the Ignore and Simulate button to continue.
Click the Propose fraction lengths button
to generate a scaling
proposal.
Use the Show option on the Fixed-Point Tool toolbar to filter the results to show All results.
After reviewing the scaling proposals, you are ready to apply the scaling to your model. The Fixed-Point Tool allows you to apply its scaling proposals selectively to objects in your model. Use the Accept check box in the Contents pane to specify the scaling proposals that you want to assign to model objects. The check box indicates the status of a proposal:
|
| The Fixed-Point Tool will apply the proposed scaling to this object. By default, the tool selects the Accept check box when a scaling proposal differs from the object's current scaling. |
|
| The Fixed-Point Tool will ignore the proposed scaling and leave the current scaling intact for this object. |
|
| No scaling proposal exists for this object. This occurs, for example, when the object specifies a data type inheritance rule or has its scaling locked. |
Examine each result. For more information about a
particular result, select the result and then click the Show
autoscale information for selected result button
.
The Autoscale Information dialog box appears.
If you do not want to accept the proposal for a result, uncheck the Accept checkbox in the Fixed-Point Tool Contents pane for that result. For more information, see fxptdlg
Tip The Fixed-Point Tool enables you to customize its scaling proposals before applying them to your model. To do so, in the Contents pane, click a ProposedDT cell and edit the data type expression. See documentation for the fixdt function for information about specifying fixed-point data types. |
Click the Apply accepted fraction lengths button
to write the proposed
data types to the model.
You can use the Exchange Active and Reference Results button to swap the results that the Fixed-Point Tool stores as an active run with those that it stores as a reference run. This prevents the tool from overwriting results that you want to retain.
Click the Exchange Active and Reference Results button
to store the ideal doubles-based
simulation in the reference group.
The simulation results corresponding to True doubles override are now stored as a reference run.
After applying scaling to your model, you simulate the model using the fixed-point data types that you applied. The Fixed-Point Tool displays in its Contents pane information about blocks that logged fixed-point data. The SimDT (simulation data type) column for the active run shows that the blocks used fixed-point data types with the new scaling.
In the Fixed-Point Tool Model Hierarchy pane, select the system or subsystem for which you want a proposal.
Change Data type override to Use local settings. This option enables each of the model's subsystems to use its locally specified data type settings.
Verify that Fixed-point instrumentation mode is set to Minimums, maximums and overflows.
Click the Fixed-Point Tool Start button
to run the simulation.
Compare the ideal results stored in the reference run with the fixed-point results in the active run:
In the Contents pane, select
a result that has logged signal data. These results are annotated
with the
icon.
Click the Time Series Difference (A-R)
Plot
to view the difference
between the active and reference runs for the selected result.
Fixed-Point Tool can propose new scaling for Simulink signal objects in the base or model workspace. If you accept the proposed scaling, the Fixed-Point Tool will apply the new scaling to the Simulink signal objects automatically.
Caution The Fixed-Point Tool does not save the changes to the signal object. You must save the changes before closing the model. If you delete or manipulate a signal object in the base workspace after autoscaling, you must rerun the autoscaling. |
![]() | Overview of the Fixed-Point Tool | Introduction to the Tutorial | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |