A Model to Determinate the Influence of Probability Density Functions (pdfs) of Input Quantities in Measurements

A method for analysing the effect of different hypotheses about the type of the input quantities distributions of a measurement model is presented here so that the developed algorithms can be simplified. As an example, a model of indirect measurements with optical coordinate measurement machine was employed to evaluate these different hypotheses. As a result of the different experiments, the assumption that the different variables of the model can be modelled as normal distributions is proved.


Introduction
The determination measurement's uncertainty made with coordinates measuring machines (CMMs) is an important line of research in the field of coordinate metrology [1,2].
Although there are different papers [3,4] in which the uncertainty calculation is based on GUM approach [5], this model is impractical for most situations that appear in the field of coordinate metrology, since the GUM approach does not provide a solution to the singularities that arise, for example, ‚ multi-dimensional models based on the coordinates of multiple points; ‚ the impossibility of determining the sensitivity coefficients of some parameters when these are the result of the application of filters, adjustment algorithms, etc.; ‚ the existence of input variables of the model that have non-symmetric distributions; ‚ the nonlinearity of calculation models that force one to consider higher-order terms.Wilhelm et al. [6] conducted a comprehensive analysis of the various models for calculating.
To avoid these problems, different authors have proposed different methods.Wilhelm et al. [6] used a numerical method for calculating uncertainties associated with specific measurement tasks, due to the complexity of the measures.They analysed the concept of "virtual CMM", which materialises a very precise mathematical model of behavior of a CMM.This model simulates data acquisition, measurement strategy, and physical behavior of the CMM.By the later use of the Monte Carlo method, it is possible to determine the measurement uncertainty.Abbe et al. [7] proposed a method for the evaluation of the uncertainty associated with measurements made by a CMM from information obtained after checking the machine using the ISO 10360-2 [8].
The Monte Carlo method [9] is the appropriate solution to estimate the uncertainty associated with measurements obtained with equipment based in coordinate metrology and allows solving problems such as:

‚
arbitrarily complicated models or input quantities of the model present asymmetrical probability density functions (PDF).
According to Supplements 1 and 2 to the GUM [9,10], the steps to be followed to use the Monte Carlo method are as follows:

‚
formulation, in which the following is defined: (1) the output quantities of model (measurand), (2) the input quantities of the model, (3) the measurement model that connects the inputs with the outputs, (4) the assignment of PDF to each input quantity; ‚ the propagation of the PDF assigned to the input quantities using the measurement model, obtaining the PDF of each output quantity; and ‚ a summary determining for each output quantity, from its PDF, their mathematical expectation, standard uncertainty, uncertainty coverage interval, and covariance matrix.
It is possible to find metrological models that provide correlated output quantities with PDF not comparable to any known.When these quantities are used in subsequent calculation measurement models, the propagation of these quantities cannot use the procedures described in Supplements 1 and 2 of the GUM.In these cases, the theory of copulas is often used [11][12][13][14], which develops functions capable of describing dependencies between variables and providing multivariate data that model correlated distributions.The use of the theory of copulas has disadvantages such as high computation times and complexity of the developed algorithms, disadvantages that in an industrial environment are critical parameters.
The aim of this paper is to analyse the effect of various hypotheses about the type of the input quantities distributions of the measurement model so that the developed algorithms can be simplified.A model of indirect measurements with optical CMMs is employed, and three hypotheses effects on the measurement results (distance between graduations on a line scale and its associated uncertainty) are studied:

‚
the use of the theoretical distributions, obtained in the determination of the calibration parameters of the equipment; ‚ the simplification of the known theoretical distributions (t-student, uniform, Weibull, etc.) that better model the behaviour of the theoretical distributions are used; and ‚ the simplification of the theoretical distributions with normal distributions.
For this measurement model, the input quantities studied are the parameters that assure the metrological traceability of the equipment.

Materials and Methods
In this section, a mathematical model is presented to characterize the vision subsystem of the CMM.With a developed calibration procedure [15], it is possible to calculate the uncertainties of the measurements made therewith [16].

Optical Coordinate Measurement Machine Model
The vision subsystem model of the optical coordinate measurement machine used in this paper is the so-called affine camera, in which the optical centre is located at an infinity point [17].This model is used to model systems with telecentric lenses/lens systems [18], allowing for the transformation of the coordinates of a point in space (3D) called "coordinates of the world system" into the coordinates of a point of an image (2D) called "coordinates of the image system digitized".This inverse transformation is represented in the matrix form by: where X 1 hm " px m , y m , 1q T are the coordinates of a point in the world system, and ] are the pixel coordinates of the digitized image system.R 1 is an orthogonal rotation matrix 3 ˆ3, and t is a translation matrix 3 ˆ1.With these two matrixes, the position of the camera with respect to the world system is defined.s characterizes the possibility of the lack of perpendicularity between the axes, x 0 , y 0 represent the image centre coordinates, α x , α y model the camera pixels size along the Xand Y-axes, and δ u 1 , δ v 1 represent the geometric distortion of the coordinates u 1 and v 1 : where ∆u 1 " u 1 ´x0 , ∆v 1 " v 1 ´y0 and k 1 , k 2 , p 1 , p 2 , s 1 , s 2 represent the geometric distortion coefficients.By employing a fixed frequency grid distortion target, it is possible to calibrate the instrument vision subsystem [15] so that the traceability of the measures subsequently made by the equipment is ensured.The results of the calibration of a MITUTOYO equipment, model Ultra-QV350 (measuring range (X ˆY ˆZ): 350 mm ˆ350 mm ˆ150 mm, resolution: 0.01 µm) available in the Centro Español de Metrología (CEM) (Tres Cantos, Spain) are shown below.The distortion target images (dot diameter: 65 µm and step: 125 µm) have been obtained by using diascopic illumination at 20% of its nominal value, with a magnification of 10ˆ, which determines a nominal pixel size of 0.89 µm.The temperature during the measurement time is kept in the range 20 ˘0.2 ˝C.Table 1 shows the results of the simulations performed for a number of replications M = 10 4 (the Monte Carlo method is used for determining the uncertainty associated with the model calibration parameters).
Since the above variables have common input variables, there are correlated [15].Figure 1a,b show, as an example, some of the histograms of the output variables of the calibration model.From his analysis, and from the histograms of the variables not shown, it is possible to find that these variables could be assimilated reasonably well to the following distributions: 3), k 1 , and k 2 ; ‚ normal, variables p 1 , p 2 , s 1 , and s 2 ; and ‚ other types, variables u r and v r .If these distributions are analysed, it is found that 99% of their values could be assimilated reasonably well to a rectangular distribution.
The u r and v r variables have a high concentration of values in a relatively narrow range and very extensive distribution tails.This behaviour is due to the fact that the geometric distortion parameters obtained are practically zero, independently of the value taken by the geometric distortion centre; within limits, the corrections obtained with these parameters are virtually null.
The ur and vr variables have a high concentration of values in a relatively narrow range and very extensive distribution tails.This behaviour is due to the fact that the geometric distortion parameters obtained are practically zero, independently of the value taken by the geometric distortion centre; within limits, the corrections obtained with these parameters are virtually null.

Considerations about the Types of Distributions of the Parameters of the Vision Subsystem
As noted above, the vision subsystem parameters can be assimilated to some of the known types of distributions in a reasonably correct way.In this subsection, the effect that occurred as a result of a measurement (values of the parameter and its uncertainty) when different assumptions about the type of distribution that match the parameters of vision subsystem are made are analysed.To do this, for example, a measurement model that assesses the distance between graduations of a glass line scale and its associated uncertainty using the Monte Carlo method is implemented.The three hypotheses indicated in the introduction are considered.
For Hypotheses 2 and 3, for each vision subsystem parameter, and from the information obtained from its histogram, the mean value, standard deviation, and number of degrees of freedom (t-student distribution) are determined if necessary.

Procedure for Measuring a Glass Line Scale
A NPL (National Physical Laboratory) glass line scale (Figure 2a), with a nominal length of 100 nm and a distance of 0.1 mm between graduations, was used.Its main purpose was to serve as a high accuracy standard for performing calibrations in the industrial area.The graduation width was about 10 μm.The scale contained two parallel horizontal lines, about 50 μm apart (Figure 2a), at the start and the end of the scale, used as an alignment axis.The coefficient of linear expansion of the scale, as indicated by the manufacturer, is: The glass line scale was calibrated by the CEM using a microscope-CCD camera assembly and laser interferometric system.The results up to a nominal position of 0.4 mm were as follows (Table 2).

Considerations about the Types of Distributions of the Parameters of the Vision Subsystem
As noted above, the vision subsystem parameters can be assimilated to some of the known types of distributions in a reasonably correct way.In this subsection, the effect that occurred as a result of a measurement (values of the parameter and its uncertainty) when different assumptions about the type of distribution that match the parameters of vision subsystem are made are analysed.To do this, for example, a measurement model that assesses the distance between graduations of a glass line scale and its associated uncertainty using the Monte Carlo method is implemented.The three hypotheses indicated in the introduction are considered.
For Hypotheses 2 and 3, for each vision subsystem parameter, and from the information obtained from its histogram, the mean value, standard deviation, and number of degrees of freedom (t-student distribution) are determined if necessary.

Procedure for Measuring a Glass Line Scale
A NPL (National Physical Laboratory) glass line scale (Figure 2a), with a nominal length of 100 nm and a distance of 0.1 mm between graduations, was used.Its main purpose was to serve as a high accuracy standard for performing calibrations in the industrial area.The graduation width was about 10 µm.The scale contained two parallel horizontal lines, about 50 µm apart (Figure 2a), at the start and the end of the scale, used as an alignment axis.The coefficient of linear expansion of the scale, as indicated by the manufacturer, is: α " p0.5 ˘0.1q ˆ10 ´6 K ´1.
The glass line scale was calibrated by the CEM using a microscope-CCD camera assembly and laser interferometric system.The results up to a nominal position of 0.4 mm were as follows (Table 2).The measurands are the distances dk between the reference centreline of the zero graduation and the centreline of the k-th graduation.The measurements were made on the section of the scale to fall between the two horizontal lines used as an alignment axis.The field of vision of the Ultra-QV350 equipment for the measurement conditions used above (magnification 10×) was 0.62 mm × 0.47 mm.Therefore, the distances between graduations of the glass line scale are measured up to the nominal position 0.4 mm so that it is possible to compare the results obtained in different positions.
This phase was divided into the following steps:  acquisition of multiple images of the glass line scale.Ten images at intervals of 30 s were captured, with the standard in the same position, and the information obtained from the images was used in the subsequent calculation of uncertainties;  correction and normalization of the luminance of the image [19];  detection of the pixels that formed the edge of the glass line scale graduations (Figure 2b), employing the Canny edge detection method with "global thresholding".Each k-th graduation of the glass line scale, with   0, , t k n, has two edges, called an odd edge and even, the edges of a k-th graduation are characterized by a several number of points ( where x y X are the coordinates in units of length.The components of the matrix 1 K , the terms of geometric distortion (distortion coefficients   The measurands are the distances d k between the reference centreline of the zero graduation and the centreline of the k-th graduation.The measurements were made on the section of the scale to fall between the two horizontal lines used as an alignment axis.The field of vision of the Ultra-QV350 equipment for the measurement conditions used above (magnification 10ˆ) was 0.62 mm ˆ0.47 mm.Therefore, the distances between graduations of the glass line scale are measured up to the nominal position 0.4 mm so that it is possible to compare the results obtained in different positions.
This phase was divided into the following steps: ‚ acquisition of multiple images of the glass line scale.Ten images at intervals of 30 s were captured, with the standard in the same position, and the information obtained from the images was used in the subsequent calculation of uncertainties; ‚ correction and normalization of the luminance of the image [19]; ‚ detection of the pixels that formed the edge of the glass line scale graduations (Figure 2b), employing the Canny edge detection method with "global thresholding".Each k-th graduation of the glass line scale, with k " 0, . . ., n t , has two edges, called an odd edge and even, the edges of a k-th graduation are characterized by a several number of points (p k odd , p k even ), and, for each of the k graduations, the pixels of the odd edge ´uk and the even edge ´uk j , v k j ¯ˇˇp keven j"1 are obtained; ‚ conversion of the previous coordinates (in pixels) of the edge in units of length.The above relationship is determined by the expression: where T are the coordinates in units of length.The components of the matrix K ´1, the terms of geometric distortion (distortion coefficients k 1 , k 2 , p 1 , p 2 , s 1 , s 2 , and the geometric distortion centre u r , v r ), were obtained in the previous calibration of the vision subsystem (Section 2.1).

‚
determination of the distance between graduations.Once the coordinates of the edge pixels have been processed, the distances d k between the zero graduation and the k-th [16] are determined).

Model for Calculating Uncertainties
As can be deduced from the scientific literature, the Monte Carlo method is fit to determine the uncertainty of the previous values d k distances.This method is divided into the following steps that were particularized for our mathematical model: 1. Definition of output variables: the distance d k between the zero gradation and the line k-th graduation.2. Definition of input quantities: determining the d k distances has the following input variables: the light intensity of the pixels I pi, jq of the image of the glass line scale and the results of the calibration of the vision subsystem materialized by K ´1, u r , v r , k 1 , k 2 , s 1 , s 2 , p 1 , p 2 , i.e., the inverse calibration camera matrix, the centre of geometric distortion and geometric distortion coefficients.
If the results are corrected for the effect of temperature, it is necessary to employ the linear expansion coefficient α of the glass line scale and the temperature difference of the glass line scale ∆T with respect to the reference.
3. Assignment of the PDF to the input variables: The uncertainty associated with the light intensity of the pixels is obtained according to the work of De Santo et al. [20].The uncertainty of the variables is determined by the hypothesis considered: ‚ Hypotheses 1 and 2: It can be difficult to generate random data with dependence when they have distributions that are not from a standard multivariate distribution.Indeed, some of the standard multivariate distributions can model only some limited types of dependence.In these cases, copulas are often used [21].These functions can describe dependencies between variables and provide distributions that model correlated multivariate data.Its use allows the construction of bivariate or multivariate distribution by specifying marginal univariate distributions.For this, it is necessary to choose the type of copula so as to allow generating a correlation structure between variables.To simulate multivariate variables in this paper the following steps are followed: Simulation of a multivariate normal with zero mean and covariance matrix unit.Calculation of a multivariate normal with zero mean and covariance matrix U C , which is the covariance matrix of the calibration results of the vision subsystem, Equation : Prior transformation of normal uniforms, whose values are contained in the interval [0, 1].It is possible to obtain the variable c i from the variable using the inverse function In the case of Hypothesis 1, the probability distribution function F pxq is estimated using a kernel density estimation (KDE) [22,23]; in the case of Hypothesis 2, the probability distribution function F pxq is a known, univariate marginal distribution (normal, t-student, . . .).

‚ Hypothesis 3:
The uncertainty of the variables c " `K´1 , u r , v r , k 1 , k 2 , s 1 , s 2 , p 1 , p 2 ˘is calculated from the covariance matrix obtained in the calibration of the vision subsystem.As noted in Section 2.1, these variables are correlated.This hypothesis assumes that the above variables have PDF equivalent to Gaussian distributions.Taking into account the recommendations of Supplement 1 to the GUM, the determination of the PDF of these variables uses the method of multivariate normal distribution [9].Multivariate normal distribution N pc, U C q is assigned to variables c.
4. Propagation: considering that the calculation model is relatively complex, the recommendation of Supplement 1 to the GUM, Section 7.2.3 [9], is taking into account.In response to this recommendation, the model is replicated a number of times equal to 10 4 .5. Summary: the statistics variable mean and standard deviation of the values obtained in the simulations shall be calculated.To calculate the coverage interval, the shortest interval method is used [24].

Results
Once the model for calculating the distances d k and for estimating its associated uncertainties was defined, the measurement of the glass line scale was performed in a position approximately parallel to the X axis of the machine.
The measurement was performed with the optical equipment Ultra-QV350, whose characteristics have already been defined in Section 2.1.The glass line scale images were obtained by using transmitted illumination at 20% of its nominal value with 10ˆmagnification.The glass line scale temperature during measurement remained in the range 20 ˝C ˘0.1 ˝C.Thus, no temperature correction is applied to the distances d k .
Table 3 shows the results obtained by measuring the glass line scale considering the Hypothesis 1. Figure 3a,b show the histograms of the distances d 2 and d 4 .These results obtained by developing the Hypotheses 2 and 3 are shown in Table 4, Figure 4a,b and Table 5, Figure 5a,b, respectively.Analyzing the results of the above tables, it is observed that variations within a single estimate of the measurand d k obtained in the various hypotheses are between 1 nm and 22 nm, values that can be considered negligible considering that the nominal size pixel in the measurement conditions used was 0.98 µm.By performing the same analysis for the standard uncertainty of the distances d k , it was found that it varied between 26 nm and 74 nm.These variations were greater as distance d k increased.When the results of Hypotheses 1 and 3 were compared, it was determined that its variation was between 1 nm and 30 nm.As in the previous case, these variations can be considered negligible.
If the histograms of Figures 3-5 are compared, it is found that there are great similarities between those obtained in Hypotheses 1 and 3, that is, when histograms are equal to the theoretical distributions obtained from the calibration of the vision subsystem and when they are assimilated to normal distributions.Finally, regardless of the hypothesis considered, if the distance d k increases, the histogram for this variable approaches a normal distribution.
the results of Hypotheses 1 and 3 were compared, it was determined that its variation was between 1 nm and 30 nm.As in the previous case, these variations can be considered negligible.
If the histograms of Figures 3-5 are compared, it is found that there are great similarities between those obtained in Hypotheses 1 and 3, that is, when histograms are equal to the theoretical distributions obtained from the calibration of the vision subsystem and when they are assimilated to normal distributions.Finally, regardless of the hypothesis considered, if the distance dk increases, the histogram for this variable approaches a normal distribution.the results of Hypotheses 1 and 3 were compared, it was determined that its variation was between 1 nm and 30 nm.As in the previous case, these variations can be considered negligible.
If the histograms of Figures 3-5 are compared, it is found that there are great similarities between those obtained in Hypotheses 1 and 3, that is, when histograms are equal to the theoretical distributions obtained from the calibration of the vision subsystem and when they are assimilated to normal distributions.Finally, regardless of the hypothesis considered, if the distance dk increases, the histogram for this variable approaches a normal distribution.the results of Hypotheses 1 and 3 were compared, it was determined that its variation was between 1 nm and 30 nm.As in the previous case, these variations can be considered negligible.
If the histograms of Figures 3-5 are compared, it is found that there are great similarities between those obtained in Hypotheses 1 and 3, that is, when histograms are equal to the theoretical distributions obtained from the calibration of the vision subsystem and when they are assimilated to normal distributions.Finally, regardless of the hypothesis considered, if the distance dk increases, the histogram for this variable approaches a normal distribution.

Conclusions
In this paper, a model for evaluating the influence of the PDFs of input quantities on the output quantities of a measurement model when the measurements are obtained with an optical measuring machine is presented.
The Monte Carlo method is employed to evaluate the uncertainty of the output quantities because this method is the appropriate solution in this type of metrological problem.
When the form of the distributions of input quantities is analysed, in some cases, these do not present known distributions.To employ the Monte Carlo method to calculate the uncertainty in that case, the copula method must be used to generate random correlated data.
Three different hypotheses have been established to analyse the effect of the PDF form in the measurement results.In view of the results obtained, variations lower than 22 nm, it is assumed that the input quantities of the model can be simplified and assimilated to normal distributions.
This allows for a simplifying assumption, reduces the computation time of the programs developed for the subsequent calculation of uncertainties, and reduces the complexity of the code used for generating multivariate random variables, among other benefits.This experimental work may be applied to any model that presents correlated input variables.

Figure 2 .
Figure 2. (a) Glass line scale.(b) Edges detected by processing the image of the line scale.
and, for each of the k graduations, the pixels of the odd edge   1 , previous coordinates (in pixels) of the edge in units of length.The above relationship is determined by the expression: , , k k p p s s , and the geometric distortion centre , r r u v ), were obtained in the previous calibration of the vision subsystem (Section 2.1).

Figure 2 .
Figure 2. (a) Glass line scale.(b) Edges detected by processing the image of the line scale.

Table 1 .
Results of the calibration parameters of the optical coordinate measuring machine.

Table 2 .
Calibration data of the glass line scale.

Table 2 .
Calibration data of the glass line scale.

Table 3 .
Measurement results of the glass line scale in horizontal position.Hypothesis 1.

Table 4 .
Measurement results of the glass line scale in horizontal position.Hypothesis 2.

Table 5 .
Measurement results of the glass line scale in horizontal position.Hypothesis 3.