2.1. Error Contribution from the CMM
The most notable error contributors of the CMM are the hardware errors. Therefore, the presented digital twin focuses on the geometric errors. These geometric errors of a CMM are determined by external factors, i.e., temperature, humidity and vibrations, and internal factors, such as rotations, misalignments, straightness of the guideways and scale errors. However, the external factors are indirectly integrated in the model. As a consequence the digital twin is only valid in a temperature controlled environment with a small temperature gradient or drift as a result of internal heating. A. Gąska et al. presented a virtual CMM for the uncertainty estimation of coordinate measurements performed in industrial conditions [
16]. A conventional CMM has three axes of movement and each movement involves six components of deviation: three linear and three angular. The errors on the perpendicularity between the three axes are characterized by three squareness errors. Considering the CMM as a rigid body, the geometric errors can by described with 21 parametric errors [
6,
12].
The kinematic model of the CMM consists of four rigid bodies connected by three prismatic joints, allowing three degrees of freedom for the probe head mounting point (phmp), i.e., translations in the directions of the main axes [
12]. The literature [
12,
19,
20] describes the position of the phmp as (1) and the total angular error of phmp as (2) with respect to the coordinate system of the CMM.
Figure 1 depicts the components of the CMM.
,
and
represent the values read from linear encoder of the scales. The error components for a straight line motion along an axis are represented with
, where
represents the type of kinematic error and
represents the axis. For example, the six kinematic error components along the x axis in function to the position on that axis are:
exx: positioning error of the x axis;
eyx: straightness error motion of the x axis in the y direction;
ezx: straightness error motion of the x axis in the z direction;
eax: roll error motion of the x axis;
ebx: pitch error motion of the x axis due to a rotation around the y axis;
ecx: yawt error motion of the x axis due to a rotation around the z axis.
The kinematic errors can be described by equations similar to (3). The linear and quadratic function represent the linear and quadratic component of the kinematic error, while the harmonics correspond with the higher-order undulations of the kinematic error with
N the maximum number of undulations per length
L of the axis. For example for
exx can be written:
for
and with:
s the coefficient of the linear term;
c the coefficient of the quadratic term;
an the coefficients describing the higher n-th order order undulations of the geometric deviations;
ϕn the phase of the higher order undulations .
In (3), the first two terms are the shifted Legendre polynomials of the first and second degree and the remaining terms are the Fourier coefficients that describe the higher order undulations of the geometrical deviations. It is taken for granted that there is some dependence between the Legendre polynomial coefficients and the Fourier coefficients [
21]; still, this is considered as an appropriate way of expressing the geometrical errors [
12]. In (3), the zero-order (constant) term is omitted as length measurements are always based on differences between points, and the constant term in the pitch, yaw and roll motions representing the squareness is already taken into account by the linear term in the straightness errors.
Disregarding the correlation between
s and
c on one hand, and the
an coefficients on the other hand, the standard deviation of the errors can be approximated by:
For the expressions of the various geometrical errors the following considerations can be made:
exx,
eyy and
ezz represent the scale errors where the linear term will be dominant as this contains the effects of temperature and thermal expansion of the object and the scales. The other terms represent calibration and production errors of the scales and these are usually small. A known periodic error that may occur is due to the interpolation that will have a periodicity of once and/or half the scale pitch, which is typically 20 µm or 8 µm [
22]; this effect is disregarded here. An estimate for the typical errors arising can be made from the temperature range and the uncertainty of the expansion coefficient of the scales and steel objects. The maximum error will be about 2 × 10
−6·
L, where
L is the measured length, which gives
s = 2 × 10
−6 at maximum for
exx,
eyy and
ezz.
eyx, ezx, exy, ezy, exz and eyz represent the straightness errors. The linear term s in these errors represent the squareness errors. The orientation of the coordinate system may be defined by putting s(eyx), s(ezx) and s(ezy) equal to zero, then s(exy), s(ezy) and s(eyz) represent the three squareness errors of the CMM. Their magnitude may be estimated from explicit squareness measurements or from the CMM specifications.
For the nine roll errors it may be stated that they have a zero linear term as the squareness errors are already incorporated in the linear term of the straightness representation, and not all are relevant, depending on the CMM configuration. As the roll errors are caused by straightness deviations of the mechanical guidances, there is a correlation between the straightness and roll. In general this correlation depends on the mechanical construction of the guidances and will be complicated for higher order undulations. Still, for low-order undulations, especially the quadratic term, it can be assumed that the rotary error is the derivative of the straightness: s(ecx) = 6·c(eyx)/L, s(eby) = 6·c(ezx)/L and s(eay) = 6·c(ezy)/L. It is assumed that rotation-errors have no higher-order terms so there is only an s parameter.
The error contribution of the CMM is estimated by assuming the geometrical errors of the CMM ‘as they could be’. With this ‘virtual CMM’ a measurement is taken from which a parameter is calculated; e.g., a measurement of a cylinder is simulated from which the diameter is estimated. This is repeated for CMM having a different error structure by recalculating the geometrical errors ‘as they could also be’ and repeating this same measurement using the newly calculated error structure, giving another cylinder measurement from which another diameter is calculated. Repeating this for many different error structures gives a distribution of cylinder diameter values, from which conclusions can be drawn about the distribution of cylinder diameter values in terms of systematic and random deviations from the nominal cylinder diameter value.
A virtual CMM is constructed by randomizing the geometric errors by putting random factors in (3) as following:
where the random factor
k varies every time it appears in the 18 equations similar to (5) by which a virtual CMM is constructed, according to a beta distribution with the first shape factor 2.8 and the second shape factor 5.2. The beta distribution is shifted by minus 1.25 and multiplied by a random sign (6). These parameters result in a distribution with two peaks around ±1. As a result each individual geometric error is more likely to be represented realistically in the total error contribution, rather than a marginal contribution, which is the case with a normal distribution around 0. To represent each individual geometric error realistically with a normal distribution, the standard deviation has to be chosen so large that the virtual CMM cannot conform to its specifications. The random number
m is taken from a uniform, rectangular distribution between 0 and 1. For every simulation the parameters
s,
c and an are given realistic values; see the considerations above and [
12]. Keeping the
an parameters constant while varying the phase randomly keeps the autocorrelation function of the periodic errors constant which enables a proper uncertainty estimation as was shown in [
23].
The random number
k is taken from a Beta-distribution as following:
The simulated CMM has an MPE (maximum permissible error) of 1.8 μm + 2.5 × 10−6·L. Such a CMM must be simulated in such a way that this limit is kept. This is accomplished by considering this limit as a 95% confidence interval that is approximated by two standard uncertainties. Estimating linear, length-dependent terms s can be accomplished by taking s in exx, eyy, ezz, exy, ezy and eyz equal to 1.25 × 10−6/2√2, considering that the scale linearity and the squareness contribute independently to an equal extent.
For the constant term of 1.8 µm it can be considered that this limit must be kept in three directions (
x,
y and
z). Assuming a standard uncertainty of 1.8 µm/2 and six independent contributions in each direction this is achieved by putting a limit of 0.9 µm/√6 = 0.36 µm to the standard uncertainty imposed by the coefficients
c and
an. (4) is used to estimate realistic values of the parameters c and
an where the total contribution to the standard uncertainty of parameter c on one hand and the parameters an on the other hand is taken equal for the straightness components. The parameters
an are chosen from a normal distribution with mean of 0 and a standard distribution of 1 with
N equal to 15. The random values are scaled so that (7) is valid.
Figure 2 depicts the positional and straightness errors of a potential virtual CMM based on
Table 1 and (5). The parameters are randomly chosen with a maximum of 15 undulations per length.
Figure 3 depicts typical angular errors of the virtual CMM as they appear in this specific single simulation, with the parameters in
Table 2. The total error as a function of the position in the coordinate system of the simulated CMM is depicted in
Figure 4. The size and direction of the error is determined by (5), and due to the random parameter
k different simulations result in different error propagations. From
Figure 2 and
Figure 3 it can be conducted that each individual error is smaller than 3 μm, yet the magnitude of the maximal total error is approximately 5 μm, as displayed in
Figure 4. As an example, a length measurement over the entire Y axis starting in the origin is considered. The error in the origin is negligible. The error on the other end of the Y axis is 3 μm in the negative Y direction. As a result, the length measurement will appear 3 μm shorter than the true value.
In order to validate the virtual CMM, its conformance to ISO 10360-2 is verified. This acceptance test has a statistical nature; as a consequence false rejections and false acceptances are inherent to this method. Recently, a method has been presented to manage the risk involved in the conformance test [
24]. Since the parameters of the virtual CMM are validated based on various tests and thus the statistical nature of the acceptance test is negligible, the conventional ISO 10360-2 is used. This standard has three objectives [
6]. For the first and second objective, it measures the error on a calibrated test length, with and without any probe offset. Therefore, the virtual machine, just like the physical counterpart, must have an error lower than the given MPE. The acceptance test of this standard can be performed on a gauge block, a step gauge or a ball bar. There should be five different lengths measured in the seven different directions of the CMM. The smallest length should be at least 30 mm and the longest length should be 66% of the total measurable length of the orientation. The third objective of ISO 10360-2 is to test the repeatability of a measurement. Therefore, the standard specifies that each measurement is repeated three times [
25].
Figure 5 depicts the simulated results of the acceptance test according to ISO 10360-2 for the virtual CMM with the error map depicted in
Figure 4. Once a virtual CMM is generated based on the 18 geometric errors, no random error is involved in the determination of the positional error as a function of the phmp’s position in the coordinate system. Therefore, the repeatability of the virtual CMM is not tested at this stage; when incorporating the optical probe it will be inherently added. The simulated measurements are performed along the three main axes of the CMM, namely X, Y and Z. The four diagonals are labelled D1, D2, D3 and D4. When all measurements are within the limits of the MPE of the CMM, which is 1.8 μm + 2.5 × 10
−6·
L, the virtual machine passes the acceptance test. The performance indicator
v (8) for the digital twin is calculated in order to validate the chosen parameter in
Table 1 and
Table 2 [
12].
The error on the measured length is
errL and the MPE for the corresponding length is
mpeL. If the performance indicator is less than 1, the virtual CMM fails the acceptance test. A performance indicator larger than 2 represents a virtual CMM that is twice as accurate as the MPE indicates. This means that the parameters used for the simulation are not realistic. For the validation of the parameters of
Table 1 and
Table 2, 250 acceptance tests are performed on different virtual CMMs. The performance indicators are depicted in
Figure 6. 95% of the simulated CMMs pas the acceptance test, proving the feasibility of the parameters of
Table 1 and
Table 2. Based on the performance indicators in
Figure 6, it can be concluded that the simulated CMMs show realistic measurement errors which are not too accurate.
2.3. Probing System: Laser Line Scanner
The probing errors are dependent on the selected measurement system. The selected measurement system is an LLS. The LLS projects a laser line on an object. The laser beam’s reflection on the surface of the measurand is captured by the sensor, i.e., photodetector, of the LLS. Based on triangulation, the scanner determines the point of intersection between the projected laser beam and the surface (
Figure 8).
Digital twins, simulating tactile probing errors, often use a normal distributed random error as a representation of the error contributors [
12]; for optical probes this task is more complex. The error contributors of an optical probing system can be classified in multiple categories [
7,
18,
29,
30,
31,
32]:
Environmental error sources: temperature, humidity, ambient light, dust and vibrations;
Surface properties of the object: colour, reflectivity, surface finishing and translucency;
Measurement strategy: position of probing system relative to the object and object’s position in the CMM;
Hardware of the probing system: accuracy of components and mechanical instabilities;
Data processing: resolution, filtering and algorithms;
Extrinsic factors: operators, surface cleanliness and clamping system.
The variety of error contributors makes it difficult to generate a digital twin of an optical probing system which incorporates all these error contributors. Therefore, some assumptions are considered for the presented digital twin of an optical probing system. First of all, the presented digital twin represents a physical counterpart that operates in a controlled environment, i.e., the environmental error sources are minimized. Secondly, the influence of the hardware of the probing system and extrinsic factors are neglected. Thirdly, the proposed model to simulate the error propagation of an LLS is valid for specified surface characteristics and sensor settings. The model expresses the systematic error and the random error as second degree polynomial, Equations (12) and (13), as a function of the scan depth, in-plane angle and out-of-plane angle. These parameters are depicted in
Figure 9.
with:
Esys: the systematic error;
Erand: the random error;
d: the scan depth;
αin: the in-plane angle;
αout: the out-of-plane angle;
c(1–10,s): the coefficients for the systematic error model;
c(1–10,r): the coefficients for the systematic error model.
The scan depth is the distance between the point on the inspected surface,
P, and the laser source,
LS.
The angle between the incoming laser beam,
, and the normal on the inspected surface,
, can be split up in two components: in-plane angle and out-of-plane angle. The in-plane angle is the component in the field of view. The out-of-plane angle is the component perpendicular to the field of view (
Figure 9). The in-plane angle is expressed by (15) and the out-of-plane angle by (16) [
18]. The scan direction of the LLS is
in these equations.
The coefficients of (12) and (13) are determined by scanning a reference sphere [
18]. The values of each coefficient can be found in
Table 3 and
Table 4, and the settings of the scanner are presented in
Table 5. These coefficients are valid for a stainless surface, such as the reference sphere from which they are obtained and the artefacts which are used for the validation.
Figure 10 and
Figure 11 depict respectively the systematic error and the random error according to (12) and (13).
2.4. Articulating Probe Head
The total measurement error of a point is the summation of the error induced by the CMM, articulating probe and the LLS. In order to calculate the error, the position of the laser source, the movement direction of the LLS and the normal on the surface need to be determined. Since an LLS travels in a straight line from the start position to the end position while scanning, the vector of the movement direction is the difference of the end position and the start position. When performing a virtual measurement with a digital twin, the input of the object is a virtual geometry, such as an STL model or a CAD model. An STL model provides information of the normal on each facet, which can be used to calculate the in-plane angle and out-of-plane angle. For a basic three-dimensional geometrical object, the normal can be calculated without a virtual model. For example, for a sphere, the normal on the surface in a specified point is the vector from the center to the specified point. The position of the laser source can be obtained by (17) [
18]. This equation represents the intersection of the plane containing the laser beams and the scan trajectory with start position,
S.
The axes of joint A and B are located at an offset,
Laph, of the phmp. The position of the laser source has also a fixed offset to the intersection of the axes of joint A and B. The position of the laser source relative to the intersection is given by (17) for joint A and B equal to zero.
Multiplying (18) with the rotation matrix of the articulating probe head, (10), expresses the relative position in function of the joints.
Knowing the position of the laser source, the position of the phmp can be determined by going backwards up the kinematic chain.
The error on the probe head mounting point,
Ephmp, can be calculated, as explained in
Section 2.1, once the coordinates are known. The error,
Eorientation, in a measured point as a result of the angular errors of the CMM, (2), and the angular errors of the joint A and B, (10) and (11), is expressed by (21).
The error introduced by the LLS,
ELLS, can be determined as a function of the scan depth, in-plane angle and out-of-plane angle, as explained in
Section 2.3. This error consists of two components: the random error, (13), and the compensated systematic error, (11). However, it is hard to compensate for the systematic error in its entirety. As a result, a remaining uncertainty on the compensated systematic error is introduced. This uncertainty is represented with the factor δ. For the simulations of the validations this factor is 0.01.
The total error can be expressed by (23):
A point on the surface,
Ptrue, that is measured by the digital twin can be simulated as a measured point,
Pmeas, by making use of (23).