| System Identification Toolbox™ | ![]() |
X0 = findstates(MODEL,DATA)
X0 = findstates(MODEL,DATA,INIT)
X0 = findstates(MODEL,DATA) estimates the initial states of MODEL that provide the best fit to output signal in DATA.
X0 = findstates(MODEL,DATA,INIT) specifies how the initial states should be estimated using the flag INIT.
MODEL: idmodel object. If MODEL is not in state-space form, initial states must be interpreted as state values corresponding to idss(MODEL).
DATA: iddata object with matching input/output dimensions.
INIT: Flag indicating how the initial states should be estimated. This flag can have the following values:
'e': (Default) Estimate initial state so that the norm of prediction error is minimized.
'd': (Only available for discrete-time models) Same as 'e', but if MODEL.InputDelay is non-zero, these delays are first converted to explicit model delays, and the extra initial states (those corresponding to the delays) are also estimated and returned.
X0: Estimated initial state vector corresponding to time DATA.TStart. For multi-experiment data, X0 is a matrix with as many columns as there are experiments.
In this example you estimate an idpoly model and simulate it such that the response of the estimated model matches the estimation data's output signal as closely as possible.
Load sample data.
load iddata1 % estimation data z1;
Estimate the linear model from data.
model = arx(z1, [2 2 1]); % idpoly model
Estimate the value of the initial states to best fit the data.
x0est = findstates(model, z1);
Simulate the model.
sim(model, z1.u, ‘init', x0est)
MATLAB® software responds with the following plot of the simulated response.

| compare | |
| pe | |
| sim |
![]() | findop(idnlhw) | findstates(idnlarx) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |