1 Introduction

Profile error is an important feature to evaluate the machining quality of sculptured surfaces. More and more studies have been done to improve the algorithms of calculating the profile error [1]. The least squares fitting was adopted to evaluate the profile error of the ellipse. The data was obtained by the coordinate measuring machine (CMM) [2]. Geometry optimization approximation algorithm was proposed to calculate the elliptical profile error considering the geometric characteristics [3]. Profile error could be obtained by non-uniform rational B-splines (NURBS) surface fitting according to the data points. NURBS surface fitting was accepted when the center axis was difficult to obtain [4]. The singular value decomposition-iterative closest point method was proposed to match the measurement points and the ideal section curve. Based on this, the profile error of the blade surface was calculated and balanced [5]. Surface reconstruction was implemented by the genetic algorithm. The profile error was evaluated by calculating the shortest distance between measurement points and sculptured surface in the split spherical approximation method [6]. In our lab, Lang et al. [7] proposed the sequential quadratic programming (SQP) algorithm to calculate the profile error. The computing speed is faster, and the result is more approach to the optimal solution.

However, the method of calculating the profile error could not get the corresponding uncertainty. The “Guide to the expression of uncertainty in measurement” is a standard of evaluating the uncertainty. The international organization revised the GUM in 2008, which has been accepted all over the world [8]. GUMM is a method to estimate the uncertainty by calculating the first-order Taylor series expansion of profile error. The GUMM was used to analyze the uncertainty about the location of a hole [9]. Though the GUMM is a standard method to calculate the uncertainty, it also has some limitations. GUMM can only be applied in the linear models [10]. When the actual situation does not meet the requirement, some alternative methods are put forward. The idea of the random-fuzzy and fuzzy-random uncertainties was proposed to estimate the uncertainty [11]. GUM S1 [12] used the Monte Carlo method (MCM) to analyze the uncertainty without considering the distribution of the output variable and the format of the mathematical model. The MCM is mainly based on the statistical analysis to calculate the uncertainty [13]. When the partial derivatives of the model could not be calculated, Cox and Siebert [14] adopted the MCM to calculate the expanded uncertainty. The MCM was used to evaluate the uncertainty in an experimental model, which reduced the work load of calculating the partial derivatives in a non-linear model [15]. The proper number of the experiment is difficult to determine in the Monte Carlo simulation. The AMCM was proposed because it could adaptively select the proper number of the experiment [16]. However, the prior information of the distributions is often unknown or inaccurate in AMCM. In this situation, AMCM is not suitable to calculate the uncertainty. It can still be used as a suitable method to evaluate the GUMM. The second-order GUMM was proposed to estimate the uncertainty considering the difficulty of the prior information. In 2011, the second-order and third-order Taylor series expansion in GUMM were adopted to calculate the uncertainty in a simple non-linear model [17]. However, the relativity of variables was neglected, which led to the imprecise result. In 2013, Wen et al. [18] calculated the uncertainty of cylindricity errors in AMCM and GUMM. The model is non-linear, so the first-order Taylor series expansion is inadequate. The uncertainty of measuring points in different coordinate axes directions was not calculated, and on the contrary the measuring points uncertainty was estimated by considering the limited factors, which was imprecise and complex. Although virtual coordinate measuring machine has been developed to estimate the uncertainty [19], virtual CMM is usually adopted when the actual data is difficult to be obtained.

The paper structure is as follows: Section 2 establishes a mathematical model of profile error. In Section 3, the second-order Taylor series expansion of GUMM is proposed to calculate the uncertainty. Some improvements of GUMM are also listed. Subsequently, two practical examples are presented in Section 4. Section 5 compares and discusses the AMCM and GUMM. AMCM is used for evaluating the GUMM. The conclusion is drawn in Section 6.

2 Mathematical Model of Profile Error

Profile error is the greatest deviation between the actual sculptured surfaces and the theoretical sculptured surfaces [20], as shown in Figure 1, where t is the diameter of the enveloping spheres.

Figure 1
figure 1

Sketch of the profile error

The model of sculptured surfaces profile error is shown as follows [7]:

$$f = 2\left\{ \begin{aligned} \left[ \begin{aligned} \cos \beta \cos \gamma x_{i} + (\sin \alpha \sin \beta \cos \gamma - \cos \alpha \sin \gamma )y_{i} \hfill \\ + (\cos \alpha \sin \beta \cos \gamma + \sin \alpha \sin \gamma )z_{i} + \Delta x - x^{\prime}_{i} \hfill \\ \end{aligned} \right]^{ 2} \hfill \\ + \left[ \begin{aligned} \cos \beta \sin \gamma x_{i} + (\sin \alpha \sin \beta \sin \gamma + \cos \alpha \cos \gamma )y_{i} \hfill \\ + (\cos \alpha \sin \beta \sin \gamma - \sin \alpha \cos \gamma )z_{i} + \Delta y - y^{\prime}_{i} \hfill \\ \end{aligned} \right]^{ 2} \hfill \\ + \left[ { - \sin \beta x_{i} + \sin \alpha \cos \beta y_{i} + \cos \alpha \cos \beta z_{i} + \Delta z - z^{\prime}_{i} } \right]^{ 2} \hfill \\ \end{aligned} \right\}^{1/2},$$
(1)

where \(\alpha ,\beta ,\gamma\) are the rotation angles of measuring points along the directions of \(X\) axis, \(Y\) axis and \(Z\) axis respectively, \(\Delta x,\Delta y,\Delta z\) are the offsets along the directions of \(X\) axis, \(Y\) axis and \(Z\) axis respectively, \(s_{i} (x_{i} ,y_{i} ,z_{i} )\) is the initial measuring point, \(s_{i}^{\prime } (x_{i}^{\prime } ,y_{i}^{\prime } ,z_{i}^{\prime } )\) is the closest point. The meaning of the symbols \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) is shown in Figure 2.

Figure 2
figure 2

The meaning of the symbols

3 Uncertainty Calculation Methods

3.1 Gumm

Taylor expansion of the non-linear model \(f = f(m_{ 1} ,m_{ 2} , \ldots ,m_{n} )\) in the neighborhood of the point \((m_{ 1}^{ 0} ,m_{ 2}^{ 0} , \cdot \cdot \cdot ,m_{n}^{ 0} )\) is given as follows:

$$\begin{aligned}& f = f(m_{ 1}^{ 0} ,m_{ 2}^{ 0} , \cdot \cdot \cdot ,m_{n}^{ 0} ) + \sum\limits_{i = 1}^{n} {\frac{\partial f}{{\partial m_{i} }}} \delta m_{i} + \frac{1}{2}\sum\limits_{i = 1}^{n - 1} {\sum\limits_{j = i + 1}^{n}} \left( \frac{{\partial^{2} f}}{{\partial^{2} m_{i} }}\delta^{2} m_{i} \right. \\&\quad{{ \left. + 2\frac{{\partial^{2} f}}{{\partial m_{i} \partial m_{j} }}\delta x_{i} \delta x_{j} + \frac{{\partial^{2} f}}{{\partial^{2} m_{j} }}\delta^{2} m_{j} \right)} } + o(\delta^{3} ). \hfill \\ \end{aligned}$$
(2)

where partial derivative \(\partial f/\partial ( \cdot )\) is the sensitivity coefficient of each variable, \(\delta^{p} m_{i}\) is defined as \(\delta^{p} m_{i} { = }(m_{i} - m_{i}^{0} )^{p} ,i = 1, \ldots ,n,p = 1,2,3\).

Then strive for the variance or covariance of Eq. (2) at the left and right sides. The square of uncertainty calculation formula [21] is given as follows:

$$\begin{aligned} &u^{2} (f) \approx \sum\limits_{i = 1}^{n} {\left(\frac{\partial f}{{\partial m_{i} }}\right)^{2} } u^{2} (m_{i} ) + 2\sum\limits_{i = 1}^{n - 1} {\sum\limits_{j = i + 1}^{n} {\frac{\partial f}{{\partial m_{i} }}\frac{\partial f}{{\partial m_{j} }}} } \text{cov} (m_{i} ,m_{j} )\\&\quad + \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {\left[ {\frac{1}{2}\left(\frac{{\partial^{2} f}}{{\partial m_{i} \partial m_{j} }}\right)^{2} + \frac{\partial f}{{\partial m_{i} }}\frac{{\partial^{3} f}}{{\partial m_{i} \partial^{2} m_{j} }}} \right]} } \;r^{2} (m_{i} ,m_{j} )u^{2} (m_{i} )u^{2} (m_{j} ), \hfill \\ \end{aligned}$$
(3)

where \(u( \cdot )\) is the standard uncertainty of each variable and \(r( \cdot {\kern 1pt} \,,\, \cdot )\) is the correlation coefficient between two different variables.

3.2 Uncertainty Evaluation Formulas

In order to calculate the uncertainty of profile error, we need to consider the calculation of the sensitivity coefficient and the standard uncertainty of variables [22].

The closest point \(s_{i}^{\prime } \left( {x_{i}^{\prime } ,y_{i}^{\prime } ,z_{i}^{\prime } } \right)\) can be determined by measuring points \(s_{i} (x_{i} ,y_{i} ,z_{i} )\) and the transformation matrix \(\varvec{T}(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z)\), so it is no need to consider the uncertainty of the three variables \(x_{i}^{\prime } ,y_{i}^{\prime } ,z_{i}^{\prime }\). \(x_{i} ,y_{i} ,z_{i}\) are the coordinates of measuring points, so they are independent in theory. \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) are the rotation angles and offsets of the measuring points, and the change of one variable can directly cause the changes of other variables. \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) interact on each other. Assuming \(x_{i} ,y_{i} ,z_{i}\)are independent and \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\)are related, Eq. (3) will be turned into Eq. (4) and Eq. (5).

According to the uncertainty propagation law, we can get the square of uncertainty calculation formula [23, 24]. The first-order Taylor expansion:

$$u_{1}^{2} (f) = \sum\limits_{i = 1}^{9} {\left(\frac{\partial f}{{\partial m_{i} }}\right)^{2} } u^{2} (m_{i} ) + 2\sum\limits_{i = 4}^{8} {\sum\limits_{j = 5}^{9} {\frac{\partial f}{{\partial m_{i} }}\frac{\partial f}{{\partial m_{j} }}} } u(m_{i} ,m_{j} ).$$
(4)

The second-order Taylor expansion:

$$\begin{aligned} u_{2}^{2} (f) = & \sum\limits_{i = 1}^{9} {\left( {\frac{\partial f}{{\partial m_{i} }}} \right)^{2} } u^{2} (m_{i} ) + 2\sum\limits_{i = 4}^{8} {\sum\limits_{j = 5}^{9} {\frac{\partial f}{{\partial m_{i} }}\frac{\partial f}{{\partial m_{j} }}} } u(m_{i} ,m_{j} ) \\& + \sum\limits_{i = 1}^{9} {\left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} m_{i} }}} \right)^{2} + \frac{\partial f}{{\partial m_{i} }}\frac{{\partial^{3} f}}{{\partial^{3} m_{i} }}} \right]} \;u^{4} (m_{i} ) \\& + \sum\limits_{i = 4}^{8} {\sum\limits_{j = 5}^{9} {\left[ {\left( {\frac{{\partial^{2} f}}{{\partial m_{i} \partial m_{j} }}} \right)^{2} + \frac{\partial f}{{\partial m_{i} }}\frac{{\partial^{3} f}}{{\partial m_{i} \partial^{2} m_{j} }} + \frac{\partial f}{{\partial m_{j} }}\frac{{\partial^{3} f}}{{\partial m_{j} \partial^{2} m_{i} }}} \right]} } \;u^{2} (m_{i} ,m_{j} ). \\ \end{aligned}$$
(5)

The symbols of the nine variables \((x_{i} ,y_{i} ,z_{i} ,\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z)\) are shown in Table 1.

Table 1 Symbolic representation

According to Table 1, Eq. (4) and Eq. (5) can be turned into Eq. (6) and Eqs. (6)–(12) respectively. The first-order Taylor expansion to calculate the uncertainty is shown as follows:

$$\begin{aligned} u_{1}^{2} (f) = & \left( {\frac{\partial f}{{\partial x_{i} }}} \right)^{2} u^{2} (x_{i} ) + \left( {\frac{\partial f}{{\partial y_{i} }}} \right)^{2} u^{2} (y_{i} ) + \left( {\frac{\partial f}{{\partial z_{i} }}} \right)^{2} u^{2} (z_{i} ) + \left( {\frac{\partial f}{\partial \alpha }} \right)^{2} u^{2} (\alpha ) + \left( {\frac{\partial f}{\partial \beta }} \right)^{2} u^{2} (\beta ) + \left( {\frac{\partial f}{\partial \gamma }} \right)^{2} u^{2} (\gamma ) \\& + \left( {\frac{\partial f}{\partial \Delta x}} \right)^{2} u^{2} (\Delta x) + \left( {\frac{\partial f}{\partial \Delta y}} \right)^{2} u^{2} (\Delta y) + \left( {\frac{\partial f}{\partial \Delta z}} \right)^{2} u^{2} (\Delta z) + 2\frac{\partial f}{\partial \alpha }\frac{\partial f}{\partial \beta }u(\alpha ,\beta ) + 2\frac{\partial f}{\partial \alpha }\frac{\partial f}{\partial \gamma }u(\alpha ,\gamma ) \\& + 2\frac{\partial f}{\partial \alpha }\frac{\partial f}{\partial \Delta x}u(\alpha ,\Delta x) + 2\frac{\partial f}{\partial \alpha }\frac{\partial f}{\partial \Delta y}u(\alpha ,\Delta y) + 2\frac{\partial f}{\partial \alpha }\frac{\partial f}{\partial \Delta z}u(\alpha ,\Delta z) + 2\frac{\partial f}{\partial \beta }\frac{\partial f}{\partial \gamma }u(\beta ,\gamma ) \\& + 2\frac{\partial f}{\partial \beta }\frac{\partial f}{\partial \Delta x}u(\beta ,\Delta x) + 2\frac{\partial f}{\partial \beta }\frac{\partial f}{\partial \Delta y}u(\beta ,\Delta y) + 2\frac{\partial f}{\partial \beta }\frac{\partial f}{\partial \Delta z}u(\beta ,\Delta z) + 2\frac{\partial f}{\partial \gamma }\frac{\partial f}{\partial \Delta x}u(\gamma ,\Delta x) \\& + 2\frac{\partial f}{\partial \gamma }\frac{\partial f}{\partial \Delta y}u(\gamma ,\Delta y) + 2\frac{\partial f}{\partial \gamma }\frac{\partial f}{\partial \Delta z}u(\gamma ,\Delta z) + 2\frac{\partial f}{\partial \Delta x}\frac{\partial f}{\partial \Delta y}u(\Delta x,\Delta y) + 2\frac{\partial f}{\partial \Delta x}\frac{\partial f}{\partial \Delta z}u(\Delta x,\Delta z) \\& + 2\frac{\partial f}{\partial \Delta y}\frac{\partial f}{\partial \Delta z}u(\Delta y,\Delta z). \\& \end{aligned}$$
(6)

For the second-order Taylor expansion except for the part of the first-order, the formulas are shown as follows:

$$\begin{aligned} u_{21}^{2} (f) = & \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} x_{i} }}} \right)^{2} + \left( {\frac{\partial f}{{\partial x_{i} }}\frac{{\partial^{3} f}}{{\partial^{3} x_{i} }}} \right)^{2} } \right]u^{4} (x_{i} ) + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} y_{i} }}} \right)^{2} + \left( {\frac{\partial f}{{\partial y_{i} }}\frac{{\partial^{3} f}}{{\partial^{3} y_{i} }}} \right)^{2} } \right]u^{4} (y_{i} ) \\& + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} z_{i} }}} \right)^{2} + \left( {\frac{\partial f}{{\partial z_{i} }}\frac{{\partial^{3} f}}{{\partial^{3} z_{i} }}} \right)^{2} } \right]u^{4} (z_{i} ) + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \alpha }}} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial^{3} \alpha }}} \right)^{2} } \right]u^{4} (\alpha ) \\& + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \beta }}} \right)^{2} + \left( {\frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial^{3} \beta }}} \right)^{2} } \right]u^{4} (\beta ) + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \gamma }}} \right)^{2} + \left( {\frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial^{3} \gamma }}} \right)^{2} } \right]u^{4} (\gamma ) \\& + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \Delta x}}} \right)^{2} + \left( {\frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial^{3} \Delta x}}} \right)^{2} } \right]u^{4} (\Delta x) + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \Delta y}}} \right)^{2} + \left( {\frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial^{3} \Delta y}}} \right)^{2} } \right]u^{4} (\Delta y) \\& + \left[ {\frac{1}{2}\left( {\frac{{\partial^{2} f}}{{\partial^{2} \Delta z}}} \right)^{2} + \left( {\frac{\partial f}{\partial \Delta z}\frac{{\partial^{3} f}}{{\partial^{3} \Delta z}}} \right)^{2} } \right]u^{4} (\Delta z), \\& \end{aligned}$$
(7)
$$\begin{aligned} u_{22}^{2} (f)& = \left[ {\left( {\frac{{\partial^{2} f}}{\partial \alpha \partial \beta }} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial \alpha \partial^{2} \beta }} + \frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \alpha }}} \right)} \right]u^{2} (\alpha ,\beta ) \\& \quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \alpha \partial \gamma }} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial \alpha \partial^{2} \gamma }} + \frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial \gamma \partial^{2} \alpha }}} \right)} \right]u^{2} (\alpha ,\gamma ) \\& \quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \alpha \partial \Delta x}} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial \alpha \partial^{2} \Delta x}} + \frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial \Delta x\partial^{2} \alpha }}} \right)} \right]u^{2} (\alpha ,\Delta x) \\& \quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \alpha \partial \Delta y}} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial \alpha \partial^{2} \Delta y}} + \frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial \Delta y\partial^{2} \alpha }}} \right)} \right]u^{2} (\alpha ,\Delta y) \\& \quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \alpha \partial \Delta z}} \right)^{2} + \left( {\frac{\partial f}{\partial \alpha }\frac{{\partial^{3} f}}{{\partial \alpha \partial^{2} \Delta z}} + \frac{\partial f}{\partial \Delta z}\frac{{\partial^{3} f}}{{\partial \Delta z\partial^{2} \alpha }}} \right)} \right]u^{2} (\alpha ,\Delta z), \\& \end{aligned}$$
(8)
$$\begin{aligned} &u_{23}^{2} (f) = \left[\left( {\frac{{\partial^{2} f}}{\partial \beta \partial \gamma }} \right)^{2} + \left( {\frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \gamma }} + \frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial \gamma \partial^{2} \beta }}} \right)\right]u^{2} (\beta ,\gamma ) \\& + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \beta \partial \Delta x}} \right)^{2} + \left( {\frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \Delta x}} + \frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial \Delta x\partial^{2} \beta }}} \right)} \right]u^{2} (\beta ,\Delta x) \\& + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \beta \partial \Delta y}} \right)^{2} + \left( {\frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \Delta y}} + \frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial \Delta y\partial^{2} \beta }}} \right)} \right]u^{2} (\beta ,\Delta y) \\& + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \beta \partial \Delta z}} \right)^{2} + \left( {\frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \Delta z}} + \frac{\partial f}{\partial \beta }\frac{{\partial^{3} f}}{{\partial \beta \partial^{2} \beta }}} \right)} \right]u^{2} (\beta ,\Delta z), \\& \end{aligned}$$
(9)
$$\begin{aligned} u_{24}^{2} (f) &= \left[ {\left( {\frac{{\partial^{2} f}}{\partial \gamma \partial \Delta x}} \right)^{2} + \left( {\frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial \gamma \partial^{2} \Delta x}} + \frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial \Delta x\partial^{2} \gamma }}} \right)} \right]u^{2} (\gamma ,\Delta x) \\&\quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \gamma \partial \Delta y}} \right)^{2} + \left( {\frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial \gamma \partial^{2} \Delta y}} + \frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial \Delta y\partial^{2} \gamma }}} \right)} \right]u^{2} (\gamma ,\Delta y) \\&\quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \gamma \partial \Delta z}} \right)^{2} + \left( {\frac{\partial f}{\partial \gamma }\frac{{\partial^{3} f}}{{\partial \gamma \partial^{2} \Delta z}} + \frac{\partial f}{\partial \Delta z}\frac{{\partial^{3} f}}{{\partial \Delta z\partial^{2} \gamma }}} \right)} \right]u^{2} (\gamma ,\Delta z), \\ \end{aligned}$$
(10)
$$\begin{aligned} u_{25}^{2} (f)& = \left[{\left( {\frac{{\partial^{2} f}}{\partial \Delta x\partial \Delta y}} \right)^{2} + \left( {\frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial \Delta x\partial^{2} \Delta y}} + \frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial \Delta y\partial^{2} \Delta x}}} \right)}\right]u^{2} (\Delta x,\Delta y) \\&\quad + \left[ {\left( {\frac{{\partial^{2} f}}{\partial \Delta x\partial \Delta z}} \right)^{2} + \left[ {\frac{\partial f}{\partial \Delta x}\frac{{\partial^{3} f}}{{\partial \Delta x\partial^{2} \Delta z}} + \frac{\partial f}{\partial \Delta z}\frac{{\partial^{3} f}}{{\partial \Delta z\partial^{2} \Delta x}}} \right)} \right]u^{2} (\Delta x,\Delta z), \\ \end{aligned}$$
(11)
$$u_{26}^{2} (f) = \left[ {\left( {\frac{{\partial^{2} f}}{\partial \Delta y\partial \Delta z}} \right)^{2} + \left( {\frac{\partial f}{\partial \Delta y}\frac{{\partial^{3} f}}{{\partial \Delta y\partial^{2} \Delta z}} + \frac{\partial f}{\partial \Delta z}\frac{{\partial^{3} f}}{{\partial \Delta z\partial^{2} \Delta y}}} \right)} \right]u^{2} (\Delta y,\Delta z).$$
(12)

Finally, we get the final uncertainty Eq. (13) of the second-order Taylor expansion:

$$\begin{aligned} u_{2} (f) = \hfill \\ \sqrt {u_{1}^{2} (f) + u_{21}^{2} (f) + u_{22}^{2} (f) + u_{23}^{2} (f) + u_{24}^{2} (f) + u_{25}^{2} (f) + u_{26}^{2} (f)} . \hfill \\ \end{aligned}$$
(13)

3.3 Improvements of GUMM

  1. (1)

    For measuring points uncertainty:

    The uncertainties in the directions of \(X\) axis, \(Y\) axis and \(Z\) axis are written as \(ux,\;uy,\;uz\) respectively. They are different and have their own trends, so we cannot use \(u0\) to replace \(ux,uy,uz\). The \(u0\) is obtained by estimating some influence factors. The \(u0\) is not accurate, because the factors that are considered are limited. \(u0\) is difficult to estimate in this situation of this paper. Whereas \(ux,uy,uz\) can be easily calculated according to the measuring points \(s_{i} (x_{i} ,y_{i} ,z_{i} )\). We adopt \(ux,uy,uz\) to calculate the uncertainty.

  2. (2)

    For the uncertainty of \(\varvec{T}(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z)\):

    In order to calculate the uncertainty, the uncertainty of \(\varvec{T}(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z)\) is also a necessary value. In most cases, the relativity of variables is too high to neglect. The relativity of variables \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) must be considered.

  3. (3)

    For the converge factor about the unknown distribution:

    When the probability density function (PDF) of profile errors is not the Gaussian distribution or t-distribution, the k-factor conversion method is proposed to calculate the converge factor. The conversion method is to approximate the coverage factor of the non-normal distribution.

The skewness coefficient is a parameter to describe the degree of deviation from the center. The formula of the skewness coefficient is shown in Ref. [25]. The skewness coefficient of the profile error is given as follows:

$$SK = \frac{{{\text{E}}(f - \bar{f})^{3} }}{{[Var(f)]^{3/2} }},$$
(14)

where f is the profile error, \(\bar{f}\) is the mean of profile error, \(Var(f)\) is the variance of profile error.

When the skewness coefficient is unequal to zero, the converge factor \(k_{down}\) is unequal to \(k_{up}\). When the distribution of the output variable is the normal distribution, \(k_{down} ,\,\,k_{up}\) are equal to 2 for the 95% confidence interval [26]. When the distribution of the output variable is unknown, assuming \(k_{down} + k_{up}\) is equal to 4. It is the same as the situation of normal distribution. According to the sample values, we can get the mean of profile error \(\bar{f}\), 2.5%-quantile \(Q_{0.025}\) and 97.5%-quantile \(Q_{0.975}\). Then calculate \(k_{down}\) and \(k_{up}\) in the k-factor conversion method.

$$k_{down} = 4 \times \frac{{\bar{f} - Q_{0.025} }}{{Q_{0.975} - Q_{0.025} }},$$
(15)
$$k_{up} = 4 \times \frac{{Q_{0.975} - \bar{f}}}{{Q_{0.975} - Q_{0.025} }}.$$
(16)

We can get the 95% confidence interval of profile error in GUMM as follows:

$$[f_{down} ,f_{up} ] = [\bar{f} - k_{down} \times u,{\kern 1pt} \,\bar{f} + k_{up} \times u]$$
(17)

where \(u\) is the uncertainty of the profile error.

4 Experiment

S-shaped test specimen has been put off in recent years and it has been proved to be a good specimen to detect the machining quality [27, 28]. S-shaped test specimen is adopted as examples to analyze the second-order GUMM. Two practical S-shaped test specimens were measured many times by Edward DAISY564 CMM in the same environment condition. The temperature is controlled at 20 °C and the fluctuation is less than 1 °C. The edition of measuring software is AC-DIMSv5.2, and the maximal measuring distances are 500 mm, 600 mm, 400 mm in the directions of \(X\) axis, \(Y\) axis and \(Z\) axis respectively. The maximum permissible error is \({\text{MPE}}_{\text{E}} \le (2 + L/300)\;\upmu{\text{m,}}\) the maximum allowable space detection error is \({\text{MPE}}_{\text{P}} \le 2.2\;\upmu{\text{m}} .\) Before the experiment, the Edward DAISY564 CMM should be initialized. The probe should be installed and inspected according to the standard. Two S-shaped test specimens have different distributions of deviations shown in Figure 3. Different colors represent different deviations. The measuring experiment in CMM is shown in Figure 4.

Figure 3
figure 3

Distributions of deviations on two S-shaped test specimens

Figure 4
figure 4

CMM experiment for S-shaped test specimen

4.1 Profile Error and Uncertainty Calculation in Experiment 1

In Unigraphics NX, we set 5 rows along the Z directions and each row has 32 points. We select 160 points in the whole surface as the theoretical points. 100 groups of measuring points can be obtained in CMM according to the theoretical points. In the procedure, the points in the edge of the surface must avoid to be selected. The theoretical points are uniformly sampled on the sculptured surfaces as the green ones in Figure 5. The average measuring points of 100 groups are presented as the red ones in Figure 5. SQP is adopted to search the nearest points [7].

Figure 5
figure 5

The theoretical points and average measuring points

In SQP, we can get the profile error, the best transformation matrix and the nearest points. The mean of the profile errors \(\bar{f}\) is calculated as the final profile error. The value is 0.0656 mm. Then GUMM and AMCM are adopted to calculate the uncertainty.

  1. (1)

    GUMM

    According to the formula of uncertainty, we must get the uncertainties of measuring points and the uncertainties of transformation matrix in order to get the uncertainty of profile error. By measuring 160 points of the S-shaped test specimen 100 times, we get the uncertainties of the measuring points. The uncertainties in the directions of \(X\) axis, \(Y\) axis and \(Z\) axis have different values. The average values of the \(ux,\;uy,\;uz\)are \(\overline{ux} = 6.5\;\upmu {\text{m}},\) \(\overline{uy} = 0.615\;\upmu {\text{m}}, \,\)\(\overline{uz} = 1. 5\;\upmu {\text{m,}}\) respectively. The correlation coefficients \(\alpha \beta ,\;\alpha \gamma ,\;\alpha \Delta x,\;\alpha \Delta y,\;\alpha \Delta z,\;\beta \gamma ,\;\beta \Delta x\) \(\beta \Delta y,\;\beta \Delta z,\;\gamma \Delta x,\;\gamma \Delta y,\;\gamma \Delta z,\;\Delta x\Delta y,\;\Delta x\Delta z,\;\Delta y\Delta z\) can be calculated in SPSS and the values are shown in Table 2. It’s obvious that the correlation between these variables \(\alpha ,\;\beta ,\;\gamma ,\;\Delta x,\;\Delta y,\;\Delta z\) cannot be ignored. The covariance matrix is shown in Table 3.

    Table 2 Correlation coefficient matrix of \(\alpha ,\;\beta ,\;\gamma ,\;\Delta x,\;\Delta y,\;\Delta z\)
    Table 3 Covariance matrix of \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) (mm2)

    According to the GUMM, the uncertainty of the first-order Taylor expansion is calculated with Eq. (6) and the value is \(u1 = 0.0028968\) mm. The uncertainty of the second-order Taylor expansion is \(u2 = 0.02265\) mm calculated by Eqs. (6)–(13).

  2. (2)

    AMCM

    Estimating the distributions of variables is an important step to use AMCM [29]. The distributions of the measuring points coordinates follow the Gaussian distributions, which is tested by Kolmogorov–Smirnov Test in SPSS shown in Table 4. Because all the p-values (0.762, 0.712, 0.943) are greater than 0.05 (p > 0.05), the distributions of x, y, z all follow the Gaussian distributions. x, y, z are independent. They all follow the Gaussian distributions \(N(\mu ,\sigma^{2} )\), where \(\mu\) is the mean of each variable and \(\sigma^{2}\) is the variance of each variable shown in Table 4. The distribution of \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) follows the multivariate Gaussian distribution \(N(\mu ,\sigma^{2} )\), where \(\mu\) is the expectation vector, \(\mu = \left( {0.0005, - 0.0004,0.0001, - 0.0315,0.0320, - 0.0395} \right)\); \(\sigma^{2}\) is the covariance matrix shown in Table 3. The number of experiments is \(M = 10^{6}\), the frequency distribution of profile error in AMCM is shown in Figure 6, where the dashed lines are drawn in correspondence of the 95% confidence interval.

    Table 4 One-Sample Kolmogorov–Smirnov test
    Figure 6
    figure 6

    Frequency distribution of profile error in AMCM

    Using AMCM, the profile error is 0.0875 mm, the uncertainty is 0.0433 mm and the confidence interval of 95% is [0.0188, 0.1714] mm.

4.2 Profile Error and Uncertainty Calculation in Experiment 2

In Unigraphics NX, adaptive placement strategy is adopted to select 50 points. It is shown in Figure 7. The CMM measures these points 100 times repeatedly.

Figure 7
figure 7

Location of theoretical points

Using SQP, the profile error is 0.0993 mm. The best transformation matrix \(\varvec{T}(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z)\) and the nearest points \(s_{i}^{\prime } (x_{i}^{\prime } ,y_{i}^{\prime } ,z_{i}^{\prime } )\) are also obtained. The nine variables \(x_{i} ,y_{i} ,z_{i} ,\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) have been known, the covariance and variance between the variables can also be obtained. Then GUMM and AMCM are adopted to calculate the uncertainty.

  1. (1)

    GUMM

    The uncertainties of measuring points \(ux ,\;uy ,\;uz\) are \(\overline{ux} =5.97\;\upmu {\text{m,}}\) \(\overline{uy}=0.40697\;\upmu {\text{m,}}\) \(\overline{uz}=1.3\;\upmu {\text{m}} .\) Covariance matrix of the best transformation matrix is shown in Table 5.

    Table 5 Covariance matrix of \(\alpha ,\beta ,\gamma ,\Delta x,\Delta y,\Delta z\) (mm2)

    Based on the values, the uncertainty of the first-order GUMM is \(u1\, =\, 0.00199\;{\text{mm,}}\) the second order is \(u2 \, =\, 0.01945\;{\text{mm}} .\)

  2. (2)

    AMCM

    Refer to the principle of AMCM in experiment 1, the profile error is 0.1233 mm, the uncertainty is 0.0416 mm, the confidence interval of 95% is [0.0597, 0.2062] mm. The distribution of profile error in AMCM is shown in Figure 8.

    Figure 8
    figure 8

    Frequency distribution of profile error in AMCM

5 Results and Discussion

  1. (1)

    According to experiment 1:

    In GUMM, the skewness coefficient of profile error \(SK\) is 0.6287. The distribution of the profile error is asymmetrical and unknown. According to the 100 profile errors, the \(\bar{f} = 0.065574\;{\text{mm,}}\) \(Q_{0.025} = 0.05849\;{\text{mm}}\) and \(Q_{0.975} = 0.075034\;{\text{mm}}\) are obtained. According to Eqs. (15), (16), \(k_{down}\) and \(k_{up}\) are shown as follows:

    $$\begin{aligned} k_{{down}} = 4 \times \frac{0.065574 - 0.05849}{0.075034 - 0.05849} \approx 1.7, \hfill \\ k_{{up}} = 4 \times \frac{0.075034 - 0.065574}{0.075034 - 0.05849} \approx 2.3. \hfill \\ \end{aligned}$$

    The uncertainties are calculated in the first-order and the second-order GUMM. They are written as GUMM-1 and GUMM-2 respectively in Table 6 and Table 7. The coverage probability p is 0.95. dlow and dhigh are the difference of the GUM and AMCM in 95% confidence interval. When the first-order Taylor series expansion is considered in GUMM, the values of dlow and dhigh are far larger than those in GUMM-2 (0.0419 > 0.0083 & 0.09914 > 0.0537). In a word, the second-order GUMM is more precise to calculate the uncertainty of profile error.

    Table 6 Uncertainty evaluation results in experiment 1 (mm)
    Table 7 Uncertainty evaluation results in experiment 2 (mm)
  2. (2)

    According to experiment 2:

    In GUMM, the skewness coefficient is \(SK = - 0.4356\). The distribution of profile error is asymmetrical. Then the converge factors are shown as follows.

    $$\begin{aligned} k_{{down}} = 4 \times \frac{0.099314192 - 0.089258703}{0.106076038 - 0.089258703} \approx 2.4, \hfill \\ k_{{up}} = 4 \times \frac{0.106076038 - 0.099314192}{0.106076038 - 0.089258703} \approx 1.6. \hfill \\ \end{aligned}$$

    In Table 7, dlow and dhigh in GUMM-2 are less than those in GUMM-1 (0.00708 < 0.0348 & 0.07578 < 0.1037). It indicates that the second-order GUMM is more precise to calculate the uncertainty of profile error.

6 Conclusions

  1. (1)

    When the amount of data is limited, SQP can obtain the profile error accurately and quickly. However, when the amount of data is very large, SQP is time consuming. SQP is an appropriate method according to the proper CMM data in this paper.

  2. (2)

    When the mathematical model of profile error is non-linear, the second-order Taylor series expansion needs to be considered. The third order or a higher-order requires the calculation and analysis of tensors, which is difficult to achieve at present. The precise prior distributions of variables in AMCM are often difficult to obtain in most cases, so the AMCM is not widely used.

  3. (3)

    If you want to get different confidence intervals, you need to find the corresponding endpoints of the confidence intervals. If you want to obtain the shortest 99% confidence interval, you need to sort the profile error from the smallest to the largest. Then find the location of the left endpoint n in MATLAB. Next the right endpoint f(M * 99/100 + n) is obtained, where M is the number of experiments. The 99% confidence interval in AMCM is [f(n), f(M * 99/100 + n)]. In GUMM, you need to select the corresponding converge factors (k = 3 in 99% confidence interval). The details are shown in Ref. [30].