1 Introduction

In the past two decades, variation propagation modelling in multistage manufacturing processes has been actively researched. A significant contribution has been made in the directions of part quality prediction [1,2,3,4], variation source identification [5, 6], variation compensation [7, 8], and process-oriented tolerancing [9] in multistage manufacturing processes. These contributions are often studied under the concept of stream of variation (SoV) and model of a manufactured part [10]. The concept of SoV may apply techniques such as differential motion vector [11], equivalent fixture error [6], and kinematic analysis [12]. The concept of the model of the manufactured part applies small displacement torsor (SDT) [10, 13].

Despite the wide range of applications and extensions of these models, the fundamental mathematical modelling tools remained the same. All of the aforementioned models use homogenous transformation matrix (HTM), differential motion vector, and/or Jacobian matrix to represent and transform the part, tool and fixture coordinate systems and associated variations [10]. The variation propagation model’s complexity, matrix dimensions, and number of coordinate system significantly increase as the number of features and machining stations increase, especially when considering generic fixtures, locating surfaces, and machining error [1, 4, 14, 15]. In the case of SoV-related methods, for instance, the expression for virtual inspection requires square matrices whose dimensions are the number of features multiplied by 6. In the case of SDT-related methods, the Jacobian matrix that relates geometrical relationship between the functional requirement and functional element pairs is of the size 6 by 6 repeated by the number functional element pairs. These matrices can quickly become unwieldy with increase of the number of features and functional element pairs.

As an alternative, relatively less known mathematical tools, quaternions and their extension dual quaternions, are proposed in this paper. Quaternions are mathematical operators that use four parameters to rotate an object [16]. To translate an object, an extra quaternion is added with the help of dual algebra [17]. The two quaternions, when expressed in dual algebra, are collectively referred as a dual quaternion (DQ). Dual quaternions have 8 parameters, which is significantly lower than the 16 parameters of HTM. The HTMs are generated from a sequence of Euler angle–based operations. Using DQs, however, only a set of an axis and angle is needed to rotate an object. Furthermore, the same mathematical tools can also be used to represent the features of a part. Such advantages lead to a better computational efficiency of DQs relative HTM-based operations [18, 19]. Furthermore, since the same mathematical tools are used to represent and transform a part, fixture, and toolpath, the mathematical cumbersomeness associated in the operations is reduced. Given such advantages, dual quaternions have been used in wide range of applications such as in robotic controllers [20], face recognition [21], and object animation [22].

In this paper, we derive a mathematical model required to predict a part quality produced in multistage machining process using DQs. The first step is representing the part with DQs, followed by assembly of the part to a fixture, and machining by a toolpath plane. To assemble the part to a fixture, the distance between locators and the projected point onto corresponding datum feature reduced while considering the 3-2-1 fixture layout constraints.

The use of DQs in transformation, representation, and projection operations, associated with parts and fixtures, leads to a completely different strategy to solve the same modelling problem addressed by variation propagation models such as SoV and SDT. This strategy brings forward a novel application of DQs in variation propagation modelling by utilizing techniques using computational geometry and computer graphics, which branches out from the techniques used in SoV and SDT.

The paper is organized as follows. In Section 2, the background to quaternions and variation propagation in manufacturing are provided. In Section 3, the steps in variation propagation are discussed. Sections 4 and 5 present the case study and discussion. Section 6 presents the conclusion of the results.

2 Preliminaries

2.1 Quaternions

Quaternions are mathematical tools that use four parameters to rotate an object in a 3D space [16]. The quaternions have two parts: the real part q0 ∈  and the vector part \( \overline{q} \), which can be denoted by

$$ \overset{\sim }{q}={q}_0+{q}_1i+{q}_2j+{q}_3k=\left({q}_0,\overline{q}\right) $$
(1)

where q0, q1, q2, and q3 are quaternion quotients; i, j, and k are the unit vectors with properties i2 = j2 = k2 = ijk =  − 1.

The quaternion quotients are computed using angle θ and axis of rotation between two vectors. The axis of rotation, \( \overline{n}\in {\mathbb{R}}^3 \), is obtained from the vectors \( {\overline{n}}_1\in {\mathbb{R}}^3 \) and \( {\overline{n}}_2\in {\mathbb{R}}^3 \)

$$ \overset{\sim }{q}=\left(\cos \frac{\theta }{2},\overline{n}\sin \frac{\theta }{2}\right)=\left({q}_0,\overline{q}\right) $$
(2)

where \( \theta ={\cos}^{-1}\left(\frac{{\overline{n}}_1\cdotp {\overline{n}}_2}{\parallel {\overline{n}}_1\parallel \cdotp \parallel {\overline{n}}_2\parallel}\right)\in \left[0\ \pi \right] \) and \( \overline{n}={\overline{n}}_1\times {\overline{n}}_2 \)

2.2 Dual quaternions

Dual quaternions are extensions of quaternions based on dual algebra [17]. Dual quaternions embed the rotational and translational aspects of rigid transformation, simultaneously. Dual quaternions have two parts: the real component \( {\overset{\sim }{q}}_{\mathrm{r}} \) and dual components \( {\overset{\sim }{q}}_{\mathrm{d}} \).

$$ \hat{q}={\overset{\sim }{q}}_{\mathrm{r}}+\epsilon {\overset{\sim }{q}}_{\mathrm{d}} $$
(3)

where ϵ is a dual operator such that ϵ ≠ 0, ϵ2 = 0

The DQ representation of pure rotation is the real component. The rotation operator \( \hat{R} \) is denoted by,

$$ \hat{R}\left({\overline{n}}_1,{\overline{n}}_2\right)={\overset{\sim }{q}}_{\mathrm{r}}+\epsilon \left({0}_{1\times 4}\right) $$
(4)

The DQ representation of pure translation is the dual component. The translation operator \( \hat{T} \) is denoted by

$$ \hat{T}\left(\overline{t}\right)=\left(1,\left[0,0,0\ \right]\ \right)+\epsilon \left(0,\overline{\frac{t}{2}}\right) $$
(5)

where \( \overline{t}\in {\mathbb{R}}^3 \) is the vector part of the quaternion representing the distance between corresponding points on two objects.

The combined transformation operator is obtained from the multiplication of pure rotation and translation.

$$ \hat{e}={\overset{\sim }{R}}_{\mathrm{r}}+\epsilon \frac{t}{2}{\overset{\sim }{R}}_{\mathrm{r}}={\overset{\sim }{R}}_{\mathrm{r}}+\epsilon \frac{\overline{t}}{2} $$
(6)

where t ∈  is the norm of \( \overline{t} \)

The new pos of an object \( \hat{A} \) after transformation by \( \hat{e} \) is denoted by

$$ {\hat{A}}^{\prime }=\hat{e}\hat{A}{\hat{e}}^{\ast } $$
(7)

where \( {\hat{e}}^{\ast }={\overset{\sim }{R}}_{\mathrm{r}}-\epsilon \frac{\overline{t}}{2} \)

Equation (6) is equivalent to the 4 by 4 HTM and Eq. (7) is equivalent to a transformed object to new position when operated by HTM. Table 1 summarizes the quaternion and dual quaternion operations, exemplified by two quaternions \( \overset{\sim }{p} \) and \( \overset{\sim }{q} \), and two DQs \( \hat{p} \) and \( \hat{q} \). A more detailed description of quaternions and dual quaternions can be found in [23,24,25,26,27,28].

Table 1 Summary of quaternion and dual quaternion operations

2.3 Screw displacement

The above equations assume the axis of rotation passes through the origin of the reference feature. Screw representation combines the translation and rotation in one formulation. This is achieved by transforming the total transformation operator Eq. (6) is multiplied by translation operator Eq. (5), which is the operator associated with the distance of the axis from the reference origin [28]. Thus, for given point p on the axis of rotation, the combined rotation and translation in the direction of the \( \hat{RT} \) is given by

$$ \hat{RT}\left({\overline{n}}_1,{\overline{n}}_2,p,t\right)=\cos \frac{\theta +\epsilon t}{2}+\sin \frac{\theta +\epsilon t}{2}\Big(\overline{n}+\epsilon \left(\overline{n}\times p\right) $$
(8)

where \( \overline{n} \) is direction of displacement, and t is subsequent translation following the rotation by the angle between vectors \( {\overline{n}}_1 \) and \( {\overline{n}}_2 \)

It is worth noting that the total transformation of an object using Eq. (8) and Eq. (6) gives the same result. The choice of the operators is, therefore, a matter of convenience with respect to a specific application. However, when the desired transformation has an axis of rotation and direction of translation that are not collinear, Eq. (6) is the recommended option.

2.4 Representation of geometric primitives

Many engineering products can be constructed from a combination of planes, lines, and points. These geometric primitives can be represented by DQs, as illustrated in Fig. 1. A plane is represented by its normal and shortest distance from its coordinate system [29].

Fig. 1
figure 1

An illustration of interstation of a plane and a line along with symbols used in their corresponding expressions

For a plane normal \( {\overline{\pi}}_{\mathrm{r}}\in {\mathbb{R}}^3 \) (the vector part of the real component of a dual quaternion), and the shortest distance to the plane from the origin d ∈ , a plane is represented as

$$ \hat{\pi}={\overline{\pi}}_{\mathrm{r}}+\epsilon d $$
(9)

A line can be represented by two methods, mainly by applying the Plücker coordinate formulation [30]. In the first method, a line \( \hat{\Lambda} \) that has points a ∈ 3 and b ∈ 3 is represented by its direction \( \overline{U}=\Big(a-b \) ) and moment around the origin (a × b). A line can also be determined from the direction and a point, as shown in Fig. 1. Thus,

$$ \hat{\Lambda}\left(\overline{U},\mathrm{a}\right)=\left(a-b\right)+\epsilon\ \left(a\times b\right)=\overline{U}+\epsilon \left(\overline{U}\times \mathrm{a}\right) $$
(10)

In the second method, a line is obtained from the intersection of two planes [25]. For two given planes \( {\hat{\pi}}_1 \) and \( {\hat{\pi}}_2 \), a line \( \hat{\Lambda} \) is expressed as

$$ \hat{\Lambda}\left({\hat{\pi}}_1,{\hat{\pi}}_2\right)={\overline{\pi}}_{1,\mathrm{r}}\times {\overline{\pi}}_{2,\mathrm{r}}+\epsilon \left({\pi}_{2,0,\mathrm{d}}{\overline{\pi}}_{1,\mathrm{r}}-{\pi}_{1,0,\mathrm{d}}{\overline{\pi}}_{2,\mathrm{r}}\right) $$
(11)

where \( {\overline{\pi}}_{1,\mathrm{r}} \) and \( {\overline{\pi}}_{2,\mathrm{r}} \) are the vector components of the real part of \( {\hat{\pi}}_1 \) and \( {\hat{\pi}}_2 \), respectively; π1, 0, d and π2, 0, d are the scalar components of the dual parts of \( {\hat{\pi}}_1 \) and \( {\hat{\pi}}_2 \), respectively.

Moreover, the intersection point of a plane and line can be determined from the direction of a line and any point on the line [25]. The intersection point I given the direction of a line \( \overline{U} \) and a point on the line a can be obtained by

$$ I\left(\ \hat{\pi},\overline{U},a\right)={\overline{\pi}}_{\mathrm{r}}\times \left(\overline{U}\times a\right)-{\pi}_{0,\mathrm{d}}\overline{U} $$
(12)
$$ I\left(\hat{\pi},\hat{\Lambda}\right)={\overline{\pi}}_{\mathrm{r}}\times {\overline{\Lambda}}_{\mathrm{d}}-{\pi}_{0,\mathrm{d}}{\overline{\Lambda}}_{\mathrm{r}} $$
(13)

where \( {\overline{\pi}}_{\mathrm{r}}=\overline{n} \) ; \( {\overline{\Lambda}}_{\mathrm{d}}=\left(\overline{U}\times a\right) \) is the dual part of the line \( \hat{\Lambda} \); the real part of the line is \( {\overline{\Lambda}}_{\mathrm{r}} \); π0, d is the scalar component of the dual part of the plane \( \hat{\pi} \).

3 Variation propagation modelling

The main purpose of variation propagation modelling is to describe the part quality after machining in multiple stages mathematically, thereby applying the results in reducing the variation in key product characteristics (KPCs). The variation modelling approach proposed in this paper is akin to the model of the manufactured part, which applies the techniques of assembling a part to a fixture. In the same line of thinking, a DQ-represented part is assembled to a fixture, followed by a machining by a DQ-represented plane, and inspection at a virtual inspection station.

3.1 Part representation

As aforementioned, many engineering parts can be represented by a set of planes, lines, and points. Specifically, prismatic parts can be constructed by a series of planes. These planes are represented by DQs using a plane’s normal and shortest distance to the origin. These variables can conveniently be stored in the form of matrices when implementing. Mathematically, for a part \( {\hat{\boldsymbol{\pi}}}_{1\dots M} \) with M, number of features can be represented as

$$ {\hat{\boldsymbol{\pi}}}_{1\dots M}={\overline{\boldsymbol{n}}}_{1\dots M}+{\epsilon \boldsymbol{d}}_{1\dots M} $$
(14)

where \( {\overline{\boldsymbol{n}}}_{1\dots M} \) and ϵd1…M are normals and distances to the planes.

A rectangular prism with six surfaces, for example, can then be represented as

$$ {\hat{\mathbf{S}}}_{1\dots 6}=\Big\{{\displaystyle \begin{array}{c}i+\epsilon {d}_1\\ {}i+\epsilon {d}_2\\ {}j+\epsilon {d}_3\\ {}j+\epsilon {d}_4\\ {}k+\epsilon {d}_5\\ {}k+\epsilon {d}_6\end{array}}=\left[\begin{array}{c}0\ 1\ 0\ 0,{d}_10\ 0\ 0\\ {}0\ 1\ 0\ 0,{d}_20\ 0\ 0\\ {}0\ 0\ 1\ 0,{d}_30\ 0\ 0\\ {}0\ 0\ 1\ 0,{d}_40\ 0\ 0\\ {}0\ 0\ 0\ 1,{d}_50\ 0\ 0\\ {}\ 0\ 0\ 0\ 1,{d}_60\ 0\ 0\end{array}\right] $$
(15)

In multistage machining processes, the datum and machining features are likely changed after each stage. A specific feature can be referred by its index. In this paper, \( {\hat{S}}_{\pi } \), \( {\hat{S}}_{\sigma } \), and \( {\hat{S}}_{\tau } \), with indices (π, σ, τ) ∈ (1…M), are used to refer to the primary, secondary, and tertiary datum features, respectively; similarly, \( {\hat{S}}_{\mu } \) (μ ∈ (1…M)) is used to refer to the machining feature.

3.2 Deriving the direction of motion

The direction of motion of a part can be determined from the intersection of planes that pass through the punctual locators. The intersection of the primary and secondary plane determines the direction of motion of the part towards the tertiary locator. Similarly, the intersection of the primary and tertiary plane determines the direction towards the secondary locators. Figure 2 shows the direction of motion of a part, derived from the intersection of datum fixture planes.

Fig. 2
figure 2

Planar representation of locators and direction of motion based on the planes

Mathematically, the normal vector of a plane passing through the three points of primary locator L1…33 is obtained by

$$ {\overline{F}}_{1,\kern0.5em \mathrm{r}}=\left({L}_1-{L}_2\right)\times \left({L}_1-{L}_3\right) $$
(16)

For the secondary datum, the normal of the plane that passes through two secondary locators L4, 53 and normal to the primary datum can be computed by

$$ {\overline{F}}_{2,\kern0.5em \mathrm{r}}=\left({L}_4-{L}_5\right)\times {\overline{F}}_{1,\mathrm{r}} $$
(17)

For tertiary fixture, the plane that passes through the last locator, L6, is perpendicular to the intersection line between the primary and secondary fixture planes. The tertiary plane is formed by the plane normal of both primary and secondary planes \( {\overline{F}}_{3,\kern0.5em \mathrm{r}} \).

$$ {\overline{F}}_{3,\kern0.5em \mathrm{r}}={\overline{F}}_{1,\mathrm{r}}\times {\overline{F}}_{2,\mathrm{r}} $$
(18)

Thus, the dual quaternion representation of primary, secondary, and tertiary locators’ planes becomes

$$ {\hat{F}}_1^h={\overline{F}}_{1,\mathrm{r}}^h+\epsilon {\overline{F}}_{1,\mathrm{r}}^h\cdotp {L}_1 $$
(19)
$$ {\hat{F}}_2^h={\overline{F}}_{2,\mathrm{r}}^h+\epsilon {\overline{F}}_{2,\mathrm{r}}^h\cdotp {L}_4 $$
(20)
$$ {\hat{F}}_3^h={\overline{F}}_{3,\mathrm{r}}^h+\epsilon {\overline{F}}_{3,\mathrm{r}}^h\cdotp {L}_6 $$
(21)

3.3 Assembling part to fixture

In a 3-2-1 fixture layout, a part is assembled to a fixture in a sequence of primary, secondary, and tertiary datum features. Hereafter, the rotation, translation, and total transformation operators associated with primary, secondary, and tertiary fixture (\( {\hat{F}}_{1\dots 3}^h \)) at station h are denoted by \( {\hat{R}}_{1\dots 3}^h \), \( {\hat{T}}_{1\dots 3}^h \), and \( {\hat{e}}_{1\dots 3}^h \), respectively.

3.3.1 Assembling to primary locators

In assembling the part to the primary locators, rotation and translation steps are required. The steps are illustrated graphically in Fig. 3. Mathematically, in assembling the primary datum, the rotation required between the primary fixture \( {\hat{F}}_1^h \) and the part primary datum, say \( {\hat{S}}_{\pi}^h \), can be obtained from Eq. (4) and Eq. (5). The scalar distance between the primary fixture and the rotated primary feature \( {\hat{R}}_1^h{\hat{S}}_{\pi}^h{\hat{R}}_1^{h,\ast } \) can be obtained by

Fig. 3
figure 3

An illustration of a two-step assembly of the primary datum feature \( {\hat{S}}_1^h \) from initial position to the primary locators’ plane \( {\hat{F}}_1^h \)

$$ t={\hat{F}}_1^h-{\hat{R}}_1^h{\hat{S}}_{\pi}^h{\hat{R}}_1^{h,\ast } $$
(22)

where \( {\hat{R}}_1^h=\hat{R}\left({\overline{F}}_{1,\mathrm{r}}^h,{\overline{S}}_{\pi, \mathrm{r}}^h\right) \)

The translational operator \( {\hat{T}}_1^h \) required to close the error between the parallel planes of the primary fixture and primary feature, using Eq. (5), can be denoted as

$$ {\hat{T}}_1^h\kern0.5em =\kern0.5em 1+\epsilon \frac{{\hat{F}}_1^h-{\hat{R}}_1^h{\hat{S}}_{\pi}^h{\hat{R}}_1^{h,\ast }}{2}{\overset{\sim }{R}}_{1,\mathrm{r}}^h $$
(23)

Alternatively, \( {\hat{T}}_1^h \) can be obtained as the difference between the primary locators and the projected point on the primary datum feature using Eq. (12). Figure 4a illustrates the projection of primary locators onto the primary datum feature, from which the distance from the locators’ points can be computed. Thus,

Fig. 4
figure 4

Assembly steps of a part and projection of locator points onto corresponding features. (a) Initial part pos \( {\hat{\boldsymbol{S}}}_{1\dots M}^h \), (b) part after the assembly to the primary \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime } \), (c) after assembly to the secondary and tertiary locators \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime } \)

$$ {\hat{T}}_1^h=\kern0.5em 1+\epsilon \frac{{\boldsymbol{L}}_{1\dots 3}^h-I\left(\ {\hat{S}}_{\pi}^h,{\overline{F}}_{1,\mathrm{r}}^h,{\boldsymbol{L}}_{1\dots 3}^h\right)}{2} $$
(23a)

The combined rotational and translational transformation is obtained from the multiplication of rotational operator \( {\hat{R}}_1 \) and translational operator \( {\hat{T}}_1 \). Thus, the total transformation operator \( {\hat{e}}_1 \) required in assembling the primary datum feature to the primary locators becomes

$$ {\hat{e}}_1^h={\overset{\sim }{R}}_{1,\mathrm{r}}+\epsilon \frac{{\hat{F}}_1^h-{\hat{R}}_1^h{\hat{S}}_{\pi}^h{\hat{R}}_1^{h,\ast }}{2}{\overset{\sim }{R}}_{1,\mathrm{r}}^h $$
(24)
$$ {\hat{e}}_1^h={\overset{\sim }{R}}_{1,\mathrm{r}}^h+\epsilon \frac{{\boldsymbol{L}}_{1\dots 3}^h-I\left(\ {\hat{S}}_{\pi}^h,{\overline{F}}_{1,\mathrm{r}}^h,{\boldsymbol{L}}_{1\dots 3}^h\right)}{2} $$
(24a)

The operator \( {\hat{e}}_1^h \) is then used to transform all features of the part \( {\hat{\boldsymbol{S}}}_{1\dots M}^h \)to new position

$$ {\hat{\boldsymbol{S}}}_{1\dots M}^h={\hat{e}}_1^h{\hat{\boldsymbol{S}}}_{1\dots M}^h\ {\hat{e}}_1^{h,\ast } $$
(25)

3.3.2 Assembling to secondary locators

In assembling the secondary datum feature, the rotation is constrained by the normal vector of the primary locators’ plane, which may not necessarily be aligned in the z-direction as in the case of \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime } \) in Figs. 4b and 5. Since the projection of locators \( {L}_4^h \) and \( {L}_5^h \) is in the direction \( {\overline{F}}_{2,\mathrm{r}}^h \), the cross product of the vector (\( {L}_4^h-{L}_5^h \)) and its projection on secondary feature \( \left(I\left(\ {\hat{S}}_{\upsigma}^{h,\prime },{\overline{F}}_{2,\mathrm{r}}^h,{L}_4^h\right)-I\left({\hat{S}}_{\upsigma}^{h,\prime },{\overline{F}}_{2,\mathrm{r}}^h,{L}_5^h\right)\right) \) have axis of rotation which is equivalent to the normal of primary datum \( {\overline{F}}_{1,\mathrm{r}}^h \). Thus, the rotation operator can then be derived from the reference vector and its projection on the secondary datum feature as

Fig. 5
figure 5

An illustration of rotation of a part based on secondary locators and their projections (top view)

$$ {\hat{R}}_2^h=\hat{R}\left(\left({L}_4^h-{L}_5^h\right),I\left({\hat{S}}_{\upsigma}^{h,\prime },{\overline{F}}_{2,\mathrm{r}}^h,{L}_4^h\right)-I\left({\hat{S}}_{\upsigma}^{h,\prime },{\overline{F}}_{2,\mathrm{r}}^h,{L}_5^h\right)\right) $$
(26)

The operator \( {\hat{R}}_2^h \) helps make the two vectors parallel but not coincident. In this intermediate step, after the rotation, the part can be represented by

$$ {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime, \mathrm{R}}={\hat{R}}_2^h{\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime }{\hat{R}}_2^{h,\ast } $$
(27)

Since translation of the part towards the secondary locators is not necessarily in orthogonal direction, the direction of the line of intersection of the primary and tertiary locators’ planes \( {\overline{F}}_{2,\mathrm{r}}^h \) (Eq. (17)) is used (Fig. 6). Thus, in transformation of the part towards the secondary direction using a single locator, say \( {L}_4^h, \) the translation operator \( {\hat{T}}_2^h \) and the new position of the part \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime } \) become

Fig. 6
figure 6

An illustration of translation of a trapezoidal part towards secondary locator (side view)

$$ {\hat{T}}_2^h=\kern0.5em 1+\epsilon \frac{L_4^h-I\left(\ {\hat{S}}_{\sigma}^{h,\prime \prime, \mathrm{R}},{\overline{F}}_{2,\mathrm{r}}^h,{L}_4^h\right)}{2} $$
(28)
$$ {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime }={\hat{T}}_2^h{\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime }\ {\hat{T}}_2^{h,\ast } $$
(29)

3.3.3 Assembling to tertiary locators

In sliding the part towards the tertiary plane, the direction of the line where the planes of the primary and secondary locators intersect \( {\overline{F}}_{3,\mathrm{r}}^h \) is used. Since no rotation is required, the translational operator \( {\hat{T}}_3^h \) becomes the total transformation \( {\hat{e}}_3^h \). The fully constrained part after transformation of \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime } \) by \( {\hat{e}}_3^h \) is illustrated in Figs. 4c and 7. Thus,

Fig. 7
figure 7

An illustration of translation of towards tertiary locator (top view)

$$ {\hat{e}}_3^h={\hat{T}}_3^h=\kern0.5em 1+\epsilon \frac{L_6^h-I\left(\ {\hat{S}}_{\tau}^{h,\prime \prime },{\overline{F}}_{3,\mathrm{r}}^h,{L}_6^h\right)}{2} $$
(30)
$$ {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime }={\hat{T}}_3^h{\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime }{\hat{T}}_3^{h,\ast } $$
(31)

3.4 Including machining variation

The variation propagation models that overlook the machining errors can yield inaccurate prediction. In this regard, Abellan-Nebot et al. [2] extended the classical stream of variation models to include machining errors. The machining error is the cumulative sum of the rotational and translational effects of four factors: (1) geometric, kinematic, thermal variations of the machine tool axes, (2) spindle-thermal variations, (3) the cutting force–induced variation, and (4) cutting tool wear–induced variation [2]. These effects are added to traditional stream of variation as composition of coordinate systems through the application of HTM. The approach can be reformulated using DQs for representation and transformation operations.

To reformulate the approach, it is assumed that the effects of these individual errors are accumulated in a toolpath that can be represented by a plane. Reformulating Eq. (4) presented in [2], the total effect of the individual factors can be computed as the product of the individual screw operators. Thus,

$$ {\hat{e}}_4=\prod \left(\begin{array}{c}\hat{RT}\left({\theta}_{\mathrm{a}},{\delta}_{\mathrm{a}},{\overline{n}}_{\mathrm{a}},{p}_{{\overline{n}}_{\mathrm{a}}}\right),\\ {}\hat{RT}\left({\theta}_{\mathrm{st}},{\delta}_{\mathrm{st}},{\overline{n}}_{\mathrm{st}},{p}_{{\overline{n}}_{\mathrm{st}}}\right),\\ {}\hat{RT}\left({\theta}_{\mathrm{f}},{\delta}_{\mathrm{f}},{\overline{n}}_{\mathrm{f}},{p}_{{\overline{n}}_{\mathrm{f}}}\right),\\ {}\hat{RT}\left({\theta}_{\mathrm{w}},{\delta}_{\mathrm{w}},{\overline{n}}_{\mathrm{w}},{p}_{{\overline{n}}_{\mathrm{w}}}\right)\end{array}\right) $$
(32)

where the subscripts a, st, f, and w indicate machine-tool axes, spindle-thermal, cutting-force, and cutting tool wear–induced variations, respectively. The variables θ, δ, \( \overline{n} \), and p are the rotational deviation, translational deviation, an axis of rotation/translation, and a point on the axis, respectively.

Thus, for a plane made by a nominal toolpath \( {\hat{\mu}}^{0,h}={\overline{n}}_{\mu}^{0,h}+\epsilon {d}_{\mu}^{0,h} \), the pos of the resulting toolpath becomes

$$ {\hat{\mu}}^h={\hat{e}}_4^h{\hat{\mu}}^{0,h}{\hat{e}}_4^{h,\ast } $$
(33)

Since the machining feature assumes the toolpath plane’s pos after machining, while the part is assembled to the fixture, the initial machining feature can be replaced by the toolpath plane. Thus, the toolpath plane \( {\hat{\mu}}^h \) replaces the machining feature to obtain the new machined feature \( {\hat{S}}_{\mu}^{h,\prime \prime \prime } \), as shown in Fig. 8.

Fig. 8
figure 8

The machining feature replaced by a cutting plane

$$ {\hat{S}}_{\mu}^{h,\prime \prime \prime }={\hat{\mu}}^h $$
(34)

Equation (35) updates the DQ representation of the part \( {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime } \) while still assembled to the fixture at station h. In the subsequent stations, the part is rotated by an angle, say 180° around the X-axis, which can be donated as

$$ {\hat{e}}^{h+1}=\left(\cos \frac{180}{2},\left[1\ 0\ 0\right]\sin \frac{180}{2}\right)+\epsilon \left({0}_{1X4}\right) $$
(35)
$$ {\hat{\boldsymbol{S}}}_{1\dots M}^{h+1}={\hat{e}}^{h+1}{\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime }{\hat{e}}^{h+1,\ast } $$
(36)

When the part is transformed for use in subsequent stations, the primary, secondary, and tertiary datum features change. Thus, the indices of the equations above should correspond the new datum features of the stations.

3.5 Virtual measurement at inspection station

The machined part is moved to inspection station by transforming the reference datum of the part to a flat granite. A proper constraint of the part can be applied following the assembly steps discussed in Section 3.3. Focusing on the primary datum, \( {\hat{S}}_{\pi}^{h,\prime \prime \prime } \) can be moved to granite \( {\hat{G}}^h \) after station h,

$$ {\hat{e}}^h=\kern0.5em {\overset{\sim }{R}}_{\mathrm{g},\mathrm{r}}+\epsilon \frac{{\hat{G}}^h-{\hat{R}}_{\mathrm{g}}{\hat{S}}_{\pi}^{h,\prime \prime \prime }{\hat{R}}_{\mathrm{g}}^{\ast }}{2}{\overset{\sim }{R}}_{\mathrm{g},\mathrm{r}} $$
(37)

where \( {\hat{R}}_{\mathrm{g}}^h=\hat{R}\left({\overline{G}}_{1,\mathrm{r}}^h,{\overline{S}}_{1,\mathrm{r}}^{h,\prime \prime \prime}\right) \)

$$ {\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime \prime }={\hat{e}}^h{\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime }{\hat{e}}^{h,\ast } $$
(38)

Once the part is setup on a test station, measurement is conducted using a coordinate-measuring machine (CMM). Given the CMM measurement direction \( {\overline{\boldsymbol{U}}}_{1\dots M}^h \) and origin of inspection points \( {\mathbf{Y}}_{1\dots M}^h\in {\mathbb{R}}^3 \) at a nominal part \( {\hat{\boldsymbol{S}}}_{1\dots M}^{0,h} \), the actual points can be obtained by projecting inspection points onto their respective planes, in the direction of probing, as shown in Fig. 9. Thus, the predicted inspection points \( {\mathbf{Y}}_{1\dots M}^{h,\prime}\in {\mathbb{R}}^3 \)become

Fig. 9
figure 9

An illustration of inspection points set on a nominal part and their projects on actual part

$$ {\mathbf{Y}}_{1\dots M}^{h,\prime }=I\left({\hat{\boldsymbol{S}}}_{1\dots M}^{h,\prime \prime \prime \prime },{\overline{\boldsymbol{U}}}_{1\dots M}^h,{\mathbf{Y}}_{1\dots M}^h\right) $$
(39)

3.6 Vertices and visualization

As presented above, a part can be represented by a set of planes. Since the planes are infinite in dimension, the dimensions can be truncated at the intersection of the planes using Eqs. (10) and (11). The lines intersect to a third plane at a vertex, which can be obtained using Eqs. (12) and (13). Thus, the intersection line of two planes, say \( {\hat{S}}_1 \) (for π =1) and \( {\hat{S}}_5 \), can be expressed as

$$ {\hat{\Lambda}}_{1-5}^h=\hat{\Lambda}\left({\hat{S}}_1,{\hat{S}}_5\right) $$
(40)

The intersection of the line \( {\hat{\Lambda}}_{1-5}^h \) and a plane \( {\hat{S}}_3^h \) (for τ = 3) at a point \( {I}_{3,{\hat{\boldsymbol{\Lambda}}}_{1-5}}^h \), as shown in Fig. 10, becomes

Fig. 10
figure 10

An illustration of intersection lines and a generation of intersection point using three planes

$$ {I}_{3,{\hat{\ \Lambda}}_{1-5}}^h=I\left(\ {\hat{S}}_3^h,{\hat{\Lambda}}_{1-5}^h,\kern0.55em \right) $$
(41)

In terms of implementation, the intersection points are obtained using a loop that checks all combination of plane pairs that make lines and the intersection of the lines to the rest of the planes.

4 Case study

A case study was selected to compare and validate the DQ-based modelling approach, by treating the part model (Fig. 11) presented in [1,2,3] as a base model. The case study demonstrates variation propagation in multistage machining process, with and without considering machining errors. The case study used the inputs from the work reported in [2] to predict the dimensional error of the part after machining. The main goal of the case study was to show the prediction improvement when including machining errors in multistage machining processes. The feature’s orientation is expressed by Euler angles in the form of [θx, θy, θz] and translational deviations [x, y, z] as shown in Table 2. Furthermore, in Table 2, the equivalent DQ representation of the features is presented.

Fig. 11
figure 11

A nominal part and fixture assembly adapted from [1,2,3]

Table 2 Nominal orientation and position of coordinate systems of features in SoV- and DQ-based representations

The features S2, S1, and S3,8 were machined in stations 1, 2, and 3, respectively, as shown in Fig. 12. Three experimental conditions were set such that the locator deviations and machining variation—due to thermal and tool wear–induced deviations—are considered, as shown Table 3. Specifically, the change in spindle temperature of 15 °C corresponded to a deviation of − 0.0744 mm on the part [2]. Furthermore, a 0.3-mm cutting tool wear on the primary and the secondary cutting edges corresponded to deviations of 0.03744 mm and 0.0404 mm on the part, respectively [2]. Feature S8 was machined by the secondary cutting edge of the tool.

Fig. 12
figure 12

A three-stage machining process. (a) Station 1, (b) Station 2, (c) Station 3

Table 3 Experimental conditions

To assemble the part to fixture, the locator points were projected on the corresponding part features at each station using Eq. (12). For the first station, the primary datum feature k + ϵ(01 × 4) was used to assemble to the plane made by locators L1…3 using Eqs. (22)–(25). In assembling the part to the secondary locators, the projection of secondary locator points to corresponding datum, obtained from Eqs. (26)–(29), was used to determine the required total transformation of the part to the second new position. Again, using this new position, the part was transformed by the distance between the tertiary locator and its projection using Eqs. (30) and (31).

Moreover, to compute the machining variation error, the operator \( {\hat{e}}_4 \) from Eq. (33) was used. The screw operator for machine tool axes and cutting force–induced variations were set to [1 0 0 0 0 0 0 0]. The translation operators of 1 − ϵ0.0744k for spindle-thermal variations, and 1 + ϵ0.03744k and 1 + ϵ0.0404k for cutting tool wear–induced variation were used. These operators were then multiplied to their corresponding nominal machining plane to yield the results shown in Table 3.

Once the assembly to the fixture and replacement of the machined surface were performed, the part was transformed to an inspection station, to which feature S1 was assembled to granite, with a DQ representation of k, using Eqs. (37) and (38). Using a virtual CMM points in Table 2 as test points, each of the points was projected onto their respective machined features using Eq. (39). The projected points became the predicted measurement values of S2, S3, S8, which were 44.999, 40.032, 85.008; 45.003, 40.223, 84.986; and 44.966, 40.193, 85.027 for experiments 1 to 3, respectively. Using these values, the dimensions of KPC1…3 were extracted by subtracting the points of S2 and S3 from that of S0, and S8 from that of S6.

These results, when compared with the classical SoV and extended SoV, were equal in experiments 1 and 2, and 20% better in experiment 3 in predicting the actual experimental results reported in [2]. Figure 13 summarizes the prediction error achieved by the SoVs- and DQ-based approaches with respect to the actual experimental results.

Fig. 13
figure 13

Comparison of average prediction error among classical SoV–, extended SoV–, and DQ-based approaches

5 Discussion

Dual quaternions are excellent way to combine both rotation and translation motions as well representation of the geometrical objects. In the proposed approach, part features, fixtures, and lines have been represented and transformed by DQs. In the demonstration case study, the two experiments based on SoV, and its extension that improved prediction significantly by including machining error [3], were compared with that of DQ-based approach. The part quality prediction based on DQ was equal to that of the two SoVs’ prediction with respect to experimental results when machining errors were not considered. When machining error was considered, the prediction based on DQ was 20% lower prediction error compared to extended SoV with respect to experimental results. However, the rounding errors could be behind the better result achieved by the DQ-based approach. It is worth of further investigation if similar results can be obtained in different case studies.

The advantage of DQ-based approach is that locators’ heights are assumed independent, while the same assumption cannot apply to stream of variation approach. Furthermore, the implementation of the case study using SoV approach [3] gave the largest matrix size of 54 by 54, while the DQ-based approach kept the initial 9 DQs (9 by 8 matrix) that represented the part. This is a significant reduction in the resulting matrix size.

Beside the mathematical elegance, DQs are computationally efficient. For comparison, the MATLAB implementations of the 3 experiments using SoV- [3] and DQ-based approaches, both of which were implemented without consideration for execution speed when both implementations were executed in an Intel® Core™ i7-8665U 1.90-GHz machine. The DQ-based implementation yielded a result in average speed 0.05 s, whereas the SoV implementation in 0.09 s, when machining error is not considered. When machining error is considered, the DQ-based approach yielded result in 0.07 s and the extended SoV in 0.35 s. This means the average execution time of the DQ-based approach is 32% of that of (extended) SoV-based predictions. The computational advantage can be marked when repeated experiments are conducted, such as in statistical tolerance analysis.

Moreover, the proposed approach applies projection of points onto surfaces, which is in line with the ray tracing methods. Such approaches are independent of shape complexity of an object. Thus, the proposed approach has potential to be used for generic shapes. For generic cases, locator points can be projected onto a tangent plane of a more complex shape, such as cylindrical shapes.

Despite the stated benefits, DQs have weaknesses too. The major inconvenience of working with dual quaternions is that the \( \hat{q} \) = -\( \hat{q} \). The computed axis of rotation between two planes yields an arbitrary direction to leading arbitrary angles. In such cases, the angle of rotation should be rotated in opposite direction by flipping the direction of axis of rotation. Specifically, when comparing two planes, and analysis there on, the direction of the dominate vector should be kept in same sign. Furthermore, care must be taken when using multiple libraries, as they may have different coordinate systems.

6 Conclusion

This work derived a model of variation propagation in multistage machining processes using DQs. The use of the DQs led to a new strategy in modelling the variation propagation, which branched off from the techniques used in classical stream of variation. The technique involves reducing the distance between locator points and their projections of onto their corresponding DQ-represented datum features, while satisfying the constraints of fixture layouts. Once the part is assembled to a fixture, a DQ-represented toolpath plane replaces the machining feature, followed by transformation to virtual inspection station for measurement at specific points on the features. The DQ-based approach gave a 20% lower average prediction error compared to extended SoV with respect to experimental results. Moreover, for the same inputs, the execution time was reduced by 68% and the largest matrix size was reduced from 54 by 54 to 9 by 8. Since the method is based on projection points on surfaces, it has a potential to apply to more complex shapes, while maintaining the mathematical simplicity. In this direction, it is worth investigating the application of such techniques in quadric shape and NURBS-represented manufactured parts, especially the parts with freeform surfaces.