Skip to Main Content Skip to Search
Product Documentation

simsd - Simulate linear models with uncertainty using Monte Carlo method

Syntax

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

Description

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.

Tips

Input Arguments

sys

Identified linear model.

data

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.

N

Number of perturbed realizations for simulation.

Specify N as a positive integer.

Default: 10

opt

Simulation options.

opt is an option set that specifies the following:

  • signal offsets

  • initial condition handling

  • additive noise

Use simsdOptions to create the options set.

Output Arguments

y

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.

y_sd

Estimated standard deviation of the simulated response.

y_sd is derived by averaging the simulations results in y.

Examples

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;
simsd(sys,z3,N)

See Also

getcov | rsample | showConfidence | sim | simsdOptions

  


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