Get input/output delay information for `idnlarx`

model
structure

`DELAYS = getDelayInfo(MODEL)`

DELAYS = getDelayInfo(MODEL,TYPE)

`DELAYS = getDelayInfo(MODEL)`

obtains the
maximum delay in each input and output variable of an `idnlarx`

model.

`DELAYS = getDelayInfo(MODEL,TYPE)`

lets
you choose between obtaining maximum delays across all input and output
variables or maximum delays for each output variable individually.
When delays are obtained for each output variable individually a matrix
is returned, where each row is a vector containing *n _{y}*+

*n*is the number of outputs of_{y}`MODEL`

.*n*is the number of inputs of_{u}`MODEL`

.

Delay information is useful for determining the number of states
in the model. For nonlinear ARX models, the states are related to
the set of delayed input and output variables that define the model
structure (regressors). For example, if an input or output variable *p* has
a maximum delay of *D* samples, then it contributes *D* elements
to the state vector:

*p*(*t*-1), *p*(*t*-2),
...*p*(*t*-*D*)

The number of states of a nonlinear ARX model equals the sum
of the maximum delays of each input and output variable. For more
information about the definition of states for `idnlarx`

models,
see Definition of idnlarx States

`getDelayInfo`

accepts the following arguments:

`MODEL`

:`idnlarx`

model.`TYPE`

: (Optional) Specifies whether to obtain channel delays`'channelwise'`

or`'all'`

as follows:`'all'`

: Default value.`DELAYS`

contains the maximum delays across each output (vector of*n*+_{y}*n*entries, where_{u}`[ny, nu] = size(MODEL)`

).`'channelwise'`

:`DELAYS`

contains delay values separated for each output (*n*-by-(_{y}*n*+_{y}*n*) matrix)._{u}

`DELAYS`

: Contains delay information in a vector of length*n*+_{y}*n*arranged with output channels preceding the input channels, i.e.,_{u}`[y1, y2,.., u1, u2,..]`

.

In the following example you create a 2-output, 3-input nonlinear
ARX model, then verify the number of delays using `getDelayInfo`

.

Create an

`idnlarx`

model.M = idnlarx([2 0 2 2 1 1 0 0; 1 0 1 5 0 1 1 0],... 'linear');

Compute the maximum delays for each output variable individually.

Del = getDelayInfo(M,'channelwise') Del = 2 0 2 1 0 1 0 1 5 0

The matrix `Del`

contains the maximum
delays for the first and second output of the model `M`

.
You can interpret the contents of matrix `Del`

as
follows:

In the dynamics for the output 1 (

*y*) of model_{1}`M`

, the maximum delays for each input/output channel are as follows:*y*: 2,_{1}*y*: 0,_{2}*u*: 2,_{1}*u*: 1,_{2}*u*:0._{3}Similarly, in the dynamics for the output 2 (

*y*) of the model, the maximum delays in channels_{2}*y*,_{1}*y*,_{2}*u*,_{1}*u*,_{2}*u*are 1, 0, 1, 5, and 0 respectively._{3}

You can find the maximum delays for all the input and
output variables in the order (*y _{1}*,

Del=getDelayInfo(M, 'all')

which returns

Del = 2 0 2 5 0

`Del` , there are 5 terms
corresponding to u in the
state vector ((_{5}u(_{5}t-1),
...u(_{5}t-5).
Applying this definition to all I/O channels, the complete state vector
for model `M` becomes:
t-1), y(_{1}t-2), u(_{1}t-1), u(_{1}t-2), u(_{2}t-1), u(_{2}t-2), u(_{2}t-3), u(_{2}t-4), u(_{2}t-5)] |

Was this topic helpful?