1. Introduction
Workpiece geometric accuracy represents one of the most important parameters describing its quality. It is related not only to machine tool volumetric accuracy and thermal stability, but also to NC program quality, control system capabilities, cutting conditions and machine tool and workpiece stiffness. Volumetric accuracy is responsible for a considerable part of total machining error [
1,
2] and addresses the connection between the volumetric accuracy of the machine tool and the evaluated roundness of the workpiece. An analysis of factors affecting volumetric error is discussed in [
3,
4], and the main factors were identified as follows: kinematic axes errors, thermoelastic machine tool deformation and force loading resulting from the machining and control systems. The resulting workpiece accuracy is affected by the machining conditions, the tool used and its wear and the complexity of workpiece geometry. Thermoelastic machine tool deformation is still a challenging issue. The influence of ambient temperature variation to volumetric accuracy and its compensation is described in [
5], while the influence of internal machine tool thermal load, including an advanced compensation model, is solved in [
6]. Numerical methods are often utilized for calculation of machine tool structural deformation resulting from thermal load. In these methods, the temperature profile is prescribed in few key points (e.g., spindle), and the machine deformation is calculated. The finite element method (FEM) is used for machine tool displacement calculation from four temperature sensors in [
7].
Machine tool accuracy can be measured directly using special equipment or evaluated indirectly based on the workpiece’s real shape. Measuring methods are globally divided into contact and contactless methods. Unique devices for indirect contact measurement are represented by diverse one-, two- and three-dimensional artifacts [
8] and other equipment, e.g., a ball bar for roundness evaluation [
2]. Methods for measuring the rotation axis of five-axis CNC machine tools have been published [
9]. Contactless methods are mainly based on optical measurement. This is where the distance of the target point from a different position is measured and the point position is calculated from a multilateral principle [
10] or is measured using a laser tracker, which is capable of directly measuring a three-dimensional point position. However, measuring the tracker’s rotating axes position is difficult, and the resulting precision is insufficient for precise manufacturing. The volumetric error of the machine tool can be also estimated from manufacturing a specific workpiece. In [
11], test workpieces are specified with technology conditions related to the ISO 230–1 norm for machining centers, where the accuracy of machine tools with three to five interpolated axes is evaluated based on workpiece geometric accuracy.
The measurement and compensation of geometry which is dependent and independent of volumetric errors is resolved in [
12]. The resulting model of volumetric accuracy deals with 41 errors, where the linear and rotational errors were measured with an interferometer and a ball bar, respectively. The resulting volumetric error is calculated for the actual position, utilizing a kinematic machine tool model. The volumetric accuracy model is utilized for the relative error of a tool—the workpiece in [
1], where the kinematic model is derived for geometric and volumetric errors in a vertical machining center. The model is based on a rigid body description and a homogenous kinematic transformation for volumetric error calculation. Volumetric accuracy compensation represents an approach for increasing positioning accuracy, and modern control systems contain software functions for compensation. The errors identified are employed in the form of static compensation tables or complex mathematical models [
6].
High-precision machining often connects with in-process or post-process metrology. Measuring takes place on coordinate measuring machines (CMM), which are located in separated air-conditioned rooms. However, the transportation of a large workpiece is time consuming and challenging. In recent years, on-machine measurements (OMM) [
13], where CMM functionality is replaced by machine tool measurements, although with lower accuracy, have become increasingly important. A detailed description of in-process OMM is given in [
14], where the current state of the art is introduced. To increase OMM accuracy, the machine can be equipped with external position measuring functionality. If real workpiece geometry exceeds the given tolerances, some corrective technique must be used to accept the workpiece. The resulting accuracy after correction depends on the volumetric error distribution, correction data density and the corrective technique utilized. The evaluated workpiece errors are usually integrated in the form of NC code adaptation, where the tool path is corrected within the measured error. The compensation of geometric errors based on NC code modification for three-axis and five-axis machine tools is published in [
15] and [
16], respectively. Suitable equipment can be used for online position compensation. A laser tracker was used in [
17], and the positioning accuracy of a low-cost three-axis machine tool was increased below 35 μm without prior calibration or the measurement of machine errors. OMM with a touch probe is described as an effective metrology in [
18], where the need for probe calibration is mentioned to achieve the required accuracy. In that article, the measurement data are used to adjust the toolpaths using macro programming, which, by parameterizing geometric entities, allows easy implementation of correction data. The inspection of the workpiece on the machine after machining is also described in [
19], where the measurement data are used to compare the position and orientation of the workpiece and its theoretical CAD model. The mirroring method is then used to generate a new toolpath. In [
20], the increase in machining accuracy for a thin-walled workpiece and the associated reduction in the number of rejected parts is investigated. After machining to a near-net shape, the part is measured on a machine and, if necessary, the nominal shape of the part is modified within the prescribed tolerances. Subsequently, based on the actual position of the part and the adjusted nominal shape, the toolpaths are adjusted with the aim of increasing workpiece geometric accuracy. This method does not enhance the volumetric accuracy of the machine, but it does adjust the tool path for a specific workpiece located in a specific machine position. It also supports increasing accuracy based on geometric error compensation [
21], where a kinematic error model for calculating volumetric accuracy is assembled. The increase in accuracy is based on an adjustment of the tool path. This means the nominal trajectory is divided into short linear sections. Based on the error model thus created, these sections are shifted, and a new NC program is generated. This procedure increased the accuracy for a linear and S-spline tool path to 4–8x greater accuracy.
This paper presents a method for increasing workpiece accuracy based on extending the initial machine correction data through ad hoc compensation based on the evaluated deviation from the nominal workpiece shape. The main goal is transformation from the identified deviation in arbitrary points on the workpiece surface to a structured mesh with a computed correction in all three dimensions. Inspiration for the transformation comes from the FEM solution of thermoelastic problems, where data from several independent sensors are used for overall machine deformation calculation. This method assumes geometric error repeatability under identical conditions and is designed for a paired machinetool-workpiece in a given position. Its advantage is based on rapid implementation without the need to change the NC program, which remains unchanged, as well as the machine technology and settings. This method can compensate not only for the machine tool volumetric error, but also for an error caused by workpiece compliance during machining and by NC program and control system errors. On the other hand, not all sources of error can be compensated using this method. These include in particular thermoelastic machine tool deformation.
2. Correction Data Calculation
Calculation of the correction data for the workpiece comes from the difference between the nominal and real workpiece geometries as measured at arbitrarily distributed measuring points. The nominal points define the nominal geometry that is related to the designed shape, while the real points describe the real shape. Selected measuring points are measured on a CMM and are based on the CAD model, while the deviations are evaluated at each measuring point
where
are the components of error vector in the main axes direction. Correction data for every measured point are considered as the negative error vector
Correction data are calculated in the form of a structured three-dimensional mesh, where in each node the correction vector [dx, dy, dz] is defined, see
Figure 1.
The basic task represents the calculation of the correction mesh, where the interpolation of correction values at the nodes compensate the evaluated error vector at the measured points. The correction value at any point in the workspace is calculated by trilinear interpolation [
21] from the correction values at the nodes
The algorithm in the proposed method decomposes deviations to main axes directions, and correction data are calculated for the main axes separately. The solution of the spatial problem is thus transformed from a three-dimensional problem to a 3 × 1-dimensional problem for the main machine tool axes X, Y, Z.
Figure 2 shows a one-dimensional scheme in which real workpiece geometry is measured at five measured points in the Y-axis direction and the compensation data are calculated only in the Y-axis direction. The correction mesh consists of nodes where the compensation value is calculated and the edges connect two adjacent nodes. These edges are not part of the correction data, but are important for calculating node displacements.
The measured point-correction value depends right on the cell where the point is located. For node displacement calculations from a measured point error, it is possible to select a more general procedure where the measured point also affects the further cells. The influence of the further cells may be important for cases with a significantly uneven distribution of measured points, and it acts as a filtering mechanism of the missing measured points.
2.1. Correction Mesh Design
The size of the mesh and the number of nodes in the main axis direction are the basic parameters for calculating the displacement of the nodes. These parameters are user-specified or calculated automatically. In case of an automatic approach, the mesh size is designed to include all measured points, and the number of cells is chosen equal to the number of measured points. A significantly higher number of nodes than measured points is inefficient in terms of the formation of mesh zones, where nodes are not sufficiently affected by the measured points. On the other hand, a significantly lower number of nodes cannot sufficiently ascertain the details of the measured shape.
The proposed method also works with an uneven distribution of measured points. Based on an equidistant distribution of nodes, it smooths zones with lower measured points density and determines the number of cells from the number of measured points, which appears satisfactory. In case of complex shapes or measured point distribution, it may be advantageous to design the mesh manually with full parameter controls.
An uneven distribution of measured points may lead to a situation with more than one measured point in a single cell. This state is not a problem for node displacement calculation because it is solved by an iterative procedure. Considering that each internal node affects eight cells of the mesh, it is not possible to calculate node displacement in each cell separately. The interpolation of displacement from eight nodes of one cell must correspond to the error value of the measured point in this cell. However, at the same time, the correction at each node must correspond to the remaining seven cells and the measured points located there.
The mesh can be designed both with an arbitrary edge length in the X, Y and Z directions and a distinct number of equidistantly distributed nodes in each direction. To create a three-dimensional mesh, the lowest number of nodes in each single direction is two. The proposed method is also applicable to one- and two-dimensional solutions, where the corrections in the second and third dimension have the same values and are only shifted positions of the nodes in the second and third dimension, respectively.
2.2. Equations of Node Displacements
The calculation of node displacements is based on their connection with measured points. The connection is realized with imaginary springs, which connect the measured points with the nodes of the correction mesh. The measured point does not have to be connected only to the nodes of the cell in which it is located, but it can also be connected to the nodes of other cells. The displacement of the nodes is based on the fictitious force balance of the correction mesh, which deviates from the equilibrium state by the evaluated deviations at the measured points.
Figure 3 shows a scheme for calculating the displacement of nodes in one row and direction, where the measured points also connect to nodes in further cells.
The input to the calculation is the initial distribution of nodes (C) and measured points (M) and the evaluated deviation at the measured point (e), and the output is the required displacement of the nodes (d). The product of the spring stiffness and the displacement of measured points produce the imaginary forces acting on the nodes. The imaginary springs connect the adjacent nodes, too, and the resulting force interaction scheme is shown in
Figure 4.
To maintain the force balance according to
Figure 4,
must apply for each node. The following system of equations can be derived for the displacement d
1x, d
2x and d
3x of nodes C1, C2 and C3, respectively:
where
k [N·m
−1] is the stiffness of the springs between nodes of the mesh,
kij [N·m
−1] is the stiffness between the
i-th measured point and the
j-th node and
pij = e
i −
dj is the variation of the distance between the
i-th measured point and j-th node in the direction investigated. The resulting system of equations consists of a three-diagonal matrix, which is effective in calculating the inverse matrix for a system of equations solution. Generally, for N measured points acting on M nodes, the
j-th equation of the system of equations is derived in the form
The key feature of the proposed connection is the constant stiffness of springs connecting the nodes and the variable stiffness of the springs connecting the measured points to nodes:
where
le [m] is the length of the cell edge in the calculated direction and
lij [m] is the distance from the measured point to the connected node in the calculated direction. If the measuring point was identical with the mesh node, the connection stiffness would be infinite. In the proposed algorithm, this case is treated so that the displacement of the node is equal to the evaluated deviation of the measured point. The connection stiffness between the measured point and the given node is not considered.
2.3. Calculation of Node Displacements
For each direction X, Y, Z, the displacement of the correction mesh nodes is solved separately. A set of linear Equation (5) is compiled for the node displacement calculations in the selected direction. The correction in the measured points calculated by interpolation from the nodes is not equal to the evaluated error at the measured points after this calculation. This difference is based on the connection of the measured points and nodes by flexible springs, except in the case when the measured point is identical with any node. By connecting the springs, the nodes always move less than the specified offset of the measured point. To increase accuracy, the proposed method includes an iterative algorithm; see
Figure 5. A correction mesh with a defined dimension and a number of nodes is set up for the selected direction. From the knowledge of the position of the nodes and the measured points, the equation for the displacement of the node points (5) is compiled and calculated. The correction of the measured point is then calculated by interpolation from the calculated displacement. The difference between the evaluated and the required correction is added to the evaluated correction in the following iterative calculation.
The end of the iteration calculation is given by reaching the maximum number of iterations, or by achieving the required accuracy. The iterative calculation can also be terminated by reaching the maximum defined node displacements. If the maximum number of iterations is reached, but the required accuracy is not reached and the calculation no longer converges, it is necessary to adjust the mesh. The reason may be, for example, several measured points with different required corrections in one cell. After the successful calculation of the node displacements, a file with correction data is compiled containing the mesh dimensions, the number of nodes in individual directions and the displacement values at the nodes.
4. Discussion
A numerical simulation verified the proposed method with very good results, where the position deviation of the simulated points was almost suppressed, even if three points were located in one cell of the correction mesh. Using the same points and the same correction mesh within the real Sinumerik 840D sl control system also achieved very promising results. Nevertheless, the reduction in the position deviation was a little weaker. In that case, the correction calculation was run fully under the control system, and it is not possible to comprehend the algorithm. The machining test on a three-axis machining center consisted of training and testing workpieces, where the training workpiece was machined with a maximal geometric deviation of 98 µm. This value is slightly above the expected one, but it corresponds to the actual state of the machine tool and other conditions. Based on the calculated correction mesh, the deviation of 98 µm was reduced to 14 µm, where all parameters and settings remained constant. The only single difference was the length of time needed to perform the evaluation, where measuring on a CMM, calculating the correction mesh and fixturing of the testing workpiece took about 90 min. During this time, the machine tool did not machine and the ambient temperature remained constant. The thermoelastic effects need not be considered; however, no machine temperatures were recorded within the experiment. Based on trace records, the machine tool position repeatability is significantly below 1 µm and the actual feed rate was nearly identical to the set value. The non-uniform results of achieved accuracy might come from various tool-engagement angles, where the different tool radial loading resulted in tool deflection. The largest deflections were always identified in the smallest inner radii, which are just slightly larger than the tool-used radius. Both chatter and vibrations were not registered during machining. The setting of the calculation consists of the area of space discretization, the area of influence of the measured points and the maximum number of iterations. All presented results are considered to be very promising, and machining using a more precise machine tool would probably lead to even better results.
The main advantage of the method represents compensation of all shape-error contributions, i.e., the positioning error of the machine tool, compliance of the machine tool and the workpiece, errors in the control system or NC program, etc. If more identical workpieces are machined, it is only necessary to measure the first one, since the compensation data remain constant for the following workpieces. This assumption takes into account the constant accuracy of the machine and the constant position of the parts in the working space of the machine tool. It neglects the effect of tool wear and does not respect changes in machine tool geometry caused by thermal loads. A great benefit of the proposed method is the increase in machining accuracy without modification of the NC code, since modifying that code is not a trivial task.
The main drawback is the principle of the method itself, where a training workpiece needs to be finished to determine the corrections. If the real shape of the training workpiece is larger than the nominal shape, corrective machining of the training workpiece is possible. On the other hand, if there are zones with shape undercutting below geometric tolerances, the workpiece cannot be corrected anymore. This procedure can be eliminated by semi-finishing when the final shape is machined with sufficient allowance to avoid undercutting. The workpiece would be measured after the semi-finishing, and the compensation data would then be calculated for the final machining.
This method does not generally increase the accuracy of the machine tool, but it only adapts tool trajectory for a given workpiece. Theoretically, machine compensation data in the same position may be different for a different workpiece. The approach presented does not replace the static volumetric compensations of machine tools, but it allows for an increase in the geometric accuracy of the machined workpiece.
Follow-up research will be focused on two areas. The first is an extension of the method for control systems that do not allow directly writing to volumetric correction tables, or have volumetric corrections based only on the kinematic model error principle, where arbitrary compensation within the whole workspace is not feasible. One of the possible solutions is writing the correction values in the form of temperature compensations. The use of an external industrial computer (IPC), such as an EDGE device communicating with the machine control system, is considered. In such a configuration, the correction values will be calculated in the IPC based on the current machine position and sent to the machine control system online. In this solution, the corrections may be affected by the time delay caused by non-real-time communication between the IPC and the control system. The second area of research is in-process on-machine measurement, which would eliminate the transport of the workpiece to the CMM, back to the machine tool and its setting in the working space. Especially for large and heavy workpieces, this type of manipulation is challenging and time consuming. This approach would significantly shorten the entire measurement process. The big challenge is to increase the accuracy of the machine tool in the measuring mode when additional devices are considered to compensate for its inaccuracy. At the same time, it would be advantageous to implement standard metrology software in the machine tool control system in order to provide the same functionality as the CMM.