1 Introduction

Despite the continuous spread of additive technologies, machining still has a primary role in part manufacturing [1]. In metal cutting, the emergence of high-speed machining (HSM) technologies was an important milestone, which brought significant advances in both productivity and quality [2]. However, the advent of HSM technologies has also created new challenges, as extremely stringent requirements must be met both from machine tool, tool, and tool path [3, 4]. A suitable tool path for HSM must meet two criteria: (1) it must have adequate continuity, and (2) it must provide a uniform tool load during machining [5]. The adequate smoothness means that the trajectory has at least \({G}^{2}\) continuity and does not contain any segment with a too-small curvature radius. Without fulfilling these conditions, the tool cannot maintain programmed speed during path traversing [6]. If the second condition, i.e., ensuring a uniform tool load, is met, the tool can operate at the most efficient machining parameters without the risk of tool breakage [7].

Trochoidal paths are excellent for both tool path smoothness and tool load control. Among the benefits of the trochoidal strategy, the reduction of cutting force and tool wear can be highlighted [8], but the milder thermal load [9] and the improved machining stability are also important features [10]. With low cutter engagement, the chip removal can be carried out without any hindrance, improving the quality of the surface [11]. Furthermore, the low cutter engagement also makes it possible to significantly increase the axial depth of cut, cutting speed and feed rate. This choice of machining parameters is one of the most effective ways to increase milling productivity [12]. In addition to improved productivity, researchers have also shown that the tool life remains long despite the increased parameters [13]. When comparing the amount of removed material until tool deterioration, up to 600% improvement can be achieved over the conventional tool paths [14]. The reason for this that in case of high axial depth of cut, the tool wear is distributed over a longer segment along the tool edge, and the beneficial effect of helical edges is also stronger in reducing the dynamic nature of milling [15]. Furthermore, the air cutting segments also have a beneficial effect in reducing the tool temperature [16], which is an important aspect when machining difficult-to-cut materials [17]. Besides the aforementioned benefits such as high productivity and long tool life, the trochoidal tool paths also have a high level of smoothness, so they are especially advantageous for HSM [18].

The trochoidal tool paths first appeared in the machining of slot-like geometries [19], but the application field of trochoidal milling extends far beyond slot machining. It is also advantageous for machining of corners [20] and the other critical regions of pockets [21]. Although trochoidal milling is primarily a 2.5D technology, it can also be used for higher-dimensional manufacturing tasks, such as 4-axis or 5-axis machining of turbine blades [22, 23]. Moreover, trochoidal tool paths also have some unique uses, such as in burr-free machining of carbon-fiber-reinforced polymers (CFRP) [24] or in magnetic assisted roller burnishing of flat surfaces [25]. However, this paper focuses only on the trochoidal milling of straight slots with constant width.

In trochoidal slot milling, two basic tool path shapes have become standard, namely the circular and the cycloidal. For these trajectory shapes, several studies deal with the mathematical description of the cutting conditions along the tool path [26,27,28,29,30]. Various methods have also been developed to optimise the machining parameters. Rauch et al. analysed the dynamic capabilities of the machine tool and examined the evolution of radial depth of cut when determining the optimal parameters of trochoidal tool path [31]. Grechishnikov et al. developed a proposal for the optimal tool diameter and trochoidal step based on the analysis of MRR [32]. Yan et al. have been proved that by setting an optimal cutting speed determined from the stability diagram, it is possible to significantly increase the trochoidal step [33]. Experimental methods for determining the optimal machining parameters can also be found in the literature. Pleta et al. applied the Taguchi method [34], while Santhakumar and Iqbal suggested using the response surface methodology (RSM) [35, 36].

The previous examples provide an insight into the exhaustive research work related to traditional trochoidal tool path shapes. However, these strategies have a severe shortcoming. The maximum tool load is well-controlled, but the cutter engagement changes continuously along the tool path. The maximum immersion occurs only for a moment, while tool entering and exiting take place over long transition segments. Therefore, the material removal conditions that provide maximum efficiency are present for only a short time. García-Hernández et al. have shown that feed rate adjustment can improve the efficiency of the transient segments in trochoidal machining [37], but this can only partially remedy the problem. Among other problems, the most challenging factor in feed rate scheduling is that the relationship between the chip cross-section and the cutting force is non-linear [38]. Thus, while it is recognized that feed rate adjustment can be an effective way to improve productivity, this paper will focus only on the lesser-discovered possibilities associated with trajectory modification.

In order to reduce the path length and the variation of cutting conditions along the tool path, alternative tool path generation strategies have been developed to replace the circular and cycloidal trajectories in trochoidal milling. In the literature, some example of modified quasi-cycloid orbits consisting of circles and straight lines [39, 40] and elliptical orbits [41] can be found. However, a common feature of these solutions is that the primary consideration was the simple geometric formalization. Therefore, despite that these methods provide a more suitable model for tool path generation, no real optimisation is performed. It means that the best possible result cannot be achieved with them.

In order to elevate the technology compliance over geometric considerations, new trochoidal tool path generation methods have been developed that keep the cutter engagement constant in the inner segment of cutting section [42, 43]. These techniques made it possible to significantly improve the productivity without increasing the tool load. However, only tangential arcs were used on the rolling-in and rolling-out sections, and optimisation was not carried out either. In that aspect of path shape optimisation in trochoidal milling, the modelling of spline-based trochoidal trajectories has been a significant improvement. In the studies of Li et al. [44] and Xu et al. [45], optimisation has been performed with a genetic algorithm to maximize productivity. However, they used a single Hermite-spline segment for modelling the trajectory where the tangent vectors belonging to the slot’s sidewalls define the exact shape of the whole cutting segment. Although it can provide a significant progress compared to traditional trajectory shapes, this modelling technique does not grant complete flexibility to achieve optimal tool path shapes. Moreover, the optimisation of linking movements also remained an open question. This paper aims to present a tool path generation and optimisation method developed to address these deficiencies.

For the developed modelling technique, two basic criteria have been set. Firstly, the algorithm should be able to optimise the entire trochoidal loop, and secondly, it should be capable of increasing the flexibility of the trajectories, if necessary. Among the possible alternatives which can fulfil these criteria, the B-spline-based curve was chosen, because this type of splines is widely used in the area of CNC tool path generation and optimisation. With this type of curve, the cutting and linking segments can be handled together, and by increasing the number of control points, the path flexibility can also be expanded to any degree. With the proposed modelling technique, both path smoothness and tool load control can be ensured at a high level. For determining the appropriate control point locations which provides the maximal MRR at a given tool load, a differential evolutionary algorithm was used. This new modelling and optimisation technology allows the machining efficiency to be close to the theoretically maximum in the given machining environment. Although the application of B-spline is more complex than using a single Hermite-spline segment, both simulation and experimental results proved that its higher flexibility could provide higher productivity.

The geometrical considerations used in tool path modelling are presented in Sect. 2. Section 3 describes the implementation of tool path optimisation. The results of the simulation and cutting experiments performed to evaluate the algorithm can be found in Sect. 4. Finally, Sect. 5 provides a brief summary.

2 Tool path modelling

In this section, the basic concept of curve modelling with a minimum number of control points will be presented in detail. Later, it will also be explained how it is possible to enhance the flexibility of the curve by increasing the number of control points.

2.1 Basic concept

The B-spline curves of order \(k\) can be defined by the following piecewise polynomial equation of degree \(k-1\):

$$\overline{c }\left(u\right)=\sum_{i=0}^{n}{B}_{i}^{k}\left(u\right) {\overline{p} }_{i}, u\in \left[{u}_{k-1},{u}_{n+1}\right]$$
(1)

where \({B}_{i}^{k}\left(u\right)\) is the \({i\mathrm{th}}\) normalized basis function of degree \(k-1\), \({\overline{p} }_{i} (i\in \{\mathrm{0,1},\dots ,n\}\)) are the \(n+1\) control points, and \({u}_{j} (j\in \{\mathrm{0,1},\dots ,n+k\}\) are the knots.

The B-spline is basically an approximation curve, i.e., does not pass through its control points. However, to get easier handling of the curve, it is worthwhile to ensure that the curve passes through the first and last control points by choosing an appropriate knot vector \(u\). This is possible if the first and the last \(k\) elements of the knot vector are equal. The other knots are typically given as \({u}_{j+1}-{u}_{j} = constant\); in this case, the B-spline parameterisation is called uniform. For the sake of generality, a normalized knot vector was used, which covers the interval \([\mathrm{0,1}]\) regardless of the number of control points. The B-spline curves of order \(k<n+2\) have \({C}^{k-2}\) order continuity at the parameter \(u={u}_{j}\), if \(k>1\) and the multiplicity of \({u}_{j}\) is 1.

In trochoidal milling, the tool path usually consists of a large number of consecutive loops shifted along the slot’s longitudinal axis (Y-axis as shown in Fig. 1) by the trochoidal step \((w)\). Therefore, it is advisable to focus only on a single period in tool path modelling, which can be applied in any number in succession. The trochoidal loop must meet the following requirements: (1) it must pass tangentially to the sidewalls of the slot, (2) it must have sufficient smoothness along the entire tool path, and (3) the cutter engagement must not exceed a specified value. To meet these requirements, at least a cubic B-spline curve (\(k=4\)) and at least six control points (\(n=5\)) must be specified when describing a loop. Figure 1 shows an example for a tool path created according to these aspects.

Fig. 1
figure 1

Modelling of the trochoidal tool path using B-spline curve

In the case of climb milling, the loops move forward in a counterclockwise direction if the tool rotates in clockwise direction. Therefore, the tool enters at right side of the slot. Accordingly, in tool path modelling, the starting point of the period is selected along the right side of the slot. Y-axis of the coordinate system used in the calculations coincides with the slot’s centreline, while X-axis is aligned with the starting point of trochoidal loop. The tool path patterns calculated in this way can be fitted to the desired position by shifting and rotating during practical application.

In the following, the technical implementation to meet the criteria mentioned above is detailed based on the arrangement of Fig. 1. The criteria to be considered during tool path modelling can be divided into four groups, namely (1) geometric constraints, (2) continuity constraints, (3) curvature radius constraints, and (4) cutter engagement constraints.

2.1.1 Basic geometric constraints

The primary aspect when determining the tool path is to ensure that the tool touches the sidewalls of the slot tangentially. According to Fig. 1, denote the tool radius by \({r}_{t}\), the slot width by \(b\), and the coordinates of \({\overline{p} }_{i}\) control point by (\({x}_{i},{y}_{i}\)).

Since the start and endpoints of the loop must be at a tool radius distance from the slot’s right sidewall, the X coordinates of these points can be specified directly: \({x}_{0}={x}_{5}=b/2-{r}_{t}\). Furthermore, considering that the first and last segments of the control polygon coincide with the directions of the tangent vectors at the start and endpoints, the X coordinates of the second and penultimate points are also the same: \({x}_{1}={x}_{4}=b/2-{r}_{t}\). These constraints ensure that the tool touches the slot’s right side tangentially.

Ensuring tangential touching of the slot’s left side is a more challenging task. Basically, the relationship between the intermediate points of the B-spline curve and the control polygon is difficult to express. However, if the multiplicity of a knot is increased to two, the cubic B-spline curve at one point will touch tangentially the control polygon. Using this feature of B-spline curves, if \({x}_{2}={x}_{3}=r-b/2\) and the knot vector is equal to \((0, 0, 0, 0,1/2,1/2, 1, 1, 1, 1)\), the tangential touch of the slot’s left side is also provided.

To ensure the appropriate shape of loops, the following conditions must also be met: \({y}_{1}>{y}_{0}\), \({y}_{3}>{y}_{2}\), and \({y}_{5}>{y}_{4}\). Furthermore, the Y coordinate of the starting point was fixed to the X-axis (\({y}_{0}=0\)), and the value of \({y}_{5}\) determines the distance between adjacent loops, i.e., the magnitude of trochoidal step size.

2.1.2 Continuity constraints

In HSM, the continuity of tool path must be at least \({G}^{2}\) to keep the speed and acceleration functions in continuity. Basically, the interior part of cubic B-spline curves has the continuity order \({C}^{2}\) which is also means a continuity of \({G}^{2}\), so the previous requirement is fully satisfied. However, the fulfilment of continuity must be examined at the multiple knots and the interconnection point of adjacent periods, as the \({C}^{2}\) continuity is not ensured at these points.

For a parametric plane curve \(\overline{c }\left(u\right)=\left(x\left(u\right), y\left(u\right)\right)\), the curvature can be calculated as given in Eq. (2).

$$\kappa \left(u\right)=\frac{{x}^{^{\prime}}\left(u\right) {y}^{{^{\prime}}{^{\prime}}}\left(u\right)-{y}^{^{\prime}}\left(u\right){x}^{{^{\prime}}{^{\prime}}}\left(u\right)}{{\left({{x}^{^{\prime}}\left(u\right)}^{2}+{{y}^{^{\prime}}\left(u\right)}^{2}\right)}^{3/2}}$$
(2)

In order to examine the curvature continuity based on location of control points, the relationship between derivatives of B-spline curve and control points must be specified. For the \({i\mathrm{th}}\) curve segment \(\left(u\in [{u}_{i},{u}_{i+1})\right)\), this is possible using a recursive formula known from literature [46].

$$\frac{{d}^{r}}{d{u}^{r}}\sum_{j=i-k+1}^{i}{ {\overline{p} }_{j} B}_{j}^{k}\left(u\right)=\frac{\left(k-1\right)!}{\left(k-r-1\right)!}\sum_{j=i-k+1+r}^{i}{{\overline{p} }_{ j}^{ r} B}_{j}^{k-r}\left(u\right)$$
(3)

where \(r\) is the order of derivative, and

$${\overline{p} }_{ j}^{ r}=\left\{\begin{array}{cc}{\overline{p} }_{j}& if\quad r=0\\ \frac{{\overline{p} }_{ j}^{ r-1}-{\overline{p} }_{ j-1}^{ r-1}}{{u}_{j+k-r}-{u}_{j}}& if\quad r>0\end{array}\right.$$
(4)

Based on Eqs. (2) and (3), the values of curvature at the critical points can be deduced.

$$\begin{array}{l}\kappa \left(0\right)=\frac{36\left({x}_{1}-{x}_{0}\right)\left({y}_{1}-{y}_{0}\right)+144\left(2{x}_{1}-{x}_{0}-{x}_{2}\right)\left({y}_{1}-{y}_{0}\right)}{{\left(3{6\left({x}_{1}-{x}_{0}\right)}^{2}{+36\left({y}_{1}-{y}_{0}\right)}^{2}\right)}^{3/2}} \\ \kappa \left({0.5}^{-}\right)=\frac{9\left({x}_{3}-{x}_{2}\right)\left({y}_{3}-{y}_{2}\right)+36\left(3{x}_{2}-{2x}_{1}-{x}_{3}\right)\left({y}_{3}-{y}_{2}\right)}{{\left({9\left({x}_{3}-{x}_{2}\right)}^{2}+9{\left({y}_{3}-{y}_{2}\right)}^{2}\right)}^{3/2}}\\ \kappa \left({0.5}^{+}\right)=\frac{9\left({x}_{3}-{x}_{2}\right)\left({y}_{3}-{y}_{2}\right)+36\left(3{x}_{3}-{x}_{2}-2{x}_{4}\right)\left({y}_{3}-{y}_{2}\right)}{{\left({9\left({x}_{3}-{x}_{2}\right)}^{2}+9{\left({y}_{3}-{y}_{2}\right)}^{2}\right)}^{3/2}} \\ \kappa \left(1\right)=\frac{36\left({x}_{5}-{x}_{4}\right)\left({y}_{5}-{y}_{4}\right)+144\left(2{x}_{4}-{x}_{3}-{x}_{5}\right)\left({y}_{5}-{y}_{4}\right)}{{\left({36\left({x}_{5}-{x}_{4}\right)}^{2}{+36\left({y}_{5}-{y}_{4}\right)}^{2}\right)}^{3/2}}\end{array}$$
(5)

where \(\kappa \left({0.5}^{-}\right)\) and \(\kappa \left({0.5}^{+}\right)\) indicate the one-side limits of curvature function from left and right sides, respectively. Using, \({x}_{0}={x}_{1}={x}_{4}={x}_{5}=b/2-{r}_{t}\) and \({x}_{2}={x}_{3}={r}_{t}-b/2\) conditions formulated earlier, the expressions can be simplified as given in Eq. (6).

$$\begin{array}{l}\kappa \left(0\right)=\frac{144\left(b-2{r}_{t}\right)\left({y}_{1}-{y}_{0}\right)}{{\left(3{6\left({y}_{1}-{y}_{0}\right)}^{2}\right)}^{3/2}} \\ \kappa \left({0.5}^{-}\right)=\frac{72\left(2{r}_{t}-b\right)\left({y}_{3}-{y}_{2}\right)}{{\left(9{\left({y}_{3}-{y}_{2}\right)}^{2}\right)}^{3/2}} \\ \kappa \left({0.5}^{+}\right)=\frac{72\left(2{r}_{t}-b\right)\left({y}_{3}-{y}_{2}\right)}{{\left(9{\left({y}_{3}-{y}_{2}\right)}^{2}\right)}^{3/2}} \\ \kappa \left(1\right)=\frac{144\left(b-2{r}_{t}\right)\left({y}_{5}-{y}_{4}\right)}{{\left(3{6\left({y}_{5}-{y}_{4}\right)}^{2}\right)}^{3/2}}\end{array}$$
(6)

For the \({G}^{2}\) continuous fitting of the successive loops, the condition \(\kappa \left(0\right)=\kappa \left(1\right)\) must be satisfied. This specifies the following condition for the Y coordinates: \({y}_{1}-{y}_{0}={y}_{5}-{y}_{4}\). For the value of multiple knots, the right and left limits of curvature function led to identity: \(\kappa \left({0.5}^{-}\right)\equiv \kappa \left({0.5}^{+}\right)\). Therefore, the fulfilment of this criterion does not specify any additional condition for the placement of control points. However, when increasing the number of control points, this criterion will also indicate some conditions to be met (refer Sect. 2.2).

2.1.3 Curvature radius constraint

Ensuring proper curvature continuity is a necessary but not sufficient condition in HSM. The magnitude of tool path curvature radius can also be a confinement factor along curved path segments, because the acceleration capabilities of feed drives are limited. If the curvature radius is too small, the acceleration of feed drives can be insufficient to provide the required centripetal acceleration, even at a constant feed. The machine tool can accomplish the programmed feed rate only if the following condition expressed from the relationship between feed rate, path curvature radius, and centripetal acceleration is met.

$$\rho \ge \frac{{{v}_{f}}^{2}}{{3600\hspace{0.5mm}a}_{max}} \left[mm\right]$$
(7)

where \(\rho =1/\kappa\hspace{1mm}[mm]\) is the path curvature radius, \({v}_{f}\hspace{1mm}[mm/min]\) is the programmed feed rate, and \({a}_{max}\hspace{1mm}[mm/s^2]\) is the maximum centripetal acceleration feasible on the machine tool.

Generally, reducing the curvature radius at roll-in and roll-out segments would decrease the path length. However, without considering a minimal curvature radius limit (\({\rho }_{min}\)), the optimisation would lead to a path which the machine tool cannot traverse at desired feed rate, so the calculation of objective function during the optimisation would be incorrect. This rarely becomes critical in the basic model with six control points since no sharp corners can form because of the relatively large distance between the control points. However, this aspect must be considered when increasing the number of control points (refer Sect. 2.2).

2.1.4 Cutter engagement constraint

If the feed rate is constant, the tool load can be controlled by regulating the cutter engagement. This paper does not specify how the appropriate limit of cutter engagement can be selected, as this can only be determined depending on the particular machining conditions. However, calculating the cutter engagement along a tool path defined by a B-spline curve is essential since this will be indispensable for the optimisation.

The implementation of the calculation is illustrated in Fig. 2. The cutter engagement \(\left(\theta \right)\) is equivalent to the centre angle of the contact arc between the tool and the workpiece, so it can be easily calculated at a tool path point \(\left(P\right)\) if the corresponding entry \(\left({Q}_{0}\right)\) and exit points \(\left({Q}_{1}\right)\) of the tool edge are known.

Fig. 2
figure 2

Calculation of the cutter engagement: a) rolling-in segment, b) internal segment

When determining the entry and exit points of the tool edge, the rolling-in segment (see Fig. 2a) and the subsequent segment of the path (see Fig. 2b) must be handled separately. The rolling-in section starts at the final segment of the loop, but from a logical point of view, this part needs to be clarified first. In this segment, the \({Q}_{0}\) and \({Q}_{1}\) are located on the boundary curve of workpiece formed in the preceding cutting period. Since the boundary is identical with the offset curve of tool path on the interval \(u\in \left(0, 0.5\right)\), it can be described as given in Eq. (8).

$$\overline{q }\left(u\right)=\overline{c }\left(u\right)+{r}_{t} \overline{n }\left(u\right)$$
(8)

where \(\overline{c }\left(u\right)\) is the B-spline form parametric equation of the tool path, and \(\overline{n }\left(u\right)\) is the unit length normal vector at the corresponding tool path point. During the calculations, an interval halving-based numerical method has been used to determine the intersection points of offset curve \(\overline{q }\left(u\right)\) and circular arc of radius \({r}_{t}\) with centre \(P\).

After the rolling-in segment, the entry point of tool can be calculated in a similar way. The only difference is that the boundary curve of workpiece is determined by offset curve of the previous period \({\overline{q} }\hspace{0.5mm}^{*}\left(u\right)\). Since the loops follow each other shifted by trochoidal step \(w\), the actual boundary can be calculated if the Eq. (8) is modified.

$${\overline{q} }\hspace{0.5mm}^{*}\left(u\right)=\overline{q }\left(u\right)+\left(0,-w\right)$$
(9)

Another difference compared to the rolling-in segment that the exit point of tool edge fits on workpiece boundary being formed at that moment, not in the previous period. Assuming that the feed per tooth is smaller than tool diameter by orders of magnitude, the exit point of tool edge coincides approximately with the normal vector at a given tool position. Therefore, it can be calculated directly by Eq. (8): \({Q}_{0}=\overline{q }\left(u\right)\).

The cutter engagement can be calculated using the previous method at densely sampled discrete points along the tool path to determine its maximum value. It can be noticed that the maximum cutter engagement is primarily determined by the size of trochoidal step. In other words, the limit for cutter engagement determines Y coordinate of the last control point since the trochoidal step is equal to the distance between first and last control points: \(w=\left|{y}_{5}-{y}_{0}\right|\). Considering that the relationship between trochoidal step and maximum cutter engagement is strictly monotonic, any root-finding algorithm can give the appropriate step size. During the development of this algorithm, an interval-halving method has been used, but the methods providing higher-order convergence would also have been suitable.

2.2 Enhancing the flexibility of tool path

In the basic concept presented above where the B-spline was given by six control points, both the cutting and linking segments were defined by a cubic polynomial curve. Compared to the traditional cycloid-shaped tool path, significant improvements can already be achieved with this solution. However, this modelling technique is not sufficient to optimise the shape of roll-in and roll-out sections. When introducing the B-spline curve, the primary aim was to create an opportunity to increase the flexibility of the curve in order to improve productivity further. This can be done by inserting additional control points.

When inserting new control points, the requirements of continuity criteria must be kept in mind. To ensure that these requirements are met, it is necessary to insert new control points in pairs, one to the first and one to the second half period. Based on the criteria of continuity described in Sect. 2.1.2, it can also be deduced that in the case of uniform parameterisation, the inserted new control points must be located at the same X coordinate in pairs. Based on Eqs. (2) and (3), it can be deduced that without considering this criterion, the second-order continuity of the curve could be lost locally at the critical points (at \(u=0, u=0.5,\) and \(u=1\)), which could only be remedied by changing the parameterisation. The tool path shapes created according to these considerations are shown in Fig. 3.

Fig. 3
figure 3

Increasing the number of control points

In Sect. 2.1, the criteria for six control points were detailed. For the positions of \(n + 1\) control points, the following universal criteria can be formulated.

Basic geometric constraints:

$${x}_{0}={x}_{1}={x}_{n-1}={x}_{n}=b/2-{r}_{t}$$
(10)
$${x}_{\left(n-1\right)/2}={x}_{\left(n+1\right)/2}={r}_{t}-b/2$$
(11)
$$\begin{array}{c}{y}_{1}>{y}_{0} \\ {y}_{\left(n-1\right)/2}>{y}_{\left(n+1\right)/2} \\ {y}_{n}>{y}_{n-1}\end{array}$$
(12)
$${u}_{\left(n+k-1\right)/2}={u}_{\left(n+k+1\right)/2}=1/2$$
(13)

Continuity constraints:

$${y}_{n}-{y}_{n-1}={y}_{1}-{y}_{0}$$
(14)

In addition, two other constraints need to be addressed. On one hand, the curvature radius must not fall below the specified limit at any tool path point \((\rho \ge {\rho }_{min})\). On other hand, with the trochoidal step \(w=\left|{y}_{n}-{y}_{0}\right|\), the maximum value of cutter engagement must not exceed the permissible value \((\theta \le {\theta }_{max})\). Therefore, the cutter engagement and continuity criteria completely determine the positions of the last two control points.

Taking into account the previous criteria, the following coordinates of the control points remain free: \({x}_{2}\), …, \({x}_{\left(n-1\right)/2-1}\), and \({y}_{1}\), …, \({y}_{\left(n-2\right)}\), which means \(\left(n-5\right)/2\) X coordinates and \(n-2\) Y coordinates, i.e., a total of \(\left(3n-9\right)/2\) coordinates.

Inserting new control points only has an advantage if the points are in the proper position. Therefore, it is necessary to consider how it is possible to determine the optimal location of control points (refer Sects. 3.1 and 3.2). After that, the available MRR will be comparable, which can also help determine the appropriate number of control points (refer Sect. 3.3).

3 Optimising the tool path shape

This chapter details the optimisation task, the developed optimisation algorithm, and the proposal for choosing the appropriate number of control points.

3.1 The optimisation problem

The indirect goal of optimisation is to maximize productivity. In trochoidal milling, the productivity can be most effectively quantified by the value of MRR [47]. The MRR can be defined as the volume of removed material per unit time. However, it has two different interpretations since it can refer to both the instantaneous and average value. The instantaneous value can be used to describe the tool load, and to evaluate productivity, the average value of MRR can be used. Therefore, the maximization of the average MRR has been selected as the objective function, so in the following, the MRR notation will refer to average value.

The average MRR can be specified for one trochoidal period as given in Eq. (15).

$$MRR=\frac{{Q}_{p}}{{t}_{p}}\left[\frac{{\mathrm{mm}}^{3}}{\mathrm{min}}\right]$$
(15)

where \({Q}_{p}\left[{\mathrm{mm}}^{3}\right]\) is the volume of removed material in one period, and \({t}_{p}\left[min\right]\) is travelling time of one trochoidal loop. Since the volume of removed material can be expressed by a simple multiplication, and the travelling time is equal to quotient of the tool path length and the feed rate; the MRR can also be written depending on specific data:

$$MRR=\frac{b\hspace{1mm}{a}_{p}\hspace{1mm}w}{{l}_{p}/{v}_{f}} \left[\frac{{\mathrm{mm}}^{3}}{\mathrm{min}}\right]$$
(16)

where \(b \left[\mathrm{mm}\right]\) is slot width, \({a}_{p} \left[\mathrm{mm}\right]\) is axial depth of cut, \(w \left[\mathrm{mm}\right]\) is trochoidal step, \({l}_{p} \left[\mathrm{mm}\right]\) is path length in one loop, and \({v}_{f} \left[\mathrm{mm}/\mathrm{min}\right]\) is feed rate. It can be noted that the axial depth of cut does not affect the path shape, and for a given cutter engagement, the same feed rate will mean the same tool load. Therefore, for a given slot width and cutter engagement, the optimisation task is to maximize the \(w/{l}_{p}\) ratio.

During optimisation, the task is to determine the free coordinates of the B-spline’s control points (refer Sect. 2.2). When formulating optimisation tasks, the constraints must also be specified. In this problem, the limit of maximum cutter engagement controls the maximum tool load, while the criterion of the minimum curvature radius is necessary to ensure high-speed path tracking. The formalization of these criteria is detailed in Sect. 2.

3.2 The optimisation method

The constraints that determine some coordinates of the control points of B-spline curve have been described earlier. The optimisation task is to determine the other free coordinates. Because the paper focuses primarily on B-spline-based modelling technique of trochoidal tool path, the optimisation method is described only schematically.

Because the relationship between input parameters (slot width, maximum cutter engagement, minimum curvature radius) and fitness function (maximizing the MRR) is highly complex, so the gradient cannot be given analytically. Therefore, the use of a heuristic method was advisable. There are several black-box type alternatives available to solve similar optimization tasks. During the development of tool path generation method, the standard version of differential evolutionary algorithm presented by Storn and Price was used to optimise the location of control points [48]. This choice was justified because the differential evolution algorithm is easy to implement, and usually, it provides adequate efficiency [49]. However, further investigations are needed to determine whether other methods can achieve this optimization task more effectively. In the differential evolutionary algorithm, the population size \(\left(NP\right)\) was \(50\), the differential weight \(\left(F\right)\) was \(0.5\), and crossover probability \(\left(CR\right)\) was 0.9. The termination criterion stopped the iteration if the average fitness value of population was within \(0.5\%\) of the best individual’s fitness value. The optimal specification of these parameters would also require further investigations.

Figure 4 shows how a randomly generated initial population changes during the iteration. Since the individuals in the population are replaced only if the new individual meets optimisation constraints and has a better fitness value, the fitness values of individuals increase monotonically. As shown in both the evolution of fitness value and tool path shape, when the iteration is performed, the best individual slowly approaches the optimal shape.

Fig. 4
figure 4

The evolution of tool path shapes and fitness functions in the population during optimisation

Examining how close the result obtained by the algorithm is to the theoretically optimum is a problematic task. However, the consistency of the algorithm was tested in two ways. On one hand, the algorithm gave almost same results with same input parameters. Examining five consecutive runs, the difference between the results usually remained within \(0.5\%\). On other hand, a small change in input parameters caused also a small change in result. In the example shown in Fig. 5, the cutter engagement was changed in 2° steps, and the tool path shape also changed uniformly, following the varying input parameter. Furthermore, the algorithm performed well in comparative tests (refer Sect. 4), so it can be stated that the optimisation algorithm operates reliably.

Fig. 5
figure 5

The effect of modifying the input parameters on the optimized tool path shape

3.3 Determining the appropriate number of control points

After testing the optimisation algorithm, a recommendation can be made regarding the appropriate number of control points. Of course, increasing the number of control points improves the flexibility of curve, creating the opportunity to meet requirements at a higher level. However, it should not be forgotten that a higher number of free parameters also increase the computational time required to solve the optimisation task. For six control points, only three free coordinates need to be determined. However, inserting a new pair of control points increases the number of free variables by three in each case.

Figure 6 shows an example of how the optimised tool path shape and the corresponding cutter engagement change if the number of control points is gradually increased from six to twelve with the same input parameters. In the comparison, the input parameters were as follows: tool diameter \(\left(d\right)\) was \(\varnothing 8\hspace{0.5mm}\mathrm{mm}\), slot width \((b)\) was \(12\hspace{0.5mm}\mathrm{mm}\), and cutter engagement limit \(({\theta }_{max})\) was \(60^\circ\). The diagrams show that the optimised tool path shape has been formed to keep the cutter engagement at the maximum allowable value. This confirms the preliminary assumption that providing uniform cutter engagement is crucial to achieving maximum productivity. When analysing the \(w/{l}_{p}\) ratio, in the case of the six control points, the productivity of tool path lags far behind the other cases. Therefore, a single cubic curve arc is not sufficient to model the cutting section because it is not flexible enough to perform tool entering and exiting as fast as possible. The comparative diagrams of cutter engagement show that by increasing the number of control points, the length of transition sections is shortened in tool entering and exiting. It can be seen that in the case of 6 control points, the transient sections are significantly longer, and the desired cutter engagement can also not be ensured perfectly on the internal segment.

Fig. 6
figure 6

The optimised tool path shapes and the evolutions of cutter engagement for different numbers of control points (the comparison diagrams in the last row show the evolution of cutter engagement at different segments in more detail)

However, it is also worth noting that the magnitude of improvement decreased continuously with the insertion of newer and newer control points. For investigating the effect of inserting new control points, the achievable MRRs for the trochoidal tool path shapes shown in Fig. 6 were compared. While increasing the number of control points led to an improvement of 18% from six to eight and around 1% from eight to ten, the growth was only symbolic (around 0.2%) from ten to twelve (refer to \(w/{l}_{p}\) ratio in Fig. 6). Since the insertion of new control points leads to less and less improvement in the productivity, it is worth maintaining moderation when increasing the complexity of optimisation task. In the previous example, when searching for the optimal coordinates in equal width ranges, 16 generations for six control points, 48 generations for eight control points, 120 generations for ten control points, and 229 generations for twelve control points were required. Based on this, choosing the tool path model with eight or ten control points is recommended. In the following, modelling with ten control points will be considered in detail since the previously mentioned difference of 1% may still have a demonstrable effect on the machining cost.

4 Evaluating the developed method

To evaluate the developed method, simulation and experimental analyses were performed. In order to get a broad picture of the effectiveness of the developed method, the new technique came under scrutiny along with two other methods. The first method was the traditional and widely used cycloid strategy, and for the second, a modern solution was chosen. Most of the advanced CAM systems have such cycles which can control the cutter engagement. From these solutions, the NX CAM’s Adaptive Milling cycle was selected as a reference strategy. In this section, the evolution of productivity and tool load will be analysed at these three strategies for different input parameters.

4.1 Simulation results

During the simulation analyses, cutter engagement, path curvature, path length, and trochoidal step was examined for the three strategies. Based on these indicators, the productivity becomes directly comparable.

The initial parameters were as in Sect. 3: tool diameter \(\left(d\right)\) was \(\varnothing 8\hspace{0.5mm}\mathrm{mm}\), slot width \((b)\) was \(12\hspace{0.5mm}\mathrm{mm}\), and cutter engagement limit \(({\theta }_{max})\) was \(60^\circ\). For the optimised strategy, the minimum curvature radius limit \(({\rho }_{min})\) was \(0.3\hspace{0.5mm}\mathrm{mm}\) which was also sufficient to avoid local feed rate decreases during the cutting experiments.

Figure 7 shows the tool path shapes and the evolutions of cutter engagement and path curvature radius. Based on both the tool path shapes and the diagrams, it can be concluded that the examined strategies differ significantly from each other.

Fig. 7
figure 7

The tool path shapes, the cutter engagement and the tool path curvature radius at three different strategies for the initial data

In case of the cycloid strategy, the tool path curvature is as uniform as possible. However, its length was the longest, and its trochoidal step was the smallest in the comparison. The tool entering and exiting stayed for a longer time, and the nominal cutter engagement is only present for a moment. As a result, the tool works for only a single moment at the maximum permitted MRR.

In case of the NX CAM’s Adaptive Milling strategy, the tool path planning method is based on keeping cutter engagement constant. Although this strategy was not developed specifically for slot machining, it resulted in a slightly shorter tool path and a significantly larger trochoidal step compared to the conventional cycloid strategy. The shortcomings of Adaptive Milling strategy occur during the transition sections. Instead of rolling in, the tool enters parallel to sidewall of slot, where the cutter engagement exceeds the set value by almost 10%. Furthermore, the rolling out occurs along an arc with an extremely small curvature radius when the tool is reaching the other side of slot. In addition, the tool path is made up of such segments which do not fit tangentially to each other; therefore, sharp jumps can be observed in path curvature function.

In contrast, the optimised B-spline-based tool path has sufficient smoothness and a well-controlled path curvature radius on both the rolling-in and rolling-out sections. In addition, this strategy provides the shortest tool path length, and the trochoidal step is nearly as large as with the Adaptive Milling strategy. The cutter engagement diagram proves that tool entering and exiting take place during extremely short routes, so the tool can work at the maximum MRR as long as possible. Based on the curvature radius diagram, it can also be concluded that the tool path generated with developed method has \({G}^{2}\) continuity. The criterion of continuity is also met at the critical points, namely at the endpoint and the point corresponding to the multiple knot value \((t=0.5)\).

Figure 8 shows the effects of changing the slot width or the cutter engagement on tool path shape. Figure 8a compares the lengths of trochoidal loops, detailing the cutting and linking segments both together and separately. In the case of cycloid strategy, the path length depends only to a negligible extent on cutter engagement. In each case, the path length was almost equal to the circumference of a circle with a diameter \(b-d\). For the Adaptive Milling strategy, the lengths of both the cutting and linking segments were shorter at all settings than with the cycloid strategy. By decreasing the cutter engagement or increasing the slot width, the difference between the two strategies became even more significant in favour of the Adaptive Milling cycle. As a result of optimisation, the length of a B-spline-based loop was the shortest in all cases. The effect of changing the input parameters was similar to the cycloid strategy, but the path length was about 25% shorter in all cases.

Fig. 8
figure 8

Comparison of the examined tool path planning methods at different cutter engagements and slot widths: a) tool path length, b) ratio of the cutting and linking lengths, c) trochoidal step, and d) MRR

Figure 8b shows the ratio of the cutting and linking lengths. In the case of cycloid strategy, this ratio deteriorated slightly by decreasing the cutter engagement or increasing the slot width, which implies a similar change in the MRR. A similar trend can be observed for the optimised B-spline tool path. Surprisingly, in the case of Adaptive Milling strategy, the cutting/linking ratio showed exactly the opposite trend compared to the other two strategies, but the differences were small in this case as well.

When analysing the magnitude of trochoidal step (refer Fig. 8c), it can be concluded that the highest value was received with Adaptive Milling strategy in all cases. However, it should be marked that at this strategy, the cutter engagement exceeded the specified limit by 5–10% at tool entry. Nevertheless, the optimised strategy in this comparison also performed almost as good as the NX CAM cycle, and it overpowered the cycloid strategy by 15–25% in all cases.

The most important indicator in the comparison is related to MRR, which is shown in Fig. 8d. The calculation of the specific values was based on the depth of cut and the speed values used in cutting experiments, but the proportions would remain the same even if the cutting parameters were changed. For the cases with reduced cutter engagements, a corrected feed rate was used to ensure comparability. The equivalent feed rate which provides the same instantaneous MRR can be calculated as given in Eq. (17).

$${v}_{f}\left(\theta \right)={v}_{f,ref}\hspace{0.5mm}\frac{1-\mathrm{cos}\left({\theta }_{ref}\right)}{1-\mathrm{cos}\left(\theta \right)}\left[\frac{\mathrm{mm}}{\mathrm{min}}\right]$$
(17)

where \(\theta\) is actual cutter engagement, \({\theta }_{ref}\) is reference cutter engagement, and \({v}_{f,ref}\) is feed rate selected for reference cutter engagement.

Except for one case where equal outcomes occurred with the Adaptive Milling cycle, the optimised tool path surpassed the other two strategies in all circumstances. It can also be seen that in the case of cycloid strategy, the MRR was somewhat reduced by decreasing cutter engagement (\(-3.5\%\) at \(\theta =45^\circ\), and \(-7\%\) at \(\theta =30^\circ\)) or increasing slot width (\(-1\%\) at \(b=16\hspace{0.5mm}\mathrm{mm}\), and \(-2\%\) at \(b=20\hspace{0.5mm}\mathrm{mm}\)), as previously expected. The optimised strategy showed a similar trend but outperformed the cycloid strategy by \(55-57\%\). The drawback of the Adaptive Milling cycle was the largest compared to the optimised strategies at the initial parameter setting (\(-15\%\)), and the difference decreased by both reducing cutter engagement (\(-7\%\) at \(\theta =45^\circ\), and \(0\%\) at \(\theta =30^\circ\)) or increasing slot width (\(-12\%\) at \(b=16\hspace{0.5mm}\mathrm{mm}\), and \(-7.5\%\) at \(b=20\hspace{0.5mm}\mathrm{mm}\)). However, at the Adaptive Milling strategy, in addition to exceeding the limit for cutter engagement, it must also be taken into account that the continuity of tool path curvature was also not sufficient. Therefore, the actual feed will be slower than the programmed value at the critical segments of tool path, resulting in a lower MRR during machining.

4.2 Cutting experiments

To validate the new method, cutting experiments were also performed, where the development of cutting force was measured (refer Fig. 9). During the experiments, an EMCO Concept Mill 250 3-axis machining centre with a Sinumerik 840D controller was used. The acceleration limits of feed drives \(({a}_{max})\) were \(100\hspace{0.5mm}\mathrm{mm}/{\mathrm{s}}^{2}\). The tool was a solid carbide end mill (tool type: Totem, FBK0500726) with TiAlN coating, the tool diameter \((d)\) was \(\varnothing 8\hspace{0.5mm}\mathrm{mm}\), the number of teeth \((z)\) was 4, and helix angle \((\lambda )\) was 30°. Although the primary application field of trochoidal milling is to machine difficult-to-cut materials, to minimize the effect of tool wear, an easy-to-machine aluminium alloy (Al7075) was chosen for workpiece material. That was permissible because the aim of experiment was to investigate whether the developed method could control tool load, which can be assessed regardless of the workpiece material.

Fig. 9
figure 9

Experimental setup for cutting tests

The cutting experiments were performed for the reference geometry, where the slot width \((b)\) was \(12\hspace{0.5mm}\mathrm{mm}\), and the cutter engagement limit \(({\theta }_{max})\) was \(60^\circ\). Since the applied end mill tool had helical flutes, the axial depth of cut also had an effect on the characteristics of cutting force. Therefore, two different cutting depths were tested: \({a}_{p}=2\hspace{0.5mm}\mathrm{mm}\), and \({a}_{p}=8\hspace{0.5mm}\mathrm{mm}\).

The machining was performed with all three strategies described earlier. The cutting parameters have been set according to the tool catalogue. The cutting speed (\({v}_{c})\) was \(100\hspace{0.5mm}\mathrm{m}/\mathrm{min}\), the feed per tooth \(({f}_{z})\) was \(0.02\hspace{0.5mm}\mathrm{mm}\), so the spindle speed \((n)\) was \(3980\hspace{0.5mm}\mathrm{rpm}\), and the feed rate (\({v}_{f})\) was \(318\hspace{0.5mm}\mathrm{mm}/\mathrm{min}\). For the optimised strategy, the minimum curvature radius \(({\rho }_{min})\) remained \(0.3\hspace{0.5mm}\mathrm{ mm}\); thus, the curvature radius could not fall below the critical value \((0.28\hspace{0.5mm}\mathrm{mm})\) which was calculated according to Eq. (7). It is worth mentioning that if the optimisation had been performed without the curvature radius constraint, the curvature radius would have decreased to 0.04 mm at one point along tool exiting. Although the \(w/{l}_{p}\) ratio would have been about 3% better, the centripetal acceleration would be almost ten times higher at the critical point, far exceeding the capabilities of machine tool used in the experiment. During the experimentation, the cutting force was measured with a Kistler 9257BA type piezoelectric dynamometer. For data acquisition, the LabVIEW software was used. The sampling frequency was 25,600 Hz (~385 measured points per tool revolution). The force components were measured separately for each coordinate axis. In the evaluation, the maximum force in a tool revolution was analysed in the machining plane (XY), where the resulting force was calculated according to Eq. (18).

$${F}_{xy}=\sqrt{{{F}_{x}}^{2}+{{F}_{y}}^{2}} \left[N\right]$$
(18)

where \({F}_{x}\) and \({F}_{y}\) are the force components per axis.The results of cutting experiment are shown in Fig. 10. It can be seen that the developed strategy is fully capable of controlling the tool load. The same trends can be observed if the measured forces are compared with the evolution of cutter engagement (refer Fig. 6). In other words, this experiment also proved that the cutter engagement regulation is suitable for controlling the cutting force. Therefore, it can be stated based on this example that the developed strategy could provide a well-controlled tool load for other input data, too.

Fig. 10
figure 10

Experimental validation of the developed tool path generation algorithm: a) light axial depth of cut b) heavy axial depth of cut 

In the comparison, the maximum cutting forces for the cycloid strategy and the optimised tool path were the same (\(47 N\) at \({a}_{p}=2\hspace{0.5mm}\mathrm{mm}\), and \(139 N\) at \({a}_{p}=8\hspace{0.5mm}\mathrm{mm}\)), while the peak value was slightly higher for the NX CAM’s tool path (\(50 N\) and \(144 N\), respectively). This deviation is consistent with the simulation results, even if the difference was lower than expected. The deviation may be explained by the fact that the increase in cutter engagement was in those segments of the tool path where the path curvature function was not continuous either, so presumably, the tool passes through these segments slower than the programmed feed rate. This assumption is supported by the fact that the length of cutting section was shorter in the case of NX CAM’s cycle than in the case of cycloid strategy, yet according to the cutting force diagram, the former lasted a little longer. This example also demonstrates that the tool paths must have sufficient smoothness. It also increases the suitability of the developed algorithm that it can ensure the desired level of path smoothness.

The real machining times were also measured to analyse the effect of tool path smoothness. To determine the cycle time for the input parameters used previously, the internal timer of the CNC controller was used, which was able to measure with an accuracy of \(10\hspace{0.5mm}\mathrm{ms}\). Since the amount of removed material per period was different for each tool path strategy, the MRR was the basis of comparison, similar to the simulation analysis. The values calculated from the measured machining times are shown in Fig. 11. Although there was a few per cent difference compared to the simulation results (refer Fig. 8d), the order of effectiveness has not changed. In the case of smaller cutter engagements, where a higher feed rate could be used, the MRR decreased uniformly for the three strategies examined. In the case of a larger cutter engagement, where the feed rate was not so high that the path acceleration could exceed the machine tool's capabilities, the magnitude of the difference between the measured and simulation results was nearly negligible; only the trajectory generated by the CAM system was slower than expected.Because trochoidal machining is primarily used for roughing, the accuracy is not considered critical. However, controlling the tool load can indirectly guarantee the appropriate machining quality. Therefore, the new method can perform at least as well as the traditional methods. In summary, it can be concluded that the developed method performed as expected in all aspects and can provide a significantly higher MRR than the existing solutions under the same tool load.

Fig. 11
figure 11

The material removal rates calculated from the measured machining time

5 Conclusion and perspectives

This paper presents a new tool path generating algorithm for trochoidal machining of straight slots. The developed method can maximize MRR, while controlling the cutter engagement and tool path curvature radius. The proposed algorithm generates the tool path using a B-spline curve, and the tool path shape optimisation is performed by a differential evolution algorithm. The developed method was compared with the conventional cycloid strategy and the NX CAM’s Adaptive Milling cycle. Both simulation and experimental results demonstrated that the new strategy outperforms the existing methods in terms of productivity. In this study, the following conclusions can be drawn:

  • The trochoidal loop can be efficiently modelled with a B-spline curve defined by ten control points (including both the cutting and linking segments).

  • The developed algorithm also deals with the optimisation of linking segments in contrast to the existing advanced methods.

  • The MRR is significantly increased with the optimised tool path; the improvement is up to 50% compared to the widely used cycloid-shaped strategy.

  • The developed strategy is suitable for HSM because the tool load is well-controlled during the machining and the tool path has \({G}^{2}\) continuity.

Since a completely new algorithm has been introduced, there are still many opportunities to develop the method further and expand the field of application. The present method can only be used for straight slots, but with the extension of algorithm, it will also be possible to handle corners and arbitrary shaped grooves. For these general geometries, the calculation of offset curves and, consequently, the trochoidal loops would vary from period to period, the tool path should be defined as individual loops instead of a universal tool path pattern. The tangential tool roll-in and roll-out could be determined from the workpiece contour, while the continuity and curvature radius constraints could be considered in the same way as in slot machining. The only significant difference would be in the control of cutter engagement since for general geometry, it is difficult to interpret the trochoidal step. However, like controlling the curvature radius, this constraint could also be considered by rejecting the non-acceptable individuals when running the optimization algorithm.

In practical applications, the computational time can also be a bottleneck, so the improvement of optimisation algorithm may be the subject of further research. Furthermore, the present work not yet dealt with feed rate adjustment because the research was aimed to create a general method which independent of the capabilities of machine tool. However, in the developed framework, it is also possible to optimise the trajectory with a variable feed rate. This could be another future goal, since it would be a major step towards maximizing the productivity.