Main Content

Iterative Fixed-Point Conversion in Simulink

Floating-point model conversion to fixed point using a guided workflow

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 based on simulation, derived, or design ranges. In the Iterative Fixed-Point Conversion workflow, the tool then 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. If design requirements are not met, you can adjust data type proposal settings, visualize their effects, and iterate until the system meets your requirements.

To convert your model to fixed point, follow the steps in Iterative Fixed-Point Conversion Using the Fixed-Point Tool. For an example of the complete conversion process, see Convert Floating-Point Model to Fixed Point.

The DataTypeWorkflow.Converter object and its associated object functions are a command-line alternative to the Iterative Fixed-Point Conversion in the Fixed-Point Tool.

Tools

Fixed-Point ToolConvert a floating-point model to a fixed-point model

Functions

fxptdlgOpen the Fixed-Point Tool

Classes

DataTypeWorkflow.ConverterCreate fixed-point converter object
DataTypeWorkflow.findDecoupledSubsystemsGet a list of subsystems to replace with an approximation
DataTypeWorkflow.ProposalSettingsProposal settings object for data type proposals
DataTypeWorkflow.ResultObject containing run result information
DataTypeWorkflow.VerificationResultVerification results after converting a system to fixed point

Topics

Iterative Fixed-Point Conversion Workflow Overview

Prepare System for Conversion

Collect Ranges

Propose Data Types

Convert Data Types

Verify Results

Troubleshooting

Blocks That Do Not Support Fixed-Point Data Types

Troubleshoot blocks that are not supported for fixed-point conversion.

Best Practices for Working with the MATLAB Function Block in Automated Fixed-Point Conversion Workflows

Follow best practices and avoid unsupported MATLAB Function block features.

Best Practices for Working with Stateflow Charts in Automated Fixed-Point Conversion Workflows

Follow best practices for Stateflow® charts to avoid unexpected results.

Models That Might Cause Data Type Propagation Errors

Know which modeling practices could cause data type propagation errors after autoscaling.

Resolve Range Analysis Issues

Troubleshoot range analysis issues.

Fix Design Range Conflicts

Avoid specifying conflicting design minimum and maximum values in your model.

Insufficient Design Range Information

Troubleshoot errors caused by insufficient design range information by providing additional input design minimum and maximum values.

Provide More Design Range Information

Troubleshoot insufficient design range information that prevents successful derived range analysis.

Troubleshoot Range Analysis of System Objects

Reconfigure a System object™, if necessary, so that ranges can be derived for the model.

The Fixed-Point Tool Did Not Propose Data Types

Troubleshoot when the Fixed-Point Tool does not propose data types.

Data Type Mismatch and Structure Initial Conditions

Example showing how to replace a structure initial condition with a Simulink.Parameter object.

Data Type Propagation Errors After Applying Proposed Data Types

Troubleshoot when the Fixed-Point Tool proposes data types that are not compatible with the model.

Featured Examples