主要内容

估计模型参数值(GUI)

此示例显示了如何使用实验数据估计模型参数。您可以估计发动机节气门系统的参数。

Engine Throttle System Model

打开Simulin金宝appk®型号。

open_system('spe_engine_throttle')

Throttle Model Description

这throttle controls the air mass flow into the intake manifold of an engine. The throttle body contains a butterfly valve that opens when the driver presses down on the accelerator pedal. This lets more air enter the cylinders and causes the engine to produce more torque.

A DC motor controls the opening angle of the butterfly valve. There is also a spring attached to the valve to return it to its closed position when the DC motor is de-energized. The amount of rotation of the valve is limited to approximately 90 degrees. Therefore, if a large command input is applied to the motor, the valve hits the hard stops preventing it from rotating further.

电动机被建模为带有参数kt和input_delay的扭矩增益和时间延迟输入。蝴蝶阀被建模为具有参数J,C和K的质量弹簧式抑制系统。该系统通过硬停止进行增强,以将阀门的开口限制在90度。但是,已知模型组件,但是,系统的参数值不准确。

估计实验数据

Double-click the Parameter Estimation with preloaded data block in the model to open a pre-configured estimation GUI session.

这saved estimation project defines three experiments; the估计数据experiment is used for parameter estimation, whileValidationData1,ValidationData2用于验证估计参数。这估计绘制了实验。

这signal data for the experiments can be imported from various sources including MATLAB® variables, MAT files, Excel® files, or comma-separated-value files. See导入和预处理实验数据(GUI)for more information.

这experiment plot is also used to see how well the measured data matches the current model. Click图模型响应to display simulated signal data on the experiment plots.

仿真结果表明,该模型与测量数据不匹配,需要估算模型参数。

Estimated Parameters

这next step is to define the parameter to estimate. Click选择参数to open a dialog to select model parameters to estimate. This example contains four unknown parameters; the butterfly valve inertia,J;the damping coefficient,c;the return spring constant,k;电动机响应的时间滞后,input_delay

Since it is known from physical insight that all of these parameters have positive values, set their lower limits to zero. Also, put an upper bound of 0.1 sec on theinput_delay范围。您还可以选择参数的初始值。这些可以来自确定参数的某些公式的一些快速计算。

单击右箭头切换按钮以修改参数最小和最大边界。

估计任务

After selecting the parameters for estimation, select the experiments to use for estimation. Click选择实验和select估计数据for estimation.

You can now start the estimation but first create plots to monitor the estimation progress. Click添加图和selectParameter Trajectory。这创建了一个图,以显示估计参数值在估计过程中的变化。点击View选项卡以布局图,以便实验图:估计数据EstimatedParams都可见。

点击Estimate按钮开始估计。您可以通过设置成本功能combobox and clickingMore Options

While the estimation is running, the plots update and a dialog showing estimation progress appears. The progress dialog shows the estimation iterations, the number of times the model has been evaluated (F-count), and the estimation cost at each iteration.

After a number of iterations the estimation converges and terminates. The model is updated with the estimated parameters and the estimation results are saved in the data browser. To see the details of the estimation result, right-clickEstimatedParams和selectOpen

Validation

It is important to validate the estimation results against other experiments. A successful estimation will not only match the experimental data that was used for estimation but also other independent measured data that were collected in experiments.

To select experiments for validation, click theValidationtab and click选择实验。选择两者ValidationData1ValidationData2用于验证。

Click选择结果选择用于验证的估计结果。选择EstimatedParams和deselectUse current parameter values

ClickValidate验证估计结果针对验证实验。验证使用估计参数和选定的实验模拟模型,并创建显示测量和仿真数据的图。使用View选项卡以布局图,以便theExperiment plot:ValidationData1Experiment plot:ValidationData2都可见。

这validation plots confirm that the estimation was successful. The plots also show that the estimated parameters are robust enough to handle a variety of inputs.

Related Examples

To learn how to estimate model parameters using theSDO.优越command, see估计模型Parameter Values (Code)

Close the model.

bdclose('spe_engine_throttle')