Global sensitivity and uncertainty analysis (GSUA)

Global sensitivity and uncertainty analysis (GSUA) of dynamical and static systems using variance-based and OAT methods
5K Downloads
Updated 23 Apr 2024

View License

The GSUA Toolbox implements uncertainty and sensitivity analysis (global and OAT) of dynamical (with differential equations) and static (functions) models. The Saltelli and brute-force global sensitivity methods are implemented. The one-at-a-time (OAT) local method is applicable correctly only if the interaction between factors is small, so first-order sensitivity indices should be carefully reviewed. The toolbox only needs the following three files: 1) A mathematical model in a Simulink or m-file (see examples). 2) An information Live Script file. 3) The gsua_main.mlx Live Script.
Simulation model file
  • In the case of a Simulink Model, the file has some simple special structure: use a "To Workspace" connected to the output with sample time, variable name "yout" and "Structure with time" format. The parameters of models are defined with variable x. The Simulink model uses a lot of more computational time, but is the prefered method for hybrid dynamical systems (systems with continuous and discrete subsystems) and control systems.
  • In the case of a m-file, specify a model using the ode45 function (see examples for file configuration). This is the preferred format.
  • The model must give bounded outputs (if the simulation stops before the final time, the toolbox does not work properly).
Factor names
  • (1xNp) matrix
  • Example (without brackets or commas): m l g x(0)
Nominal factor values and respective percentage uncertainties (%)
  • (2xNp) matrix with nominal values in the first row and uncertainty percent in the second row. If the nominal value is a zero (x' = ax, a = 0 ± da), it is necessary to do a transformation: x' = (1 - a)x, a = 1 ± da.
  • Example: [1.5 4.3 25; 2.4 0.8 13]. For: x1 = 1.5 (2.4%), x2 = 4.3 (0.8%), x3 = 25 (13%)
Uncertainty plot
Outputs for every set of factors given by Monte Carlo simulation:
  • Dynamical case: time response for every family of factors (the nominal or experimental time output is highlighted).
  • Static case (function): histogram plot which shows how the output varies with changes on factors
Vectorial first-order sensitivity indices plot
  • Dynamical case: vectorial first-order sensitivity indices which depend on time
  • Static case (function): scalar first-order sensitivity indices for the scalar function value
  • The first-order indices must be positive and their sum should be less than one, so if these conditions are not met, it is necessary to increase sample size N.
Vectorial total sensitivity indices plot
  • Dynamical case: vectorial total sensitivity indices which depend on time
  • Static case (function): scalar total sensitivity indices for the scalar function value
  • OAT sensitivity method: this plot does not apply
Scalar first-order sensitivity indices (S1s)
  • Dynamical case: scalar first-order sensitivity indices for the scalar characteristic of time response using pie or bar plots
  • Static case (function): scalar first-order sensitivity indices for the squared error
  • The first-order indices must be positive and their sum should be less than one, so if these conditions are not met, it is necessary to increase sample size N.
Scalar total sensitivity indices (STs)
  • Dynamical case: scalar total sensitivity indices for the scalar characteristic of time response using pie or bar plots
  • Static case (function): scalar total sensitivity indices for the squared error
  • OAT sensitivity method: this plot does not apply
Scatter plots
  • Scatter plot for scalar output, where Ys is a function of factors. Look for correlations and relative values.

Cite As

Carlos M. Velez S. (2024). Global sensitivity and uncertainty analysis (GSUA) (https://www.mathworks.com/matlabcentral/fileexchange/47758-global-sensitivity-and-uncertainty-analysis-gsua), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
4.6

- Better user interface
- Minor corrections
- Each example can be run from its own file

4.5

It is easier to give the Simulink model in the right form: use a "To Workspace" connected to the output with sample time, Variable name "yout" and "Structure with time" format.

4.1

- Minor changes
- More examples

4.0

- Simplified environment
- OAT local method implemented
- Mathematical model using Simulink file, ODE file or state-space format (for linear systems)
- Live script as the main program
- More examples

3.0

(1) A main script is included to better application of toolbox. (2) A user manual is included.

2.8.0.0

All functions were optimized in three functions. Bar plots were included. All plots were improved. Sensitivity indices are shown for temporal responses and for scalar minimum square error (MSE) function. The estimated processing time is displayed.

2.1.0.0

The remaining time is displayed.

2.0.0.0

Other sensitivity methods are included (Sobol, Jansen, Saltelli).
The examples are better organized.

1.4.0.0

Integration as a toolbox.

1.3.0.0

New functions and examples are included.

1.2.0.0

Correction of pendulum example.

1.1.0.0

Correction of function description.

1.0.0.0