Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

data2state(idnlarx) - Map past input/output data to current states of nonlinear ARX model

Syntax

X = data2state(MODEL,IOSTRUCT)
X = data2state(MODEL,DATA)

Description

X = data2state(MODEL,IOSTRUCT) maps the input and output samples in IOSTRUCT to the current states of MODEL, X. For a definition of the states of idnlarx models, see Definition of idnlarx States. The data in IOSTRUCT is interpreted as past samples of data, so that the returned state values must be interpreted as values at the time immediately after the time corresponding to the last (most recent) sample in the data.

X = data2state(MODEL,DATA) maps the input and output samples from DATA to the current states, X, of the model.

Input

Output

X is the state vector of MODEL corresponding to the time after the most recent sample in the input data (IOSTRUCT or DATA).

Examples

In this example you determine the current state of an idnlarx model.

  1. Load your data and create a data object.

    load motorizedcamera;  
    z = iddata(y,u,0.02,'Name','Motorized Camera', ...
                           'TimeUnit','s');
    
    
  2. Estimate an idnlarx model from the data. The model has 6 inputs and 2 outputs.

    mw1 = nlarx(z,[ones(2,2),ones(2,6),ones(2,6)],wavenet);
  3. Compute the maximum delays across all output variables in mw1.

    MaxDelays =  getDelayInfo(mw1);
  4. Represent the past input and output samples:

    IOData = struct('Input', ...
                     rand(max(MaxDelays(3+1:end)),6),...
                    'Output', ...
                     rand(max(MaxDelays(1:3)),2));
  5. Compute the current states of mw1 based on the past data in IOSTRUCT.

    X = data2state(mw1,IOData)
    

    The previous command computes the state vector.

See Also

findop(idnlarx) 
findstates(idnlarx) 
getDelayInfo 

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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