System Identification Toolbox | ![]() ![]() |
Optional Variables
The estimation functions accept a list of property name/property value pairs that may affect both the model structure and the estimation algorithm. For complete lists of these properties, see algorithm properties
, idarx
, idmodel
, idpoly
, idss
, and idgrey
in the Function Reference. Some of them are listed here. Note that any property, as well as values that are strings, can be entered as any unambiguous, case-insensitive abbreviation, as is
Applying to All Estimation Methods
The following properties apply to all estimation methods:
Focus
: This property affects the weighting applied to the fit between the model and the data. It can be used to assure that the model approximates the true system well over certain frequency intervals. Focus
can assume the following values:
idpoly
models and K=0 for idss
models) there is no difference between the Simulation and Prediction values. For models with a disturbance description, this is estimated by a prediction error method, keeping the estimated transfer function from input to output fixed. The resulting model is guaranteed to be stable.
idfilt
. The filter can be specified in a few different ways:
MaxSize
: No matrix with more than MaxSize
elements is formed by the algorithm. Instead, for
loops will be used. MaxSize
will thus decide the memory/speed trade-off, and can prevent slow use of virtual memory. MaxSize
can be any positive integer, but it is of course required that the input-output data themselves contain less than MaxSize
elements. The default value of MaxSize
is Auto
, which means that the value is determined in the M-file idmsize
. This file may be edited by the user to optimize speed on a particular computer. See also Memory/Speed Trade-Offs.
FixedParameter
: A list of parameters that will be kept fixed to the nominal/initial values and not estimated. This is a vector of integers containing the indices of the fixed parameters, or a cell array of parameter names. If names are used, wildcard entries apply, which may be convenient if you have groups of parameters in your model. See the reference page of Algorithm properties.
Algorithm Properties That Apply to n4sid, Estimating State-Space Models
The properties that apply to sub-space model estimation are:
These properties then also apply to pem
for estimating black-box state-space models, since pem
is then initialized by the n4sid
estimate
N4Weight
: This property determines some weighting matrices used in the singular-value decomposition that is a central step in the algorithm. Two choices are offered: moesp
that corresponds to the MOESP algorithm by Verhaegen and cva
which is the canonical variable algorithm by Larimore. The default value is N4Weight = Auto
, which gives an automatic choice between the two options.
N4Horison
: Determines the prediction horizons forward and backward, used by the algorithm. This is a row vector with three elements: N4Horison =[r sy su]
, where r
is the maximum forward prediction horizon, i.e., the algorithms uses up to r
-step ahead predictors. sy
is the number of past outputs, and su
is the number of past inputs that are used for the predictions. See Ljung (1999), pages 345-348. These numbers may have a substantial influence of the quality of the resulting model, and there are no simple rules for choosing them. Making N4Horizon
a k-by-3 matrix means that each row of N4Horison
will be tried out, and the value that gives the best (prediction) fit to data will be selected. If you specify only one column in N4Horizon
, the interpretation is r=sy=su
. The default choice is N4Horizon = Auto
, which uses the Akaike Information Criterion (AIC) for the selection of sy
and su
. See the reference page for n4sid
for literature references.
Properties That Apply to Estimation Methods Using Iterative Search for Minimizing a Criterion
The properties that govern the iterative search are:
These properties apply to armax, bj, oe, and pem
Trace
: This property determines the information about the iterative search that is provided to the MATLAB command window:
SSParameterization
case for idss
models)
LimitError
: This variable determines how the criterion is modified from quadratic to one that gives linear weight to large errors. Errors larger than LimitError
times the estimated standard deviation will carry a linear weight in the criteria. The default value of LimitError
is 1.6. LimitError =0
disables the robustification and leads to a purely quadratic criterion. The standard deviation is estimated robustly as the median of the absolute deviations from the median, divided by 0.7. (See Eq. (15.9)-(15.10) in Ljung (1999).)
MaxIter
: The maximum number of iterations performed during the search for minimum. The iterations will stop when MaxIter
is reached, or some other stopping criterion is satisfied. The default value of MaxIter
is 20. Setting MaxIter=0
will return the result of the start-up procedure. The actual number of used iterations is given by the property EstimationInfo.Iterations
.
Tolerance
: Based on the Gauss-Newton vector computed at the current parameter value, an estimate is made of the expected improvement of the criterion at the next iteration. When this expected improvement is less than Tolerance %
, the iterations are stopped. Default value: 0.01.
SearchDirection
: The direction along which a line search is performed to find a lower value of the criterion function. It may assume the following values:
pinvtol
of the Hessian are neglected, and the Gauss-Newton direction is computed in the remaining subspace. (pinvtol
is part of the 'advanced
' field: See Algorithm Properties
in the "Command Reference".
pinv(H+d*I)*grad
from the previous one, where H
is the Hessian, I is the identity matrix, grad
is the gradient. d
is a number that is increased until a lower value of the criterion is found.
One property of the returned model is EstimationInfo
. That is a structure that contains useful information about the estimation process. See EstimationInfo
in "Command Reference" for a list of fields.
Another important option is InitialState.
See Initial State.
For the spectral analysis estimate, you can compute the frequency functions at arbitrary frequencies. If the frequencies are specified in a row vector w
, then
results in g
being computed at these frequencies. You can generate logarithmically spaced frequencies using the MATLAB logspace
function. For example
![]() | State-Space Models | Defining Model Structures | ![]() |