findstates(idmodel) - Estimate initial states of linear model from data

Syntax

X0 = findstates(MODEL,DATA)
X0 = findstates(MODEL,DATA,INIT)

Description

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.

Input

Input

Examples

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.

  1. Load sample data.

    load iddata1 % estimation data z1;
    
  2. Estimate the linear model from data.

    model = arx(z1, [2 2 1]); % idpoly model 
    
  3. Estimate the value of the initial states to best fit the data.

    x0est = findstates(model, z1); 
    
  4. Simulate the model.

    sim(model, z1.u, ‘init', x0est)  

    MATLAB® software responds with the following plot of the simulated response.

See Also

compare 
pe 
sim 

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS