1. Introduction
In this paper, we discuss the numerical aspects of methods for multilateration and the calculation of the volumetric errors of a machine tool (MT). More precisely, we compare two optimisation methods in several modifications regarding their accuracy and stability. We claim that some authors are using mathematical methods improperly, meaning that their method is sensitive to the input dataset and, therefore, unsuitable for statistical refinement, see [
1,
2]. In general, for multilateration problems, various numerical methods may be used, see [
3] for an overview with the description of advantages and disadvantages. In our paper, we consider two particular methods and compare them. We compare the standard optimisation by the trust region method with two different cost functions and an extremal principle solution. Although the methods are known, we specify the better version with respect to the given dataset, more precisely with respect to the condition number of the appropriate system matrix. We stress that the choice of a correct numerical method is vital because the results of the multilateration problem are used for volumetric error calculation, determining the volumetric accuracy model and, consequently, the geometric error calculation [
4]. We are aware that the proportion of quasi-static errors in three-axis machine tools is 60–70% of the total working accuracy. In [
5,
6], the authors have extended this estimate further in tests carried out on five-axis machining centres, where they claim that the proportion of quasi-static errors is even higher, up to 80%. Quasi-static errors are defined as errors in the relative position of the tool centre point and the workpiece, with the errors changing slowly over time. These errors are directly related to the structure of the machine tool itself and can be broken down into geometric, kinematic and thermal errors.
For the measurement itself, we use the LaserTRACER [
7,
8,
9,
10,
11], but the data may be obtained by other tools such as the Ballbar-type apparatus [
12], laser tracker [
13,
14] or laser interferometer [
15,
16,
17]. We also describe the way of obtaining an appropriate kinematic chain because various versions for MTs are known, see, e.g., [
16,
18,
19,
20,
21].
The paper is structured as follows. First, we present a verification of the MT kinematic chain in
Section 2. Consequently, in
Section 3.1, we consider two optimisation approaches to multilateration and volumetric error calculation. In the first approach, referred to as Case A, we compare two different cost functions for the trust region method and discuss their numerical properties. The second approach, Case B, uses a Lagrange multipliers optimisation method. Once all the methods are applied to the data measured by the LaserTRACER, they are verified and compared with the results obtained from the Trac-Cal software. This is a software tool widely used by producers of MTs and CMMs (coordinate measuring machines) for geometric error compensations and, thus, we consider it a good benchmark for comparisons. When appropriate numerical methods are applied, faster computation of geometric errors may be achieved and the uncertainty of the whole measuring system may drop. Therefore, the software for error compensations of CNC machine tools may be improved. The influence of such software compensations on the resulting shape accuracy is described in [
22,
23,
24]. Finally, in
Section 4, we give our recommendations for the methods studied.
2. Three-Axis Machine Verification
We use the demonstrator MCV 754 QUICK (
Figure 1 left) for the measurement in order to validate and verify our results. The working space (WS) of the demonstrator is defined by travels of the individual axes with the rank of
mm, see
Figure 1, right. The machine specifications are given in
Table 1.
In
Table 2, we provide the fundamental technical specification of the LaserTRACER measurement system. Note that measurement uncertainty is one of the crucial parameters that is affected by a bundle of factors, among others by the calculation of deviations.
Figure 2 shows the error vector map of the MCV working space. The maximal deviation within the measured area is 64 µm. The magnitude of the errors is tripled in order to visualise the error vector better. The multilateration-based calculation affects the resulting magnitude and direction of the error vectors. These are consequently imported to the CNC milling machine as error corrections.
Note that the Cartesian coordinate system
is assigned to the WS in the kinematic chain WXYZT (workpiece tool, W—workpiece, T—tool). In order to recall the notation for geometric errors used in the kinematic chain, we refer to
Table 3 and
Table 4. Each translational axis has six geometrical deviations. According to ISO 230-1 [
25], the deviations of the
X-axis are designated as EXX, EYX, EZX, EAX, EBX and ECX. Note also that the squareness deviations between two axes are mentioned, e.g., between
X and
Y—C0Y. This makes a total of
errors for the translational axes and three squareness errors of the appropriate axis pairs.
The measured data were obtained on the test demonstrator with the “tracking laser interferometer” (LaserTRACER),
Figure 3.
If we denote
a vector of nominal coordinates,
a vector of actual coordinates and
the probe offset coordinates, their relation may be expressed by the kinematic chain
where
are modified rotational matrices and
are translational vectors in the form
where we use the notation from
Table 3 for the geometric errors and
is an auxiliary variable such that
, also known as a dual number unit, see [
26,
27].
Therefore, the volumetric error
can be calculated from (
1) as
after neglecting the terms with
. Note that we chose the notation of [
26,
27] with dual number unit
to neglect the terms with
algebraically, i.e., directly in the computation.
The correctness of this kinematic chain has been verified on the Trac-Cal data. Indeed, we substitute the rotational and translational errors from Trac-Cal to the kinematic chain (
1) and calculate the volumetric errors. Consequently, we consider the error evolution in the directions of the axes (red data in
Figure 4) and no evolution (green data in
Figure 4). By error evolution, we understand that, for instance, if we move on the
y-axis, the
calculation is affected by the change in the
y coordinates, i.e., to the kinematic chains (
2)–(
4) we, respectively, substitute zeros for
x and
and for
y we substitute the position on the
y axis, while in the case with no evolution we also set
. Thus, squareness and rotational errors only are added to
. In this sense, when calculating
on the
x-axis, the remaining coordinates are 0 and, therefore, the terms containing
y and
z vanish in the kinematic chain (
2)–(
4). We compare these errors to the Trac-Cal volumetric errors (blue isolated points in
Figure 4). We conclude that it is necessary to take into account the evolution of the error with respect to the shift in the direction of the axis. Otherwise, the deviation is unacceptable.
3. Numerical Methods for Multilateration
The general principle of multilateration lies in determining a point’s precise position from multiple distance measurements. As a measuring device, we use LaserTRACER (LT). Given the distances between the ideal (also referred to as nominal) positions and the LaserTRACER positions, we calculate the actual (inaccurate) positions of the tool. The accuracy of the location also depends on the number of LTs and their location [
28]. We use four or six LTs. As the first step, we determine the exact positions of LTs and, consequently, we measure the actual positions.
3.1. LTs’ Positions Calculation
Now, we calculate the LaserTRACERs’ positions. Let us denote the nominal positions as for , where N is the number of the measured points and with , the LaserTRACER positions, where stands for the number of LTs. The relative distance between the LaserTRACER position and the measured points can be expressed in two ways:
- 1.
In the form of the following system of non-linear equations
where
,
is the residual error of the
k-th LT and
is the measured distance between
and the nominal positions
,
.
- 2.
If particular non-linear equations of (
5) are squared, we receive a system
Consequently, the positions of a particular
are determined from system (
5) or (
6), respectively, by the least square minimisation. Yet, even this optimisation technique may be treated in various ways. In the sequel, we discuss the numerical properties and the optimisation methods applied to both systems (
5) and (
6).
3.1.1. Case A
In this case, we transform system (
5) into a non-linear function of four unknowns
and apply minimisation by the trust-region method with respect to particular positions
with
and
(in the sense of the least squares). Indeed, we are searching for
where
is a Euclidean norm. The positions calculated by this method are consequently compared with those acquired from the Trac-Cal software and the results are summarised in
Table 5 and
Table 6.
Clearly, the difference between the computed values and the reference values is negligible for this numerical model. To justify this conclusion, let us define that the difference is considered tolerable if it falls into the statistical deviation interval of the Trac-Cal data, which is 5% for our measurements. Therefore, our deviations are negligible.
If the same approach is used for the non-linear system (
6), we apply the trust-region method, i.e., we are searching for a minimum (in the sense of the least square method)
of a non-linear function of four unknowns
The calculated positions of LTs are again compared with the reference data acquired from the Trac-Cal software and displayed in
Table 7.
Even though the deviation may still be acceptable, clearly the results are worse than in the first case. Let us note that this may be partially caused even by the computer representation of decimal numbers. Indeed, for a large number, more digits after the decimal points may be neglected in the representation. Clearly, function (
8) reaches higher values by definition. This effect may be avoided by a change in the data type but this may increase the computational time enormously.
3.1.2. Case B
In the second case, see e.g., ref. [
1], the non-linear system (
6) is rewritten into the following form
where
and we are searching for a minimum (in the sense of the least squares) of a function
According to the extremal principle, the first-order partial derivative of the objective function should be equal to zero, while the second-order partial derivative should be greater than zero. The first-order partial derivatives are expressed as
It is found that the second-order partial derivative is always positive, and thus the second condition is satisfied. For unknowns
,
, the system of five equations (
10) can be rewritten in the matrix form as
where the
matrix
A is of the form
and the right-hand side vector
b of dimension 5 is
The system matrix A is always regular but if its condition number is calculated, it is clear that A is ill-conditioned. For a system , the matrix A condition number reads how sensitive the system solution x is with respect to a small change of the input data, i.e., how much the solution x deviates when a small numerical change is made in the system matrix A or in the right-hand side vector b.
For a general square regular matrix
A, the condition number
may be determined as
Consequently, if
denotes perturbations in matrix
A and vector
b, respectively, and if for any associated matrix norm it holds that
then [
29], the solution
to the system
approximates the solution
to the system
with an error
Therefore, if the condition number
is greater than 1, then the relative error of the result may be
times greater than the sum of the relative errors of
A and
b. However, the calculation of the inverse matrix is too demanding and, therefore, we use the following assertion:
where
and
are the greatest and the least singular values of
A, respectively. To determine the singular values of
A, we use the following theorem [
30].
Theorem 1. Let denote the i-th row of matrix and denote the j-th column of matrix . The lower bound for the largest singular value isand the upper bound for the smallest singular value is Because in the submatrix formed by the first four rows and columns of the matrix A there are numbers of order in general, while in the last row and column of the matrix A there are numbers of order , Theorem 1 reads that the lower estimate of the condition number is at least , which proves that the matrix A is ill-conditioned. Indeed, the actual value of the condition number is greater by several orders than the lower estimate. Generally, the condition number is considered satisfactory up to 100.
As mentioned before, a system of linear equations with an ill-conditioned system matrix is very difficult to solve numerically because it is very sensitive even to very small changes in the initial data. Given the way of measurement and the method of extracting additional data used for the solution of the given system of equations, it is clear that the positions of LT acquired by the solution of (
11) are much worse than those calculated in the previous two cases. This is well recognizable in
Table 8. Again, the calculated positions and their difference relative to the reference data from Trac-Cal are displayed.
These inaccurate values of the LTs’ positions may be improved as follows. Let us replace the function
with its first-order Taylor polynomial in the neighbourhood of the LT positions denoted as
Therefore, the least square minimisation is now applied to a function
and, similarly to Case B, the following system of three equations (in the form of an augmented matrix for short) is obtained
for the vector of unknowns denoted as
.
Once the evaluated error constants are added to the calculated LT positions from
Table 8, we receive more accurate values but the accuracy of the first case method is not reached. Indeed, see the modified LTs’ positions in
Table 9.
3.2. Volumetric Errors Calculation
Now, when the LTs’ positions are calculated, we can determine the actual positions of the points by the same algorithms as above for the LTs’ positions and the volumetric errors may be evaluated as a difference between the nominal positions and the actual point positions .
First, we apply the same procedure as in Case A, i.e., we minimise a function of three variables
which provided more accurate results for the LTs’ positions calculation. We omit the second less accurate method from Case A. Note that, as before, we used the trust-region least squares method for the minimisation and for
we received all the actual positions of the respective points. A comparison of the calculated volumetric errors and the reference data from the Trac-Cal software for the
x axis is depicted in
Figure 5.
For the variant appropriate to Case B, we apply the least squares method to minimise the function
where
. Again, analogously to Case B, we transform this minimisation problem into the solution of the following system of four equations
where the matrix
A is now of the form
and the corresponding right-hand side vector
b is
Even in this case, the system matrix is ill-conditioned and, thus, the solution depends on the accuracy of the input data. However, the input data were acquired by measuring, which is naturally inaccurate and, moreover, because the number of
or 6, there are fewer measured points than before. The number of the LaserTRACER (LT) positions is either four or six depending on the preliminary measurement strategy which may use the RRB model (reduced rigid body) with four positions or the FRM model (full rigid body) with six positions of LTs. All presented methods may be used for both models. The measurement methodology may be found in [
31]. This leads to a very inaccurate volumetric error vector
. A comparison of the Case B-like approach with the Trac-Cal software data is depicted in
Figure 6. Note that the Trac-Cal data are identical to
Figure 5. We only changed the scaling of the axes. We stress that the acquired error vector is out of any reasonable bounds due to the deviation of up to 0.5 mm. We tested all methods on three different datasets for one particular type of the kinematic chain WXYZT. We provide one of the datasets for illustration.
Let us note that the condition number is not the only parameter affecting the stability and accuracy of the chosen method. For instance, even the position of LT and the location of the calculated point matter, see [
32], where the authors discuss also the situation when any three of the LTs lie on a single line, i.e., they are not in a general position. In our case, the position of the LT is checked to avoid such singular positions.
4. Conclusions
We compared two numerical approaches denoted as Case A and Case B. In Case A, we constitute two systems of Equations (
5) and (
6), and the corresponding optimisation cost functions (
7) and (
8), respectively. We showed that, due to the form of the input data, version (
5) with cost function (
7) is more effective. The reason is in the approximation of the Hessian matrix inside the evaluation of the optimisation problem, where the high numbers in the input data lead to a badly controlled rounding error for cost function (
8). The square root in cost function (
7) lowers the input data and, thus, provides more accurate results. Consequently, we studied Case B, which in fact is an optimisation by the Lagrange multipliers method, but the resulting system matrix of the corresponding linear equations (
11) is ill-conditioned and, thus, leads to inaccurate and non-stable outputs. We showed that the methods for multilateration and volumetric error calculation presented in e.g., refs. [
1,
2] are ill-conditioned and, thus, numerically sensitive to the input data. Therefore, this method is not suitable for statistical accuracy improvement such as the Monte Carlo method and, from the numerical point of view, it cannot be recommended for use. Therefore, for further data processing, we will use the numerical method from Case A. Our intention is to find a substantial improvement to this method itself.