nlgreyest
Estimate nonlinear grey-box model parameters
描述
例子
Selectively Estimate Parameters of Nonlinear Grey-Box Model
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);
Estimate a Nonlinear Grey-Box Model Using Specific Options
创造estimation option set fornlgreyest
to 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 data
iddata
object
Time-domain estimation data, specified as aniddata
目的。数据
has the same input and output dimensions asinit_sys
。
如果指定InterSample
property of数据
as'bl'
(带限制)和模型是连续的,该软件将数据视为插值的一阶(FOH)以进行估计。
选项
—Estimation options
nlgreyestOptions
选项集
Estimation options for nonlinear grey-box model identification, specified as annlgreyestOptions
选项集。
Output Arguments
sys
- 估计的非线性灰色盒模型
艾德格里
object
Nonlinear grey-box model with the same structure asinit_sys
,作为一个艾德格里
目的。The parameters ofsys
are 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:
|
||||||||||||||||||
Parameters |
模型参数的估计值。带有以下字段的结构:
|
||||||||||||||||||
OptionsUsed |
Option set used for estimation. If no custom options were configured, this is a set of default options. See |
||||||||||||||||||
兰斯特 |
估计开始时随机数流的状态。空的, |
||||||||||||||||||
DataUsed |
Attributes of the data used for estimation — Structure with the following fields:
|
||||||||||||||||||
终止 |
终止conditions for the iterative search used for prediction error minimization, returned as a structure with the following fields:
For estimation methods that do not require numerical search optimization, the |
有关更多信息,请参阅Estimation Report。
Extended Capabilities
自动平行支持金宝app
通过使用并行计算工具箱™自动运行计算来加速代码。
Parallel computing support is available for estimation using thelsqnonlin
搜索方法(需要优化工具箱™)。要启用并行计算,请使用nlgreyestOptions
, setSearchMethod
to'lsqnonlin'
, and setSearchOptions.Advanced.UseParallel
to真的
。
例如:
opt = nlgreyestoptions;opt.searchmethod ='lsqnonlin';opt.SearchOptions.Advanced.UseParallel = true;
Version History
MATLABコマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
matlabコマンドコマンドに入力しててください。。。。ブラウザー
选择一个网站
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:。
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)