Option set for
opt = n4sidOptions
opt = n4sidOptions(Name,Value)
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
N4Weight — Weighting scheme used for singular-value decomposition by the
'auto' (default) |
Weighting scheme used for singular-value decomposition by the N4SID algorithm, specified as one of the following values:
'MOESP'— Uses the MOESP algorithm by Verhaegen .
'CVA'— Uses the Canonical Variate Algorithm by Larimore .
Estimation using frequency-domain data always uses
'SSARX'— A subspace identification method that uses an ARX estimation based algorithm to compute the weighting.
Specifying this option allows unbiased estimates when using data that is collected in closed-loop operation. For more information about the algorithm, see .
'auto'— The estimating function chooses between the
N4Horizon — Forward- and backward-prediction horizons used by the
'auto' (default) | vector
[r sy su] |
Forward- and backward-prediction horizons used by the N4SID algorithm, specified as one of the following values:
A row vector with three elements —
[r sy su], where
ris the maximum forward prediction horizon, using up to
syis the number of past outputs, and
suis the number of past inputs that are used for the predictions. See pages 209 and 210 in  for more information. These numbers can have a substantial influence on the quality of the resulting model, and there are no simple rules for choosing them. Making
k-by-3 matrix means that each row of
'N4Horizon'is tried, and the value that gives the best (prediction) fit to data is selected.
kis the number of guesses of
[r sy su]combinations. If you specify N4Horizon as a single column,
r = sy = suis used.
'auto'— The software uses an Akaike Information Criterion (AIC) for the selection of
OutputWeight — Weighting of prediction errors in multi-output estimations
 (default) |
'noise' | positive semidefinite symmetric matrix
Weighting of prediction errors in multi-output estimations, specified as one of the following values:
'noise'— Minimize , where E represents the prediction error and
Nis the number of data samples. This choice is optimal in a statistical sense and leads to the maximum likelihood estimates in case no data is available about the variance of the noise. This option uses the inverse of the estimated noise variance as the weighting function.
Positive semidefinite symmetric matrix (
W) — Minimize the trace of the weighted prediction error matrix
Eis the matrix of prediction errors, with one column for each output.
Wis the positive semidefinite symmetric matrix of size equal to the number of outputs. Use
Wto specify the relative importance of outputs in multiple-output models, or the reliability of corresponding data.
Nis the number of data samples.
— The software chooses between the
'noise'or using the identity matrix for
This option is relevant only for multi-output models.
Advanced — Additional advanced options
Additional advanced options, specified as a structure with the
the maximum number of elements in a segment when input-output data
is split into segments.
MaxSize must be a positive integer.
Create Default Options Set for State-Space Estimation Using Subspace Method
opt = n4sidOptions;
Specify Options for State-Space Estimation Using Subspace Method
Create an options set for
n4sid using the
'zero' option to initialize the state. Set the
opt = n4sidOptions('InitialState','zero','Display','on');
Alternatively, use dot notation to set the values of
opt = n4sidOptions; opt.InitialState = 'zero'; opt.Display = 'on';
 Larimore, W.E. “Canonical variate analysis in identification, filtering and adaptive control.” Proceedings of the 29th IEEE Conference on Decision and Control, pp. 596–604, 1990.
 Verhaegen, M. “Identification of the deterministic part of MIMO state space models.” Automatica, Vol. 30, 1994, pp. 61–74.
 Ljung, L. System Identification: Theory for the User. Upper Saddle River, NJ: Prentice-Hall PTR, 1999.
 Jansson, M. “Subspace identification and ARX modeling.” 13th IFAC Symposium on System Identification, Rotterdam, The Netherlands, 2003.