Evolutionary Robot Calibration and Nonlinear Compensation Methodology Based on GA-DNN and an Extra Compliance Error Model

/is study addresses the problem of nonlinear error predictive compensation to achieve high positioning accuracy for advanced industrial applications. An improved calibration method based on the generalisation performance evaluation is proposed to enhance the stability and accuracy of robot calibration. With the development of technology, a deep neural network (DNN) optimised by a genetic algorithm (GA) is applied to predict the nonlinear error of the calibrated robot. To address the change of external payload, an extra compliance error model is established with a linear piecewise method. A global compensation method combining the GA-DNN nonlinear regression prediction model and the compliance error model is then proposed to achieve the robot’s high-precision positioning performance under any external payload. Experimental results obtained on a Staubli RX160L robot with a FARO laser tracker are introduced to demonstrate the effectiveness and benefits of our proposed methodology. /e enhanced positioning accuracy can reach 0.22mm with 98% probability (i.e., the maximum positioning error in all test data).


Introduction
With the emergence and subsequent development of digital processing and intelligent manufacturing, the breadth and depth of industrial robotic applications (i.e., application fields and task requirements) are increasing [1]. To meet the high-precision requirements of complex tasks, the absolute positioning accuracy of robots is particularly important [2][3][4]. Robot calibration and error compensation are two important ways to improve the absolute positioning accuracy of robots, which have been studied by several scholars [5][6][7][8].
Robot calibration can be divided into robot kinematic calibration and nonkinematic calibration [9][10][11]. e latter mainly includes the identification of structural robot deformation errors caused by the change of temperature [12], the link self-gravity of robots, and the change of external payload [13][14][15][16][17][18], as well as the calibration of dynamic parameters [19][20][21][22]. All the above calibration methods need the error model, which is based on the structural parameters of robots. Such a model contains a complex modelling process and identification steps. However, the accuracy of the error model is still insufficient for nonlinear errors. Hence, model-free approaches have been developed for robot error compensation. In [23], a fuzzy interpolation compensation method is presented, and its effectiveness is confirmed by the simulation results. Zeng et al. [24] proposed an error compensation method with error similarity analysis based on the semivariogram function to improve the absolute positional accuracy of industrial robots. Other works [25,26] used an inverse-distance weight (IDW) interpolation model to reduce absolute position errors. e common disadvantage of the above interpolation methods is that the robot end-effector should be at a constant orientation relative to the reference frame. Undoubtedly, the interpolation compensation method has its disadvantages and limitations.
Guo et al. [9] presented a multilevel calibration technique for an industrial robot, which includes parallelogram structural error compensation, kinematic calibration, and nongeometric error compensation. In the last level of this method, contrary to the similar works mentioned above, the robot joint space (instead of the Cartesian space) is divided into a sequence of fan-shaped cells, after which the inversedistance weight method is used to compensate the nongeometric errors of the robot. Although this method enlarges the space range of the robot compensation (divided by the motion range of the first three joints), it is still unable to compensate the error of the robot's orientation and position because the inverse solution of the same position corresponds to multiple sets of joint values. To achieve global compensation (at any orientation and position), an artificial neural network-(ANN-) based nonlinear regression prediction method was proposed to facilitate learning ability and high adaptation [27,28]. A radial basis function network (RBFN) algorithm was applied to interpolate the error workspace of the industrial robot to get continuous functions, and the results proved that the proposed scheme can improve the accuracy of the robot [27]. Nguyen et al. [28] proposed an effective solution for all robot error sources by combining the model-based identification of the robot's geometric errors via an extended Kalman filter and a compensation technique using the ANN. However, the ANN-based nongeometric correction method in [28] was based on a two-layer backpropagation neural network (BPNN) with one hidden layer and did not take into account the change of external payload.
As we have shown, model-based kinematic calibration or nonkinematic calibration is essential for uncalibrated robots (i.e., the uncalibrated robots fresh out of a factory or the robots with numerous errors after being used for a certain period of time). Besides, the nonlinear errors including the intrinsic errors (i.e., elastic deformation of the link and joint caused by the link self-gravity of the robot, gear backlash, hysteresis, and friction) and the extrinsic alterations (i.e., the variable external payloads) of the robot cannot be eliminated by model-based robot calibration. In the current study, the predictive compensation method for the nonlinear errors of robots, especially the residual errors of calibrated robots, is yet to be fully studied in the literature. erefore, the goal of this work is the enhancement of calibration and error compensation techniques for achieving the robot's highprecision positioning performance under any external payload. ree key problems that should be considered are as follows: (1) ere is no unified uniform standard for the determination of the parameters in the calibration model, so it is of great significance to propose a parameter optimisation method for the calibration quality (2) Given the aforementioned nonlinear errors, a global compensation method should be presented to predict effectively and efficiently these positioning errors (3) Due to the large range of external payload variation of the heavy robot, the nonlinear deformation error caused by the change of the external payload should be solved In this work, an improved calibration method, which takes into account the generalisation performance and robustness of geometric parameter correction, is introduced to enhance the essential positioning accuracy of robots. DNN has received substantial attention in both the signal processing field and the machine learning field with its strong regression capabilities [29][30][31]. e design of DNN architecture must be optimised to make the DNN demonstrate the best predictive capacity. e critical factors that determine the performance of DNN prediction are as follows: the number of hidden layers, the number of nodes per layer, the training data, the training method, and the validation data in the training process. GA is an automatic optimisation method based on the principles of evolution postulated with the natural selection and the adaptation of individuals to the environment, which can offer an optimal solution for the DNN design [32]. us, a GA-DNN prediction model is proposed to achieve the optimal nonlinear error prediction compensation and to further enhance the positioning accuracy of the robot. Moreover, as the training data for the DNN prediction model are measured under a constant end-effector of the robot, the model does not consider the effect of the change of external payload on the positioning errors. According to the relation between force and torque, an extra compliance error model for predicting joint deformation caused by any external payload is established in this work.
us, a multilevel accuracy improvement method based on the GA-DNN model and the extra compliance model can be obtained to realise robot optimisation calibration and global error compensation.
To address the aforementioned problems and the corresponding solutions, the rest of this paper is organized as follows: Section 2 proposes an improved calibration method for serial robots. Section 3 develops a GA-DNN regression model for nonlinear error prediction. To consider the effect of the change of external payload, an extra compliance error model based on torque division is described in Section 4. In Section 5, several experiments are implemented, and the results are presented for the Staubli RX160L robot. Finally, conclusions are drawn in Section 6.

Parameter Optimisation Method for the Calibration Model
In our preliminary work [11], the MDH model with five parameters is used for the robot kinematic modelling, which can describe all geometric errors continuously. e Staubli RX160L robot is a 6-DOF serial robot with six rotational joints and can be regarded as a typical representative of industrial robots (see Figure 1(a)), and the kinematic model of this robot is shown in Figure 1(b), which defines the seven link frames associated with the robot. Because the actual robot base frame (F 0 ) cannot be touched, the small transformation matrix B T 0 is introduced to present the error vector ∆σ between the constructed robot base frame (F B ) and the actual robot base frame (F 0 ): Mathematical Problems in Engineering en, the error equation is expressed as follows: Hence, the robot kinematic position error model is established as follows: where E k represents the position errors; H k is the geometric identification matrix; λ k denotes the geometric error parameters; and M θ , M d , M a , M α , M β , and M σ are the coefficient matrices corresponding to the error parameters. By using the kinematic error model, all defined geometric parameters can be identified theoretically. However, the model is not the best choice to correct all geometric parameters in the process of robot calibration. Generalisation performance, also known as scalability, refers to the performance of the classifiers trained on a certain training set to adapt to the data outside the training set. In this work, a K-fold cross-validation method is applied to evaluate the generalisation performance of the robot calibration model Mathematical Problems in Engineering with different geometric error parameters. Firstly, the minimum number of parameters of the calibration model (i.e., several important joint angle parameters, set-over parameters, and link length parameters) is determined.
Taking the Staubli RX160L robot as an example, the minimum number is 9 (i.e., ∆θ 2 -∆θ 5 , ∆d 3 , ∆d 4 , and ∆a 1 -∆a 3 ), and the maximum number is 24 (each link frame contains 4 parameters). erefore, according to the limited range, different calibration models can be formed by the arbitrary combination of different geometric error parameters; from this, the number of calibration models can be calculated: where n is the difference value between the maximum and minimum number of geometric error parameters in the calibration model. en, the training data used for calibration model identification are divided into K parts, one of which is taken as the test set without repetition; the other K-1 parts are used as the training set for the training calibration model. e mean square error (MSE) of the prediction accuracy of each training model can be calculated, and the final value EV K obtained by averaging K times is the evaluation value of the generalisation performance. Hence, each calibration model should have a performance evaluation value from which the calibration model corresponding to the minimum value is the optimised calibration model of the robot: It can be seen that the optimised calibration model is obtained by using these various calibration models with different geometric error parameters and the generalisation performance evaluation method. Moreover, the improved calibration method based on the parameter optimisation method can also be combined with engineering practice, thus increasing or reducing the effective constraints on the range of parameter correction so as to obtain the required calibration model. Hence, the improved calibration method proposed in this section can enhance the stability and accuracy of robot model-based calibration. Note that, however, some errors are unable to be established by the robot kinematic position error model, which also affect the quality of the absolute positioning accuracy of robots. To tackle this problem, the nonlinear errors of the calibrated robot will be discussed later.

DNN-Based Regression Prediction Method for the Nonlinear Errors
Given the complexity of the sources of the robot's residual errors (i.e., elastic deformation of links and joints caused by the link self-gravity of the robot and the change of external payload, gear backlash, hysteresis, and friction) after model-based calibration, these residual errors generally have strong nonlinearity. At present, most of the learning methods, such as regression, are shallow structure algorithms [8,27,28,33]. ese methods are limited in terms of their ability to represent complex functions in the case of limited samples and computational units, and their generalisation ability for strong nonlinear errors is restricted to a certain extent. DNN can achieve complex function approximation by learning a deep nonlinear network structure (5, 6, or even 10 hidden layers are usually present) and show a strong capacity to learn the effective features of data from a small number of samples. Two types of joints of industrial robots exist, namely, rotational joints and prismatic joints, which correspond to the joint variables θ i and d i , respectively. In this work, all of the robot's joint variables are regarded as feature objects, i.e., the input data set of the DNN. For a serial robot with six rotational joints (i.e., joints θ 1 -θ 6 ), the input layer of the DNN has six neuron nodes.
To realise the prediction and compensation of the robot positioning error, the output of the DNN is the predicted position error with a three-dimensional (3D) vector E r (E r � [∆x, ∆y, ∆z,]). Moreover, the original data acquisition used for DNN model training is vital in realising the exact regression prediction of the model, which plays a decisive role in the predictive capacity of the model. e measurement configurations utilised in this work for 6-DOF series robots, in accordance with the distribution characteristics of the robot's nonlinear errors and the observability index O 1 [11], are shown in Figure 2. Using the optimised configurations with 46 groups of different orientations (in each configuration, a set of position points with uniform grid distribution in the whole workspace of the robot) can help achieve the robot's overall acquisition of the nonlinear errors.
e MSE is selected as the loss function to evaluate the degree of inconsistency between the predicted value and the real value of the DNN regression prediction model, that is, the criterion to measure the predictive capacity of the model. As the DNN contains more hidden layers and adopts the backpropagation algorithm, the traditional activation functions (i.e., sigmoid function and tan-sigmoid function) can lead to gradient vanishing. To tackle this problem, the parametric rectified linear unit (PReLU) function [34] is applied in the first few layers of the DNN as shown in Figure 3(a), whereas the tan-sigmoid function is used in the latter layers of the DNN as shown in Figure 3 Finally, the GA is applied to optimise the number of hidden layers, the number of nodes per layer, the learning rate, the training data, the training method (including the specific distribution of the activation functions), and the validation data in the training process for building the optimal DNN architecture. e loss function (MSE) of the DNN model is treated as the fitness function for the GA, and the size of the initial population of the GA is 100. Furthermore, the crossover operation-mutation operation has 90% probability, and the mutation rate is 0.05. Hence, the GA-DNN nonlinear regression prediction method is developed as an effective solution for the high-performance compensation of the robot's nonlinear errors, as shown in Figure 4.
It is important to note that the training data set for the GA-DNN model is always measured with a constant endeffector of the calibrated robot, and the nonlinear regression prediction model does not consider the effect of the change of external payload on the positioning error. To overcome this difficulty, the robot's positioning errors under variable external payloads will be analysed in detail in the next section.

Compliance Error Model with the Variable External Payloads
According to the relation between force and torque, the formula of torque for each joint can be derived based on the robot's kinematic model as follows: where J θ represents the kinematic Jacobian matrix; equation (7) describes the transformation of the force between coordinate systems; 0 F m is the force vector of the external payload; 0 R 6 is the rotation matrix between the actual robot base frame (F 0 ) and the flange frame (F 6 ); 6 P m is the vector between the centroid of the external payload and the origin of the flange frame (F 6 ); and E 3 is a 3 × 3 identity matrix.
Ψ(P) is the skew symmetric matrix for a three-dimensional vector P � P x P y P z T , which can be expressed as follows: To analyse the compliance error caused by the external payload, the robot joint is usually assumed to be a linear torsional spring [16]. However, Pashkevich et al. [13] demonstrated that the torque-torsion relation was nonlinear in the robot's elastic behaviours under loading. Based on the material in [35], the relation between nonlinear torque and torsion can be defined as a third-order polynomial: e third-order polynomial satisfies two conditions in equation (10), so the polynomial is monotonously increasing, i.e., for any torque, only one torsion value δθ i is present. en, combined with the torque obtained from equation (6), a linear piecewise method based on torque division is used to present the joint stiffness, and the simplified method of the two subsections is shown in Figure 5.
Based on equation (6), the range of the torque corresponding to each joint can be calculated under any external payload and the whole workspace of the robot. A simulation study on the Staubli RX160L robot is implemented to illustrate the linear piecewise method. Given that the nominal load of the robot is 14 kg, two external payload values of 0.4 kg and 14 kg are selected in this simulation experiment. Combined with the 46 configurations in Figure 2, 2,000 measurement points are selected in the whole workspace of the robot. e range of the torque corresponds to each joint (joints 2-6 of the Staubli RX160L robot, the axis of joint 1 is parallel to the direction of the force, so the torque of joint 1 can be ignored), as shown in Figure 6.
As can be observed from Figure 6, joint 6 (i.e., j6 in Figure 6) is subjected to a very small torque (approximate to zero), so its deformation effect can be neglected. e torque ranges of joints 2 and 3 are wider, and these torques are much greater than those of other joints. We can see that the fluctuation range of torque between joint 4 and joint 5 is similar. For general industrial robots, the stiffness of joint 4 is much larger than that of joint 5, so the stiffness of joint 4 can be set as a constant. For joints 2, 3, and 5, the corresponding stiffness can be divided into two or more piecewise values according to the magnitude of the torque.
Based on the linear piecewise method with the two subsections, the position errors of the origin of the tool frame (F T ) for 6-DOF series robots can be given as follows:   Mathematical Problems in Engineering where 6 P T is the vector between the origin of the robot tool frame (F T ) and the origin of the flange frame (F 6 ).
To obtain the best piecewise critical torque values (i.e.,τ m2 ,τ m3 , and τ m5 ) of the three joints, we use the positiondistance method based on torque difference to obtain the additional position errors after the change of external payload. e variation range of the external payload is determined according to the minimum load and the nominal load of the robot, the m external payload values of different sizes are selected in this range, and the corresponding position-distance under each of the two loads can be obtained according to the torque difference of these two loads. Next, we adjust the critical values to minimise the residual error between the predictive position-distance and the actual position-distance. As such, the best stiffness value of each joint is obtained as follows: Hence, the extra compliance error model (i.e., equation (13)) based on torque division is established to predict the where ∆ X (GA−DNN) is the predictive position error by the GA-DNN nonlinear regression prediction model. Figure 7 shows the experimental setup of this work, which consists of a FARO laser tracker with a resolution of 0.5 μm and an accuracy of 8 μm + 0.4 μm/m, a PC, and a 6-DOF Staubli RX160L robot with a CS8 controller.

Performance of the Improved Calibration Method.
To collect the robot measurement positions for the geometric parameter identification, 90 measurement positions are selected by the intelligent selection algorithm of optimal measurement poses [11]. In this experiment, the threefold cross-validation method is applied to evaluate the generalisation performance of the robot calibration model with different geometric error parameters. Based on the performance evaluation values, an optimal calibration model for this robot can be obtained. e nominal value of MDH parameters and the identified geometric parameters of the optimal model are shown in Table 1.
Furthermore, 40 random positions are chosen as the test data in the overall workspace of the robot, and the enhancement results of position accuracy are shown in Figure 8. As can be seen, both the conventional calibration method and the proposed calibration method have evident effects on improving positioning accuracy. Notably, the residual position errors after calibration using the proposed calibration model are smaller than those after calibration using the conventional calibration model under the same measurement environment. e average residual position error after the improved calibration is reduced significantly to 0.29 mm from 4.51 mm (before calibration), and the maximum position error decreased substantially from 7.69 mm to 0.65 mm. Consequently, the proposed calibration method has higher identification stability and can offer a considerable improvement in the robot positioning accuracy.

Accuracy Enhancement by the GA-DNN Prediction
Method. Due to the influence of nonlinear errors, the calibrated robot still has large residual errors which cannot meet the requirements in high-precision field applications. e Staubli RX160L robot has a general structure of a 6-DOF serial robot, which is often used in high-precision processing, and its repeatability is about ±0.05mm. Hence, the repetitive accuracy is the limit value of the absolute positioning accuracy of the robot and also the target value of error compensation using our proposed approach.
Based on the 46 configurations of different orientations (Figure 2), 50 to 100 endpoints with approximately uniform spatial distribution in the overall workspace of the robot for each configuration are selected, and a total of 2,796 measurement positions are measured for DNN model training. In addition, 708 verification positions with 11 groups of arbitrary different orientations are also selected in the overall workspace and used as the test data. Consequently, a total of 3,504 endpoints are used in the experiment of nonlinear error compensation, as shown in Figure 9.
To better present the nonlinear characteristics of the error data, four sets of data are selected from 2,796 measurement positions, each with the same configuration and the same position in the Z direction, and the corresponding position errors (i.e., d in Figure 10) of the four groups of data are calculated. According to the X and Y coordinate data in these four sets of data, the corresponding position errors are displayed on the XY plane, as shown in Figure 10. We can see that the errors of the robot's different configurations vary greatly in the approximately same position. Hence, the results illustrate the necessity of nonlinear regression prediction in achieving the residual error compensation of the calibrated robots.
To demonstrate the superiority of the DNN over the shallow neural network (SNN), the performance of the proposed GA-DNN model is compared with that of a 2-layer BPNN model and another 5-layer BPNN model. Gradient descent (GD) is one of the most popular algorithms with  Mathematical Problems in Engineering which to perform optimisation and by far the most common way to optimise neural networks. To optimise neural networks further, certain excellent gradient descent optimisation algorithms are proposed and applied to neural network training, i.e., momentum, Nesterov accelerated gradient (NAG), Adagrad, Adadelta, RMSprop, and adaptive moment estimation (Adam). Kingma and Ba [36] showed that Adam might be the overall best choice. Hence, the gradient descent algorithm and Adam algorithm are used in the comparative experiment. In our approach, the GA is applied to select the most suitable gradient descent optimisation algorithm for training     the DNN model. Based on the collected training data, the optimised GA-DNN model has a network architecture with 11 hidden layers, and the corresponding optimised node numbers are listed as follows: 10, 10, 13, 13, 16, 16, 15, 13, 11, 9, and 7. e results of the iteration, which we obtained by using the joint data and error data of the 2,796 measurement positions, are shown in Figure 11. Figure 11 shows that the prediction accuracy of the model greatly improves with the increase of the depth of the neural network, and the GA-DNN prediction method greatly accelerates the convergence speed of the algorithm. e advantages and necessity of the proposed method can be explained in terms of the iteration results. e predictive compensation and validation results of the proposed GA-DNN nonlinear regression prediction method are compared with those obtained by the popular ANN-based nongeometric correction method from [28], the GRNN method from [33], and the RBFN method from [27]. ese three methods are commonly used in nonlinear regression prediction. e results obtained from these four prediction methods are compared in Figure 12, which show that the RBFN method and the proposed GA-DNN method  have better predictive ability than the other methods. Next, 708 test points with different positions and orientations are randomly selected in the robot workspace, and two prediction models established by the RBFN method and the proposed GA-DNN method are used to predict the position errors of the test data, respectively. e compensation results for the test data are shown in Figure 13; it can be seen that the proposed GA-DNN method has evident advantages. e average residual position error is reduced significantly from 0.52 mm (before compensation) to 0.07 mm using the proposed predictive model, and the positioning accuracy almost reaches the repetition accuracy of the robot. A measurement tool is designed for changing the external payload, which can fix different sizes and number of weight blocks and be used as the end-effector of the robot, as shown in Figure 14. In this experiment, six external payload values of different sizes (i.e., 0.4, 1.95, 3.95, 5.95, 7.95, and 9.95 kg) are selected, and 50 measurement positions are selected and measured under each load. Using the positiondistance method (Section 4), the best piecewise critical torque values (i.e., τ m2 , τ m3 , and τ m5 ) of joints 2, 3, and 5 can be obtained, and the stiffness of each joint of the robot can be Residual errors after the refined calibration (mean = 0.46 mm, max = 1.42 mm) After ANN compensation from [28] (mean = 0.23 mm, max = 1.13 mm) After GRNN compensation from [32] (mean = 0.36 mm, max = 1.11 mm)

Effectiveness of the Global Compensation
After RBFN compensation from [27] (mean = 0.12 mm, max = 0.43mm) After the proposed GA-DNN compensation (mean = 0.05 mm, max = 0.19mm) Figure 12: e positioning errors of the training data before and after compensation using the four methods. identified (Table 3). en, the compliance error model caused by the change of external payload can be established.
To verify the accuracy of the proposed global compensation method, two groups of different orientations in 708 verification positions, which include 168 test points, are selected. Using the proposed global compensation method, which combines the compliance error model and the GA-DNN nonlinear regression prediction model, we can predict and compensate the position errors of these test points with 5.95 and 9.95 kg of the external payloads, respectively. Figure 15 depicts the residual position error of the test points after compensation. e positioning accuracy after the compensation using the GA-DNN prediction method is poor because this method does not consider the additional compliance errors caused by the change of the external payload. Furthermore, the robot's positioning accuracy using the proposed global compensation method is improved with an average rate of 63% compared with that obtained using the GA-DNN model. According to the positioning accuracy of all test data, the enhanced positioning accuracy (i.e., the maximum

Conclusions
In this paper, a multilevel accuracy improvement method is proposed, which includes the improved kinematic calibration, the GA-DNN nonlinear regression prediction, and the extra compliance error compensation. To enhance the stability and accuracy of robot calibration, a parameter optimisation method based on the K-fold cross-validation and generalisation performance evaluation is applied. Given that the calibrated robot's residual errors (i.e., elastic deformation of the links and joints caused by the robot's link selfgravity and the change of the external payload, gear backlash, hysteresis, and friction) generally have strong nonlinearity, a DNN nonlinear regression prediction method based on the GA optimisation of the architecture (i.e., the number of hidden layers, the number of nodes per layer, the learning rate, the training data, the training method, and the validation data in the training process) is developed as an effective solution for achieving the high-performance compensation of the robot's nonlinear errors. Furthermore, the robot positioning accuracy is further improved due to the use of the extra compliance error model to compensate for the compliance error caused by the change of the external payload.
e proposed theoretical methods have been validated via an experimental study involving a kinematic calibration and error compensation of a Staubli RX160L industrial robot.
e experimental results using the GA-DNN prediction method are more accurate than the previous methods (i.e., methods from [27,28,33]), with the positioning accuracy of not more than 0.21 mm. e effectiveness and benefits of the global compensation method based on the GA-DNN prediction model and the extra compliance error model are demonstrated by the compensation results of the tests with different external payloads. e position accuracy after compensation using the proposed global compensation method improved with an average rate of 63% compared with that obtained using the GA-DNN method without considering the additional compliance error.
In the experimental study, data acquisition takes a long time in robot calibration and compensation, especially for the training of the DNN model (2,796 measurement points are used in this paper). Admittedly, the greater the amount of training data is, then the more accurate the DNN model becomes. Given that the large amount of data is needed for each robot for nonlinear compensation, the efficiency becomes relatively low. Consequently, we will focus on the application of the transfer learning method in this DNNbased prediction model, which only needs to use a small amount of data to share a similar DNN model for the same type of the robot.

Data Availability
No data were used to support this study.