Main Content

ivstruc

Compute loss functions for sets of ARX model structures using instrumental variable method

Syntax

v = ivstruc(ze,zv,NN)
v = ivstruc(ze,zv,NN,p,maxsize)

Description

v = ivstruc(ze,zv,NN)computes the loss functions for sets of single-output ARX model structures.NNis a matrix that defines a number of different structures of the ARX type. Each row ofNNis of the form

nn = [na nb nk]

with the same interpretation as described forarx。Seestrucfor easy generation of typicalNNmatrices.

zeandzvareiddataobjects containing input-output data. Only time-domain data is supported. Models for each model structure defined inNNare estimated using the instrumental variable (IV) method on data setze。The estimated models are simulated using the inputs from data setzv。The normalized quadratic fit between the simulated output and the measured output inzvis formed and returned inv。The rows below the first row invare the transpose ofNN, and the last row contains the logarithms of the condition numbers of the IV matrix

ς ( t ) φ T ( t )

A large condition number indicates that the structure is of unnecessarily high order (see Ljung, L.System Identification: Theory for the User, Upper Saddle River, NJ, Prentice-Hall PTR, 1999, p. 498).

The information invis best analyzed usingselstruc

对于系统的例程。

v = ivstruc(ze,zv,NN,p,maxsize)specifies the computation of condition numbers and the size of largest matrix formed during computations. Ifpis equal to zero, the computation of condition numbers is suppressed.maxsizeaffects the speed/memory trade-off.

Note

The IV method used does not guarantee that the models obtained are stable. The output-error fit calculated invcan then be misleading.

Examples

collapse all

Create 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);

Create 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 a delay of2for all model configurations.

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

Compute the loss function for each model order combination. Suppress the computation of condition numbers.

V = ivstruc(ze,zv,NN,0);

Algorithms

一个最大订单使用le ARX模型计算ast squares method. Instruments are generated by filtering the input(s) through this model. The models are subsequently obtained by operating on submatrices in the corresponding large IV matrix.

References

[1] Ljung, L.System Identification: Theory for the User, Upper Saddle River, NJ, Prentice-Hall PTR, 1999.

Introduced before R2006a