Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

selstruc

Select model order for single-output ARX models

Syntax

nn = selstruc(v)
[nn,vmod] = selstruc(v,c)

Description

    Note:   Use selstruc for single-output systems only. selstruc supports both single-input and multiple-input systems.

selstruc is a function to help choose a model structure (order) from the information contained in the matrix v obtained as the output from arxstruc or ivstruc.

The default value of c is 'plot'. The plot shows the percentage of the output variance that is not explained by the model as a function of the number of parameters used. Each value shows the best fit for that number of parameters. By clicking in the plot you can examine which orders are of interest. When you click Select, the variable nn is exported to the workspace as the optimal model structure for your choice of number of parameters. Several choices can be made.

c = 'aic' gives no plots, but returns in nn the structure that minimizes

Vmod=log(V(1+2dN))=log(V)+2dN,Nd

where V is the loss function, d is the total number of parameters in the structure in question, and N is the number of data points used for the estimation. log(V)+2dN is the Akaike's Information Criterion (AIC). See aic for more details.

c = 'mdl' returns in nn the structure that minimizes Rissanen's Minimum Description Length (MDL) criterion.

Vmod=V(1+dlog(N)N)

When c equals a numerical value, the structure that minimizes Vmod=V(1+cdN)

is selected.

The output argument vmod has the same format as v, but it contains the logarithms of the accordingly modified criteria.

Examples

collapse all

Create estimation and validation data sets

load iddata1;
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);

Create estimation and validation data sets.

load co2data;
Ts = 0.5; % Sample time is 0.5 min
ze = iddata(Output_exp1,Input_exp1,Ts);
zv = iddata(Output_exp2,Input_exp2,Ts);

Generate model-order combinations for:

  • na = 2:4

  • nb = 2:5 for the first input, and 1 or 4 for the second input.

  • nk = 1:4 for the first input, and 0 for 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);

Introduced before R2006a

Was this topic helpful?