主要内容

nlgreyest

Estimate nonlinear grey-box model parameters

描述

example

sys= nlgreyest(数据,init_sys)estimates the parameters of a nonlinear grey-box model,init_sys, using time-domain data,数据

example

sys= nlgreyest(数据,init_sys,选项)specifies additional model estimation options.

例子

全部收缩

Load data.

负载(fullfile(Matlabroot,,'工具箱','ident','iddemos','数据','twotankdata');z = iddata(y,u,0.2,'Name',“两个坦克”);

The data contains 3000 input-output data samples of a two tank system. The input is the voltage applied to a pump, and the output is the liquid level of the lower tank.

指定描述两个坦克系统模型结构的文件。该文件将状态导数和模型输出指定为时间,状态,输入和模型参数的函数。

FileName ='twotanks_c';

Specify model orders [ny nu nx].

Order = [1 1 2];

指定初始参数(NP = 6)。

参数= {0.5; 0.0035; 0.019;。。。9.81; 0.25; 0.016};

Specify initial initial states.

初始状态= [0; 0.1];

Specify as continuous system.

Ts = 0;

创造艾德格里model object.

nlgr = idnlgrey(文件名,订单,参数,初始状态,TS,,。。。'Name',“两个坦克”);

Set some parameters as constant.

nlgr.parameters(1).fixed = true;nlgr.parameters(4).fixed = true;nlgr.parameters(5).fixed = true;

Estimate the model parameters.

nlgr = nlgreyest(z,nlgr);

创造estimation option set fornlgreyestto view estimation progress, and to set the maximum iteration steps to 50.

opt = nlgreyestoptions;opt.display ='on';opt.SearchOptions.MaxIterations = 50;

Load data.

负载(fullfile(Matlabroot,,'工具箱','ident','iddemos','数据','dcmotordata');z = iddata(y,u,0.1,'Name',“ DC运动”);

The data is from a linear DC motor with one input (voltage), and two outputs (angular position and angular velocity). The structure of the model is specified bydcmotor_m.m文件。

创建一个非线性灰色框模型。

file_name ='dcmotor_m';顺序= [2 1 2];参数= [1; 0.28];初始状态= [0; 0];init_sys = idnlgrey(file_name,订单,参数,初始状态,0,0,。。。'Name',“ DC运动”);

使用估计选项估算模型参数。

sys = nlgreyest(z,init_sys,opt);

输入参数

全部收缩

Time-domain estimation data, specified as aniddata目的。数据has the same input and output dimensions asinit_sys

如果指定InterSampleproperty of数据as'bl'(带限制)和模型是连续的,该软件将数据视为插值的一阶(FOH)以进行估计。

构建的非线性灰色盒模型that configures the initial parameterization ofsys, specified as an艾德格里目的。init_syshas the same input and output dimensions as数据。创造init_sysusing艾德格里

Estimation options for nonlinear grey-box model identification, specified as annlgreyestOptions选项集。

Output Arguments

全部收缩

Nonlinear grey-box model with the same structure asinit_sys,作为一个艾德格里目的。The parameters ofsysare estimated such that the response ofsys匹配估计数据中的输出信号。

有关所使用的估计结果和选项的信息存储在Report模型的属性。Report具有以下字段:

报告字段 描述
Status

Summary of the model status, which indicates whether the model was created by construction or obtained by estimation.

Method

Name of the simulation solver and the search method used during estimation.

合身

Quantitative assessment of the estimation, returned as a structure. See损失功能和模型质量指标for more information on these quality metrics. The structure has the following fields:

Field 描述
fitpercent

标准化的根平方误差(NRMSE)测量模型的响应拟合估计数据的效果,以百分比表示fitpercent= 100(1-NRMSE)。

Lossfcn

Value of the loss function when the estimation completes.

MSE

平均平方误差(MSE)测量模型响应拟合估计数据的程度。

FPE

模型的最终预测错误。

AIC

Raw Akaike Information Criteria (AIC) measure of model quality.

AICc

小样本大小校正的AIC。

naic

Normalized AIC.

BIC

Bayesian Information Criteria (BIC).

Parameters

模型参数的估计值。带有以下字段的结构:

Field 描述
初始价值 估计前具有参数和初始状态值的结构。
Parvector Value of parameters after estimation.
Free

逻辑向量在估计过程中指定参数的固定或自由状态

自由度 Covariance of the free parameters.
X0 估计后初始状态的价值。
X0COVARIANCE 初始状态的协方差。

OptionsUsed

Option set used for estimation. If no custom options were configured, this is a set of default options. SeenlgreyestOptions了解更多信息。

兰斯特

估计开始时随机数流的状态。空的,[],如果在估计过程中未使用随机化。有关更多信息,请参阅RNG

DataUsed

Attributes of the data used for estimation — Structure with the following fields:

Field 描述
Name

Name of the data set.

类型

数据类型 - 用于艾德格里模型,这将设置为时间域数据的

Length

Number of data samples.

Ts

采样时间。这等同于data.ts

InterSample

Input intersample behavior. One of the following values:

  • 'zoh'— Zero-order hold maintains a piecewise-constant input signal between samples.

  • 'foh'- 一阶保持在样品之间保持分段线性输入信号。

  • 'bl'— Band-limited behavior specifies that the continuous-time input signal has zero power above the Nyquist frequency.

的价值Intersamplehas no effect on estimation results for discrete-time models.

输入

空的,[], for nonlinear estimation methods.

输出offset

空的,[], for nonlinear estimation methods.

终止

终止conditions for the iterative search used for prediction error minimization, returned as a structure with the following fields:

Field 描述
为什么挡住

终止数值搜索的原因。

迭代

估计算法执行的搜索迭代次数。

第一阶段

-norm of the gradient search vector when the search algorithm terminates.

FcnCount

Number of times the objective function was called.

UpdateNorm

最后一次迭代中梯度搜索向量的规范。搜索方法是'lsqnonlin'或者'fmincon'

最后的改进

上次迭代的标准改进,表示为百分比。搜索方法是'lsqnonlin'或者'fmincon'

Algorithm

使用的算法'lsqnonlin'或者'fmincon'search method. Omitted when other search methods are used.

For estimation methods that do not require numerical search optimization, the终止省略了字段。

有关更多信息,请参阅Estimation Report

Extended Capabilities

Version History

在R2015a中引入