SystemModelParametricSimulate[model,v,{p1,p2,…}]
simulates model for the variable v with parameters pi.
SystemModelParametricSimulate[model,{v1,v2,…},{p1,p2,…}]
simulates model for multiple variables vi.
SystemModelParametricSimulate[model,vars,tmax,…]
simulates from 0 to tmax.
SystemModelParametricSimulate[model,vars,{tmin,tmax},…]
simulates from tmin to tmax.
SystemModelParametricSimulate
SystemModelParametricSimulate[model,v,{p1,p2,…}]
simulates model for the variable v with parameters pi.
SystemModelParametricSimulate[model,{v1,v2,…},{p1,p2,…}]
simulates model for multiple variables vi.
SystemModelParametricSimulate[model,vars,tmax,…]
simulates from 0 to tmax.
SystemModelParametricSimulate[model,vars,{tmin,tmax},…]
simulates from tmin to tmax.
Details and Options
- SystemModelParametricSimulate returns parametric simulation results for system models.
- 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 - SystemModelParametricSimulate gives results in terms of ParametricFunction objects.
- SystemModelParametricSimulate takes the same options as SystemModelSimulate.
-
InterpolationOrder Automatic continuity degree of output between events Method Automatic what simulation method to use ProgressReporting $ProgressReporting control display of progress
List of all options
Examples
open all close allBasic Examples (3)
Get a parametric solution for z with parameter a:
sol = SystemModelParametricSimulate[[image], "z", {"a"}]Evaluating with a numerical value of a gives an approximate function solution for z:
z1 = sol[1]z1[10]Plot the solutions for several different values of the parameter:
Plot[Evaluate[Table[sol[a][t], {a, 0, 1, .1}]], {t, 0, 10}]Get a parametric solution for z with respect to the initial value of y:
sol = SystemModelParametricSimulate[[image], "z", {"y"}]Plot the solutions for several different values of the parameter:
Plot[Evaluate[Table[sol[y][t], {y, 0, 1, .1}]], {t, 0, 10}]Show the sensitivity of the variable z to the parameter a:
sol = SystemModelParametricSimulate[[image], "z", {"a"}]The sensitivity with respect to a increases with time:
Plot[Evaluate[(sol[a][t] + {0, .1, -.1}D[sol[a][t], a]) /. {a -> 1}], {t, 0, 10}, Filling -> {2 -> {3}}]Scope (5)
Models (5)
Get a parametric solution for variables in a SystemModel with respect to a parameter:
sol = SystemModelParametricSimulate[[image], {"x", "y"}, "theta"]Plot the solutions for several different values of the parameter:
ParametricPlot[Evaluate[Table[Through[sol[a][t]], {a, 0.4, 0.7, 0.1}]], {t, 0, 7}]Get a parametric solution for a variable in an AffineStateSpaceModel with respect to a parameter:
sol = SystemModelParametricSimulate[AffineStateSpaceModel[{{a + a*Cos[x2],
(-a)*x2 + Cos[a*x1^2]}, {{0}, {1}},
{x2}, {{0}}}, {x1, x2}, Automatic, {Automatic}, Automatic,
SamplingPeriod -> None], x1, {a}]Plot the solutions for several different values of the parameter:
Plot[Evaluate[Table[sol[a][t], {a, 0.01, 0.05, 0.01}]], {t, 0, 10}]Get a parametric solution for a variable in a NonlinearStateSpaceModel with respect to a parameter:
sol = SystemModelParametricSimulate[NonlinearStateSpaceModel[{{a*Cos[x] + 4*Sin[x/2]},
{x + Sin[x]}}, {x}, {}, {Automatic}, Automatic,
SamplingPeriod -> None], x, {a}]Plot the solutions for several different values of the parameter:
Plot[Evaluate[Table[sol[a][t], {a, 1, 4}]], {t, 0, 10}]Get a parametric solution for a variable in a DiscreteInputOutputModel with respect to a parameter:
diom = DiscreteInputOutputModel[{u[0], u[1] - a y[0], u[2] - a y[1]}, u, y]sol = SystemModelParametricSimulate[diom, y, {a}, <|"Inputs" -> {1 -> Table[Sin[t / 10], {t, 0, 30}]}|>]Plot the solutions for several different values of the parameter:
Plot[Evaluate[Table[sol[a][t], {a, 0.2, 1.8, 0.8}]], {t, 0, 30}]Get a parametric solution for variables in a SystemModel with respect to several parameters:
sol = SystemModelParametricSimulate[[image], {"p.r[1]", "p.r[2]"}, {"k", "p.m"}]Plot the solutions for several different values of the parameters:
ParametricPlot[Evaluate[Flatten[Table[Through[sol[k, m][t]], {k, 10, 20, 10}, {m, 1, 2.5, 1.5}], 1]], {t, 0, 40}]Options (1)
Method (1)
Use Method to choose the underlying solver:
model = [image];dassl = SystemModelParametricSimulate[model, "z", {"a"}, Method -> "DASSL"]Use ParametricNDSolve as the solver:
ndsolve = SystemModelParametricSimulate[model, "z", {"a"}, Method -> "ParametricNDSolve"]ParametricNDSolve is often faster than other solvers:
RepeatedTiming[ndsolve[1][10]]RepeatedTiming[dassl[1][10]]Applications (2)
Optimize parameters for maximizing a throw by a trebuchet:
model = \!\(\*GraphicsBox[«8»]\);Retrieve a parametric function for the thrown distance, varying release time and rope length:
distance = SystemModelParametricSimulate[model, "distance", {"releaseTime", "ropeLength"}, ProgressReporting -> False]Maximize the throwing distance, constraining parameters to reasonable ranges:
Monitor[fittedpars = NMaximize[{distance[time, length][10], 0.1 < length < 3 && 5 < time < 6.5}, {time, length}, AccuracyGoal -> 2, PrecisionGoal -> 2], {time, length}]Simulate using the optimal throwing parameters:
sim = SystemModelSimulate[model, <|"ParameterValues" -> ({"releaseTime" -> time, "ropeLength" -> length} /. fittedpars[[2]])|>]Show the distance until the first bounce:
sim[{"distance"}, 10]Plot the trajectory of the thrown object using a stored plot:
SystemModelPlot[sim, "Trajectory"]Calibrate parameters in a model by comparing to measurement data:
data = Import["ExampleData/inertiaTestData.dat"];Compute a parametric function for the inertia variable measured:
pf = SystemModelParametricSimulate[\!\(\*GraphicsBox[«8»]\), "Inertia2.w", 40, {"Resistor1.R", "SpringDamper1.d"}, ProgressReporting -> False]Set up a criteria function for model fitting:
criteriaFun[p_ ? NumericQ, q_ ? NumericQ] := Module[{f},
f = pf[p, q];
Norm[Table[data[[i, 2]] - f[data[[i, 1]]], {i, Length[data]}]]^2
]Fit parameters to the test data:
fittedpars = FindMinimum[criteriaFun[p, q], {{p, 0.1}, {q, 0.25}}, StepMonitor :> PrintTemporary[{p, q}]]Simulate with the fitted parameters:
sol = pf[p, q] /. fittedpars[[2]];Show the test data and the calibrated model together:
Show[Plot[sol[t], {t, 0, 40}, PlotStyle -> Orange], ListPlot[data]]Properties & Relations (1)
SystemModelSimulateSensitivity can be used to easily compute parameter sensitivity:
sim = SystemModelSimulateSensitivity[[image], 5, {"a"}];Plot sensitivity bounds for y and z when varying a by 10%:
SystemModelPlot[sim, {{"y", "a", 0.1}, {"z", "a", 0.1}}]Related Guides
Related Links
Text
Wolfram Research (2018), SystemModelParametricSimulate, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html (updated 2022).
CMS
Wolfram Language. 2018. "SystemModelParametricSimulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html.
APA
Wolfram Language. (2018). SystemModelParametricSimulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html
BibTeX
@misc{reference.wolfram_2026_systemmodelparametricsimulate, author="Wolfram Research", title="{SystemModelParametricSimulate}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_systemmodelparametricsimulate, organization={Wolfram Research}, title={SystemModelParametricSimulate}, year={2022}, url={https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html}, note=[Accessed: 13-June-2026]}