Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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*) is the simulation input data,*t*`udata`

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

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

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

option set, and setting the`AddNoise`

option to`true`

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

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

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

option using`simOptions`

.is an optional output offset added to the output response,*δy*(*y*), after simulation. Specify an output offset by setting the*t*`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`

Was this topic helpful?