System Identification Toolbox | ![]() ![]() |
nk and InputDelay
What's the difference between the properties nk
and InputDelay
? InputDelay
is defined for all idmodel
and idfrd
objects, while nk
is defined for idarx
, idpoly
as well as for 'Free'
and 'Canonical'
idss
models. Both properties indicate a delay from the input channels to the outputs. For idarx
, nk
is a matrix, describing the delays in the different input/output channels, but otherwise both nk
and InputDelay
describe the delay from a certain input channel to all the output channels.
InputDelay
is really a flag that tells the model to append the input delays as time lags, when the model is simulated, or as phase lags when the frequency functions are computed. The InputDelay
does not show up when the model is represented in state-space form, nor as transfer functions, nor in the input-output polynomials. InputDelay
can be used both for continuous and discrete time models. In the latter case, the InputDelay
is measured in number of samples. Moreover InputDelay
may assume negative values, in order to handle noncausal models.
The property nk
, on the other hand, is a model structure property, requiring the model to contain the indicated number of delays whatever the parameter values. This means that the state-space matrices, the transfer functions, etc., will show these delays in an explicit manner. Consequently, nk
is not defined for continuous-time models.
Otherwise the two properties can be used in the same way
give identical bode-plots (up to minor variations due to end-effects in the data records), while A1
and A2
are different. In fact while A1
is of size 4-by-4, the matrix A2
is of size 7-by-7, since three extra states are required to accommodate the extra 2+1 input delays.
Note that setting nk
to a certain value for a given model gives a model structure that has the indicated delay for any parameter values. The impulse response of the model may however change (not only be shifted) by this assignment.
![]() | No Covariance | Linear Regression Models | ![]() |