Main Content

在数据类型优化期间进行的模型配置更改

Data type optimization seeks to minimize an objective function while maintaining the original system behavior within a specified tolerance. You can optimize data types by usingfxpoptat the command line, or by using theOptimized Fixed-Point Conversionworkflow in the定点工具

During the optimization process, the software changes the settings and model configuration parameters described below. You can restore these parameter settings after the optimization is complete in the Configuration Parameters dialog box or by using theset_param功能。您也可以使用KeepOriginalModelParameters选项exploreto maintain the original values of model parameters.

Reason for Parameter Change 范围 默认值 优化将价值更改为
Suppress Diagnostics 参数Downdowncastmsg 'error' “没有”
范围UnderflowMsg “没有” “没有”
FixptConstUnderflowMsg “没有” “没有”
parameterPrecisionLossmsg “没有” “没有”
FIXPTCONSTPRECISIONLOSSG “没有” “没有”
范围OverflowMsg 'error' “没有”
FixPtConstoverFlowMSG “没有” “没有”
IntegerOverflowMsg 'warning' “没有”
IntegerSaturationMsg 'warning' “没有”
Logging with the Simulation Data Inspector SignalLogging '上' '上'
ReturnWorkspaceOutputs '上' '上'
SaveFormat 'Dataset' 'Dataset'
减少结果的记忆消耗 省时间 '上' 'off'
SaveOutput '上' 'off'
模型有效性 SignalRangeChecking “没有” 'error'
了解结果 ShowportDatatypes 'off' '上'
Accelerate optimization 仿真模式 '普通的' '加速器'
数据类型覆盖 DataTypeOverride 'UseLocalSettings' 'Off'

您可以使用展览会method of theOptimizationSolution目的打印数据类型优化期间对MATLAB的更改的摘要®Command Window. For example, after optimizing data types according to the exampleOptimize Fixed-Point Data Typesuse展览会查看数据类型优化过程中所做的模型参数更改:

solution = result.Solutions(1); showContents(solution)
ModelName: 'ex_auto_gain_controller' ModelParameters: Index Name Value _____ __________________________ _____________ 1 SignalLogging 'on' 2 ReturnWorkspaceOutputs 'on' 3 SaveFormat 'Dataset' 4 ShowPortDataTypes 'on' 5 SignalRangeChecking 'error' 6 ParameterDowncastMsg 'none' 7 ParameterUnderflowMsg 'none' 8 ParameterPrecisionLossMsg'none' 9 ParameterOverflowMsg 'none' 10 FixptConstPrecisionLossMsg 'none' 11 FixptConstOverflowMsg 'none' 12 FixptConstUnderflowMsg 'none' 13 IntegerOverflowMsg 'none' 14 IntegerSaturationMsg 'none' 15 SaveTime 'off' 16 SaveOutput 'off' 17 SimulationMode 'accelerator' 18 DataTypeOverride'离开' ...

Detect downcast

Take no action when a parameter downcast occurs during simulation. Quantization effects, including downcasts, are expected during optimization. Optimized data types will meet all specified behavioral constraints. For more information, seeDetect downcast

范围:参数Downdowncastmsg
Value:“没有”
默认:'error'

Detect underflow

当参数量化在模拟过程中导致非零值将下流到零时,请采取任何行动。在模拟过程中发生固定点常数下流时,不采取任何动作。在优化期间,预期的量化效应(包括底流)。优化的数据类型将符合所有指定的行为约束。有关更多信息,请参阅Detect underflowandDetect underflow

范围:范围UnderflowMsg
Value:“没有”
默认:“没有”
范围:FixptConstUnderflowMsg
Value:“没有”
默认:“没有”

检测精度损失

Take no action when parameter precision loss or fixed-point constant precision loss occurs during simulation. Quantization effects, including precision loss, are expected during optimization. Optimized data types will meet all specified behavioral constraints. For more information, see检测精度损失and检测精度损失

范围:parameterPrecisionLossmsg
Value:“没有”
默认:'warning'
范围:FIXPTCONSTPRECISIONLOSSG
Value:“没有”
默认:“没有”

Detect overflow

如果在模拟过程中发生参数溢出或定点常数溢出,则不采取任何措施。在优化期间,预期的量化效应,包括溢出。优化的数据类型将符合所有指定的行为约束。有关更多信息,请参阅Detect overflowandDetect overflow

范围:范围OverflowMsg
Value:“没有”
默认:'error'
范围:FixPtConstoverFlowMSG
Value:“没有”
默认:“没有”

Wrap on overflow

如果信号的值溢出信号数据类型并包裹起来,则不采取任何措施。在优化期间,预期的量化效应,包括溢出。优化的数据类型将符合所有指定的行为约束。有关更多信息,请参阅Wrap on overflow

范围:IntegerOverflowMsg
Value:“没有”
默认:'warning'

在溢出上饱和

如果信号的值太大而无法用信号数据类型表示,从而导致饱和度。在优化期间,预期的量化效应,包括溢出。优化的数据类型将符合所有指定的行为约束。有关更多信息,请参阅在溢出上饱和

范围:IntegerSaturationMsg
Value:“没有”
默认:'warning'

信号记录

全球启用信号记录到该模型的工作区。优化要求此设置将指定信号记录到仿真数据检查器。有关更多信息,请参阅信号记录

范围:SignalLogging
Value:'上'
默认:'上'

单个仿真输出

启用单输出格式SIM命令将模拟结果返回金宝appsimulink.simulationOutput目的。优化要求此设置与仿真数据检查器进行日志信号。有关更多信息,请参阅单个仿真输出

范围:ReturnWorkspaceOutputs
Value:'上'
默认:'上'

Format

Store each logged state and output in aSimulink.SimulationData.Dataset目的。优化需要使用模拟数据检查器进行信号记录的设置。有关更多信息,请参阅Log Data to Persistent Storage

范围:SaveFormat
Value:'Dataset'
默认:'Dataset'

时间

Do not export time data to the MATLAB workspace during simulation. Optimization requires this setting to avoid unnecessary memory consumption. For more information, see时间

范围:省时间
Value:'off'
默认:'上'

输出

在仿真过程中,请勿将根OUTPORT信号数据导出到指定的MATLAB变量。优化需要使用模拟数据检查器进行信号记录的设置。有关更多信息,请参阅输出

范围:SaveOutput
Value:'off'
默认:'上'

模拟范围检查

Terminate the simulation when signals exceed specified minimum or maximum values. Optimization requires this setting to ensure that the simulation ranges of the model with optimized data types applied honors the specified design ranges. For more information, see模拟范围检查

范围:SignalRangeChecking
Value:'error'
默认:“没有”

显示端口数据类型

在模型框图上显示端口的数据类型。优化需要此设置,以使您可以轻松地检查应用于模型的优化数据类型。有关更多信息,请参阅Programmatic Model Editor Appearance Parameters

范围:ShowportDatatypes
Value:'上'
默认:'off'

Simulation mode

Simulate the model in accelerator mode. Optimization uses accelerator mode to reduce the amount of time required to optimize data types on your model. For more information, seeWhat Is Acceleration?

范围:仿真模式
Value:'加速器'
默认:'普通的'

数据类型覆盖

By default, optimization turns off any data type override set on your model so that the effect of optimized data types on model behavior is accurately represented during simulation. You can customize this behavior by using the advanced options offxpoptimizeptions。有关更多信息,请参阅Fixed-Point Instrumentation and Data Type Override

范围:DataTypeOverride
Value:'Off'
默认:'UseLocalSettings'

也可以看看

|

Related Topics