Next Article in Journal
Differential Hall Effect Metrology for Electrical Characterization of Advanced Semiconductor Layers
Next Article in Special Issue
Novel Method of Fitting a Nonlinear Function to Data of Measurement Based on Linearization by Change Variables, Examples and Uncertainty
Previous Article in Journal
Navigating Safer Car Routes Based on Measured Car Accidents
Previous Article in Special Issue
Impact of Angular Speed Calculation Methods from Encoder Measurements on the Test Uncertainty of Electric Motor Efficiency
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Using a Multivariate Virtual Experiment for Uncertainty Evaluation with Unknown Variance

1
Physikalisch-Technische Bundesanstalt, 10587 Berlin, Germany
2
Van Swinden Laboratory (VSL), Thijsseweg 11, 2629 JA Delft, The Netherlands
*
Author to whom correspondence should be addressed.
Metrology 2024, 4(4), 534-546; https://doi.org/10.3390/metrology4040033
Submission received: 25 July 2024 / Revised: 17 September 2024 / Accepted: 19 September 2024 / Published: 1 October 2024
(This article belongs to the Collection Measurement Uncertainty)

Abstract

Virtual experiments are a digital representation of a real measurement and play a crucial role in modern measurement sciences and metrology. Beyond their common usage as a modeling and validation tool, a virtual experiment may also be employed to perform a parameter sensitivity analysis or to carry out a measurement uncertainty evaluation. For the latter to be compliant with statistical principles and metrological guidelines, the procedure to obtain an estimate and a corresponding measurement uncertainty requires careful consideration. We employ a Monte Carlo sampling procedure using a virtual experiment that allows one to perform a measurement uncertainty evaluation according to the Monte Carlo approach of JCGM-101 and JCGM-102, two widely applied guidelines for uncertainty evaluation in metrology. We extend and formalize a previously published approach for simple additive models to account for a large class of non-linear virtual experiments and measurement models for multidimensionality of the data and output quantities, and for the case of unknown variance of repeated measurements. With the algorithm developed here, a simple procedure for the evaluation of measurement uncertainty is provided that may be applied in various applications that admit a certain structure for their virtual experiment. Moreover, the measurement model commonly employed for uncertainty evaluation according to JCGM-101 and JCGM-102 is not required for this algorithm, and only evaluations of the virtual experiment are performed to obtain an estimate and an associated uncertainty of the measurand. We demonstrate the efficacy of the developed approach and the effect of the underlying assumptions for a generic polynomial regression example and an example of a simplified coordinate measuring machine and its virtual representation. The results of this work highlight that considerable effort, diligence, and statistical considerations need to be invested to make use of a virtual experiment for uncertainty evaluation in a way that ensures equivalence with the accepted guidelines.

1. Uncertainty Evaluation Using a Virtual Experiment

Virtual experiments are mathematical and numerical models representing a physical measurement process in a virtual environment. In an ideal scenario, a virtual experiment is able to generate virtual observations with the same statistical properties as the observations of the corresponding real experiment [1]. Similar to digital twins [2,3], virtual experiments have gained significant popularity in industry [4,5,6,7,8] and wider measurement science [9] with a variety of use-cases. In contrast to a digital twin, a virtual experiment lacks the ‘twinning’ with the real experiment that would allow it to continuously update the virtual representation based on feedback from the real counterpart and vice versa. However, a virtual experiment is an essential, but static, element of a digital twin with several applications of its own. While virtual experiments can be used to improve the measurement processes itself and explore significant error sources using a sensitivity analysis [10], one of the key applications is the evaluation of measurement uncertainty [11,12,13], which we will focus on in this work.
Here, we consider virtual experiments of a specific (semi-) non-linear structure with an additive Gaussian noise error term
X ve = VE ( Y , Z ; Σ ) = g ( Y , Z ) + ϵ = A ( Z ) Y + B ( Z ) + ϵ , ϵ N ( 0 , Σ ) , Σ = diag ( σ 1 2 , , σ n 2 ) .
A general introduction to virtual experiments and a similar class of models is considered in [14] for the univariate case, and in [11], additive virtual experiments have been analyzed. Table 1 presents an overview of the quantities required in this work. In (1), Y denotes the measurand, which is the p 1 dimensional quantity of interest in the measurement and also the quantity for which an estimate and corresponding uncertainty has to be obtained. In the examples considered in Section 4, Y corresponds to either a set of polynomial coefficients, cf. Section 4.1, or the radius and position of a circle estimated from coordinate measurements, cf. Section 4.2. By Z, we denote the set of fixed parameters that are identified to affect the measurement and hence the virtual experiment, e.g., instrument setup parameter, temperature effects, reference quantities, and additional error terms, and about which non-statistical information is available. These quantities are unknown in a real experiment. Having values for these two quantities Y and Z, realizations of the n 1 dimensional virtually measured quantity X ve can be obtained by evaluation of the virtual experiment (1). The uncertainty due to repetition of the experiment is reflected by ϵ , which we model here as an additive Gaussian noise with diagonal covariance matrix Σ R n , n . This additive error model is a common modeling choice in measurement science [15,16], statistics [17], and uncertainty quantification [18,19] that obviously is a simplification for real and complex measurement procedures. While the values of the variances σ 1 2 , , σ n 2 of repetitions in the virtual experiment need to be specified and provided by the user, we assume here that the actual realization of ϵ might not be accessible for the user when evaluating the virtual experiment. This might be the case when the virtual experiment is a black-box software tool that internally generates noisy observations of some quantity. However, the values for the measurand Y, the parameter Z, and the assumed covariance Σ are provided. The forward model g is usually a complex function that mimics the measurement process, e.g., by simulating physical phenomena by the solution of differential equations or the operating mode of sensors. In this work, we additionally assume that the forward model g can be written as a function A ( Z ) Y + B ( Z ) , which is linear in the measurand quantity Y and non-linear in the parameter vector Z. The functions A and B depend on the applications involved and map (elements of) the parameter vector Z to R n , p and R n , respectively. This class of models could also include additive terms accounting for model inadequacy as suggested in [20] based on a model calibration. The class of virtual experiments considered here is multivariate, in contrast to the previous literature [14], and allows more realistic and involved modeling. Virtual experiments of the form (1) can, for instance, be found in dimensional metrology when considering coordinate measuring machines [7,12] or when simulating the pressure of a flow in a porous media [21]. Also, many surrogate models, such as proper orthogonal decompositions [22], Karhunen–Loeve expansions [23], and multilinear tensor formats [24] fall within this category.
To use a virtual experiment for uncertainty evaluation in conjunction with a set of real observations, a Monte Carlo procedure can be employed [25] that repeatedly applies the virtual experiment (1) for different realizations of the virtual system, i.e., the parameter vector Z. Then, the resulting spread of the virtual observations can be analyzed. However, in a real experiment, it is usually assumed that repeated measurements are taken from a specific instrument with a fixed value for the Z parameters and the part of the uncertainty due to repeatability is reflected by random influences that cannot be controlled in the measurement, i.e., the random vector ϵ . This conceptual difference between a real and virtual experiment has been pointed out before [11], and an alternative application of the virtual experiment for the purpose of uncertainty evaluation has been analyzed [13].
The goal of this work is to derive a simple Monte Carlo sampling procedure that solely requires application of the virtual experiment (1) to perform uncertainty evaluation for the measurand, following the two guidelines JCGM-101 [26] and JCM-102 [27] for uncertainty evaluation in metrology, without explicitly requiring a measurement model. However, the approach should produce an estimate and associated uncertainty of the measurand Y that is equivalent to the results produced by applying JCGM-101 or JCGM-102. The procedure in this work is particularly interesting and applicable when the virtual experiment is a black-box and might involve complex mathematical and numerical computations since the derived algorithm does not require explicit knowledge about the elements of the virtual experiment (1), i.e., A ( Z ) , B ( Z ) , and ϵ , which would be required to build a corresponding measurement model for uncertainty evaluation according to the GUM.
This manuscript is organized as follows: we recall the JCGM-102 Monte Carlo procedure in Section 2, and in Section 3, we derive an equivalent Monte Carlo sampling procedure using only the virtual experiment. Numerical examples in Section 4 show the validity of the proposed approach.

2. The Reference Monte Carlo Procedure According to the JCGM-102

In the JCGM-102 and related GUM documents, a set of independent, real observations and a measurement model are required to perform an uncertainty evaluation. The m 1 repeated observations x 1 , , x m are taken for the n 1 observed quantities, i.e., every observation x i = ( x i 1 , , x i n ) is a vector that may represent different measurement locations, wavelengths, or parameter settings, depending on the application considered. The corresponding quantity for which the observations are assumed to be realizations of is denoted by X, and it is required to have more observations than dimensions m > n . The measurement model, which relates the input quantities X and additional parameters Z to the measurand Y, is denoted by f. A possible choice for the measurement model based on the form of the virtual experiment (1) can be formulated assuming that the function A in (1) has a pseudo-inverse for reasonable values of Z by
Y = f ( X , Z ) = A ( Z ) 1 ( X B ( Z ) ) .
However, especially in higher dimensions, the choice of the measurement model can be challenging, and even though the measurement model (2) is taken as the partial inverse of the virtual experiment (1), this is by no means the only option and ambiguous. In fact, the measurement model can deviate from the choice in (2) and we will analyze this in the example of a coordinate measuring machine in Section 4.2. Furthermore, the measurement model f is conceptually different from the virtual experiment (1) and the involved forward model g [11]. In the former, the quantity corresponding to the measurement data is entered as an input, while the latter produces virtual data assuming a value for the measurand Y and the Z parameters.
For the JCGM-102 Monte Carlo approach, we assume there is some measurement model (2) given and a probability density function (PDF) π ( z ) for the quantity Z, which may be the result of expert elicitation or the explicit guidance in JCGM-101 [26]. For the measured quantity X, JCGM-102 assigns in clause 5.3.2 a multivariate scaled and shifted t-distribution with ν = m n degrees of freedom. The shift by the experimental mean vector and the scaling through the scaled experimental covariance are based on the observations x 1 , , x m . In particular, one assigns
π ( x ) = t ν ( x ¯ = ( x ¯ 1 , , x ¯ n ) , S / m ) , x ¯ j = 1 m i = 1 m x i j , S = 1 ν i = 1 m ( x i x ¯ ) ( x i x ¯ ) T ,
where t ν denotes the PDF of the corresponding multivariate t distribution. Sampling from the multivariate scaled and shifted t-distribution can be accomplished by sampling from a multivariate standard normal distribution and scaling and shifting the samples accordingly. In particular, for a random vector θ following a multivariate normal distribution with mean μ , covariance Σ N , and η following a multivariate scaled and shifted t-distribution as in (3), the following equality (this equality holds in distribution, which means, the random vector on the left-hand side and the random vector on the right-hand side of the equality symbol follow the same distribution) holds:
η = S 1 / 2 Σ N 1 / 2 ( θ μ ) φ ν m + x ¯ , η t ν ( x ¯ , S / m ) , θ N ( μ , Σ ) , φ χ 2 ( ν ) .
Here, φ is a random variable that follows a χ 2 -distribution with ν degrees of freedom. The matrix square roots of the symmetric positive definite covariance matrices S and Σ N can be obtained, for example, by the Cholesky decomposition. This means that drawing samples from a t-distribution can be realized by combining samples from a normal distribution with samples from a χ 2 -distribution. For more details, cf. [27] (clause 5.3.2.4) and [28].
At this point it is to note that the requirement m > n , i.e., assuming more observations than dimensions in the observed quantity, can be omitted when assuming a known covariance of the observations. In this case, a multivariate normal distribution with estimate x ¯ can be assigned instead of a multivariate t-distribution [26] (clause 6.4.8). This includes the case of m = 1 , which is commonly considered for the coordinate measuring machine. However, in this work, we focus on the case of an unknown covariance in the observations.
Based on this PDF assignment for the quantity X and the availability of a PDF for the quantity Z, the following Monte Carlo sampling Algorithm 1 may be applied to approximate the state-of-knowledge distribution for the measurand.
Algorithm 1 JCGM-102 Monte Carlo algorithm
Input: 
Measurement model f ( X , Z ) , real observations x 1 , , x m , state-of-knowledge PDF π ( z ) , number of samples N.
Output: 
Samples from state-of-knowledge PDF of measurand π ( Y )
 1:
Compute state-of-knowledge PDF π ( x ) for the quantity X as in (3)
 2:
for  i = 1 , , N   do
 3:
     z i Draw sample from PDF π ( z )
 4:
     x i Draw sample from PDF π ( x )
 5:
     y i Evaluate measurement model f ( x i , z i )
 6:
end for
 7:
Summarize samples y 1 , , y N to obtain estimate and corresponding uncertainty in terms of the mean vector and the covariance matrix
y ^ = 1 N i = 1 N y i , U Y = 1 N 1 i = 1 N ( y i y ^ ) ( y i y ^ ) T .
 8:
The standard uncertainty of every element of Y is given by the square root of the diagonal elements of U Y .
In the following section, we derive a similar Monte Carlo sampling algorithm that, under the assumed structure of the virtual experiment (1) and measurement model (2), yields the same state-of-knowledge PDF as JCGM-102 in Algorithm 1. However, we only require the application of the virtual experiment (1) and a suitable transformation of its output.

3. A Monte Carlo Sampling Procedure Using the Virtual Experiment

There are two main issues when using a virtual experiment, as in (1), for uncertainty evaluation for the measurand. Firstly, every evaluation of the virtual experiment requires a value for the measurand as input. Since the true value for the measurand is generally unknown, virtual observations generated by the virtual experiment will most likely differ from real observations. For the algorithm developed later in this section, we will show that any simulated value y 0 for the measurand can be taken, without affecting the resulting estimate and its associated uncertainty. Secondly, repeated realizations from the virtual experiment are drawn from a multivariate normal distribution with assumed known covariance matrix Σ and uncorrelated elements. On the other hand, the JCGM-102 approach considers a multivariate t-distribution and considers correlations, which are informed by real observations with unknown variances. Assuming the virtual experiment is a black-box and the distribution of the random deviations, represented by ϵ in (1), cannot be altered, the random variable X ve in (1) needs to be corrected to comply with the JCGM-102 Monte Carlo sampling approach. For this, the mean of the virtual experiment is required, i.e, for some value of the measurand y and some value of the parameter vector z, one either has direct access to the forward model μ : = g ( y , z ) or alternatively, one may estimate the mean from additional evaluations of the virtual experiment and a Monte Carlo estimate using many samples, here denoted by N ve
μ = g ( y , z ) = E VE ( y , z ; Σ ) 1 N ve j = 1 N ve g ( y , z ) + ϵ j
Additionally, for the following Monte Carlo Algorithm 2 to generate the same PDF as JCGM-102 and Algorithm 1, we require knowledge of A ( Z ) from the virtual experiment to transform between the observations and the measurand. Since A ( Z ) might be inaccessible in a black-box virtual experiment, it may be obtained by assuming that the virtual experiment also outputs a partial derivative. This derivative may be the derivative of the forward model g with respect to the measurand J ve ( y 0 , z ) : = g y ( y , z ) | y = y 0 evaluated at some value for the measurand y 0 and any z. Alternatively, the virtual experiment returns for every evaluation of (1) a realization and the corresponding disturbed partial derivative such that one may estimate for some N ve that is large enough using
J ve ( y 0 , z ) = A ( z ) = y g ( y , z ) | y = y 0 = E VE y ( y , z ; Σ ) | y = y 0 1 N ve j = 1 N ve y g ϵ j ( y , z ) | y = y 0 ,
where g ϵ j ( y , z ) denotes the disturbed output of the virtual experiment using some ϵ j N ( 0 , Σ ) , from which the gradient has to be obtained. Both cases are realistic in the sense that a black-box virtual experiment might directly return the gradient of the forward model since it may have been an essential part of the computations required, e.g., when g involves some optimization functional. Also, samples of a disturbed gradient might be present when an automatic differentiation tool is used after evaluation of the virtual experiment or when a gradient approximation is performed using finite difference methods.
Algorithm 2 Virtual experiment Monte Carlo algorithm.
Input: 
Virtual experiment as in (1), real observations x 1 , , x m , state-of-knowledge PDF π ( z ) , number of samples of measurand N, simulated value of measurand y 0 , covariance used in virtual experiment Σ = diag ( σ 1 2 , , σ n 2 ) .
Output: 
Samples from state-of-knowledge PDF of measurand π ( y ) with the same mean and covariance estimate as in Algorithm 1.
 1:
Estimate experimental mean vector x ¯ and scaled experimental covariance S as given in (3)
 2:
L L T = S / m compute Cholesky decomposition of S / m
 3:
for  i = 1 , , N   do
 4:
     z i Draw sample from PDF π ( z )
 5:
     x ¯ i ve experimental mean of m virtual experiment realizations
x ¯ i ve = 1 m j = 1 m VE ( y 0 , z i ; Σ ) = 1 m j = 1 m g ( y 0 , z i ) + ϵ j
 6:
     μ i get mean estimate from virtual experiment according to (6)
 7:
     J i get gradient estimate from virtual experiment according to (7)
 8:
     c i sample a single realization from a χ 2 distribution with ν = m n degrees of freedom
 9:
     T i create transformation matrix to correct for unknown variances according to (4)
T i = L diag ν m σ 1 c i , , ν m σ n c i
10:
     y i obtain corrected sample from desired PDF by
y i = J i 1 T i ( μ i x ¯ i ve ) + ( x ¯ μ i ) + y 0 ,
where J i 1 denotes the left (pseudo) inverse of J i .
11:
end for
12:
Summarize samples y 1 , , y N to obtain estimate and uncertainty in terms of mean and covariance matrix
y ^ = 1 N i = 1 N y i , U Y = 1 N 1 i = 1 N ( y i y ^ ) ( y i y ^ ) T .
13:
The standard uncertainty of every element of Y is given by the square-root of the diagonal elements of U Y .
With these ingredients, we present the following Monte Carlo sampling Algorithm 2, based only on the evaluation of a virtual experiment, that yields the same state-of-knowledge PDF for the measurand as the JCGM-102 Monte Carlo sampling approach.
Algorithm 2 effectively produces samples from the same distribution as the Monte Carlo sampling approach of JCGM-102 in Algorithm 1 using the measurement model (2). This is because Equation (10) corrects the assumed variances σ 1 2 , , σ n 2 to the t-distribution that accounts for the assumption of an a priori unknown variance of the data distribution, and also implicitly applies the measurement model (2). This means that Algorithm 2 prescribes the employed measurement model. However, for Algorithm 2, we only require evaluations of the virtual experiment and its gradient. In particular, no explicit knowledge about the possible highly non-linear additive term B ( Z ) is required, and realizations of the virtual experiment might be noisy. In case the mean of the virtual experiment (6) and the gradient (7) need to be estimated from samples, the complexity of the Monte Carlo sampling in Algorithm 2 is O ( N N ve ) and the inversion of J i , e.g., using least-squares estimation, can be performed in O ( p 2 n ) . Since N is usually much larger than the dimension of the measurand p and the dimension of the data vector n, the Algorithm 2 has asymptotically the computational complexity O ( N N ve ) . If the variability of the observations and the measurand are of similar magnitude, one can safely consider N = N ve since the convergence of a Monte Carlo estimate depends on the variance of the underlying random variables [29].
A note on generalization beyond the classes of measurement models considered here: the Algorithm 2 developed in Section 3 yields samples of the same PDF as JCGM-102 and Algorithm 1 under the assumption that the virtual experiment and the measurement model follow the structure of (1) and (2), respectively. For more general classes of virtual experiments and measurement models, the approach presented can be seen as a linearization procedure that considers, for every realization of the quantity Z, a local linearization in the measurand Y. The effect of taking a non-linear measurement model and a linearized virtual experiment is analyzed for the coordinate measuring machine in Section 4.2. A suitable alternative approach that may account for these kinds of models is a Bayesian approach, employing a statistical model based on the virtual experiment (1). This, however, is beyond the scope of this work.

4. Examples

In this section, we apply the developed uncertainty evaluation approach based on a virtual experiment (the implementations can be found here: https://gitlab1.ptb.de/marsch02/multivariate-ve (accessed on 17 September 2024)).

4.1. Generic Example Using Polynomial Regression

We first consider a generic example that reflects multivariate observations of a cubic polynomial at n unknown measurement locations. In particular, a virtual experiment is assumed that models these observations as realizations of the following form:
x ve = x 1 ve x n ve = 1 z 1 z 1 2 z 1 3 1 z n z n 2 z n 3 y 1 y 2 y 3 y 4 + ϵ 1 ϵ n ϵ 1 , , ϵ n iid N ( 0 , σ 2 )
with ϵ 1 , , ϵ n being independently and identically normally distributed with standard deviation σ > 0 for the repeated realizations. The quantities, Z 1 , , Z n , corresponding to the values z 1 , , z n , represent measurement locations that are measured with an uncertainty. For the purpose of illustration, we assume n = 10 , and for each Z i , a rectangular distribution centered at the measurement location i and a half-width of 0.1 in arbitrary units is assigned for i = 1 , , n . This interprets every quantity corresponding to a measurement location as a quantity with Type-B information. This is related to the classical formulation of errors-in-variables problems for regression with uncertainty in both variables [30]. However, we assume that the uncertainty of the Z i does not contribute to the variability of repeated measurements and consider that the actual measurement locations are fixed for repeated measurements. For an in-depth analysis of errors-in-variables problems in metrology, cf. e.g., [31].The measurand, denoted by the quantity Y = ( Y 1 , , Y 4 ) and values y = ( y 1 , , y 4 ) , are the polynomial coefficients and are to be determined in the following.
For the available observations of the real experiment x 1 , , x m , we assume that the data in Figure 1 has been observed with m = 12 repetitions for each measurement location independently. The true but unknown polynomial coefficients are y * = [ 0.1 , 0.5 , 0.25 , 0.2 ] , which generate the dotted green line in Figure 1, and the observations are distorted by measurement noise with σ = 0.5 .
The measurement model is assumed to be the solution of an ordinary least-squares fit. Since the measurement model is a relation between quantities, the solution of the linear least-squares can be written as
Y = ( Y 1 Y 4 ) T = arg min Y ˜ A ( Z ) Y ˜ X 2 ,
where A ( Z ) denotes the system matrix in (12), · denotes the Euclidean norm, and X is the quantity that corresponds to the multivariate observations.
In Figure 2, we show in red the resulting marginal distributions when applying the Algorithm 2 using only the virtual experiment (12) and N = 10 7 Monte Carlo samples. For the simulated measurand value y 0 , we took a realization from a multivariate standard normal distribution. Moreover, we plot in dashed blue in the same figure the results of the JCGM-102 Monte Carlo procedure using a multivariate t-distribution corresponding to the observations and subsequent application of the measurement model (13). It can be seen that all marginal PDFs are equivalent. The resulting polynomials that arise when applying the estimated coefficients from both approaches, as given in Table 2, are well aligned. This can also be seen in Figure 1, but, as expected, the two estimated curves are slightly distinct from the true curve underlying the observations, which is due to the noise in the data.

4.2. Coordinate Measuring Machine

A realization of the virtual experiment for the coordinate measuring machine, which yields measurements of L 3 points on a circle with radius r 0 > 0 and position of its center p 0 = ( p 0 x , p 0 y ) R 2 , can be obtained by the following formula:
x l ve = p l T = A l ( s q , s c , x , s c , y ) r 0 p 0 x p 0 y + ϵ l = s c , x s q s c , y 0 s c , y cos ( 2 π ( l 1 ) / L ) 1 0 sin ( 2 π ( l 1 ) / L 0 1 r 0 p 0 x p 0 y + ϵ l ,
with l = 1 , , L denoting the L points with assumed noise ϵ l N ( 0 , σ 2 I ) having specified standard deviation σ > 0 . By s q , we denote an angular offset with respect to 90 degrees between the x-axis and y-axis of the coordinate measuring machine, and s c , x and s c , y are scaling factors of the corresponding axis. For this example, we have the dimension of the measured quantity X = P = ( P 1 , , P L ) given by n = 2 L and the measurand Y = [ R , P 0 x , P 0 y ] has dimension p = 3 . Since this virtual experiment model fits into the general structure of (1) with B 0 and the matrix A ( s q , s c , x , s c , y ) as given in (14), Algorithm 2 can be applied. For this example, Algorithm 2 assumes that the measurement model corresponds to the application of the least-squares fit
R 0 , P 0 x , P 0 y T = f 1 ( P , S q , S c , x , S c , y ) = arg min R , P x , P y l = 1 L A l ( S q , S c , x , S c , y ) R , P x , P y T X l 2 ,
where · denotes the Euclidean norm, and where we denote the quantities corresponding to the radius, position, squareness and scaling, and the measurements by upper-case letters. This measurement model assumes that the measurement directions are known, i.e., the points p l are not arbitrarily positioned on the circle but positioned according to the design in (14). Then, the developed Monte Carlo Algorithm 2 yields samples from the same PDF as the application of JCGM-102 and Algorithm 1.
For the coordinate measuring machine, another commonly considered measurement model for this application [32] is the fit of a circle using the circle formula R 2 = ( P x P 0 x ) 2 + ( P y P 0 y ) 2 , which can be reformulated in a similar system of equations to (15) using the corrected data points
P ˜ l = s c , x s q s c , y 0 s c , y 1 P l , l = 1 , , L
and solving the least-squares problem
a ˜ b ˜ c ˜ = arg min a , b , c l = 1 L P ˜ 1 x P ˜ 1 y 1 P ˜ L x P ˜ L y 1 a b c ( P ˜ 1 x ) 2 + ( P ˜ 1 y ) 2 ( P ˜ L x ) 2 + ( P ˜ L y ) 2 2 .
yields a vector from which the desired quantities can be derived using
R = 1 2 4 c ˜ + a ˜ 2 + b ˜ 2 , P 0 x = a ˜ 2 , P 0 y = b ˜ 2 .
Note that this procedure is equivalent [33] to the solution of the circle fit problem
R 0 , P 0 x , P 0 y T = f 2 ( P , S q , S c , x , S c , y ) = arg min R , P x , P y l = 1 L R 2 S c , x S q S c , y 0 S c , y 1 P l P x , P y T 2 2 ,
but does not require the use of a non-linear optimization procedure. In the following, we denote the measurement model that yields the quantities (19) by f 2 . It can be seen immediately that f 2 is a non-linear function in the measured quantity X = P . Hence, the application of Algorithm 2 using the virtual experiment (14) will only yield an approximation to the JCGM-102 procedure using the measurement model f 2 .
For this experiment, we consider a circle with radius of 51 mm centered at ( 0.0015 , 0.00048 ) mm. Then, we generate m = 55 measurements of L = 25 equidistant points on the circle boundary, which are disturbed by a squareness effect between the x- and y-axis of 0.0001 degree and we scale the x-axis by a factor of 0.99 and the y-axis by a factor of 1.01 . Additionally, independent homoscedastic Gaussian noise with standard deviation σ = 0.005 mm is added to each measurement. From these measurements, the resulting state-of-knowledge PDFs for the measurand, consisting of the radius and position of the circle, can be estimated using the described algorithms, and the resulting marginal PDFs are given in Figure 3. For the Monte Carlo computations, we use N = 10 5 samples, and it can be seen that the results of the virtual experiment approach of Algorithm 2, denoted by VEMC, yield the same marginal PDFs as the JCGM-102 approach using the equivalent, linear measurement model f 1 . For the alternative measurement model f 2 , the resulting PDFs deviate, both in the position of the mode and the spread of the PDFs.
For a quantitative assessment, we also include the mean estimate, the standard uncertainty, and a 95% coverage interval of the two equivalent approaches in Table 3 and of the JCGM-102 approach using the alternative measurement model in Table 4. For the approaches corresponding to the measurement model f 1 from (15), both Monte Carlo sampling approaches yield the same estimates, standard uncertainties, and coverage intervals. However, for the JCGM-102 approach using the measurement model f 2 from (19), the results differ.

5. Conclusions

With this work, we aimed to draw attention to the question of whether an uncertainty evaluation aided by a virtual experiment can be compliant with standards in metrology. For this, we developed a practical relevant approach for an uncertainty evaluation procedure using only realizations of a virtual experiment that yields a PDF that is equivalent to one of these guidelines, the JCGM-102 Monte Carlo approach. In particular, we derived a suitable algorithm that accounts for the a priori unknown variance in the distribution of the observed data, noisy realizations of a virtual experiment, and the sampling procedure is applicable for multivariate data and measurand quantities. We applied this procedure to an example derived from a coordinate measuring machine and have shown that, while the choice of the measurement model matters, equivalent results of a JCGM-102 uncertainty evaluation and the proposed algorithm can be achieved.
With the algorithm derived in this work, an uncertainty evaluation can be performed that is equivalent to a JCGM-102 Monte Carlo sampling procedure. However, we do not require explicit knowledge of the measurement model. This is particularly important when the virtual experiment is highly complex and involves numerical computations that are not easily invertible to infer a measurement model from a virtual experiment.

Author Contributions

Conceptualization, M.M., F.H., G.W., G.K., M.v.D. and C.E.; Data curation, M.M.; Formal analysis, M.M., F.H., G.K. and C.E.; Investigation, M.M. and C.E.; Methodology, M.M., F.H., G.W., G.K., M.v.D. and C.E.; Resources, M.M.; Software, M.M. and M.v.D.; Supervision, C.E.; Validation, M.M.; Visualization, M.M.; Writing—original draft, M.M. and F.H.; Writing—review and editing, M.M., F.H., G.W., G.K., M.v.D. and C.E. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by European Partnership on Metrology, co-financed from the European Union’s Horizon Europe Research and Innovation Programme and by the Participating States, grant number 22DIT01 ViDiT.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data have been generated for this manuscript. The implementations can be found here: https://gitlab1.ptb.de/marsch02/multivariate-ve (accessed on 17 September 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jing, X.; Wang, C.; Pu, G.; Xu, B.; Zhu, S.; Dong, S. Evaluation of measurement uncertainties of virtual instruments. Int. J. Adv. Manuf. Technol. 2006, 27, 1202–1210. [Google Scholar] [CrossRef]
  2. ISO-30173:2023; Digital Twin—Concepts and Terminology. International Standard; International Organization for Standardization: Geneva, Switzerland, 2023.
  3. Wright, L.; Davidson, S. Digital twins for metrology; metrology for digital twins. Meas. Sci. Technol. 2024, 35, 051001. [Google Scholar] [CrossRef]
  4. Irikura, K.K.; Johnson, R.D., III; Kacker, R.N. Uncertainty associated with virtual measurements from computational quantum chemistry models. Metrologia 2004, 41, 369. [Google Scholar] [CrossRef]
  5. Trenk, M.; Franke, M.; Schwenke, H. The “Virtual CMM” a software tool for uncertainty evaluation–practical application in an accredited calibration lab. Proc. ASPE Uncertain. Anal. Meas. Des. 2004, 9, 68–75. [Google Scholar]
  6. Liu, G.; Xu, Q.; Gao, F.; Guan, Q.; Fang, Q. Analysis of key technologies for virtual instruments metrology. In Fourth International Symposium on Precision Mechanical Measurements; SPIE: Bellingham, WA, USA, 2008; Volume 7130, pp. 1216–1221. [Google Scholar]
  7. Heiβelmann, D.; Franke, M.; Rost, K.; Wendt, K.; Kistner, T.; Schwehn, C. Determination of measurement uncertainty by Monte Carlo simulation. In Advanced Mathematical and Computational Tools in Metrology and Testing XI; World Scientific: Singapore, 2019; pp. 192–202. [Google Scholar]
  8. Straka, M.; Weissenbrunner, A.; Koglin, C.; Höhne, C.; Schmelter, S. Simulation uncertainty for a virtual ultrasonic flow meter. Metrology 2022, 2, 335–359. [Google Scholar] [CrossRef]
  9. Sun, H.; Yang, M.; Wang, H. A virtual experiment for measuring system resilience: A case of chemical process systems. Reliab. Eng. Syst. Saf. 2022, 228, 108829. [Google Scholar] [CrossRef]
  10. Balzani, D.; Brands, D.; Schröder, J.; Carstensen, C. Sensitivity analysis of statistical measures for the reconstruction of microstructures based on the minimization of generalized least-square functionals. Tech. Mech.-Eur. J. Eng. Mech. 2010, 30, 297–315. [Google Scholar]
  11. Wübbeler, G.; Marschall, M.; Kniel, K.; Heißelmann, D.; Härtig, F.; Elster, C. GUM-compliant uncertainty evaluation using virtual experiments. Metrology 2022, 2, 114–127. [Google Scholar] [CrossRef]
  12. Kok, G.; van Dijk, M.; Wübbeler, G.; Elster, C. Virtual experiments for the assessment of data analysis and uncertainty quantification methods in scatterometry. Metrologia 2023, 60, 044001. [Google Scholar] [CrossRef]
  13. Kok, G.; Wübbeler, G.; Elster, C. Impact of imperfect artefacts and the modus operandi on uncertainty quantification using virtual instruments. Metrology 2022, 2, 311–319. [Google Scholar] [CrossRef]
  14. Hughes, F.; Marschall, M.; Wübbeler, G.; Kok, G.; van Dijk, M.; Elster, C. JCGM 101-compliant uncertainty evaluation using virtual experiments. arXiv 2024, arXiv:2404.10530. In press for XXIV IMEKO World Congress. [Google Scholar]
  15. Lira, I.; Wöger, W. Comparison between the conventional and Bayesian approaches to evaluate measurement data. Metrologia 2006, 43, S249. [Google Scholar] [CrossRef]
  16. Watzenig, D.; Fox, C. A review of statistical modelling and inference for electrical capacitance tomography. Meas. Sci. Technol. 2009, 20, 052002. [Google Scholar] [CrossRef]
  17. Higdon, D.; Gattiker, J.; Williams, B.; Rightley, M. Computer model calibration using high-dimensional output. J. Am. Stat. Assoc. 2008, 103, 570–583. [Google Scholar] [CrossRef]
  18. Heidenreich, S.; Gross, H.; Bar, M. Bayesian approach to the statistical inverse problem of scatterometry: Comparison of three surrogate models. Int. J. Uncertain. Quantif. 2015, 5, 511–526. [Google Scholar] [CrossRef]
  19. Hammerschmidt, M.; Weiser, M.; Santiago, X.G.; Zschiedrich, L.; Bodermann, B.; Burger, S. Quantifying parameter uncertainties in optical scatterometry using Bayesian inversion. In Modeling Aspects in Optical Metrology VI; SPIE: Bellingham, WA, USA, 2017; Volume 10330, pp. 8–17. [Google Scholar]
  20. Kennedy, M.C.; O’Hagan, A. Bayesian calibration of computer models. J. R. Stat. Soc. Ser. B (Stat. Methodol.) 2001, 63, 425–464. [Google Scholar] [CrossRef]
  21. Gadd, C.; Xing, W.; Nezhad, M.M.; Shah, A.A. A surrogate modelling approach based on nonlinear dimension reduction for uncertainty quantification in groundwater flow models. Transp. Porous Media 2019, 126, 39–77. [Google Scholar] [CrossRef] [PubMed]
  22. Chatterjee, A. An introduction to the proper orthogonal decomposition. Curr. Sci. 2000, 78, 808–817. [Google Scholar]
  23. Schwab, C.; Todor, R.A. Karhunen–Loève approximation of random fields by generalized fast multipole methods. J. Comput. Phys. 2006, 217, 100–122. [Google Scholar] [CrossRef]
  24. Oseledets, I.V. Tensor-train decomposition. SIAM J. Sci. Comput. 2011, 33, 2295–2317. [Google Scholar] [CrossRef]
  25. Balsamo, A.; Di Ciommo, M.; Mugno, R.; Rebaglia, B.; Ricci, E.; Grella, R. Evaluation of CMM uncertainty through Monte Carlo simulations. CIRP Ann. 1999, 48, 425–428. [Google Scholar] [CrossRef]
  26. BIPM; IEC; IFCC; ILAC; ISO; IUPAC; IUPAP; OIML. Evaluation of Measurement Data—Supplement 1 to the “Guide to the Expression of Uncertainty in Measurement”—Propagation of Distributions Using a Monte Carlo Method; JCGM 101:2008; Joint Committee for Guides in Metrology: Sèvres, France, 2008. [Google Scholar]
  27. BIPM; IEC; IFCC; ILAC; ISO; IUPAC; IUPAP; OIML. Evaluation of Measurement Data—Supplement 2 to the “Guide to the Expression of Uncertainty in Measurement”—Extension to Any Number of Output Quantities; JCGM 102:2011; Joint Committee for Guides in Metrology: Sèvres, France, 2011. [Google Scholar]
  28. Kotz, S.; Nadarajah, S. Multivariate t-Distributions and Their Applications; Cambridge University Press: Cambridge, UK, 2004. [Google Scholar]
  29. Robert, C.P.; Casella, G.; Casella, G. Monte Carlo Statistical Methods; Springer: New York, NY, USA, 1999; Volume 2. [Google Scholar]
  30. Fuller, W.A. Measurement Error Models; John Wiley & Sons: Toronto, ON, Canada, 2009. [Google Scholar]
  31. Lira, I.; Grientschnig, D. Error-in-variables models in calibration. Metrologia 2017, 54, S133. [Google Scholar] [CrossRef]
  32. Marcel van Dijk, G.K. Comparison of uncertainty evaluation methods for virtual experiments with an application to a virtual CMM. In Proceedings of the XXIV IMEKO World Congress, Hamburg, Germany, 26–29 August 2024. [Google Scholar]
  33. Coope, I.D. Circle fitting by linear and nonlinear least squares. J. Optim. Theory Appl. 1993, 76, 381–388. [Google Scholar] [CrossRef]
Figure 1. Experimental setting for the generic polynomial regression example of Section 4.1. The dotted green line indicates the unknown polynomial, from which noisy observations (black crosses) can be conducted at the nominal measurement locations { 1 , , 10 } . The resulting (mean) estimates of the virtual experiment approach (solid red line) and the JCGM-102 Monte Carlo approach (dashed blue line) are shown.
Figure 1. Experimental setting for the generic polynomial regression example of Section 4.1. The dotted green line indicates the unknown polynomial, from which noisy observations (black crosses) can be conducted at the nominal measurement locations { 1 , , 10 } . The resulting (mean) estimates of the virtual experiment approach (solid red line) and the JCGM-102 Monte Carlo approach (dashed blue line) are shown.
Metrology 04 00033 g001
Figure 2. Marginal densities of the measurand, i.e., polynomial coefficients, of the generic polynomial regression example are shown. The solid red line represents the result of the application of Algorithm 2 using only the virtual experiment and its gradient. The dashed blue line is the result of the JCGM-102 Monte Carlo approach and Algorithm 1 using the corresponding measurement model (13).
Figure 2. Marginal densities of the measurand, i.e., polynomial coefficients, of the generic polynomial regression example are shown. The solid red line represents the result of the application of Algorithm 2 using only the virtual experiment and its gradient. The dashed blue line is the result of the JCGM-102 Monte Carlo approach and Algorithm 1 using the corresponding measurement model (13).
Metrology 04 00033 g002
Figure 3. Marginal densities of the measurand, in terms of circle radius and position, of the coordinate measuring machine example are shown. The solid red line represents the result of applying Algorithm 2 using only the virtual experiment and its gradient. The dashed blue line is the result of the JCGM-102 Monte Carlo approach and Algorithm 1 using the corresponding measurement model (15), and the dotted green line corresponds to the JCGM-102 Monte Carlo approach and Algorithm 1 applied to the alternative measurement model (19).
Figure 3. Marginal densities of the measurand, in terms of circle radius and position, of the coordinate measuring machine example are shown. The solid red line represents the result of applying Algorithm 2 using only the virtual experiment and its gradient. The dashed blue line is the result of the JCGM-102 Monte Carlo approach and Algorithm 1 using the corresponding measurement model (15), and the dotted green line corresponds to the JCGM-102 Monte Carlo approach and Algorithm 1 applied to the alternative measurement model (19).
Metrology 04 00033 g003
Table 1. Overview of symbols, quantities, and parameters used in this work.
Table 1. Overview of symbols, quantities, and parameters used in this work.
SymbolDescriptionComment
Y = ( Y 1 , , Y p ) Quantity for the measurand having p 1 elements.Quantity of interest for which an estimate and associated uncertainty is to be derived.
ZParameter for which Type-B information is available in terms of a state-of-knowledge PDF π ( z ) .Possibly multivariate and its value is considered to be unknown but fixed in the real experiment.
x = ( x 1 , , x m ) ,
x i = ( x i 1 , , x i n )
Observations in the real experiment. We assume m 1 independent observations, each of dimension n 1 .To circumvent ill-posedness, we assume m > p and to ensure the existence of the JCGM-102 input PDF, also m > n .
ϵ = ( ϵ 1 , , ϵ n ) Statistical error term. Here, we consider only the additive case.Realizations of a normal distribution N ( 0 , Σ ) might not be known to the user of the virtual experiment.
Σ = σ 1 2 σ n 2 Covariance used in virtual experiment to model statistical variability in repeated measurements.Variances σ 1 2 , , σ n 2 are known to the user of the virtual experiment.
Table 2. For the generic polynomial fit example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the two approaches.
Table 2. For the generic polynomial fit example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the two approaches.
QuantityMeanStd. unc.CI (95%)
Virtual Experiment approach
Y 1 0.240.462[−0.67, 1.15]
Y 2 −0.550.303[−1.14, 0.05]
Y 3 0.240.061[0.12, 0.36]
Y 4 −0.020.004[−0.03, −0.01]
JCGM-102 Monte Carlo approach
Y 1 0.240.462[−0.67, 1.15]
Y 2 −0.550.303[−1.14, 0.05]
Y 3 0.240.061[0.12, 0.36]
Y 4 −0.020.004[−0.03, −0.01]
Table 3. For the coordinate measuring machine example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the two approaches using the measurement model (15). All values are given in mm.
Table 3. For the coordinate measuring machine example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the two approaches using the measurement model (15). All values are given in mm.
QuantityMeanStd. Unc.CI (95%)
Virtual Experiment approach
R51.00000.0042[50.9920, 51.0080]
P 0 x 0.00160.0005[0.0007, 0.0026]
P 0 y −0.00050.0006[−0.0017, 0.0006]
JCGM-102 Monte Carlo approach using (15)
R51.00000.0042[50.9920, 51.0080]
P 0 x 0.00160.0005[0.0007, 0.0025]
P 0 y −0.00050.0006[−0.0017, 0.0006]
Table 4. For the coordinate measuring example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the JCGM-102 Monte Carlo approach using the measurement model (19). All values are given in mm.
Table 4. For the coordinate measuring example, the resulting estimates in terms of the mean, the standard uncertainty, i.e., standard deviation, and a shortest 95% coverage interval of the marginal distributions are shown for the JCGM-102 Monte Carlo approach using the measurement model (19). All values are given in mm.
QuantityMeanStd. Unc.CI (95%)
JCGM-102 Monte Carlo approach using (19)
R51.00130.0042[50.9933, 51.0093]
P 0 x 0.00160.0007[0.0001, 0.0030]
P 0 y −0.00050.0009[−0.0023, 0.0013]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Marschall, M.; Hughes, F.; Wübbeler, G.; Kok, G.; van Dijk, M.; Elster, C. Using a Multivariate Virtual Experiment for Uncertainty Evaluation with Unknown Variance. Metrology 2024, 4, 534-546. https://doi.org/10.3390/metrology4040033

AMA Style

Marschall M, Hughes F, Wübbeler G, Kok G, van Dijk M, Elster C. Using a Multivariate Virtual Experiment for Uncertainty Evaluation with Unknown Variance. Metrology. 2024; 4(4):534-546. https://doi.org/10.3390/metrology4040033

Chicago/Turabian Style

Marschall, Manuel, Finn Hughes, Gerd Wübbeler, Gertjan Kok, Marcel van Dijk, and Clemens Elster. 2024. "Using a Multivariate Virtual Experiment for Uncertainty Evaluation with Unknown Variance" Metrology 4, no. 4: 534-546. https://doi.org/10.3390/metrology4040033

APA Style

Marschall, M., Hughes, F., Wübbeler, G., Kok, G., van Dijk, M., & Elster, C. (2024). Using a Multivariate Virtual Experiment for Uncertainty Evaluation with Unknown Variance. Metrology, 4(4), 534-546. https://doi.org/10.3390/metrology4040033

Article Metrics

Back to TopTop