findstates(idnlhw)

Estimate initial states of nonlinear Hammerstein-Wiener model from data

Syntax

X0 = findstates(MODEL,DATA)
X0 = findstates(MODEL,DATA,X0INIT)
X0 = findstates(MODEL,DATA,X0INIT,PVPairs)
[X0, REPORT] = findstates(...)

Description

X0 = findstates(MODEL,DATA) estimates the initial states of an idnlhw model from given data. The states of an idnlhw model are defined as the states of its embedded linear model (Model.LinearModel). For more information about the states of idnlhw models, see Definition of idnlhw States.

X0 = findstates(MODEL,DATA,X0INIT) specifies an initial guess for value of X0 using X0INIT.

X0 = findstates(MODEL,DATA,X0INIT,PVPairs) specifies property-value pairs representing the algorithm properties that control the numerical optimization process.

[X0, REPORT] = findstates(...) creates a report to summarize results of numerical optimization that is performed to search for the model states.

Input

Input

Examples

In this example, you create an idnlarx model from sample data and estimate initial states using another data set. Next you jointly estimate the states for separate data sets contained in multi-experiment data.

  1. Load the data and create iddata objects z1 and z2.

    load twotankdata
    
    z = iddata(y, u, 0.2,'Name','Two tank system');
    z1 = z(1:1000); z2 = z(1001:2000);
  2. Estimate an idnlhw model from data.

    m1=nlhw(z1,[4 2 1], 'unitgain' , 'pwlinear')
    
  3. Estimate the initial states of m1 using data z2.

    % Estimate initial states. View estimation trace and use 
    % only 5 iterations in the search algorithm
    X0 = findstates(m1, z2, [], 'MaxIter', 5, 'Trace', 'on')
  4. Estimate states using multiple-experiment data. There are separate sets of initial states for each experiment. The states of all data experiments are jointly estimated, and X0 is returned as a matrix with as many columns as there are data experiments.

    zm = merge(z1,z2);
    X0 = findstates(m1, zm)
    

See Also

findstates(idnlarx) 
findstates(idmodel) 
findop(idnlhw) 

  


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