An ANN-Based Precision Compensation Method for Industrial Manipulators via Optimization of Point Selection

Industrial manipulators are widely used in the manufacture of products due to their high flexibility and low costs. High absolute positioning accuracy is the key to guarantee the product quality, which is commonly improved through the error compensation technology. Due to the variety, complexity, and unpredictability of the error sources, the influence of the nongeometric errors on the absolute positioning accuracy of manipulators is uncertain. In result, the existing error compensation methods are difficult to obtain satisfying results, especially for manipulators with large joint flexibility that need to work in different task scenarios. In this paper, an artificial neural network(ANN-) based precision compensationmethod via optimization of point selection is proposed, which deals with the kinematic errors and joint stiffness errors in different task scenarios. Firstly, the quasi-random sequence (QRS) method and the product of exponentials (POE) model are combined to identify and compensate the geometric parameters. +e QRS method can select points evenly in the workspace. And the POE model can avoid the singularity problem of Denavit–Hartenberg (DH) model. Secondly, a continuous joint stiffness compensation model in the whole workspace is established through ANN. In order to get better compensation results for the current task scenario, the point selection method based on trajectory similarity is adopted to determine the training data of ANN. Finally, the experiments are conducted on a 6DOF industrial manipulator to demonstrate the validity of the proposed method. +e results show that the ANN-based method via optimization of point selection could be an effective solution for the precision compensation.


Introduction
With the development of information technology, industrial manipulators as intelligent equipment are widely used in all walks of life [1], such as aerospace, automotive assembly, and 3C. In some application scenarios, higher absolute positioning accuracy for industrial manipulators is required. e absolute positioning accuracy of industrial manipulators can reach within 2 mm after the calibration of the kinematic parameters under no-load condition. However, due to the deformation of joints, the absolute accuracy of heavy-duty manipulators will decline significantly under heavy-load condition, which can affect the normal operation of the manipulators [2][3][4]. To solve this problem, various approaches have been studied. e error source modeling of manipulators has attracted great attention. e errors are mainly composed of linear errors such as the kinematic parameters and nonlinear errors such as joint deformation [5,6]. And the linear errors caused by the kinematic parameters errors account for 90% of the total errors. e DH model is the most common method for kinematic modeling of industrial manipulators, which was first proposed by Denavit and Hartenberg in 1955 [7]. When two adjacent joint axes of the manipulator are parallel, there will be singularity in the DH, which makes the subsequent parameter identification impossible. In order to solve this problem, Samad and Hayati introduced a rotation transformation to describe the axis deviation of two adjacent parallel joints based on the DH parameter model and established the modified-DH (MDH) model [8]. Stone et al. proposed a 6-parameter model composed of 3 rotation parameters and 3 translation parameters, which is represented by multiplying a 6-parameter matrix on the basis of DH model, called S-model [9]. In 1992, Zhuang et al.
proposed a complete and parametrically continuous (CPC) model which is composed of three translation parameters and one rotation parameter, which can avoid the sudden change of the position and pose [10]. Okamura et al. used the screw theory of spatial motion of rigid body to represent the position and pose of joint axis in the inertial system and built a new continuous kinematic model called POE [11,12]. Although the models mentioned above show good performance in kinematic parameter compensation, there are also some nonlinear errors such as joint stiffness that cannot be compensated by them. In addition, the difference of point selection is of great influence on the results of kinematic error compensation.
In fact, it is not enough only to compensate for the kinematic parameters in the field of high precision application. Judd and Knasinski studied the influence law of various nonlinear error sources, such as temperature drift, and proposed a transformation matrix method to compensate for the nonlinear errors [13]. However, it is impossible to model all the nonlinear error sources correctly. Joint stiffness compensation is an important part of the nonlinear error compensation. e errors caused by joint stiffness account for about 6%∼8% of the total errors [14]. Many theories and methods to calibrate the joint stiffness of industrial manipulators were proposed in recent years. Qin compensated the joint stiffness through the finite element analysis of the 3dimensional model to obtain the deformation of the end of the industrial manipulator [15]. Ahmad established a mathematical transfer model for the relationship between the torque and the deformation of the motor, reducer, and connecting rod [16]. Chen and Kao analyzed the relationship between deformation and force torque through decomposing the force and force torque on the end of the manipulator to each joint [17]. However, most of the previous studies obtained the force torque of the joints of the industrial manipulators to overcome the forces at the end and the gravity itself based on theoretical calculations, ignoring the torque required to overcome the friction between the reducer gears. erefore, the stiffness coefficient calculated at last turned out to be a little smaller. Due to their expertise in nonlinear data processing and analysis, artificial intelligence algorithms, such as genetic algorithm [18,19] and artificial neural network [20,21], were widely used in the compensation of nonlinear errors of manipulators. e intelligent algorithms can avoid complex nonlinear error modeling. However, on the one hand, the training data used by the intelligent algorithms comes from the ideal model and is not very accurate. On the other hand, it is not rigorous to fit all the nonlinear errors with intelligent algorithms, especially for industrial manipulators with large flexible joints [22].
In this paper, an ANN-based precision compensation method via optimization of point selection is proposed. Firstly, the point selection method based on QRS is adopted to select points evenly in the workspace, and the POE model is used to identify the kinematic parameters and compensate for the geometric errors. e QRS method has more advantages than the traditional methods in the randomness and uniformity of point selection. e introduction of the POE model can avoid the discontinuity and singularity of the standard DH model. Secondly, a continuous joint stiffness model of the industrial manipulator using ANN is established, which can accurately compensate for the nonlinear errors in the aspect of joint stiffness in the whole workspace. e point selection method based on trajectory similarity is adopted to determine the training data of ANN model, whose innovation lies in making joint stiffness compensation model work better in different task scenarios. At last, a series of experiments conducted on a 6-DOF industrial manipulator show that the method proposed in this paper is a feasible and effective precision compensation solution.

Problem Description
e precision compensation process for industrial manipulators is mainly divided into two parts. A POE model is used to compensate for the geometric errors instead of a DH model. e joint stiffness model is established to compensate for the nongeometric errors. In this section, the POE model and joint stiffness model will be described.

Geometric Errors Compensation Based on the POE Model.
Based on screw theory and linear algebra, the POE model applied to manipulator kinematics expresses each joint axis in the form of screw in space. Since the POE model is a continuous mapping relationship from the differential space of geometric structure parameters to the differential space of model parameters, it can avoid the singular problems of the DH model [23,24]. At the same time, the POE model can describe the relationship between the end errors and joint angle errors intuitively. In this section, the POE model is introduced to establish the kinematic model of the industrial manipulator.
According to the definition of the POE parameter model, the manipulator end coordinates expressed in the measurement coordinate system are given by where M is the coordinate transformation matrix from the measurement coordinate system to the manipulator base coordinate system, g(θ) � e ξ ∧ 1 ϑ 1 e ξ ∧ 2 ϑ 2 · · · e ξ ∧ n ϑ n (i � 1, 2, . . . , n), θ i is the joint angle of each axis of the manipulator, nis the degree of the freedom, ξ ∧ i is the screw representation of each joint, and P cT 0 is the homogeneous transformation matrix from the manipulator base coordinate system to the end coordinate system under the zero initial condition.
(2) 2 Mathematical Problems in Engineering e rigid body transformation g can be written in the form of homogeneous transformation, and the third term on the right of equation (2) is given by where G � [dP cT0 ; 0] T . According to the theory of Lie groups, the elements s in Lie algebras satisfy the following relations: where q * � [q; 1] T and ∧ operator represents the transformation from 6D rotation vector to 3D rotation matrix. By substituting formulas (3) and (4) into formula (2), the manipulator differential kinematics model can be given by where ∨ operator is the inverse of ∧ operator and represents the transformation from 3D rotation matrix to 6D rotation vector. e coordinate transformation M from the measurement coordinate system to the robot base coordinate system can be regarded as the rigid body motion, and any rigid body motion can be realized by rotation and translation around one axis. M can be described as follows: In equation (7), θ 0 is regard as a constant because it is coupled with the 1st joint angle value θ 1 of the manipulator. e matrix g also satisfies where Ad operator represents the adjoint mapping in Lie According to the previous derivation, the differential kinematics model of the manipulator is given by Mathematical Problems in Engineering 3 In the above formula, each exponential product e ξ i ∧ θ i can be expressed in the form of homogeneous matrix by Taylor expansion.
e corresponding transformation Ad can be expressed in the form of 6 * 6 adjoint matrix. en, the above formula simplified is given by where the absolute positioning error of the robot end is given by where P a is the actual TCP position measured by the measuring equipment, P n is the theoretical TCP position calculated through the forward kinematics, and A is the mapping relationship between the robot structure error space and the Cartesian error space, which is given by e selected and measured points are substituted into equation (11) and the number of equations is more than unknown parameters. e least-square solution can be used to solve the problem, which is given by All the structural parameter errors x of the manipulator are given by As long as the errors in x are identified, the kinematic parameter errors of the manipulator can be compensated.
However, the point selection method before compensation has an important influence on the compensation results of the POE model. e common practice is to randomly select points in the workspace, which make the compensation results unstable. If the points selected are not evenly distributed in the workspace, the final results will be affected.

Joint Stiffness Error Model.
According to the previous work, the stiffness of the manipulator's rod is much greater than the joint stiffness of the manipulator. In addition, due to the real-time requirement of the manipulator controller, it is easier and more efficient to compensate for the joint angle deformation. erefore, we only consider the deformation of the reducer under the heavy load condition. e electromagnetic characteristic formula of the DC servo motor is given by where τ output is the output force torque of the motor, C e is the motor potential constant, φ is the magnetic flux, and I is the control current of the motor which can be read from the controller of the manipulator directly.
Taking the reducer as the research object, the force torque relationship on each joint is given by As shown in equation (17), the input torque of each joint τ input is not only used to overcome its own equivalent weight torque τ gravity but also used to overcome the friction torque τ friction between the reducers and the force torque τ force loaded at the end of the manipulator. In the previous study, only the self-weight torque and external force torque are considered in the calculation of theoretical torque, while the existence of nonlinear friction torque is ignored. e direct use of input torque, which is the output torque of the motor, can solve the above problem.
If the reducer is approximately a linear torsion spring model and the rod is approximately a rigid body, the angular deformation of the reducer is directly proportional to the input torque. e relationship between the input torque of the reducer and the deformation is given by where k i is the stiffness coefficient of the ith joint, which is the deformation caused by the balance weight force torque, external force torque, and friction torque of the ith joint. e stiffness matrix of manipulator joint can be obtained by neglecting the mutual influence between the stiffness of each joint: By substituting formula (18) into formula (16), the relationship between the joint angle deformation and the motor control current is given by e flexibility matrix of the robot joint is given by If there is no error in the structural parameters of the manipulator and the zero position of the joint, the error at the end only comes from the joint angle deformation caused by the balance joint torque. e joint angle error vector [δθ k 1 , . . . , δθ k n ] T can be calculated according to the current. en, the flexibility matrix F will be identified according to equation (20). At last, the formula that compensate for the joint angle errors is given by where θ real is the real values of joint angles after compensated, θ n is the nominal values of the joint angles before compensated, I is the actual current value that read from the actuators, and F is the identified flexibility matrix. However, the joint stiffness error model has the following problems. (1) e joint stiffness error model is configuration-dependent. When the end of the industrial manipulator comes to an arbitrary point, the error of the joint angles caused by the joint stiffness cannot be obtained in real time. And it is impossible to calculate the errors of all the joint angles in the workspace. (2) Due to the difference of the task scenarios, the trajectory of the manipulator end is very different. When the manipulator moves according to a different trajectory, the joint stiffness varies greatly because of the different mass distribution. erefore, it is very important to compensate for the joint stiffness in real time and accurately according to different task scenarios.

An ANN-Based Precision Compensation Method via Optimization of Point Selection
To solve the problems mentioned in Section 2, a novel precision compensation method is proposed in this section. e compensation steps of the method are shown in Figure 1.

Point Selection Based on the QRS Method.
e point selection is of great significance to the model identification and error compensation. In traditional methods, arbitrary or pseudorandom methods are usually used to select points in the workspace of the manipulator. e arbitrary method is influenced by subjective factors, and its randomness is not strong. Although the pseudorandom method has strong randomness, the homogeneity of the selected points in space is not enough [25]. In order to generate 3D points in each area of the robot workspace fully and evenly, the QRS method is adopted in this paper [26,27]. e QRS method has more advantages than the conventional methods in the randomness and uniformity of point selection. e performance comparison between pseudorandom method and the QRS method is shown in Figure 2. e input of the QRS algorithm is the coordinate range of workspace, and the output of the algorithm is the 3D points generated.

Geometric Errors Compensation Based on the POE Model.
e process of kinematics modeling with POE has been described in Section 2.1, which will not be described here. e points used in the POE model were selected through the QRS method described in Section 3.1. According to equation (11), the errors of the kinematic parameters x can be identified. e geometric errors will be compensated after x is written back into the controller of the industrial manipulator.

Joint Stiffness Error Model.
e process of joint stiffness modeling has been described in Section 2.2. According to equation (22), the errors of joint angles caused by the joint stiffness can be obtained and compensated for some points.
However, the joint stiffness is configuration-dependent and it is impossible to calculate the errors of all the joint angles in the workspace. And the errors caused by joint stiffness vary greatly in different task scenarios.

e Training of ANN Model Based on Trajectory
Similarity. To establish a continuous joint stiffness compensation model, an ANN model is adopted in this section. To compensate the errors of joint angles caused by joint stiffness more accurately, the point selection method based on trajectory similarity is adopted to select the training data of the ANN model.

Training Point Selection Based on Trajectory Similarity.
According to the QRS algorithm in Section 3.1, 2000 3D points can be generated in the workspace. After the POE compensation, the joint angle errors of the 2000 points can be identified according to the joint stiffness compensation model in Section 3.3. However, these points are discrete in the workspace. In order to obtain the joint stiffness errors of any point in the workspace in real time, a continuous joint stiffness error model is trained by ANN. e selection of training data is of great significance to the fitting effect of intelligent algorithm. If all the data are used as training data, although the global optimal solution can be obtained, it is not the local optimal solution and costs a long time. In the practical application of the manipulator, the trajectory of different tasks is of great difference. For the manipulator with large flexibility or load, the mass distribution of the manipulator is different due to the different running track, which results in different joint stiffness errors of the manipulator. In order to enhance the accuracy and adaptability of the continuous stiffness error model, a  Mathematical Problems in Engineering method based on the trajectory similarity is adopted to select the training data. e specific steps are as follows: (1) Determine the working trajectory T i of the current task scenario (2) Select 50 points (P 1 , P 2 , P 3 , . . . , P 49 , P 50 ) on the trajectory T i , and the selection of points should cover every segment of the trajectory T i (3) For each point selected on the trajectory T i , the nearest 10 points are selected according to the geometric distance method among the 2000 points Finally, a total of 500 points are selected as training data, which reduces the amount of data calculation and enhances the adaptability of training data to the task scenario. Because 2000 points are evenly distributed in the working space, the uniformity of the selected 500 points can be guaranteed. e point selection method based on trajectory similarity is shown in Figure 3.

Training Process of the ANN Model.
e artificial neural network is based on neurons, which can describe almost any nonlinear system. And the back propagation (BP) neural network is the most common multilayer feedforward model [28,29]. In general, the topological structure of the neural network model can be divided into three layers: input layer, hidden layer, and output layer. ese three layers correspond to the input of the model, the processing of the data, and the output of the results, respectively. e processing of the data is completed by interconnected neurons. e connection structure of a neural in the hidden layer is shown in Figure 4.
Due to various factors, the model error identification of the manipulator is a typical nonlinear problem. If the stiffness of the manipulator is modeled as a whole, many factors such as friction and dynamics need to be considered, which is very complex and time consuming. erefore, after the errors caused by joint stiffness of 500 points in the workspace are identified, the ANN is introduced to establish a continuous stiffness error model. No matter the manipulator moves to any point, the error of this point caused by joint stiffness can be calculated in real time.
In the training process of the ANN model, the data selected by the method based on trajectory similarity are used to enhance the adaptability of model to the application scenario.
e supervised training method is adopted in this paper. e input of the ANN model is the joint encoder readings of the manipulator q � (θ 1 , θ 2 , θ 3 , . . . , θ n−1 , θ n ) and the output of the ANN model is the error vector Δq � (Δθ 1 , Δθ 2 , Δθ 3 , . . . , Δθ n−1 , Δθ n ). e well-trained ANN model can automatically fit and calculate the corresponding joint angle error Δq � (Δθ 1 , Δθ 2 , Δθ 3 , . . . , Δθ n−1 , Δθ n ) caused by the joint stiffness, after we input the joint angle readings of the manipulator encoders q � (θ 1 , θ 2 , θ 3 , . . . , θ n−1 , θ n ). Finally, the errors calculated are used to compensate for the joint stiffness to reach a much higher positioning accuracy. e process of compensating for the joint stiffness errors is described in Figure 5.

Experiments and Analysis
To demonstrate the performance of the proposed method, several methods are, respectively, used to compensate the accuracy of a manipulator and comparative analyses are conducted.
e experiments are carried out on a 6-DOF ESTUN manipulator. And the experimental platform is the Advanced Robot Testing System (ARTS) developed by Premax. e measurement equipment for data acquisition is a FARO laser tracker.

e Kinematic Model of the 6-DOF Manipulator.
e manipulator and the measurement equipment are shown in Figure 6. e manipulator has 6 rotating joints. e transformation relationship of the POE model is shown in Figure 7.
e nominal kinematic parameters of the manipulator needed to establish the POE model is given in Table 1. e coordinate transformation matrix from the measurement coordinate system to the manipulator base coordinate system can be obtained from ARTS directly. According to equation (11), the kinematic model of the ESTUN manipulator based on POE is built.

Parameters' Settings.
Before collecting experimental data, a series of parameters need to be set. rough our repeated tests, all the parameters involved are determined. e parameters' settings in each stage are shown in Table 2.

Collection of the Experimental Data.
e nominal parameters of the kinematic model are shown in Table 1. To identify the real parameters' values and compensate for the geometric errors with POE, 80 points P i (x, y, z)(i � 1, 2, . . . , 80) need to be collected which are selected from the 2000 points P j (x, y, z)(j � 1, 2, . . . , 2000) generated with the QRS method. e coordinates of these 80 points are nominal and cover the whole workspace as far as possible.
rough the nominal inverse kinematic model, the values of six joint angles Q i (θ 1 , θ 2 , θ 3 , θ 4 , θ 5 , θ 6 )(i � 1, 2, . . . , 80) can be obtained. Due to the existence of the kinematic model errors, the actual coordinates of these 80 points P real i (x, y, z)(i � 1, 2, . . . , 80) are measured by ARTS and converted to the base coordinate system of the manipulator. We only record the position data and do not collect the orientation data of the manipulator end. erefore, the orientation of the end of the manipulator does not need change.

Analysis of Experiments Results.
To demonstrate the advantages of the POE model, the POE model and the conventional DH model were used to compensate for the geometric errors separately. Fifty points at different positions were selected to perform the accuracy validation. According to equation (14), the parameters were identified through the POE model. e calibrated parameters shown in Table 3 were written back to the controller of the manipulator. e absolute positioning accuracy of the manipulator is 5.12 mm before compensation. After compensation with the POE model, the absolute positioning accuracy improved to 1.81 mm. After compensation with the DH model, the absolute positioning accuracy improved to 2.27 mm. e comparison results of the two methods are shown in Figure 8 and Table 4. Seen from Figure 8, the compensation results of the POE model are more advantageous in general. Moreover, due to the continuity of the POE model, the standard deviation of the POE compensation results is much smaller.
After compensation for the geometric errors, a continuous joint stiffness error model based on ANN was used to compensate for the errors caused by the joint stiffness. It was   assumed that the manipulator was performing the assembly task. e manipulator was taught to run on a U-shaped assembly trajectory, which is shown in Figure 9. In the experiment, the manipulator picked the material from the starting point and assembled it in the finishing point. e 500 points which were close to the assembly trajectory were used to train the ANN model. e compensation results are shown in Figure 10 and Table 5. e absolute positioning accuracy of the manipulator improved to 1.23 mm.
To enhance the adaptability to various scenarios, the point selection method based on the trajectory similarity is adopted. To demonstrate the effectiveness of the method, another experiment was conducted. e 500 training points were selected with arbitrary method   Network type BP 10 Neurons of input layer 6 11 Neurons of hidden layer 4 12 Neurons of output layer 6 13 Learning rate 0. 12 14 Training times 1200 15 Activation function Tan-sigmoid        instead of the method based on trajectory similarity. e absolute positioning accuracy of the manipulator improved to 1.57 mm, which is obviously worse. e comparison results are shown in Figure 11 and Table 6. It is shown that the joint stiffness errors are closely related to the posture of the manipulator.
To select points evenly in the workspace, the QRS method is adopted in the experiments. To demonstrate the effect of uniformity of point selection on the precision compensation, another comparison experiment was conducted. In the experiment, 2000 points were generated through the pseudorandom method instead of the QRS method. Other steps remain the same. e compensation results are shown in Table 7. e absolute positioning accuracy of the manipulator improved to 1.53 mm, which proved the validity of the QRS method.
As shown in Figure 10, the absolute positioning accuracy of the manipulator is improved significantly. e compensation results show that the absolute positioning accuracy has been increased from 5.12 mm (before compensation) to 1.23 mm (after compensation). And the method proposed in this paper is an effective precision compensation solution and has a strong adaptability to various task scenarios.

Conclusions
In this paper, an ANN-based precision compensation method for industrial manipulators via optimization of point selection is proposed. To reduce the influence of the points' unevenness on the compensation results, the QRS method is adopted to generate points in the workspace. e introduction of the POE model to compensate for the geometric errors can avoid the singularity of the DH model and reduce the complexity of modeling. In order to compensate for the nongeometric errors more accurately, errors caused by joint stiffness are studied and a joint stiffness model is established. To compensate for the errors caused by the joint stiffness in real time within the whole workspace, an ANN model has been trained to make the joint stiffness model continuous. e training data selection method based on trajectory similarity enhanced the adaptability of the precision compensation solution to the various task scenarios.
To demonstrate the performance of the method proposed in this paper, a series of validation experiments are conducted on a 6-DOF ESTUN manipulator. e comparison results obtained from different aspects proved the feasibility and superiority of the proposed method.
In the future, further research studies will focus on the analysis and modeling of the nonlinear error sources, which will improve the positioning accuracy of the industrial manipulators more significantly.

Data Availability
Data used in the study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest.

Authors' Contributions
Z.W. and C.M. conceptualized the study; Z.W. contributed to the methodology; X.Z. contributed to software; Z.W., C.M., and X.Z. validated the study; Z.W. contributed to writing and original draft preparation; Z.W. and Z.C. contributed to writing and review and editing; and Z.C. contributed to funding acquisition.