Option set for ssest
ssestOptions object to specify options for estimating
state-space models using the
ssest function. You can specify options such as
the handling of initial states, stability enforcement, and the numerical search method to be
used in estimation.
InitializeMethod — Algorithm used to initialize the state-space parameters
'auto' (default) |
Algorithm used to initialize the state-space parameter values for
ssest, specified as one of the following values:
lsrf, if the system is non-MIMO, the data is frequency-domain, and the state-space parameters are real-valued.
n4sidotherwise (time-domain, MIMO, or with complex-valued state-space parameters).
'n4sid'— Subspace state-space estimation approach — can be used with all systems (see
'lsrf'— Least-squares rational function estimation-based approach  (see Continuous-Time Transfer Function Estimation Using Continuous-Time Frequency-Domain Data) — can provide higher-accuracy results for non-MIMO frequency-domain systems with real-valued state-space parameters, but cannot be used for any other systems (time-domain, MIMO, or with complex-valued state-space parameters).
InitialState — Handling of initial states
'auto' (default) |
'backcast' | vector | parametric initial condition object (
Handling of initial states during estimation, specified as one of the following values:
'zero'— The initial state is set to zero.
'estimate'— The initial state is treated as an independent estimation parameter.
'backcast'— The initial state is estimated using the best least squares fit.
ssestchooses the initial state handling method, based on the estimation data. The possible initial state handling methods are
Vector of doubles — Specify a column vector of length Nx, where Nx is the number of states. For multiple-experiment data, specify a matrix with Ne columns, where Ne is the number of experiments. The specified values are treated as fixed values during the estimation process.
Parametric initial condition object (
x0obj) — Specify initial conditions by using
idparto create a parametric initial condition object. You can specify minimum/maximum bounds and fix the values of specific states using the parametric initial condition object. The free entries of
x0objare estimated together with the
Use this option only for discrete-time state-space models.
N4Weight — Weighting scheme used for singular-value decomposition by the N4SID algorithm
'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 .
'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 MOESP and CVA algorithms.
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. The algorithm uses 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
WeightingFilter — Weighting prefilter
 (default) | vector | matrix | cell array | linear system |
Weighting prefilter applied to the loss function to be minimized during estimation.
To understand the effect of
WeightingFilter on the loss function, see
Loss Function and Model Quality Metrics.
WeightingFilter as one of the values in the following
|No weighting prefilter is used.|
Specify a row vector or matrix containing frequency values that
define desired passbands. You select a frequency band where the fit between
estimated model and estimation data is optimized. For example, specify
Passbands are expressed in
Specify a single-input-single-output (SISO) linear filter in one of the following ways:
Applicable for frequency-domain data only. Specify a column vector of
weights. This vector must have the same length as the frequency vector of the
Applicable for estimation using frequency-response data only. Use as the weighting filter, where G(ω) is the complex frequency-response data. Use this option for capturing relatively low amplitude dynamics in data, or for fitting data with high modal density. This option also makes it easier to specify channel-dependent weighting filters for MIMO frequency-response data.
Applicable for estimation using frequency-response data only. Use as the weighting filter. Use this option for capturing relatively low amplitude dynamics in data, or for fitting data with high modal density. This option also makes it easier to specify channel-dependent weighting filters for MIMO frequency-response data.
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.
Advanced — Additional advanced options
Additional advanced options, specified as a structure with the fields in the following table.
Error threshold at which to adjust the weight of large errors from quadratic to linear.
Errors larger than
Maximum number of elements in a segment when input-output data is split into segments.
Threshold for stability tests.
Threshold at which to automatically estimate initial conditions.
The software estimates the initial conditions when:
Specifies if the Data Driven Coordinates algorithm  is used to estimate freely parameterized state-space models.
Create Default Option Set for State Space Estimation
opt = ssestOptions
Option set for the ssest command: InitializeMethod: 'auto' InitialState: 'auto' N4Weight: 'auto' N4Horizon: 'auto' Display: 'off' InputInterSample: 'auto' InputOffset:  OutputOffset:  EstimateCovariance: 1 OutputWeight:  Focus: 'prediction' WeightingFilter:  EnforceStability: 0 SearchMethod: 'auto' SearchOptions: '<Optimization options set>' Regularization: [1x1 struct] Advanced: [1x1 struct]
Specify Options for State Space Estimation
Create an option set for
ssest using the "
backcast" algorithm to initialize the state and set the
Display to "
opt = ssestOptions("InitialState","backcast","Display","on")
Option set for the ssest command: InitializeMethod: 'auto' InitialState: 'backcast' N4Weight: 'auto' N4Horizon: 'auto' Display: 'on' InputInterSample: 'auto' InputOffset:  OutputOffset:  EstimateCovariance: 1 OutputWeight:  Focus: 'prediction' WeightingFilter:  EnforceStability: 0 SearchMethod: 'auto' SearchOptions: '<Optimization options set>' Regularization: [1x1 struct] Advanced: [1x1 struct]
Alternatively, use dot notation to set the values of
opt = ssestOptions; opt.InitialState = "backcast"; opt.Display = "on";
 Larimore, Wallace 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, Michel. "Identification of the deterministic part of MIMO state space models given in innovations form from input-output data." Automatica, Vol. 30, No. 1, 1994, pp. 61–74. https://doi.org/10.1016/0005-1098(94)90229-1
 Wills, Adrian, B. Ninness, and S. Gibson. “On Gradient-Based Search for Multivariable System Estimates.” Proceedings of the 16th IFAC World Congress, Prague, Czech Republic, July 3–8, 2005. Oxford, UK: Elsevier Ltd., 2005.
 Ljung, Lennart. System Identification: Theory for the User. Upper Saddle River, NJ: Prentice-Hall PTR, 1999.
 McKelvey, Tomas, A. Helmersson, and T. Ribarits. “Data driven local coordinates for multivariable linear systems and their application to system identification.” Automatica, Volume 40, No. 9, 2004, pp. 1629–1635.
 Jansson, Magnus. “Subspace identification and ARX modeling.” 13th IFAC Symposium on System Identification , Rotterdam, The Netherlands, 2003.
 Ozdemir, Ahmet Arda, and S. Gumossoy. "Transfer Function Estimation in System identification Toolbox via Vector Fitting." Proceedings of the 20th World Congress of the International Federation of Automatic Control. Toulouse, France, July 2017.
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
ssestOptions 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.