Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

Simulink 中的单位

Simulink® 信号的单位设定和单位转换函数

Simulink 允许您指定物理单位作为模型组件边界处的信号的属性。通过指定、控制和可视化信号单位,您可以确保模型各组件之间的计算一致性。例如,如果您要将许多单独开发的组件集成到一个大型整体系统模型中,这种额外的一致性检查可能会很有用。有关单位的入门信息,请参阅 Simulink 模型中的单位指定

模块

Inport为子系统或外部输入创建输入端口
Outport为子系统或外部输出创建输出端口
Signal Specification指定信号所需的维度、采样时间、数据类型、数值类型和其他属性
Unit System ConfigurationRestrict units to specified allowed unit systems
Unit ConversionConvert units

函数

createCustomDBFromExcelCreate custom units database file from Microsoft Excel spreadsheet
rehashUnitDBsRefresh unit database files on MATLAB path
showunitslistShow built-in units, physical quantities, and unit systems supported by Simulink

示例和操作指南

Update an Existing Model to Use Units

Use a fuel control system example to learn how to update an existing model to use units.

Working with Custom Unit Databases

Create and load custom unit databases from Excel® spreadsheets.

概念

Simulink 模型中的单位指定

指定物理单位作为模型组件边界处的信号的属性。

Displaying Units

Dynamically update port and signal labels to show any changes made to units.

Unit Consistency Checking and Propagation

Check unit consistency between components.

Converting Units

Configure Simulink to convert units between ports when discrepancies that have known mathematical relationships are detected.

疑难解答

Troubleshooting Units

Use Model Advisor checks to troubleshoot common issues with unit settings.

相关信息