Rapid Uncertainty Propagation for High-fidelity Prognostics Using SROMPy and Python

This work introduces a practical approach for accelerating probabilistic, high-fidelity prognostics using the stochastic reduced order model (SROM) method and its availability in the open-source Python package, SROMPy. SROMs are used as an efficient Monte Carlo simulation (MCS) method, providing low-dimensional representations of random model inputs that enable rapid and non-intrusive uncertainty propagation. This study represents the first application of the SROM approach in the field of prognostics and health management and serves as a tutorial demonstration of the SROMPy software package. The relative ease of applying SROMs with SROMPy for uncertainty propagation is demonstrated on an example of probabilistic, non-planar crack growth simulation. Results show that the SROM approach agrees well with results from MCS while providing the potential for orders of magnitude computational speedup. The complete source code and input data required to reproduce the results in this paper are available online to facilitate further evaluation and adoption of the SROM method by researchers in the field.


INTRODUCTION
The application of damage prognostics to real-world systems requires high-fidelity simulations (e.g., finite element (FE) analysis) to predict how damage will evolve in complex geometries.Furthermore, system uncertainties must be quantified and propagated through these models in order to provide reliable, probabilistic predictions.However, traditional Monte Carlo simulation (MCS) is impractical to use in these settings due to the number of model evaluations required for convergence, and the runtime required for each evaluation.Therefore, more advanced methods for propagating uncertainty are required to make probabilistic, high-fidelity damage prognostics computationally tractable.James Warner et al.This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 United States License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
There are two primary approaches for alleviating this computational burden.The first involves reducing the time for a single model evaluation by replacing an expensive computational model with an efficient surrogate model using machine learning (Warner et al., 2017;Leser et al., 2016;Sankararaman, Ling, Shantz, & Mahadevan, 2011).The second involves reducing the number of model evaluations required for convergence by using more sophisticated stochastic methods for uncertainty propagation.These two approaches may be combined, provided a satisfactory level of accuracy is retained.
This work aims to accelerate high-fidelity damage prognostics using the second approach of propagating uncertainty with fewer model evaluations.The most popular class of techniques for doing so are spectral methods, which express stochastic solutions as orthogonal polynomials of the random input parameters (i.e., polynomial chaos expansions).Two well-established methods following this approach are the stochastic collocation (Babuska, Nobile, & Tempone, 2007) and stochastic Galerkin method (Ghanem & Spanos, 2003).In their basic forms, stochastic collocation has the practical advantage of being a non-intrusive method (i.e., no modifications of the deterministic computational model are necessary), but the computational expense grows exponentially with the number of random inputs.Extensions of the approach have focussed on gaining efficiency by employing sparse grids (Nobile, Tempone, & Webster, 2008).
The stochastic reduced order model (SROM) approach (Grigoriu, 2009;Warner, Grigoriu, & Aquino, 2013;Grigoriu, 2011) was developed as an effective alternative to spectral methods, and has since been successfully applied to a range of stochastic problems (Sarkar, Warner, Aquino, & Grigoriu, 2014;Warner, Aquino, & Grigoriu, 2015;Emery, Field, Foulk, Karlson, & Grigoriu, 2015).This work, however, represents the first application of the approach in the field of prognostics and health management.A SROM provides a low-dimensional discrete approximation to random model parameters by selecting optimal representative samples, and then using them to propagate uncertainty with relatively few model evaluations.The method is conceptually simple, non-intrusive, efficient, proven to converge to the exact solution (Grigoriu, 2011), and has been shown to offer advantages over the stochastic collocation and stochastic Galerkin approaches for some problems (Field, Grigoriu, & Emergy, 2015).Furthermore, the SROM approach has been implemented in the open-source Python package, SROMPy1 , providing user-friendly utilization of the method (Warner, 2018a).
The goal of this study is to demonstrate the practicality of the SROM approach for accelerating uncertainty propagation in damage prognostics and the relative ease of applying the method with SROMPy and Python.These goals are highlighted in the context of probabilistic prognosis for nonplanar fatigue crack growth.Given uncertainty in initial damage state and crack growth rate parameters, the SROM approach was used to generate probabilistic end of life estimates in just a fraction of the time of MCS, while retaining a high degree of accuracy.It was shown that this analysis can be carried out using relatively few lines of Python code by leveraging the functionality of SROMPy.In order to facilitate reproducibility and encourage further evaluation of SROMaccelerated prognostics, the complete source code and input data for the example are available online 2 .
The following section provides the relevant background for the study, starting with a formulation of the SROM approach for uncertainty propagation and then giving a brief overview of the SROMPy Python module that implements it.Then, an example of probabilistic, non-planar crack growth using the SROM method is presented, detailing the use of SROMPy to model random input parameters and then propagate uncertainty through the crack growth model.A comparison with MCS is provided here to demonstrate the accuracy and computational speedup provided by the SROM approach.Finally, the study is concluded in the summary section.

BACKGROUND
This section gives the theoretical and practical background regarding the use of SROMPy for uncertainty propagation in damage prognostics.Generally speaking, uncertainty propagation is the problem of characterizing statistics of a quantity of interest, Y ∈ Γ ⊂ R d , that depends on random parameters, X ∈ Γ ⊂ R d , through a deterministic model M: (1) Here, d and Γ are the dimension and range of the random input vector, respectively, and d and Γ are the dimension and range of the random output vector, respectively.In this work, X represents variables that describe crack growth rate and current damage state, M is a high-fidelity crack growth simulation, and Y is the end of life of the specimen being analyzed.The SROM theory and SROMPy capabilities are described in the context of the general stochastic problem in Eq. ( 1) before being applied specifically to probabilistic prognostics.

SROM Theory
SROMs can be viewed as a "smart" Monte Carlo method for stochastic problems.The approach efficiently discretizes the stochastic space and significantly reduces the computational complexity associated with propagating uncertainty relative to MCS, while retaining the benefits of a non-intrusive method.The approach is particularly beneficial for problems that depend on time-consuming computational models, e.g., the high-fidelity crack growth simulation used in this study.
To solve Eq. ( 1), the model inputs X are first approximated by a SROM X, a simple random vector taking values x(1) , ..., x(m) with probabilities p (1) , ..., p (m) .Then, the outputs Y are estimated using local piecewise-constant or piecewise-linear approximations of the model M.These two steps are elaborated on in the following sections.As many details were omitted for the sake of brevity, consult the relevant references (Grigoriu, 2009;Warner et al., 2013;Emery et al., 2015) for further explanation.

Constructing a SROM for Model Inputs
When using the SROM approach, it is assumed that the statistics of the model inputs X are known a priori.Let the following expressions represent the marginal cumulative distribution functions (CDFs), moments of order q, and correlation matrix of X where E[•] is the expectation operator.
The SROM approximation, X, is a discrete random vector defined by where x(k) denote samples of X, and p (k) = P (X = x(k) ) (Grigoriu, 2009).Note that p (k) ≥ 0 ∀k, and m k=1 p (k) = 1 so that X has a valid probabilistic description.It then follows that the statistics of X corresponding to those of X in Equations ( 2) -( 4) are given by where 1(condition) is the indicator function, evaluating to 1 if the condition is true and 0 otherwise.In this context, the number of sample-probability pairs that define the SROM, m, is referred to as the SROM size.
The defining SROM samples and probabilities are chosen such that X is an optimal representation of X in a statistical sense.This is done through the solution of the following optimization problem: where e 1 , e 2 , and e 3 quantify the error between the SROM and target CDFs, moments, and correlation matrix, respectively.The weighting factors, α i , are used to ensure that each error component have similar order of magnitude or to emphasize the SROM's ability to represent a particular statistic of X.While the particular form of the error terms is problem dependent, one common example is where q is the largest moment of interest.Note that Eq. ( 12) allows the SROM approach to naturally handle correlated input variables.
An additional strength of the SROM approach is that it can still be applied if an explicit probability law for X is unavailable and there is only access to a collection of N independent, equally likely samples, {x (k) } N k=1 , of the vector.In this case, the following empirical estimators for the statistics of X can be used in the error terms in Equations ( 10)-(12):

Propagating Uncertainty to Outputs via SROMs
After a SROM is generated to represent the input parameters according to the previous section, it is then used to form a SROM-based surrogate model for uncertainty propagation.
The surrogate is either a piecewise constant or piecewise linear response surface that maps samples of X directly to Y that can be used in place of the original model, M, for MCS.The first step for either case is to evaluate Eq. ( 1) for each sample defining the input SROM, X, i.e., to produce the collection of SROM output samples, {ỹ (k) } m k=1 .For the simpler piecewise constant approximation, the surrogate model is then given by where {Γ k , k = 1, ..., m} is a partition of the range Γ such that P (X ∈ Γ k ) = p (k) .Specifically, {Γ k } is a Voronoi tessellation of Γ with centers at the samples x(k) .In practice, however, the partition does not have to be constructed explicitly and Eq. ( 17) can be implemented in a straightforward manner.Here, a given sample of X is allocated to a particular cell Γ k if it is closest to the input sample, x(k) .The surrogate model, ỸC , then simply assumes the value of the corresponding SROM output sample, ỹ(k) .
Equation ( 17) represents a closed-form expression that can be rapidly evaluated using MCS to produce a collection of output samples, {ŷ (k) } N k=1 , forming an estimator for the true model output.Alternatively, ỸC (X) can be used to directly estimate the statistics of Y using SROM approximations analogous to Equations ( 6)-( 8).For instance, the distributions and moments of the output can be approximated as A more effective piecewise linear surrogate model, ỸL , can be constructed by considering a first order Taylor series expansion over each cell in {Γ k } as follows where ∇ỹ (k) denotes the gradient of the output with respect to the components of X evaluated at sample k.Equation ( 20) improves upon the accuracy of the simple piecewise constant approximation in Eq. ( 17), but with the added expense for computing gradients numerically using the finite difference method, requiring m(d + 1) model evaluations versus m via Eq.( 16) alone.Note that Eq. ( 20) can be generalized to higher order approximations by including addition terms of the Taylor expansion (Field et al., 2015), but only piecewise constant and linear models are considered here.

SROM Method Summary
Given a probabilistic description of random input parameters to a computational model, the procedure for propagating uncertainty through the model with the SROM approach is summarized as follows: 1. Construct input SROM • Solve Eq. ( 9) 2. Execute computational model for each SROM sample • Evaluate Eq. ( 16)
-Calculate gradients using finite difference.
Once the closed-form SROM output approximation has been formed in step 3, it can be efficiently sampled using MCS to estimate the output statistics (e.g., distributions and moments).Alternatively, Eqs. ( 18) and ( 19) can be used directly for the case of the piecewise constant approximation.
Regarding the efficiency of the SROM approach, let t ỸC and t ỸL denote the total computation time required to generate the piecewise constant and piecewise linear SROM approximations, respectively.It follows that where t X is the time required to form X in step (1) and t M is the time for a single evaluation of the model M. Here, the added computational expense for ỸL is due to the additional model evaluations required to estimate gradients.
The primary advantage of the SROM approach is that the solution times in Equations ( 21) and ( 22) can be substantially lower than traditional MCS by using far fewer model evaluations.To this end, let N represent the number of samples required for convergence with MCS, such that the total computational time is approximately N t M .Assuming that t X << t M , representing the common case where M is a computationally intensive high-fidelity simulation3 , then the computational speedup, S, for the piecewise constant and piecewise linear SROM approximation relative to MCS can be approximated as respectively.Since in many typical cases m << N , the speedup values can be orders of magnitude in size.

SROMPy Overview
The SROMPy Python module (Warner, 2018b) is the first publicly-available software package that implements the SROM approach to uncertainty propagation.This section provides a brief overview of the software's fundamental capabilities4 , including a simple example of approximating a normal random variable with a SROM for illustration.A basic understanding of the Python programming language is assumed.The interested reader can consult the technical report (Warner, 2018a) that accompanied the release of the software or the user documentation that comes with the source code (Warner, 2018b) for more information.

Target Random Quantities
In order to solve an uncertainty propagation problem (Eq. (1)), a user must first choose a probabilistic description for the model inputs X. SROMPy provides built-in options for representing random quantities for both the case when X follows known analytical probability distributions, and when only independent samples of it are available.
Currently, scalar random variables following beta, gamma, and normal probability distributions are directly supported in the software.Random vectors whose components follow standard distributions and have known correlations are supported in SROMPy through the implementation of translation random vectors, a method for modeling non-Gaussian random vectors (Grigoriu, 1995;Arwade, 2005).When only a collection of samples, {x (k) } N k=1 , is available to describe X, SROMPy provides an implementation of a random vector with sample-based statistics (Eq.( 13) -( 15)).While only a small subset of all possible probability distributions are currently available in SROMPy, it is straightforward to extend the pack-age to model new random variables with SROMs (Warner, 2018a).

SROM Functionality
The goal of SROMPy is to allow users to easily model random quantities, X, using SROMs, X, and use them to efficiently propagate uncertainty through computational models, as described in Sections 2.1.1 and 2.1.2.These capabilities are provided through the classes 5 SROM and SROMSurrogate, respectively.
The SROM class is the fundamental component of the SROMPy package whose primary role is to select optimal SROM samples and probabilities through the solution of Eq. ( 9) 6 .The class also implements Equations ( 6) -( 8) to calculate SROM statistics and provides access to the optimal samples so that a user can input them to their computational model as in Eq. ( 16).
Once a user has generated output samples via Eq.( 16), the SROMSurrogate class is used to construct the SROM approximation to the model output.Specifically, this class provides an implementation of the piecewise constant and piecewise linear approximations in Equations ( 17) and ( 20), respectively, that can be sampled to estimate output statistics.There are also methods to evaluate the statistics directly for the piecewise constant case, e.g., Equations ( 18) and ( 19).

Postprocessing
SROMPy provides a few simple utilities for comparing statistics of a SROM versus a target quantity it is approximating with the Postprocessor class.For example, the class can be used to calculate and output errors in the SROM moment estimates, or to automatically produce CDF comparison plots.

Example -SROM for a Normal Random Variable
Below is a simple example that illustrates a small subset of SROMPy functionality from each of the three previous sections.In particular, a SROM X with size m = 10 is generated to model a normal random variable, X ∼ N (µ, σ) ∈ R 1 , with mean, µ = 3.0, and standard deviation σ = 1.5.The CDF of the optimized SROM is then compared to that of the target.
The Python source code that implements this example using SROMPy is shown below.
from target import NormalRandomVariable from srom import SROM from postprocess import Postprocessor #Initialize Normal random variable 5 Python data structures 6 SROMPy uses a BFGS optimization algorithm implemented in the scipy Python module (Jones, Oliphant, Peterson, et al., 2001).The above source code demonstrates the relative ease of deploying SROM capabilities with SROMPy, where an arbitrary random variable X is modeled with a SROM X using just a few lines of code.The first block of code imports the relevant SROMPy classes needed for the example.Next, the NormalRandomVariable class is used to represent the target random variable in this example, X ∼ N (3.0, 1.5).
The SROM class is then used to approximate the normal random variable with a SROM.Here, a call to the optimize method executes the solution of the optimization problem in Eq. ( 9) to determine the optimal SROM samples and probabilities.Finally, the Postprocessor class is used to generate the CDF comparison plot seen in Figure 1.

Experimental Setup
The SROM approach is demonstrated here in the context of probabilistic prognosis for non-planar fatigue crack growth using the SROMPy software package.The experimental setup and crack growth model were borrowed from previous work done in (Leser et al., 2016(Leser et al., , 2017)), where the focus in the current study is on accelerating the uncertainty propagation process using SROMs.The experiment used an edge-notched, AA2024-T3 specimen with two holes drilled in it, as shown in Figure 2. The crack was grown from the notch under a A high-fidelity, finite element (FE)-based fracture modeling approach was developed to predict fatigue crack growth in the edge-notched specimen.The fracture mechanics code FRANC3D (Fracture Analysis Consultants Inc., 2011) was used to propagate geometrically-explicit cracks in a FE mesh via re-meshing while the parallel FE code ScIFEN (Warner, Bomarito, Heber, & Hochhalter, 2016) was used to evaluate the crack driving forces for a given crack configuration.The crack growth rate, da dN , was calculated at each step according to where ∆K is the stress intensity factor (SIF), a is the crack size, N is the cycle number, and C and n are empirical parameters (Paris & Erdogan, 1963).The high-fidelity fracture simulation grows a crack according to Eq. ( 25) by iterating between remeshing and FE calculations until the stress intensity factor reaches a critical value, representing failure of the specimen.More details on the model can be found in (Leser et al., 2017).
This example will be used to demonstrate the SROM approach to propagate uncertainty through the high-fidelity crack growth model and generate a probabilistic prediction of failure in the edge-notched specimen.It is assumed that the uncertainty arises from the initial damage state (the ycoordinate of the notch, y 0 ) and the simplified crack growth model used (the empirical parameters, C and n).In terms of the general stochastic model in Eq. ( 1), the random input This example demonstrates a common practical case where an explicit probability distribution to describe X was not available and was instead estimated using a Bayesian calibration and Markov chain Monte Carlo (MCMC) approach (Leser et al., 2017), resulting in a set of 5,000 independent samples {x (k) } N k=1 .Histograms for each input parameter's samples can be seen in Figure 3.A MCS prediction was made by running the crack growth simulation for each of the input parameter samples.The resulting collection of EOL output samples, {ŷ (k) } N k=1 , and its distribution were treated as the reference solution.Several SROM approximations of varying fidelity were generated and compared to the MCS solution to assess accuracy and efficiency.These comparisons are first shown in the following section, followed by a demonstration of the SROMPy package for one particular case, detailing the necessary source code to solve the problem.

SROM-Accelerated EOL Predictions
Given the uncertainty in input parameters X = [y 0 , C, n] (Figure 3), the CDF of Y = [EOL] was estimated using both the piecewise constant SROM approximation ỸC from Eq. ( 17) and the piecewise linear SROM approximation ỸC from Eq. ( 20).Three different SROM sizes were tested, m = 5, 10, and 20, to observe the performance of the two different approximations for increasing model size.The SROMaccelerated predictions were compared to the MCS reference solution CDF to assess the accuracy and efficiency of each case.
To facilitate probabilistic prognosis with the SROM approach, a SROM must first be generated to approximate the random input parameters by solving the optimization problem in Eq. ( 9).The optimization was performed for the three cases (m = 5, 10, 20).Since the random model inputs are described by the collection of samples in this example, {x (k) } N k=1 , the sample-based statistics in Equations ( 13)-( 15) were used in the objective function error terms (Equations ( 10)-( 12)).Equal weight was assigned to each component of the objective function in Eq. ( 9) for simplicity (e.g., α 1 = α 2 = α 3 = 1.0).In each case, the optimization problem took under 10 seconds to solve using a 2.8 GHz Intel Core i7 processor.The resulting optimal SROMs obtained for each model size are compared to the target random inputs in Figure 4, showing the CDFs for (a) y 0 , (b) logC, and (c) n.It can be seen that the accuracy of the SROM CDF estimate improves with increasing model size.In particular, despite the simple piecewise constant approximation, the three input parameter distributions were well represented by the SROM with size m = 20.
With SROMs constructed for the inputs with each model size, the output to the crack growth simulation, Y = [EOL], was approximated using a SROM surrogate model as described in Section 2.1.2.The simulation was executed for each sample defining the input SROMs according to Eq. ( 16) to produce a collection of corresponding EOL samples, {ỹ (k) } m k=1 .Note that this step requires only 5, 10, and 20 crack growth model evaluations for each case (as compared to evaluating the model 5,000 times for every sample to produce the MCS solution).These EOL samples were then used to construct the piecewise constant SROM surrogate model, ỸC (X) (Eq.( 17)), to approximate the EOL distribution.A comparison of the SROM CDF approximations using ỸC (X) and the reference MCS solution is shown in Figure 5(a) for m = 5, 10, and 20.It can be seen that with just a small fraction of the crack growth simulations relative to MCS, the SROM approach can provide a reasonably accurate estimate of the EOL distribution that improves with increasing SROM model size.
The piecewise linear SROM surrogate, ỸL (X) (Eq.( 20)), was then constructed to illustrate the improvement in accuracy it provides.Here, additional crack growth simulations were performed to estimate the required gradients, ∇ỹ (k) , using the finite difference method, i.e., for the gradient with respect to the i th input.Here, ∆ i represents a small perturbation to the i th input parameter.
With the gradients and EOL samples calculated, the surrogate model, ỸL (X), was used to generate EOL samples from the entire collection of the given input samples, {x (k) } 5000 k=1 .A comparison of the resulting SROM CDFs and the MCS reference solution are provided in Figure 5(b) for each model size.It can be seen that the piecewise linear SROM approximation provides a substantial increase in accuracy, with all three cases providing nearly identical EOL predictions compared to the MCS solution.Note that for the m = 5 case, only 20 crack growth simulations were required in total compared with 5, 000 used to generate the MCS CDF, but very little discrepancy is observed between the two solutions.
Table 1 shows the approximate computational speedup relative to the MCS solution achieved by the different SROM approximations.Recall that the values of S ỸC and S ỸL assume that the time to construct the input SROM (< 10 seconds) is negligible compared to the time to run a crack growth simulation (∼ 3 hours), which is valid for this example.The potential for orders of magnitude computational speedup is observed by generating probabilistic EOL predictions with only a fraction of the simulations used by MCS.In particular, using the piecewise linear model ỸL with m = 5 provides a 250X computational speedup while producing a highly accurate approximation to the MCS estimate, as shown in Figure 5

(b).
There are two important points to make regarding the computational speedup results above.First, no rigorous convergence study was performed on the MCS predictions in this study, so it is possible that a satisfactory reference solution could require fewer or more model evaluations.Therefore, the values reported in Table 1 should be interpreted as potential computational speedup with the SROM approach, with further study needed to provide a more explicit assessment for this application.Second, while the results reported here were performed in serial (on one computer processor), multiple processors can be easily used for both MCS and the SROM approach since all model evaluations are independent of one another.The use of parallel computing in this manner would then decrease the computation times by a factor equal to the number of available processors.

SROMPy Demo
The purpose of this section is to demonstrate the relative ease of applying the SROM approach to probabilistic prognostics using SROMPy.The three steps for propagating uncertainty outlined in Section 2.1.3will be followed to generate a SROM EOL approximation, showing the Python source code to carry out each step with SROMPy7 .Here, it is assumed that two data files are provided: (1) input samples MC.txt, containing the 5,000 independent samples of the three input parameters, [y 0 , C, n], and (2) eol samples MC.txt, con- Table 1.Approximate computational speedups, S ỸC (Eq.( 23)) and S ỸL (Eq.( 24)), provided by the piecewise constant and piecewise linear SROM EOL approximations, respectively, for different model sizes.taining the 5,000 corresponding EOL samples calculated by running the crack growth simulation for each input sample.The latter will be used to generate the MCS reference solution for comparison.Furthermore, the implementation of the crack growth model is assumed to be encapsulated in a Python object called model 8 .The example will be solved for the specific case of using a piecewise constant SROM approximation (Eq.( 17)) to the EOL of the tensile specimen for a fixed SROM size, m = 20.A basic understanding of Python syntax is assumed.The full source code can be seen in the appendix of this paper.

Step 1: Construct input SROM
The first step in the probabilistic prognostics analysis is to define the target random vector for the model inputs, X, and then generate a SROM approximation, X, for it.The SROMPy implementation begins by importing the necessary Python modules for the analysis in its entirety, which will be elaborated on throughout the section: import numpy from postprocess import Postprocessor from srom import SROM, SROMSurrogate from target import SampleRV The random input vector, X, is then created from the data file that contains the input samples, input samples MC.txt, as follows: #Define target random vector from samples samplesfile = "input_samples_MC.txt"MCsamples = numpy.genfromtxt(samplesfile)target = SampleRV(MCsamples) Here, the open-source Python module numpy (van der Walt, Colbert, & Varoquaux, 2011) is used to load the sample data into the array MCsamples.This array is then used to initialize target, representing X, using the SROMPy class SampleRV.
With the target random input vector defined, SROMPy can be used to easily solve the optimization problem in Eq. ( 9) to form the SROM X: #Define SROM and determine optimal parameters srom_size = 20 input_srom = SROM(size=srom_size, dim=3) input_srom.optimize(target) The SROM, X, with a size m = 20 is represented by input srom, which is optimized to match the target random vector.It can be seen that the complexities of solving Eq. ( 9) are encapsulated in the simple function, optimize, 8 Since the crack growth model depends on a commercial code, it cannot be included with the source code for this study.It is shown in the demo here to illustrate a typical SROM workflow.However, the input and output data from the model are provided online so that the uncertainty propagation results can be reproduced.
provided by the SROM class.To verify the SROM approximation of the input variables, the CDFs of X and X are then compared with the following code: #Compare the CDFs (produces Figure 3) pp = Postprocessor(input_srom, target) pp.compare_CDFs(variablenames= [r'log$C$', r'$y_{0}$', r'$n$']) The resulting comparison plots can be seen in Figure 6.

3.3.2.
Step 2: Execute model for each SROM sample With a SROM generated for the random model inputs, the next step in the probabilistic prognostics analysis with SROMPy is to execute the crack growth model for each SROM sample (Eq.( 16)).This is performed with Python as follows: This code produces the collection of model output (EOL) samples, {ỹ (k) } m k=1 , represented by the variable srom eols.Here, the function get params() returns the defining SROM samples and probabilities (Eq.( 5)) in the variables srom samples and srom probs, respectively.The evaluate function of model runs a crack growth simulation for the given inputs in the sample variable and returns the corresponding EOL.

Step 3: Generate SROM output approximation
Now SROMPy can be used to straightforwardly produce a piecewise constant SROM approximation (Eq.( 17)) to the EOL.This is done by using the SROM constructed in Step 1 (input srom) and the output samples of EOL generated in Step 2 (srom eols) as inputs to the SROMSurrogate class: #Generate SROM surrogate for the EOL eol_srom = SROMSurrogate(input_srom, srom_eols) Here, the variable eol srom now represents ỸC (X) in Eq. ( 17) whose statistics can be used to approximate those of the MCS reference solution.
To generate the reference solution, the EOL sample data in the file eol samples MC.txt is loaded and used to initialize the SampleRV class: The CDFs of the MCS solution, eol mc, and the SROM approximation, eol srom, can then be compared using the Postprocessor as follows: #Compare final EOL solutions SROM vs MC: # (produces Figure 7) pp = Postprocessor(eol_srom, eol_mc) pp.compare_CDFs(variablenames=["EOL"]) This code produces the comparison plot in Figure 7.
This example demonstrates that SROMPy can be used to provide accurate uncertainty propagation for prognostics with relatively few lines of code.Of the source code shown above, nearly half was devoted to generating the reference MCS solution and producing the comparison plots.The main responsibility of the user is in Step 2, generating outputs of their computational model for the SROM input samples produced by SROMPy.Note that while there are many more capabilities and advanced options in SROMPy for fine-tuning analyses that were not covered here in this simple case, the source code shown above can be easily generalized and extended to other prognostics problems.

SUMMARY
This study presented a practical uncertainty propagation method that enables efficient high-fidelity prognostics using stochastic reduced order models (SROMs).The open-source Python package, SROMPy, was also introduced in this work as a user-friendly option for adopting the SROM approach.
The method was demonstrated on an example of probabilistic, non-planar crack growth simulation in an aluminum tensile specimen.The SROM approach produced end of life predictions that were highly accurate with respect to a Monte Carlo simulation (MCS) solution, while showing the potential to provide orders of magnitude computational speedup.Furthermore, the source code to generate a SROM solution for the example using SROMPy was included and discussed, illustrating the ease of applying the method for an arbitrary high-fidelity model.The complete source code and input data required to reproduce the results in this paper are available online to facilitate further evaluation and adoption of the SROM method in the field of prognostics and health management (PHM).
While demonstrated here in the context of prognostics for non-planar crack growth, the SROM approach has potential utility in a range of PHM applications as a general alternative to MCS for uncertainty propagation.By significantly reducing the number of required model evaluations relative to MCS, the SROM approach can allow expensive high-fidelity simulations to be used for probabilistic prognostics instead of less accurate (but faster) surrogate models.Alternatively, SROMs can be potentially combined with a surrogate model to enable real-time prognostics, an avenue of future research.

Figure 1 .
Figure 1.Comparison of a SROM and target (Normal) random variable CDF for m = 10.

Figure 2 .
Figure 2. Diagram of the two-hole specimen.

Figure 4 .Figure 5 .
Figure 4.A comparison of the SROM and target CDFs for the input variables: (a) y 0 , (b) logC, (c) n for different SROM sizes.