Simulate identified linear model in Simulink software
System Identification Toolbox
The Idmodel block simulates a linear model in the MATLAB® workspace.
Note: For simulating nonlinear models, use the IDNLGREY, IDNLARX, or IDNLHW Model blocks.
Input signal to the model.
Simulated output from the model.
Name of an estimated linear model in the MATLAB workspace. The model must be
The block supports continuous-time or discrete-time models with or without input-output delays.
Initial states for state-space (
idgrey) models. Initial states must
be a vector of length equal to the order of the model.
For models other than
initial conditions are zero.
In some situations, you may want to reproduce the results in
the Model Output plot window in the System Identification app or those
compare plot. To do so:
Convert the identified model into state-space form
idss model), and use the state-space model in
Compute the initial state values that produce the
best fit between the model output and the measured output signal using
Specify the same input signal for simulation that
you used as the validation data in the app or in the
% Convert to state-space model mss = idss(m); % Estimate initial states from data X0 = findstates(mss,z);
z is the data set you used for validating
m. Use the model
X0 in the Idmodel block
to perform the simulation.
Select to add noise. When selected, Simulink® derives the
noise amplitude from the model property
the matrices or polynomials that determine the color of the additive
For continuous-time models, the ideal variance of the noise term is infinite. In reality, you see a band-limited noise that takes into account the time constants of the system. You can interpret the resulting simulated output as filtered using a lowpass filter with a passband that does not distort the dynamics from the input.
Seed, specified as an integer, that forces the simulation to
add the same noise to the output every time you simulate the model.
Applies only when you select the Add noise check
box. For more information about using seeds, see
rand in the MATLAB documentation.
For multi-output models, you can use independent noise realizations
that generate the outputs with additive noise. Enter a vector of
Ny is the number of
For random restarts that vary from one simulation to another, leave the field empty.