Introduction

One of the main tasks of machine tools, such as 5 axis milling machines, is realizing the simultaneously positioning and orienting the cutting tool respect to the work piece. This task must be fulfilled with the higher possible precision, and this means that the machine must avoid positioning errors. An error is defined as the norm of the vector representing the distance between the ideal configuration of the machine, and the actual position of the tool respect to the finished part reference frame. Errors of the machine tool directly affects the deviation of the dimensions of the work piece from the nominal specifics. Many authors (Kiridena and Ferreira 1993) refer to this quantity as volumetric error, which represents an index for the errors of a machine tool (Cheng et al. 2018).

Volumetric errors are the result of the propagation of geometric unconformity of machine’s components, in the way they are assembled, and in their mechanical behaviour. In order to study this phenomena, different models have been used to describe the kinematic behaviour of the machine, such as the one based on the Denavit and Hartenberg convention (Lamikiz et al. 2008; Ziegert and Kalle 1994), or the one proposed by Suh et al. (1998).

More recently, a model for the evaluation of the machining accuracy has been proposed by Cheng et al. (2016). The first efforts in error modelling mainly concentrated on 3 axis machine tools, as highlighted by an extensive survey in the article of Khan and Wuyi (2010). Later on, many researches focused on error identification of rotary axis (Fu et al. 2015), which makes the definition of the error model for 5 axis machines such a complex task, and still a topic of interest (Zhang et al. 2019).

Despite the kinematic model taken in account, the main goal is the mitigation of the geometric uncertainties along the kinematic chain. In machine tools, the accuracy can be improved by error compensation (Stryczek 2016), or by error avoidance (Kreng et al. 1994). In the first case, the errors due to the structural uncertainties are mitigated by modifying the control logic. On the contrary, the error avoidance is obtained by the intrinsic use of particular design principles: these may be the adoption of particular constructive material, or the adoption of a particular morphology for the structure.

The goal of the present research is proposing a hybrid approach, with features of both error avoidance and error mitigation. The proposed method is based on the adoption of a modified redundant architecture of the milling machine, and its control optimization.

Redundancy is a concept related to the task that a certain mechanism must fulfill. For a 5 axis machines tools, the objective is positioning the tool in a certain position and with a certain slope respect to the work piece. This means that the 5 degrees of freedom of the tool (the rotation around the symmetry axis is not taken in account) must be defined with respect to the reference frame attached to the work piece. To fulfil this task, the milling machine is usually characterized by a kinematic chain composed by 5 links connected by 5 joints, each actuated by a motor. An example is the RRTTT 5 axis machine tool, as defined by Kiridena and Ferreira (1993), depicted in Fig. 1a.

Fig. 1
figure 1

a Layout of the 5 axis milling machine; b Layout of the 6 axis redundant milling machine

In the RRTTT 5 axis machine tool, the number of DOF of the tool are equal to the number of axis, which means that there is a finite number of possible configuration of the system which fulfill the placement task. But if the kinematic chain which characterizes the machine have 6 or more members, the problem becomes mathematically not determined, and there is an infinite number of possible solutions for the inverse kinematic problem. In this case the system is redundant.

An example of adoption of redundant architecture for manufacturing is the study of the use of industrial robots as an alternative to traditional CNC machines (Ji and Wang 2019; Tao et al. 2020). Industrial robots are characterized by 6 actuated degrees of freedom: 3 actuators belonging to the anthropomorphic manipulator, and 3 belonging to the spherical wrist. Compared to the 5 DOF required for a classical milling operation, industrial robots have a degree of freedom which can be used in order to improve the rigidity of the system during the machining (Xiong et al. 2019). Actually, the most interesting features of the redundant systems is the possibility to deal with different tasks at the same time (Patent Application WO/2019/243986). Examples of secondary tasks are the avoidance of singularities, the respect of the joint limits, and the prevention of the collisions, as it is exploited in the research of Xiao and Huan (2012). Moreover, another possible secondary task is the maximization of the resulting global stiffness of the manipulator depending on the configuration.

This research focuses on the redundant TRRTTT milling machine, which is a variant of the RRTTT 5 axis machine tool: the main idea is determining the ideal configuration of the mechanism according to the achievement of a secondary task. Both minimization of rotary motor torque and minimization of volumetric errors will be taken in account. The volumetric errors are caused by the deviation of all the dimensional parameters from their ideal values. Anyway, as it had been highlighted by Chen et al. (2013), roll pitch and yaw errors have a high influence compared to linear positioning. This can be explained by the Abbe effect, which postulate an amplification of angular uncertainties depending on the structure of the kinematic chain. The introduction of a redundant degree of freedom is adopted in order to mitigate the effect of the angular uncertainties introduced by the tilting table. More precisely, a translational axis is added to the double turntable, as it is shown in Fig. 1b.

The use of a virtual model of the manufacturing machine is proposed here in order to provide a tool for the evaluation of the improvement of the double turntable due to the introduction of the additional axis. The development of a virtual counterpart of the physical system has two main goals: as it had been reported by Pedersen et al. (2016), a digital twin of a physical system is an effective tool for studding the behaviour of the actual mechanism. On the other hand, the improvement of the table performance depends on the results of an optimization procedure, carried out in order to provide the control of the table. The use of a virtual model of the machine can be an ideal workbench for the design of the control.

A last remark is about the validity of the framework for other types of devices. Similarly to machine tools, in additive manufacturing means, minimizing the placement error of the nozzle, or the torch, is a key factor for the process, because it minimizes the deviation of the actual product from the original design (Calignano 2018; He et al. 2019; Song et al. 2015). Consequently, the importance of mitigating the influence of geometric uncertainties of the productive process is still valid in productive means adopting both subtractive and additive paradigms, such as hybrid machines (Flynn et al. 2016).

Kinematic model and control optimization

Standard RRTTT machine

The basic equations for the standard 5 axis machine are presented here. As a first step, the kinematic chain equations are derived by the use of the Denavit and Hartemberg convention. The equations describing the kinematic chain of the 5 axis machine tool are obtained using the Denavit and Hartemberg convention. Let’s assume that a reference system \({O}_{0}{x}_{0}{y}_{0}{z}_{0}\) is attached to the work piece, and the a reference system \({O}_{5}{x}_{5}{y}_{5}{z}_{5}\) attached to the tool. It is possible to write the coordinates \({\underline{{\it p}}}^{\left(5\right)}\) of the point P with respect to the reference coordinate system \({O}_{5}{x}_{5}{y}_{5}{z}_{5}\), if the coordinates \({\underset{\_}{p}}^{\left(0\right)}\), and the matrix \(\underline{{\underline {A} }}_{0}^{5}\) are known:

$$ \underline {p}^{\left( 5 \right)} = \underline{{\underline {A} }}_{0}^{5} \cdot \underline {p}^{\left( 0 \right)} $$
(1)

where \(\underline {p}^{\left( 0 \right)}\) are the coordinates the point P with respect to the reference coordinate system \(O_{0} x_{0} y_{0} z_{0}\), and the matrix \(\underline{{\underline {A} }}_{0}^{5}\) is global homogenous transformation matrix:

$$ \underline{{\underline {A} }}_{5}^{0} = \underline{{\underline {A} }}_{1}^{0} \cdot \underline{{\underline {A} }}_{2}^{1} \cdot \underline{{\underline {A} }}_{3}^{2} \cdot \underline{{\underline {A} }}_{4}^{3} \cdot \underline{{\underline {A} }}_{5}^{4} $$
(2)

The single link homogenous transformation matrix is derived according the Denavit and Hartenberg convection:

$$ \underline{{\underline {A} }}_{i}^{i - 1} \left( { d_{i} , \theta_{i} , a_{i} , \alpha_{i} } \right) = \left| {\begin{array}{*{20}c} {c\theta_{i} } & { - s\theta_{i} c\alpha_{i} } & {s\theta_{i} s\alpha_{i} } & {a_{i} c\theta_{i} } \\ {s\theta_{i} } & {c\theta_{i} c\alpha_{i} } & { - c\theta_{i} s\alpha_{i} } & {a_{i} s\theta_{i} } \\ 0 & {s\alpha_{i} } & {c\alpha_{i} } & {d_{i} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right| $$
(3)

The set of the reference systems attached to the links composing the kinematic chain of the 5 axis milling machine are depicted in Fig. 2.

Fig. 2
figure 2

Links reference systems and DH variable parameters of the 5 axis milling machine (TRRTTT)

Finally, taking in account the DH parameters reported in Table 1, the global transformation matrix is:

$$ \underline{{\underline {A} }}_{5}^{0} = \left| {\begin{array}{*{20}l} {c{\Psi }c{\Omega }} & { - s{\Psi }} & { - c{\Psi }s{\Omega }} & {\left( {Xc{\Psi }c{\Omega } + Ys{\Psi } - Zc{\Psi }s{\Omega }} \right)} \\ {s{\Psi }c{\Omega }} & {c{\Psi }} & { - s{\Psi }s{\Omega }} & {\left( {Xs{\Psi }c{\Omega } - Yc{\Psi } - Zs{\Psi }s{\Omega }} \right)} \\ {s{\Omega }} & 0 & {c{\Omega }} & {\left( {Xs{\Omega } + Zc{\Omega }} \right)} \\ 0 & 0 & 0 & 1 \\ \end{array} } \right| $$
(4)
Table 1 DH parameters of the 5 axis milling machine

where \({\Psi }\), \({\Omega }\),\({\text{ X}}\),\({\text{ Y}}\),\({\text{ Z}}\) are the variable parameters reported in Fig. 2: \({\Psi }\), \({\Omega }\) are the coordinates of the two rotational axes, and \({\text{X}}\),\({\text{ Y}}\),\({\text{ Z}}\) are the coordinates of the translational axes. According to Kiridena and Ferreira (1993), it is possible to derive the kinematic chain equations:

$$ \left\{ {\begin{array}{*{20}l} {x_{p} = Lc{\Psi }s{\Omega } + Xc{\Psi }c{\Omega } + Ys{\Psi }} \hfill \\ {y_{p} = Ls{\Psi }s{\Omega } + Xs{\Psi }c{\Omega } - Yc{\Psi }} \hfill \\ {z_{p} = Lc{\Omega } + H + Xs{\Omega }} \hfill \\ {\underline {k}^{\left( 5 \right)} \cdot \underline {i}^{\left( 0 \right)} = - c{\Psi }s{\Omega }} \hfill \\ {\underline {k}^{\left( 5 \right)} \cdot \underline {k}^{\left( 0 \right)} = c{\Omega }} \hfill \\ \end{array} } \right. $$
(5)

and the Jacobian matrix of the system:

$$ \underline{{\underline {J} }}_{5x5}^{\left( 0 \right)} = \left| {\begin{array}{*{20}c} {\left[ { - Xs{\Psi }c{\Omega } + Yc{\Psi } - Ls\theta_{1} s{\Omega }} \right]} & \quad {\left[ { - Xc{\Psi }s{\Omega } + Lc{\Psi }c{\Omega }} \right]} &\quad {c{\Psi }c{\Omega }} & \quad {s{\Psi }} &\quad { - c{\Psi }s{\Omega }} \\ {\left[ {Xc{\Psi }c{\Omega } + Ys{\Psi } + Lc\theta_{1} s{\Omega }} \right]} & \quad {\left[ { - Xs{\Psi }s{\Omega } +\quad Ls{\Psi }c{\Omega }} \right]} & \quad {s{\Psi }c{\Omega }} &\quad {c{\Psi }} & \quad { - s{\Psi }s{\Omega }} \\ 0 & \quad {\left[ { - Xc{\Omega } + Ls{\Omega }} \right]} & \quad {s{\Omega }} & \quad 0 & \quad {c{\Omega }} \\ {s{\Psi }s{\Omega }} & \quad { - c{\Psi }c{\Omega }} & \quad 0 & \quad 0 & \quad 0 \\ 0 & \quad { - s{\Omega }} & \quad 0 &\quad 0 &\quad 0 \\ \end{array} } \right| $$
(6)

Modified TRRTTT machine

According to the schematic layouts depicted in Fig. 3, the 6 axis redundant TRRTTT milling machine is derived by the RRTTT by adding a prismatic kinematic couple.

Fig. 3
figure 3

Layout of the kinematic chain: a 5 axis milling machine; b redundant 6 axis milling machine

The basic equations for the redundant 6 axis TRRTTT machine tool are obtained imposing the coincidence of the generic point of the work piece and the centre of the tool. As depicted in Fig. 3b, the coordinates of a generic point P of the work piece with respect to the reference coordinate system \(O_{0} x_{0} y_{0} z_{0} \) are functions of the parameters \(r_{P}\), \(\alpha\), \(\beta\). On the other hand, in the reference system \(O_{6} x_{6} y_{6} z_{6}\), the tool has the rotation axis coincident with the \(z_{6}\) axis. As a consequence, the two representations of the point P, \(\underline {p}^{\left( 0 \right)}\) and \(\underline {p}^{\left( 6 \right)}\), must fulfil the following relation:

$$ \underline {p}^{\left( 6 \right)} = \left| {\begin{array}{*{20}c} 0 \\ 0 \\ { - L} \\ \end{array} } \right| = \underline{{\underline {A} }}_{0}^{6} \cdot \underline {p}^{\left( 0 \right)} = \underline{{\underline {A} }}_{0}^{6} \cdot \left| {\begin{array}{*{20}c} {r_{P} c\alpha c\beta } \\ {r_{P} s\alpha c\beta } \\ {r_{P} s\beta } \\ \end{array} } \right| $$
(7)

The set of the reference systems attached to the links composing the kinematic chain of the 6 axis redundant milling machine are depicted in Fig. 4.

Fig. 4
figure 4

Links reference systems and DH variable parameters of the 6 axis redundant milling machine (TRRTTT)

According to DH parameters reported in Table 2, the homogenous coordinate transformation matrix is:

$$ \begin{aligned} & \underline{{\underline {A} }}_{6}^{0} = \underline{{\underline {A} }}_{1}^{0} \cdot \underline{{\underline {A} }}_{2}^{1} \cdot \underline{{\underline {A} }}_{3}^{2} \cdot \underline{{\underline {A} }}_{4}^{3} \cdot \underline{{\underline {A} }}_{5}^{4} \cdot \underline{{\underline {A} }}_{6}^{5} \\ &\quad = \left| {\begin{array}{*{20}c} {c\Psi c\Omega } & { - s\Psi } & { - c\Psi s\Omega } & {\left( {Xc\Psi c\Omega + Ys\Psi - Zc\Psi s\Omega } \right)} \\ {s\Psi c\Omega } & {c\Psi } & { - s\Psi s\Omega } & {\left( {Xs\Psi c\Omega - Yc\Psi - Zs\Psi s\Omega } \right)} \\ {s\Omega } & 0 & {c\Omega } & {\left( {H + Xs\Omega + Zc\Omega } \right)} \\ 0 & 0 & 0 & 1 \\ \end{array} } \right| \end{aligned} $$
(8)

where \({\Psi }\), \({\Omega }\),\({\text{ X}}\),\({\text{ Y}}\),\({\text{ Z}}\) are the coordinates of the two rotational axes, and the three translational axes as in the RRTTT machine, and \(H\) is the variable parameter introduced with the redundant kinematic couple. Consequently, the closure equations for translation and rotations are:

$$ \left\{ {\begin{array}{*{20}l} {x_{p} = Lc{\Psi }s{\Omega } + Xc{\Psi }c{\Omega } + Ys{\Psi } - Zc{\Psi }s{\Omega }} \hfill \\ {y_{p} = Ls{\Psi }s{\Omega } + Xs{\Psi }c{\Omega } - Yc{\Psi } - Zs{\Psi }s{\Omega }} \hfill \\ {z_{p} = Lc{\Omega } + H + Xs{\Omega } + Zc{\Omega }} \hfill \\ {\underline {k}^{\left( 6 \right)} \cdot \underline {i}^{\left( 0 \right)} = - c{\Psi }s{\Omega }} \hfill \\ { \underline {k}^{\left( 6 \right)} \cdot \underline {k}^{\left( 0 \right)} = c{\Omega }} \hfill \\ \end{array} } \right. $$
(9)
Table 2 DH parameters of the redundant 6 axis milling machine

and the Jacobian matrix of the system results:

$$ \underline{{\underline {J} }}_{6x5}^{\left( 0 \right)} = \left| {\begin{array}{*{20}c} 0 & {\left[ { - Xs{\Psi }c{\Omega } + Yc{\Psi } - \left( {L - Z} \right)s\theta_{1} s{\Omega }} \right]} & {\left[ { - Xc{\Psi }s{\Omega } + \left( {L - Z} \right)c{\Psi }c{\Omega }} \right]} & {c{\Psi }c{\Omega }} & {s{\Psi }} & { - c{\Psi }s{\Omega }} \\ 0 & {\left[ {Xc{\Psi }c{\Omega } + Ys{\Psi } + \left( {L - Z} \right)c\theta_{1} s{\Omega }} \right]} & {\left[ { - Xs{\Psi }s{\Omega } + \left( {L - Z} \right)s{\Psi }c{\Omega }} \right]} & {s{\Psi }c{\Omega }} & {c{\Psi }} & { - s{\Psi }s{\Omega }} \\ 1 & 0 & {\left[ { - Xc{\Omega } + \left( {L + Z} \right)s{\Omega }} \right]} & {s{\Omega }} & 0 & {c{\Omega }} \\ 0 & {s{\Psi }s{\Omega }} & { - c{\Psi }c{\Omega }} & 0 & 0 & 0 \\ 0 & 0 & { - s{\Omega }} & 0 & 0 & 0 \\ \end{array} } \right| $$
(10)

It is convenient to write the kinematic closure Eqs. (9) and the Jacobian matrix (10) with respect to the reference coordinate system \(O_{6} x_{6} y_{6} z_{6}\), which is attached to the tool. The new closure equations system is:

$$ \begin{gathered} \left\{ {\begin{array}{*{20}l} {0 = Lc{\Psi }s{\Omega } + Xc{\Psi }c{\Omega } + Ys{\Psi } - Zc{\Psi }s{\Omega }} \hfill \\ {0 = Ls{\Psi }s{\Omega } + Xs{\Psi }c{\Omega } - Yc{\Psi } - Zs{\Psi }s{\Omega }} \hfill \\ { - L = Lc{\Omega } + H + Xs\theta_{2} + Zc{\Omega }} \hfill \\ { \underline {k}^{\left( 6 \right)} \cdot \underline {i}^{\left( 0 \right)} = - c{\Psi }s{\Omega }} \hfill \\ { \underline {k}^{\left( 6 \right)} \cdot \underline {k}^{\left( 0 \right)} = c{\Omega }} \hfill \\ \end{array} } \right. \hfill \\ \hfill \\ \end{gathered} $$
(11)

and the new Jacobian matrix is:

$$ \underline{{\underline {J} }}_{6x5}^{\left( 6 \right)} = \left| {\begin{array}{*{20}c} { - s\theta_{2} } & { - r_{P} c\alpha c\beta s{\Psi }c{\Omega } + r_{P} s\alpha c\beta c{\Psi }c{\Omega }} & { - r_{P} c\alpha c\beta c{\Psi }s{\Omega } - r_{P} s\alpha c\beta s{\Psi }s{\Omega } + r_{P} s\beta c{\Omega } - Hc{\Omega }} & { - 1} & 0 & 0 \\ 0 & { - r_{P} c\alpha c\beta c{\Psi } - r_{P} s\alpha c\beta s{\Psi } + Y} & 0 & 0 & 1 & 0 \\ { - c\theta_{2} } & {r_{P} c\alpha c\beta s{\Psi }s\theta_{2} - r_{P} s\alpha c\beta c{\Psi }s{\Omega }} & { - r_{P} c\alpha c\beta c{\Psi }c{\Omega } - r_{P} s\alpha c\beta s{\Psi }c{\Omega } - r_{P} s\beta s{\Omega } + Hs{\Omega }} & 0 & 0 & { - 1} \\ 0 & {s{\Psi }s{\Omega }} & { - c{\Psi }c{\Omega }} & 0 & 0 & 0 \\ 0 & { 0} & { - s\theta_{2} } & 0 & 0 & 0 \\ \end{array} } \right| $$
(12)

As it may be noticed in the system (11), only the equations competing the translations are changed, and this is due to the fact the slope of the tool with respect to the work piece is only referred to the coordinates \({\Psi }\) and \({\Omega }\) of the rotational axes.

Optimal configuration of the TRRTTT machine

The optimal conditions for the control of the tool machine are introduced in this section. These conditions are derived by solving a constrained optimization problem. In general, a (continuous) constrained optimization problem is formulated as follows:

$$ \left\{ {\begin{array}{*{20}l} {{\text{min}}{.}\quad U\left( {\underline {x} } \right)} \hfill & {} \hfill \\ {s.t.\quad V_{j} \left( {\underline {x} } \right) = 0} \hfill & {j = 1, \ldots ,J} \hfill \\ {W_{k} \left( {\underline {x} } \right) \ge 0} \hfill & {k = 1, \ldots ,K} \hfill \\ {x_{i}^{{\left( {low} \right)}} \le x_{i} < x_{i}^{{\left( {high} \right)}} } \hfill & {i = 1, \ldots ,N} \hfill \\ \end{array} } \right. $$
(13)

In this case, the constraints are only equality continuous, and more specifically they are the kinematic closure equations, which are the conditions ensuring that the position of the tool lays in the desired point P of the work piece. On the other hand, the objective function \(U\) is related to the performance of the machine that will be improved. In the present research two objective functions will be presented, related to the minimization of the following physical quantities:

  1. 1.

    Torques provided by the rotational motors during the milling process;

  2. 2.

    Norm of the positional errors due to the wrong actual position of rotational joints.

As an example of the efficiency of the methodology, according the objectives 1 and 2, the optimal machine configuration for 2D machining problems will be defined in the next sections. The 2D machining is derived by the general 3D formulation by imposing the following conditions: \(\theta_{1} = 0\), \(\alpha = 0\), \(Y = 0\). Furthermore, we will consider the origin of the reference system \(O_{6} x_{6} y_{6} z_{6}\) coincident with the tool centre, which implies that \(L = 0\) as well. Under these hypothesis, the kinematic closure equations become:

$$ \begin{aligned} & \left\{ {\begin{array}{*{20}l} {0 = r_{P} c\beta c\Omega + r_{P} s\beta s\Omega - Hs\Omega - X} \hfill \\ {0 = 0} \hfill \\ {0 = - r_{P} c\alpha c\beta s\Omega + r_{P} s\beta c\Omega - Hc\Omega - Z} \hfill \\ {\underline {k}^{\left( 6 \right)} \cdot \underline {i}^{\left( 0 \right)} = - s\Omega } \hfill \\ {\underline {k}^{\left( 6 \right)} \cdot \underline {k}^{\left( 0 \right)} = c\Omega } \hfill \\ \end{array} } \right. \\ &\Rightarrow \left\{ {\begin{array}{*{20}l} {0 = r_{P} \cos \left( {\beta - \Omega } \right) - Hs\Omega - X} \hfill \\ {0 = r_{P} \sin \left( {\beta - \Omega } \right) - Hc\Omega - Z} \hfill \\ {\mu = \Omega + \frac{\pi }{2}} \hfill \\ \end{array} } \right. \end{aligned} $$
(14)

where \(\mu\) is the angle between the \(x_{0}\) axis attached to the work piece, and the axis of the tool \(z_{6}\). Moreover, it is possible to provide the Jacobian matrix of the system according to the 2D formulation of the problem, and the consequent change of the dimensions of the matrix itself:

$$ \underline{{\underline {J} }}_{3x4}^{\left( 6 \right)} = \left| {\begin{array}{*{20}c} { - s\Omega } & {r_{P} \sin \left( {\beta - \Omega } \right) - Hc\Omega } & { - 1} & 0 \\ { - c\Omega } & { - r_{P} \cos \left( {\beta - \Omega } \right) + Hs\Omega } & 0 & { - 1} \\ 0 & { 1} & 0 & 0 \\ \end{array} } \right| $$
(15)

Minimization of the joint torque

Let \(F_{x}^{\left( 6 \right)}\), \(F_{z}^{\left( 6 \right)}\), \(M_{y}^{\left( 6 \right)} \) be the components of the force and the momentum applied by the tool on the work piece. If \(\underline{{\underline {G} }}_{ 4x3}^{\left( 6 \right)} = \left( {\underline{{\underline {J} }}_{3x4}^{\left( 6 \right)} } \right)^{T}\) is the transpose of the Jacobian matrix, it is possible to solve the equilibrium of the system by the use of the kineto-static duality:

$$ \left| {\begin{array}{*{20}c} {T_{H} } \\ {C_{2} } \\ {T_{X} } \\ {T_{Z} } \\ \end{array} } \right| = \underline{{\underline {G} }}_{ 4x3}^{\left( 6 \right)} \cdot \left| {\begin{array}{*{20}c} {F_{x}^{\left( 6 \right)} } \\ {F_{z}^{\left( 6 \right)} } \\ {M_{y}^{\left( 6 \right)} } \\ \end{array} } \right| \Rightarrow \left\{ {\begin{array}{*{20}l} {T_{H} = - \left( {s{\Omega }F_{x}^{\left( 6 \right)} + c{\Omega }F_{z}^{\left( 6 \right)} } \right)} \hfill \\ {C_{2} = \left( {r_{P} {\text{sin}}\left( {\beta - {\Omega }} \right) - Hc\theta_{2} } \right) \cdot F_{x}^{\left( 6 \right)} } \\ \quad { - \left( {r_{P} \cos \left( {\beta - {\Omega }} \right) - Hs{\Omega }} \right) \cdot F_{z}^{\left( 6 \right)} + M_{y}^{\left( 6 \right)} } \hfill \\ {T_{X} = - F_{x}^{\left( 6 \right)} } \hfill \\ {T_{Z} = - F_{z}^{\left( 6 \right)} } \hfill \\ \end{array} } \right. $$
(16)

where \(T_{H}\), \(C_{{\Omega }}\), \(T_{X}\), \(T_{Z}\) are forces and the torque generated by the actuators corresponding to the axes coordinates \(H\), \({\Omega }\), \(X\), \(Z. \) It can be noticed that the only function in the system (16) which can be optimized according to the boundary conditions (kinematic chain equations and milling process specifications) is the one competing the torque provided by the rotational motor.

Consequently, the first objective function is the absolute value of the couple \(C_{2}\):

$$ \begin{aligned} {\text{min}}{.}\quad U_{1} \left( {H,{\Omega },X, Z} \right) & = \left| \left( {r_{P} {\text{sin}}\left( {\beta - {\Omega }} \right) - Hc{\Omega }} \right) \cdot F_{x}^{\left( 6 \right)} \right. \\ &\quad \left. +\,\, \left( {r_{P} \sin \left( {\beta - {\Omega }} \right) - Hs{\Omega }} \right) \cdot F_{z}^{\left( 6 \right)} \right| = \left| {C_{{\Omega }} } \right| \\ {\text{s.t.}}\quad V_{1} \left( {H,{\Omega },X, Z} \right) & = r_{P} {\text{cos}}\left( {\beta - {\Omega }} \right) - Hs{\Omega } - X = 0 \\ V_{2} \left( {H,{\Omega },X, Z} \right) & = r_{P} {\text{sin}}\left( {\beta - {\Omega }} \right) - Hc{\Omega } - Z = 0 \\ V_{3} \left( {H,{\Omega },X, Z} \right) & = \mu - \left( {{\Omega } + \frac{\pi }{2}} \right) = 0 \\ \end{aligned} $$
(17)

In the 2D case, the objective function can be nullified, reaching a global minimum, imposing the following condition:

$$ \frac{{F_{z}^{\left( 6 \right)} }}{{F_{x}^{\left( 6 \right)} }} = \frac{{\left( {r_{P} \sin \left( {\beta - \Omega } \right) - Hc\Omega } \right)}}{{\left( {r_{P} \cos \left( {\beta - \Omega } \right) - Hs\Omega } \right)}} $$
(18)

Figure 5 depicts the graphical representation of the condition (18): as it may be expected, the optimal configuration for the machine shows the line of action of the force passing through the point of instant rotation. This condition, if theoretically may be always met, in practice cannot because the parameter \(H\) may only have values in accordance with the physical limits of the mechanical linear guide.

Fig. 5
figure 5

Graphical representation of the optimality condition for the torque optimization (angle ξ is positive, and the represented force F is generic, and not meant to represent the actual interaction between tool and work piece)

Minimization of the position error norm

Chen et al. (2019) highlighted that position errors have a high sensitivity to angular position of rotation motors and angular errors. Their relation may be evaluated writing the infinitesimal variation of the positional parameters in function of the infinitesimal variation of the axes variables:

$$ \left\{ {\begin{array}{*{20}l} {dx_{P}^{\left( 6 \right)} = - s\Omega \cdot dH + \left( {r_{P} \sin \left( {\beta - \Omega } \right) - Hc\Omega } \right) \cdot d\Omega - dX} \hfill \\ {dz_{P}^{\left( 6 \right)} = - c\Omega \cdot dH + \left( { - r_{P} \cos \left( {\beta - \Omega } \right) + Hs\Omega } \right) \cdot d\Omega - dZ} \hfill \\ \end{array} } \right. $$
(19)

The second objective function is the norm of the vector representing the positioning error, and the second optimization problem may be defined as:

$$ \begin{aligned} {\text{min}}{.}\quad \hat{U}_{2} \left( {H,{\Omega },X, Z,d{\Omega }} \right) & = \left\|\left( {dx_{P}^{\left( 6 \right)} ,dz_{P}^{\left( 6 \right)} } \right)\right\|\\ &\quad \quad \sqrt {\left( {dx_{P}^{\left( 6 \right)} } \right)^{2} + \left( {dz_{P}^{\left( 6 \right)} } \right)^{2} } = ds_{P}^{\left( 6 \right)} \\ {\text{s.t.}}\quad V_{1} \left( {H,{\Omega },X, Z,d{\Omega }} \right) & = r_{P} {\text{cos}}\left( {\beta - {\Omega }} \right) - Hs{\Omega } - X = 0 \\ V_{2} \left( {H,{\Omega },X, Z,d{\Omega }} \right) & = r_{P} {\text{sin}}\left( {\beta - {\Omega }} \right) - Hc{\Omega } - Z = 0 \\ V_{3} \left( {H,{\Omega },X, Z,d{\Omega }} \right) & = \mu - \left( {{\Omega } + \frac{\pi }{2}} \right) = 0 \\ \end{aligned} $$
(20)

As it can be noticed, it is possible writing \(\hat{U}_{2} \left( {H,\theta_{2} ,X, Z,d\theta_{2} } \right) = \hat{U}_{2} \left( {H,\theta_{2} ,d\theta_{2} } \right)\) and \(V_{i} \left( {H,\theta_{2} ,X, Z,d\theta_{2} } \right) = V_{i} \left( {H,\theta_{2} ,X, Z} \right)\), because the kinematic closure equations are independent by the infinitesimal rotation \(d{\Omega }\). Furthermore, minimizing the objective function \(\hat{U}_{2}\) is equivalent to minimizing its square divided by the quantity \(\left( {d\theta_{2} } \right)^{2}\), which is a positive quantity. For this reason, it is possible define a new equivalent optimization problem:

$$ \begin{aligned} \min .\quad U_{2} \left( {H,\Omega ,X, Z} \right) & = \frac{{\left( {dx_{P}^{\left( 6 \right)} } \right)^{2} + \left( {dz_{P}^{\left( 6 \right)} } \right)^{2} }}{{\left( {d\Omega } \right)^{2} }} = \frac{{\left( {ds_{P}^{\left( 6 \right)} } \right)^{2} }}{{\left( {d\Omega } \right)^{2} }} \\ s.t.\quad V_{1} \left( {H,\Omega ,X, Z} \right) & = r_{P} \cos \left( {\beta - \Omega } \right) - Hs\Omega - X = 0 \\ V_{2} \left( {H,\Omega ,X, Z} \right) & = r_{P} \sin \left( {\beta - \Omega } \right) - Hc\Omega - Z = 0 \\ V_{3} \left( {H,\Omega ,X, Z} \right) & = \mu - \left( {\Omega + \frac{\pi }{2}} \right) = 0 \\ \end{aligned} $$
(21)

This particular constrained optimization problem is convex, and admit the global minimum \(U_{2opt} = r_{P}^{2} {\text{cos}}^{2} \beta\), corresponding to the value of the variable \(H_{opt2} = r_{P} sin\left( \beta \right)\). Figure 6 shows the optimal configuration of the machine, with the point P laying on the axis \(x_{1} \equiv x_{2}\), so that the distance between the point P and the point \(O_{1}\) is minimum.

Fig. 6
figure 6

Graphical representation of the optimality condition for the minimization of the position error norm

As it had been outlined in the previous section, if a device for additive manufacturing has the possibility to orient the noozle or the torch with to respect the work piece, the accuracy of the forming process can be improved by the mitigation of positioning errors.

System characterization by virtual machine and control optimization

The implementation of the virtual model of the 6 axis TRRTTT machine is described in this section. The main purpose is evaluating the performances of the proposed architecture, when the milling process is controlled according with the proposed approach. Moreover, the following example will briefly show the implementation of the constrained optimization in the machine control logic.

The mill machining process depicted in Fig. 7 is taken as case study: the path of the trajectory is composed by a first linear segment with 30 mm length, a circular arc of 50 mm radius, and a second linear segment of 20 mm. During the machining process, the force on the work piece is always tangent to the trajectory.

Fig. 7
figure 7

Case study milling process: a work piece dimensions, b initial point for the milling process, c intermediate configuration, d final point of the tool trajectory

Minimization of the joint torque

For the given case study, the objective function \(U_{1}\) may be written as:

$$ U_{1} \left( {H,\Omega ,X, Z} \right) = F \cdot \left( {r_{P} \sin \left( {\beta - \xi } \right) + H\cos \xi } \right) $$
(22)

Figure 8 shows the mapping of \(U_{1}\) on the workspace for the tool centre for a work piece of 200 × 100 mm, considering different slopes \(\xi\) of the force \(\underline {F}\). It can be noticed that the torque required to the rotation motor is zero in the points laying on lines having the same inclination of the force \(\underline {F}\), and passing through the rotation point \(O_{1}\).

Fig. 8
figure 8

Mapping of the objective function U1 on the workspace: a, b workspace dimensions and representation. Mapping of U1: c ξ = 0°, d ξ = 15°, e ξ = 30°, f ξ = 45°, g ξ = 60°, h ξ = 75°, i ξ = 90°

In the particular case of the milling process described in Fig. 5, recalling the optimization problem (17), the objective function becomes:

$$ U_{1} \left( {H,{\Omega },X, Z} \right) = F \cdot \left( {r_{P} \sin \left( {\beta - {\Omega }} \right) + Hcos{\Omega }} \right) $$
(23)

consequently angle \(\gamma\) is always equal to 0, due to the fact that the force is always tangent to the trajectory, and remembering that ξ = γ + Ω.

Imposing the optimality condition:

$$ H = r_{P} \cdot \frac{{\sin \left( {\beta - \xi } \right)}}{\cos \left( \xi \right)} = r_{P} \cdot \frac{{\sin \left( {\beta - \Omega } \right)}}{\cos \left( \Omega \right)} $$
(24)

it is possible to obtain the ideal configuration of the machine in correspondence of every point of the trajectory of the centre of the tool. In the Fig. 9, the values of the axes variables \(H\), \({\Omega }\), \(X\), \(Z\), are reported in function of the curvilinear coordinate of the tool trajectory (continuous line). These values are compared with the values of the correspondent variables if the milling process is carried out by a standard 5 axis RRTTT machine (dashed line).

Fig. 9
figure 9

Minimum torque optimality condition: comparison of the axis variables a X, b Ω, c Z, d H

It can be noticed that the values are different, except for the variable \({\Omega }\) which, in both machines, is the only variable involved in the determination of the slope of the work piece respect to the tool. Moreover, for the 5 axis machine the variable \(H\) is identically equal to zero, because it misses the redundant axis.

The data reported in Fig. 9 completely describe the configuration of the two machines during the milling process. Consequently, it is possible to determine the evolution of the objective function during the machining of the profile of the work piece. The values of \(U_{1}\) for the 5 axis machine (dashed line) and redundant 6 axis machine (continuous line) are reported in Fig. 10. The introduction of the redundant degree of freedom allows the limitation of the torque required to the rotational axis. This appends for almost every point of the trajectory, except the final part. This may be explained considering the fact that, even if in theory the variation of the variable \(H\) can always fulfill the optimality condition, in practice there are some limitation due to the finite run of the correspondent axis.

Fig. 10
figure 10

Minimum torque optimality condition: comparison of the objective function U1 values

Minimization of the position error norm

The objective function \(U_{2}\) may be written as:

$$ U_{2} \left( {H,\Omega ,X, Z} \right) = H^{2} - 2Hr_{P} \sin \left( \beta \right) + r_{P}^{2} $$
(25)

Figure 11 shows the mapping of \(U_{2}\) on the workspace for the tool centre for a work piece of 200 × 100 mm. More in detail, Fig. 11a shows the mapping of the position error norm in the case of the standard 5 axis RRTTT milling machine.

Fig. 11
figure 11

Mapping of the objective function U2 on the workspace: a 5 axis milling machine, b redundant 6 axis milling machine, c improvement due the introduction of the H axis

In Fig. 11b the mapping of the objective function is reported for the 6 axis TRRTTT redundant milling machine if it satisfied the optimal configuration condition:

$$ H_{opt2} = r_{P} \sin \left( \beta \right) $$
(26)

It is interesting notice that it is possible to nullify \(U_{2}\) only in correspondence of the points laying on the \(z_{0}\) axis. This depends by the fact that the only points of the work piece which can be coincident with the rotation centre are the points on the \(z_{0}\) axis. Finally, Fig. 11c shows the improvement introduced by the redundant axis.

In the particular case of the milling process described in Fig. 7, the values of the axes variables \(H\), \({\Omega }\), \(X\), \(Z\), are shown in Fig. 12 for both the 5 axis machine (dashed line) and 6 axis machine (continuous line).

Fig. 12
figure 12

Minimum position error norm optimality condition: comparison of the axis variables a X, b Ω, c Z, d H

Furthermore Fig. 13 shows the comparison between the vales of the objective function obtained for the two machines during the milling process. Once more, the redundant 6 axes machine has better performances in terms of positioning errors compared to the 5 axis machine.

Fig. 13
figure 13

Minimum position error norm optimality condition: comparison of the objective function U2 values

Conclusions

The paper presented a novel redundant TRRTTT milling machine architecture. The introduction of a redundant axis gives the possibility of introducing a secondary task in the control of the machine. Consequently, it is possible to define an optimization problem, which allows the minimization of an objective function representing a particular physical quantity. The optimality condition for the minimization of the torque required to a rotary axis and the minimization of the norm of the positioning errors have been obtained. As a case study, the values of the objective functions have been determinate during a 2D milling machine process. As a result, the redundant 6 axis milling machine always shows better performances compared to the standard 5 axis milling machine.