1 Introduction

During interplanetary missions, launcher stages and inactive spacecraft are often left along orbits that may come back to the Earth or reach other celestial bodies, with the risk of impacting and contaminating them. For this reason, planetary protection policies require to verify that the probability of contaminating a celestial body due to non-scheduled impacts from mission-related objects is below a given threshold for any interplanetary mission. The maximum acceptable impact probability and the confidence level associated with it depend on the class of mission under examination [1], spanning from 10−3 up to 50–100 years after launch for a generic Mars mission, to 10−6 for sample return missions or missions to the Jovian moons, with a minimum confidence level of 99%. The precise propagation of the orbital state of these objects is therefore of great importance to preserve planets and moons that are promising for the development of extraterrestrial microbial life, such as Mars or Europa among many.

Given the chaotic behaviour of the orbital propagation problem, fully non-linear techniques, such as Monte Carlo (MC) simulations, are preferred to tackle this kind of problem thanks to their general and flexible way of approaching collision and impact probability estimation. This is the most common approach for planetary protection analysis, which requires high accuracy to verify that the design of an interplanetary mission is compliant to the international guidelines [2,3,4,5]. In particular, Colombo et al. [2] and Jehn et al. [3] exploit the expression of the confidence interval by Wilson [6] to estimate in advance the number of MC runs necessary to grant a desired confidence level (as requested by planetary protection policy).

However, more efficient sampling methods may increase the precision of the probability estimate, or reduce the amount of simulations, and thus the computational cost. Since the probability levels to be verified are generally low, the analysis can require a large number of standard MC simulations, resulting in high computational cost and time: the number of simulations required to estimate the probability, indeed, increases as the expected probability decreases and the confidence level to be guaranteed increases. This becomes relevant especially in the case of planetary protection requirements, as low levels of impact probability for each class of mission must be guaranteed with strict confidence levels.

For this reason, the line sampling (LS) method was selected to increase the precision of the probability estimate, or reduce the amount of simulations, and thus the computational cost with respect to standard MC. LS is a MC-based approach for the estimation of small probabilities whose main feature is the reduction of the multi-dimensional integration problem across the uncertainty domain to many one-dimensional integrals which are evaluated analytically. These integrals are defined along lines, all parallel to a reference direction, that are used to sample the initial distribution. The reference direction is determined so that it points toward a region of interest of the domain (that is, a subset of initial conditions that will lead to an event under study, such as a failure or an impact with a celestial body): if this is properly chosen, the method can considerably increase the accuracy of the solution or reduce the number of required system simulations with respect to a standard MC.

LS was originally developed for the reliability analysis of failure in complex structural systems [7, 8], and later applied to risk estimation for orbital conjunction analysis in combination with differential algebra (DA) [9]. In previous works, the authors adapted and applied LS to the estimation of impact probability of small objects with major celestial bodies, mainly for the verification of planetary protection requirements for exploration missions, but including also Near Earth Asteroids [10, 11]. In this work, this application of the LS method was further developed to improve its effectiveness in the cases under study.

This manuscript presents, in the first part, the LS algorithm and the theory behind it, studying the formulation that is given in the literature. This theoretical formulation was expanded further in order to better characterise the behaviour of the method according to the cases under analysis. Later, a series of algorithms based on LS are introduced with the aim of creating a numerical procedure capable of analysing complex cases:

  • an algorithm used to improve a first guess for the reference sampling direction to get it closer to an ideal case, thus increasing the accuracy of the analysis;

  • an algorithm to identify time windows where impact regions could be found by analysing the close approaches that are recorded during a preliminary sampling;

  • an iterative procedure to explore all possible impact regions and sample them if possible, with the goal of obtaining a wider overview of the distribution of impact regions within the initial uncertainty distribution, and estimating impact probability with higher accuracy and efficiency.

Two test cases regarding planetary protection analysis of interplanetary missions are provided with their results, as examples to demonstrate the performance of the presented techniques singularly or in the context of the overall procedure: the launcher upper stage of the Solar Orbiter mission, and orbiter of the Mars Sample Return mission.

The manuscript is organised as follows: Sects. 2 and 3 will describe the LS algorithm and the theory behind it, introducing new developments along with it; Sect. 4 will present the additional techniques that were devised to improve the original LS method and apply it to a multi-event analysis; Sect. 5 will show the results of the application of the presented methods to different test cases, comparing them with the performance of standard MC simulations; finally, Sect. 6 will summarise the main results and present some of the objectives for continuing this work in the future.

2 Line Sampling

The LS method is a MC-based approach with the objective of estimating small probabilities (probabilities of failure that are generally in the range of \(10^{-7}\) to \(10^{-6}\) [7, 8]). It consists of four steps: (1) the mapping of random samples from the physical coordinate space into a normalised standard space; (2) the determination of the reference direction \(\varvec{\alpha }\); (3) the probing of the region of interest along the lines following the reference direction; (4) the estimation of the event probability.

In this work, the event of interest is an impact between the object being propagated (more specifically, a spacecraft or a launcher stage) and a celestial body. The impact event is defined as the condition when the distance between the spacecraft and any celestial body is below the critical radius of said body at any time during the propagation. Thus, the impact region in the initial uncertainty domain is defined as the subset of initial conditions that will lead to an impact within the selected propagation window.

A summary of each step of LS is provided hereafter, along with an introduction to the choices made for the numerical implementation of the LS technique.

2.1 Mapping onto the Standard Normal Space

The first step of the LS procedure is the definition of this transformation: all the random vectors \(\varvec{x} \in {\mathbb {R}}^d\) of physical coordinates (position and velocity) that are drawn from the nominal uncertainty distribution in the following phases need to be mapped onto a normalised coordinate space.

Each \({\mathbf {x}}\) vector is mapped to a new parameter vector \(\varvec{\theta } \in {\mathbb {R}}^d\) whose components \(\theta _j, \; j=1,\ldots ,d\) are all associated with a unit Gaussian distribution, each with a probability density function (pdf) \(\phi _j\) defined as:

$$\begin{aligned} \phi _j(\theta _j) = \frac{1}{\sqrt{2\pi }} \exp \left( -\frac{\theta _j^2}{2}\right) ,\quad j=1,\ldots ,d \end{aligned}$$
(1)

The components of the vector \(\varvec{\theta }\) have the property of being independent and identically distributed (iid) random variables, meaning that each has the same probability distribution as the others and all are mutually independent [8]. As a consequence, the joint pdf \(\phi\) of these random parameters is equal to the product of all the single pdfs:

$$\begin{aligned} \phi (\varvec{\theta }) = \prod _{j=1}^d \phi _j(\theta _j) \end{aligned}$$
(2)

Thanks to this property, this transformation grants efficiency to the method, especially for problems with high dimensionality: it reduces the problem to a series of one-dimensional analytical evaluations, thus enabling a simplification of the computation of the probability later in the procedure.

The direct and the inverse transformations, from the physical domain to the normalised one and vice versa, preserve the joint Cumulative Distribution Function (CDF) between the two coordinate spaces, and are defined as:

$$\begin{aligned}&\Phi (\varvec{\theta }) = F({\mathbf {x}}) \end{aligned}$$
(3)
$$\begin{aligned}&\varvec{\theta } = \Phi ^{-1}[F({\mathbf {x}})] \end{aligned}$$
(4)
$$\begin{aligned}&{\mathbf {x}} = F^{-1}[\Phi (\varvec{\theta })] \end{aligned}$$
(5)

with \(\Phi\) and F being the CDF of the unit Gaussian distribution and the input uncertainty distribution of the problem, respectively.

Following the definition of the pdf \(\phi\), the joint CDF \(\Phi\) is

$$\begin{aligned} \begin{aligned}&\Phi (\varvec{\theta }) = \int \limits _{-\infty }^{\varvec{\theta }}{\phi (\varvec{u})\text {d}{\varvec{u}}} = \prod _{j=1}^d \Phi _j(\theta _j) \\&\text {with} \; \Phi _j(\theta _j) = \frac{1}{2} \left[ 1 + \text {erf} \left( \frac{\theta _j}{\sqrt{2}} \right) \right] , \; j=1,\ldots ,d \end{aligned} \end{aligned}$$
(6)

where \(\text {erf}(x)=\frac{2}{\sqrt{\pi }}\int _{0}^{x}{\exp {(-u^2)}\text {d}u}\) is the error function.

State and manoeuvre uncertainty is usually represented in Gaussian form in planetary protection analysis. For this reason, the Rosenblatt transformation [12], which is defined specifically for multivariate Normal distributions, is applied in this work: for Gaussian-distributed uncertainty parameters (as in the cases under study), both the direct and the inverse transformations (respectively Eqs. (4) and (5)) become linear [8, 12]. The transformation is reported in Appendix A.

2.2 Determination of the Reference Direction

The reference direction \(\varvec{\alpha }\) can be determined in different ways [8]. In this work, it is determined as the direction of a normalised “centre of mass” of the impact region. This region is approximated by applying the Metropolis–Hastings algorithm [13, 14] to generate a Monte Carlo Markov Chain (MCMC) lying entirely in the impact subdomain starting from an initial condition within it. MCMC simulation is a method for generating samples conditional on a region satisfying a given condition, according to any given probability distribution described by the pdf \(p({\mathbf {x}})\). The algorithm to generate a sequence of \(N_S\) samples from a given sample \({\mathbf {x}}_u\) drawn from the distribution \(p({\mathbf {x}})\) is briefly explained in [15]:

  1. 1.

    generate the sample \(\varvec{\xi }\) by randomly sampling a user-defined “proposal” pdf \(p^*({\mathbf {x}}_u)\);

  2. 2.

    compute the ratio \(r=p(\varvec{\xi })/p({\mathbf {x}}_u)\);

  3. 3.

    set \(\tilde{{\mathbf {x}}}=\varvec{\xi }\) with probability \(\text {min}(1,r)\) and \(\tilde{{\mathbf {x}}}={\mathbf {x}}_u\) with the probability \(1-\text {min}(1,r)\), where \(\tilde{{\mathbf {x}}}\) is the candidate for the next element of the chain;

  4. 4.

    check whether the candidate \(\tilde{{\mathbf {x}}}\) lies in the region of interest I or not: if \(\tilde{{\mathbf {x}}} \in I\), accept it as the next sample \({\mathbf {x}}_{u+1}=\tilde{{\mathbf {x}}}\); else, reject it and take the current sample as the next sample \({\mathbf {x}}_{u+1}={\mathbf {x}}_u\).

The starting condition of the MCMC can also be found in different ways (e.g. numerical minimisation of the distance to the planet, or prior knowledge). In this work, the initial point is determined via a preliminary sampling, as will be described in Sect. 4. It is important to notice that the specific method used to determine the sampling direction is not a core phase of the LS method, thus representing one of the degrees of freedom in the implementation of the whole procedure.

After the impact region has been populated with \(N_S\) samples, the reference direction \(\varvec{\alpha }\) is computed in the standard normal space as

$$\begin{aligned} \varvec{\alpha } = \frac{\sum _{u=0}^{N_S} \varvec{\theta }^u /N_S}{\left\| \sum _{u=0}^{N_S} \varvec{\theta }^u /N_S \right\| } \end{aligned}$$
(7)

where \(\varvec{\theta }^u, \; u=1,\ldots ,N_S\) are the points of the Markov chain made of \(N_S\) samples converted from the physical space into the standard normal space. The simulations performed for the Markov chain require additional computational effort with respect to standard MC methods. Nevertheless, this option provides a good coverage of the impact region and a resulting better accuracy of the final probability estimate.

2.3 Line Sampling

After determining the reference sampling direction, \(N_T\) initial conditions \(\varvec{x}^k, \; k=1,\ldots ,N_T\) are randomly drawn from the nominal uncertainty distribution and then mapped to standard normal coordinates as \(\varvec{\theta }^k\) using the transformation in Eq. (4). For each sample in the standard normal space, a line starting from \(\varvec{\theta }^k, \; k=1,\ldots ,N_T\) and parallel to \(\varvec{\alpha }\) is defined according to the parameter \(c^k\), such that

$$\begin{aligned}&\varvec{\theta }^k = c^k \varvec{\alpha } + \varvec{\theta }^k_\perp \end{aligned}$$
(8)
$$\begin{aligned}&\varvec{\theta }^k_\perp = \varvec{\theta }^k - \langle \varvec{\alpha },\varvec{\theta }^k \rangle \varvec{\alpha } \end{aligned}$$
(9)

where \(\langle \varvec{\alpha },\varvec{\theta }^k \rangle\) is the scalar product between \(\varvec{\alpha }\) and \(\varvec{\theta }^k\). In this way, the problem is reduced to a series of one-dimensional evaluations associated with each sample, with \(c^k\) also normally distributed in the standard space.

The standard domain is then explored along each line with the aim of identifying the impact region of an uncertainty set. For the problem under study, the occurrence of the events is expressed by the value of the non-dimensional performance function

$$\begin{aligned} g_{\theta } \left( \varvec{\theta }(c)\right) = Y(c)/R_{\text{imp}} - 1 \end{aligned}$$
(10)

where Y is a function that maps the value of the parameter c (corresponding to an initial condition \({\mathbf {x}}_0\)) to a performance index, and \(R_{\text{imp}}\) is the selected critical distance. In this work, Y is the minimum distance from the celestial body of interest (e.g. the Earth) in the given time window, while \(R_{\text{imp}}\) represents the radius around the planet that is selected to define an impact (not necessarily equal to the planet radius). According to this definition, it follows that

$$\begin{aligned} g_{\theta }(\varvec{\theta }(c)) {\left\{ \begin{array}{ll} < 0 \rightarrow \text {Impact} \\ = 0 \rightarrow \text {Limit condition} \\ > 0 \rightarrow \text {No impact} \\ \end{array}\right. } \end{aligned}$$
(11)

The limit condition \(g_{\theta } \left( \varvec{\theta }(c) \right)=0\) is given by a trajectory reaching a minimum distance from the planet equal to the impact radius \(R_{\text{imp}}\).

The performance function is evaluated iteratively along each line \(\varvec{\theta }^k = c^k \varvec{\alpha } + \varvec{\theta }^k_\perp\) to identify the values of \(c^k\) corresponding to its intersections with the impact region, as displayed in Fig. 1. Due to the nature of the problem under analysis (that is, a single close approach event within a given time interval), the hypothesis is made that a maximum of two intersections between each line and the impact region are found, meaning that two values of \(c^k\) exist for each standard normal random sample \(\varvec{\theta }^k, \; k=1,\ldots ,N_T\) where the performance function is equal to zero: \(g_{\theta }({\overline{c}}^k_1)=0\) and \(g_{\theta }({\overline{c}}^k_2)=0\). These two values represent states leading to the limit condition, while the values of \(c^k\) in between represent states leading to impacts: \(g_{\theta }({\overline{c}}^k)<0, \forall \; {\overline{c}}^k_1< c^k < {\overline{c}}^k_2\). The main hypothesis is valid when the impact region extends across the uncertainty domain and can be approximated as a flat or slightly curved surface. On the contrary, if the impact region is limited in size, the line being sampled may not intersect the impact region and no root \(c^k\) is found. Finally, if the impact region has a twisted shape or disconnected shape due to many close approaches, more than two intersections (or none) with each line may be found.

Fig. 1
figure 1

Scheme of the iterative sampling procedure used to sample each line in the standard normal coordinate space. The impact region is labelled with F, with a single border highlighted as a red line (Color figure online)

2.4 Estimation of the Impact Probability

Once the values \(({\overline{c}}^k_1,{\overline{c}}^k_2), \; k=1,\ldots ,N_T\) are known for all the sampling lines, the unit Gaussian CDF provides each random initial condition \(\varvec{\theta }^k, \; k=1,\ldots ,N_T\) with the conditional impact probability \({\hat{P}}^k(I)\). Thanks to the properties of the normalised coordinate space, each \({\hat{P}}^k(I)\) can be computed as a one-dimensional integrals along the corresponding line:

$$\begin{aligned} {\hat{P}}^k(I)&= {\hat{P}}\left[ {\overline{c}}^k_1< N(0,1) < {\overline{c}}^k_2\right] \nonumber \\&= \int \limits _{{\overline{c}}^k_1}^{{\overline{c}}^k_2}{\phi (u)\text {d}u} = \Phi \left( {\overline{c}}^k_2\right) - \Phi \left( {\overline{c}}^k_1\right) ,\quad k=1,\ldots ,N_T \end{aligned}$$
(12)

If no intersections between a sampling line and the impact region were found, the value of the probability integral is equal to 0, and the associated conditional impact probability has a null contribution to the total probability.

The total probability of the event \({\hat{P}}(I)\) (which is identified with a planetary collision in the approach presented in this work) and the associated variance \({\hat{\sigma }}^2 \left({\hat{P}}(I)\right)\) are then approximated as follows:

$$\begin{aligned}&{\hat{P}}(I) = \frac{1}{N_T} \sum _{j=1}^{N_T}{{\hat{P}}^k(I)} \end{aligned}$$
(13)
$$\begin{aligned}&{\hat{\sigma }}^2 \left({\hat{P}}(I)\right) = \frac{1}{N_T (N_T-1)} \sum _{j=1}^{N_T}{\left( {\hat{P}}^k(I) - {\hat{P}}(I) \right)^2} \end{aligned}$$
(14)

The total probability is estimated as the average of the conditional probabilities computed along each line (including those not intersecting the impact region as having a null partial probability). The variance is computed as the variance of all the conditional probabilities.

The number \(N_T\) of sampling lines should be chosen to guarantee a desired level of accuracy, according to the equations given above. Possible criteria to guide this choice are discussed in Sect. 4.2.

3 Theoretical Basis

The LS method was introduced in previous works [11, 16], where a general explanation of the theory behind it was presented, together with the results of its application to different test cases, to show how the choice of this sampling method can improve the efficiency of the MC simulations for planetary protection analysis.

In this work, the method is further analysed to understand how the shape of the impact region and the choice of the sampling direction influence the effectiveness of LS with respect to standard MC. In the case of the LS, the literature already gives a qualitative estimation of its efficiency compared with the standard MC in terms of convergence rate [17]. A summary of it is reported in Sect. 3.1 to introduce the notation that will be used in Sect. 3.2.

3.1 Theoretical Formulation of the LS Method

The aim of this section is to give an introduction of the theoretical formulation of the LS method. In particular, it provides the analytical demonstration that LS has higher accuracy than standard MC. This treatise follows the explanation and the notation presented by Zio in [17], but is necessary in order to introduce the work presented in the next section.

In Sect. 3.2, the theory presented here will be expanded, in order to characterise further the performance of LS with respect to standard MC. In particular, an approximated formula will be developed, showing how the accuracy of LS is related to the choice of the reference sampling direction and to the shape of the impact region being sampled.

Let \({\mathbf {X}} \in {\mathbb {R}}^d\) be a random variable whose distribution is described by the multidimensional probability density function (pdf) \(q_X({\mathbf {x}})\), and let F be the subdomain of the variables \({\mathbf {x}}\) leading to an event of interest (which can be seen as the failure of a system or, in this case, an impact with a celestial body). A performance function \(g_X({\mathbf {x}})\) is defined such that \(g_X(\mathbf {x)} \le 0\) if \({\mathbf {x}} \in F\) and \(g_X({\mathbf {x}}) > 0\) otherwise. Similarly, an indicator function \(I_F({\mathbf {x}})\) is defined such that \(I_F({\mathbf {x}})=1\) if \({\mathbf {x}} \in F\) and \(I_F({\mathbf {x}})=0\) otherwise.

The probability of the event F can be expressed as a multidimensional integral in the form

$$\begin{aligned} P(F) = P({\mathbf {x}} \in F) = \int \limits _F {I_F({\mathbf {x}}) \; q_X({\mathbf {x}}) \; \text {d}{\mathbf {x}}} = E \left[I_F({\mathbf {x}})\right] \end{aligned}$$
(15)

where \({\mathbf {x}} = (x_1,\ldots ,x_d)^T \in {\mathbb {R}}^d\) is the vector of the uncertain variables of the system, and \(E[\cdot ]\) is defined as the expected value operator. Equation (15) shows that \(I_F({\mathbf {x}})\) is also a random variable [17] and that P(F) can be interpreted as the expected value of \(I_F({\mathbf {x}})\).

The variance \(\sigma ^2\) of \(I_F({\mathbf {x}})\) is then defined as

$$\begin{aligned} \begin{aligned} \sigma ^2 \left[I_F({\mathbf {x}})\right]&= \int \limits _F {\left[I_F({\mathbf {x}})-P(F)\right]^2 \; q_X({\mathbf {x}}) \; \text {d}{\mathbf {x}}} \\&= E\left[I_F^2({\mathbf {x}})\right] - E\left[I_F({\mathbf {x}})\right]^2 \\&= E\left[I_F^2({\mathbf {x}})\right] - P(F)^2 \end{aligned} \end{aligned}$$
(16)

Since \(I_F^2({\mathbf {x}})=I_F({\mathbf {x}}) \; \forall {\mathbf {x}} \in {\mathbb {R}}^d\) due to \(I_F({\mathbf {x}})\) being defined as a binary function, it follows that

$$\begin{aligned} \begin{aligned} \sigma ^2 \left[I_F({\mathbf {x}})\right]&= E\left[I_F^2({\mathbf {x}})\right] - E\left[I_F({\mathbf {x}})\right]^2 \\&= E\left[I_F({\mathbf {x}})\right] - E\left[I_F({\mathbf {x}})\right]^2 \\&= P(F)-P(F)^2 = P(F)\left( 1-P(F)\right) \end{aligned} \end{aligned}$$
(17)

For the standard MC, an estimator \({\hat{P}}(F)\) of the probability P(F) as expressed in Eq. (15) is obtained by dividing the number of times that \(I_F({\mathbf {x}}_k)=1, \; k=1,\ldots ,N\) by the total number of samples drawn N:

$$\begin{aligned} {\hat{P}}(F) = \frac{1}{N} \sum _{k=1}^{N}{I_F({\mathbf {x}}_k)} \end{aligned}$$
(18)

If standard MC is interpreted as a Point Sampling method, in comparison with the LS, \(I_F({\mathbf {x}})\) becomes the random variable that is sampled in order to estimate the probability of event F.

In the application of LS, a coordinate transformation from the physical space to the standard normal space \(T_{X \theta } : {\mathbf {x}} \rightarrow \varvec{\theta }\) brings as advantages the normalisation of the physical variables through the covariance matrix, and the possibility to express the multidimensional pdf as a product of d unit Gaussian standard distributions \(\phi _j(\theta _j)\):

$$\begin{aligned} \Phi (\mathbf {\varvec{\theta} }) = \prod _{j=1}^d \phi _j(\theta _j) \end{aligned}$$
(19)

With reference to Fig. 1, in the d-dimensional standard normal space, the subdomain F is the subspace for which the samples \(\varvec{\theta } = (\theta _1,\ldots ,\theta _d)^T \in {\mathbb {R}}^{d-1}\) satisfy a given property (e.g. an impact with a planet or a system failure). With the assumption that \(\theta _1\) points in the direction of the sampling vector \(\varvec{\alpha }\) (this can always be assured by a suitable rotation of the coordinate axes), the subdomain F can be also expressed as

$$\begin{aligned} F = \{\varvec{\theta } \in {\mathbb {R}}^d : \theta _1 \in F_1(\theta _1,\ldots ,\theta _d)\} \end{aligned}$$
(20)

with \(F_1 \in {\mathbb {R}}^{d-1}\), in this way the region F corresponds to the values of \(\varvec{\theta }\) such that the performance function \(g_{\theta }(\varvec{\theta })\) satisfies the relation \(g_{\theta }(\varvec{\theta }) = g_{\theta ,-1}(\varvec{\theta }_{-1})-\theta _1 \ge 0\), where \(\varvec{\theta }_{-1} = (\theta _2,\ldots ,\theta _d)^T \in {\mathbb {R}}^{d-1}\).

Considering this change of variables and the definition in Eq. (20), the integral in Eq. (15) can be rewritten as

$$\begin{aligned} P(F) = \int \limits _d {I_F(\varvec{\theta }) \; \prod _{j=1}^{d}{\phi _j(\theta _j)} \; \text {d}\varvec{\theta }} = E\left[I_F(\varvec{\theta })\right] \end{aligned}$$
(21)

and manipulated as follows:

$$\begin{aligned} \begin{aligned} P(F)&= \int \limits _d {I_F(\varvec{\theta }) \; \prod _{j=1}^{d}{\phi _j(\theta _j)} \; \text {d}\varvec{\theta }} \\&= \int \limits _{d-1} ... \int {\left( \int {I_F(\varvec{\theta }_{-1}) \; \phi _1(\theta _1) \; \text {d}\theta _1} \right) \; \prod _{j=2}^{d}{\phi _j(\theta _j)} \; \text {d}\varvec{\theta }_{-1} } \\&= \int \limits _{d-1} ... \int {\Phi \left(F_1(\varvec{\theta }_{-1})\right) \; \prod _{j=2}^{d}{\phi _j(\theta _j)} \; \text {d}\varvec{\theta }_{-1} } \\&= E_{\varvec{\theta }_{-1}}\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \end{aligned} \end{aligned}$$
(22)

where \(\Phi (A) = \int {I_A({\mathbf {x}})\phi ({\mathbf {x}})\text {d}{\mathbf {x}}}\) is the definition of the Gaussian measure of A, where A is the subset of the random variables \({\mathbf {x}}\) which lead to a given result (e.g. an impact).

In case of the standard MC, \(\Phi \left(F_1(\varvec{\theta }_{-1})\right)\) is a discrete random variable equal to \(I_F(\varvec{\theta })\); as a consequence:

$$\begin{aligned} \Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)=\Phi \left(F_1(\varvec{\theta }_{-1})\right) \; \forall \varvec{\theta }_{-1} \in {\mathbb {R}}^{d-1} \end{aligned}$$

On the contrary, for the LS method \(\Phi \left(F_1(\varvec{\theta }_{-1})\right)\) is a continuous random variable where \(F_1(\varvec{\theta }^k_{-1}) = -{\overline{c}}^k\). This is clear from Fig. 1, where the sampling procedure is represented highlighting the boundary of the region corresponding to the event F. As a consequence:

$$\begin{aligned} 0 \le \Phi ^2\left(F_1(\varvec{\theta }_{-1})\right) \le \Phi \left(F_1(\varvec{\theta }_{-1})\right) \le 1 \; \forall \varvec{\theta }_{-1} \in {\mathbb {R}}^{d-1} \end{aligned}$$

The consequence of these properties is visible when considering the definition of variance of an estimator for the two methods. An estimator \({\hat{P}}(F)\) of the probability P(F) as expressed in Eq. (22) can be computed as

$$\begin{aligned} {\hat{P}}(F) = \frac{1}{N_T} \sum _{k=1}^{N_T} \Phi \left( F_1( \varvec{\theta }^k_{-1}) \right) \end{aligned}$$
(23)

where \(\varvec{\theta }^k = 1,\ldots ,N_T\) are iid samples in the standard normal coordinate space. Given the generic definition of variance for P(F) following Eq. (22) as

$$\begin{aligned} \begin{aligned}&\sigma ^2\left(P(F)\right) \\&\quad = \int {\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)-P(F)\right]^2 \; \phi (\varvec{\theta }_{-1}) \; \text {d}}\varvec{\theta }_{-1} \\&\quad = E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] - E_{\varvec{\theta }_{-1}}^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \\&\quad = E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] - P(F)^2 \end{aligned} \end{aligned}$$
(24)

the variance of the estimator \({\hat{P}}(F)\) is defined as

$$\begin{aligned} \sigma ^2\left({\hat{P}}(F)\right) = \sigma ^2\left(P(F)\right)/N_T = \sigma ^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right]/N_T \end{aligned}$$
(25)

meaning that the variance of the estimator directly depends on the variance of the random variable \(\Phi \left(F_1(\varvec{\theta }_{-1})\right)\):

$$\begin{aligned} \sigma ^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] = E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] - E_{\varvec{\theta }_{-1}}^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \end{aligned}$$
(26)

Consequently, since \(0 \le \Phi \left(F_1(\varvec{\theta }_{-1})\right) \le 1\) and \(0 \le \Phi ^2\left(F_1(\varvec{\theta }_{-1})\right) \le \Phi \left(F_1(\varvec{\theta }_{-1})\right)\) are always true \(\forall \varvec{\theta }_{-1} \in {\mathbb {R}}^{d-1}\), the previous relation can be extended as follows:

$$\begin{aligned} \begin{aligned}&\sigma ^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \\&\quad = E_{\varvec{\theta }_{-1}}\left[\Phi^2 \left(F_1(\varvec{\theta }_{-1})\right)\right] - E_{\varvec{\theta }_{-1}}^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \\&\quad \le E_{\varvec{\theta }_{-1}}\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] - E_{\varvec{\theta }_{-1}}^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \\&\quad = P(F)\left( 1-P(F)\right) = \sigma ^2\left[I_F(\varvec{\theta })\right] \end{aligned} \end{aligned}$$
(27)

Since \(P(F)\left( 1-P(F)\right)\) is the definition of the variance of the standard MC as given in Eq. (17), one can conclude from Eq. (27) that the variance obtained by the LS method is always smaller than the one given by standard MC, or at least equal to it.

A coefficient of variation (c.o.v.) \(\delta = \sqrt{\sigma ^2\left({\hat{P}}(F)\right)}/P(F)\) can be defined as a measure of the efficiency of the sampling method, with lower values of \(\delta\) meaning a higher efficiency of the method in converging to the exact value of the probability. Equation (27) demonstrates that the c.o.v. of estimator in Eq. (25) as given by the LS method is always smaller than the one given by the standard MC, implying that the convergence rate of the LS is always faster than, or as fast as, that of the standard MC.

3.2 New Developments

As introduced in the previous section, here the theory behind the LS method is taken further, to obtain more insight about it and about which parameters affect the the accuracy the method provides. The analytical formulas showing that the accuracy of the LS is always equal or higher to the accuracy given by standard MC were manipulated as part of the research work on LS. From this work, a formula based on approximations was obtained, showing how the accuracy of LS depends from important parameters such as the shape of the impact region and the determination of the sampling direction. This formula will be demonstrated and discussed.

The analytical development presented here follows the notation used in the previous section and taken from [17].

While in the case of the standard MC Eq. (27) is easy to treat, since \(E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] = E_{\varvec{\theta }_{-1}}\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right]\), in the LS case \(E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right]\) is a continuous variable, defined through the integral

$$\begin{aligned} E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] = \int _{d-1} ... \int {\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right) \; \prod _{j=2}^{d}{\phi _j(\theta _j)} \; \text {d}\varvec{\theta }_{-1} } \end{aligned}$$
(28)

which cannot be easily manipulated analytically due to the presence of \(\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\). For this reason, it is chosen to express this term with an approximation.

The definition of \(\Phi \left(F_1(\varvec{\theta }_{-1})\right)\) given in Eq. (22) can be further expanded as

$$\begin{aligned} \begin{aligned} \Phi \left(F_1(\varvec{\theta }_{-1})\right)&= \int \limits _{-\infty }^{+\infty } {I_F(\varvec{\theta }_{-1}) \; \phi _1(\theta _1) \; \text {d}\theta _1 } \\&= \int \limits _{{\overline{c}}(\varvec{\theta }_{-1})}^{+\infty } {\phi _1(\theta _1) \; \text {d}\theta _1 } = 1-\Phi \left({\overline{c}}(\varvec{\theta }_{-1})\right) = \Phi \left(-{\overline{c}}(\varvec{\theta }_{-1})\right) \end{aligned} \end{aligned}$$
(29)

with \({\overline{c}}(\varvec{\theta }_{-1})\) defined as the border of the region F displayed in Figs. 1 and 2 as a red line. \({\overline{c}}(\varvec{\theta }_{-1})\) is then expanded as \({\overline{c}}(\varvec{\theta }_{-1}) = {\hat{c}}+\delta c(\varvec{\theta }_{-1})\), with the first term defined as an “average” value of \({\overline{c}}(\varvec{\theta }_{-1})\) (represented as a dashed blue line in Fig. 2) such that \(P(F) = E_{\varvec{\theta }_{-1}}\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] = \Phi \left(F_1(\varvec{\theta }_{-1})\right) = \Phi ({\hat{c}})\), and the second term as a variation with respect to this average value.

Fig. 2
figure 2

Scheme representing the approximations used to express the variance of the LS method as a function of the probability estimate

The hypothesis is made that \(\delta c(\varvec{\theta }_{-1})\) represents a small variation with respect to the average value \({\hat{c}}\), as in the case of a quasi rectilinear border of the region F orthogonal to the sampling direction \(\varvec{\alpha }\). Under this hypothesis, the integral in Eq. (29) can be rewritten as

$$\begin{aligned} \begin{aligned} \Phi \left(F_1(\varvec{\theta }_{-1})\right) &= \int \limits _{{\overline{c}}(\varvec{\theta }_{-1})}^{+\infty } {\phi _1(\theta _1) \; \text {d}\theta _1 } = \int \limits _{{\hat{c}}+\delta c(\varvec{\theta }_{-1})}^{+\infty } {\phi _1(\theta _1) \; \text {d}\theta _1 } \\&= \int \limits _{{\hat{c}}}^{+\infty } {\phi _1(\theta _1) \; \text {d}\theta _1 } - \int \limits _{{\hat{c}}}^{{\hat{c}}+\delta c(\varvec{\theta }_{-1})} {\phi _1(\theta _1) \; \text {d}\theta _1 } \\&\approx \Phi ({\hat{c}}) - \phi ({\hat{c}}) \; \delta c(\varvec{\theta }_{-1}) \end{aligned} \end{aligned}$$
(30)

resulting in

$$\begin{aligned} \begin{aligned} E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right]&\approx E_{\varvec{\theta }_{-1}}\left[\left(\Phi ({\hat{c}}) - \phi ({\hat{c}}) \; \delta c(\varvec{\theta }_{-1})\right)^2\right] \\&= E_{\varvec{\theta }_{-1}}\left[\Phi ^2({\hat{c}}) - 2 \Phi ({\hat{c}}) \; \phi ({\hat{c}}) \; \delta c(\varvec{\theta }_{-1}) + \phi ^2({\hat{c}}) \; \delta c^2(\varvec{\theta }_{-1})\right] \\&= E_{\varvec{\theta }_{-1}}\left[\Phi ^2({\hat{c}})\right] - E_{\varvec{\theta }_{-1}}\left[2 \Phi ({\hat{c}}) \; \phi ({\hat{c}}) \; \delta c(\varvec{\theta }_{-1})\right] + E_{\varvec{\theta }_{-1}}\left[\phi ^2({\hat{c}}) \; \delta c^2(\varvec{\theta }_{-1})\right] \\&= P(F)^2 - P(F) \cdot 2 \phi ({\hat{c}}) \cdot E_{\varvec{\theta }_{-1}}\left[\delta c(\varvec{\theta }_{-1})\right] + \phi ^2({\hat{c}}) \cdot E_{\varvec{\theta }_{-1}}\left[\delta c^2(\varvec{\theta }_{-1})\right] \end{aligned} \end{aligned}$$
(31)

Taking Eq. (31) into account, and defining in a compact way \(\Delta c(\varvec{\theta }_{-1}) = E_{\varvec{\theta }_{-1}}\left[\delta c(\varvec{\theta }_{-1})\right]\), the variance given by the LS in Eqs. (24) and (22) becomes

$$\begin{aligned} \begin{aligned} \sigma ^2\left(P(F)\right)&= \sigma ^2\left[\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right] \\&= E_{\varvec{\theta }_{-1}}\left[\Phi ^2\left(F_1(\varvec{\theta }_{-1})\right)\right] - P(F)^2 \\&\approx - P(F) \cdot 2 \phi ({\hat{c}}) \cdot \Delta c(\varvec{\theta }_{-1}) + \phi ^2({\hat{c}}) \cdot E_{\varvec{\theta }_{-1}}\left[\delta c^2(\varvec{\theta }_{-1})\right] \\&\approx - P(F) \cdot 2 \phi ({\hat{c}}) \cdot \Delta c(\varvec{\theta }_{-1}) \\&\le P(F)\left( 1-P(F)\right) = \sigma ^2\left[I_F(\varvec{\theta })\right] \end{aligned} \end{aligned}$$
(32)

Highlighting the new terms in Eq. (32)

$$\begin{aligned} \sigma ^2\left(\Phi \left(F_1(\varvec{\theta }_{-1})\right)\right)&\approx - P(F) \cdot 2 \phi ({\hat{c}}) \cdot \Delta c(\varvec{\theta }_{-1})\nonumber \\&\le P(F)\left( 1-P(F)\right) = \sigma ^2\left[I_F(\varvec{\theta })\right] \end{aligned}$$
(33)

this means that a new estimation for the worst covariance given by the LS method (nominally, from Eq. (27), equal to the one given by the standard MC) was obtained, which takes into account the probability level through the term \(\phi ({\hat{c}})\), and the shape of the region F and the direction of sampling through the term \(\Delta c(\varvec{\theta }_{-1})\).

When the approximation of small \(\delta c(\varvec{\theta }_{-1})\) is valid, meaning that the region F has a regular shape and is distributed across the initial uncertainty and the sampling direction is chosen properly so that it points toward it, and the probability level is low, the term \(\phi ^2({\hat{c}}) \cdot E_{\varvec{\theta }_{-1}}\left[\delta c^2(\varvec{\theta }_{-1})\right]\) is also small, and we can say that the variance given by the LS is below a value \(f \left(P(F),\Delta c(\varvec{\theta }_{-1})\right)\) such that \(\sigma ^2\left(P(F)\right)_{\text{LS}} \le f \left(P(F),\Delta c(\varvec{\theta }_{-1})\right) \le \sigma ^2\left(P(F)\right)_{\text{MC}}\), thus increasing the convergence rate of LS with respect to standard MC. On the contrary, when the approximation does not hold (that is in cases with high probability levels, non-optimal sampling direction, or irregurarly shaped impact regions), \(f \left(P(F),\Delta c(\varvec{\theta }_{-1})\right)\) grows toward the covariance level of the MC.

4 Additional Techniques

4.1 Correction of the Sampling Direction

As pointed out both in the available literature and in the previous considerations, the sampling direction is one of the key parameters determining the accuracy and efficiency of the LS method, where the ideal case is represented by the sampling direction being (almost) orthogonal to the boundary of the impact region.

While it is generally impossible to determine an optimal sampling direction a priori, Zio et al. [17] suggest a strategy to identify it as the one minimising the variance \(\sigma ^2 \left({\hat{P}}(F)_{N_T}\right)\) of the probability estimator \({\hat{P}}(F)_{N_T}\). This strategy consists in an optimisation search having the variance \(\sigma ^2 \left({\hat{P}}(F)_{N_T}\right)\) as the objective function to be minimised, requiring the iterative evaluation of hundreds or thousands of possible solutions \(\varvec{\alpha }_{\text{guess}}\) and \(2 N_T\) or \(3 N_T\) system model evaluations to be carried out to calculate the objective function \(\sigma ^2 \left({\hat{P}}(F)_{N_T}\right)\) for each proposed solution. Therefore, the computational effort associated to this technique could be prohibitive with a system model code requiring hours or even days to run a single simulation.

The method that was developed for this work, instead, goes through a pre-processing phase used to correct an initial guess for the sampling direction \(\varvec{\alpha }_{\text{guess}}\). This guess solution is obtained from the set of NS samples generated in the initial Markov Chain already described in Sect. 2.2, and is then used in a short LS analysis over a low number of samples to gain information about the general position and shape of the impact region; the solutions given by this preliminary sampling are used to approximate the impact region as a hyperplane according to a multilinear regression (assuming this approximation is valid), thus using the norm vector orthogonal to the hyperplane as new sampling direction.

The full algorithm represented in Fig. 3 follows the following steps:

  1. 1.

    The initial Markov Chain is performed and a guess for the sampling direction \(\varvec{\alpha }_{\text{guess}}\) is found;

  2. 2.

    A short LS is performed using a few initial samples (also drawn from the Markov Chain itself), obtaining the corresponding \({\overline{c}}^k\) values at the boundary of the impact region;

  3. 3.

    The reference frame is rotated to an orthonormal base aligned with \(\varvec{\alpha }_{\text{guess}}\), in order to later define the hyperplane during the regression more easily;

  4. 4.

    The \({\overline{c}}^k\) values are used to approximate the impact boundary of the impact region as a hyperplane, according to a multilinear regression scheme as \({\overline{c}}^k = b_1 + b_2 \theta _2^{k,\perp } + b_3 \theta _3^{k,\perp } + b_4 \theta _4^{k,\perp } + \cdots = \left[ {\mathbf {1}} \; \varvec{\theta }^{k,\perp }\right] \cdot {\mathbf {B}}\), where \({\mathbf {B}} \in {\mathbb {R}}^d\) is the vector collecting the coefficients defining the d-dimensional hyperplane and orthogonal to it;

  5. 5.

    The reference frame is rotated back to the initial frame of the standard normal coordinate space and the vector \({\mathbf {B}}\) is set as the new sampling direction;

  6. 6.

    The main LS procedure is performed following the “corrected” direction.

Fig. 3
figure 3

Scheme representing the algorithm for the correction of the sampling direction using multilinear regression

The efficiency of this scheme relies on two main hypotheses: first, as already stated, that the impact region or its boundary can be approximated as a hyperplane; second, that the “corrected” sampling direction is “more optimal” than the initial one due to it being orthogonal to the boundary of the impact region, thus closer to the ideal case for the LS.

The application of this technique and its comparison with the LS using the standard procedure are shown in Sect. 5.

4.1.1 Definition of the Orthonormal Base

The orthonormal base used in the multilinear regression is generated according to the Gram–Schmidt orthogonalisation process [18] starting from the guess sampling direction, in order to obtain a base that is aligned with \(\varvec{\alpha }_{\text{guess}}\).

This algorithm constructs an orthonormal basis starting from a set of d linearly independent vectors \({\mathbf {v}}_i \in {\mathbb {R}}^d, \; i=1,\ldots ,d\) as \({\mathbf {V}} = [{\mathbf {v}}_1 \; ... \; {\mathbf {v}}_d]\). Since an initial set is needed, it is set \({\mathbf {v}}_1 = \varvec{\alpha }_{\text{guess}}\) in order to construct it starting from \(\varvec{\alpha }_{\text{guess}}\) only; the other vectors \({\mathbf {v}}_1,\ldots ,{\mathbf {v}}_d\) of the initial set are generated as \({\mathbf {v}}_i = (\alpha _i,\ldots ,\alpha _d,\alpha _1,\ldots ,\alpha _{i-1}), \; i=1,\ldots ,d\) in order to avoid singularities.

The orthogonalisation algorithm proceeds as follows:

  1. 1.

    \({\mathbf {u}}_1 = {\mathbf {v}}_1 = \varvec{\alpha }_{\text{guess}}\)

  2. 2.

    \({\mathbf {u}}_i = {\mathbf {v}}_i - \sum _{j \le i-1}{\frac{\langle {\mathbf {u}}_j,{\mathbf {v}}_i \rangle }{\langle {\mathbf {u}}_j,{\mathbf {u}}_j \rangle } {\mathbf {u}}_j}, \; i=2,\ldots ,d\)

  3. 3.

    \({\mathbf {y}}_i = \frac{{\mathbf {u}}_i}{\Vert {\mathbf {u}}_i \Vert }, \; i=1,\ldots ,d\)

The operation \(\langle {\mathbf {u}},{\mathbf {v}} \rangle\) denotes the inner or scalar product between two vectors \({\mathbf {u}},{\mathbf {v}} \in {\mathbb {R}}^d\), with \(\frac{\langle {\mathbf {u}},{\mathbf {v}} \rangle }{\langle {\mathbf {u}},{\mathbf {u}} \rangle } {\mathbf {u}}\) being the projection of \({\mathbf {v}}\) onto \({\mathbf {u}}\). In this way, \({\mathbf {Y}} = [{\mathbf {y}}_1\ldots {\mathbf {y}}_d]\) is defined as an orthonormal base, with \({\mathbf {y}}_1\) parallel to \(\varvec{\alpha }_{\text{guess}}\), making it possible to express the regression hyperplane in a more convenient way.

4.1.2 Algorithm for Multilinear Regression

Given a set of n dependent values \(y_i, \; i=1,\ldots ,n\) and a set of n independent variables \({\mathbf {x}}_i = (x_{i1},\ldots ,x_{id})^T \in {\mathbb {R}}^d, \; i=1,\ldots ,n\), the linear regression model assumes that there exists a relationship \(f({\mathbf {x}}_i)=y_i \; \forall i=1,\ldots ,n\) which can be modelled linearly as

$$\begin{aligned} y_i = b_0 + b_1 x_{i1} + b_2 x_{i2} + \cdots + b_d x_{id} + \varepsilon _i = [1 \; {\mathbf {x}}_i^T] \cdot {\mathbf {B}} + \varvec{\varepsilon }, \; i=1,\ldots ,n \end{aligned}$$
(34)

with \(\varvec{\varepsilon } \in {\mathbb {R}}^d\) being an error variable representing the random noise due to the approximation.

Defining the following quantities

$$\begin{aligned} {\mathbf {y}} = \begin{pmatrix} y_1 \\ \vdots \\ y_n \end{pmatrix} \; , \; {\mathbf {X}} = \begin{bmatrix} 1 &{} {\mathbf {x}}_1^T \\ \vdots &{} \vdots \\ 1 &{} {\mathbf {x}}_n^T \end{bmatrix} \; , \; {\mathbf {B}} = \begin{pmatrix} b_0 \\ \vdots \\ b_d \end{pmatrix} \; , \; \varvec{\varepsilon } = \begin{pmatrix} \varepsilon _1 \\ \vdots \\ \varepsilon _n \end{pmatrix} \end{aligned}$$

the coefficients \({\mathbf {B}}\) are found by imposing the minimisation of the quadratic quantity

$$\begin{aligned} \sum _i{\varepsilon _i^2} = \varvec{\varepsilon }^T \varvec{\varepsilon } = ({\mathbf {y}}-{\mathbf {X}}{\mathbf {B}})^T ({\mathbf {y}}-{\mathbf {X}}{\mathbf {B}}) \end{aligned}$$
(35)

which gives as solution

$$\begin{aligned} {\mathbf {B}} = ({\mathbf {X}}^T {\mathbf {X}})^{-1} {\mathbf {X}}^T {\mathbf {y}} \end{aligned}$$
(36)

The vector of coefficients \({\mathbf {B}}\) also contains the components of the defining vector orthogonal to the hyperplane. Thus, in the correction procedure described in Sect. 4.1, the new sampling direction \(\varvec{\alpha }\) is set parallel to the vector defined as \((b_1,\ldots ,b_d,-1)^T\) in order to point toward the hyperplane approximating the impact region.

4.2 Multi-event Analysis

As will be presented in Sect. 5, LS can be more efficient (to reach the same accuracy) than the standard MC in estimating the impact probability for a single event, meaning for a close encounter with a specific body in a specific narrow time interval. However, using the same procedure to analyse multiple events (more close approaches with more bodies over an extended period) can lead to less accurate results (for the same number of samples) than the standard MC: as the sampling direction is computed to be orthogonal or nearly orthogonal to one impact region, using the same to sample different regions in the initial dispersion will increase the variance of the probability estimates corresponding to those impact regions, since that sampling direction will intersect them at a larger angle when compared with any direction computed specifically for those cases.

In order to maintain a high level of accuracy throughout the analysis, a repetitive process is presented, as represented in Fig. 4. The proposed solution makes use of repeated LS procedures based on different sampling directions: these directions are identified according to close approach windows, that is the time intervals where close approaches with planets occur, which can be visualised in the example in Fig. 5: in the picture, each dot represents a fly-by (crossing of the sphere of influence, or SOI) plotted according to the epoch and the minimum distance, while the thin rectangles represent the time intervals used to look for impact regions; the colour identifies the order that will be followed for the sampling, starting from the interval with the lowest distance. For each of these windows, a Markov Chain is started, so that a sampling direction can be determined in case an impact region is present.

Fig. 4
figure 4

Block scheme representing the algorithm to perform the multi-event analysis with LS: the preliminary MC survey and identification of the CA windows, the Markov chain generation, the determination and correction of the sampling direction, and the estimation of the impact probability with LS

Fig. 5
figure 5

Close approach window given by the preliminary MC analysis in the case of the post-Earth return trajectory of the Mars Sample Return mission. Each fly-by (crossing of the sphere of influence) is reported as a dot according to the epoch and the distance, and different close approach windows are reported as thin rectangles; the colour identifies the order of sampling, starting from the intervals with the lowest distance

The full procedure, as it is described in the scheme in Fig. 4, follows these steps:

  1. 1.

    A preliminary MC is performed, using a low number of initial samples, and every close approach occurring during the propagations is stored in memory: this initial phase allows to obtain a first estimate of how many and where the impact regions might be;

  2. 2.

    The data about the fly-bys is analysed and the close approach (CA) windows are identified and sorted according to the minimum distance (with priority given to the the window leading to the closest CA): this allows to focus on the impact regions corresponding to the most relevant impact events (if any);

  3. 3.

    A Markov Chain is started to search for an impact region inside the first close approach window: this allows to populate the impact region (if any) and determine a first guess for the sampling direction;

  4. 4.

    At the end of the Markov Chain

    1. (a)

      In case impacts were detected, A preliminary LS is performed using a first guess for the sampling direction, which is then corrected using the algorithm introduced in Sect. 4.1; this allows to obtain a new sampling direction that is ideally closer to the optimal case for LS, which in turns allows to improve its accuracy;

    2. (b)

      A new set of random initial conditions is drawn from the distribution and a complete LS is performed as described in the previous sections to identify the impact region and compute the corresponding impact probability;

    3. (c)

      In case no impacts were detected, the next CA window in the priority order is selected, and the procedure goes back to point 4 to start a new Markov chain;

  5. 5.

    After all CA windows have been analysed, the impact probability is given by the weighted sum of all the partial impact probabilities as computed in Eq. (13).

Despite being computationally more complex and less memory efficient (due to the larger number of parameters involved and to the larger output size) than a single LS analysis, this method can ideally offer a complete overview of the impact regions inside the initial uncertainty distribution, providing additional information with respect to a normal planetary protection analysis, thus being able to be used directly in mission design.

Many parameters can affect the efficiency of this method in terms of number of propagations (compared with the standard MC) and its reliability in identifying correctly the impact regions (if any). In particular, the number of samples of preliminary MC (determined by confidence level), the length of the Markov Chains, the number of sampling lines, the tolerances used in the iterative process to determine the intersections between each sampling line and the impact region were identified as key parameters in these regards. For each of them, a trade off is required: while higher values would increase the accuracy of the determination of the impact regions and, consequently, of the probability estimate, the impact on the computational load may make the LS process less efficient than the standard MC; on the contrary, lower values would reduce substantially the number of orbital propagations needed to identify and sample the CA windows, but would not ensure the correct recognition of the impact regions.

4.2.1 Algorithm for Merging Close Approach Intervals

Given n intervals \(I^i = [t_1^i,t_2^i]\) with \(t_1^i < t_2^i\) (corresponding, respectively, to the SOI entry and exit epochs of each close approach in the preliminary analysis), algorithm to merge the close approach intervals proceeds as follow:

  1. 1.

    All intervals are sorted from earliest to latest starting epoch \(t_1^i\) (SOI entry) and put into a main stack;

  2. 2.

    The interval on top of the main stack \(I^1 = [t_1^1,t_2^1]\) is compared with the following one \(I^2 = [t_1^2,t_2^2]\);

    1. (a)

      If \(t_1^1 \le t_2^2 \; \text{AND} \; t_1^2 \le t_2^1\), the two intervals \(I^1\) and \(I^2\) overlap, and thus are merged into a new \(I = [t_1^1,t_2^2]\) which becomes the interval on top of the stack \(I^1\);

    2. (b)

      Else, \(I^1\) is moved to an output stack and the comparison starts again from the interval on top of the main stack;

  3. 3.

    The comparisons are carried out until the main stack is empty.

The maximum complexity of this algorithm is of order \(O(N \log {N})\) (e.g., as used for sorting the minimum and maximum range values), with N being the number of recorded CAs. However, since the procedure is applied only once, it does not increase the computational load of the whole analysis in a relevant way.

5 Application and Results

Two test cases were selected to show how the proposed procedure works and its performance in identifying impact regions shaped differently with different probability levels:

  1. 1.

    The launcher upper stage of Solar Orbiter:

    • the data refers to an old option for a launch in October 2018, later discarded during the mission design (initial data in Table 1 taken from [2]);

    • the analysis focuses on the trajectory of the launcher upper stage following the injection into the interplanetary transfer orbit (aiming to a fly-by with Venus) and the separation from the spacecraft;

    • the planetary protection requirement applied in this case is the same used to protect Mars for a generic mission, with a probability level of \(10^{-4}\).

  2. 2.

    The Mars Sample Return mission:

    • the analysis focuses on the return trajectory from Mars after performing an Earth-avoidance manoeuvre;

    • the uncertainty distribution is built assuming errors of 1 m on all position components and 5 m/s on all velocity components within a \(3\sigma\) confidence level

    • the planetary protection requirement applied in this case is the same used to protect Earth for all sample return missions, with a probability level of \(10^{-6}\).

For both cases, the initial state uncertainty is expressed as a 6x6 covariance matrix over the state only, and all initial data (epochs, states and uncertainties) is reported, and defined with respect to the EME2000 inertial reference frame (Earth’s Mean Equator and Equinox at 12:00 Terrestrial Time on 1 January 2000): the x-axis is aligned with the mean equinox, the z-axis is aligned with the Earth’s celestial North Pole, and the y-axis is rotated by \(90^{\circ }\) East about the celestial equator [19].

The propagations are carried out in normalised units (with reference length and time equal to 1 AU and 1 solar year, respectively) using the adaptive Dormand-Prince Runge-Kutta scheme of \(8^\text {th}\) order (DOP853), with absolute and relative tolerances both set to \(10^{-12}\).

For both cases, the stopping tolerance of the iterative process for the LS is \(10^{-3}\) with a maximum of 12 propagations per line.

The comparison between the standard MC and the proposed approach based on LS is performed by analysing the following parameters:

  • the total number of orbital propagations \(N_\text {prop}\);

  • for the LS only, the total number of sampling lines \(N_\text {lines}\);

  • the impact probability estimate \({\hat{P}}(I)\);

  • the sample standard deviation \({\hat{\sigma }}\) of \({\hat{P}}(I)\);

The overall number of propagations \(N_P\) is selected as a measure of the computational burden of the methods, while the standard deviation \({\hat{\sigma }}\) is instead used as indicator of the accuracy of the result, with lower values corresponding to lower variability [8, 9].

The total computational time is also reported and discussed among the results, however is not included the evaluations of the efficiency of the method due to the variability intrinsic to the choice of the machine and its workload.

5.1 Launcher Upper Stage of Solar Orbiter

Table 1 reports the initial state, associated covariance matrix, and reference epoch for this mission case, which are the same ones reported in [2].

Table 1 Initial conditions for the simulations of the state inaccuracy of the launcher upper stage of Solar Orbiter: epoch, position, velocity, and the associated covariance matrix are reported, defined in the inertial EME2000 reference frame centred in the Sun

A preliminary MC simulation was performed to obtain information about the CA windows for the multi-event analysis. The number of runs was determined using the probability, confidence level, and maximum number of samples reported in Table 2: that value was obtained by arbitrarily scaling the probability set by the planetary protection requirement by two orders of magnitude. The table also shows the number of close approaches that were recorded and the number of CA windows that were identified via the merging algorithm introduced in Sect. 4.2.1, while Fig. 6 shows their distribution in time.

Table 2 Input data and results of the preliminary MC for the multi-event analysis for the Solar Orbiter mission
Fig. 6
figure 6

Distribution in time of the close approach windows recorded during the preliminary MC sampling of the uncertainty for the Solar Orbiter mission: dots represent close approaches reported with their minimum distance epoch and miss distance, while the thin rectangles represent the time intervals used to look for impact regions; the colour identifies the order of sampling, starting from the intervals with the lowest distance (Color figure online)

Fig. 7
figure 7

Detail of the CA window identified as the first impact region for the Solar Orbiter mission

Figure 6 shows the distribution in time of the CA windows found with the preliminary MC analysis, indicating each encounter with a planet as a dot according to its epoch and minimum distance from the encountered planet. The color scale indicates the sampling priority that is given to each CA window, starting from the one with the closest CAs. In particular, Fig. 7 shows a close-up of the CA window that was assigned the highest priority, which, in this case, is also the only CA window where an impact region was found via the sampling with a Markov Chain. This was an expected result, since, in this launch option, the upper stage injects the spacecraft into a trajectory aiming for a direct gravity assist with Venus in the first year of the mission [20].

In the case of the launcher upper stage of Solar Orbiter, the LS was applied both without and with the correction of the sampling direction. The solution without the correction is shown in Figs. 8 and 9, while the one where the correction was applied is shown in Figs. 10 and 11 : in both cases, the figures show the \(\Delta v\) distribution as grey dots and the impact region as red (solution of the standard MC simulation) and green dots (boundary found via LS), and the convergence of the solutions given by standard MC and LS, in terms of estimated value of the impact probability and its associated standard deviation. Table 3 reports the numerical solutions in both cases, comparing them with the solution given by the standard MC simulation.

Fig. 8
figure 8

Results of the application of the LS method to the case of the Solar Orbiter mission, without the correction of the sampling direction: a the whole initial dispersion (grey dots), impact region found with MC (red) and boundary found with LS (green); b the impact region in more detail (Color figure online)

Fig. 9
figure 9

Convergence of the solution given by LS (green) compared with the convergence of standard MC (red) in terms of impact probability in a and associated variance in b in the case of the Solar Orbiter mission, without the correction of the sampling direction

Fig. 10
figure 10

Results of the application of the LS method to the case of the Solar Orbiter mission, after the correction of the sampling direction: a the whole initial dispersion (grey dots), impact region found with MC (red) and boundary found with LS (green); b the impact region in more detail (Color figure online)

Fig. 11
figure 11

Convergence of the solution given by LS (green) compared with the convergence of standard MC (red) in terms of impact probability in a and associated variance in b in the case of the Solar Orbiter mission, after the correction of the sampling direction

Table 3 Results of the application of standard MC and LS (without correction and with correction of the sampling direction) for the case of the upper launcher stage of Solar Orbiter: number of propagations, number of sampling lines used by the LS, probability estimate and associated variance, and computational time
Table 4 Numerical performance of LS with correction of the sampling direction compared to standard MC in the case of the launcher upper stage of Solar Orbiter

The results reported in Table 3 show the benefit given by the application of LS over standard MC, as the proposed method is able to reach the same variance of the probability estimate given by the standard MC using a much lower number of propagations when the sampling direction is chosen properly: not only the number of sampling lines is reduced by almost 8 times, but the number of necessary propagations is reduced as well by almost 6 times. In fact, a choice of the sampling direction not orthogonal or nearly orthogonal to the impact region affects not only the efficiency of the LS (with a higher number of sampling lines necessary to obtain the same accuracy), but also the accuracy of the iterative process itself, as in average 9 propagations per line are needed against the 7 propagations per line in case the sampling direction is corrected to be “more optimal”. In both cases, the number of lines is initially determined based on the value of the probability set by the planetary protection requirement, and it is then increased to reach the same accuracy given by the standard MC in the non corrected case, or reduced when that accuracy is reached in the corrected case.

The differences in the values of the estimated impact probability are due both to the determination of the sampling direction, as already pointed out, and to the accuracy of the iterative process used to identify the boundary of the impact region. This also confirms the theoretical considerations made in Sects. 3.1 and 3.2 about the importance of a proper determination of the sampling direction for a good accuracy of the LS solution.

It must be pointed out that the difference between the probability values estimated by the two methods is due to LS identifying only the main impact region, as seen in Figs. 8 and 10, and ignoring the isolated impacts found by standard MC. These may belong to extremely thin impact regions, which may be captured by LS with different values of simulation parameters (e.g. number of preliminary MC runs, length of Markov Chains), or may be outliers, which would require a different approach to be sampled. However, since the impact probability associated with the main impact region contributes the most to the overall estimation, the values computed via MC and LS do not differ substantially.

Table 4, instead, shows the computational load given by the whole multi-event procedure compared with the one given by the standard MC, for the analysis with the correction of the sampling direction, highlighting the various phases of the LS-based procedure, which is split into:

  • preliminary MC, used to identify the CA windows;

  • Markov Chains, one per CA window;

  • LS phases, that is those phases where the impact regions found using the Markov chains (if any) are sampled using lines.

In this case, a maximum limit of 200 samples per Markov chain was set. It is clear that the Markov Chains are the most demanding phases with 66% of the total computational load of LS, since each CA window is sampled to search for an impact region, while, as expected, the preliminary MC phase does not increase significantly the computational time.

5.2 Mars Sample Return mission (Post Earth-Avoidance Manoeuvre)

Table 5 reports the initial state, associated covariance matrix, and reference epoch for this mission case: the uncertainty was arbitrarily set to 1 m in position and 5 m/s in velocity, uniformly over all the components.

Table 5 Initial conditions for the simulations of the state inaccuracy of the launcher upper stage of Solar Orbiter: epoch, position, velocity, and the associated covariance matrix are reported, defined in the inertial EME2000 reference frame centred in the Sun

A preliminary MC simulation was performed to obtain information about the CA windows for the multi-event analysis. The number of runs was determined using the probability, confidence level, and maximum number of samples reported in Table 6. The table also shows the number of close approaches that were recorded and the number of CA windows that were identified, while Fig. 12 shows their distribution in time.

Table 6 Input data and results of the preliminary MC for the multi-event analysis for the Mars Sample Return mission
Fig. 12
figure 12

Distribution in time of the close approach windows recorded during the preliminary MC sampling of the uncertainty for the Mars Sample Return mission: dots represent close approaches reported with their minimum distance epoch and miss distance, while the thin rectangles represent the time intervals used to look for impact regions; the colour identifies the order of sampling, starting from the intervals with the lowest distance

Fig. 13
figure 13

Detail of the CA window identified as the first impact region for the Mars Sample Return mission

Figure 12 shows the distribution in time of the CA windows found with the preliminary MC analysis. In particular, Fig. 13 shows a close-up of the CA window that was assigned the highest priority, which, in this case, is also the only CA window where an impact region was found via the sampling with a Markov Chain, corresponding to an encounter window with Earth after 23 years from the beginning of the propagation period.

Also in the case of the Mars Sample Return mission, the LS was applied both without and with the correction of the sampling direction. The solution without the correction is shown in Figs. 14 and 15, while the one where the correction was applied is shown in Figs. 16 and 17: in both cases, the figures show the \(\Delta v\) distribution as grey dots and the impact region as red (solution of the standard MC simulation) and green dots (boundary found via LS), and the convergence of the solutions given by standard MC and LS, in terms of estimated value of the impact probability and its associated standard deviation. Table 7 reports the numerical solutions in both cases, comparing them with the solution given by the standard MC simulation.

Fig. 14
figure 14

Results of the application of the LS method to the case of the post-Earth return trajectory of the Mars Sample Return mission, without the correction of the sampling direction: a the whole initial dispersion (grey dots), impact region found with MC (red) and boundary found with LS (green); b the impact region in more detail (Color figure online)

Fig. 15
figure 15

Convergence of the solution given by LS (green) compared with the convergence of standard MC (red) in terms of impact probability in a and associated variance in b in the case of the Mars Sample Return mission, without the correction of the sampling direction

Fig. 16
figure 16

Results of the application of the LS method to the case of the post-Earth return trajectory of the Mars Sample Return mission: a the whole initial dispersion (grey dots), impact region found with MC (red) and boundary found with LS (green); b the impact region in more detail (Color figure online)

Fig. 17
figure 17

Convergence of the solution given by LS (green) compared with the convergence of standard MC (red) in terms of impact probability in a and associated variance in b in the case of the Mars Sample Return mission

Table 7 Results of the application of standard MC and LS (without correction and with correction of the sampling direction) for the case of the Mars Sample Return mission: number of propagations, number of sampling lines used by the LS, probability estimate and associated variance, and computational time
Table 8 Numerical performance of LS with correction of the sampling direction compared to standard MC in the case of the Mars Sample Return mission

Also in this case, the benefit of using LS is visible, as both the number of propagations and the variance of the probability are reduced by orders of magnitude with respect to the standard MC in identifying the main impact region. In particular, this test case is very close to the optimal case of the application of LS: not only the probability value to be estimated is very low, but also the impact region has a planar shape extended across the uncertainty distribution. This alone allows a higher efficiency even without a correction of the sampling direction, as the LS is able to reach the same accuracy of MC with a number of propagations orders of magnitude lower. In turn, the correction of the sampling direction allows a further reduction of the number of propagation required and a refinement of the estimation of the impact probability, obtaining a direction that is almost orthogonal to the boundary of the impact region (these observations follow the ones already done in [21]).

Also in this case, the computational efficiency of the whole multi-event analysis is compared with the standard MC simulation, through the data reported in Table 8, highlighting the various phases of the LS-based procedure with the correction of the sampling direction, as defined in the previous test case. In this case, a maximum limit of 1000 samples per Markov chain was set. Again, the Markov Chains sampling of each CA window is the most demanding phase, with almost 80% of the total computational load of LS. However, both in this case and in the previous one, the complete LS-based procedure reduces the computational time with respect to the MC analysis.

Finally, Table 9 tries to quantify the effect on the numerical efficiency of the angular offset of \(\varvec{\alpha }\) with respect to the corrected direction: the angular offset is compared to the ratios of propagations and of sampling lines in the corrected and non corrected cases, for both tests. It is possible to observe what has already been pointed out while commenting the two test cases in the previous paragraphs, that is the effect of both the correction of the sampling direction and of the shape of the impact region. In the case of the Solar Orbiter mission, the angular offset is relatively large, which is reflected in the difference in the number of propagations and sampling lines up to one order of magnitude. In the case of the Mars Sample Return mission, the differences are lower, due to both the more favourable sampling direction (much closer to the corrected version with respected to the other test case) and the better shape of the impact region (which allows a higher efficiency in general). A more thorough analysis of this aspect is left for a future work.

Table 9 Comparison of the two test cases: analysis of the the angular offset of \(\varvec{\alpha }\) with respect to the corrected direction compared with the number of samples required

6 Conclusions

This manuscript focused on the improvement of the uncertainty sampling techniques currently used in planetary protection analysis. The LS method was presented as an alternative to standard MC simulations, with the goal of reducing the computational load of the statistical analysis by sampling the initial uncertainty distribution in a more efficient way. The LS method uses lines following a reference direction instead of points to sample the uncertainty space, identifying the boundaries of the impact regions inside of it and computing the impact probability using integrals along these lines where they intersect the impact regions. Since these integrals are evaluated analytically, the LS method can provide an estimation of the impact probability that has a lower variance (thus can be considered more accurate) than the one given by standard MC when the same number of samples are used, or reach a similar accuracy using fewer samples.

While previous works adapted LS for single events, the method was improved by designing new algorithms to allow its application to cases where multiple impacts with planets are possible over long periods of time. The performance of LS was analysed in comparison with standard MC both numerically, by applying both methods to different mission cases, and analytically, by developing an approximated formula which highlights how the accuracy of LS depends on the geometry of the impact regions found within the initial uncertainty domain and the choice of the sampling direction.

In particular, two novel algorithms were devised to support the application of LS to cases where multiple close approaches with planets, and thus multiple impact regions, are possible, as commonly found in planetary protection analysis. One algorithm uses the information gained from a preliminary MC analysis to identify the time intervals where most close approaches are clustered and define close approach windows: this ensures that all potential impact regions, when present, are explored with LS. The second algorithm additionally uses an initial guess for the sampling direction and corrects it to make it closer to the ideal case: this greatly improves the accuracy of the method without increasing significantly the computational load, since it allows to sample the impact region in a more optimal way.

The procedure shown here has been developed with the main objectives of making planetary protection analysis more accurate and efficient. The results presented in this work have proven that the LS method is more efficient and accurate of the standard MC Simulation method currently employed in planetary protection analysis, confirming the outcomes of previous studies on the subject. In all the test cases, the LS was able to reach a similar level of accuracy as the standard MC while using a lower number of propagations, or, viceversa, it reached a higher accuracy when performing the same amount of orbital propagations.

Future work will focus on different aspects of the techniques introduced here.

In the first place, the theoretical formulation of LS will be expanded further, with the aim of obtaining an analytical expression of the variance of LS correlating the number of sampling lines and the estimated probability level. This will allow to estimate in advance the number of LS runs necessary to reach a given confidence level, as it is already possible for the standard MC by exploiting the expression of the confidence interval by Wilson [6].

Secondly, efforts will be made for improving the multi-event analysis, in particular the identification of the candidate impact regions and their exploration via Markov’s Chain, with the goal of making the identification of regions of interest in the initial uncertainty more efficient. In particular, a general study aimed at quantifying the sensitivity of the proposed approach on the various parameters affecting its performance shall be done: the number of runs in the preliminary MC, the length of the Markov chains, the sampling direction, and the iterative method to sample the lines are some of the most important factors on which the LS techniques work.

On a last note, more advanced sampling techniques will be explored and applied to the estimation of impact probability for planetary protection analysis.