## 2 The Definition of the CNC Parameters and Dynamic Errors  
### Tool-Path Planning in the CNC Controller  
The function of the interpolator is to generate the velocity profile of the tool path, so the interpolator needs to provide smooth velocity change during the contour machining via a multi-axis machine tool. The tool-path planning algorithm maintains a smooth velocity transition during the high-speed feed motion. Most commercial CNC controllers use S-curve velocity profile along with the function of jerk control. According to the specific feedrate and displacement from the NC code, the kinematic profiles (velocity) are generated by the interpolator in the CNC controller with the CNC parameters (jerk, acceleration, and time constant of the acceleration/deceleration (Acc/Dec)). Figure 2 shows the typical trapezoidal acceleration profile. For feed motion along the tool path, acceleration profiles are linear, velocity profiles are parabolic, and position profiles are cubic for regions 1, 3, 5, and 7 where time constant of Acc/Dec with constant jerk occurs. Acceleration values are constant and jerk is zero for regions 2 and 6, where velocity profiles are linear and position profiles are parabolic. In region 4, jerk and acceleration values are zero, velocity is constant, and position is linear. If the feed motion has the greatest acceleration, the acceleration profile does not have the regions 2 and 6. When the triangular acceleration profile has been generated, the result is no constant acceleration, but it has a short acceleration peak. While this profile is useful to reduce machining time, it has very high requirements on the performance of the machine. Finally, the result of the tool-path planning is divided into the position command of each feed axis to enter the servo loop, and the motor that drives each feed axis reaches the position required for the workpiece shape. Actually, the tool-path geometry not only consists of a straight path, but also includes circular and curved paths generated from many short lines. The general purpose machine tool consists of three mutually perpendicular linear axes, and the multi-axis synchronous motion makes the tool-path process a complex shape. Figure 3 shows the tool path with complex shape. It consists of many short lines. When the X and Y axes are in synchronous motion for the tool path, the path velocity will be reduced to distribute the \(X\)-axis velocity (\(V_{x}\)) and \(Y\)-axis velocity (\(V_{y}\)). The \(P_{1}\) and \(P_{2}\) are the corner motion. The feedrate must be decreased at \(t_{\rm P1}\) and \(t_{\rm P2}\) (as shown in Figure 3). One of the CNC parameters is to set a corner velocity (\(V_{c}\)) for the tool-path planning; the \(V_{c}\) is composed of the \(V_{x}\) and \(V_{y}\). The purpose is to define the time point at which the \(V_{y}\) starts to increase velocity when the \(V_{x}\) has decelerated to the \(V_{c}\). The NC code is circular with the radius (\(R\)), and the circular path is composed of the \(X\)-axis and the \(Y\)-axis. In fact, the path velocity (\(V_{p}\)) has to be consistent, while the \(V_{x}\) and \(V_{y}\) are changing constantly, and each axis is constantly accelerating and decelerating at the same time. [PERSON] et al. [8] showed that the velocity profiles are similar to the sine wave during the feed motion. There are two kinds of CNC parameters to limit the velocity of the circular path for the interpolator in a commercial controller. One is the arc velocity (\(V_{a}\)) and the other is centripetal acceleration (\(A_{c}\)). The feedrate of NC code (\(V_{f}\)) is similar to the \(V_{p}\), but the \(V_{f}\) is only used in the velocity of the circular path for the tool-path planning. The relationship between the centripetal acceleration and the arc velocity is expressed as:  
\[A_{p}=\big{(}V_{f}\big{)}^{2}/R. \tag{1}\]  
When \(V_{f}\) is larger than the feed motion, the greater centripetal acceleration is excited, causing the error between the circular path and the ideal path at the same time.