SystemModelSimulateSensitivity

SystemModelSimulateSensitivity[model,{p1,p2,}]

simulates model and sensitivities to parameters pi following experiment settings.

SystemModelSimulateSensitivity[model,tmax,{p1,p2,}]

simulates from 0 to tmax.

SystemModelSimulateSensitivity[model,{tmin,tmax},{p1,p2,}]

simulates from tmin to tmax.

SystemModelSimulateSensitivity[model,vars,{tmin,tmax},{p1,p2,}]

stores only simulation data for the variables vars.

Details and Options

  • The model can be a SystemModel object, a full model name string or a shortened model name accepted by SystemModel.
  • SystemModelSimulateSensitivity returns a SystemModelSimulationData object.
  • SystemModelSimulateSensitivity generates solutions for all variables , as well as derivatives , , for all states , for .
  • Sensitivities can be listed in a SystemModelSimulationData object sd with sd["SensitivityNames"].
  • The stored simulation variables vars can have the following values:
  • Automaticautomatically choose what to store
    {v1,v2,}store only variables vi
    Allstore all variables
  • SystemModelSimulateSensitivity[,spec] uses Association spec for initial values, parameters and inputs:
  • "ParameterValues"{"p1"val1,}parameter "pi" has value vali
    "InitialValues"{"v1"val1,}variable "vi" has value vali
    "Inputs"{"in1"fun1,}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:
  • InterpolationOrderAutomaticcontinuity degree of output between events
    SystemModelProgressReportingAutomaticcontrol display of progress
  • The option setting Automatic normally means that the setting is taken from model or its experiment setting.
  • The CVODES solver used can be controlled with Method->{"opt1"->val1}.
  • Possible suboptions for the CVODES method include:
  • "InterpolationPoints"Automaticnumber of interpolation points
    "Tolerance"106tolerance for adaptive step size

Examples

open allclose all

Basic Examples  (3)

Study sensitivity of a parameter over the time interval in model experiment settings:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Show the sensitivity of a signal to relative changes in a parameter:

In[1]:=
Click for copyable input
Out[1]=

Plot bounds for y and z when varying a by 10%:

In[2]:=
Click for copyable input
Out[2]=

Use the diagram representation of a model as input:

In[1]:=
Click for copyable input
Out[1]=

Copy and paste the output above:

In[2]:=
Click for copyable input
Out[2]=

Scope  (13)

Generalizations & Extensions  (1)

Options  (2)

Applications  (5)

Properties & Relations  (4)

Neat Examples  (1)

See Also

SystemModelSimulate  SystemModelSimulationData  SystemModelExamples  SystemModelParametricSimulate  ParametricNDSolveValue

Introduced in 2018
(11.3)