Main Content

struc

Generate model-order combinations for single-output ARX model estimation

Syntax

nn= struc(na,nb,nk)
nn= struc(na,nb_1,...,nb_nu,nk_1,...,nk_nu)

Description

nn= struc(na,nb,nk)generates model-order combinations for single-input, single-output ARX model estimation.naandnbare row vectors that specify ranges of model orders.nkis a row vector that specifies a range of model delays.nnis a matrix that contains all combinations of the orders and delays.

nn= struc(na,nb_1,...,nb_nu,nk_1,...,nk_nu)generates model-order combinations for an ARX model withnuinput channels.

Examples

collapse all

创建estimation and validation data sets

loadiddata1; ze = z1(1:150); zv = z1(151:300);

Generate model-order combinations for estimation, specifying ranges for model orders and delays.

NN = struc(1:3,1:2,2:4);

Estimate ARX models using the instrumental variable method, and compute the loss function for each model order combination.

V = ivstruc(ze,zv,NN);

Select the model order with the best fit to the validation data.

order = selstruc(V,0);

Estimate an ARX model of selected order.

M = iv4(ze,order);

创建estimation and validation data sets.

loadco2data; Ts = 0.5;% Sample time is 0.5 minze = iddata(Output_exp1,Input_exp1,Ts); zv = iddata(Output_exp2,Input_exp2,Ts);

Generate model-order combinations for:

  • na=2:4

  • nb=2:5for the first input, and1or4for the second input.

  • nk=1:4for the first input, and0for the second input.

NN = struc(2:4,2:5,[1 4],1:4,0);

Estimate an ARX model for each model order combination.

V = arxstruc(ze,zv,NN);

Select the model order with the best fit to the validation data.

order = selstruc(V,0);

Estimate an ARX model of selected order.

M = arx(ze,order);

Tips

  • Use witharxstrucorivstructo compute loss functions for ARX models, one for each model order combination returned bystruc.

Introduced before R2006a