| Contents | Index |
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.
To compute initial states that maximizes the fit to the corresponding output y2, and simulate the model using the second experiment:
Estimate the initial states using the second experiment:
X0est = findstates(M,z2);
Open the System Identification Toolbox library by typing the following command at the MATLAB prompt:
slident
Open a new Simulink model window. Then, drag and drop an Idmodel block from the library into the model window.
Open the Function Block Parameters dialog box by double-clicking the idmodel block. Specify the following block parameters:
In the idmodel variable field, type M to specify the estimated model.
In the Initial states field, type X0est to specify the estimated initial states. Click OK.
Drag and drop an Iddata Source block into the model window. Then, configure the model, as shown in the following figure.

Simulate the model for 2 seconds, and compare the simulated output ysim with the measured output ymeasured using the Scope block.
![]() | Simulating Identified Model Output in Simulink | System Identification Tool GUI | ![]() |

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |