Chapter 2
Uncertainty Quantification
and Sensitivity Analysis
2.1
Introduction
Although the numerical analysis proves to be an extremely powerful tool in the common engineering practice, it is important to get the results that derive from it with proper precautions.
The limitations of this technique lie in the inevitable discrepancies be-tween the physical model and the numerical one and in the frequent lacking of whole knowledge of the problem itself.
Also in a simplified context, many sources of uncertainty exist: those related to the creation of the model, those related to the definition of the boundary conditions and those related to the choice of the initial conditions. This issue can be partially overcome with two different approaches which are actually complementary: Uncertainty Quantification (UQ) and Sensitiv-ity Analysis (SA) .
The aim of both these techniques is to understand how changes in input parameters can influence the output of a particular engineering problem. In the UQ approach all or some of the input variables are considered uncertain and they are represented by appropriate probability distribution functions.
Also the output of interest can be described in a statistical way. SA does not require a physical characterization of the input uncertainties and this analysis can be done on a purely mathematical way. In particular, the aim of SA is to understand how the variability of an output is due to a particular input and which input dominates the system response.
2.2
Uncertainties and Errors
First of all it is important to distinguish uncertainties from errors. According to the American Institute of Aeronautics and Astronautics ( AIAA ) " Guide for the Verification and Validation of CFD Simulations " errors are obvious deficiencies in the model and / or in the construction of algorithms, while the uncertainties are potential failures due to an incomplete knowledge of the problem. This definition does not distinguish between mathematics and physics. A better approach is to associate the birth of the errors with the implementation of the mathematical model into a computational algorithm (or code), such as round-off errors, problems of convergence, and all the bugs in the simulation code. Uncertainties arise from the choices that we make when we try to describe the physical problem and when we have to choose the input parameters. An example would be the definition of the boundary conditions of a given problem, conditions that are not always clearly and unambiguously defined by observations and experiments.
It is clear that when we speak about uncertainties we refer to an extremely broad and multifaceted concept which, however, can be organized in a more rigorous way by the distinction between epistemic and aleatory uncertainties. The aleatory uncertainties (also called stochastic or irreducible uncertain-ties) are associated with the physical variability of the system being analyzed. They are not due to a lack of knowledge and for this reason they can not be eliminated. The random uncertainties occur when we make choices with the aim of characterizing the properties of the system or its operating conditions. Generally these variations are described by probabilistic approaches.
2.2 - Uncertainties and Errors 36
due to a lack of knowledge. They may arise from the assumptions introduced during the development of the mathematical model, from the simplifications made and so on. These uncertainties can be reduced by trying to refine the physical model, by more accurate observations, by enhancing the experiments and by more complete understanding of the problem. Their description can be made by non-probabilistic techniques.
In the present work we have considered the characteristics of the particles emitted from the volcano as random uncertainties.
The code used to make the UQ and SA analysis is the so-called DAKOTA (Design Analysis Kit for Optimization and Terascale Applications) toolkit [1]. This open source code, developed by the Sandia Lab, provides mathematical algorithms for:
• Uncertainty Quantification with sampling, reliability, stochastic expan-sion and epistemic methods;
• Optimization with gradient- and non gradient-based methods;
• Parameter estimation with nonlinear least squares methods;
• Sensitivity/variance analysis with design of experiments and parameter study methods.
2.3
Uncertainty Quantification
DAKOTA gives the opportunity to make UQ analysis with a lot of different techniques which briefly are:
• Sampling techniques (Monte Carlo, Latin Hypercube Samplig);
• Stochastic expansion methods: Polynomial Chaos Expansion (PCE), Stochastic Collocation (SC).
2.3.1
Generalized Polynomial Chaos Expansions (PCEg)
In the present work we have chosen to adopt as UQ technique the so-called Generalized Polynomial Chaos Expansions (PCEg) which is included within the Stochastic Expansion Methods [1]. PCE was developed by Norbert Wiener in 1938 [23] and it soon had a big spread because it was more efficient and accurate than the Monte Carlo method. The term "Chaos" simply refers to the uncertainties in input, while the word "Polynomial" is used because the propagation of uncertainties is described by polynomials. The first step is to model the input variables through appropriate probability distribution functions, then the key point of the procedure is to write the output in a polynomial form. The uncertainties which can be taken into account can be the boundary conditions, initial conditions, forces and parameters. PCE is able to take into account only a limited number of uncertain variables, but it can give a detailed study of their behavior.
Once the uncertain variables have been chosen it is necessary to model each of theme through a proper PDF (Probability Distribution Function) that tries to reproduce the physics of the analyzed problem. If not enough information are available it is advisable to use a uniform distribution.
Polynomial Basis (Askey Scheme)
The choice of the polynomial basis for the output functions is a function of the type of PDF which represents the input variables.
At the beginning Wiener modeled the input PDF as Gaussian distribu-tion only and he used Hermite polynomials. This originally technique, called
2.3 - Uncertainty Quantification 38
Polynomial Chaos Expansions (PCE), is quite different from the General-ized Polynomial Chaos Expansions (PCEg) which uses the Wiener-Askey approach. According to this approach, after a PDF has been chosen, an appropriate polynomial basis is selected as reported Tab.(2.1).
Distribution Density function Polynomial Weight function Support range
Normal √1 2πe −x2 2 Hermite e −x2 2 [−∞, ∞] Uniform 1 2 Legendre 1 [−1, +1] Beta (1 − x) α(1 + x)β 2α+β+1B(α + 1)(β + 1) Jacobi (1 − x) α(1 + x)β [−1, +1] Exponential e−x Laguerre e−x [0, ∞] Gamma x αe−x Γ(α + 1) Generalized Laguerre x αe−x [0, ∞]
Table 2.1: Askey Scheme [1].
We can see that for each input distribution (normal, uniform, beta and so on) there is a corresponding polynomial basis. The coupling between the input variable and the type of polynomial is due to the correspondence between the weight function of the polynomial basis and the probability distribution that characterizing the input. The PDF and the weight functions differ by a multiplying factor since it is necessary that the integral of the first one on its support range be equal to one .
This table is derived from the family of orthogonal hypergeometric poly-nomials also known as Askey scheme; the Hermite polypoly-nomials used originally by Wiener are a subset of the Askey family.
If the input variables can not be characterized by known probability dis-tributions, additional techniques are required with the aim of transforming the variables in such a way to apply the scheme of Askey to this transformed space.
If ξ = (ξi1, ξi2, . . . , ξin) is the vector of input variables (each term is a
particular input variable which is associated with an appropriate PDF), the response function (R) can be written in the following way (order-based
in-dexing): R = a0B0+ ∞ X i1=1 ai1B1(ξi1)+ ∞ X i1=1 i1 X i2=1 ai1i2B2(ξi1, ξi2)+ ∞ X i1=1 i1 X i2=1 i2 X i3=1 ai1i2i3B3(ξi1, ξi2, ξi3)+. . . . (2.1) The polynomial is unbounded and each set of nested summations is an additional order of the expansion. The above expression can be simplified as: R = ∞ X j=0 αjΨj(ξ), (2.2)
where there is a direct correspondence between αi1i2i3,...,in and αj and
between Bn(ξi1, ξi2, . . . , ξin) and Ψj(ξ).
Each Ψj(ξ) is a multivariate polynomial which in composed by the
prod-uct between the one-dimensional polynomials (ψi) associated to the input
PDFs (i.e. Legendre, Hermite, Laguerre, etc).
The polynomial expression of Eq.2.2 must be truncated to a finite order expansion P : R ' P X j=0 αjΨj(ξ). (2.3)
Generally, PCEg contains a complete basis of polynomials up to a spec-ified total order p, this approach is the so-called total order approach. This means that, for an expansion of total order p involving n input variables, the multi-index term which defines the set Ψj(ξ) is limited in the following way:
n
X
i=1
tji ≤ p, (2.4)
where tji is the order of the one-dimensional polynomials ψi involved in
2.3 - Uncertainty Quantification 40
For example, the Hermite polynomial basis for an expansion of the second order which involves two random variables is :
Ψ0(ξ) = ψ0(ξ1)ψ0(ξ2) = 1 Ψ1(ξ) = ψ1(ξ1)ψ0(ξ2) = ξ1 Ψ2(ξ) = ψ0(ξ1)ψ1(ξ2) = ξ2 Ψ3(ξ) = ψ2(ξ1)ψ0(ξ2) = ξ12− 1 Ψ4(ξ) = ψ1(ξ1)ψ1(ξ2) = ξ1ξ2 Ψ5(ξ) = ψ0(ξ1)ψ2(ξ2) = ξ22− 1
The total number of terms (Nt) presents in an expansion of total order p
involving n input variables is:
Nt= 1 + P = 1 + p X 1 1 s! s−1 Y r=0 (n + r) = (n + p)! n!p! . (2.5) In the tensor product approach, each term Ψj(ξ) is composed by all the
combinations of the one-dimensional polynomials. This means that the multi-index term of expansion which defines the set Ψj(ξ) is limited in the following
way:
tji ≤ p, (2.6)
where pi is the maximum order of the polynomial of the n-th dimension.
In this case, for a maximum order of expansion p = 2 and for a number of input variables n = 2, the Hermite base of polynomials is the following one:
Ψ0(ξ) = ψ0(ξ1)ψ0(ξ2) = 1
Ψ1(ξ) = ψ1(ξ1)ψ0(ξ2) = ξ1
Ψ2(ξ) = ψ2(ξ1)ψ0(ξ2) = ξ12− 1
Ψ4(ξ) = ψ1(ξ1)ψ1(ξ2) = ξ1ξ2 Ψ5(ξ) = ψ2(ξ1)ψ1(ξ2) = (ξ12− 1)ξ2 Ψ6(ξ) = ψ0(ξ1)ψ2(ξ2) = ξ22− 1 Ψ7(ξ) = ψ1(ξ1)ψ2(ξ2) = ξ1(ξ22− 1) Ψ8(ξ) = ψ2(ξ1)ψ2(ξ2) = (ξ12− 1)(ξ 2 2 − 1)
The total number of terms Nt is:
Nt= 1 + P = n
Y
i=1
(1 + p), (2.7)
where n is the number of the input variables and p is the maximum order of the one-dimensional polynomials. The second approach is able to handle explicitly the possible anisotropy of the problem since the order of the polynomial basis can be specified for each direction. However, it is possible to consider the anisotropy of the problem with an expansion of total order by cutting the polynomials that satisfy the highest order but violate the requirement for that particular direction.
Estimation of PCEg Coefficients using Spectral Projection
One of the most crucial point of PCEg is the calculation of the coefficients of the expansion. In particular there are two main approaches that are spectral projection and linear regression.
In the first case the response function is projected along each basis func-tions using internal products and each coefficient is extracted using the prop-erties of orthogonal polynomials. Linear regression, also known as point col-location or stochastic response surface, computes the coefficients that best permit to reproduce a set of values of the response evaluated numerically.
In this work we have decided to use the spectral projection as the linear regression is a suitable technique when the number of input variables is high (a number of inputs greater than 5) [1].
2.3 - Uncertainty Quantification 42
Spectral Projection
The generic coefficient αj of the PCEg can be evaluated as follows:
αj = hR, Ψji Ψ2 j = 1 Ψ2 j Z RΨjρ(ξ)dξ, (2.8)
where each inner product involves a multidimensional integral on the domain of support of the weight functionρ(ξ).
The denominator of Eq.(2.8) is the square norm of the basis of multi-variate polynomials and can be computed analytically using the product of univariate norms squared :
Ψ2 j = n Y i=1 ψ2 ti . (2.9)
The first true computational effort lies in the evaluation of the numerator; solutions can be found numerically using sampling, quadrature, cubature, or sparse grid approaches. As will be explained in the next Chapter, we have considered three random variables as input, thus the technique we have cho-sen is the Gaussian quadrature. The sparse grid approach is suitable for a higher number of input variables, while sampling is not enough accurate.
Tensor Product Quadrature
The simplest technique for approximating multidimensional integrals is a tensor product of one-dimensional quadrature rules, in particular we used a Gaussian Quadrature.
If n is the number of the input parameters, for each of them a number mi
of quadrature points can be defined , the subscript i refers to the i-th input. So, for each input, let (ξ1i, . . . , ξmi i) ⊂ Ωi be a sequence
of quadrature points coordinates abscissas (Ωi is the i-th dimension of the
domain Ω = Ω1N · · · N Ωn).
Considering the i-th input, the integral of a function f ∈ C0(Ωi) can be
Ui(f )(ξ) =
mi
X
j=1
f (ξji)wij, (2.10)
where Ui is the quadrature operator referred to the i-th input, (ξij) is the i-th random variable evaluated at i-the quadrature point j, wji is the weight asso-ciated to the j-th quadrature point and mi ∈ N is total number of quadrature
abscissas referred to the i-th input variable. Having specified an expansion order p, a minimal Gaussian quadrature order of p + 1 is required to obtain good accuracy in the PCEg coefficients estimation. Now, in the multivariate case n 1, for each f ∈ C0(Ω) and for each multi-index i = (i1, . . . , in) ∈ Nn
it is possible to define the full tensor product quadrature formulas
Qnif (ξ) = (Ui1O· · ·OUin) = f (ξ) mi1 X j1=1 · · · min X jn=1 f (ξi1 j1, . . . , ξ in jn)(w i1 ji O · · ·Owin jn). (2.11) The above product requires the evaluation of Qn
j=1mij functions. When
the number of input random variables is small, full tensor product quadrature is a very effective numerical tool.
In order to compute the quadrature points, the grid used in our work is the Clenshaw-Curtis grid (Fig.(2.1)) [1], which, dealing with a Gaussian quadrature and with a small number of variables, is a good solution.
2.4 - Sensitivity Analysis 44
2.4
Sensitivity Analysis
More information about the dependence of the output from the inputs can be obtained by the Sensitivity Analysis (SA). SA consists of a lot of different techniques; in this work we consider the Global SA, which is supported by DAKOTA [1]. SA is a powerful tool to investigate which of the input param-eters are more decisive for the output results. However this technique gives good informations if a very large number of the output values are known (a good number can be 10000 samples) and, most of times, this requires very high computational costs. In this sense a link between UQ and SA proves to be extremely useful; in fact, once the PCEg functions have been built, it is possible to use the polynomials as emulators in order to obtain a large num-ber of output values, without doing the simulations, but simply evaluating the polynomials for the input values.
2.4.1
Global Sensitivity Analysis: Variance-based
de-composition (VBD)
The Variance-based decomposition (VBD) is a global sensitivity technique that allows to understand how the variability of output values is due to spe-cific input parameters or to a combination of them. There are two key mea-sures that are Si (Main Effect Sensitivity Index ) and Ti (Total Effect Index ).
If Y is an output function and xiis the generic i-th input, Si(Eq.(2.12))
indi-cates how much the output variability is due only to xi, while Ti (Eq.(2.13))
expresses the percentage of uncertainty of Y that is due to xi and to its
interaction with other variables. Having indicated with V arxi[E(Y |xi)] the
variance of the conditional expectation and with V ar(Y ) the variance of the output function, the formulas are:
Si = V arxi[E(Y |xi)] V ar(Y ) , (2.12) Ti = E(V ar(Y |xi)) V ar(Y ) = V ar(Y ) − V ar[E(Y |xi)] V ar(Y ) , (2.13)
where Y = f (x) and x−i = x1, . . . , x−i, xi, . . . , xm.
For example, Fig.(2.2) shows the plot of the function f (x1, x2, x3) =
x1/21 x3 + 3x33 + 10x2 and the influence that each input variable has on the
output is taken into account. From the figure it is evident that x2 is the
variable with the highest Sobol Index since, for each value of x2, the range
of variation of the function value (blue spots on the plot) is very close to the variance of the conditional expectation referred to x2 (red line on the plot).
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 Y Y Y Y X1 X2 X3 Figure 2.2: Plot of f (x1, x2, x3) = x 1/2 1 x3 + 3x33 + 10x2 evaluated for 1000 random samples.