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
InputInterSample — Input-channel intersample behavior
Input-channel intersample behavior for transformations between discrete time and continuous time, specified as
The definitions of the three behavior values are as follows:
'zoh'— Zero-order hold maintains a piecewise-constant input signal between samples.
'foh'— First-order hold maintains a piecewise-linear input signal between samples.
'bl'— Band-limited behavior specifies that the continuous-time input signal has zero power above the Nyquist frequency.
iddata objects have a similar property,
data.InterSample, that contains the same behavior value options.
InputInterSample value is
the estimation data is in an
software uses the
data.InterSample value. When the estimation data
is instead contained in a timetable or a matrix pair, with the
option, the software uses
The software applies the same option value to all channels and all experiments.
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.
Version HistoryIntroduced in R2012a
InputInterSample option allows intersample behavior specification for continuous models estimated from timetables or matrices.
iddata objects contain an
InterSample property that
describes the behavior of the signal between sample points. The
InputInterSample option implements a version of that property in
n4sidOptions so that intersample behavior can be specified also when
estimation data is stored in timetables or matrices.
R2018a: Renaming of Estimation and Analysis Options
The names of some estimation and analysis options were changed in R2018a. Prior names still work. For details, see the R2018a release note Renaming of Estimation and Analysis Options.