# simsdOptions

Option set for `simsd`

## Description

## Examples

### Create Default Option Set for Uncertain Model Simulation

opt = simsdOptions;

### Specify Options for Uncertain Model Simulation

Create an option set for `simsd`

specifying the following options.

Zero initial conditions

Input offset of 5 for the second input of a two-input model

opt = simsdOptions('InitialCondition','z','InputOffset',[0; 5]);

### Add Noise to Uncertain Simulation Output

Create a default option set.

opt = simsdOptions;

Modify the option set to add noise to the data.

opt.AddNoise = true;

When you use this option set and `simsd`

command to simulate the response of a model `sys`

. The command returns the perturbed realizations of `sys`

with additive disturbances added to each response.

## Input Arguments

### Name-Value Arguments

Specify optional pairs of arguments as
`Name1=Value1,...,NameN=ValueN`

, where `Name`

is
the argument name and `Value`

is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.

*
Before R2021a, use commas to separate each name and value, and enclose*
`Name`

*in quotes.*

**Example: **`opt = simsdOptions('AddNoise',true','InputOffset',[5;0])`

adds
default Gaussian white noise to the response model, and specifies
an input offset of `5`

for the first of two model
inputs.

`InitialCondition`

— Simulation initial conditions

`'z'`

(default) | column vector | matrix | structure | structure array

Simulation initial conditions, specified as one of the following:

`'z'`

— Zero initial conditions.Numerical column vector

`X0`

of initial states with length equal to the model order.For multi-experiment data, specify a matrix with

*Ne*columns, where*Ne*is the number of experiments, to configure the initial conditions separately for each experiment. Otherwise, use a column vector to specify the same initial conditions for all experiments.Use this option for state-space models (

`idss`

and`idgrey`

) only. You can also specify the covariance of the initial state vector in`X0Covariance`

.Structure with the following fields, which contain the historical input and output values for a time interval immediately before the start time of the data used in the simulation:

Field Description `Input`

Input history, specified as a matrix with *Nu*columns, where*Nu*is the number of input channels. For time-series models, use`[]`

. The number of rows must be greater than or equal to the model order.`Output`

Output history, specified as a matrix with *Ny*columns, where*Ny*is the number of output channels. The number of rows must be greater than or equal to the model order.For multi-experiment data, you can configure the initial conditions separately for each experiment by specifying

`InitialCondition`

as a structure array with*Ne*elements. Otherwise, use a single structure to specify the same initial conditions for all experiments.The software uses

`data2state`

to map the historical data to states. If your model is not`idss`

or`idgrey`

, the software first converts the model to its state-space representation and then maps the data to states. If conversion of your model to`idss`

is not possible, the estimated states are returned empty.

`X0Covariance`

— Covariance of initial states vector

`[]`

(default) | `matrix`

Covariance of initial states vector, specified as one of the following:

Positive definite matrix of size

*Nx*-by-*Nx*, where*Nx*is the model order.For multi-experiment data, specify as an

*Nx*-by-*Nx*-by-*Ne*matrix, where*Ne*is the number of experiments. For the*k*experiment,^{th}`X0Covariance(:,:,k)`

specifies the covariance of initial states`X0(:,k)`

.`[]`

— No uncertainty in the initial states.

Use this option for state-space models (`idss`

and `idgrey`

)
when `'InitialCondition'`

is specified as a numerical
column vector `X0`

. When you specify this option,
the software uses a different realization of the initial states to
simulate each perturbed model. Initial states are drawn from a Gaussian
distribution with mean `InitialCondition`

and covariance `X0Covariance`

.

`InputOffset`

— Input signal offset

`[]`

(default) | column vector | matrix

Input signal offset, specified as a column vector of length *Nu*.
Use `[]`

if there are no input offsets. Each element
of `InputOffset`

is subtracted from the corresponding
input data before the input is used to simulate the model.

For multiexperiment data, specify `InputOffset`

as:

An

*Nu*-by-*Ne*matrix to set offsets separately for each experiment.A column vector of length

*Nu*to apply the same offset for all experiments.

`OutputOffset`

— Output signal offset

`[]`

(default) | column vector | matrix

Output signal offset, specified as a column vector of length *Ny*.
Use `[]`

if there are no output offsets. Each element
of `OutputOffset`

is added to the corresponding
simulated output response of the model.

For multiexperiment data, specify `OutputOffset`

as:

An

*Ny*-by-*Ne*matrix to set offsets separately for each experiment.A column vector of length

*Ny*to apply the same offset for all experiments.

`AddNoise`

— Noise addition toggle

`false`

(default) | `true`

Noise addition toggle, specified as a logical value indicating
whether to add noise to the response model. Set `NoiseModel`

to `true`

to
study the effect of additive disturbances on the response. A different
realization of the noise sequence, consistent with the noise component
of the perturbed system, is added to the noise-free response of that
system.

## Output Arguments

`opt`

— Option set for `simsd`

command

`simsdOptions`

option set

Option set for `simsd`

command, returned
as a `simsdOptions`

option set.

## Version History

**Introduced in R2012a**

## See Also

## Open Example

You have a modified version of this example. Do you want to open this example with your edits?

## MATLAB Command

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

# Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)