Simulate response of identified model

`y = sim(sys,udata)`

`y = sim(sys,udata,opt)`

`[y,y_sd] = sim(___)`

```
[y,y_sd,x]
= sim(___)
```

`[y,y_sd,x,x_sd] = sim(___)`

`sim(___)`

`sim(___)`

plots the simulated
response of the identified model.

When the initial conditions of the estimated model and the system that measured the validation data set are different, the simulated and measured responses may also differ, especially at the beginning of the response. To minimize this difference, estimate the initial state values using

`findstates`

and use the estimated values to set the`InitialCondition`

option using`simOptions`

. For an example, see Match Model Response to Output Data.

*Simulation* means computing the model response
using input data and initial conditions. `sim`

simulates
the following system:

Here,

*u*(*t*) is the simulation input data,`udata`

.*y*(*t*) is the simulated output response.*G*is the transfer function from the input to the output and is defined in`sys`

. The simulation initial conditions, as specified using`simOptions`

, set the initial state of*G*.*e*(*t*) is an optional noise signal. Add noise to your simulation by creating a`simOptions`

option set, and setting the`AddNoise`

option to`true`

. Additionally, you can change the default noise signal by specifying the`NoiseData`

option.*H*is the noise transfer function and is defined in`sys`

.*δu*is an optional input offset subtracted from the input signal,*u*(*t*), before the input is used to simulate the model. Specify an input offset by setting the`InputOffset`

option using`simOptions`

.*δy*is an optional output offset added to the output response,*y*(*t*), after simulation. Specify an output offset by setting the`OutputOffset`

option using`simOptions`

.

For more information on specifying simulation initial conditions,
input and output offsets, and noise signal data, see `simOptions`

. For multiexperiment data,
you can specify these options separately for each experiment.

Use

`simsd`

for a Monte-Carlo method of computing the standard deviation of the response.`sim`

extends`lsim`

to facilitate additional features relevant to identified models:Simulation of nonlinear models

Simulation with additive noise

Incorporation of signal offsets

Computation of response standard deviation (linear models only)

Frequency-domain simulation (linear models only)

Simulations using different intersample behavior for different inputs

To obtain the simulated response without any of the preceding operations, use

`lsim`

.

`compare`

| `findstates`

| `forecast`

| `idinput`

| `lsim`

| `predict`

| `simOptions`

| `simsd`

| `step`