SystemModelSimulate
✖
SystemModelSimulate
Details and Options



- The model can have the following forms:
-
SystemModel[…] general system model StateSpaceModel[…] state-space model TransferFunctionModel[…] transfer function model AffineStateSpaceModel[…] affine state-space model NonlinearStateSpaceModel[…] nonlinear state-space model DiscreteInputOutputModel[…] discrete input-output model - SystemModelSimulate returns a SystemModelSimulationData object.
- The stored simulation variables vars can have the following values:
-
Automatic automatically choose what to store {v1,v2,…} store only variables vi All store all variables - SystemModelSimulate[…,spec] uses Association spec for initial values, parameters and inputs:
-
"ParameterValues" {p1val1,…} parameter pi has value vali "InitialValues" {v1val1,…} variable vi has initial value vali "Inputs" {in1fun1,…} input ini has value funi[t] at time t - Setting "ParameterValues" or "InitialValues" to {pi->{c1,c2,…},…} runs simulations in parallel, with pi taking values cj.
- "InitialValues" corresponds to the start property in the Modelica model.
- The following options can be given:
-
InterpolationOrder Automatic continuity degree of output between events Method Automatic what simulation method to use ProgressReporting $ProgressReporting control display of progress - The option Method is supported when model is a SystemModel.
- Method settings take the form Method->"method" or Method{"method","sub1"->val1,…}.
- The following adaptive step methods can be used:
-
"DASSL" DASSL DAE solver "CVODES" CVODES ODE solver - Suboptions for adaptive-step methods include:
-
"InterpolationPoints" Automatic number of interpolation points "Tolerance" 10-6 tolerance for adaptive step size - The following fixed-step methods can be used:
-
"Euler" explicit Euler's method of order 1 "Heun" Heun's method of order 2 "RungeKutta" explicit Runge–Kutta method of order 4 - Suboptions for fixed-step methods include:
-
"StepSize" 10-3 fixed step size - With Method->{"NDSolve",sub1->val1,…}, NDSolve is used as the solver. Method options subi are passed to NDSolve.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Simulate a model with the time interval of simulation settings from the model:

https://wolfram.com/xid/0bh0k3cbt0fbpw-j4mifd


https://wolfram.com/xid/0bh0k3cbt0fbpw-bkxdup

Do a parameter sweep over a voltage offset:

https://wolfram.com/xid/0bh0k3cbt0fbpw-kp1ta
Plot the voltage for all simulations:

https://wolfram.com/xid/0bh0k3cbt0fbpw-sf31v

Use the diagram representation of a model as input:

https://wolfram.com/xid/0bh0k3cbt0fbpw-elf4e1

Copy and paste the output above:

https://wolfram.com/xid/0bh0k3cbt0fbpw-e9e6h


https://wolfram.com/xid/0bh0k3cbt0fbpw-2c8jo2

Scope (22)Survey of the scope of standard use cases
Models (5)
Simulate one of the included example models from the thermal domain:

https://wolfram.com/xid/0bh0k3cbt0fbpw-pdjrjd


https://wolfram.com/xid/0bh0k3cbt0fbpw-qx9dt3

Simulate a NonlinearStateSpaceModel and plot simulation results:

https://wolfram.com/xid/0bh0k3cbt0fbpw-mewrb1


https://wolfram.com/xid/0bh0k3cbt0fbpw-2e099k

Simulate a TransferFunctionModel with a UnitStep as input:

https://wolfram.com/xid/0bh0k3cbt0fbpw-hm3tgs


https://wolfram.com/xid/0bh0k3cbt0fbpw-178y1

Do a parameter sweep in an AffineStateSpaceModel:

https://wolfram.com/xid/0bh0k3cbt0fbpw-v4085l


https://wolfram.com/xid/0bh0k3cbt0fbpw-t4lr9f

Simulate a DiscreteInputOutputModel:

https://wolfram.com/xid/0bh0k3cbt0fbpw-p5rq76


https://wolfram.com/xid/0bh0k3cbt0fbpw-vej8u4


https://wolfram.com/xid/0bh0k3cbt0fbpw-w6n13g

Simulation Time (4)
Simulate with settings from the model:

https://wolfram.com/xid/0bh0k3cbt0fbpw-70h3l2


https://wolfram.com/xid/0bh0k3cbt0fbpw-s431y6


https://wolfram.com/xid/0bh0k3cbt0fbpw-j5oua


https://wolfram.com/xid/0bh0k3cbt0fbpw-56umo

Simulate for an explicit time interval:

https://wolfram.com/xid/0bh0k3cbt0fbpw-frub8e


https://wolfram.com/xid/0bh0k3cbt0fbpw-qs2wlh

Use a Quantity to specify the time interval:

https://wolfram.com/xid/0bh0k3cbt0fbpw-9p8h2p


https://wolfram.com/xid/0bh0k3cbt0fbpw-e8q641

Variables, Parameters and Inputs (8)
Initial values for variables can be set using "InitialValues":

https://wolfram.com/xid/0bh0k3cbt0fbpw-j6nc8b


https://wolfram.com/xid/0bh0k3cbt0fbpw-bn47md

Parameter values can be set using "ParameterValues":

https://wolfram.com/xid/0bh0k3cbt0fbpw-b2mtpf


https://wolfram.com/xid/0bh0k3cbt0fbpw-cyscko

Simulate a model that adds two inputs together:

https://wolfram.com/xid/0bh0k3cbt0fbpw-b0gkbf
Plot the inputs and the output:

https://wolfram.com/xid/0bh0k3cbt0fbpw-btjids

Simulate for different initial values for the variable x:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ddv2m
Plot the variable x from all simulations:

https://wolfram.com/xid/0bh0k3cbt0fbpw-c38qez

Simulate a model with default parameters:

https://wolfram.com/xid/0bh0k3cbt0fbpw-bxj7d
Set a parameter in the simulation:

https://wolfram.com/xid/0bh0k3cbt0fbpw-8p4ft
Compare the variable between the simulations:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fq8lp3

Do a parameter sweep over a voltage offset:

https://wolfram.com/xid/0bh0k3cbt0fbpw-cl9zq5
Plot the voltage for all simulations:

https://wolfram.com/xid/0bh0k3cbt0fbpw-gvidph

Setting ranges for two parameters simulates once for each position in the ranges:

https://wolfram.com/xid/0bh0k3cbt0fbpw-c68n5c

https://wolfram.com/xid/0bh0k3cbt0fbpw-kqvwvi

Simulate a model with a TimeSeries as input:

https://wolfram.com/xid/0bh0k3cbt0fbpw-uaewxz

https://wolfram.com/xid/0bh0k3cbt0fbpw-he4hci
Plot the input and the output:

https://wolfram.com/xid/0bh0k3cbt0fbpw-zr2gin

Simulation Results (5)
Simulate a model and plot the variables x1 and x2:

https://wolfram.com/xid/0bh0k3cbt0fbpw-bp69dx

https://wolfram.com/xid/0bh0k3cbt0fbpw-4zw5km


https://wolfram.com/xid/0bh0k3cbt0fbpw-0jzgu3
Get simulation results for the variables x and x':

https://wolfram.com/xid/0bh0k3cbt0fbpw-mz6ui

Plot the variables using the Plot function:

https://wolfram.com/xid/0bh0k3cbt0fbpw-t43sc4

Simulate a model and find the maximum of a variable:

https://wolfram.com/xid/0bh0k3cbt0fbpw-4fr3j4
Get the value of the variable angle1v:

https://wolfram.com/xid/0bh0k3cbt0fbpw-k94p9b
Find the maximum value of the angle:

https://wolfram.com/xid/0bh0k3cbt0fbpw-7nb45l

Run a simulation and plot in a single call:

https://wolfram.com/xid/0bh0k3cbt0fbpw-wrdxll

Specify arguments to SystemModelSimulate:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ix6vcm

Store only selected variables:

https://wolfram.com/xid/0bh0k3cbt0fbpw-yi1lki

Only the given variables are saved:

https://wolfram.com/xid/0bh0k3cbt0fbpw-e6m288

Generalizations & Extensions (1)Generalized and extended use cases
Debug messages are collected in the message group "WSMDebug":

https://wolfram.com/xid/0bh0k3cbt0fbpw-eczkrk

Turn on debug messages for initialization:

https://wolfram.com/xid/0bh0k3cbt0fbpw-dg2dwq

https://wolfram.com/xid/0bh0k3cbt0fbpw-fehl28







Turn off all debug messages for "WSMDebug":

https://wolfram.com/xid/0bh0k3cbt0fbpw-b6jqwz
Options (10)Common values & functionality for each option
InterpolationOrder (1)
Method (8)

https://wolfram.com/xid/0bh0k3cbt0fbpw-gmgw0e


https://wolfram.com/xid/0bh0k3cbt0fbpw-l46b1u


https://wolfram.com/xid/0bh0k3cbt0fbpw-h9dtd0

Show the result in a ParametricPlot:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ltfw30

For stiff problems, use an adaptive-step method:

https://wolfram.com/xid/0bh0k3cbt0fbpw-bp3i51

https://wolfram.com/xid/0bh0k3cbt0fbpw-bf37yv

Simulating with too few interpolation points can give inexact plots:

https://wolfram.com/xid/0bh0k3cbt0fbpw-45bkx

https://wolfram.com/xid/0bh0k3cbt0fbpw-d84hs

Increasing the number of points gives a better result:

https://wolfram.com/xid/0bh0k3cbt0fbpw-d9y9es

https://wolfram.com/xid/0bh0k3cbt0fbpw-bu1mtk

The default step size for a fixed-step solver might be smaller than needed:

https://wolfram.com/xid/0bh0k3cbt0fbpw-mlzqe0

Use a larger step size to speed up computation:

https://wolfram.com/xid/0bh0k3cbt0fbpw-pgfnrz


https://wolfram.com/xid/0bh0k3cbt0fbpw-gksefr

Let an adaptive solver choose the solver steps:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ztjlkc

Use NDSolve for simulating a model:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fvke16

The result is a SystemModelSimulationData object containing the simulation results:

https://wolfram.com/xid/0bh0k3cbt0fbpw-icep9z

Pass options to NDSolve:

https://wolfram.com/xid/0bh0k3cbt0fbpw-cngwtc

The accuracy is reduced because of the options:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fib0z2

ProgressReporting (1)
Control progress reporting with ProgressReporting:

https://wolfram.com/xid/0bh0k3cbt0fbpw-9ijd4g

Applications (11)Sample problems that can be solved with this function
Calculate the overshoot of the height in a tank system:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fpl4cz


https://wolfram.com/xid/0bh0k3cbt0fbpw-kl557m

https://wolfram.com/xid/0bh0k3cbt0fbpw-eankkw


Get the value of the step sent in to the tank:

https://wolfram.com/xid/0bh0k3cbt0fbpw-n1257

https://wolfram.com/xid/0bh0k3cbt0fbpw-0usia


https://wolfram.com/xid/0bh0k3cbt0fbpw-d1eo19

Calculate the rise time for the height in a tank system:

https://wolfram.com/xid/0bh0k3cbt0fbpw-by8koe

https://wolfram.com/xid/0bh0k3cbt0fbpw-c0ztcf
Get the required values at 10% and 90% by looking at the steady-state value for height:

https://wolfram.com/xid/0bh0k3cbt0fbpw-q10diu

Find the times at which the signal reaches these values:

https://wolfram.com/xid/0bh0k3cbt0fbpw-luhyrs


https://wolfram.com/xid/0bh0k3cbt0fbpw-kmyj2

Plot lines at the final value, and when the signal reaches 10% and 90% of the final value:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ccr7lb

Calculate the settling time for the height in a tank system:

https://wolfram.com/xid/0bh0k3cbt0fbpw-edc0tu

https://wolfram.com/xid/0bh0k3cbt0fbpw-njy5vm
Find 5% bounds on the final value:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ev95o9

Find the time at which the signal stays within these values:

https://wolfram.com/xid/0bh0k3cbt0fbpw-blimma

Plot the bounds and the found settling time:

https://wolfram.com/xid/0bh0k3cbt0fbpw-gk06t

Change parameter values interactively:

https://wolfram.com/xid/0bh0k3cbt0fbpw-wxa0w

https://wolfram.com/xid/0bh0k3cbt0fbpw-hsoabe

Simulate a rolling wheel for different starting inertias along the wheel axis:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ijqb83
Fetch the trajectories for the wheel:

https://wolfram.com/xid/0bh0k3cbt0fbpw-d4zvg

https://wolfram.com/xid/0bh0k3cbt0fbpw-bnpljm

Analyze resonance peaks when varying a spring constant:

https://wolfram.com/xid/0bh0k3cbt0fbpw-b98oqm

https://wolfram.com/xid/0bh0k3cbt0fbpw-iedq9

https://wolfram.com/xid/0bh0k3cbt0fbpw-oj280

Calibrate parameters in a model by comparing to measurement data:

https://wolfram.com/xid/0bh0k3cbt0fbpw-eirvkk
Set up a criteria function for model fitting:

https://wolfram.com/xid/0bh0k3cbt0fbpw-e174zr

https://wolfram.com/xid/0bh0k3cbt0fbpw-zeq44
Fit parameters to the test data:

https://wolfram.com/xid/0bh0k3cbt0fbpw-ci2f7k


Simulate with the fitted parameters:

https://wolfram.com/xid/0bh0k3cbt0fbpw-g3y58o
Show the test data and the calibrated model together:

https://wolfram.com/xid/0bh0k3cbt0fbpw-g6m480

Filter sampled data from a Tinker Forge Weather Station:

https://wolfram.com/xid/0bh0k3cbt0fbpw-jorz2d
Time shift and retrieve the magnitude of the data:

https://wolfram.com/xid/0bh0k3cbt0fbpw-frmd71
Run the time series through a lowpass filter:

https://wolfram.com/xid/0bh0k3cbt0fbpw-i6oriq

https://wolfram.com/xid/0bh0k3cbt0fbpw-7049ce

https://wolfram.com/xid/0bh0k3cbt0fbpw-y2x1cn

Simulate a lowpass filter with sound as input:

https://wolfram.com/xid/0bh0k3cbt0fbpw-b6r402
Simulate with given input sound:

https://wolfram.com/xid/0bh0k3cbt0fbpw-c7aj9y

Retrieve the audio for input and output:

https://wolfram.com/xid/0bh0k3cbt0fbpw-st6oc


https://wolfram.com/xid/0bh0k3cbt0fbpw-9rs1x
Fetch trajectories from the result:

https://wolfram.com/xid/0bh0k3cbt0fbpw-d5ngdu

https://wolfram.com/xid/0bh0k3cbt0fbpw-crtzc0

Visualize simulated data with a WaveletScalogram:

https://wolfram.com/xid/0bh0k3cbt0fbpw-jg6kh
Pick out the data you are interested in:

https://wolfram.com/xid/0bh0k3cbt0fbpw-2phqck
Compute the wavelet transform:

https://wolfram.com/xid/0bh0k3cbt0fbpw-hw6um
Plot the wavelet vector coefficients:

https://wolfram.com/xid/0bh0k3cbt0fbpw-c3skpy

Properties & Relations (3)Properties of the function, and connections to other functions
The output from SystemModelSimulate is a SystemModelSimulationData object:

https://wolfram.com/xid/0bh0k3cbt0fbpw-4z562

Use properties to get variable trajectories:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fbgxf9

Use SystemModelSimulateSensitivity to also get sensitivities to parameters:

https://wolfram.com/xid/0bh0k3cbt0fbpw-fk07cc
Plot the capacitor's voltage sensitivity to the frequency of "sineVoltage1":

https://wolfram.com/xid/0bh0k3cbt0fbpw-21un8


https://wolfram.com/xid/0bh0k3cbt0fbpw-elynw3

Use SystemModelParametricSimulate for a function that can be evaluated for different values:

https://wolfram.com/xid/0bh0k3cbt0fbpw-up4176

Compute solutions for different values of the frequency parameter:

https://wolfram.com/xid/0bh0k3cbt0fbpw-xq07j8


https://wolfram.com/xid/0bh0k3cbt0fbpw-rnz4wc

Wolfram Research (2018), SystemModelSimulate, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelSimulate.html (updated 2022).
Text
Wolfram Research (2018), SystemModelSimulate, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelSimulate.html (updated 2022).
Wolfram Research (2018), SystemModelSimulate, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelSimulate.html (updated 2022).
CMS
Wolfram Language. 2018. "SystemModelSimulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SystemModelSimulate.html.
Wolfram Language. 2018. "SystemModelSimulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SystemModelSimulate.html.
APA
Wolfram Language. (2018). SystemModelSimulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelSimulate.html
Wolfram Language. (2018). SystemModelSimulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelSimulate.html
BibTeX
@misc{reference.wolfram_2025_systemmodelsimulate, author="Wolfram Research", title="{SystemModelSimulate}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SystemModelSimulate.html}", note=[Accessed: 24-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_systemmodelsimulate, organization={Wolfram Research}, title={SystemModelSimulate}, year={2022}, url={https://reference.wolfram.com/language/ref/SystemModelSimulate.html}, note=[Accessed: 24-July-2025
]}