Estimate initial states of identified linear state-space model from data
x0 = findstates(sys,data)
x0 = findstates(sys,data,K)
x0 = findstates(sys,data,K,opt)
Identified linear state-space model.
Specify sys as an idss or idgrey model.
Specify data as an iddata object with input/output dimensions that match sys.
data can be a frequency-domain iddata object. Ideally, the frequency vector of data should be symmetric about the origin.
If you are converting time-domain data into frequency-domain data, use fft. Use the 'compl' input argument with fft and ensure that there is sufficient zero padding. Note that for an N-point fft, the input/output signals are scaled by 1/sqrt(N). Therefore, the estimated x0 vector is also scaled by this factor. So, scale your data appropriately when you compare x0 between the time-domain and frequency-domain.
Prediction horizon for computing the response of sys.
Specify K as a positive integer between 1 and Inf. The most common values used are:
For continuous-time models, specify K as either 1 or Inf.
For continuous-time frequency-domain data, specify K as Inf.
Default: 1 (for all data except continuous-time frequency-domain data)
opt is an options set that allows you to constrain the initial state, remove signal offsets, etc.
Use findstatesOptions to create the options set.
Estimated initial state.
For multi-experiment data, x0 is a matrix with one column for each experiment.
Estimate an idss 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 z1;
Estimate a linear model from the data.
model = ssest(z1,2);
Estimate the value of the initial states to best fit the measured output z1.y.
x0est = findstates(model,z1,Inf);
Simulate the model.
opt = simOptions('InitialCondition',x0est); sim(model,z1(:,,:),opt);