Setup a Statistical Analysis🔗
Modelon Impact offers the possibility to create and perform Statistical parameter analyses by multi-run experiments for a given model. This lets the user investigate a random distributed parameter space of the model and gain an understanding of its behavior relative to certain parameters. To distribute a parameter space randomly, you can select between Normal, Uniform, or Beta distribution.
- Go to Experiment layer -> Diagram View -> Right sidebar.
-
In the EXPERIMENT browser:
- Click "+ New experiment" button to add a new Experiment, or
- Select another Experiment from the list
Note
Via Diagram View, you can select parameters you want to modify for the Statistical analysis by selecting a model component and changing a parameter in the PROPERTIES panel (right side-bar). These settings are in sync with the Experiment Setup View.
To specify distribution operators, please continue on the Experiment Setup View.
- Switch to Experiment Setup View ("Experiment" tab)
- Select "Statistical"
- Click "+ Add modifier" to select a parameter you want to change.
(Use IntelliSense to help you to find the right path.) - Click
- "Checkmark" button to confirm/submit, or
- "Crossmark" button to discard.
- By default, Impact adds the value from the model to the parameter.
Click into the field to switch to "edit mode"
Repeat steps 5 to 7 until all the parameters to be modified are in the list.
-
In the "Method" column, you can select how you want to change or distribute a parameter:
- "Value": Just a modification/change, no variants
- "Normal": Set a normal distribution (Gaussian distribution) for parameter values, by specifying the mean value and variances and optionally also minimum and maximum.
- "Uniform": Set a continuous uniform distribution (rectangular distribution) for parameter values, by specifying the boundary values.
- "Beta": Set a beta distribution for parameter values, by specifying the shape parameters.
-
"Value" is selected:
Enter a single value to modify the parameter, and make sure your value returns the required datatype. -
"Normal" is selected:
- Enter the Mean value (maximum of the Gaussian curve), and
- the Variance of the values to the corresponding fields.
- To limit the variance you can optionally set a minimum (Min) and maximum (Max) value.
- Note: The "Normal" operator can only be used for numbers (
Real
andInteger
)
-
"Uniform" is selected:
- Enter the minimum/left (Min) and the maximum/right (Max) value of the distribution (rectangle).
- Note: The "Uniform" operator can only be used for numbers (
Real
andInteger
)
- "Beta" is selected:
- Enter the Alpha and the Beta shape coefficients to define the shape. For more information about the shape design, please read for instance this Beta distribution.
- Please ensure, that Beta and *Alpha are greater than zero!*
- Note: The "Beta" operator can only be used for numbers (
Real
andInteger
)
- Click
- "Checkmark" button to confirm/submit, or
- "Crossmark" button to discard.
Note
Please ensure that the distribution of values does not exceed any physical or mathematical limits!
I.e., a 0
should be avoided if the model divides by it.
Or, negative values should be avoided if they make no physical sense (such as a negative mass).
Total number cases🔗
For Statistical analyses, you have to specify the total number of cases, which means the sampling of the parameter space. Impact provides therefore two Expansion methods:
- Sobol sequence and
- Latin Hypercube sampling.
In both cases, you must specify the "number of samples" you need.
The "Latin Hypercube" requires a seed that is determined internally and is fixed. The seed should not be changed in order to ensure the reproducibility of an experiment.
Note
Many samples lead to many simulations (cases), which requires more execution time. The result is also correspondingly bigger.
It's recommended to set output filters.
Datatypes🔗
By hovering over the parameter name on the left, a tooltip shows the datatype of the parameter. Make sure that the entered values return the required datatype of the parameter:
Real
: any number with or without a decimal operator, like12
or3.14
or-6e2
Integer
: any number w/o decimal operator, like12
or-6e2
String
: any value/text in quotation marks, like"foo"
Boolean
: a Boolean value, means eithertrue
orfalse
Enum
(enumeration): a value that returns the Modelica path of an alternative like.Modelica.Blocks.Types.SimpleController.PI
Note
Modelica expressions, as they are used in the modeling layer, are not yet supported! The modifications must be constant values.
Related articles🔗
Dynamic Simulation | Steady State | Cancelled Simulation | Multi-run | Parameter sweep | Experiment Types