Simulate linear models with uncertainty using Monte Carlo method


y = simsd(sys,data,N,opt)
[y,y_sd] = simsd(sys,data,N,opt)


simsd(sys,data) simulates and plots the response of 10 perturbed realizations of the identified model, sys. Simulation input data, data, is used to compute the simulated response.

The parameters of the perturbed realizations are consistent with the parameter covariance of the original model, sys.

simsd(sys,data,N) simulates and plots the response of N perturbed realizations of the identified model, sys.

simsd(sys,data,N,opt) simulates the system response using the option set, opt, to specify simulation behavior.

y = simsd(sys,data,N,opt) returns the simulation result as a cell array, y. No simulated response plot is produced.

[y,y_sd] = simsd(sys,data,N,opt) also returns the estimated standard deviation, y_sd, for the simulated response.

The parameter changes in the randomly selected models are scaled to be small (ca 0.1%) compared to the parameter values. The response changes are then scaled up to correspond to one standard deviation. The scaling does not apply to free delays of idproc or idtf models.

Input Arguments


Identified linear model.


Simulation input data.

Specify data as a time- or frequency-domain iddata object, with input channels only.

For time-domain simulation of discrete-time systems, data may also be specified as a matrix whose columns correspond to each input channel.


Number of perturbed realizations for simulation.

Specify N as a positive integer.

Default: 10


Simulation options.

opt is an option set, created using simsdOptions, that specifies options including:

  • Signal offsets

  • Initial condition handling

  • Additive noise

Output Arguments


Simulated response.

y is a cell array of N+1 elements, where N is the number of perturbed realizations. y{1} contains the nominal response for sys. The remaining elements contain the simulated response for the N perturbed realizations.


Estimated standard deviation of the simulated response.

y_sd is derived by averaging the simulations results in y.


collapse all

Simulate Estimated Model Using Monte-Carlo Method

Simulate an estimated model using the Monte-Carlo method for a specified number of model perturbations.

Obtain an identified model.

load iddata3
sys = ssest(z3,2);

sys is an idss model that encapsulates the estimated second-order, state-space model for the measured data, z3.

Simulate the estimated model using the Monte-Carlo method. Specify the number of random model perturbations.

N = 20;

More About

collapse all


  • You can specify initial conditions for simulation by creating an option set using simsdOptions and then setting the InitialCondition option appropriately.

  • simsd yields meaningful results only when sys contains information regarding parameter uncertainty. Use getcov to examine the parameter uncertainty for sys. For models with no parameter uncertainty data, the results of simsd match that of sim.

Was this topic helpful?