Hybrid compliance compensation for path accuracy enhancement in robot machining

Robot machining processes with high material removal rates lack of high path accuracy mainly due to the low stiffness of industrial robots. The low stiffness leads to process forces caused deviations of the tool center point (TCP) from the planned position of more than 1 mm in industrial applications. To enhance the path accuracy a novel hybrid compliance compensation is developed. It combines a force sensor and model based online compensation with forces of an offline simulation to instantly react to predictable high force changes e.g. at a milling cutter exit from the work piece. The method is applied to a KUKA KR 300 robot. A compliance model based on a forward kinematic with virtual joints is implemented on an external controller. Cartesian or axis specific compensation values are calculated and transferred to the robot via a control circuit. A compliance measurement method is developed and a force torque sensor is mounted to the flange of the robot. The system is validated in with Cartesian and axis specific compensation values as well as with and without pilot control.


Introduction and state of the art
For decades, industrial robots have been an integral and steadily growing part of industrial production chains. In the period from 2014 to 2018 sales of industrial robots have nearly doubled [13]. In addition to tasks in the fields of material handling and welding, applications that require high robot accuracy, in the range of a few tenths of a mm, are becoming established. These include tasks in the area of quality assurance, as well as machining of large components. The main reasons for the use of robots are the low investment costs for a large work area that can be expanded with little effort and the flexibility to combine several end effectors and processes. The low path accuracy and both static and dynamic stiffness of industrial robots, especially under changing process forces, are challenging for the machining process. External forces can lead to deviations of the TCP from the planned position of more than 1 mm with a heavyduty robot in industrial applications [19].
To increase the positional and path accuracy during machining with industrial robots, efforts to improve the construction of the robot, path planning methods and process parallel control strategies can be made. Concepts to increase the position accuracy of serial robots by changes in construction include the reduction of axes [1], hybrid drives with additional torque motors [6] and optimized structural parts [4]. The modifications lead to specialized machines with reduced fields of application and higher costs. In consequence they are not widely used. In the field of path planning, very comprehensive solutions have been developed which are knowledge-based and therefore do not require any additional sensors during operation. Process force models are coupled with multi-body-models of robots to predict compliance [3,14,16] or backlash [5] caused path deviations and compensate or reduce them. They can be combined with model-based workpiece placing and process parameter optimization [18]. Therefore, the use of offline compensation methods is very cost-effective, except for the costs incurred for the development or procurement of the software. The disadvantage, however, is that only previously modelled effects are considered. Wear on gears or the tool as well as unforeseeable changes in the workpiece geometry 1 3 or material properties cannot be compensated. In contrast process-parallel methods rely on sensor signals and compensate deviations directly or model-based. One possibility is the monitoring and correction of the TCP position, which is realized by very cost-intensive position measuring technology, e.g. laser trackers [8,12,15]. Second encoder systems, which measure the axis position on the load side in addition to the motor side system, can be used to compensate torsional compliance and gear backlash [7,9]. However, it is not possible to measure and compensate the compliance of the structural elements and end effectors or tilting in the joints with the system. A promising approach is offered by model-based compensation methods, which feature a compliance model and use a force sensor signal as input [17,21]. The main back draw of this concept is the unavoidable delay of the robot processing correction signals which leads to minor quality when the process force changes abruptly, e.g. at a cutter exit from the workpiece.
The combination of path planning and process parallel methods represent a promising, but so far not validated, approach [11] to avoid significant differences between predicted and actual machining forces as well as high reaction times of the robot.

Compliance compensation concept
The proposed hybrid compliance compensation concept aims on closing this gap. It is mainly a parallel system (online compensation), needing almost no user input or robot program adaption and features an optional path planning input (offline compensation) for higher quality needs.

Compliance model
The compliance model is based on a real-time capable model including a forward transformation T with 5 parameters introduced in [20].
It models the rotational and tilting compliance of the 6 robot axes as well as the compliance of the linked arm (3) and the arm (5). Figure 1 shows the 14 coordinate systems of the robot referencing to the base coordinate system (0). The model is modified by adding virtual joints at the end effector to take into account the compliance of the force/torque sensor (9), the spindle and its holder (10) as well as the tool (13). The accurate orientation of the tool is calculated by an Euler rotation from coordinate system (11) to (12).
The position �� ⃗ r 0 of the TCP (14) regarding the base system (0) of the rigid body robot is calculated by In order to take into account the compliance of the axes and other elements each forward transformation T i is extended by an additional homogeneous transformation with rotational matrix R * i using a z-y ′ -x ′′ -Euler transformation. The rotation describes the deformation of a virtual joint due to a measured process force at the TCP. The load must be transformed into the coordinate system of the particular joint G. For this purpose, the transformation from joint G i to the TCP is calculated via Eq. 2. The rotational component R i is used to transform the force into the joint coordinate system.
The cross product of the connection vector � ⃗ r i between the joint and TCP and the force provides the torque M acting on the joint. Fig. 1 Coordinate systems of the robot model 1 3 The angles of elastic deformation of the virtual joints required in R * i can be determined with knowledge of the stiffness parameters k by Finally, the deviated position of the TCP by can be calculated with i=0.
The displacement of the TCP, which is relevant for compensation, can be determined by comparison with the rigid body approach.

Compliance control circuit
For online compensation the process forces are measured at the robot flange with a strain gauge force-torque sensor from ATI. After processing them with a low-pass and a moving average filter to get the quasi-static part, the measurement data is forwarded to the real time compliance calculation module to determine the current displacement of the end effector. The calculations are performed on a TwinCAT 3 controller which communicates with the KR C4 controller of the robot (KUKA KR 300 R 2500 Quantec Ultra) via UDP and the robot-sensor-interface (RSI) in a 4 ms cycle to receive the current axis data A1-A6 and send correction signals. Figure 2 shows the control circut concept. The determined correction values are further processed, see Sect. 2.4 and then either send directly to the robot controller ( △ x corr , ...) or previously converted into axis values via an inverse kinematic. Axis values have the advantage that control terms of the PID controller implemented in the RSI can be individualized for each axis instead of Cartesian direction. Via the controller the correction values lead to a compensated path of the robot arm.

Pilot control
In order to improve the dynamic behavior of the compliance compensation in the event of abrupt force changes (e.g. milling cutter exit) which shifts the end effector by several tenths of a millimeter, a force pilot-control, introduced in Ref. [2], is used. Therefore, the motion commands stored in the robot program are combined with roughly estimated cutting forces prior to the machining process (offline). They are read out during the robot program run and are transmitted to the TwinCat 3 controller. In the case of small and medium differences between the estimated and the measured force signal, the measured signal is trusted, because it is assumed that it deviates less from the true value. Increasing milling forces, due to milling cutter wear or material changes, can thus be taken into account. As soon as the differences exceed an adjustable threshold value of currently 150 N, a change of direction or exit of the milling cutter is assumed and the signal is linearly superimposed to the estimated force signal within 80 ms (see Fig. 3).
Hereby the reaction time resulting from the force signal processing and smoothing as well as the robot mechanics

Orthogonal projection
To reduce the axis movements needed to compensate the deviation as well as to prevent oscillations in feed direction � ⃗ v the correction signal ⃗ r is projected in the normal plane of the feed via orthogonal projection with Figure 4 shows the vector of feed direction � ⃗ v (blue), the original correction vector ⃗ r (green) as well as the projected correction vector �� ⃗ r v (red) after signal processing.

Compliance measurement
To identify the stiffness parameters of the compliance model a measurement system is developed. The setup is used to measure the torsional and tilting stiffness of the axis, the linked arm and the arm. The procedure is based on observable cubes which are fixed on the robot structure and can be measured accurately. The observation of two subsequent cubes in the loaded and unloaded state allows the determination of individual stiffness parameters. Figure 5 shows the structure of the compliance measurement system. A test load is applied to the tool center point (TCP) located in the center of a cube attached to the flange of the robot. The test force or moment is applied by a cable pull system and determined by an ATI Omega 160 force-torque sensor, also attached to the flange. A steel cable attached to the TCP is routed over a frame so that a weight attached to the end of the cable together with a variable cable tensioner applies a defined force. Alternatively, to measure some axes, e.g. axis 6, a moment is applied via a bar attached to the cube and two steel cables. The cubes (edge length 100 mm) mounted to the structure change their position depending on the deformation of the robot. Therefore, the relative displacements and rotations of the measuring cubes are determined with laser triangulation sensors. The sensors that measure the cubes are mounted on a movable frame next to the robot and record the movement of the cubes in the world coordinate system. Two measurement cubes are placed on each the linked arm and the arm of the robot to determine the bending and torsional compliance of these structural elements.
To determine the relative displacement and as a result the torsional and tilting compliance of the axes, the deviations of the measurement cubes in front of and behind an axis are measured. Due to the small dimensions only one cube is attached to each of the robot elements of the central hand. The bending and torsional compliance of these structural elements are indirectly considered in the axes in front of and behind the element. The positions of the cubes on the robot structure are determined by a laser tracker. Figure 6 shows the simplified (2D) representation of a robot joint G in the unloaded state (u) and the loaded state (l). In the loaded state, both the orientation of the joint coordinate system as an ideal rigid joint without deformation (l) as well as am elastic joint (l*) are shown.
The transformation matrix G l i G l * i T is determined, which represents the difference between the two coordinate systems after the load with those before the load. From this, the stiffness values are calculated with knowledge of the acting load.
The stiffness values are listed in Table 1.
The measured values determined for axis 6 represent cumulative values of the sensor and axis 6, which are already divided into individual components in the table shown. The stiffness of the end effector was determined while disassembeled from the robot, while the tool can be modeled as stiff, due to the large diameter and short protruding length.

Process force measurement
The process force is measured with a 6-dof strain gauge based ATI Omega 160 sensor mounted between the flange of the robot and the spindle holder. The measured signals do not directly provide the force acting on the TCP. Instead, they are subject to offsets and refer to the sensor coordinate system S, so that further signal processing is necessary. In a first step a sensor internal offset as well as the weight force of the end effector are determined. Figure 7 depicts the three orientations (O1-O3) needed to identify the parameters of a physical model.
As an approximation function, a second degree polynomial is used as shown in formula 17. F app represents the approximated force and q 1 to q 4 represent the entries of the quaternion q.
Input variables of the compliance model are the forces acting on the TCP. Therefore a transformation of the loads acting on the sensor is necessary. Figure 8 shows the coordinate systems involved in the calculation and selected transformations. These can either be read out from the controller ( B TCP T, F TCP T), constructionally determined ( F S T) or determined from the other transformations. At first the force on the sensor corrected by the offset S F S komp is calculated in the sensor coordinate system.
In contrast to torque the forces are equal at sensor and TCP.
F app =a 1 + a 2 q 1 + a 3 q 2 + a 4 q 3 + a 5 q 4 + a 6 q 2 1 + a 7 q 2 2 + a 8 q 2 3 + a 9 q 2 4 + a 10 q 1 q 2 + a 11 q 1 q 3 + a 12 q 1 q 4 + a 13 q 2 q 3 + a 14 q 2 q 4 + a 15 q 3 q 4  Finally, the forces are transformed into the TCP coordinate system in order to obtain the required input variables for the compliance model.

Compliance model validation
To validate the compliance model, displacements calculated with the compliance model are compared with the displacement of the robots TCP measured by a Leica Lasertracer 901B. For this purpose, a load of 750 N is applied to the robot with mounted end effector in the three axes of the base coordinate system one after the other. The examinations are carried out at 4 positions in the working area in 5 poses each. Figure 9 shows the results of the validation. Measurements pose 1-20 represent a load in positive x-direction of the base coordinate system, 21-40 in positive y-direction and 41-60 in negative z-direction. The measurements are sorted in ascending order of position and orientation starting with orientation 0, followed by B + 30 • and B − 30 • as well as C + 30 • and C − 30 • .
The simulation values correspond well with the measured values both qualitatively and quantitatively. On average the calculated deviation is 6% or 0.11 mm lower than the measured deviation with a maximum difference of 0.44 mm. This leads to the assumption, that the model is accurate enough for compliance compensation purpose.

Cartesian compensation
The developed compliance compensation is validated on a test workpiece made of aluminium AW2017 with grooves, ramps and a circular pocket. For this purpose, the test workpiece is machined in different settings. The varied options include axis-specific and Cartesian compensation as well as with and without force pilot control. The machining forces while machining with a 16 mm threeedged end mill and a feed rate of 25 mm/s at 13,000 rpm reach up to 546 N and lead to a maximal deviation of 1.4 mm. Figure 10 shows a comparison of the nominal work piece created by an material removal simulation and the actual workpiece scanned with a structured light scanner Breuckmann optoTOP-HE 1080 in uncompensated machining.
The deviations are reduced significantly in compensated machining and Cartesian compensation values leaving a maximal deviation of 0.7 mm at the cutter exit ( see Fig. 11) .
The pilot contol reduces the error at the cutter entrance and exit well, leaving a maximum error of 0.3 mm. The effect is shown in Fig. 12. The error could be the result of compliance model inaccuracy and the absolute robot path accuracy.

Axis specific compensation model
Axis specific compensation (see Fig. 13) leads to similar results as Cartesian compensation. Noticeable is a reduced compensation quality of the depth of groves in particular when the compensation value is in opposite direction to the movement of the axis. The compensation achieved equals the sent correction values while the compensation in Cartesian coordinates is higher. The assumption is that Cartesian compensation leads to control internal axis specific values which include a backlash compensation while direct axis specific values lack of this feature and are sent to the drive controllers without changes.

Summary and future work
A hybrid compliance compensation method is developed. It can reduce process force caused errors of path accuracy in robot based machining by 78% and more. The method combines a force sensor and model based online compensation with forces of an offline simulation to instantly react to predictable high force changes e.g. at a milling cutter exit from the work piece. Thus, the negative effects of milling cutter exits on compensation quality can be significantly reduced. The stiffness values of a KUKA KR 300 robot are identified with a developed measurement system and the compliance compensation method is applied to the robot. For this purpose a compliance model based on a forward kinematic with virtual joints is implemented on an external controller. The external controller communicates with the robot controller and sends correction signals based on latest process force and axis values. The Cartesian compensation leads to higher path accuracy while controller parameters for the axis specific compensation are easier to identify.
Future work includes research on the reasons for poorer path accuracy of axis specific compensation as well as an enhanced robot model. Acknowledgements Open Access funding provided by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not Fig. 11 Comparison of nominal and actual workpiece in machining with cartesian compensation Fig. 12 Comparison of nominal and actual workpiece in machining with cartesian compensation with pilot control Fig. 13 Comparison of nominal and actual workpiece in machining with axis specific compensation permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.