Keywords

1 Introduction

Industrial robots are recently used for machining applications like grinding, polishing, and milling due to their advantage of the large workspace, flexibility, and low cost. However, traditional industrial robots are usually designed to achieve precise point movement and repeatable tasks, while the trajectory accuracy and absolute positioning accuracy are less accurate [1, 2]. Because of their series structure and low joint stiffness, the industrial robot is prone to vibration and large deformation in the process of complex curved surface machining.

Compared to industrial robots controller, CNC controller have advantages in operability, continuous-path performance, and functionality. A CNC controller kernel was integrated on the KUKA KR C4 controller and operated through a CNC-specific user interface [3]. Wen [4] and Susemihl [5] use Siemens 840D CNC controller to control mobile robots for large component machining. Xie and Liu [6,7,8,9] proposed integrated methods combining elasto-geometrical error calibration, continuity toolpath smoothing, and real-time tracking errors compensation for improving machining precision, which was tested in a mobile parallel robot with ISG CNC kernel. However, compared with the robot controller, the CNC controller requires additional system software of robotic machining system, which increases the cost, so the robot controller is still a standard control method in many small and medium enterprises (SME). So it is necessary to compare the robot trajectory performance under the CNC controller and the robot controller to provide more choices for enterprises.

NC programs, programmed offline using a CAD/CAM system, is consisted of linear toolpath segments. CNC controller and robot controller have different toolpath smoothing algorithms to improve continuity, influencing robot trajectory accuracy and dynamic performance. Adel [10] proposed a cartesian space motion planning strategy to suppress vibration. Tunc [11] analyzed the influence of trajectory approximation method accuracy setting option on hexapod robot path contouring accuracy and feedrate. Wu [12, 13] researched the dynamic performance of the CNC kernel and KRL kernel of the KUKA robot in line path and corner path, which consider high/low running speeds and acceleration. Found that dynamic performance and trajectory accuracy of CNC kernel was better at high running speeds. However, the running speeds of the machining process are generally low, and the CNC controller provides alternative toolpath smoothing methods that need to be tested using complex curved paths.

In summary, these methods above ignoring comparing the positioning trajectory errors between CNC controller and robot controller for complex trajectory, and does not analyze the parameter settings that affect the dynamic performance of the robot controller. This paper compares the robot motion accuracy and velocity performance under different control kernels with several parameters. First, propose a method to calculate path errors of the industrial robot based on laser tracker dynamic measurement, which exactly matches the data from the measured values of the laser tracker coordinate system to the programmed points values of the workpiece coordinate system. Then, the constant load running experiments of complex toolpath in cartesian space are designed based on the KRL kernel and CNC kernel of the KUKA robot. Finally, the influence of different velocities and approximate parameters on the trajectory errors and velocity stable is studied.

2 Toolpath Contouring Errors of Industrial Robot

For identifying toolpath contouring errors of industrial robots with a laser tracker, exactly match the coordinates data from programmed points with measurement data of laser tracker is required. CAD/CAM software is usually used to generate a cutter location file containing many discrete tool position vectors and orientation vectors and then generate the processing program in the workpiece coordinate after post-processing according to the robot characteristics and the control system language.

\({{\varvec{P}}}_{\rm{code}}^{\rm{rb}}\) is the position of the programming point in the robot base coordinate system and is defined as follows

$$ {{\varvec{P}}}_{\rm{code}}^{\rm{rb}} = {{\varvec{T}}}_{\rm{wp}}^{\rm{rb}} {{\varvec{T}}}_{\rm{tool}}^{\rm{wp}} {{\varvec{T}}}_{\rm{fl}}^{\rm{tool}} {{\varvec{P}}}_{\rm{code}}^{\rm{fl}} $$
(1)

Where \({{\varvec{T}}}_{\rm{wp}}^{\rm{rb}}\) is the homogeneous transformation matrix between robot base coordinate system and workpiece coordinate system, \({{\varvec{T}}}_{{tool}}^{{wp}}\) is the homogeneous transformation matrix between workpiece coordinate system and robot tool coordinate system,\({{\varvec{T}}}_{\rm{tool}}^{\rm{fl}}\) is the homogeneous transformation matrix between robot flange coordinate system and tool coordinate system, \({{\varvec{P}}}_{\rm{code}}^{\rm{fl}}\) is the position of the programming point in the robot flange coordinate system (Fig. 1).

Fig. 1.
figure 1

Transformations for robot milling system

In order to improve the prediction accuracy of contour error, the isoparametric linear method is used to interpolate the parameter points. For the interpolation points between \({{\varvec{P}}}_{\rm{code\_}{{i}}}^{\rm{fl}}\) and \({{\varvec{P}}}_{\rm{code\_}{{i}}\rm{ + 1}}^{\rm{fl}}\)

$$ \begin{aligned} {{\varvec{P}}}_{\rm{code\_}{{i,k}}}^{\rm{fl}} & = \frac{{\left( {{{\varvec{P}}}_{\rm{code\_}{{i}}\rm{ + 1}}^{\rm{fl}} - {{\varvec{P}}}_{\rm{code\_}{{i}}}^{\rm{fl}} } \right)}}{{\rm{floor}\left( {{{\left\| {{{\varvec{P}}}_{\rm{code\_}{{i}}}^{\rm{fl}} {{\varvec{P}}}_{\rm{code\_}{{i + 1}}}^{\rm{fl}} } \right\|} / d}} \right)}} + {{\varvec{P}}}_{\rm{code\_}{{i}}}^{\rm{fl}}, \\ & k = 1 \cdots \rm{floor}\left( {{{\left\| {{{\varvec{P}}}_{\rm{code\_}{{i}}}^{\rm{fl}} {{\varvec{P}}}_{\rm{code\_}{{i}}\rm{ + 1}}^{\rm{fl}} } \right\|} / d}} \right) \\ \end{aligned}$$
(2)

Where \(d\) is the minimum distance of two control points. After interpolation, the number of program points is changed from \(n\) to \(n_{{in}}\).

The position of the auxiliary measurement points in the robot base coordinate system is expressed as follows

$$ {{\varvec{P}}}_{\rm{me}}^{\rm{rb}} = {{\varvec{T}}}_{\rm{lm}}^{\rm{rb}} {{\varvec{P}}}_{\rm{me}}^{\rm{lm}} $$
(3)

Where \({{\varvec{T}}}_{\rm{lm}}^{\rm{rb}}\) is the transformation matrix representing the pose of the laser tracker coordinate system with respect to robot base coordinate system, \({{\varvec{P}}}_{\rm{me}}^{\rm{lm}}\) is the position of the auxiliary measurement point in the robot flange coordinate system.

The orthogonal distance between the measuring point and the closest linear toolpath segments of the program and the distance between the measuring point and the closest reference point of the program, where the minimum value is taken as the contour error [14].

The position vector \({\hat{{r}}}_{\rm{p}\_j}\) from the closest programmed point to the measuring point is

$$ {\hat{{r}}}_{\rm{p}\_j} = \overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\rightharpoonup}$}}{{{{\varvec{P}}}_{code\_\rm{t}}^{rb} {{\varvec{P}}}_{me\_\rm{j}}^{rb} }} ,t = 1, \cdots n_{in} ;j = 1,2 \cdots m $$
(4)

The normalized toolpath segment vectors of programmed code are defined as

$$ {\hat{\user2{r}}}_{t} = \frac{{\overline{{\user2{P}_{{{\text{code}}\_{\text{t - 1}}}}^{{{\text{rb}}}} \user2{P}_{{{\text{code}}\_{\text{t}}}}^{{{\text{rb}}}} }} }}{{\left\| {\overline{{\user2{P}_{{{\text{code}}\_{\text{t - 1}}}}^{{{\text{rb}}}} \user2{P}_{{{\text{code}}\_{\text{t}}}}^{{{\text{rb}}}} }} } \right\|}} $$
(5)
$$ {\hat{\user2{r}}}_{{t + 1}} = \frac{{\overline{{\user2{P}_{{code\_t}}^{{rb}} \user2{P}_{{code\_t + 1}}^{{rb}} }} }}{{\left\| {\overline{{\user2{P}_{{code\_t}}^{{rb}} \user2{P}_{{code\_t + 1}}^{{rb}} }} } \right\|}} $$
(6)

Where \({{\varvec{P}}}_{\rm{code\_}{{t}}}^{\rm{rb}}\),\({{\varvec{P}}}_{\rm{code\_}{{t}}\rm{ + 1}}^{\rm{rb}}\) and \({{\varvec{P}}}_{\rm{code\_}{{t}}\rm{ + 1}}^{\rm{rb}}\) are three adjacent programmed points.

The orthogonal distance \(\varepsilon_{{c1}}\) between the measuring point and the closest linear toolpath segments of the program is defined as

$$ \varepsilon_{\rm{c1}} = \left\| {{\hat{{r}}}_{{\text{p}}_{{j}}} - \frac{{({\hat{{r}}}_{{\text{p}}_j} \cdot {\hat{{r}}}_{{\varvec{t}}} )}}{{\left\| {{\hat{{r}}}_t } \right\|^2 }}{\hat{{r}}}_t } \right\| $$
(7)

Moreover, the contour error is estimated as follows

$$ \varepsilon_{\rm{c}} = \min (\varepsilon_{\rm{c1}} ,\left\| {{\hat{{r}}}_{{\text{p}}_{{j}}} } \right\|) $$
(8)

3 Experiment and Discussion

In order to compare the two different control systems, a 5-axis complex curve toolpath is planned to analyze the performance of a KUKA robot under the two controllers, and a laser tracker is used to measure the toolpath contouring accuracy and feed speed. In order to avoid the influence of cutting force on the contour accuracy of the industrial robot, the measurements are performed under no-machining operational conditions.

The experiment setup is shown in Fig. 2. Within the KUKA robot milling system (KR 160 R1578), an electric spindle is installed at the robot’s flange. The robot milling system's total weight is about 698 kg, and the maximum robot load is 160 kg. The position repetition accuracy can reach ±0.06 mm, and the maximum can reach 1578 mm. The CNC kernel and KRL kernel have been completely integrated into a KR C4 control system.

The CNC kernel can run NC programs directly on the KR C4 controller, and preload 150 path points to achieve more precise and efficient trajectory planning. Several path smoothing methods are provided to rounding and smoothing a programmed curve within specific tolerances, such as Contour Mode, B-Spline Method, Filter programming, Akima spline, and PSC functions. The KRL kernel implements the NC program of many short linear blocks through the LIN instruction and trajectory approximation function. The kernel only preloads five path points, which limits the robot's contour tracking performance.

The API T3 laser tracker has been used to determine the reference and the dynamic measurement of the trajectories at a sampling frequency of 100 Hz, and its accuracy is better than 0.025 mm. The laser tracker tracks the robot's movement by identifying a target ball glued to the side of the motorized spindle. Before the experiment, the actual position of the auxiliary measuring point in the robot flange coordinate system was calibrated using the reference method [5, 15]. In order to determine the influence of approximation contour method parameter settings on the densely discretized toolpath, robot Sensor Interface (RSI) is used to record the command angles and measured angles of the robot joints when using the KRL kernel. RSI is an official software provided by KUKA company, which can read the robot system parameters in a cycle of 4 ms or 12 ms.

Table 1. Parameters in toolpath program
Fig. 2.
figure 2

Robot milling system

Fig. 3.
figure 3

S-shaped toolpath of base coordinate

According to G code and KRL language specification, the linear segments toolpath of the 5-axis S-shaped part [6] generated by NX is converted into an executive program of different controllers. As shown in Fig. 3, the toolpath length is 516.04 mm that contains 822 path points, the maximum interval of path points is 4.3 mm, the minimum interval is 0.071 mm, and the trajectory error tolerance is 0.05 mm.

As shown in Fig. 4, the B-spline method was used for the CNC kernel in the experiments, which needs to be determined maximum deviation (PATH_DEV) of B spline from the programmed path and maximum deviation of tracking axes (TRACK_DEV). KRL kernel adopts trajectory approximation contour method that defines the &APO.CDIS value in the program to determine the distance from the starting point to the corner point of the trajectory approach, and the trajectory approach to the endpoint depends on the speed set by the program (Fig. 5). Two values are set to see if the $APO.CDIS has an impact on the industrial robot dynamic performance. The velocity and acceleration weighting are set the same value to compare the two control systems (Table 1).

Fig. 4.
figure 4

Parameters of B-spline method of contour the CNC kernel

Fig. 5.
figure 5

Parameters of approximation method of the KRL kernel

Figure 6 shows the robot's S-shaped toolpath contouring errors are similar at different experimental conditions, which are measured by laser tracker. Moreover, the feedrate commonly used in machining does not affect the toolpath contouring accuracy, which is different from [12]. Figure 7 shows the trajectory errors calculated by joint tracking errors and forward kinematics of the robot. It was found out that the cartesian tracking errors of the robot are below 0.05 mm under different parameters; however, the contouring errors are between 0.5–1.5 mm that measured by the laser tracker.

Fig. 6.
figure 6

Contouring errors is measured by laser tracker. (a) V = 1500 mm/min and (b) V = 3000 mm/min

Fig. 7.
figure 7

Tracking errors is calculated by RSI. (a) V = 1500 mm/min and (b) V = 3000 mm/min

Table 2 lists the maximum error, mean errors, and standard variance. The contouring errors of the CNC kernel are not smaller than the KRL kernel based on the programmed velocities of 1500 mm/min and 3000 mm/min.

Table 2. Errors of s-shaped toolpath

According to Fig. 8, the running time of the CNC kernel is similar to that of the KRL kernel (APO_DIS = 0.5 mm), while the running time of the KRL kernel (APO_DIS = 0.05 mm) is longer. However, it isn’t easy to reach the set value of 3000 mm/min in either controller with different parameters. Moreover, when the feedrate curve of the CNC kernel is around 15.36 s (programmed feedrate at 1500 mm/min) and 13.33 s (programmed feedrate at 1500 mm/min), the velocity of the industrial robot drops rapidly, however the velocity with the KRL kernel reduced by a smaller range. The contouring errors of the two controllers are both large.

Table 3 indicates that, at the same programmed feedrate, the minimum feedrate of the CNC kernel and KRL kernel (APO_DIS = 0.5 mm) is close, which is different from the value of the KRL kernel (APO_DIS = 0.05 mm). At different programmed feedrates, the minimum feedrate of the same kernel and parameters is close. Regardless of which controller, the measured minimum feedrate is too low compared to the programmed feedrate, which means that the serial industrial robot is difficult to use in high-speed machining of complex features. Compared with the figure and figure, the feedrate and contour error have a similar trend of change, and the feedrate mutation caused a significant path error.

Fig. 8.
figure 8

Feedrate is measured using laser tracker (a) V = 1500 mm/min and (b) V = 3000 mm/min

Table 3. Minimum feedrate of s-shaped toolpath(mm/min)

The velocity is calculated by RSI measurement data (Fig. 9). It can be seen that the variation of the feedrate is close to the measurement result of the laser tracker. In the process of running, the robot's velocity cannot exceed the design value and the velocity calculation errors of the laser tracker caused by the dynamic measurement errors.

Fig. 9.
figure 9

Feedrate is measured using RSI. (a) V = 1500 mm/min and (b) V = 3000 mm/min

4 Conclusion

This paper focused on comparing the effectiveness of the CNC kernel and KRL kernel in reducing contouring errors and maintaining velocity constant when executing complex curves. The results suggest that different controller and parameters setting dose not affect the contour accuracy of the dense discrete toolpath, but significantly affect the dynamic feedrate response. The minimum feedrate is too low compared with the designed feedrate, making it difficult for the serial industrial robot to be used for high-speed machining of complex features.The CNC kernel provides more toolpath smoothing algorithms when there are many short linear blocks, however using the appropriate APO_DIS value can obtain the same feedrate response and contouring errors as the CNC kernel, which helps the user to select the controller and parameters setting.