Note to the user: all MatLab code is written in MatLab R2014, and some require additional toolboxes (e.g. the statistics toolbox, which is mentioned in the scripts). In case you don’t have access to MatLab, there is a free alternative called Octave available. Both the ipython notebook and the python scripts are written in Python 3.
Uncertainty propagation can be used to propagate uncertainties of input parameters through models to determine e.g. the output uncertainty. To propagate the input uncertainties, simulation techniques can be used such as Monte Carlo sampling, but more exotic sampling techniques, such as Latin hypercube sampling (Figure 1) can also be used. In additon, a Taylor approximation of the original model can be used to propogate the uncertainties analytically.
Code for performing Monte Carlo sampling (MCS) in matrix-based life cycle assessment (LCA) can be found here:
Matlab/Octave: MatLab code MCS LCA
IPython notebook: IPython code MCS LCA
Python: Python code MCS LCA
Code for performing Analytical uncertainty propagation (AUP) in matrix-based life cycle assessment (LCA) can be found here:
Matlab/Octave: MatLab code AUP LCA
IPython notebook: IPython code AUP LCA
Python: Python code AUP LCA
Figure 1: Density plot of Monte Carlo sampling (MCS), Latin hypercube sampling (LHS) and quasi-Monte Carlo sampling (QMCS) on a 16x16 grid; sample size N=1024. QMCS results in an uniform distributed grid, with 4 realizations in each cell.
The MatLab/Octave code for performing Latin hypercube sampling (LHS) in matrix-based life cycle assessment can be found here: MATLAB code LHS LCA
The MatLab/Octave code for performing Quasi Monte Carlo sampling (QMCS) in matrix-based life cycle assessment can be found here: MATLAB code QMCS LCA
The MatLab/Octave code for performing Fuzzy interval arithmetic (FIA) in matrix-based life cycle assessment can be found here: MATLAB code FIA LCA
Uncertainty propagation can be used to propagate uncertainties of input parameters, even if they are correlated. To propagate the input uncertainties of parameters that are correlated, two techniques are used: normal random and a Taylor approximation of the original model can be used to propogate the uncertainties analytically.
Code for performing Latin hypercube sampling (LHS) in matrix-based life cycle assessment (LCA) with correlated input parametes can be found here:
Matlab/Octave: MatLab code LHS LCA (correlated)
Code for performing Analytical uncertainty propagation (AUP) in matrix-based life cycle assessment (LCA) with correlated input parameters can be found here:
Matlab/Octave: MatLab code AUP LCA (correlated)
Source: PhD thesis Evelyne Groen, An uncertain climate: the value of uncertainty and sensitivity analysis in environmental impact assessment of food, 2016
ISBN: 978-94-6257-755-8; DOI: 10.18174/375497
The MatLab code for performing MCS, LHS, QMCS, FIA and AUP in LCA was used in Methods for uncertainty propagation in life cycle assessment, Environmental Modelling & Software, December 2014 (Volume 62, Pages 316 - 325).
The MatLab code for performing MCS and AUP was used in Methods for global sensitivity analysis in life cycle assessment, accepted for publicaiton, 2016.
The MatLab code for performing uncertainty propagation with correlated input parameters (both the analytic and the sampling approach) was used in Ignoring correlation in uncertainty and sensitivity analysis in life cycle assessment: what is the risk?, Environmental Impact Assessment Review, January 201x (Volume 62, Pages 98 - 109).
The MatLab code for performing MCS was used in Benchmarking nutrient losses of dairy farms: the effect of epistemic uncertainty?, xxx, xxx.
The MatLab code for performing uncertainty propagation in LCA with correlated input parameters was used in Assessing greenhouse gas emissions of milk prodution: which parameters are essential?, The international Journal of Life Cycle Assessment, First online: 31 July, 2016.