Skip to Main Content Skip to Search
Product Documentation

Example – Simulating an Identified Model Using Simulink Software

In this example, you set the initial states for simulating a model such that the simulation provides a best fit to measured input-output data.

 Prerequisites

To compute initial states that maximizes the fit to the corresponding output y2, and simulate the model using the second experiment:

  1. Estimate the initial states using the second experiment:

    X0est = findstates(M,z2);
    
  2. Open the System Identification Toolbox library by typing the following command at the MATLAB prompt:

    slident
  3. Open a new Simulink model window. Then, drag and drop an Idmodel block from the library into the model window.

  4. Open the Function Block Parameters dialog box by double-clicking the idmodel block. Specify the following block parameters:

    1. In the idmodel variable field, type M to specify the estimated model.

    2. In the Initial states field, type X0est to specify the estimated initial states. Click OK.

  5. Drag and drop an Iddata Source block into the model window. Then, configure the model, as shown in the following figure.

  6. Simulate the model for 2 seconds, and compare the simulated output ysim with the measured output ymeasured using the Scope block.

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS