1 Introduction

The demand for the use of five-axis computer numerical control (CNC) machine tools is increasing in recent years [1, 2]. Compared with conventional three-axis machine tools, there are two rotary axes added in five-axis machine tools, and the movement mode with two more degrees of freedom increases the possibility of processing various curved surfaces [3, 4]. The five-axis machine tools also bring higher efficiency, automation, flexibility, and precision product processing strategy. To improve the accuracy requirements of five-axis machine tools, many manufacturers have turned their research directions to instruments and methods of measuring the rotary axis [5, 6]. Nowadays, the commercially available products commonly used to measure the geometric errors of the rotary axis of the machine tools are R-Test, QC20-W (Ballbar), XR20-W, LaserTRACER, AxiSet Check-Up, SWIVELCHECK, and so on. It is very important to improve the accuracy of the rotary axis. Therefore, this paper focuses on the measurement of the rotary axis of the five-axis machine tools. A touch-trigger probe was used in this paper because it has the advantages of a low cost, a high accuracy, and simple and quick installation, when compared with the commercially available instruments [7, 8].

According to previous researches [9,10,11], the error sources that affect the machining accuracy of machine tools can be divided into three categories: static errors, dynamic errors, and quasi-static errors. Quasi-static errors include thermal errors and geometric errors. According to previous research [12], quasi-static errors accounted for 70% of all error sources. According to the research [13, 14], geometric errors themselves accounted for 30%. The geometric errors are a crucial factor affecting the accuracy of the machine tools. These all prove that solving the geometric errors can greatly improve the processing quality of the machine tools, and modern industries using automated machine tools require high-precision axes [15, 16]. The geometric errors of the rotary axis can be divided into two categories. One is the position independent geometric errors (PIGEs, also called location errors). There are 4 items of PIGEs. Another one is position-dependent geometric errors (PDGEs, also called component errors). There are 6 items of PDGEs. From previous researches [8, 17,18,19], it can be found that these researches only measured the PIGEs of the rotary axis, and other researches mainly analyzed the PDGEs of the rotary axis [20,21,22]. The PIGEs and the PDGEs affect the accuracy of the rotary axis of the machine tools at the same time, so this paper hopes to simultaneously consider the PDGEs and PIGEs. According to the literature [23, 24], angular positioning error is the most important among the 6 PDGEs of the rotary axis. The positioning accuracy of the rotary axis is an important indicator for evaluating the performance of the rotary axis. Therefore, the purpose of this paper is to simultaneously analyze the 4 PIGEs and 2 PDGEs (angular positioning and axial errors) of the rotary axis of the machine tools.

Jeong et al. used a touch-trigger probe to measure all the PIGEs of a four-axis machine tool. The research method used 2 standard calibration spheres and a touch-trigger probe to measure and used the height difference of the two spheres to obtain additional information to calculate the errors [25]. However, since the height of the calibration sphere in the calculation formula is an important piece of information, when the height measurement is inaccurate, it will greatly affect the measurement values of the PIGEs. Chen et al. used a touch-trigger probe with a standard calibration sphere to measure a five-axis machine tool and calculate a total of 8 PIGEs of dual-rotary axes [26]. The operation process is fast and requires only one calibration sphere, so the measurement efficiency is high, and the operation is simple and convenient. However, in its calculation process, the PDGEs of the rotary axis are not considered at the same time. Therefore, when the PDGEs are omitted and only the PIGEs are considered, the error values will be slightly inaccurate.

To process a workpiece online and to measure its geometric information to calculate the geometric errors is another error measurement method. Ibaraki et al. [27], Li et al. [28] and Jiang et al. [29] have all proposed geometric error measurement methods by online machining a special-shaped workpiece on a machine, and the methods can include the impact of the thermal errors during machining the workpiece. However, machining the workpiece will increase many error causes, such as the influence of cutting force, which will decrease the accuracy of the original measurement target. Ibaraki also proposed other geometric shapes such as squares and used touch-trigger probes for geometric error measurement [8]. Ibaraki also proposed using special geometric shapes and rotating the rotary axis in different paths to measure different items of the geometric errors.

From the literature review, it can be found that the geometric error measurement methods mainly needed to use the spindle and the movement of each component to touch the standard part, or the machined workpiece to calculate the geometric errors. The difference between these researches is that the measured geometry and path were different. The purpose and contribution of the paper is to simultaneously analyze the 4 PIGEs and 2 PDGEs (angular positioning and axial errors) of the rotary axis of the machine tools.

2 System structure and measurement principle

2.1 Definition of geometric errors

Geometric errors can be divided into two categories [30, 31]. According to ISO230-1 [32] and ISO230-7 [33], geometric errors are defined as PIGEs and PDGEs. PIGEs are the offset when the assembly is inaccurate. These values are fixed and will not change with the movement of the axis. Due to the manufacturing deviation of components, each axis cannot move to the ideal position when it shifts. The ideal driving position given by the controller is not exactly equal to the actual moving position everywhere. This difference is the PDGEs.

There are two offset errors and two squareness errors in the PIGEs of a rotary axis. It means that the deviation of the ideal axis center and the actual axis center of the rotary axis has 4 degree-of-freedom errors. According to ISO230-7 [33], the PDGEs of the rotary axis are 6 degrees of freedom, which are 2 radial errors, 1 axial error, 2 tilt errors in two oblique directions, and 1 angular positioning error. This paper focuses on the synchronous measurement of the 4 PIGEs of the rotary axis and 2 PDGEs (angular positioning and axial errors) in rotary axis. Table 1 lists all geometric errors of the rotary axis and the red frame marks the focus of this paper.

Table 1 All geometric errors of rotary axis of machine tools

2.2 Measured five-axis machine tool

As shown in Fig. 1, a mill-turn machine tool MT-540 (Yida Precision Machinery Co., Ltd.) was used in this paper. Its configuration belongs to the RTTTR configuration, which can also be called Table/Spindle-tilting Type and is a five-axis machine tool with BC axis. This machine tool can be used in lathe mode or converted to milling mode. Some products need to be processed by lathes and milling process. This kind of machine tool can complete all the processing procedures in one clamping and improve efficiency. Table 2 shows the specifications of the MT-540, and Fig. 2 is a schematic diagram of the position of each axis of the MT-540. The B-axis is also the spindle. For this paper, the touch-trigger probe was locked on the B-axis. The measured C-axis faces the left side of the machine. The main moving range of the spindle is near the C-axis worktable, so the stroke of the linear axes is also around this area. Compared with the general machine tools, the strokes of the X, Y, and Z axes are quite short. The strokes of the X, Y, and Z axes are 660, 200, and 760 mm, respectively. Because the touch-trigger probe is translated via the linear axis, the short strokes cause the limited measurement range. This is an overcome problem in this paper.

Fig. 1
figure 1

Mill-turn machine tool MT-540

Table 2 MT-540 specifications
Fig. 2
figure 2

Schematic diagram of MT-540

2.3 Mounting of proposed measurement system

A Blum TC50 touch-trigger probe was used in this paper. Table 3 shows the specifications of the touch-trigger probe. Since the mill-turn machine tool used in this paper is a specific five-axis machine tool, the touch-trigger probe also needs a tool holder KM63 for connecting to the machine tools, as illustrated in Fig. 3. Due to the need of the measurement method, this paper requires two standard calibration spheres (two tungsten carbide spheres with a diameter of 18.999 mm) for measurement. As shown in Fig. 4, the two calibration spheres are attached to the worktable of the machine tool. However, as mentioned in Sect. 2.2, because the stroke of the linear axis is too small, it can only move around the C-axis table, resulting in the limited measurement range. Using the method shown in Fig. 4 will allow the C-axis to rotate at a severely limited angle. Therefore, the standard calibration spheres cannot be triggered by the probe when rotating a little angle, which affects the measurement process.

Table 3 Specifications of touch-trigger probe Blum TC50
Fig. 3
figure 3

CAD model for connection between touch-trigger probe TC50 and KM63 tool holder

Fig. 4
figure 4

Experimental diagram using two standard calibration spheres

To solve the problem of the measurement range, a specific jig was designed. We considered the moving distance of the probe, locked the calibration spheres on the specific jig (see Fig. 5) and then attached it to the C-axis worktable.

Fig. 5
figure 5

Jig with two calibration spheres

2.4 Measurement objectives and principle

As shown in Table 1, the measurement objectives of this paper are 4 PIGEs and 2 PDGEs (angular positioning and axial errors), analyzed simultaneously, and the red frame is the measurement target.

The measurement method of using the standard calibration spheres mainly needs quite accurate calibration spheres. This diameter of the standard calibration spheres can be used to calculate the values of the mechanical coordinate system of the center of the sphere in the machine tool. Five positions of the calibration sphere are touched to calculate the center coordinates of the sphere, as shown in Fig. 6. As shown in Fig. 7, when the calibration sphere is in the initial position, the C-axis rotates an angle. Due to the geometric errors of the C-axis, the axis of the C-axis is offset, resulting in a difference (dP) between the ideal and the actual coordinates of the calibration sphere. With dP, the mathematical equations can be listed, and the geometric errors can be solved by mathematical methods.

Fig. 6
figure 6

Measurement of center coordinates of the standard calibration sphere

Fig. 7
figure 7

Difference between ideal and actual coordinates of calibration sphere

The method of using the calibration sphere to establish the equations is shown in Fig. 8. As shown, the 0° of the C-axis is the first position, which is the starting measurement point. The gray ball is the point with no error in the first position. The blue circle is the path of the standard calibration sphere when there is no error in the ideal case. When the C-axis rotates, there will be black ball 2 position, black ball 3 position, black ball 4 position, and so on. After the C-axis rotates, there will be geometric errors. The method of establishing the dP equations, as shown in Table 4, will subtract the first ideal position from the second position, subtract the first ideal position from the third position, and subtract the first ideal position from the fourth position. After multiple sets of dP equations are listed, dP is used to analyze the error values.

Fig. 8
figure 8

Schematic diagram for method of establishing equations

Table 4 The method of establishing equations of dP

3 Establishment of geometric error model

3.1 Forward kinematics

The significance of forward kinematics is that after the forward kinematics is continuously multiplied by each matrix of the homogeneous transformation matrix, when the drive values of each axis, namely the servo commands xcmd, ycmd, zcmd are known, the final pose matrix can be calculated by mathematical models. For machine tools, it is the coordinates of the touch-trigger probe relative to the reference coordinate system and the coordinates of the standard calibration spheres relative to the reference coordinate system. On the other hand, inverse kinematics is to push back the servo commands xcmd, ycmd, zcmd of each axis when the pose matrix is known, as shown in Fig. 9.

Fig. 9
figure 9

Illustration of forward and reverse kinematics

The total components of the used machine tool are the C-axis (rotary axis), spindle (touch-trigger probe), B-axis (rotary axis), X-axis, Y-axis, and Z-axis. Our purpose is to find the relationship between the probe and the standard calibration spheres, so two kinematic chains, namely the probe kinematic chain and the calibration sphere kinematic chain, need to be constructed. From Fig. 2, the C-axis is a worktable, which is erected on the left side of the machine tool, and the standard calibration spheres are attracted to the end of the C-axis.

The kinematic chain of the touch-trigger probe: reference coordinate system R → Z → Y → X → B → P (touch-trigger probe). The standard calibration sphere kinematic chain: reference coordinate system R → C → S (standard calibration sphere). These two kinematic chains are used to find the correlation between the probe and the calibration sphere. Since the measurement object of this paper is the C-axis, the rotary B-axis does not rotate in this paper, and the geometric errors of B-axis is not considered here. The construction of forward kinematics first needs to use the homogeneous transformation matrix (HTM) to complete the error model.

When using the HTM to build a geometric error model for a machine tool, a coordinate system of each axis of the machine tool must be created. Figure 10 illustrates the coordinate system of each axis of the mill-turn machine tool, and then each coordinate system is connected into the two kinematic chains through the HTM. The HTM of the coordinate system of the C-axis relative to the reference coordinate system R is \(^{R} T_{C}\), and \({}^{R}T_{C} = T^{co} T^{cs} T^{c(dep)} T^{c}\). Since the C-axis is the measured axis, the analyzed errors need to be put in the matrix. \(T^{co}\) is the offset error matrix in the PIGEs of C-axis, and \(T^{cs}\) is the squareness error matrix in the PIGEs of the C-axis. \(T^{c(dep)}\) means the PDGEs of the C-axis, and \(T^{c}\) is the drive of the C-axis by the controller. θc is the servo command value of the C-axis. Oxc, Oyc, Sxc, and Syc are the 4 PIGEs of the C-axis. Cz(dep) and C(pos) are the axial error and angular positioning errors, respectively, in the PDGEs of C-axis. The result of multiplying all error matrices is \({}^{R}T_{C}\) as Eq. (1).

$$T^{co} = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & {O_{xc} } \\ 0 & 1 & 0 & {O_{yc} } \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]\;T^{cs} = \left[ {\begin{array}{*{20}c} 1 & 0 & { \, S_{yc} } & 0 \\ 0 & 1 & { - S_{xc} } & 0 \\ { - S_{yc} } & {S_{xc} } & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]\;T^{c(dep)} = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & {0} \\ 0 & 1 & 0 & {0} \\ 0 & 0 & 1 & {C_{z(dep)} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]$$
$$T^{c} = \left[ {\begin{array}{*{20}c} {\cos (\theta_{c} + C_{(pos)} )} & {\sin (\theta_{c} + C_{(pos)} )} & 0 & 0 \\ { - \sin (\theta_{c} + C_{(pos)} )} & {\cos (\theta_{c} + C_{(pos)} )} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]$$
$$\begin{array}{l}{}^{R}T_{C} =\\\left[ {\begin{array}{*{20}c} {\cos (\theta_{c} + C_{(pos)} )} & {\sin (\theta_{c} + C_{(pos)} )} & {S_{yc} } & {O_{xc} + C_{z(dep)} S_{yc} } \\ { - \sin (\theta_{c} + C_{(pos)} )} & {\cos (\theta_{c} + C_{(pos)} )} & { - S_{xc} } & {O_{yc} - C_{z(dep)} S_{xc} } \\ { - S_{yc} \cos (\theta_{c} + C_{(pos)} ) - S_{xc} \sin (\theta_{c} + C_{(pos)} )} & {S_{xc} \cos (\theta_{c} + C_{(pos)} ) - S_{yc} \sin (\theta_{c} + C_{(pos)} )} & 1 & {C_{z(dep)} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]\end{array}$$
(1)
Fig. 10
figure 10

Coordinate system of each axis of mill-turn machine tool

\({}^{R}T_{Z} ,{}^{Z}T_{Y} ,{}^{Y}T_{X} ,{}^{X}T_{B} ,{}^{B}T_{P}\) are the matrices in the kinematic chain of the touch-trigger probe, and \({}^{R}T_{C} ,{}^{C}T_{S}\) are the matrices in the kinematic chain of the standard calibration spheres. Then the HTM of probe coordinate system P relative to the reference coordinate system R and the HTM of the calibration sphere coordinate system S relative to the reference coordinate system R are constructed, respectively, as shown in Eqs. (2) and (3).

$${}^{R}T_{P} = {}^{R}T_{Z} {}^{Z}T_{Y} {}^{Y}T_{X} {}^{X}T_{B} {}^{B}T_{P}$$
(2)
$${}^{R}T_{S} = {}^{R}T_{C} {}^{C}T_{S}$$
(3)

3.2 Inverse kinematics

Section 3.1 introduces the touch-trigger probe kinematic chain and the standard calibration sphere kinematic chain in the mathematical model, respectively. For inverse kinematics, these two kinematic chains can be used to calculate the servo commands of the three linear axes. Because the touch-trigger probe will touch the standard calibration spheres, the values of the mechanical coordinate system of the spheres can be calculated. In other words, the two kinematic chains will collide with each other. Therefore, the coordinate values of the probe relative to the reference coordinate system and the calibration sphere relative to the reference coordinate system are the same, and the servo command can be calculated by using this feature.

The ideal servo command symbols are \(x_{cmd}^{i}\), \(y_{cmd}^{i}\), and \(z_{cmd}^{i}\) as Eqs. (4)–(6), respectively. The solved actual servo command symbols are \(x_{cmd}^{r}\), \(y_{cmd}^{r}\), and \(z_{cmd}^{r}\) as Eqs. (7)–(9), respectively. The solution results contain many quadratic terms, which mean that there are many errors’ multiplied terms in the servo command equations, but the values of these terms are quite small. Therefore, Eqs. (7)–(9) are the simplified results after omitting the quadratic terms, and xs, ys, and zs are the coordinates of the calibration sphere coordinate system (S) relative to C-axis coordinate system.

$${x}_{cmd}^{i}={x}_{s}\mathrm{cos}({\theta }_{c})+{y}_{s}\mathrm{sin}({\theta }_{c})$$
(4)
$${y}_{cmd}^{i}={y}_{s}\mathrm{cos}({\theta }_{c})-{x}_{s}\mathrm{sin}({\theta }_{c})$$
(5)
$${z}_{cmd}^{i}=-{z}_{2}+{z}_{s}$$
(6)
$${x}_{cmd}^{r}={O}_{xc}+{z}_{s}{S}_{yc}+{x}_{s}\mathrm{cos}({\theta }_{c})+{y}_{s}{C}_{(pos)}\mathrm{cos}({\theta }_{c})+{y}_{s}\mathrm{sin}({\theta }_{c})-{x}_{s}{C}_{(pos)}\mathrm{sin}({\theta }_{c})$$
(7)
$${y}_{cmd}^{r}={O}_{yc}-{z}_{s}{S}_{xc}+{y}_{s}\mathrm{cos}({\theta }_{c})-{x}_{s}{C}_{(pos)}\mathrm{cos}({\theta }_{c})+{x}_{s}\mathrm{sin}({\theta }_{c})-{y}_{s}{C}_{(pos)}\mathrm{sin}({\theta }_{c})$$
(8)
$${z}_{cmd}^{r}=-{z}_{2}+{z}_{s}+{C}_{z(dep)}+{y}_{s}{S}_{xc}\mathrm{cos}({\theta }_{c})-{x}_{s}{S}_{yc}\mathrm{cos}({\theta }_{c})-{x}_{s}{S}_{xc}\mathrm{sin}({\theta }_{c})-{y}_{s}{S}_{yc}\mathrm{sin}({\theta }_{c})$$
(9)

3.3 Assumptions of geometric error variables

There is a fundamental difference between PIGEs and PDGEs, as shown in Table 5. The values of PIGEs are the same in each angle of the rotary axis and will not change with the rotation of the rotary axis; the PDGEs are different when the rotary axis rotates at each angle. To analyze the key points of PIGEs and PDGEs simultaneously, this factor must be taken into account in the analysis of the equations.

Table 5 Difference between PIGEs and PDGEs

In this paper, the servo commands xcmd, ycmd, and zcmd were used to establish the equations through inverse kinematics. When the C-axis rotates at different angles, the two variables Cz(dep) and C(pos) will continue to change signs in the process of analyzing equations. For example, the next angles of Cz(dep) and C(pos) become Cz(dep)2, C(pos)2, and so on. The PDGE variables of each equation continue to change, but the PIGEs remain unchanged. Finally, the equations of all the measured angles of the C-axis were established and analyzed together.

4 Measurement method and error calculation result

4.1 Measurement method and experiments

Before the experiments, a calibration process of the touch-trigger probe was executed. The calibration of the probe can ensure that this experiment is not affected by the errors of the probe. After the calibration is completed, the operation process of measuring the coordinates of the standard calibration spheres can be started.

As stated in Sect. 2.3, two standard calibration spheres were used as the tested objects. During the experiments, firstly only the C-axis was rotated. After the C-axis was rotated to the next angle, the linear axis was used to move the touch-trigger probe to the vicinity of the calibration spheres and touch the 5 points of spheres and calculate the center coordinates of the spheres. After measuring the first sphere, the linear axis was used to move to the vicinity of the second sphere to measure its coordinates. After measuring both spheres, C-axis was rotated to the next angle. The measurement process and experimental setup are shown in Figs. 11 and 12, respectively.

Fig. 11
figure 11

Schematic diagram of measurement path of C-axis

Fig. 12
figure 12

Photograph of measurement process

4.2 Method of geometric error calculation

In this section, the least squares method was used to analyze the error values through the equations introduced in Sect. 2.4. The servo command \(x_{cmd}^{r}\), \(y_{cmd}^{r}\), and \(z_{cmd}^{r}\) of the calibration spheres with the errors when the C-axis rotates by each angle minus the servo command when the C-axis is at 0°, and the error dP can be listed as shown in Table 4. The position at 0° is assumed to be ideal with no error. The least squares method was used in this study for the overdetermined system where there are more equations than unknowns. The dP1 in Table 4 includes two PDGEs and four PIGEs in the second position; dP2 includes two PDGEs and four PIGEs in the third position; and two more variables are added for each additional position measured. Therefore, assuming that the five rotation angles of the C-axis are measured, there are 10 PDGEs and 4 PIGEs. This paper uses two calibration spheres as the measurement standard. There are more equations dP than unknowns.

Equations (4)–(6) are ideal standard calibration sphere positions without error, and Eqs. (7)–(9) are actual standard calibration sphere positions including errors. Since there is no error when the C-axis is 0°, θc of Eqs. (4)–(6) is substituted with 0°, and it is named as \(P^{i} (\theta_{c} = 0^{^\circ } )\), and the θc of Eqs. (7)–(9) is substituted by any rotation angle to be measured by the C-axis and name it as \(P^{r}\). Subtracting Eqs. (4)–(6) from Eqs. (7)–(9), dP can be obtained as Eqs. (10)–(12), where θc = 0°, θc2 = any angle. Equation (13) is the relationship between \(P^{r}\), \(P^{i} (\theta_{c} = 0^{^\circ } )\), and dP.

$$dP_{x} = O_{xc} + z_{s} S_{yc} - x_{s} \cos (\theta_{c} ) + x_{s} \cos (\theta_{c}{2} ) + y_{s} C_{(pos)} \cos (\theta_{c}{2} ) - y_{s} \sin (\theta_{c} ) + y_{s} \sin (\theta_{c}{2} ) - x_{s} C_{(pos)} \sin (\theta_{c}{2} )$$
(10)
$$dP_{y} = O_{yc} - z_{s} S_{xc} - y_{s} \cos (\theta_{c} ) + y_{s} \cos (\theta_{c}{2} ) - x_{s} C_{(pos)} \cos (\theta_{c}{2} ) + x_{s} \sin (\theta_{c} ) - x_{s} \sin (\theta_{c}{2} ) - y_{s} C_{(pos)} \sin (\theta_{c}{2} )$$
(11)
$$dP_{z} = C_{z(dep)} + y_{s} S_{xc} \cos (\theta_{c2} ) - x_{s} S_{yc} \cos (\theta_{c2} ) - x_{s} S_{xc} \sin (\theta_{c2} ) - y_{s} S_{yc} \sin (\theta_{c2} )$$
(12)
$$P^{r} = P^{i} (\theta_{c} = 0^{^\circ } ) + dP$$
(13)

Generally, when using the least squares method, the equation is expressed in matrix form, and the coefficients of the equation will be presented as \(A_{6n \times (4 + 2n)} \,\) in Eq. (14), which becomes the form of the coefficient matrix multiplied by the row matrix of the error term.

$$\begin{aligned}dP_{k} & = \left[ {\begin{array}{*{20}c} \vdots \\ {dP_{{x1({\text{Ball 1}})}} } \\ {dP_{{y1({\text{Ball 1}})}} } \\ \begin{gathered} dP_{{z1({\text{Ball 1}})}} \hfill \\ dP_{{x1{\text{(Ball 2}})}} \hfill \\ dP_{{y1({\text{Ball 2}})}} \hfill \\ dP_{{z1({\text{Ball 2}})}} \hfill \\ \end{gathered} \\ \vdots \\ \end{array} } \right]_{6n} = A_{6n \times (4 + 2n)} \, E_{{{\text{PIGEs}} + {\text{PDGEs}}}}\\&= \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & {z_{s} } & 0 & {y_{s} \cos \theta_{c2} - x_{s} \sin \theta_{c2} } & 0 & 0 & \cdots & \cdots \\ 0 & 1 & { - z_{s} } & 0 & 0 & { - x_{s} \cos \theta_{c2} - y_{s} \sin \theta_{c2} } & 0 & 0 & \cdots & \cdots \\ 0 & 0 & {y_{s} \cos \theta_{c2} - x_{s} \sin \theta_{c2} } & { - x_{s} \cos \theta_{c2} - y_{s} \sin \theta_{c2} } & 1 & 0 & 0 & 0 & \cdots & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & {} & {} \\ \end{array} } \right]_{6n \times (4 + 2n)} \left[ {\begin{array}{*{20}c} {O_{xc} } \\ {O_{yc} } \\ {S_{xc} } \\ {S_{yc} } \\ {C_{z(dep)1} } \\ {C_{(pos)1} } \\ {C_{{z(dep){2}}} } \\ {C_{{(pos){2}}} } \\ \begin{gathered} \vdots \hfill \\ \vdots \hfill \\ \end{gathered} \\ \end{array} } \right]\end{aligned}$$
(14)

The research goal is to calculate \(E_{{{\text{PIGEs}} + {\text{PDGEs}}}}\). When there is a set of error values \(E_{{{\text{PIGEs}} + {\text{PDGEs}}}}\) that can minimize the sum of the squares of \((dP - AE)\) in Eq. (15), that is, the residual values, this set of values is the geometric errors of this system. Equation (15) is written in matrix form as Eq. (16).

$$Q(E_{{{\text{PIGEs}} + {\text{PDGEs}}}} ) = \frac{1}{s}\sum\limits_{s = 1}^{6n} {(dP - AE)^{2} = } \frac{1}{s}\sum\limits_{s = 1}^{6n} {R_{s}^{2} }$$
(15)
$$\mathop {\min }\limits_{{{\text{PIGEs}}_{{}} }} \, \sum\limits_{s = 1}^{6n} {R_{s}^{2} \, } { = }\mathop { \, \min }\limits_{{{\text{PIGEs}}_{{}} }} \left\| {\left[ {\begin{array}{*{20}c} {dP^{1} } \\ \vdots \\ {dP^{6n} } \\ \end{array} } \right] - \left[ {\begin{array}{*{20}c} {A_{{{1} \times {1}}} } & \cdots & {A_{{{1} \times (4 + 2n)}} } \\ \vdots & \ddots & \vdots \\ {A_{6n \times 1} } & \cdots & {A_{6n \times (4 + 2n)} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {O_{xc} } \\ {O_{yc} } \\ {S_{xc} } \\ {S_{yc} } \\ {C_{z(dep)1} } \\ {C_{(pos)1} } \\ {C_{{z(dep){2}}} } \\ {C_{{(pos){2}}} } \\ \begin{gathered} \vdots \hfill \\ \vdots \hfill \\ \end{gathered} \\ \end{array} } \right]} \right\|^{{2}} {\text{ = min}}\left\| {dP - AE} \right\|^{{2}}$$
(16)

4.3 Simulation of calculation method

For verifying the feasibility and performance of the proposed measurement method, the simulation verification was executed through a quantitative analysis. Therefore, the main purpose of simulations is to verify the accuracy of the dP listed in Sect. 4.2, and the error values obtained by the least squares method in this section. The mathematical calculation software was used to build the simulation mode through the geometric errors model and the mathematical model which are mentioned above. Through comparing the difference between the assumed random values and the parsed values of dP, the performance of the proposed measurement method was verified.

A schematic of the process for the simulation mode is shown in Fig. 13. In the simulation mode, the analyzed error variable in the equation was substituted by a random variable. Here, the error values were regarded as a known number. If the dP in Eq. (15) is based on experimental data, the dP was the result of subtracting the measured coordinates of standard calibration spheres. However, in the simulations, the simulated dP can be obtained without using experimental data by using random variables to substitute errors. Using the dP of the simulations and then using the least squares method resolve the error values. Following the simulation process shown in Fig. 13; the simulation results are estimated by observing the difference of the assumed random values and the parsed values. Figure 14 shows the residual values of the parsed values after deducting the assumed random values. Then, Cz(dep)i and C(pos)i represent the axial error and angular positioning error, respectively, in the different commands for the C-axis angular positions. The index i is given as follows:

$$i = \left\{ {\begin{array}{*{20}c} { - 15^{ \circ } ,} & { - 30^{ \circ } ,} & { - 45^{ \circ } ,} & {\begin{array}{*{20}c} {\begin{array}{*{20}c} { - 60^{ \circ } ,} & { - 75^{ \circ } ,} \\ \end{array} } & { - 90^{ \circ } } \\ \end{array} } \\ \end{array} } \right\}$$
(17)
Fig. 13
figure 13

Schematic diagram of error simulation

Fig. 14
figure 14

Residual plot of error simulations

Furthermore, 10 independent simulations were implemented, and the results are presented in Fig. 14 by using lines of different colors. According to the simulation results, the differences between the parsed values and the assumed random values are very small, and the residual values of all geometric errors are less than 10−10 µm or 10−10 arcsec. From the simulation results, it can be absolutely known that the method of synchronous analysis of PIGEs and PDGEs in this paper is accurate and feasible.

4.4 Measurement results

The measurement experiments were performed on a commercial mill-turn five-axis machine tool MT-540 (Yida Precision Machinery Co., Ltd.), as shown in Fig. 1. Additionally, the touch-trigger probe (type: TC50) provided by Blum-Novotest Co., Ltd. and two standard calibration spheres certified by Spheric-Trafalgar were also used for this experimental verification. As mentioned in Sects. 2.3 and 4.1, the measurement procedure was executed. First, the positions of the two standard calibration spheres were determined for the reference by using the touch-trigger probe when the position of the C-axis is at 0°. Moreover, the positions of the two standard calibration spheres in 6 rotation angles of the C-axis were also taken for error analysis. Based on the equations mentioned in Sect. 4.2 and the measured data of the positions of the two standard calibration spheres, the PIGEs and PDGEs of the C-axis on the five-axis machine tool were obtained. As a result, Tables 6 and 7 show the measurement results of the PIGEs and PDGEs, respectively. Among them, the measurement results shown in Tables 6 and 7 are the average of 11 pieces of data. From the measured PIGEs, the maximum linear offset and squareness errors are − 158.3872 μm and − 153.2539 arcsec, respectively. On the other hand, for the measured PDGEs, the maximum linear and angular errors are − 46.7580 μm and − 204.9957 arcsec, respectively. Consequently, the measurement experiments have demonstrated feasibility of this measurement system.

Table 6 Error values of PIGEs
Table 7 Error values of PDGEs

5 Conclusions

This paper has proposed the synchronous measurement method of 4 PIGEs and 2 PDGEs of the rotary axis. Compared with previous studies, PIGEs and PDGEs are usually measured separately, but these two types of errors exist in the machine tools at the same time, and the step-by-step measurement essentially ignores the other type of geometric errors. Moreover, the costly commercial measurement systems for calibrating rotary axes (e.g., R-test and AxiSet Check-Up) are limited only for the PIGEs of rotary axes on the five-axis machine tool. As a result, for the purpose of improving the mentioned existing disadvantages of geometric error measurement of rotary axes, the synchronous measurement system has been proposed.

Furthermore, the contributions and valuable works of this paper are depicted into several aspects as follows. For the error measurement accuracy of the machine tools, this paper considers the 4 PIGEs and 2 PDGEs of the rotary axes at the same time. In terms of convenience and economy, using the proposed measurement system to identify these two types of errors of rotary axes only needs one measurement device. For the feasibility verification, the measurement method proposed in this paper was actually applied to a five-axis machine tool. This paper also verifies the accuracy of this measurement method from the point of view of mathematical simulation. Finally, it is beneficial to perform a quick health check on PIGEs and PDGEs of rotary axes.