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.

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, created using `simsdOptions`, that specifies options including: Signal offsetsInitial condition handlingAdditive noise

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

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

collapse all

Tips

• 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`.