Research on NC error compensation strategy with PRS-XY hybrid machine tool based on virtual and actual axis

. In order to overcome the influence of the particularity of the hybrid machine tool on the error compensation, this paper presents an error compensation strategy based on the NC error compensation model. The X-Y table and the spindle deflection accuracy of the machine are tested by the ballbar in this paper. Based on the real -virtual axis compensation structure,the detection and compensation is implemented.The accuracy data before and after compensation are analyzed and compared. It is confirmed that the error compensation strategy of the hybrid machine tool has a significant effect on the improvement of the motion precision of the hybrid machine tool.


Introduction
Hybrid machine tool combines the flexibility of parallel machine tool and the expandable stroke of series machine tool, and becomes a new machine tool structure.Parallel mechanism can be combined in many cases. It is this combination that expands the application of parallel machine tool to many fields [2,3,4,5]. The complexity of hybrid structure leads to the non singularity of motion control algorithm, people have conducted a number of studies on the implementation of the error compensation strategy based on kinematics of parallel structure [6,7,8,9]. In particular, the inclination, deflection and pitch errors of the rails are proportional to the magnification, and only the pitch compensation or fixed straightness compensation is insufficient [10].The machining instructions of the hybrid machine tool are driven by the coarse and fine interpolation of the NC system, respectively, and the coordinate axes are driven in the form of pulse equivalents, and are superimposed on the interpolation process, so as to realize the precise control of the coordinate axes [11].The current error compensation technology has been widely used in the coordinate measuring machine [12,13].Parallel or hybrid machine tools contain complex transmission mechanism, the body in the processing and assembly of the error cannot be accurately measured, and the real and virtual axis of the movement is not completely independent [14]. A virtual axis of the movement is often the result of multiple real axes co-coordinated movement. The traditional NC-type error compensation cannot get a good compensation effect, so for the parallel and hybrid CNC machine tool design a new error compensation, to improve their movement accuracy and practical degree will play a very critical effect [15,16,17,18].

Analysis on the relationship between the virtual and real axis of PRS -XY hybrid machine tool
PRS-XY hybrid processing platform adopts the series drive and parallel drive and the hybrid drive principle, because the traditional series structure of the x and y axis can achieve a large range of motion control, so the hybrid structure is used to overcome limited working pace of the six-bar parallel machine, while both parallel machine tool structure is simple and the advantages of small weight. Compared with a six-axis virtual machine, the use of the X-Y table increases the ratio of the machining space to the overall size space [17,18]. The setting of the workpiece coordinate system is essentially a coordinate preset function, and the axis coordinate preset is finally embodied in the preset offset of the motor position [19]. The axis coordinate of the offset and the position coordinate of the motor should keep the original mapping relationship. The invariance of this relationship is established in the linear mapping, and in the nonlinear state is generally not true [20, 21,22].According to the reference [20], the virtual-real mapping relation of PRS-XY mechanism can be expressed as: Where the variables Q 1 ,Q 2 ,Q 7 ,Q 8 , and Q 9 represent the coordinate values of virtual axes A, B, X, Y and Z respectively.The variables P 1 ,P 2 and P 3 correspond to the motor command values of the rotating joints B 1 , B 2 andB 3 , while P 5 and P 6 are the motor command values in the X and Y directions of the workbench. Through Eq. 2, the functional relationship between the actual axis and the virtual axis of the hybrid machine tool motor is established, and then the virtual-real biaxial NC error compensation control strategy is implemented on the basis of virtual-real mapping [18].

Analysis and modeling of error compensation strategy based on real-virtual axis
Compensation Model of Real Axis Error Source. The theoretical kinematic calculation model without compensating function is shown in Eq. (1). The following equations are modified according to two different methods to establish the error compensation model. The source of motion error of machine tool mainly includes two parts, geometric mechanism parameter error and control system error. Geometric mechanism parameter error, mainly refers to the processing of the installation caused by the key geometric parameters change, resulting in inverse kinematics calculation error. The control system error is the uniaxial motion error of each joint axis, mainly refers to the position error.
Therefore, in the case of known error sources and their size, the kinetic calculation model containing the compensation function is obtained as follows: This error compensation method requires that the error magnitude of all error sources be known, which is difficult to achieve in the actual measurement process. Often based on the consideration of the main source of error, some of the error source was ignored. So this method is often on the rough error can produce a good compensation effect, and can not be in a further compensation effect to a certain extent after a certain effective compensation.
Virtual Axis Error Compensation Model. If the error source of the machine cannot be obtained, the compensation model can be established according to the error model based on the output error data. This method has been widely used in traditional CNC machine tools and coordinate measuring machines. In the process of error compensation, the error of the measured points is often used to reduce the error value after the superposition of the discrete target points on the method. For the error of the unmeasured point, the approximate calculation is made by the calculated error fitting formula. For a hybrid machine with five coordinates, the motion error is expressed by the error vector E. There are three displacement For the PRS-XY hybrid mechanism, it is known from the kinematics analysis of the PRX-XY hybrid machine tool that the 3-PRS parallel mechanism relies on the absolute and relative height of the three linear motors to determine the position of the machine Z and A and B, While the A and B axis movement will produce additional X axis and Y axis movement; XY table to achieve the X axis and Y axis movement Where ' ( , ) x e x y and ' ( , ) y e x y represent the errors generated by the X-Y table; " ( , , ) x e z A B and " ( , , ) y e z A B represent the additional motion errors of the X-axis and Y-axis generated by the 3-PRS parallel mechanism. First, the error data is obtained by measuring the processed sample or actually measuring the tip position, and calculating the Eq.5. And then in the Eq.1 Q i (virtual axis coordinate variable) to be corrected, the error compensation model as shown in Eq.6.
The main drawback of this approach is that there is always a certain amount of noise due to more or less the actual measured spatial error data. When using these error data to ITM Web of Conferences 47, 03002 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224703002 compensate or linear interpolation, the noise is also superimposed rather than homogenization, resulting in large fluctuations in the compensation results, generalization is not good, thus affecting the accuracy of error compensation. And in the virtual -real calculation, the uncompensated joint coordinates inverse function i g is still used, so the calculation process will still produce the calculation error. However, this method can be directly based on the output error, if you can achieve the tool point error online real-time measurement, through a certain algorithm for error compensation modeling, will be able to achieve a high error compensation effect.
Based on the error compensation of the real axis, the error compensation model is established by measuring the error data of the tool nose point off-line. The error compensation model is used to estimate the error size by using the trajectory required by G code and the trajectory data after rough interpolation. To be achieved by the virtual axis of the moving target to be amended, and then the correction value as a basis for the calculation of kinematics.
On the basis of the traditional NC compensation strategy, this paper proposes a double compensation technique based on virtual axis and real axis. The system diagram shown in Fig.2  In this model, the modified kinematic calculation formula can be obtained by using the calibration experimental data to correct the kinetic parameters in the kinetic calculation. The double compensation strategy of this virtual and real axis is the first to use the real axis error compensation to achieve the measurement error compensation and kinematic calculation of the amendment. At the same time, the actual output error is analyzed by the statistical law, and the reason of the error is neglected, and the compensation is made by using the imaginary axis error directly. The two are combined with each other, a good solution to the parallel or hybrid machine tool error compensation. Turbo PMAC card embedded kinematic computing function for this method also provides the possibility of implementation.

Real axis NC Error Compensation.RS-XY hybrid CNC machine adopts "PC + Turbo
PMAC" open CNC system. The inverse kinematics transformation is directly embedded in the Turbo PMAC multi-axis motion controller [23,24]. The fine interpolation function provided by Turbo PMAC to provide servo control command data is used to drive motor motion [25].
Therefore, at the interpolation point, the real-time position parameters and various state parameters of the machine are obtained by using the error model to calculate the error compensation amount of the virtual and real axes, so that the real axis can be realized by realizing the real-time Error compensation. The real axis error compensator is based on the off-line measurement to get the error of the motor movement axis itself, and the error compensation model is established. Using the kinematic calculation result (i.e., the real axis  Firstly, the inverse kinematics formula of the embedded model is modified according to the calibration result of the key mechanism parameters of the machine tool. The main correction parameters include: fixed length of the linkage, branch distribution angle and location, static and moveable platform radius.
Second, the three linear motors as 3-PRS parallel mechanism of the drive components, must be compensated for its motion error, that is, the real axis error compensation. The motion error of the linear motor mainly includes the return position error, the positioning error and the motion trajectory error. The error of the motion trajectory will also affect the radius of the static platform and the angle of the branch distribution, that is, the coordinates of the influence point. So the need to use the real axis error compensation technology to compensate.
As can be seen from Fig.5, the pattern has a tendency to stretch along the direction of the No. 1 linkage. According to the machine geometry, it can be judged that the length of the fixed pole is short, and its length error is negative. According to the data processing mode of the two-axis linkage mechanism, the main error data are as follows: the verticality error is 0.3348mm / m and the ratio mismatch error is 0.0580mm.Deflection of 15 degrees, the test results even worse.as shown in Tab.1. Since the coarse interpolation time is 10ms, the actual travel distance between two points after the rough interpolation is very small, so it can be assumed that the motor moves between the two points in the vertical direction. According to the real motion trajectory of each linear motor measured by prior calibration, the actual position of the current motor can be calculated by using the position of the grating feedback, so as to revise the current inverse kinematic parameters and re-calculate. After compensation, the detection results are shown in Figure 6. In summary, the use of virtual -real biaxial error compensation technology greatly improved the PRS-XY hybrid CNC machine tool movement accuracy.  Virtual axis NC Error Compensation. Since the virtual axis error compensation is modeled using the actual output error, while ignoring the cause of the error, the calibration experiment, the moving platform attitude test will be performed again, which is based on the modified kinematics calculation and the real axis error compensation. Assuming that the tool axis and tool length 1 O T  are the theoretical values, the errors in the X and Y axes can be calculated, and the virtual axis error model of Eq. 4 can be established and while the compensation will be implemented according to Fig.2.
After the virtual axis compensation, the calibration of the moveable platform attitude was tested, in which the No. 2 linkage movement to produce A-axis movement of the 20 sets of data before and after the comparison, as shown in Fig.7. It can be seen that the motion accuracy of the 3-PRS parallel mechanism has been significantly improved, based on the real axis error compensation as well as the corrected kinematic calculation.

Summary
In this paper, the PRS-XY hybrid machine tool is taken as the research object. The mapping relationship between virtual axis and real axis of hybrid machine tool is studied. The establishment of this mapping relationship is precisely the foundation of the real-virtual error compensation model. Due to the positive and negative kinematics algorithm, the final motion accuracy of the machine is the result of the combined effects of the real axis (motor joint coordinates) virtual axis (machine mechanical coordinates). Therefore, this paper presents a NC compensation algorithm which is based on the combination of virtual and real axis. According to the test results calibrated by the ballbar, the X-Y table and the 3-PRS parallel mechanism of the machine are compensated and the effective error compensation effect is obtained.