Abstract
When machining a series of short linear segments, the computer numerical control system interpolates the machining path with the pre-specified spline curve to obtain continuous feed motion. However, to obtain adequate smooth tool-paths to smooth the feed velocity and acceleration, the computer-aided manufacturing system needs to use a higher order spline curve, which will be limited by some technical bottlenecks. In this article, a new real-time interpolation algorithm is proposed from the perspective of kinematics to achieve uninterrupted feed motion throughout the global tool-path. At the same time, the acceleration profile achieves G2 continuous to avoid unnecessary feed frustration and inertial impact, reaching the balance between time-optimal and motion performance. First, the jounce-limited acceleration curve is blended at the corner of the machining path, and the optimal cornering transition velocity is obtained by adding the velocity, acceleration and contour error constraints to the corner transition motion. Then, according to the linear segments with different lengths between the corners, combined with the feed motion around the corner, a look-ahead interpolation algorithm is proposed to calculate the maximum feed rate with the constraint of the linear segment length and kinematic boundary conditions. At last, for the linear segments whose corner contours overlap with each other after interpolation, the smooth transition between the two corners can be realized by mixing the feed motion of the next corner. Compared with non-uniform rational B-spline interpolation algorithm, the proposed algorithm reduces the total machining time by 14% and the computer numerical control system improves the computational efficiency by 11%. It proves that the proposed algorithm has better application value in the manufacturing of complex parts.
Introduction
In the aerospace, mold manufacturing and other fields, some complex contours of parts are often required. The computer-aided manufacturing (CAM) system usually discrete parts contour path into a series of consecutive linear segments, and discretization becomes finer and denser with the increasing of path curvature. During the machining process, the feed motion controlled by the CNC system must be stopped completely at the corner formed by the intersection of two short linear segments. This feed motion is called point-to-point (P2P) motion. In order to improve machining efficiency, forming a consecutive feed motion at the corner of the tool-path has become a widely used method.1,2 The smooth high-order spline curve is interpolated around the sharp corner and the feed planning is carried out in the mixed linear segments at a higher tangential speed for better machining quality. However, the interpolation of the high-order parameter curve deviates from the original machining path to form the contour error. 3 This is not always detrimental. If the contour error is controlled within a certain range, this method can be applied to roughing or semi-finishing, which can greatly improve the machining efficiency. Many experts and scholars have proposed a variety of spline curve interpolation methods to control the contour error.4–9 Zhao et al. 5 used the B-spline curve to fit the selected dominant points, generating the smooth tool-path and federate profile. Lu et al. 6 used the cubic B-spline curve interpolation path and applied the iterative optimization process to obtain the knot vector element, attaining high accuracy and computation efficiency. Han and Chen 7 proposed the new velocity control algorithm to limit velocity fluctuations and to achieve a controllable jerk value based on the non-uniform rational B-spline (NURBS). Zhang et al. 8 proposed the equidistant double NURBS interpolation algorithm to obtain uninterrupted feed motion and further improve the machining accuracy. After the local corners are smoothed, the reasonable motion planning is performed on the mixed linear segments. S-type acceleration and deceleration based on jerk-limited acceleration5,6 are widely used in high-speed motion, generating the smooth velocity profile by piecewise constant jerk segments, providing the balance between the smoothness of the machined surface and the optimal time. 10 However, this two-step uninterrupted feeding strategy is inefficient and complicated. In general, the curve interpolation between the corners is the high-order parameter curve, which is limited by some real-time interpolation bottlenecks, such as the inability to accurately calculate the curve lengths, the inability to effectively suppress the chord error and the inability to accurately control the contour error.11–13 Therefore, some scholars recently started to explore the method of directly completing the uninterrupted feed motion in one step and generating a smooth machining path and velocity profile. Tsai and Huang 14 proposed a dynamic acceleration and deceleration interpolation algorithm by adding the finite impulse response (FIR) filters to achieve the smooth transition velocity. Tajima and Sencer 15 proposed the kinematic corner smoothing technique to achieve corner smooth transitions with optimal time. Biagiotti and Melchiorri 16 used the FIR filter to generate minimized machining time under the constraints of velocity and acceleration. Fan et al. 17 developed an efficient convex optimization method to address the time-optimal feed rate planning problem with these complex constraints. However, the current algorithms mainly realize the technology of uninterrupted feed motion by smoothing the corners and assume that the linear segment between corners is long enough for the driver to achieve local corner smoothing. There are relatively few studies on the uninterrupted feed motion with short linear segments between corners and even overlapping corner profiles. The acceleration curve with G1 continuous has non-conductive points, which will cause additional inertial vibration and impact. Therefore, a new real-time interpolation method based on kinematics is proposed in this article; the consecutive feed motion strategy is implemented in the global machining path and generates G2 continuous acceleration curve. First, the jounce-limited acceleration curve is mixed with the feed speed and acceleration of the axis to generate the corner’s uninterrupted feed motion. Considering the kinematic profiles of the corners and the length of the linear segments between the corners, the look-ahead interpolation algorithm is proposed to achieve the optimal time in the feed motion between corners. At the same time, for the linear segments where corner profiles overlap each other, the kinematic profiles at the corners are taken into consideration, and the contour path of the next corner is mixed to generate the smooth feed motion. Simulation and experimental results show that the algorithm can generate the tool-path with the specified contour error along the short linear segments, and the acceleration reaches G2 continuous.
Uninterrupted cornering motions with smoothed acceleration
In this section, the velocity and acceleration are planned directly around the corners based on the jounce-limited acceleration curve to generate the smooth corner profile trajectory, as shown in Figure 1. The two linear segments ts and te intersect to form the corner point Pc whose Cartesian coordinate position is [Xc,Yc] and the direction of the linear segment is θ s and θ e . In order to realize the uninterrupted feed motion, it is assumed that the corner motion starts and ends with the same velocity Vc and acceleration Ac so that the corner contour can be obtained symmetrically around the corner bisector. The corner bisector divides the corner contour into two sections, the duration of the previous period is T1, the duration of the latter period is T2, and the total cornering duration is T1 + T2 = Tc. The maximum contour error is at the midpoint of the corner contour. The Euclidean distance from the beginning and end of the cornering transition to the corner point Pc is Rc. Based on the above conditions, the kinematic curves can be derived by integrating the jounce curve, and the maximum transition velocity, the cornering duration and the corresponding jounce value are further deduced.

Corner interpolation algorithm.
The kinematic curves are shown in Figure 2. At the corner of the path, the feed velocity is controlled by the piecewise constant jounce segments to ensure uninterrupted feed motion; thus, the smooth acceleration curve is formed to achieve the optimal feed strategy. For X–Y plane motion, kinematic profiles in Figure 2 are
where t is the cornering time, T1 = T2=Tc/2, and Sx is the jounce magnitude. The Y-axis equations need to replace the x to y. The boundary conditions of velocity at the beginning and end of the corner motion are Vs and Ve, and the acceleration boundary conditions at the beginning and end of the corner motion are As and Ae which can be calculated from the corner motion velocity Vc and the acceleration Ac

Velocity, acceleration, and jerk profiles.
The velocity transition for X-axis can be obtained from equation (2)
where θ s and θ e are the angles at the beginning and end of the corner motion, respectively. θ ε is the error angle. The maximum contour error is ε, which is set by the program. The contour error of X-axis at the maximum contour error is
where θ ε =π/2 + (θ s + θ e )/2 can be derived from the corner profile of Figure 1. The Y-axis equations need to replace the sine term with the cosine term. Rc is the linear displacement during cornering motion, which can be deduced from equation (1)
To achieve the optimal feed strategy, the minimum cornering duration Tc can be achieved by setting the limit axis jounce or acceleration at least 1 to reach the saturation of the drive. The limit axis can be determined by equation (3). If ΔVx > ΔVy, then the X-axis is the limit axis and the minimum cornering duration can be calculated by the X-axis velocity, acceleration, and maximum contour error constraints
The three constraint equations have four unknowns, Sx, Ac, Vc, T1, which can be calculated by setting the limit axis jounce or acceleration saturation.
When the limit axis jounce is saturated, Sx = Smax
When the limit axis acceleration is saturated, Ac = Amax
In order to control the drive system within the motion limit, Vc value is
In the X–Y plane motion, the X-axis is calculated as the limit axis by equation (6) to achieve the continuous feed motion strategy, and the limit axis saturates either jounce or acceleration limits of the drives to achieve the balance of time optimization and drive performance. When the Y-axis is the limit axis, the corresponding parameters can be obtained by replacing the sine with the cosine. It is noteworthy that when the corner is particularly blunt, the calculated cornering transition velocity Vc may exceed the value F set by the numerical control (NC) program. In this case, the cornering transition velocity is set as F, and the corresponding parameters are calculated by F.
Uninterrupted global motions with smoothed acceleration
Figure 3 shows the machining path planned by the NC program. The corner of each path can be used to realize the uninterrupted feed motion of the corners through the corner smoothing technique introduced in section “Uninterrupted cornering motions with smoothed acceleration.” From equations (7) and (8), the maximum cornering transition velocity Vc and acceleration Ac for each corner can be determined and a series of corner boundary conditions can be read to plan the uninterrupted feed motion between corners as shown in Figure 4 for the feed strategy base on look-ahead interpolation algorithm. At the beginning of the interpolation motion, the velocity of the feed motion at the end of the path

Global motion planning strategy.

Feedrate planning in global motion.
Motion planning along separated corners
Through the uninterrupted feed motion of the corner introduced in the first section, the transition distance
If
where ti is the relative time boundary of each phase, which is calculated from the beginning of each phase. Ti is the duration of each phase. Vm is the maximum feed velocity in the linear segments and Vi is the velocity reached at the end of each phase. The displacement curve can be obtained by integrating the velocity curve.

Motion planning along separated corners.

Jounce-limited acceleration profile.

Motion planning along overlapping corners.
The duration of each phase is calculated by equation (11)
When the duration time T3 and T9 calculated by equation (12) are less than zero, the constant acceleration phase does not exist. Set T3 = T9 = 0 and the maximum acceleration is recalculated by the following quartic equation
The distance between the corners
If T6 < 0 is calculated by equation (14), then the constant velocity phase does not exist. The feed velocity does not reach the commanded maximum velocity, and Vm is recalculated as follows
If Vm calculated by equation (15) has complex roots, the maximum cornering velocity
The cornering velocity is reduced to the minimum
While reducing the cornering velocity, the maximum contour error is also reduced. Meanwhile, the length
First, if the linear segment between corners is very short, it is not realistic to plan a complete 11-segmented jounce-limited acceleration curve and replace the original 11-segmented with 6-segmented jounce-limited acceleration curve. Then, assuming constant velocity does not exist in original 11-segmented jounce-limited acceleration curve and the duration of the constant velocity phase is zero, T3 = T6 = T9 = 0, and it is assumed that if
The maximum acceleration An can be calculated by the following equation
The maximum deceleration Ap can be achieved by swapping
An and α can be achieved by equations (18) and (19) so that the optimal transition velocity can be obtained by equation (15). This method calculates a feasible solution of the optimal transition velocity by the parameter α, avoids deep iterative problems and greatly reduces the time consumed by the calculation.
Motion planning along overlapping corners
This section presents the interpolation algorithm for smoothing linear segments with overlapping corner contours, as shown in Figure 8. For overlapping corner contours, the plan is to transition the midpoint of the two corner contours to generate a high-speed transition trajectory, as shown in Figure 9. The velocity, acceleration and jerk values at the midpoint of the two corner profiles are stitched by the 4-segmented jounce-limited acceleration curve to achieve the smooth transition of acceleration, as shown in Figure 10.

Speed and acceleration stitching at the separated corner.

Contour stitching at overlapping corners.

Speed and acceleration stitching at overlapping corners.
The midpoint of each corner of the parameter values can be written as
T 1 represents the duration of the first phase of the corner smoothing algorithm introduced in section “Uninterrupted cornering motions with smoothed acceleration.” Take the X-axis as an example, the boundary conditions of jerk, acceleration, velocity, and displacement can be written as
where Tm is the total duration of the motion, Sm1–Sm4 is the jounce values of each phase, and there are 11 unknowns in the X-axis and Y-axis, Sm1x–Sm4x, Sm1y–Sm4y, λx, λy and Tm. However, based on only eight equations, it is essential to increase the boundary conditions. When λx = 0.5 and Sm2x = –Sm3x, Tm can be determined by four constraints on the X-axis, as shown in equation (22). The same method can be used with Tm to find the unknown of the Y-axis
According to the above equation, uninterrupted feed motion between overlapping corners can be realized, and the contour trajectory of two corners can be mixed to achieve the smooth transition of acceleration. With this, uninterrupted feed motion planning is performed for the corners, the separated corner contours and the overlapping corner contours, to achieve uninterrupted feed motion of the global tool-path. At the same time, the G2 continuous acceleration curve is realized based on jounce-limited acceleration curve.
Simulation and experimental results
Simulation results
This section includes simulation and experiments of the global uninterrupted feed motion technology described in the previous section. First, the cornering interpolation algorithm is simulated. Figure 11 shows a 60° acute feed motion and Figure 12 shows a 120° obtuse feed motion. The path lengths for acute and obtuse angles are both 23.08 mm and the contour error is set to 30 μm in both cases. The maximum feed speed of the drive is 100 mm/s, the acceleration limit is 1000 mm/s2, and the jounce limit is 1 × 107 mm/s4. The maximum cornering velocity of the acute angle is 20.39 mm/s2. The machining time is 0.456 s, and the duration of the corner transition is 0.041 s. The maximum cornering velocity of the obtuse angle is 26.84 mm/s2. The machining time is 0.395 s, and the duration of the corner transition is 0.054 s.

Acute angle motion feed strategy.

Obtuse angle motion feed strategy.
The maximum cornering velocity for the acute angle is relatively smaller, and the duration of cornering transition motion is shorter in that the length of the corner transition profile is relatively shorter, leading to longer remaining linear segments and total machining time. The reason for obtuse angle machining parameters is the opposite. The simulation results demonstrate that the cornering interpolation algorithm generates the corner contour trajectory around the corner. The contour trajectory can precisely control the contour error, and the generated acceleration curve reaches G2 continuous. At the same time, the acceleration or the jounce of at least one axis reaches the maximum limit of the drive for the fastest cornering transition motion.
Then, the interpolation algorithm of short linear segments between corner contours is simulated. The motion planning along separated corners (MPASC) described in section “Motion planning along separated corners” and the motion planning along overlapping corners (MPAOC) described in section “Motion planning along overlapping corners” are shown in Figures 13 and 14, respectively. The total length of the machining path is 17 mm, the length of the linear segment between two corner points is 1 mm, and two obtuse angles are 143.13° and 126.98° respectively. Set the maximum feed velocity and the maximum acceleration the same as the previous, and the jounce limit is 2 × 107 mm/s4. The maximum contour error of the separated corner feed strategy is set to 10 µm, and the maximum contour error of the overlapping corner feed strategy is set to 100 µm. The total machining time for the separated corners feed strategy is 0.4442 s, and the duration of the feed motion for the short linear segment is 0.028 s. The total machining time of the overlapping corner feed strategy is 0.418 s, and the duration of the feed motion for the mixed two corner contours is 0.054 s. When the contour error increases, the total machining time is reduced. The machining time with the contour error of 100 μm is reduced by nearly 6% compared to the machining time of 10 μm. The maximum feed velocity of the MPASC algorithm is 25.81 mm/s and the minimum feed velocity is 4.88 mm/s, and the maximum feed velocity of the MPAOC algorithm is 23.21 mm/s and the minimum feed velocity is 15.46 mm/s. It is found from the simulation that when the corner contour error increases, the feed velocity between the corners tends to be high and steady. Take full advantage of the driver’s motion performance and keep the acceleration curve G2 continuous, which brings smooth acceleration transition.

Motion planning along separated corners.

Motion planning along overlapping corners.
Experimental results
Experimental Cartesian X–Y motion system equipment is shown in Figure 15. Plane X–Y motion is guided by two linear motors. To maintain well position synchronization and path tracking, the servo amplifier is set to operate in torque (current) control mode. The feedback resolution of the linear encoder is 0.8 µm. The closed-loop sampling time of the servo system is 0.1 ms, and the position feedback bandwidth of X, Y axis is ω n = 25 Hz. The equipment used by the host computer is Windows 7 system, i5 2GHz clock chipset PC.

Experimental setup.
As shown in Figure 16, the helical tool-path has a total length of 51.43 mm and a total of 39 corner points, with the helical portion of the path being discrete as some short linear segments with an average length of 1.2 mm. P2P interpolation algorithm, MPASC algorithm and MPAOC algorithm are separately carried out on the helical path. The P2P interpolation algorithm requires the complete stop at each corner point, which is completely synchronized with the path of the G01 code. The maximum contour error of the MPASC is 3 µm and the maximum contour error of the MPAOC is 40 µm. The maximum feed velocity is set to 100 mm/s, the maximum acceleration is set to 1000 mm/s2, and the maximum jounce is 2 × 107 mm/s4. The motion profiles are demonstrated in Figure 17. Due to the short linear length, the feed motion between the corner profiles cannot reach the maximum feed velocity, and the MPASC must reduce the maximum contour error at the corners. In order to seek the optimal cornering velocity between linear segments, the maximum contour error is reduced by 0.02–0.08 µm from the specified value. The kinematics performances are shown in Figure 18. The P2P interpolation algorithm shows the longest machining time and the maximum speed fluctuations, while the jerk and acceleration values always reach the motion limit of the driver. The MPASC provides faster machining time, and it takes into account the jounce limit, so the acceleration curve reaches G2 continuous. The MPAOC provides the least machining time, and the velocity curve tends to be steady with high values. At the same time, acceleration and jounce values are relatively small, the minimum load on the drive. Similarly, the acceleration curve reaches G2 continuous. The experimental measurements of the contour errors are shown in Figure 19, and the larger contour errors for the three algorithms occur at the corners of the path. The total machining time, contour error, and calculation time are exhibited in Table 1. The total machining time of the MPASC algorithm is 3.6% higher than that of the P2P algorithm. The total machining time of the MPAOC algorithm is 26.2% higher than that of P2P algorithm. At the same time, the contour error performance of the three algorithms is basically the same. Finally, the computational load of P2P is the least, but its computational efficiency (computational time/machining time) is the lowest, which proves that MPASC and MPAOC algorithms are more suitable for modern NC systems.

Motion planning along spiral tool-path.

Tool-path and corner profiles.

Kinematic profiles of algorithms.

Measured contour errors in experiment.
Machining time and performance comparison in the helical tool-path.
P2P: point-to-point; MPASC: motion planning along separated corners; MPAOC: motion planning along overlapping corners; RMS: root mean square.
Finally, experiments were performed on the more complex heart tool-path, as is shown in Figure 20. The length of the heart tool-path was 119 mm. Two hearts were discretized into short linear segments of 1.5 mm in length. Two short segments intersected to form a total of 50 corners. Some parameters are set up as follows: the maximum feed velocity is 150 mm/s, the maximum acceleration is 2000 mm/s2, the maximum jounce is 1.5 × 107 mm/s4, and the maximum contour error is 50 µm (Figure 21). Compared to P2P algorithm, NURBS interpolation algorithm 8 tests the performance of the proposed algorithm (Global). The performance is demonstrated in Figure 22. The P2P algorithm uses the longest machining time, and the velocity fluctuations become more intense as the acceleration limit increases. The acceleration and jerk reach the limit of the driver most of the time. The NURBS interpolation algorithm constructs the smooth acceleration tool-path for machining, resulting in faster cornering transition velocity and less velocity fluctuations. The load of the driver was less, and the machining time increased by 10.9% compared with the P2P algorithm. The proposed algorithm (Global) achieves the least machining time, which is nearly 18% faster than the P2P algorithm. It makes full use of the motion performance of the drive, the velocity fluctuation tends to be steady, and the acceleration curve reaches G2 continuous. The experimental measurements of the contour errors are shown in Figure 23. After the increase in the speed and acceleration limit, the contour error of P2P increases obviously and the error fluctuation also increases. The errors of NURBS and Global algorithm are similar. The NURBS interpolation algorithm constructs complex parameter curve, so the computational time is the largest. The P2P algorithm does not need to consider the jounce limit, and there is no complicated calculation, so the computational time is the least. The Global algorithm does not need to find the optimal cornering transition velocity through deep iterative, greatly reducing the computational time, and its computational efficiency is improved by nearly 11% compared with the NURBS algorithm (Table 2).

Motion planning along heart tool-path.

Tool-path and corner profiles.

Kinematic profiles of algorithms.

Measured contour errors in experiment.
Machining time and performance comparison in the heart tool-path.
P2P: point-to-point; NURBS: non-uniform rational B-spline; RMS: root mean square.
Conclusion
In this article, the new interpolation algorithm is proposed for the global feed motion of continuous short linear segments. The algorithm interpolated the global tool-path based on jounce-limited acceleration curve to realize the balance between drive performance and machining time of the CNC system. At the corners of the machining path, the acceleration, velocity, and displacement boundary conditions are used to generate feed profile that can be used to precisely control cornering contour errors. A new kinematic look-ahead interpolation algorithm was developed for the short linear segments in the middle of the corners and the overlapping corner contours, which effectively stitched the feed motion between the corners, so the continuous feed motion and the G2 continuous acceleration curve are achieved in the global tool-path. By contrasting the NURBS and P2P interpolation algorithms, the machining time is increased by 18% over the P2P algorithm when machining the tool-path with 50 corners. The computational efficiency was increased by 11% compared with the NURBS interpolation algorithm with the same tool-path. Experiments show that the proposed algorithm has application prospects in the producing and machining of complex parts.
Footnotes
Appendix 1
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The research is sponsored by the National Natural Science Foundation of China (No. 51775328).
