Main Content

Simulink 中的迭代定点转换


定点工具是一个用户界面,它自动执行在 Simulink® 模型中指定定点数据类型的任务。该工具根据仿真、派生或设计范围收集模型对象的范围数据。在“迭代定点转换”工作流中,该工具会基于这些范围数据建议能够最大化精度和覆盖范围的定点数据类型。然后,您可以检查数据类型建议,并有选择地将它们应用于模型中的对象。如果不满足设计要求,您可以调整数据类型建议设置,可视化其效果,并进行迭代,直到系统满足您的要求。

要将模型转换为定点,请按照Iterative Fixed-Point Conversion Using the Fixed-Point Tool中的步骤操作。有关完整转换过程的示例,请参阅Convert Floating-Point Model to Fixed Point

DataTypeWorkflow.Converter 对象及其关联的对象函数是定点工具中“迭代定点转换”的命令行替代项。


定点工具Convert a floating-point model to a fixed-point model


fxptdlgOpen the Fixed-Point Tool

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









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.

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.

Fixing 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.

Providing 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.