1 Introduction

In modern manufacturing to improve machining accuracy it is necessary to reduce the volumetric error of machine tools by identifying, measuring, and compensating for geometric errors [1,2,3,4]. The volumetric error is composed of the position and orientation errors of the tool tip relative to the workpiece; however, due to the inability to compensate for the orientation error of the tool tip in three-axis machine tools, the volumetric error should be considered as primarily the position error. Typically, the position of the tool tip can be described in the workpiece coordinate system (WCS) by adopting rigid-body kinematics [5,6,7,8]. Different approaches have been employed to build kinematic links from the tool to the workpiece using screw theory [9], the exponential model [10, 11] or the Denavit–Hartenberg matrix [12]. Given its straightforward approach, the kinematic model that utilizes serial homogeneous transformation matrices (HTMs) has recently become a popular choice [13, 14].

To establish the aforementioned model, we first consider the geometric errors. In general, the 21 geometric errors are categorized as 3 position-independent geometric errors (PIGEs) and 18 position-dependent geometric errors (PDGEs) [15,16,17,18], which can be measured using direct or indirect methods [19,20,21]. Typically, a laser interferometer system is utilized to accurately measure the geometric errors. After the measurements, the values obtained can be re-inserted, together with machine commands, into the pre-built kinematic model, which gives the actual position of the tool tip in the WCS. The error vector, therefore, can be calculated based on the difference between the actual and ideal coordinates of the tool tip.

Conventionally, all geometric errors are considered simultaneously in the kinematic model, which requires a careful HTM construction process. In this process, unexpected errors may arise, particularly during the elimination of higher-order terms to simplify the final form of the error vector. Actually, there are 24 possible configurations for three-axis machine tools. When considering the six primary-secondary-third (P-S-T) orders of three axes, a total of 144 kinematic models are required. This construction process has to be done individually and repeatedly for all configurations, and the final formulas should be saved in the compensator of the CNC. This process is obviously time-consuming and inefficient. Moreover, memory and speed issues may occur when too many formulas are stored in the compensation modules.

It is necessary to construct a unified error model that can be used for all possible configurations of the three-axis machine tools to solve these problems. Although some studies have developed unified models using a singular function, it is applicable to only four fundamental configurations (FXYZ, XFYZ, XYFZ, and XYZF) [22, 23]. The singular function is merely employed for distinguishing among these four configurations and does not hold any physical significance. As a result, understanding how geometric errors affect the volumetric error within the modeling process of this unified model proves to be challenging. To our knowledge, no study has considered generating the error vectors of all 24 configurations considering the six reference axis orders.

In this paper, we present a new approach to compute the error vectors for all kinematic configurations, while also clarifying the impact of error components as well as supporting the implementation of compensation values. The advantage of this method lies in its ability to represent errors and compensation vectors for various machine tools through a unified model, making it usable as a universal compensator. The generated formulas are applicable to any types of three-axis machine tools: horizontal and vertical types. Moreover, because serial calculation of HTMs is not required, the computational cost is minimized.

The remainder of this paper is organized as follows. Section 2 shows the essential set-up conditions for the error matrices and the selection of coordinate systems for the conventional and proposed methods. This section explains in detail the procedure of the conventional method considering all geometric errors and a typical example. Section 3 demonstrates the step-by-step procedure of the proposed method by reasonably dividing the geometric errors into smaller groups, analyzing their error impacts, and ultimately re-combining them. The unified error model is derived conveniently and is applicable to all 24 configurations of three-axis machine tools. Section 4 describes the theoretical verification of the unified model, and the compensation strategy. Section 5 presents the experimental validation of the proposed method on a vertical three-axis testbed. Section 6 summarizes the main points of the paper.

2 Conventional method for kinematic modeling

2.1 Description of geometric error

Geometric errors of three-axis machine tools are often classified into two groups: PIGE and PDGE.

A PIGE, or location error, is considered as an error in the assembly process, in which the axes are not perpendicular to each other. Each axis has two squareness errors with the other two axes, resulting in six error terms in total. To minimize the number of redundant errors, PIGE is typically defined based on the order of reference axes (primary, secondary, and third axis). The primary axis coincides with the actual movement axis, eliminating squareness errors for the other axes. The secondary axis has one error with respect to the primary axis, while the third axis has two errors with respect to the remaining axes. Consequently, only three PIGEs are required in total. An example of PIGEs is shown in Fig. 1, where X is selected as the primary axis, Y is the secondary axis, and Z is the third axis. {R} stands for right-handed reference coordinate system, and {X}, {Y}, {Z} respectively denote the local coordinate systems for the X, Y, and Z-axes.

Fig. 1
figure 1

Typical combination of three position-independent geometric errors (PIGEs) of three-axis machine tools (primary axis: X, secondary axis: Y, third axis: Z)

A PDGE, on the other hand, is the error induced in the moving process of axes. PDGE consists of linear and angular errors. As each axis has 6 PDGEs, there are 18 PDGEs in total, including 9 linear errors and 9 angular errors. An example of the six PDGEs of the X-axis is shown in Fig. 2. The PDGEs of the Y and Z-axes can be defined in a similar manner.

Fig. 2
figure 2

Six position-dependent geometric errors (PDGEs) of the X-axis

The 21 geometric errors are summarized in Table 1 and shown visually in Fig. 3, where the positive directions of the PIGEs and PDGEs are specified.

Table 1 The 21 geometric errors of 3-axis machine tools
Fig. 3
figure 3

21 geometric errors and positive directions

2.2 Kinematic modeling

To describe the position of the tool tip relative to the workpiece, a tool coordinate system (TCS, {t}) was selected at the tool tip, and a WCS ({W}) was attached to the workpiece. The local coordinate system of the X, Y, Z-axes is attached to each respective axis. Then, the kinematic link relating the TCS to the WCS can be defined by a series of HTMs that describe the coordinate transformation among local coordinate systems. A fixed reference coordinate system (RCS) is often used as a reference when connecting the TCS and the WCS.

To illustrate the kinematic modeling, a typical YFXZ machine type was used, as shown in Fig. 4. First, the TCS, WCS, RCS, and local coordinate system of each axis were selected as right-handed coordinate systems. The initial origins of all coordinate systems were set to coincide, such that the offset distance between the coordinate systems was not a consideration. This tends to make kinematic modeling very simple. The ideal kinematic link was created as follows.

Fig. 4
figure 4

YFXZ configuration

The matrices representing the movement of each axis X, Y, and Z are described in HTM form as follows, where x, y, and z denote the respective amounts of movement:

$${\mathbf{M}}_{\mathrm{X}}=\left[\begin{array}{cccc}1& 0& 0& \mathbf{x}\\ 0& 1& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right], {\mathbf{M}}_{\mathrm{Y}}=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& 0& \mathbf{y}\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right], {\mathbf{M}}_{\mathrm{Z}}=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& 0& 0\\ 0& 0& 1& \mathbf{z}\\ 0& 0& 0& 1\end{array}\right]$$
(1)

The ideal transformation matrix from TCS to WCS, \({\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}\), is established accordingly.

$$\begin{array}{c}{\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{W}}\right)}_{ideal}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{Y}}\right)}_{ideal}\times {}^{\mathrm{Y}}{\mathbf{T}}_{\mathrm{W}}={\mathbf{M}}_{\mathrm{Y}}\\ {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{X}}\right)}_{ideal}\times {\left({}^{\mathrm{X}}{\mathbf{T}}_{\mathrm{Z}}\right)}_{ideal}\times {}^{\mathrm{Z}}{\mathbf{T}}_{\mathrm{t}}={\mathbf{M}}_{\mathrm{X}}{\mathbf{M}}_{\mathrm{Z}}\\ {\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}={\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{R}}\right)}_{ideal}\times {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{W}}\right)}_{ideal}^{-1}\times {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}={{\mathbf{M}}_{\mathrm{Y}}}^{-1}{\mathbf{M}}_{\mathrm{X}}{\mathbf{M}}_{\mathrm{Z}},\end{array}$$
(2)

where \({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{W}}\) represents the transformation matrix from WCS to RCS, and the other transformation matrices are defined in a similar manner. \({}^{\mathrm{Y}}{\mathbf{T}}_{\mathrm{W}}\) and \({}^{\mathrm{Z}}{\mathbf{T}}_{\mathrm{t}}\) are the identity matrices.

The actual kinematic link considering all geometric errors, when the PIGEs and PDGEs are small enough to be approximated and stacked into HTM form, is presented as follows:

$$\begin{array}{c}{\mathbf{E}}_{\mathrm{X}}=\left[\begin{array}{cccc}1& -{\upvarepsilon }_{\mathrm{zx}}& {\upvarepsilon }_{\mathrm{yx}}& {\updelta }_{\mathrm{xx}}\\ {\upvarepsilon }_{\mathrm{zx}}& 1& -{\upvarepsilon }_{\mathrm{xx}}& {\updelta }_{\mathrm{yx}}\\ -{\upvarepsilon }_{\mathrm{yx}}& {\upvarepsilon }_{\mathrm{xx}}& 1& {\updelta }_{\mathrm{zx}}\\ 0& 0& 0& 1\end{array}\right], {\mathbf{E}}_{\mathrm{Y}}=\left[\begin{array}{cccc}1& -{\upvarepsilon }_{\mathrm{zy}}& {\upvarepsilon }_{\mathrm{yy}}& {\updelta }_{\mathrm{xy}}\\ {\upvarepsilon }_{\mathrm{zy}}& 1& -{\upvarepsilon }_{\mathrm{xy}}& {\updelta }_{\mathrm{yy}}\\ -{\upvarepsilon }_{\mathrm{yy}}& {\upvarepsilon }_{\mathrm{xy}}& 1& {\updelta }_{\mathrm{zy}}\\ 0& 0& 0& 1\end{array}\right],\\ {\mathbf{E}}_{\mathrm{Z}}=\left[\begin{array}{cccc}1& -{\upvarepsilon }_{\mathrm{zz}}& {\upvarepsilon }_{\mathrm{yz}}& {\updelta }_{\mathrm{xz}}\\ {\upvarepsilon }_{\mathrm{zz}}& 1& -{\upvarepsilon }_{\mathrm{xz}}& {\updelta }_{\mathrm{yz}}\\ -{\upvarepsilon }_{\mathrm{yz}}& {\upvarepsilon }_{\mathrm{xz}}& 1& {\updelta }_{\mathrm{zz}}\\ 0& 0& 0& 1\end{array}\right] ,\end{array}$$
(3)

where \({\mathbf{E}}_{\mathrm{X}}\), \({\mathbf{E}}_{\mathrm{Y}}\), and \({\mathbf{E}}_{\mathrm{Z}}\) are the PDGE matrices of the X, Y, and Z-axes, respectively.

$$\begin{array}{c}{\mathbf{S}}_{\mathrm{XY}}=\left[\begin{array}{cccc}1& -{\mathrm{s}}_{\mathrm{xy}}& 0& 0\\ {\mathrm{s}}_{\mathrm{xy}}& 1& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right],{\mathbf{S}}_{\mathrm{ZX}}=\left[\begin{array}{cccc}1& 0& {\mathrm{s}}_{\mathrm{zx}}& 0\\ 0& 1& 0& 0\\ -{\mathrm{s}}_{\mathrm{zx}}& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right],{\mathbf{S}}_{\mathrm{ZY}}=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& -{\mathrm{s}}_{\mathrm{zy}}& 0\\ 0& {\mathrm{s}}_{\mathrm{zy}}& 1& 0\\ 0& 0& 0& 1\end{array}\right],\\ {\mathbf{S}}_{\mathrm{YX}}=\left[\begin{array}{cccc}1& -{\mathrm{s}}_{\mathrm{yx}}& 0& 0\\ {\mathrm{s}}_{\mathrm{yx}}& 1& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right],{\mathbf{S}}_{\mathrm{XZ}}=\left[\begin{array}{cccc}1& 0& {\mathrm{s}}_{\mathrm{xz}}& 0\\ 0& 1& 0& 0\\ -{\mathrm{s}}_{\mathrm{xz}}& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right],{\mathbf{S}}_{\mathrm{YZ}}=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& -{\mathrm{s}}_{\mathrm{yz}}& 0\\ 0& {\mathrm{s}}_{\mathrm{yz}}& 1& 0\\ 0& 0& 0& 1\end{array}\right],\end{array}$$
(4)

where \({\mathbf{S}}_{\mathrm{XY}}\), \({\mathbf{S}}_{\mathrm{YX}}\), \({\mathbf{S}}_{\mathrm{ZX}}\), \({\mathbf{S}}_{\mathrm{XZ}}\), \({\mathbf{S}}_{\mathrm{ZY}}\), and \({\mathbf{S}}_{\mathrm{YZ}}\) are the PIGE matrices. By selecting the P-S-T order, only three of the matrices are required.

Typically, P-S-T should be chosen to simplify the link between the WCS and the RCS. That is, the primary, secondary, and third axes are set in order of closeness to the workpiece. For example, in the YFXZ machine type shown, Y is selected as the primary axis, X is the secondary axis, and Z is the third axis. Therefore, the three required PIGEs are \({\mathrm{s}}_{\mathrm{yx}}\), \({\mathrm{s}}_{\mathrm{yz}}\), and \({\mathrm{s}}_{\mathrm{xz}}\) and their corresponding PIGE matrices are \({\mathbf{S}}_{\mathrm{YX}}\), \({\mathbf{S}}_{\mathrm{YZ}}\), and \({\mathbf{S}}_{\mathrm{XZ}}\), respectively.

For the movement of a particular axis considering geometric errors, the HTM link is created by sequentially multiplying the three matrices of PIGE, axis movement, and PDGE. Accordingly, the actual kinematic transformation from the TCS to the WCS for the YFXZ machine type is as follows:

$$\begin{array}{c}{\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{W}}\right)}_{actual}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{Y}}\right)}_{actual}\times {}^{\mathrm{Y}}{\mathbf{T}}_{\mathrm{W}}={\mathbf{M}}_{\mathrm{Y}}{\mathbf{E}}_{\mathrm{Y}}\\ {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{actual}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{X}}\right)}_{actual}\times {\left({}^{\mathrm{X}}{\mathbf{T}}_{\mathrm{Z}}\right)}_{actual}\times {}^{\mathrm{Z}}{\mathbf{T}}_{\mathrm{t}}={\mathbf{S}}_{\mathrm{YX}}{\mathbf{M}}_{\mathrm{X}}{\mathbf{E}}_{\mathrm{X}}\times {\mathbf{S}}_{\mathrm{YZ}}{\mathbf{S}}_{\mathrm{XZ}}{\mathbf{M}}_{\mathrm{Z}}{\mathbf{E}}_{\mathrm{Z}}\\ {\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{t}}\right)}_{actual}={\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{R}}\right)}_{actual}\times {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{actual}={\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{W}}\right)}_{actual}^{-1}\times {\left({}^{\mathrm{R}}{\mathbf{T}}_{\mathrm{t}}\right)}_{actual} ={\left({\mathbf{M}}_{\mathrm{Y}}{\mathbf{E}}_{\mathrm{Y}}\right)}^{-1}\times {\mathbf{S}}_{\mathrm{YX}}{\mathbf{M}}_{\mathrm{X}}{\mathbf{E}}_{\mathrm{X}}\times {\mathbf{S}}_{\mathrm{YZ}}{\mathbf{S}}_{\mathrm{XZ}}{\mathbf{M}}_{\mathrm{Z}}{\mathbf{E}}_{\mathrm{Z}}\end{array}$$
(5)

The matrix VE, which represents the error of the tool tip relative to the workpiece, is expressed by Eq. (6). It is a 4 × 4 matrix, in which the first three columns are orientation errors, and the fourth column is the position error of the tool tip with respect to the workpiece.

$$\mathbf{V}\mathbf{E}={\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{t}}\right)}_{ideal}^{-1}{\left({}^{\mathrm{W}}{\mathbf{T}}_{\mathrm{t}}\right)}_{actual}$$
(6)

For three-axis machine tools, the volumetric error is actually the position error of the tool tip relative to the workpiece, because the orientation error of the tool tip cannot be compensated. Therefore, after removing the higher-order terms manually or using programming software such as MATLAB for the fourth column, the error vectors \({\mathrm{E}}_{\mathrm{x}}, {\mathrm{E}}_{\mathrm{y}}, {\mathrm{E}}_{\mathrm{z}}\) of the tool tip can be obtained as follows:

$$\left[\begin{array}{c}{\textrm{E}}_{\textrm{x}}\\ {}{\textrm{E}}_{\textrm{y}}\\ {}{\textrm{E}}_{\textrm{z}}\\ {}1\end{array}\right]=\textbf{VE}\times \left[\begin{array}{c}0\\ {}0\\ {}0\\ {}1\end{array}\right]=\left[\begin{array}{c}{\updelta}_{\textrm{xx}}-{\updelta}_{\textrm{xy}}+{\updelta}_{\textrm{xz}}-{\upvarepsilon}_{zy}\textbf{y}+{\upvarepsilon}_{yx}\textbf{z}-{\upvarepsilon}_{\text{yy}}\mathbf{z}+{\textrm{s}}_{\textrm{xz}}\textbf{z}\\{\updelta}_{\textrm{yx}}-{\updelta}_{\textrm{yy}}+{\updelta}_{\textrm{yz}}-{\upvarepsilon}_{zy}\textbf{x}-{\upvarepsilon}_{\textrm{xx}}\textbf{z}+{\upvarepsilon}_{\textrm{xy}}\textbf{z}+{\textrm{s}}_{\textrm{yx}}\textbf{x}-{\textrm{s}}_{\textrm{yz}}\textbf{z}\\{}{\updelta}_{\textrm{zx}}-{\updelta}_{\textrm{zy}}+{\updelta}_{\textrm{zz}}+{\upvarepsilon}_{yy}\textbf{x}+{\upvarepsilon}_{xy}\textbf{y}\\ {}1\end{array}\right]$$
(7)

By setting up the kinematic model, the error vector can be calculated completely. However, as discussed briefly in Section 1, there are two drawbacks.

  1. (1)

    The derivation of the final simplified formulas for compensation requires great care in the kinematic modeling process, such as the definition of geometric errors, the stacking order of the HTMs, and the elimination of higher-order terms.

  2. (2)

    For all 24 configurations of three-axis machine tools with six selections of P-S-T order, the calculation process must be done repeatedly for the 144 cases. For a universal compensator, it would be not efficient when saving all of these error vectors for the compensation process.

In Section 3, we propose a method that can solve these issues effectively.

3 Unified error modeling method for all configurations of three-axis machine tools

3.1 General concepts

3.1.1 General concepts

In general, the PIGE and PDGE have almost no impact on each other. Therefore, instead of considering all error components simultaneously, as in the conventional approach, herein the 21 geometric errors are divided into subgroups and the error impact of each group is analyzed separately. The derived results are then combined for the final unified error model of all 24 configurations. The procedure diagram is shown in Fig. 5.

Fig. 5
figure 5

General concepts of the proposed method

Typically, there are 24 possible configurations of three-axis machine tools. Based on the stacking order of axes, these 24 configurations can be classified as forward CS (XYZ type) and backward CS (XZY type), as shown in Table 2.

Table 2 Classification of 24 configurations

The proposed method is applied for the first four fundamental configurations, FXYZ, XFYZ, XYFZ, and XYZF (first column in Table 2), and then extended to generate the error model for all remaining configurations (columns 2–6 in Table 2).

3.1.2 Rules for deriving the error terms

There are two main components of error terms in the unified error model: the raw error terms and the sign of each raw error term. As we divided the geometric errors into subgroups, the raw error terms are first determined based on the properties of the separated errors, which are PIGE, PDGE-linear error, and PDGE-angular error. After the raw error terms have been determined, their signs (impact) can be addressed using the following rules.

Rule 1. The basics when there is no axis attached to the workpiece side

  • 1a. Rule for the PIGE term: The PIGE term has two elements: the squareness error and the axis that combines with that error, affecting the other axis lying in the plane of the squareness error. Herein, the right-handed CS is chosen and the positive direction of the measured PIGE is counterclockwise. Therefore, the sign (impact) of the PIGE term of the Z-axis on the Y-axis, the Y-axis on the X-axis, and the X-axis on the Z-axis is negative, while the reverse-order ones are positive. The impact of the PIGE term of the Y-axis on the X-axis is shown in Fig. 6.

  • 1b. Rule for the PDGE-linear term: The PDGE-linear term has only one element: the linear error itself along the three axes. Therefore, the basic sign (impact) of the linear term can be determined based on the positive direction of the three axes.

  • 1c. Rule for the PDGE-angular term: The PDGE-angular term also has two components: the PDGE-angular error and the axis coupling with that error. Typically, the positive direction of the measured PDGE-angular error is selected as counterclockwise. Therefore, the basic rule for the PDGE-angular term can also be defined in the same way as that of the PIGE term. For example, the PDGE angular error of the Z-axis around the Z-axis, εzz (causing error on the XOY plane), has the same effect as the PIGE between the X and Y-axes, as shown in Fig. 6.

Fig. 6
figure 6

Impact of the PIGE of the Y-axis on the X-axis

Rule 2. The change in error impact when there is at least one axis attached to the workpiece side

  • 2a. Rule for the PIGE term: When an axis changes its attaching position to the tool or workpiece side, the sign of the PIGE relating to that axis is unchanged. This is due to the property of the PIGE in which the location error occurs before the axes move. The signs do not change regardless of the positions of the moving axes, whether attached to the workpiece or not. Therefore, the sign of the PIGE term needs to be changed only for movement of the axis combining with the PIGE. As a result, the PIGE term may need to be multiplied by −1 once.

  • 2b. Rule for the PDGE linear term: When the axis is attached to the tool side, the tool moves relative to the workpiece. The measured linear error is therefore unchanged. However, when the axis is attached to the workpiece side, the workpiece moves relative to the tool. The effect of linear error is therefore reversed. In other words, the linear error is multiplied by −1.

  • 2c. Rule for the PDGE angular term: When an axis changes its attaching position to the tool or workpiece side, the sign of the PDGE angular error related to that axis changes as well. This is because the PDGE is related to the motion error occurring during movements of the axes. The signs change when the axes change the attaching position to the tool or workpiece side. As a result, the change of sign of the PDGE term must be considered for both PDGE angular error and the movement of the axis combining with that error. In other words, the PDGE term may need to be multiplied by −1 twice.

3.2 Generation process of error vector by PIGEs

Here, we assume that the PIGEs are isolated and observed. All 24 configurations have six possible P-S-T orders, resulting in 144 kinematic calculations. For example, for a configuration of FXYZ, by selecting P-S-T axes in the order of X–Y–Z, X–Z–Y, Y–X–Z, Y–Z–X, Z–X–Y, Z–Y–X, a total of 6 kinematic models can be obtained.

Because the measured PIGEs in the identification step and the selected PIGEs in the modeling step may differ, conversion of the PIGE based on the symmetry can be done here.

$${{\mathrm{s}}_{\mathrm{zy}}=-{\mathrm{ s}}_{\mathrm{yz}},\mathrm{s}}_{\mathrm{zx}}=-{\mathrm{s}}_{\mathrm{xz}},{\mathrm{s}}_{\mathrm{yx}}=-{\mathrm{s}}_{\mathrm{xy}}$$
(8)

As mentioned in the previous section, the two components of interest are the error terms and their signs. Herein, the X-axis is selected as the primary axis, the Y-axis is the secondary axis, and the Z-axis is the third axis. The X-axis is an ideal axis, in that does not cause error on the other axes. The Y-axis is an actual axis located on the XOY plane, causing error on the X-axis while moving. The Z-axis is an arbitrary axis that impacts both the X and Y-axes. The three errors are \({\mathrm{s}}_{\mathrm{xy}}\), \({\mathrm{s}}_{\mathrm{xz}}\), and \({\mathrm{s}}_{\mathrm{yz}}\), in which the first subscript denotes the error direction and the second subscript indicates the error axis.

In the unified error model, the three identified PIGEs (\({\mathrm{s}}_{\mathrm{xy}}\), \({\mathrm{s}}_{\mathrm{xz}}\)\({\mathrm{s}}_{\mathrm{yz}}\)) are used for describing the error vectors of all four fundamental configurations, FXYZ, XFYZ, XYFZ, and XYZF, and the same procedure can be applied again for the remaining configurations. The detailed process is outlined in Fig. 7.

Fig. 7
figure 7

Procedure for defining the error vectors

  • Step 1: Define the error terms (based on Fig. 3 and the P-S-T order):

    $$\mathrm{Raw\ error\ vector }= \left[\begin{array}{c}(\pm ) {\mathrm{s}}_{\mathrm{xz}}\mathbf{z} (\pm ) {\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ (\pm ) {\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ 0\end{array}\right]$$
    (9)
  • Step 2: Apply Rule 1a—Section 3.1.2 (basic error impact) for the FXYZ configuration:

    $$\mathrm{Error\ vector\ of\ FXYZ }= \left[\begin{array}{c}(+){\mathrm{ s}}_{\mathrm{xz}}\mathbf{z}\left(-\right) {\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ \left(-\right) {\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ 0\end{array}\right]$$
    (10)
  • Step 3: Apply Rule 2a—Section 3.1.2 (change of error impact) to update the sign of the error term:

    $$\mathrm{Error\ vector\ of\ XFYZ\ }(\mathrm{unchanged\ because\ X\ is\ primary\ axis}) = \left[\begin{array}{c}{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}-{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ -{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ 0\end{array}\right]$$
    (11)
    $$\mathrm{Error\ vector\ of\ XYFZ\ }(\mathrm{updated\ sign\ of\ Y}\!\!-\!\mathrm{axis}) = \left[\begin{array}{c}{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}\left(+\right){\mathrm{ s}}_{\mathrm{xy}}\mathbf{y}\\ -{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ 0\end{array}\right]$$
    (12)
    $$\mathrm{Error\ vector\ of\ XYZF\ }(\mathrm{updated\ sign\ of\ Z}\!-\!\mathrm{axis}) = \left[\begin{array}{c}(-){\mathrm{s}}_{\mathrm{xz}}\mathbf{z}+{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ \left(+\right){\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ 0\end{array}\right]$$
    (13)

Herein, the basic sign of the error terms is first determined based on Rule 1a (Section 3.1.2). Configurations FXYZ and XFYZ share the same formula, because the positions of the error axes remain unchanged (the Y and Z-axes are still attached to the tool side). Then, in the next configurations, XYFZ and XYZF, because the Y and Z-axes are attached to the workpiece side, the inverse effect is applied as Rule 2a.

For each P-S-T order, there is a combination of three required PIGEs. For the results derived from Eqs. (10)–(13), using one parameter, \({\mathrm{K}}_{\mathrm{a},\mathrm{b},\mathrm{c}}\)=  ± 1, accounting for the change of sign of PIGE terms, with a, b and c denoting the primary, secondary and third axes, respectively, the unified error vector form can be represented as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{PIGE}-\mathrm{a}}\\ {\mathrm{E}}_{\mathrm{PIGE}-\mathrm{b}}\\ {\mathrm{E}}_{\mathrm{PIGE}-\mathrm{c}}\end{array}\right]=\left[\begin{array}{c}{\mathrm{K}}_{\mathrm{c}}{\mathrm{s}}_{\mathrm{ac}}\mathbf{c}-{\mathrm{K}}_{\mathrm{b}}{\mathrm{s}}_{\mathrm{ab}}\mathbf{b}\\ {-\mathrm{K}}_{\mathrm{c}}{\mathrm{s}}_{\mathrm{bc}}\mathbf{c}\\ 0\end{array}\right]$$
(14)

For a unified error model considering all six P-S-T orders, one more parameter, \({\uplambda }_{\mathrm{a},\mathrm{b},\mathrm{c}}\) = 0 or 1, is required for choosing the three PIGE terms appropriately. The vector form of the PIGE terms is rewritten as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{PIGE}-\mathrm{a}}\\ {\mathrm{E}}_{\mathrm{PIGE}-\mathrm{b}}\\ {\mathrm{E}}_{\mathrm{PIGE}-\mathrm{c}}\end{array}\right]=\left[\begin{array}{c}{\uplambda }_{\mathrm{c}}{\mathrm{K}}_{\mathrm{c}}{\mathrm{s}}_{\mathrm{ac}}\mathbf{c}-{\uplambda }_{\mathrm{b}}{\mathrm{K}}_{\mathrm{b}}{\mathrm{s}}_{\mathrm{ab}}\mathbf{b}\\ {\uplambda }_{\mathrm{a}}{\mathrm{K}}_{\mathrm{a}}{\mathrm{s}}_{\mathrm{ba}}\mathbf{a}-{\uplambda }_{\mathrm{c}}{\mathrm{K}}_{\mathrm{c}}{\mathrm{s}}_{\mathrm{bc}}\mathbf{c}\\ {\uplambda }_{\mathrm{b}}{\mathrm{K}}_{\mathrm{b}}{\mathrm{s}}_{\mathrm{cb}}\mathbf{b}-{\uplambda }_{\mathrm{a}}{\mathrm{K}}_{\mathrm{a}}{\mathrm{s}}_{\mathrm{ca}}\mathbf{a}\end{array}\right]$$
(15)

3.3 Generation process of error vector by PDGEs

Due to the difference in error properties, the PDGEs are divided into two groups of nine linear errors and nine angular errors.

3.3.1 PDGEs — linear errors

The linear errors can be attained as follows; their impacts are shown as in Fig. 3. Each axis is affected by its three linear terms and the two remaining axes. By regrouping, the linear error terms can be found without difficulty. Then, by applying Rules 1b and 2b from Section 3.1.2, the basic sign can be found and updated when the axis changes its attaching position to the tool or workpiece side. The details are given in the following.

  • Step 1: Defining the error terms:

    $$\mathrm{Raw\ error\ vector\ }= \left[\begin{array}{c}(\pm ){\updelta }_{\mathrm{xx}}(\pm ){\updelta }_{\mathrm{xy}}(\pm ){\updelta }_{\mathrm{xz}}\\ (\pm ){\updelta }_{\mathrm{yx}}(\pm ){\updelta }_{\mathrm{yy}}(\pm ){\updelta }_{\mathrm{yz}}\\ (\pm ){\updelta }_{\mathrm{zx}}(\pm ){\updelta }_{\mathrm{zy}}(\pm ){\updelta }_{\mathrm{zz}}\end{array}\right]$$
    (16)
  • Step 2: Apply Rule 1b—Section 3.1.2 (basic error impact) for all four configurations:

    $$\mathrm{Error\ vector\ of\ FXYZ\ }= \left[\begin{array}{c}{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xz}}\\ {\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yz}}\\ {\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zz}}\end{array}\right]$$
    (17)
  • Step 3: Apply Rule 2b—Section 3.1.2 (change of error impact) to update the sign of the error term:

    $$\mathrm{Error\ vector\ of\ XFYZ\ }(\mathrm{updated\ error\ related\ to\ the\ X}\!-\!\mathrm{axis}) = \left[\begin{array}{c}\left(-\right)\boldsymbol{ }{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xz}}\\ \left(-\right)\boldsymbol{ }{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yz}}\\ \left(-\right)\boldsymbol{ }{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zz}}\end{array}\right]$$
    (18)
    $$\mathrm{Error\ vector\ of\ XYFZ\ }(\mathrm{updated\ error\ related\ to\ the\ Y}\!-\!\mathrm{axis}) = \left[\begin{array}{c}{-\updelta }_{\mathrm{xx}} \left(-\right) {\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xz}}\\ {-\updelta }_{\mathrm{yx}} \left(-\right) {\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yz}}\\ -{\updelta }_{\mathrm{zx}} \left(-\right) {\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zz}}\end{array}\right]$$
    (19)
    $$\mathrm{Error\ vector\ of\ XYZF\ }(\mathrm{updated\ error\ related\ to\ the\ Z}\!-\!\mathrm{axis}) = \left[\begin{array}{c}{-\updelta }_{\mathrm{xx}}-{\updelta }_{\mathrm{xy}} (-){\updelta }_{\mathrm{xz}}\\ {-\updelta }_{\mathrm{yx}}-{\updelta }_{\mathrm{yy}} (-){\updelta }_{\mathrm{yz}}\\ -{\updelta }_{\mathrm{zx}}-{\updelta }_{\mathrm{zy}} (-){\updelta }_{\mathrm{zz}}\end{array}\right]$$
    (20)

To establish the unified form, one parameter, \({\mathrm{L}}_{\mathrm{a},\mathrm{b},\mathrm{c}}\)=  ± 1, with a, b, and c denoting the primary, secondary and third axes, respectively, is sufficient for modeling the change of sign of PDGE-linear terms. The vector form is as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{PDGE}-\mathrm{linear}-\mathrm{a}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\mathrm{linear}-\mathrm{b}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\mathrm{linear}-\mathrm{c}}\end{array}\right]=\left[\begin{array}{c}{\mathrm{L}}_{\mathrm{a}}{\updelta }_{\mathrm{aa}}+{\mathrm{L}}_{\mathrm{b}}{\updelta }_{\mathrm{ab}}+{\mathrm{L}}_{\mathrm{c}}{\updelta }_{\mathrm{ac}}\\ {\mathrm{L}}_{\mathrm{a}}{\updelta }_{\mathrm{ba}}+{\mathrm{L}}_{\mathrm{b}}{\updelta }_{\mathrm{bb}}+{\mathrm{L}}_{\mathrm{c}}{\updelta }_{\mathrm{bc}}\\ {\mathrm{L}}_{\mathrm{a}}{\updelta }_{\mathrm{ca}}+{\mathrm{L}}_{\mathrm{b}}{\updelta }_{\mathrm{cb}}+{\mathrm{L}}_{\mathrm{c}}{\updelta }_{\mathrm{cc}}\end{array}\right].$$
(21)

3.3.2 PDGEs—angular errors

In total, there are nine angular errors that can combine with each axis and produce error terms on the other axes. For convenience in further analysis, these nine angular errors are categorized into three subgroups according to their properties.

  • Zero group (including three errors) – causes no error term while an axis is moving.

  • Normal group (including four errors) – causes error terms regardless of the attaching position of the axis.

  • Special group (including two errors) – only causes error terms when the axis is attached to the workpiece side.

As visualized in Fig. 3, considering the X-axis (the Y and Z-axes are treated in the same manner), the error effect can be categorized as follows (Fig. 8):

  • Zero group: Errors \({\upvarepsilon }_{\mathrm{xx}}, {\upvarepsilon }_{\mathrm{xy}},\) and \({\upvarepsilon }_{\mathrm{xz}}\) rotate around the X-axis and therefore do not cause error on the X-axis.

  • Normal group: Errors \({\upvarepsilon }_{\mathrm{yy}}\) and \({\upvarepsilon }_{\mathrm{yz}}\) can be combined with the X-axis to generate error terms on the Z-axis, and errors \({\upvarepsilon }_{\mathrm{zy}}\) and \({\upvarepsilon }_{\mathrm{zz}}\) can be combined with the X-axis to cause errors on the Y-axis.

  • Special group: Only if the X-axis is attached to the workpiece side, can errors \({\upvarepsilon }_{\mathrm{yx}}\) and \({\upvarepsilon }_{\mathrm{zx}}\) (belonging to the X-axis) be combined with the movement of the X-axis (its own axis) and cause errors on the Z and Y-axes, respectively.

Fig. 8
figure 8

Categorization of angular errors

Because the normal angular error is PDGE, it is considered to have occurred after its axis moves, and its sign changes when the axis changes its attaching position to the tool or the workpiece side. On the other hand, the “special angular error” only has an effect when its axis attaches to the workpiece side; therefore, its sign is unchanged.

Normal angular errors

Using a procedure similar to that applied for deriving the PIGE and PDGE-linear terms, the error vector for the PDGE-normal angular error can be obtained using the following steps:

  • Step 1: Determine the error terms:

    Since the coordinate transformation using HTM is a relative transformation, matrix multiplication is performed from the left in the order in which the coordinate transformation occurred. Thus, for the FXYZ configuration, the movement starts with the X-axis closest to the workpiece (the leftmost axis in the kinematic link). At this time, the Y and Z-axes have not yet moved. Therefore, the X-axis will not combine with the four normal angular errors belonging to the Y and Z-axes (\({\upvarepsilon }_{\mathrm{yy}},{\upvarepsilon }_{\mathrm{zy}},{\upvarepsilon }_{\mathrm{yz}},{\upvarepsilon }_{\mathrm{zz}})\). When the Y-axis (the second closest axis to the workpiece) moves, it can only combine with the normal angular errors of the X-axis, resulting in two error terms \({\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\) and \({\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\). Finally, when the Z-axis moves, it can combine with angular errors of both the X and Y-axes, resulting in four error terms \({\upvarepsilon }_{\mathrm{yx}}\mathbf{z}\mathrm{,} \, {\upvarepsilon }_{\mathrm{xx}}\mathbf{z}{\mathrm{,} \,\upvarepsilon }_{\mathrm{yy}}\mathbf{z}\mathrm{,}\) and \({\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\). By stacking the six derived error terms properly, the raw error vector can be obtained as follows:

    $$\mathrm{Raw\ error\ vector\ }= \left[\begin{array}{c}(\pm ){\upvarepsilon }_{\mathrm{yx}}\mathbf{z}(\pm ){\upvarepsilon }_{\mathrm{yy}}\mathbf{z}(\pm ){\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ {(\pm )\upvarepsilon }_{\mathrm{xx}}\mathbf{z}(\pm ){\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\\ (\pm ){\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\end{array}\right]$$
    (22)
  • Step 2: Apply Rule 1c – Section 3.1.2 (basic error impact) for all four configurations:

    $$\text{Error vector of FXYZ }= \left[\begin{array}{c}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ -{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\end{array}\right]$$
    (23)
  • Step 3: Apply Rule 2c – Section 3.1.2 (change of error impact) to update the sign of the error term:

    $$\text{Error vector of XFYZ }(\text{updated sign and error related to the X}\!-\!\mathrm{axis})=\left[\begin{array}{c}\left(-\right){\upvarepsilon }_{\mathrm{yx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}(+){\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ (+){\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\\ (-){\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\end{array}\right]$$
    (24)
    $$\text{Error vector of XYFZ }(\text{updated sign and error related to the Y}\!-\!\mathrm{axis})=\left[\begin{array}{c}-{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}\left(-\right){\upvarepsilon }_{\mathrm{yy}}\mathbf{z}\left(-\right){\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ {+\upvarepsilon }_{\mathrm{xx}}\mathbf{z}(+){\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\\ (+){\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\end{array}\right]$$
    (25)
    $$\text{Error vector of XYZF }(\text{updated sign and error related to the Z}\!-\!\mathrm{axis})=\left[\begin{array}{c}\left(+\right){\upvarepsilon }_{\mathrm{yx}}\mathbf{z}\left(+\right){\upvarepsilon }_{\mathrm{yy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ {\left(-\right)\upvarepsilon }_{\mathrm{xx}}\mathbf{z}(-){\upvarepsilon }_{\mathrm{xy}}\mathbf{z}\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}\end{array}\right]$$
    (26)

Herein, the sign of the PDGE-normal angular terms depends on both the error and the position of the axis combining with that error. Therefore, two parameters are required to model the impact of PDGE-normal angular terms. One parameter, \({\mathrm{R}}_{1}\) =  ± 1, is accounted for the angular error, while the other parameter, \({\mathrm{R}}_{2}\) =  ± 1, is accounted for the moving axis. However, these two parameters can be represented in the same form as \({\mathrm{R}}_{\mathrm{a},\mathrm{b},\mathrm{c}}\) =  ± 1, with a, b, and c denoting the primary, secondary, and third axes, respectively. This leads to the derivation of the unified vector form as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{PDGE}-\text{normal angular}-\mathrm{a}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\text{normal angular}-\mathrm{b}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\text{normal angular}-\mathrm{c}}\end{array}\right]=\left[\begin{array}{c}{\mathrm{R}}_{\mathrm{a}}{\mathrm{R}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{ba}}\mathbf{c}+{\mathrm{R}}_{\mathrm{b}}{\mathrm{R}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{bb}}\mathbf{c}-{\mathrm{R}}_{\mathrm{a}}{\mathrm{R}}_{\mathrm{b}}{\upvarepsilon }_{\mathrm{ca}}\mathbf{b}\\ -{\mathrm{R}}_{\mathrm{a}}{\mathrm{R}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{aa}}\mathbf{c}-{\mathrm{R}}_{\mathrm{b}}{\mathrm{R}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{ab}}\mathbf{c}\\ {\mathrm{R}}_{\mathrm{a}}{\mathrm{R}}_{\mathrm{b}}{\upvarepsilon }_{\mathrm{aa}}\mathbf{b}\end{array}\right]$$
(27)

Special angular errors

Only when attaching to the workpiece side can an axis combine with its angular errors, causing errors on the other axes. This is because, when the axis attaches to the tool side, the special angular errors only affect the tool orientation, not the tool position in the WCS. However, when the axis attaches to the workpiece side, the special angular errors can change the relative position of the WCS with respect to the tool, and lead to a change in position of the tool in the WCS. A demonstration of X-axis coupling with special angular errors is shown in Fig. 9.

Fig. 9
figure 9

Impact of special angular errors when the axis attaches to the workpiece

As in the case of the X-axis in Fig. 9, the six error terms caused by special angular errors and their own axes can be deduced and listed in vector form, as follows:

$$\mathrm{X}(\left[\begin{array}{c}0\\ +{\upvarepsilon }_{\mathrm{zx}}\mathbf{x}\\ -{\upvarepsilon }_{\mathrm{yx}}\mathbf{x}\end{array}\right]),\mathrm{ Y}(\left[\begin{array}{c}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y}\\ 0\\ +{\upvarepsilon }_{\mathrm{xy}}\mathbf{y}\end{array}\right]),\mathrm{ Z}(\left[\begin{array}{c}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{z}\\ -{\upvarepsilon }_{\mathrm{xz}}\mathbf{z}\\ 0\end{array}\right])$$
(28)

Distributing these terms together with the pre-defined error vector of the normal angular errors in previous parts, the complete version of the error vector caused by the PDGE-angular errors is as follows:

$$\textrm{Error}\ \textrm{vector}\ \textrm{of}\ \textrm{FXYZ}\ \left(\textrm{no}\ \textrm{update}\right)=\left[\begin{array}{c}+{\upvarepsilon}_{\textrm{yx}}\textbf{z}+{\upvarepsilon}_{\textrm{yy}}\textbf{z}-{\upvarepsilon}_{\textrm{zx}}\textbf{y}\\ {}-{\upvarepsilon}_{\textrm{xx}}\textbf{z}-{\upvarepsilon}_{\textrm{xy}}\textbf{z}\\ {}+{\upvarepsilon}_{\textrm{xx}}\textbf{y}\end{array}\right]\cdot$$
(29)
$$\text{Error vector of XFYZ }(\text{added special error of the X}\!-\!\mathrm{axis})=\left[\begin{array}{c}-{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}+{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}+({\upvarepsilon }_{\mathrm{zx}}\mathbf{x})\\ -{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}+(-{\upvarepsilon }_{\mathrm{yx}}\mathbf{x})\end{array}\right]$$
(30)
$$\text{Error vector of XYFZ }\left(\text{added special error of the X and Y}\!-\!\mathrm{axes}\right)=\left[\begin{array}{c}-{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}+(-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y})\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}+({\upvarepsilon }_{\mathrm{zx}}\mathbf{x})\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}+(-{\upvarepsilon }_{\mathrm{yx}}\mathbf{x})+({\upvarepsilon }_{\mathrm{xy}}\mathbf{y})\end{array}\right]$$
(31)
$$\text{Error vector of XYZF }\left(\text{added special error of the X},\mathrm{ Y},\text{ and Z}\!-\!\mathrm{axes}\right)=\left[\begin{array}{c}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}+(-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y})+(+{\upvarepsilon }_{\mathrm{yz}}\mathbf{z})\\ -{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}+({\upvarepsilon }_{\mathrm{zx}}\mathbf{x})+(-{\upvarepsilon }_{\mathrm{xz}}\mathbf{z})\\ +{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}+(-{\upvarepsilon }_{\mathrm{yx}}\mathbf{x})+(+{\upvarepsilon }_{\mathrm{xy}}\mathbf{y})\end{array}\right]$$
(32)

Herein, one parameter, \({\mathrm{W}}_{\mathrm{a},\mathrm{b},\mathrm{c}}\) = 0 or 1, is sufficient for modeling the impact of special angular errors, with a, b, and c denoting the primary, secondary, and third axes, respectively. Then, the unified vector form is as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{PDGE}-\text{special angular}-\mathrm{a}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\text{special angular}-\mathrm{b}}\\ {\mathrm{E}}_{\mathrm{PDGE}-\text{special angular}-\mathrm{c}}\end{array}\right]=\left[\begin{array}{c}{\mathrm{W}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{bc}}\mathbf{c}-{\mathrm{W}}_{\mathrm{b}}{\upvarepsilon }_{\mathrm{cb}}\mathbf{b}\\ {\mathrm{W}}_{\mathrm{a}}{\upvarepsilon }_{\mathrm{ca}}\mathbf{a}-{\mathrm{W}}_{\mathrm{c}}{\upvarepsilon }_{\mathrm{ac}}\mathbf{c}\\ {\mathrm{W}}_{\mathrm{b}}{\upvarepsilon }_{\mathrm{ab}}\mathbf{b}-{\mathrm{W}}_{\mathrm{a}}{\upvarepsilon }_{\mathrm{ba}}\mathbf{a}\end{array}\right]$$
(33)

3.4 Unified error model

The error vectors were obtained in Sects. 3.2 and 3.3. For the sake of convenience of visualization and comparison, by placing the determined PDGE-linear terms, PDGE-normal angular terms, PDGE-special angular terms, and PIGE terms in square brackets, adding one more parameter (\(\Phi\)) accounting for the forward and backward CS groups, and re-organizing appropriately, the unified error model can be formulated completely. The details are given below:

$${\displaystyle \begin{array}{c}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{a}}\\ {}{\textrm{E}}_{\textrm{b}}\\ {}{\textrm{E}}_{\textrm{c}}\end{array}\right]=\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{c}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{c}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{c}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{c}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{c}}\end{array}\right]=\left[\begin{array}{c}{\textrm{L}}_{\textrm{a}}{\updelta}_{\textrm{aa}}+{\textrm{L}}_{\textrm{b}}{\updelta}_{\textrm{ab}}+{\textrm{L}}_{\textrm{c}}{\updelta}_{\textrm{ac}}\\ {}{\textrm{L}}_{\textrm{a}}{\updelta}_{\textrm{ba}}+{\textrm{L}}_{\textrm{b}}{\updelta}_{\textrm{bb}}+{\textrm{L}}_{\textrm{c}}{\updelta}_{\textrm{bc}}\\ {}{\textrm{L}}_{\textrm{a}}{\updelta}_{\textrm{ca}}+{\textrm{L}}_{\textrm{b}}{\updelta}_{\textrm{cb}}+{\textrm{L}}_{\textrm{c}}{\updelta}_{\textrm{cc}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{c}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{R}}_{\textrm{a}}{\textrm{R}}_{\textrm{c}}{\upvarepsilon}_{\textrm{ba}}\textbf{c}+{\textrm{R}}_{\textrm{b}}{\textrm{R}}_{\textrm{c}}{\upvarepsilon}_{\textrm{bb}}\textbf{c}-{\textrm{R}}_{\textrm{a}}{\textrm{R}}_{\textrm{b}}{\upvarepsilon}_{\textrm{ca}}\textbf{b}\right)\\ {}-\Phi \left({\textrm{R}}_{\textrm{a}}{\textrm{R}}_{\textrm{c}}{\upvarepsilon}_{\textrm{aa}}\textbf{c}+{\textrm{R}}_{\textrm{b}}{\textrm{R}}_{\textrm{c}}{\upvarepsilon}_{\textrm{ab}}\textbf{c}\right)\\ {}\Phi \left({\textrm{R}}_{\textrm{a}}{\textrm{R}}_{\textrm{b}}{\upvarepsilon}_{\textrm{aa}}\textbf{b}\right)\end{array}\right],\end{array}\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{c}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{W}}_{\textrm{c}}{\upvarepsilon}_{\textrm{bc}}\textbf{c}-{\textrm{W}}_{\textrm{b}}{\upvarepsilon}_{\textrm{cb}}\textbf{b}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{a}}{\upvarepsilon}_{\textrm{ca}}\textbf{a}-{\textrm{W}}_{\textrm{c}}{\upvarepsilon}_{\textrm{ac}}\textbf{c}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{b}}{\upvarepsilon}_{\textrm{ab}}\textbf{b}-{\textrm{W}}_{\textrm{a}}{\upvarepsilon}_{\textrm{ba}}\textbf{a}\right)\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{a}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{b}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{c}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\uplambda}_{\textrm{c}}{\textrm{K}}_{\textrm{c}}{\textrm{s}}_{\textrm{ac}}\textbf{c}-{\uplambda}_{\textrm{b}}{\textrm{K}}_{\textrm{b}}{\textrm{s}}_{\textrm{ab}}\textbf{b}\right)\\ {}\Phi \left({\uplambda}_{\textrm{a}}{\textrm{K}}_{\textrm{a}}{\textrm{s}}_{\textrm{ba}}\textbf{a}-{\uplambda}_{\textrm{c}}{\textrm{K}}_{\textrm{c}}{\textrm{s}}_{\textrm{bc}}\textbf{c}\right)\\ {}\Phi \left({\uplambda}_{\textrm{b}}{\textrm{K}}_{\textrm{b}}{\textrm{s}}_{\textrm{cb}}\textbf{b}-{\uplambda}_{\textrm{a}}{\textrm{K}}_{\textrm{a}}{\textrm{s}}_{\textrm{ca}}\textbf{a}\right)\end{array}\right]\cdot \end{array}}$$
(34)

The notations are as follows.

For PDGElinear error:

\({\mathrm{L}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=-1\) when the a, b, or c axis is between the WCS and the RCS (attached to the workpiece side).

\({\mathrm{L}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=+1\) when the a, b, or c axis is between the RCS and the TCS (attached to the tool side).

For PDGEnormal angular error:

\({\mathrm{R}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=-1\) when the a, b, or c axis is between the WCS and the RCS (attached to the workpiece side).

\({\mathrm{R}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=+1\) when the a, b, or c axis is between the RCS and the TCS (attached to the tool side).

For PDGEspecial angular error:

\({\mathrm{W}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=+1\) when the a, b, or c axis is between the WCS and the RCS (attached to the workpiece side).

\({\mathrm{W}}_{\mathrm{a},\mathrm{b},\mathrm{c}}= 0\) when the a, b, or c axis is between the RCS and the TCS (attached to the tool side).

For PIGE:

\({\mathrm{K}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=-1\) When the a, b, or c axis is between the WCS and the RCS (attached to the workpiece side).

\({\mathrm{K}}_{\mathrm{a},\mathrm{b},\mathrm{c}}=+1\) when the a, b, or c axis is between the RCS and the TCS (attached to the tool side).

\({\uplambda }_{\mathrm{a},\mathrm{b},\mathrm{c}}=0\) when the axis is the primary axis, or when the axis is the secondary axis and \({\uplambda }_{\mathrm{a},\mathrm{b},\mathrm{c}}\) is located in the third axis term.

\({\uplambda }_{\mathrm{a},\mathrm{b},\mathrm{c}}=1\) when the axis is the third axis, or when the axis is the secondary axis and \({\uplambda }_{\mathrm{a},\mathrm{b},\mathrm{c}}\) is located in the primary axis term.

For transforming between the forward and backward CS groups:

\(\Phi =+1\) if the order of a → b → c is in the forward direction (forward CS).

\(\Phi =-1\) if the order of a → b → c is in the backward direction (backward CS).

4 Theoretical verification of the unified error model

The unified error model was defined completely in Section 3.4. To verify this, two representative examples are presented: the vertical (YFXZ) type and the horizontal (ZFXY) type (Fig. 10).

Fig. 10
figure 10

YFXZ and ZFXY configurations

A flowchart of the error vector-generating process is shown in Fig. 11. It is possible to develop software that, upon entering the configuration name like YFXZ, automatically analyzes and computes parameters such as \(\mathrm{L},\ \mathrm{ R}, \mathrm{ W}, \,\mathrm{ K}, \,\uplambda, \,\Phi\) This makes it easier to calculate the error vector.

Fig. 11
figure 11

Procedure for generating the error vector

4.1 Example of vertical type configuration (YFXZ)

The error vector of the YFXZ configuration (vertical milling machine) was derived based on the conventional method described in Section 2. The error vector is generated again based on the proposed method.

  • Step 1: Substitute the characters according to the name of the configuration:

    a → y; b → x; c → z;

  • Step 2: Determine the required parameters:

    Ly = \(-\)1 (Y-axis is attached to the workpiece side); Lx = 1; Lz = 1;

    Ry = \(-\)1 (Y-axis is attached to the workpiece side); Rx = 1; Rz = 1;

    Wy = 1 (Y-axis is attached to the workpiece side); Wx = 0; Wz = 0;

    Ky = \(-\)1 (Y-axis is attached to the workpiece side); Kx = 1; Kz = 1;

    λy = 0; λx = 0 (in Z-axis error component), λx = 1 (in Y-axis error component); λz = 1; (P-S-T order is Y-X–Z).

    Φ = \(-\)1 (YFXZ is the backward direction);

  • Step 3: Substitute characters and parameters into the unified error model formula:

Converting characters:

$${\displaystyle \begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{a}}\\ {}{\textrm{E}}_{\textrm{b}}\\ {}{\textrm{E}}_{\textrm{c}}\end{array}\right]=\left[\begin{array}{c}{\textrm{E}}_{\textrm{y}}\\ {}{\textrm{E}}_{\textrm{x}}\\ {}{\textrm{E}}_{\textrm{z}}\end{array}\right]=\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{yy}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{yx}}+{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{yz}}\\ {}{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{xy}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{xx}}+{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{xz}}\\ {}{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{zy}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{zx}}+{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{zz}}\end{array}\right],\\ {}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{R}}_{\textrm{y}}{\textrm{R}}_{\textrm{z}}{\upvarepsilon}_{\textrm{xy}}\textbf{z}+{\textrm{R}}_{\textrm{x}}{\textrm{R}}_{\textrm{z}}{\upvarepsilon}_{\textrm{xx}}\textbf{z}-{\textrm{R}}_{\textrm{y}}{\textrm{R}}_{\textrm{x}}{\upvarepsilon}_{\textrm{zy}}\textbf{x}\right)\\ {}-\Phi \left({\textrm{R}}_{\textrm{y}}{\textrm{R}}_{\textrm{z}}{\upvarepsilon}_{\textrm{yy}}\textbf{z}+{\textrm{R}}_{\textrm{x}}{\textrm{R}}_{\textrm{z}}{\upvarepsilon}_{\textrm{yx}}\textbf{z}\right)\\ {}\Phi \left({\textrm{R}}_{\textrm{y}}{\textrm{R}}_{\textrm{x}}{\upvarepsilon}_{\textrm{yy}}\textbf{x}\right)\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{W}}_{\textrm{z}}{\upvarepsilon}_{\textrm{xz}}\textbf{z}-{\textrm{W}}_{\textrm{x}}{\upvarepsilon}_{\textrm{zx}}\textbf{x}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{y}}{\upvarepsilon}_{\textrm{zy}}\textbf{y}-{\textrm{W}}_{\textrm{z}}{\upvarepsilon}_{\textrm{yz}}\textbf{z}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{x}}{\upvarepsilon}_{\textrm{yx}}\textbf{x}-{\textrm{W}}_{\textrm{y}}{\upvarepsilon}_{\textrm{xy}}\textbf{y}\right)\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\uplambda}_{\textrm{z}}{\textrm{K}}_{\textrm{z}}{\textrm{s}}_{\textrm{yz}}\textbf{z}-{\uplambda}_{\textrm{x}}{\textrm{K}}_{\textrm{x}}{\textrm{s}}_{\textrm{yx}}\textbf{x}\right)\\ {}\Phi \left({\uplambda}_{\textrm{y}}{\textrm{K}}_{\textrm{y}}{\textrm{s}}_{\textrm{xy}}\textbf{y}-{\uplambda}_{\textrm{z}}{\textrm{K}}_{\textrm{z}}{\textrm{s}}_{\textrm{xz}}\textbf{z}\right)\\ {}\Phi \left({\uplambda}_{\textrm{x}}{\textrm{K}}_{\textrm{x}}{\textrm{s}}_{\textrm{zx}}\textbf{x}-{\uplambda}_{\textrm{y}}{\textrm{K}}_{\textrm{y}}{\textrm{s}}_{\textrm{zy}}\textbf{y}\right)\end{array}\right]\end{array}\end{array}}$$
(35)

Substituting values:

$${\displaystyle \begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\left(-1\right){\updelta}_{\textrm{yy}}+(1){\updelta}_{\textrm{yx}}+(1){\updelta}_{\textrm{yz}}\\ {}\left(-1\right){\updelta}_{\textrm{xy}}+(1){\updelta}_{\textrm{xx}}+(1){\updelta}_{\textrm{xz}}\\ {}\left(-1\right){\updelta}_{\textrm{zy}}+(1){\updelta}_{\textrm{zx}}+(1){\updelta}_{\textrm{zz}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\left(-1\right)\left[\left(-1\right)(1){\upvarepsilon}_{\textrm{xy}}\textbf{z}+(1)(1){\upvarepsilon}_{\textrm{xx}}\textbf{z}-\left(-1\right)(1){\upvarepsilon}_{\textrm{zy}}\textbf{x}\right]\\ {}-\left(-1\right)\left[\left(-1\right)(1){\upvarepsilon}_{\textrm{yy}}\textbf{z}+(1)(1){\upvarepsilon}_{\textrm{yx}}\textbf{z}\right]\\ {}\left(-1\right)\left[\left(-1\right)(1){\upvarepsilon}_{\textrm{yy}}\textbf{x}\right]\end{array}\right],\\ {}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\left(-1\right)\left[(0){\upvarepsilon}_{\textrm{xz}}\textbf{z}-(0){\upvarepsilon}_{\textrm{zx}}\textbf{x}\right]\\ {}\left(-1\right)\left[(1){\upvarepsilon}_{\textrm{zy}}\textbf{y}-(0){\upvarepsilon}_{\textrm{yz}}\textbf{z}\right]\\ {}\left(-1\right)\left[(0){\upvarepsilon}_{\textrm{yx}}\textbf{x}-(1){\upvarepsilon}_{\textrm{xy}}\textbf{y}\right]\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\end{array}\right]=\left[\begin{array}{c}\left(-1\right)\left[(1)(1){\textrm{s}}_{\textrm{yz}}\textbf{z}-(1)(1){\textrm{s}}_{\textrm{yx}}\textbf{x}\right]\\ {}\left(-1\right)\left[(0)\left(-1\right){\textrm{s}}_{\textrm{xy}}\textbf{y}-(1)(1){\textrm{s}}_{\textrm{xz}}\textbf{z}\right]\\ {}\left(-1\right)\left[(0)(1){\textrm{s}}_{\textrm{zx}}\textbf{x}-(0)\left(-1\right){\textrm{s}}_{\textrm{zy}}\textbf{y}\right]\end{array}\right]\end{array}\end{array}}$$
(36)

Combining the results:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{y}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{z}}\end{array}\right]=\left[\begin{array}{c}{-\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yz}}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{x}-{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}+{\mathrm{s}}_{\mathrm{yx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xz}}-{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y}+{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}\\ {-\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zz}}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{x}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{y} \end{array}\right]$$
(37)

The calculation of the error vector of YFXZ using the conventional method was shown in Section 2, as follows:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\\ {\mathrm{E}}_{\mathrm{z}}\end{array}\right]= \left[\begin{array}{c}{\updelta }_{\mathrm{xx}}-{\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xz}}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}+{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}\\ {\updelta }_{\mathrm{yx}}-{\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yz}}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{x}-{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}+{\mathrm{s}}_{\mathrm{yx}}\mathbf{x}-{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ {\updelta }_{\mathrm{zx}}-{\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zz}}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{x}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{y}\end{array}\right]$$
(38)

As shown by the results of Eqs. (37) and (38), the conventional and proposed methods are in perfect agreement. Therefore, the use of the unified error model for a vertical configuration (YFXZ) has been demonstrated and validated.

4.2 Example of horizontal type configuration (ZFXY)

Herein, the unified error model is utilized again for a horizontal milling machine (ZFXY). The similar procedure is described in the following:

  • Step 1: Input the characters from the name of the configuration:

    a → z; b → x; c → y;

  • Step 2: Determine the parameters:

    Lz = \(-\)1 (Z-axis is attached to the workpiece side); Lx = 1; Ly = 1;

    Rz = \(-\)1 (Z-axis is attached to the workpiece side); Rx = 1; Ry = 1;

    Wz = 1 (Z-axis is attached to the workpiece side); Wx = 0; Wy = 0;

    Kz = \(-\)1 (Z-axis is attached to the workpiece side); Kx = 1; Ky = 1;

    λz = 0; λx = 0 (in the Y-axis error component), λx = 1 (in the Z-axis error component); λy = 1; (P-S-T order is Z-X-Y).

    Φ =  + 1 (ZFXY is the forward direction);

  • Step 3: Substitute the characters and parameters into the unified error model formula:

Converting characters:

$${\displaystyle \begin{array}{c}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{a}}\\ {}{\textrm{E}}_{\textrm{b}}\\ {}{\textrm{E}}_{\textrm{c}}\end{array}\right]=\left[\begin{array}{c}{\textrm{E}}_{\textrm{z}}\\ {}{\textrm{E}}_{\textrm{x}}\\ {}{\textrm{E}}_{\textrm{y}}\end{array}\right]=\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\end{array}\right]+\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{zz}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{zx}}+{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{zy}}\\ {}{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{xz}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{xx}}+{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{xy}}\\ {}{\textrm{L}}_{\textrm{z}}{\updelta}_{\textrm{yz}}+{\textrm{L}}_{\textrm{x}}{\updelta}_{\textrm{yx}}+{\textrm{L}}_{\textrm{y}}{\updelta}_{\textrm{yy}}\end{array}\right],\\ {}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{R}}_{\textrm{z}}{\textrm{R}}_{\textrm{y}}{\upvarepsilon}_{\textrm{xz}}\textbf{y}+{\textrm{R}}_{\textrm{x}}{\textrm{R}}_{\textrm{y}}{\upvarepsilon}_{\textrm{xx}}\textbf{y}-{\textrm{R}}_{\textrm{z}}{\textrm{R}}_{\textrm{x}}{\upvarepsilon}_{\textrm{yz}}\textbf{x}\right)\\ {}-\Phi \left({\textrm{R}}_{\textrm{z}}{\textrm{R}}_{\textrm{y}}{\upvarepsilon}_{\textrm{zz}}\textbf{y}+{\textrm{R}}_{\textrm{x}}{\textrm{R}}_{\textrm{y}}{\upvarepsilon}_{\textrm{zx}}\textbf{y}\right)\\ {}\Phi \left({\textrm{R}}_{\textrm{z}}{\textrm{R}}_{\textrm{x}}{\upvarepsilon}_{\textrm{zz}}\textbf{x}\right)\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\textrm{W}}_{\textrm{y}}{\upvarepsilon}_{\textrm{xy}}\textbf{y}-{\textrm{W}}_{\textrm{x}}{\upvarepsilon}_{\textrm{yx}}\textbf{x}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{z}}{\upvarepsilon}_{\textrm{yz}}\textbf{z}-{\textrm{W}}_{\textrm{y}}{\upvarepsilon}_{\textrm{zy}}\textbf{y}\right)\\ {}\Phi \left({\textrm{W}}_{\textrm{x}}{\upvarepsilon}_{\textrm{zx}}\textbf{x}-{\textrm{W}}_{\textrm{z}}{\upvarepsilon}_{\textrm{xz}}\textbf{z}\right)\end{array}\right],\end{array}\end{array}\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}\Phi \left({\uplambda}_{\textrm{y}}{\textrm{K}}_{\textrm{y}}{\textrm{s}}_{\textrm{zy}}\textbf{y}-{\uplambda}_{\textrm{x}}{\textrm{K}}_{\textrm{x}}{\textrm{s}}_{\textrm{zx}}\textbf{x}\right)\\ {}\Phi \left({\uplambda}_{\textrm{z}}{\textrm{K}}_{\textrm{z}}{\textrm{s}}_{\textrm{xz}}\textbf{z}-{\uplambda}_{\textrm{y}}{\textrm{K}}_{\textrm{y}}{\textrm{s}}_{\textrm{xy}}\textbf{y}\right)\\ {}\Phi \left({\uplambda}_{\textrm{x}}{\textrm{K}}_{\textrm{x}}{\textrm{s}}_{\textrm{yx}}\textbf{x}-{\uplambda}_{\textrm{z}}{\textrm{K}}_{\textrm{z}}{\textrm{s}}_{\textrm{yz}}\textbf{z}\right)\end{array}\right]\end{array}}$$
(39)

Substituting values:

$${\displaystyle \begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{linear}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}\left(-1\right){\updelta}_{\textrm{zz}}+(1){\updelta}_{\textrm{zx}}+(1){\updelta}_{\textrm{zy}}\\ {}\left(-1\right){\updelta}_{\textrm{xz}}+(1){\updelta}_{\textrm{xx}}+(1){\updelta}_{\textrm{xy}}\\ {}\left(-1\right){\updelta}_{\textrm{yz}}+(1){\updelta}_{\textrm{yx}}+(1){\updelta}_{\textrm{yy}}\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{normal}\ \textrm{angular}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}(1)\left[(1){\upvarepsilon}_{\textrm{xz}}\textbf{y}+(1)(1){\upvarepsilon}_{\textrm{xx}}\textbf{y}-\left(-1\right)(1){\upvarepsilon}_{\textrm{yz}}\textbf{x}\right]\\ {}-(1)\left[\left(-1\right)(1){\upvarepsilon}_{\textrm{zz}}\textbf{y}+(1)(1){\upvarepsilon}_{\textrm{zx}}\textbf{y}\right]\\ {}(1)\left[\left(-1\right)(1){\upvarepsilon}_{\textrm{zz}}\textbf{x}\right]\end{array}\right],\\ {}\begin{array}{c}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PDGE}-\textrm{special}\ \textrm{angular}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}(1)\left[(0){\upvarepsilon}_{\textrm{xy}}\textbf{y}-(0){\upvarepsilon}_{\textrm{yx}}\textbf{x}\right]\\ {}(1)\left[(1){\upvarepsilon}_{\textrm{yz}}\textbf{z}-(0){\upvarepsilon}_{\textrm{zy}}\textbf{y}\right]\\ {}(1)\left[(0){\upvarepsilon}_{\textrm{zx}}\textbf{x}-(1){\upvarepsilon}_{\textrm{xz}}\textbf{z}\right]\end{array}\right],\\ {}\left[\begin{array}{c}{\textrm{E}}_{\textrm{PIGE}-\textrm{z}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{x}}\\ {}{\textrm{E}}_{\textrm{PIGE}-\textrm{y}}\end{array}\right]=\left[\begin{array}{c}(1)\left[(1)(1){\textrm{s}}_{\textrm{zy}}\textbf{y}-(1)(1){\textrm{s}}_{\textrm{zx}}\textbf{x}\right]\\ {}(1)\left[(0)\left(-1\right){\textrm{s}}_{\textrm{xz}}\textbf{z}-(1)(1){\textrm{s}}_{\textrm{xy}}\textbf{y}\right]\\ {}(1)\left[(0)(1){\textrm{s}}_{\textrm{yx}}\textbf{x}-(0)\left(-1\right){\textrm{s}}_{\textrm{yz}}\textbf{z}\right]\end{array}\right]\end{array}\end{array}}$$
(40)

Combining the results:

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{z}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\end{array}\right]= \left[\begin{array}{c}{-\updelta }_{\mathrm{zz}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{y}+{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{x}+{\mathrm{s}}_{\mathrm{zy}}\mathbf{y}-{\mathrm{s}}_{\mathrm{zx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xz}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}+{\upvarepsilon }_{\mathrm{zz}}\mathbf{y}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{z}-{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ {-\updelta }_{\mathrm{yz}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}-{\upvarepsilon }_{\mathrm{zz}}\mathbf{x}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{z} \end{array}\right]$$
(41)

The procedure of the conventional method is applied to calculate the error vector of ZFXY in the same way as the calculation of YFXZ, as follows.

$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\\ {\mathrm{E}}_{\mathrm{z}}\\ 1\end{array}\right]={\left({\mathbf{M}}_{\mathrm{Z}}{\mathbf{E}}_{\mathrm{Z}}\right)}^{-1}\times {\mathbf{S}}_{\mathrm{ZX}}{\mathbf{M}}_{\mathrm{X}}{\mathbf{E}}_{\mathrm{X}}\times {\mathbf{S}}_{\mathrm{ZY}}{\mathbf{S}}_{\mathrm{XY}}{\mathbf{M}}_{\mathrm{Y}}{\mathbf{E}}_{\mathrm{Y}}-{\left({\mathbf{M}}_{\mathrm{Z}}\right)}^{-1}{\mathbf{M}}_{\mathrm{X}}{\mathbf{M}}_{\mathrm{Y}}\times \left[\begin{array}{c}0\\ 0\\ 0\\ 1\end{array}\right]$$
(42)
$$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\\ {\mathrm{E}}_{\mathrm{z}}\end{array}\right]=\left[\begin{array}{c}{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}-{\updelta }_{\mathrm{xz}}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}+{\upvarepsilon }_{\mathrm{zz}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{z}-{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ {\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}-{\updelta }_{\mathrm{yz}}-{\upvarepsilon }_{\mathrm{zz}}\mathbf{x}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{z}\\ {\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}-{\updelta }_{\mathrm{zz}}+{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{x}-{\mathrm{s}}_{\mathrm{zx}}\mathbf{x}+{\mathrm{s}}_{\mathrm{zy}}\mathbf{y}\end{array}\right]$$
(43)

The results of Eqs. (41) and (43) again show the agreement between the conventional and proposed methods.

Although only two examples are presented here, it is expected that the unified error model can correctly generate error vectors for all 24 configurations, regardless of type (i.e., vertical or horizontal).

4.3 Conversion between different configurations sharing similar structural form

From a pre-derived formula of a configuration (YFXZ), another configuration that shares a similar form (ZFXY) can be derived under the assumption that the primary axis is closest to the workpiece and the third axis is closest to the tool. Herein, using the rule for determining the Φ parameter, the error vector of YFXZ (backward direction configuration) can be converted to the error vector of ZFXY (forward direction configuration), as shown in Fig. 12.

Fig. 12
figure 12

The two steps for converting the error vector from one configuration to another

The rule is that when converting the error formula of one configuration to another configuration sharing a similar form, after swapping the characters appropriately (e.g., converting YFXZ to ZFXY, y → z, and z → y), if both of these configurations are forward- or backward-direction configurations, then Φ does not require updating. However, if they are not the same type, then Φ = \(-\)1 must be applied. This means that all error terms related to PIGEs and PDGE-angular errors must be multiplied by \(-\)1. Herein, Φ = \(-\)1 is required, because YFXZ is the backward direction type, whereas ZFXY is the forward direction type.

  • Step 1: Swap the characters:

    Before the swapping step:

    $$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{y}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathbf{z}}\end{array}\right]=\left[\begin{array}{c}{-\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yz}}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}-{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{x}-{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}+{\mathrm{s}}_{\mathrm{yx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xz}}-{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{y}+{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}\\ {-\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zz}}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{x}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{y}\end{array}\right]$$
    (44)

    After the swapping step (y → z and z → y):

    $$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{z}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\end{array}\right]=\left[\begin{array}{c}{-\updelta }_{\mathrm{zz}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}+{\upvarepsilon }_{\mathrm{xz}}\mathbf{y}-{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}-{\upvarepsilon }_{\mathrm{yz}}\mathbf{x}-{\mathrm{s}}_{\mathrm{zy}}\mathbf{y}+{\mathrm{s}}_{\mathrm{zx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xz}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}-{\upvarepsilon }_{\mathrm{zz}}\mathbf{y}+{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}-{\upvarepsilon }_{\mathrm{yz}}\mathbf{z}+{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ {-\updelta }_{\mathrm{yz}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}+{\upvarepsilon }_{\mathrm{zz}}\mathbf{x}+{\upvarepsilon }_{\mathrm{xz}}\mathbf{z}\end{array}\right]$$
    (45)
  • Step 2: Apply the change in Φ, from Φ = 1 to Φ = \(-\) 1 by multiplying all error terms relating the PIGEs and PDGE-angular errors by \(-\) 1.

    $$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{z}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\end{array}\right]=\left[\begin{array}{c}{-\updelta }_{\mathrm{zz}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}+\left(-1\right){\upvarepsilon }_{\mathrm{xz}}\mathbf{y}-\left(-1\right){\upvarepsilon }_{\mathrm{xx}}\mathbf{y}-\left(-1\right){\upvarepsilon }_{\mathrm{yz}}\mathbf{x}-\left(-1\right){\mathrm{s}}_{\mathrm{zy}}\mathbf{y}+\left(-1\right){\mathrm{s}}_{\mathrm{zx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xz}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}-(-1){\upvarepsilon }_{\mathrm{zz}}\mathbf{y}+\left(-1\right){\upvarepsilon }_{\mathrm{zx}}\mathbf{y}-\left(-1\right){\upvarepsilon }_{\mathrm{yz}}\mathbf{z}+\left(-1\right){\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ {-\updelta }_{\mathrm{yz}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}+\left(-1\right){\upvarepsilon }_{\mathrm{zz}}\mathbf{x}+\left(-1\right){\upvarepsilon }_{\mathrm{xz}}\mathbf{z}\end{array}\right]$$
    (46)

    The results after applying the change of Φ are as follows:

    $$\left[\begin{array}{c}\mathrm{E}{}_{\mathrm{z}}\\ {\mathrm{E}}_{\mathrm{x}}\\ {\mathrm{E}}_{\mathrm{y}}\end{array}\right]= \left[\begin{array}{c}{-\updelta }_{\mathrm{zz}}+{\updelta }_{\mathrm{zx}}+{\updelta }_{\mathrm{zy}}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{y}+{\upvarepsilon }_{\mathrm{xx}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{x}+{\mathrm{s}}_{\mathrm{zy}}\mathbf{y}-{\mathrm{s}}_{\mathrm{zx}}\mathbf{x}\\ {-\updelta }_{\mathrm{xz}}+{\updelta }_{\mathrm{xx}}+{\updelta }_{\mathrm{xy}}+{\upvarepsilon }_{\mathrm{zz}}\mathbf{y}-{\upvarepsilon }_{\mathrm{zx}}\mathbf{y}+{\upvarepsilon }_{\mathrm{yz}}\mathbf{z}-{\mathrm{s}}_{\mathrm{xy}}\mathbf{y}\\ {-\updelta }_{\mathrm{yz}}+{\updelta }_{\mathrm{yx}}+{\updelta }_{\mathrm{yy}}-{\upvarepsilon }_{\mathrm{zz}}\mathbf{x}-{\upvarepsilon }_{\mathrm{xz}}\mathbf{z}\end{array}\right]$$
    (47)

    The result in Eq. (47) shows good agreement with the result obtained previously in Eq. (41). Once again, the availability of the unified error model is confirmed.

4.4 Compensation strategy

The error vectors obtained from the unified error model can be converted easily into the compensation vectors (Fig. 13). The procedure has two steps, as follows:

  • Step 1: Multiply the error vector by (\(-\)1) to obtain the “raw” compensation vector.

  • Step 2: Multiply the components of the compensation vector in step 1 by (\(-\)1) if the axis is attached to the workpiece side.

Fig. 13
figure 13

Compensation vector generating procedure

For example, in the vertical type configuration of YFXZ, the compensation vector should be treated in the machine coordinate system (MCS) as follows. \({\Delta }_{\mathrm{x}},{\Delta }_{\mathrm{y}},\) and \({\Delta }_{\mathrm{z}}\) represent the values that must be additionally input to the original machine coordinate values for correction.

$$\left[\begin{array}{c}\Delta {}_{\mathrm{x}}\\ \Delta {}_{\mathrm{y}}\\ \Delta {}_{\mathrm{z}}\end{array}\right]=-\left[\begin{array}{c}{\updelta }_{\mathrm{xx}}-{\updelta }_{\mathrm{xy}}+{\updelta }_{\mathrm{xz}}-{\upvarepsilon }_{\mathrm{zy}}\left(-1\right)\mathbf{y}+{\upvarepsilon }_{\mathrm{yx}}\mathbf{z}-{\upvarepsilon }_{\mathrm{yy}}\mathbf{z}+{\mathrm{s}}_{\mathrm{xz}}\mathbf{z}\\ {\updelta }_{\mathrm{yx}}-{\updelta }_{\mathrm{yy}}+{\updelta }_{\mathrm{yz}}-{\upvarepsilon }_{\mathrm{zy}}\mathbf{x}-{\upvarepsilon }_{\mathrm{xx}}\mathbf{z}+{\upvarepsilon }_{\mathrm{xy}}\mathbf{z}+{\mathrm{s}}_{\mathrm{yx}}\mathbf{x}-{\mathrm{s}}_{\mathrm{yz}}\mathbf{z}\\ {\updelta }_{\mathrm{zx}}-{\updelta }_{\mathrm{zy}}+{\updelta }_{\mathrm{zz}}+{\upvarepsilon }_{\mathrm{yy}}\mathbf{x}+{\upvarepsilon }_{\mathrm{xy}}\left(-1\right)\mathbf{y}\end{array}\right]$$
(48)

In the conventional approach, compensation vectors had to be calculated separately, relying on the error vectors for each configuration of the three-axis machine tools. However, by utilizing the unified error model developed in this study, the calculation of these compensation vectors becomes considerably more straightforward (Fig. 14). When configuration names like YFXZ are input into the unified error model, it automatically analyzes and computes each parameter, such as \(\mathrm{L},\mathrm{ R},\mathrm{ W},\mathrm{ K},\uplambda ,\Phi\). Ultimately, it generates compensation vectors for the machine tools, enabling it to function as a universal compensator.

Fig. 14
figure 14

Comparison of the conventional and proposed approach for compensation vector generation

5 Experimental validation

The unified error model was experimentally validated through its implementation on a YFXZ type vertical three-axis testbed, as illustrated in Fig. 15. The testbed employs THK linear motion guides (SSR 15&20) and ball screws (BNK 1505&2005), and it is driven by a PC-based controller (LS Mecapion, MXP V2.0) that supports EtherCAT communication. An encoder incorporated into the motor supplies feedback instead of using a linear scale. The traversal distances for the X, Y, and Z-axes are 500 mm, 500 mm, and 200 mm, respectively.

Fig. 15
figure 15

Vertical three-axis testbed for experiments

5.1 Measurement of geometric errors

The three squareness errors were assessed using Renishaw’s XK10 alignment laser system. This system includes a launch unit equipped with a diode laser and a pentaprism, which allows for a 90-degree beam switch. Moreover, an M unit, equipped with a 2-axis position-sensitive diode, enables position detection. This arrangement permits the measurement of individual axes’ straightness errors as well as squareness errors between two axes. The 6 degrees of freedom (6-DOF) errors for each axis were measured using Renishaw’s XM-60 multi-axis calibrator. The XM-60 calibrator is composed of a laser launch unit and a receiver, facilitating wireless measurement of all 6-DOF motion errors simultaneously from a single setup.

Figure 16 offers a photograph depicting the measurement of the squareness error between the Y and X-axes, the Y and Z-axes, and the X and Z-axes. Figure 17 provides the measurement of the 6-DOF motion errors for the X, Y, and Z-axes. The corresponding results are illustrated in Fig. 18, with all errors being measured three times and then averaged. The assessed squareness errors between the Y and X-axes, Y and Z-axes, and X and Z-axes were determined to be syx = 40 μrad, syz = 558 μrad, and sxz =  − 1238 μrad, respectively. These measured geometric errors indicate that the values are relatively large, primarily owing to the design characteristics of the testbed.

Fig. 16
figure 16

Measurement of squareness errors between three linear axes

Fig. 17
figure 17

Measurement of 6-DOF motion errors

Fig. 18
figure 18

Measurement results of 6-DOF motion errors

5.2 Compensation of geometric errors

After measuring the 21 geometric errors, they were utilized as inputs for both the error vector and the compensation vector, as derived from the unified error model. These vectors were then applied to calculate volumetric errors and compensation values at arbitrary 3-dimensional coordinates. Following this, we measured and compared the geometric errors before and after applying compensation using the PC-based controller.

The 6-DOF motion errors were measured within the machine coordinate system to calculate the volumetric errors. Among these errors, certain linear ones were utilized after eliminating the influence caused by angular errors, considering the actual measured location. Figure 19 visually presents the 3-dimensional volumetric errors as a scatter plot within the working volume of the three-axis testbed. It can be noted that the volumetric error is predominantly influenced by angular errors, encompassing squareness errors. At the position where x = 500 mm, y =  − 500 mm, and z = 0 mm, the maximum error recorded was 403.3 µm.

Fig. 19
figure 19

Visualization of 3-dimensional volumetric error

Among the various methods available for implementing compensation values in the controller, we have elected to use the approach of modifying the G-code. While this method does not afford real-time compensation, we maintain that it is sufficient to validate the effectiveness of the unified error model.

Following the modification of the G-code based on the compensation vector, we measured and compared the three squareness errors and nine linear errors to the results obtained prior to applying compensation. The results, depicted in Fig. 20 and Table 3, reveal that the compensation has led to a significant improvement in both squareness and linear errors, exhibiting an improvement of at least 85%.

Fig. 20
figure 20

Compensation results of linear errors

Table 3 Comparison of geometric errors before and after compensation

6 Conclusion

This paper presents a new approach for providing a unified error model to generate error vectors for all 24 configurations of three-axis machine tools, with six selections of primary-secondary-third orders of axes. Instead of considering all geometric errors simultaneously, the proposed method systematically analyzes the errors of a few subgroups and recombines the error terms in the final step. Thus, this approach clearly clarifies the influence of geometric errors. By employing the unified error model, the computational cost of calculating error and compensation vectors for all 24 configurations can be minimized, enabling its versatile application as a universal compensator.

  1. (1)

    The proposed unified error model has been theoretically verified through comparison with a conventional method for two representative three-axis machine tool configurations.

  2. (2)

    The unified error model can be applied to not only generate error vectors for all configurations but also to convert error vectors of a particular configuration to other configurations sharing the same structural form.

  3. (3)

    The compensation vectors can be easily obtained from the unified error model for all configurations of three-axis machine tools. As a result, they are expected to be valuable in the development of a compensation software module aimed at improving the accuracy of three-axis machine tools.

  4. (4)

    The application of the proposed method to a vertical three-axis testbed, which has led to a significant improvement in accuracy after offline compensation, has confirmed the effectiveness of the proposed approach.