IDNLHW Model - Simulate Hammerstein-Wiener model in Simulink® software

Library

System Identification Toolbox

Description

The IDNLHW Model block simulates a Hammerstein-Wiener (idnlhw) model for time-domain input and output data.

Input

Input signal to the model.

Output

Simulated output from the model.

Dialog Box

Model

Name of the idnlhw variable in the MATLAB® workspace.

Initial conditions

Specifies the initial states as one of the following:

Examples

Example 1

In this example, you estimate a Hammerstein-Wiener model from data and compare the model output of the model to the measured output of the system.

  1. Load the sample data.

    load twotankdata
    
  2. Create a data object from sample data.

    z = iddata(y,u,0.2, ...
               'Name','Two tank system',...
               'Tstart',0);
    
  3. Estimate a Hammerstein-Wiener model.

    mhw1 = nlhw(z,[1 5 3],pwlinear,pwlinear);
  4. Build the following Simulink model using the IDDATA Source, IDNLHW Model, and Scope blocks.

  5. Double-click the IDDATA Source block and enter the following into the block parameter dialog box:

    Click OK.

  6. Double-click the IDNLHW Model block and enter the following into the block parameter dialog box:

  7. Run the simulation.

    Click the Scope block to view the difference between the measured output and the model output. Use the Autoscale toolbar button to scale the axes.

    In this example, the plot shows a difference between the measured and simulated responses at the start of the simulation. This difference may be reduced by estimating the initial states that best fit the measured output.

Example 2

In this example, you reduce the difference between the measured and simulated responses at the start of the simulation. To achieve this, you use the findstates command to estimate an initial state vector for the model from the data.

  1. Estimate initial states from the data z:

    x0 = findstates(mhw1,z,[],'maxiter',50);
    
  2. Set the Initial Conditions to State Values. Enter x0 in the corresponding field.

  3. Run the simulation.

    MATLAB software produces the following plot.

    The difference between the measured and simulated responses at the beginning of the simulation is now reduced.

See Also

Related Commands

findop(idnlhw)
findstates(idnlhw)
idnlhw

Topics in the System Identification Toolbox™ User's Guide

Identifying Hammerstein-Wiener Models

  


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