Abstract
A derivative-based uncertainty quantification (UQ) method called HYPAD-UQ that utilizes sensitivities from a computational model was developed to approximate the statistical moments and Sobol' indices of the model output. Hypercomplex automatic differentiation (HYPAD) was used as a means to obtain accurate high-order partial derivatives from computational models such as finite element analyses. These sensitivities are used to construct a surrogate model of the output using a Taylor series expansion and subsequently used to estimate statistical moments (mean, variance, skewness, and kurtosis) and Sobol' indices using algebraic expansions. The uncertainty in a transient linear heat transfer analysis was quantified with HYPAD-UQ using first-order through seventh-order partial derivatives with respect to seven random variables encompassing material properties, geometry, and boundary conditions. Random sampling of the analytical solution and the regression-based stochastic perturbation finite element method were also conducted to compare accuracy and computational cost. The results indicate that HYPAD-UQ has superior accuracy for the same computational effort compared to the regression-based stochastic perturbation finite element method. Sensitivities calculated with HYPAD can allow higher-order Taylor series expansions to be an effective and practical UQ method.
1 Introduction
Conducting uncertainty quantification (UQ) with high-fidelity models is challenging due to computational demands. A cheap-to-evaluate surrogate model such as polynomial chaos expansion [1], Gaussian process [2], or the Taylor series expansion [3] can be used as a substitute. The Taylor series expansion has shown to be a viable surrogate model for many types of physics [4]. However, it is mainly used when the variance in random variables is low to ensure high accuracy with a first-order or second-order expansion. Expanding the Taylor series to higher orders can improve the accuracy [5], but sensitivities higher than second-order are often difficult to compute with traditional methods such as finite differences or symbolic differentiation. Numerical differentiation methods have been used to construct higher-order Taylor series expansions such as the adjoint method [6] and modified forward finite difference (ModFFD) [7]. However, these methods have disadvantages when calculating higher-order derivatives, specifically, orders past second-order. In adjoint differentiation, partial derivatives need to be derived for each mathematical formulation and for each variable. Higher-order adjoint-based derivatives exist, however, the formulations become intractable as the order increases. Higher-order partial derivatives can be calculated with ModFFD in a straight-forward manner, however, the step size highly influences the accuracy of the higher-order derivatives. Hence, ModFFD can become computationally expensive when a step size convergence study is conducted and accuracy is not guaranteed. For these reasons, this work utilized higher-order partial derivatives calculated with an accurate, efficient, and easy-to-use numerical differentiation method called hypercomplex automatic differentiation (HYPAD) to construct Taylor series expansions of finite element analysis (FEA) nodal outputs in order to conduct UQ, known as HYPAD-UQ.
The partial derivatives that make up the Taylor series expansion can be calculated by a variety of methods. Symbolic derivatives of governing FEA equations have been developed for many different physics including elasticity, plasticity, heat transfer, dynamics, and many others [4,8]. This method is very efficient [9], however, derivative expressions for new mathematical models, which are not necessarily finite element-based, need to be derived for each variable of interest. Alternatively, adjoint-based differentiation has been successful in calculating first-order and second-order derivatives very efficiently [6]. Reference [10] used adjoint-based derivatives to approximate first-order and second-order Taylor series expansions of the expected value, variance, and skewness of the uncollided particle leakage. However, similar to symbolic differentiation, adjoint-based derivative expressions for each variable of interest need to be derived for different mathematical formulations.
Numerical differentiation methods exist which do not require new mathematical formulation. One widely used method is finite difference which is nonintrusive, i.e., source code does not need to be altered in any way, and only requires evaluations of the model at multiple input parameters. One drawback is that the finite difference method is subject to subtraction cancelation error and truncation error [11]. Therefore, a convergence study for the optimal step size is needed which makes this method computationally demanding, especially for higher-order derivatives. The complex-step differentiation method is analogous to the forward finite difference method in that the variable of interest is perturbed along an imaginary direction in order to calculate first-order partial derivatives [12]. This method yields the most accurate numerical derivative of the model. Although source code must be modified to use complex algebra, no new formulation is required for the derivative expressions. Complex-step differentiation was used in Ref. [13] to construct a first-order Taylor series to approximate variance of residual stress in a thick-walled sphere. Arbitrary-order partial derivatives can be calculated by generalizing the complex-step differentiation method using HYPAD.
Hypercomplex automatic differentiation is a highly accurate numerical differentiation method that uses hypercomplex algebra within the formulation of a mathematical model to calculate arbitrary-order partial derivatives. Analogous to the forward finite difference method, derivatives are calculated in HYPAD by perturbing variables of interest along independent imaginary or nonreal directions using a hypercomplex algebra [14–16]. The two most common HYPAD methods were developed with multicomplex numbers [17] and multidual numbers [18] which are generalizations of complex numbers and dual numbers, respectively, to any number of imaginary directions. Unlike the finite difference method, there is no subtractive cancelation error; therefore, step sizes can be very small to yield numerically accurate sensitivities.
Hypercomplex automatic differentiation has been implemented in FEA, known as the hypercomplex finite element method (ZFEM) [19]. A single nth-order derivative and all combinations of lower-order derivatives with respect to the perturbed variables can be computed in one analysis using multicomplex or multidual algebra. Hence, the number of model evaluations needed to compute a complete nth-order Taylor series is equivalent to the number of nth-order derivatives in the Taylor series. The block forward substitution method has been applied to the solution of the linear finite element system of equations to allow the reuse of the real solution for multiple derivative computations [20]. However, recalculation of the imaginary parts of hypercomplex matrices is still required when calculating multiple higher-order derivatives. A recently developed hypercomplex algebra called order truncated imaginary (OTI) algebra was developed for the purpose of calculating all combinations of partial derivatives with respect to multiple variables in a single analysis without any repetitive calculations. This method has shown to yield a dramatic increase in efficiency compared to multidual-based differentiation [16]. Further details on HYPAD are given in Sec. 2.2.
The Taylor series expansion of an output can be computed nonintrusively using linear regression. Reference [21] showed that Taylor series expansions approximated by regression can yield accurate central moments for various single variable functions. They also showed that higher-order expansions were necessary to achieve a sufficient estimate of central moments as the range of variance in the random variable increased. A disadvantage of linear regression, however, is the potential need for a large number of samples to obtain sufficient accuracy of the regression model.
Conducting global sensitivity analysis to identify random variables that significantly contribute to the uncertainty in the output is important in engineering design. This can be accomplished by computing the Sobol' variance-based sensitivity indices, herein referred to as Sobol' indices, of the output which measures the contribution of the random variables, or interactions between random variables, to the variance of the output [22]. Calculating these Sobol' indices with random sampling can become impractical to compute due to high computational demands. Therefore, surrogate models, such as polynomial chaos expansion [23], can be used in place of the high-fidelity model to approximate Sobol' indices. Computing Sobol' indices with the Taylor series are rarely employed in the literature due to concerns about the accuracy and the need for higher-order derivatives to compute interaction effects. However, previous work has shown the effectiveness of the Taylor series in global sensitivity analysis. In Ref. [24], main effect Sobol' indices were computed from a first-order Taylor series expansion constructed with adjoint-based derivatives. They showed that out of 16 random variables, about 5–8 were important for structural reliability of a shell structure. Reference [25] showed that the Taylor series coincides with the analysis of variance decomposition when the model is multilinear.
HYPAD-UQ is not the only method that utilizes derivatives for UQ. Reference [26] computed multiple first-order Taylor series expansions at different expansion points to create a piecewise linear surrogate model. Derivatives evaluated at multiple sampling points are also used in gradient enhanced surrogate modeling [27,28] which improves the accuracy of sampling-based surrogate models and potentially allows for fewer sampling points. While these methods are attractive because only lower-order derivatives are required, selection and distribution of the sample points are an open question. In optimization problems, Ref. [29] proposed a methodology to approximate the computation of first-order sensitivities using the “hyperdifferential sensitivity analysis” method. This method approximates first-order sensitivities of partial differential equation-constrained optimization solution with respect to random inputs. The advantages of this method are that it can be used to compute local and global sensitivities and that it is highly parallelizable; however, the method requires appropriate selection of sample points and thus multiple solutions to the optimization problem. HYPAD-UQ, the method presented here, only requires one FEA model evaluation at the mean of the random variables and is general for arbitrary-order derivatives.
This paper is organized as follows: Sobol' indices and central moments of Taylor series expansions for any random variable distribution type are derived in Sec. 2.1. An overview of HYPAD is given in Sec. 2.2. The implementation of HYPAD in finite elements is given in Sec. 2.3. Section 3 shows an application of HYPAD-UQ on a transient heat transfer analysis in a fin where accuracy and computational cost is compared to the linear regression-based stochastic perturbation method. A discussion on the effect of error and computational cost of HYPAD-UQ is presented in Sec. 4. Finally, a conclusion of this work is provided in Sec. 5.
2 Methodology
HYPAD-UQ creates a Taylor series expansion of an output of a mathematical model in order to approximate probability densities, central moments, and Sobol' indices, see Sec. 2.1. This Taylor series expansion about the mean of the output is constructed from partial derivatives of the output with respect to the random variables using HYPAD, see Sec. 2.2. The implementation of OTI-based HYPAD in finite elements in the context of a thermal analysis is given in Sec. 2.3.
2.1 Taylor Series Expansion of Central Moments and Sobol' Indices.
It is convenient to derive the Taylor series expansions of variance using the high-dimensional model representation (HDMR) [30] so that variance-based sensitivity indices, known as Sobol' indices, can be readily derived. Sobol' indices and the expected value of the first-order through third-order Taylor series expansions are derived below for any distribution of the random variables. Skewness and kurtosis of Taylor series expansions are also shown for any distribution type through second-order. Skewness and kurtosis of third-order expansions have been derived and were used in Sec. 3; however, they are not shown due to the large number of terms.
and so on [22]. The subscript represents the exclusion of the random variables denoted by the indices and is the joint probability distribution of all random variables in x.
and so on.
respectively. Note that second-order mixed partial derivatives are needed to approximate any interaction effects with the Taylor series. See Appendix for the expected value and partial variances of a third-order Taylor series expansion.
See Appendix for third and fourth central moments of the second-order Taylor series expansion.
2.2 Hypercomplex-Based Automatic Differentiation.
2.2.1 Differentiation With Complex and Hypercomplex Algebra.
where , h is step size of the perturbation, and is a unit vector with a value of one in the kth position. This unit vector which indicates that the perturbation is applied to the variable of interest xk. A step size h of the order of times the variable of interest usually yields an accurate derivative value for the given model [35]. The complex-step method does not add any extra error within the formulation. The accuracy of the derivative is completely dependent on the numerical algorithm in which it is employed.
First-order partial derivatives are computed with the complex-step method by applying a perturbation to xk in the imaginary direction as . The function is then evaluated with complex algebra. The real part contains the function output and the derivative is extracted from the imaginary part of the output, following Eq. (29).
Higher-order partial derivatives can be derived in a similar manner by applying perturbations to variables of interest along multiple imaginary or nonreal directions. Two subsets of hypercomplex algebra have been developed to achieve this and both methods compute accurate arbitrary-order derivatives in a similar manner. Reference [17] used multicomplex numbers, which is an extension of complex numbers to multiple imaginary directions. A more efficient method uses a generalization of dual numbers, which contains a nonreal part represented by , called hyperdual numbers, herein referred to as multidual numbers to emphasize the parallel construction with multicomplex numbers [18]. Multidual-based differentiation has no truncation error and is step-size independent, unlike the multicomplex method. However, a small enough step size in multicomplex should yield equivalent derivative values. Hypercomplex differentiation can be implemented in source code by altering real-valued algebra with a hypercomplex algebra. External libraries have been developed that overload real-valued algebraic operations with hypercomplex algebra [14,16,18,36,37] and the Julia programing language intrinsically supports multidual algebra [38].
where hi is step sizes and is a unit vector with a value of one in the kth position [39]. Note that all combinations of lower-order partial derivatives can be extracted from the same function evaluation, similar to Eqs. (30)–(32). This is accomplished by extracting the imaginary parts of the respective variables of interest and dividing by the corresponding step sizes.
2.2.2 Hypercomplex Automatic Differentiation With Order Truncated Imaginary Algebra.
Multidual numbers are an effective method to compute higher-order derivatives. However, they increase in size by each time a new basis () is added, where n is the total number of bases. A multidual number with n bases is capable of computing a single nth-order derivative and all combinations of lower-order partial derivatives. Repeated computations of lower-order derivatives cause multidual-based and multicomplex-based differentiation to become inefficient, especially for a large number of variables. Moreover, to build a complete nth-order Taylor series expansion of r variables using multidual or multicomplex algebra, dp evaluations are required, see Eq. (13). An alternative algebra called OTI algebra forms the full nth-order Taylor series expansion without repeating derivative computations [16].
where superscript “” indicates hypercomplex parts exist, subscript R denotes the real part of , and is the real coefficient along imaginary direction . The total number of terms in an OTI number, d, is the same as a Taylor series expansion truncated to order n, see Eq. (12).
The pth-order derivative with respect to x is associated with the imaginary direction as ϵ1 was the imaginary direction used to perturb x. The coefficient along the direction has a scaling factor . A sparse implementation of OTI algebra is used so that only the nonzero imaginary coefficients are accounted for in the computations [16]. This reduces the computational cost and may lead to a decrease in memory usage.
2.3 Hypercomplex Finite Element Method for Transient Heat Transfer Problems.
Hypercomplex algebra has been implemented in the finite element formulation, known as ZFEM. This method was used to calculate partial derivatives for the numerical example in Sec. 3. The implementation of OTI-based HYPAD within the finite element formulation is described in the context of linear transient heat transfer in Sec. 2.3.1 and the solution to the OTI-based finite element system of equations is described in Sec. 2.3.2.
2.3.1 Hypercomplex Finite Element Method Formulation in Transient Heat Transfer Problems.
where is the temperature field valid for any point x in the domain Ω, s is the inner heat generation rate per unit volume, t is time, Cp is the specific heat, ρ is the material density, k is the thermal conductivity, T0 is the initial temperature distribution, is the prescribed temperature on boundary , h is the convective heat transfer coefficient occurring on boundary is the convection fluid temperature, and is the outward unit normal of boundary [40].
where is the nodal temperature solution vector at time t and N is the matrix of real-valued element shape functions. In this work, the superscript “” of a matrix denotes that the matrix contains OTI numbers. The solution vector becomes hypercomplex because the input parameters are perturbed along imaginary directions that contain derivative information.
Additional degrees-of-freedom are created in order to account for the OTI imaginary directions. The number of integration points remains the same, however, these integrals now contain hypercomplex parts. Figure 1 shows the additional degrees-of-freedom required for an OTI analysis for r = 2 and n = 3 for a quadrilateral element with four integration points.
where is the global system matrix and is the global source vector where both are formed in an element-by-element approach as in traditional finite element computations. The vector represents the unknown nodal temperatures for time . The solution is known at time ti and is the time increment.
The transpose of an OTI matrix is carried out in the same manner as the transpose of a real-valued matrix. Integrals in Eqs. (49)–(51) are solved using conventional 2 × 2 Gauss integration.
The global system of equations is found by assembling the elemental matrices into the global system of equations.
2.3.2 Solution to the Order Truncated Imaginary System of Equations.
where the solution to the coefficient of the imaginary direction is found by forming the right hand side term that depends on the term of and all terms from and such that when multiplied, result in direction. Since all systems depend on , Lower-upper (LU) decomposition or Cholesky factorization can be used to reduce the computational effort in solving the hypercomplex system of equations.
3 Numerical Example: Uncertainty Quantification of Transient Heat Transfer in a Fin
HYPAD-UQ was applied to a transient linear thermal finite element analysis of a heated fin. The stochastic perturbation finite element method was also conducted to compare accuracy with HYPAD-UQ for the same computational time. The analytical solution of the fin temperature in Sec. 3.1 and a description of the FEA model are presented in Sec. 3.2. The computational time and the error of partial derivatives calculated with HYPAD are presented in Sec. 3.3. Numerical results are presented in Sec. 3.4 for two cases of random variable parameters.
3.1 Analytical Solution.
where and . This analysis assumed the initial temperature , therefore, . In addition, the infinite sum in Eq. (71) was solved numerically using a truncation of j = 100.
3.2 Finite Element Model.
The fin was modeled in 2D with 10,000 four-noded quadrilateral elements and 11,011 nodes using an in-house Python finite element code. The analysis was conducted using implicit Euler time integration for a total of 450 s in order to reach steady-state. A time-step of 1 s was used which was determined from a convergence study [44]. A real-variable version of the FEA simulation was used to generate samples to train the linear regression models. A hypercomplex version of the finite element code was used to calculate partial derivatives of temperature evaluated at the mean using OTI-based HYPAD, as described in Secs. 2.3.1 and 2.3.2.
A dependence on hU was included in Eq. (72) to ensure derivatives with respect to hU account for heat transfer in the out-of-plane direction. UV was approximated by minimizing the difference of T between the FEA simulation and the analytic solution, both modeled at the mean values of random variables, see Table 1. The resulting value was 735/114 6.447 [44].
Case 1 | Case 2 | |||||
---|---|---|---|---|---|---|
Random variable | Symbol | Mean | Distribution | δx | Distribution | δx |
Thermal conductivity | k | 7.1 W/m K | Normal | 0.10 | Log-normal | 0.20 |
Specific heat | Cp | 580 J/kg K | Normal | 0.03 | Log-normal | 0.20 |
Density | ρ | 4430 kg/m3 | Normal | 0.03 | Log-normal | 0.20 |
Heat transfer coefficient | hU | 114 W/m2 K | Normal | 0.10 | Log-normal | 0.20 |
Ambient temperature | 283 | Normal | 0.001 | Triangle | 0.01 | |
Temperature of heat source | TW | 389 | Normal | 0.05 | Uniform | 0.20 |
Length of fin | b | 51 × 10−3 | Normal | 0.01 | Uniform | 0.20 |
Case 1 | Case 2 | |||||
---|---|---|---|---|---|---|
Random variable | Symbol | Mean | Distribution | δx | Distribution | δx |
Thermal conductivity | k | 7.1 W/m K | Normal | 0.10 | Log-normal | 0.20 |
Specific heat | Cp | 580 J/kg K | Normal | 0.03 | Log-normal | 0.20 |
Density | ρ | 4430 kg/m3 | Normal | 0.03 | Log-normal | 0.20 |
Heat transfer coefficient | hU | 114 W/m2 K | Normal | 0.10 | Log-normal | 0.20 |
Ambient temperature | 283 | Normal | 0.001 | Triangle | 0.01 | |
Temperature of heat source | TW | 389 | Normal | 0.05 | Uniform | 0.20 |
Length of fin | b | 51 × 10−3 | Normal | 0.01 | Uniform | 0.20 |
3.3 High-Order Order Truncated Imaginary-Based Derivatives.
Hypercomplex automatic differentiation was used to compute all first-order through seventh-order partial derivatives of the nodal temperature at the tip of the fin with respect to the seven random variables evaluated at the mean, see Table 1, at each time-step s for the entire analysis s. Although this implementation of OTI differentiation requires derivatives to be calculated at every node in the FEA model for each time-step, this study only analyzed temperature at the tip of the fin; however, UQ results for each node could have been calculated from theses derivatives. For example, variance estimates could have been computed for each node in the model. At each node, a total of 3431 derivatives were computed in addition to the conventional FEA solution. In particular, a total of seven first-order, 28 second-order, 84 third-order, 210 fourth-order, 462 fifth-order, 924 sixth-order, and 1716 seventh-order partial derivatives were calculated. Of these derivatives, seven first-order, 25 second-order, 65 third-order, 140 fourth-order, 266 fifth-order, 462 sixth-order, and 750 seventh-order derivatives were nonzero. Due to the use of the sparse OTI implementation, only these nonzero imaginary coefficients were accounted for within the algebraic operations in the finite element procedure. In summary, a total of 18,894,876 nonzero first-order through seventh-order derivatives were calculated and stored in the model for each time-step but were overwritten during the next time-step.
where and are the HYPAD-based derivatives of the FEA model and analytical derivative values, respectively, corresponding to time-step i, M is the total number of time steps, and is the maximum of all analytical values. The conventional FEA solution for T has a NRMSE error below 1 × 10−4. However, the HYPAD derivatives have a slightly larger error which increases with the order of derivative.
Figure 3 shows that the error in derivatives increase as the order of derivative increases. This is due to the numerical discretization error that accrues with each order since higher-order derivatives depend on values of lower-order derivatives. Furthermore, there is an additional source of error in the FEA simulation due to the numerical approximation in the out-of-plane heat dissipation, see Sec. 3.2.
A real-variable analysis and seven independent OTI-based FEA simulations were performed to analyze the computational performance, see Fig. 4. Each simulation calculates the traditional real-valued temperature and all combinations of first-order through nth-order derivatives. The real solution and all combinations of first-order through nth-order partial derivatives were calculated in a single OTI run. Higher-order HYPAD derivatives require more CPU time; however, the number of partial derivatives being calculated also increases. The time to compute the elemental matrices and assemble the global system of equations are denoted by the assembly time. Solution time refers to the CPU time to solve the system of equations.
3.4 Uncertainty Quantification of Temperature at Tip of Fin.
Partial derivatives calculated with HYPAD were used in the Taylor series to calculate central moments, probability distributions, and Sobol' indices of temperature T at the tip of a heated fin. The accuracy of HYPAD-UQ was compared to random sampling of the analytical solution following a latin hypercube sampling (LHS) design. Computational time was compared to a Taylor series expansion constructed by regression, similar to the method described in Ref. [21]. The unknown coefficients of the complete polynomial basis of the Taylor series were solved for the regression analysis using ordinary least squares (OLSs). An additional comparison was made to the Taylor series created from partial derivatives of the analytical solution, also calculated with OTI-based HYPAD, to show the effect of the error in the HYPAD derivatives on the UQ metrics. Herein, derivatives calculated from the analytical solution are referred to as the analytical derivatives while the derivatives calculated from the FEA model will be referred to as HYPAD derivatives.
Uncertainty in T was quantified for two cases of parameters of the random variables. The first case, presented in Sec. 3.4.1, assumed all variables follow a Gaussian distribution with low coefficient of variations, where σx is the standard deviation of random variable x. The coefficient of variations δx for the material properties k, Cp, and ρ were assumed to be the experimental uncertainty values listed in Ref. [45] for Ti6-Al4V and δx was assumed for the remaining variables, see Table 1. The mean values were assumed to be the values listed in Ref. [43]. The second case, presented in Sec. 3.4.2, assumed non-Gaussian distributions with a larger δx for each variable. The mean values remained unchanged, therefore, the same Taylor series expansion was used for both cases. Standard deviations were set to 20% of the mean values except . The coefficient of variation of was chosen so that other random variables significantly contribute to the variance of temperature at the tip of the fin, see Table 1. The thickness δ and depth L of the fin were assumed to be deterministic values of mm and L = 1 m, respectively, for both cases [43].
3.4.1 Gaussian Random Variables With Low Coefficient of Variations.
HYPAD-UQ was applied to quantify the uncertainty of temperature at the tip of heated fin following the parameters listed in Table 1 under case 1. The HYPAD-UQ approximations for the first four central moments are in close agreement with those estimated from 1 × 106 evaluations of the analytical solution following an LHS design, see Fig. 5. HYPAD-UQ central moments were calculated algebraically using Eq. (26) for the first-order through third-order Taylor series expansions, as described in Sec. 2.1. Moments approximated with fourth-order and higher-order expansions were calculated from 1 × 106 samples of the Taylor series following an LHS design. The computational cost of the seventh-order Taylor series using HYPAD-based derivatives was about 206 times a single traditional FEA run, see Fig. 4. Therefore, moments calculated with a third-degree OLS model trained with m = 206 samples was compared to the HYPAD-UQ moments, shown in Fig. 5. Central moments were also calculated algebraically from the third-degree OLS model using Eq. (26). The 95% confidence intervals of the OLS-based central moments and analytical central moments were calculated from the 2.5 and 97.5 percentiles produced from bootstrap resampling with 100 replications [46].
Figure 6 shows the NRMSE of central moments approximated by HYPAD-UQ and OLS models against the CPU time relative to a single real-variable analysis. HYPAD-UQ showed a significant computational advantage over the OLS models. The NRMSE was calculated with Eq. (73) assuming to be the central moments approximated from 1 × 106 evaluations of the analytical solution. To compare accuracy based on CPU time, the number of training samples of the OLS models were chosen to match the CPU time required to calculate HYPAD derivatives, see Fig. 4. The first-degree through third-degree OLS models were trained with 11, 22, 65, 134, and 206 samples of the real-variable FEA simulation following an LHS design. OLS models were only trained for cases where the number of samples exceeded the number of unknown coefficients.
Figure 6 also shows the NRMSE of moments calculated from the Taylor series constructed from partial derivatives of the analytical solution. This shows a comparison of HYPAD-UQ and a numerically accurate Taylor series using the analytical solution. The error in HYPAD derivatives limits the accuracy of the central moment approximations. However, HYPAD-UQ is still in very good agreement with random sampling of the analytic solution, see Fig. 5.
The probability density function (PDF) generated from sampling the HYPAD-based Taylor series expansion is in close agreement with the PDF estimated from 1 × 106 evaluations of the analytical solution and the third-degree OLS model trained with m = 206 samples, see Fig. 7. Probability densities were estimated using 1 × 106 evaluations of each model with the Epanechnikov method for nonparametric kernel regression with a window size of about 0.076 for each model [47].
The accuracy in the tails of the distributions approximated with HYPAD-UQ converge to the distribution approximated by the analytical solution, see Fig. 8 for evaluations of the HYPAD-based Taylor series and the analytical solution plotted on a Gaussian probability scale at a steady-state time of t = 450 s. The first-order Taylor series expansion produces a Gaussian distribution due to all random variables being Gaussian. However, higher-order Taylor series expansions converge to the non-Gaussian distribution of the analytical solution of T.
Sobol' indices calculated with HYPAD-UQ are in good agreement with sampling of the analytical solution following an LHS design, see Fig. 9 for the values of Sobol' indices through time. HYPAD-UQ Sobol' indices were calculated algebraically as described in Sec. 2.2. The sum of all interaction effects was calculated by subtracting the sum of all main effects from one, at each time-step. Sobol' indices were calculated from the analytical solution by the sampling method described in Ref. [31], with a total of 1 × 108 samples for each variable at each time-step.
where is the Sobol' index approximated by HYPAD-UQ and is the Sobol' index calculated from sampling of the analytic solution at each time point i. The first-order HYPAD-UQ approximations of Sobol' indices are within 3.1% maximum absolute error compared to LHS of the analytic solution across all time points, even though there is no approximation for any interaction effects. Higher-order HYPAD-based Taylor series expansions improve the approximations to be within 1.7% absolute error for second-order and 0.92% absolute error for third-order.
Maximum absolute error ε (%) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Method | Order/degree | Sb | Interaction | ||||||
HYPAD-UQ | First-order | 2.8 | 0.15 | 0.083 | 1.5 | 3.1a | 1.1 | 0.12 | 3.1a |
Second | 1.4 | 0.083 | 0.078 | 1.7a | 1.5 | 0.88 | 0.065 | 0.43 | |
Third | 0.43 | 0.11 | 0.030 | 0.92a | 0.43 | 0.42 | 0.043 | 0.42 | |
Analytic derivatives | First-order | 2.5 | 0.099 | 0.074 | 1.8 | 2.6 | 1.6 | 0.15 | 3.1a |
Second | 1.2 | 0.047 | 0.11 | 2.2a | 1.0 | 0.64 | 0.094 | 0.41 | |
Third | 0.92 | 0.071 | 0.052 | 1.2a | 1.0 | 0.88 | 0.074 | 0.41 | |
OLS, m = 206 | First-degree | 1.8 | 0.78 | 0.50 | 2.6 | 1.6 | 4.9a | 0.32 | 3.1 |
Second | 0.80 | 0.12 | 0.073 | 2.0a | 1.1 | 1.7 | 0.15 | 0.40 | |
Third | 0.80 | 0.074 | 0.055 | 1.9a | 1.0 | 1.1 | 0.074 | 0.40 |
Maximum absolute error ε (%) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Method | Order/degree | Sb | Interaction | ||||||
HYPAD-UQ | First-order | 2.8 | 0.15 | 0.083 | 1.5 | 3.1a | 1.1 | 0.12 | 3.1a |
Second | 1.4 | 0.083 | 0.078 | 1.7a | 1.5 | 0.88 | 0.065 | 0.43 | |
Third | 0.43 | 0.11 | 0.030 | 0.92a | 0.43 | 0.42 | 0.043 | 0.42 | |
Analytic derivatives | First-order | 2.5 | 0.099 | 0.074 | 1.8 | 2.6 | 1.6 | 0.15 | 3.1a |
Second | 1.2 | 0.047 | 0.11 | 2.2a | 1.0 | 0.64 | 0.094 | 0.41 | |
Third | 0.92 | 0.071 | 0.052 | 1.2a | 1.0 | 0.88 | 0.074 | 0.41 | |
OLS, m = 206 | First-degree | 1.8 | 0.78 | 0.50 | 2.6 | 1.6 | 4.9a | 0.32 | 3.1 |
Second | 0.80 | 0.12 | 0.073 | 2.0a | 1.1 | 1.7 | 0.15 | 0.40 | |
Third | 0.80 | 0.074 | 0.055 | 1.9a | 1.0 | 1.1 | 0.074 | 0.40 |
Largest ε for each method.
Both of the Taylor series expansions using HYPAD derivatives and analytic derivatives have similar accuracy. This shows that the error in the HYPAD derivatives do not significantly affect the accuracy of Sobol' indices. The OLS model trained with m = 206 samples also achieves high accuracy even with a first-degree polynomial basis. The lack of interaction effects is one reason for high accuracy of first-order and first-degree approximations. Section 3.4.2 repeats this analysis for random variable parameters that produce a substantial interaction effect.
3.4.2 Non-Gaussian Random Variables With Large Coefficient of Variations.
The analysis in Sec. 3.4.1 was repeated for independent random variables with larger coefficient of variations and non-Gaussian distributions, see Table 1 under case 2. The derivatives from Sec. 3.4.1 were reused in this analysis because the mean values of the random variables did not change.
Central moments approximated with HYPAD-UQ converge to the LHS results of the analytical solution using 1 × 107 samples, see Fig. 10. However, fifth-order and higher-order approximations for skewness and kurtosis diverge from the analytic solution in the transient region between t = 20 s and t = 100 s.
HYPAD-UQ central moments were compared to a second-degree OLS model trained with m = 206 samples, which has approximately the same computational cost as the seventh-order HYPAD-based Taylor series expansion. Third-degree OLS results are not shown due to large confidence intervals in the moments which is a consequence of the limited number of training points. The fourth-order HYPAD-UQ expansion yielded the best results for the central moments, see Fig. 10, which took about 22 times a single real-valued analysis. These results achieved greater accuracy than the OLS model which required 206 times a single real-variable analysis.
HYPAD-UQ central moments achieved low NRMSE values; however, higher-order expansions do not guarantee a monotonic decrease in error, as shown by Fig. 11. This behavior does not solely come from the error in the derivatives as shown by the nonmonotonic convergence of the NRMSE of central moments calculated using the Taylor series expansion constructed using analytic derivatives.
Probability densities were estimated by the analytical solution, HYPAD-UQ, and a second-degree OLS, trained with m = 206 samples, using 1 × 106 evaluations of each model following an LHS design, see Fig. 12. The Epanechnikov method for nonparametric kernel regression with a window size of about 0.33 was used to approximate the PDF of each model. The PDF approximated with HYPAD-UQ converges to the analytical solution at fourth-order. The PDF estimated from the OLS model is in close agreement with LHS of the analytic solution, however, third-order through seventh-order HYPAD-UQ methods are in closer agreement.
Although the HYPAD-UQ approximations of the PDF converge to the analytical solution as the order of expansion increases, higher-order Taylor series expansions deviate from the analytical solution near low and high cumulative probabilities, see Fig. 13. An empirical cumulative distribution was created using 1 × 106 evaluations of the analytical solution and first-order through seventh-order HYPAD-based Taylor series expansions. Figure 13(a) shows the cumulative distribution function (CDF) at a transient time of t = 35 s, which is the time point of maximum error in the seventh-order HYPAD-UQ approximation for kurtosis and Fig. 13(b) shows the CDF at a steady-state time of t = 450 s.
Higher-order Taylor series expansions can diverge from the solution, see Fig. 14. The same evaluations of the HYPAD-based Taylor series expansions used to generate the CDF, see Fig. 13, were compared to the analytical solution at t = 35 s, see Fig. 14(a), and t = 450 s, see Fig. 14(b). A majority of the Taylor series evaluations tend to approach the analytical solution as the expansion order increases; however, large errors in higher-order Taylor series predictions can occur. Figure 14(a) shows that at t = 450 s, a few combinations of random variable parameters cause the third-order, fifth-order, and seventh-order HYPAD-based Taylor series to significantly under predict T and the second-order, fourth-order, and sixth-order HYPAD Taylor series to significantly over predict T. The low values predicted by the fifth-order and seventh-order Taylor series expansions at t = 450 s cause the empirically generated CDF to deviate from the analytical solution near low cumulative probabilities, see Fig. 13(b). The even-ordered Taylor series expansions appear to yield a better CDF because these outliers get grouped with data of similar magnitude. A similar conclusion can be drawn for the CDF at t = 35 s.
Sobol' indices approximated with second-order and third-order HYPAD-UQ methods agree well with sampling of the analytic solution, see Fig. 15. Sobol' indices were calculated from the analytic solution the pick-and-freeze method, following Ref. [48]. This method required a total of samples to calculate all main effect Sobol' indices, where r is the number of random variables and 1 × 107 was chosen, following an LHS design.
The cumulative interaction effect is large with a maximum of about 27.8% of the total variance. Figure 16 shows the main and interaction effect Sobol' indices at a steady-state time of t = 450 s. At this time point, second-order HYPAD-UQ Sobol' indices are in good agreement with analytical Sobol' indices even though second-order HYPAD-UQ underestimates the total variance, see Fig. 10. Sobol' indices were omitted from Fig. 16 for values less than 0.02. HYPAD-UQ interaction effects were calculated algebraically using Eq. (21) for second-order and Eqs. (A3) and (A4) for third-order expansions. Interaction Sobol' indices were calculated from the analytical solution using the nested-loop sampling method in Ref. [31] with 1 × 104 samples in each loop for a total of 1 × 108 samples.
As shown in Fig. 16, main effects approximated by HYPAD-UQ improve with the order of the expansion. The third-order HYPAD-UQ Sobol' indices have a maximum of 13% absolute error across all time points, see Table 3 for the maximum absolute error of Sobol' indices using Eq. (74). Sobol' indices approximated with analytic derivatives are also within 13% maximum absolute error at third-order. Table 3 also shows that the first-degree OLS model trained with m = 206 samples approximates main effect Sobol' indices better than the first-order HYPAD-UQ method. However, second-order and higher-order HYPAD-UQ methods perform better than the first-degree and second-degree OLS models.
Maximum absolute error ε (%) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Method | Order/degree | Sb | Interaction | ||||||
HYPAD-UQ | First-order | 3.2 | 1.1 | 1.7 | 3.4 | 46a | 7.6 | 12 | 28 |
Second | 2.9 | 1.0 | 1.7 | 0.86 | 34a | 9.1 | 11 | 13 | |
Third | 1.2 | 0.86 | 0.69 | 2.1 | 13a | 1.9 | 2.9 | 9.5 | |
Analytic derivatives | First-order | 3.2 | 1.1 | 1.7 | 3.6 | 46a | 7.7 | 12 | 28 |
Second | 2.9 | 1.0 | 1.7 | 0.97 | 34a | 9.1 | 11 | 13 | |
Third | 1.3 | 1.0 | 0.73 | 2.2 | 13a | 2.1 | 2.8 | 9.3 | |
OLS, m = 206 | First-degree | 1.9 | 2.0 | 1.2 | 3.1 | 26 | 3 | 9.7 | 28a |
Second | 3.1 | 6.5 | 6.6 | 5.6 | 49 | 50a | 25 | 23 |
Maximum absolute error ε (%) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Method | Order/degree | Sb | Interaction | ||||||
HYPAD-UQ | First-order | 3.2 | 1.1 | 1.7 | 3.4 | 46a | 7.6 | 12 | 28 |
Second | 2.9 | 1.0 | 1.7 | 0.86 | 34a | 9.1 | 11 | 13 | |
Third | 1.2 | 0.86 | 0.69 | 2.1 | 13a | 1.9 | 2.9 | 9.5 | |
Analytic derivatives | First-order | 3.2 | 1.1 | 1.7 | 3.6 | 46a | 7.7 | 12 | 28 |
Second | 2.9 | 1.0 | 1.7 | 0.97 | 34a | 9.1 | 11 | 13 | |
Third | 1.3 | 1.0 | 0.73 | 2.2 | 13a | 2.1 | 2.8 | 9.3 | |
OLS, m = 206 | First-degree | 1.9 | 2.0 | 1.2 | 3.1 | 26 | 3 | 9.7 | 28a |
Second | 3.1 | 6.5 | 6.6 | 5.6 | 49 | 50a | 25 | 23 |
Largest ε of each method.
4 Discussion
4.1 Effect of Error on Hypercomplex Automatic Differentiation-Uncertainty Quantification.
Hypercomplex automatic differentiation calculates the most accurate numerical derivatives possible for a given model. However, since FEA models contain epistemic error such as mesh and time discretization error, the HYPAD-based derivatives will not be as accurate as the analytical derivatives. Furthermore, the error will accumulate with the order of the derivative since higher-order derivatives depend on lower-order derivatives. As a result, the error in the derivatives will limit the accuracy of the Taylor series expansion and consequently the statistical moments, see Fig. 6, for example. In this case, HYPAD-based derivatives higher than second-order do not increase the accuracy in the expected value and variance approximations. In contrast, the analytical derivatives show a substantial increase in accuracy of these moments for higher-order expansions of the analytical Taylor series.
Increasing the order of expansion of the Taylor series does not guarantee a monotonic decrease in error, even if the derivative values are exact. The polynomial fit produced by the Taylor series may yield large errors for certain functions and/or parameters of random variables. For example, the Taylor series predictions of temperature yield large errors compared to the analytical solution at steady-state, see Fig. 14(b), for a few random variable parameters. The error increases with order of expansion for these points, although, the majority of evaluations approach the analytical solution as the order increases.
4.2 Computational Cost of Hypercomplex Automatic Differentiation-Uncertainty Quantification.
The computational cost of HYPAD-UQ depends on the number of sensitivities to be computed which depends on the number of variables r and the order of Taylor series expansion n. The number of partial derivatives in an nth-order Taylor series expansion is . As a result, calculation of a high-order Taylor series expansions for a large number of variables may become infeasible.
Increasing the order of the expansion can increase the accuracy of the Taylor series. However, the amount of additional computational resources needed to calculate all higher-order partial derivatives required to increase the order of expansion may not outweigh the increase in accuracy. As shown in Fig. 4, the CPU time to calculate all partial derivatives with OTI-based HYPAD increases by a factor between 1.5 and 3 as the order of derivative increases. The HYPAD-UQ approximations of central moments calculated in Sec. 3 show that fifth- and higher-order expansions resulted in a negligible increase in accuracy for the low variance case, see Fig. 6, and caused a decrease in accuracy for the large variance case, see Fig. 11. Note that this is caused by the fit of the Taylor series expansion and not the error in FEA-based HYPAD derivatives, as shown by the comparison to the analytical Taylor series.
Although HYPAD was implemented in a simple FEA simulation in this work, the method can be applied in an identical fashion to more complex simulations as the method is general and can be applied to any numerical model. However, as the complexity of the simulation increases, the additional time to compute derivatives will increase as well.
Only a few variables will be important in many engineering problems. As a consequence, there will be terms in the Taylor series that do not need to be computed. Furthermore, the number of nonimportant terms in the Taylor series will increase as the order of expansion increases. Therefore, calculating only the important derivatives can lead to a substantial increase in computational efficiency of HYPAD-UQ if multicomplex-based or multidual-based differentiation is used. As an example, consider the variance approximation of T at steady-state for the large variance case presented in Sec. 3.4.2. The main effect and two-variable interaction effect Sobol' indices indicate that ρ and Cp are noninfluential, see Fig. 16. In addition, only six out of the 28 two-variable interaction effects that have more than a 2% contribution to the total variance. A sparse second-order HYPAD-UQ approximation of the total variance at steady-state, using only the five first-order and 11 second-order sensitivities corresponding to the Sobol' indices shown in Fig. 16, yielded 62.52% of the total variance approximated from random samples of the analytical solution. In comparison, a full second-order HYPAD-UQ approximation using all seven first-order and 35 second-order derivatives resulted in 62.77% of the total variance. Furthermore, a sparse third-order HYPAD-UQ approximation of the total variance at steady-state, using only the five first-order, 11 second-order, and 21 third-order sensitivities corresponding to the Sobol' indices shown in Fig. 16, yielded 91.57% of the total variance. In comparison, a full third-order HYPAD-UQ approximation using seven first-order, 28 second-order, and 84 third-order derivatives resulted in 90.71% of the total variance.
5 Conclusion
A new UQ method called HYPAD-UQ was developed which uses higher-order derivatives from a finite element formulation to construct Taylor series surrogate models. These surrogates are used to quickly compute the statistical moments, PDF, and Sobol' indices of the model outputs. The basis for the method is the use of hypercomplex OTI algebra to compute accurate derivatives in an efficient manner.
The HYPAD-UQ method was applied to a linear transient thermal finite element analysis to demonstrate the methodology and compare the computational performance and accuracy against the regression-based stochastic perturbation finite element method in which unknown coefficients of a complete nth-degree polynomial basis were solved using the ordinary least squares method. First-order through seventh-order HYPAD-based Taylor series expansions were used to approximate central moments, the PDF, and Sobol' indices of temperature in a heated fin for two case studies of random variable parameters. The first case study assumed Gaussian independent random variables with low variation. For this example, HYPAD-UQ achieved similar accuracy compared to the regression-based stochastic perturbation finite element method in approximately an order of magnitude less CPU time. The second case assumed non-Gaussian independent random variables with a larger variation than the previous case. HYPAD-UQ achieved significantly better accuracy than the regression-based method in approximately an order of magnitude less CPU time. Future work will compare the results of HYPAD-UQ with other state-of-the-art surrogate models such as polynomial chaos expansion and random Gaussian processes.
Sobol' indices calculated with HYPAD-UQ were shown to have high accuracy in both case studies of the numerical example. HYPAD-UQ correctly identified important main and interaction effects for the non-Gaussian large variance case study with only a second-order Taylor series expansion. The specific implementation of HYPAD used in this work took an additional CPU time of five times a traditional FEA run to compute all partial derivatives in the complete second-order Taylor series expansion. HYPAD-UQ approximations of Sobol' indices achieved far greater accuracy than the regression-based stochastic perturbation finite element method using 206 FEA evaluations.
In addition, a comparison was made to the Taylor series constructed with analytical derivatives in order to show the effect of the error in derivatives obtained from the FEA model on the accuracy of HYPAD-UQ. In the low variance case, error in the HYPAD-based derivatives limited the accuracy in central moments. However, in the large variance case, the analytic Taylor series showed only marginal improvement over HYPAD-UQ.
Funding Data
The United States Army Research Office (Grant No. W911NF2010315; Funder ID: 10.13039/100000183).
The Department of Energy/National Nuclear Administration (Award No. DE-NA0003948; Funder ID: 10.13039/100000015).
Data Availability Statement
The datasets generated and supporting the findings of this article are obtainable from the corresponding author upon reasonable request.