Selection of Optimal Measuring Points Using Genetic Algorithm in the Process to Calibrate Robot Kinematic Parameters

At present state, almost the industrial robot tasks are performed by the teaching playback method, in which the robot repeats positioning its joint angles, which are taught manually in advance using a teaching pendant, etc. This method is based on comparatively high repeatability of a robot arm. The problem here is that the laborious and time-consuming online manual teaching is inevitable whenever the specification of the product is changed. It is desirable to teach the task easily and quickly to the robot manipulator when the production line and the production goods are changed.


Introduction
At present state, almost the industrial robot tasks are performed by the teaching playback method, in which the robot repeats positioning its joint angles, which are taught manually in advance using a teaching pendant, etc. This method is based on comparatively high repeatability of a robot arm. The problem here is that the laborious and time-consuming online manual teaching is inevitable whenever the specification of the product is changed. It is desirable to teach the task easily and quickly to the robot manipulator when the production line and the production goods are changed.
Considering these circumstances, the offline teaching based on the high positioning accuracy of the robot arm is desired to take the place of the online manual teaching (Mooring et al., 1991). In the offline teaching, the joint angles to achieve the given Cartesian position of the arm's tip are calculated using a kinematic model of the robot arm. However, a nominal geometrically model according to a specification sheet does not include the errors arising in manufacturing or assembly. Moreover, it also does not include the non-geometric errors, such as gear transmission errors, gear backlashes, arm compliance, etc., which are difficult to geometrically consider in the kinematic model. Under this situation, the joint angles obtained based on the non-accurate nominal kinematic model cannot realize the desired arm's tip position satisfactorily, making the offline teaching unfeasible.
Therefore, some method of calibrating precisely the geometric and non-geometric parameters in a kinematic model is required, in which the three dimensional (3-D) absolute position referring to a world coordinate system should be measured (Mooring & Padavala, 1989;Whitney et al., 1986;Judd & Knasinski, 1990;Stone, 1987;Komai & Aoyagi, 2007). The parameters are obtained so as that the errors between the measured positions and the predicted positions based on the kinematic model are minimized by a computer calculation using a nonlinear least square method.
In this study, a laser tracking system was employed for measuring the 3-D position. This system can measure the 3-D position with high accuracy of several tens micrometer order (Koseki et al., 1998;Fujioka et al., 2001a;Fujioka et al., 2001b). As an arm to calibrate, an articulated robot with seven degrees of freedom (DOF) was employed. After the geometric 4 parameters were calibrated, the residual errors caused by non-geometric parameters were further reduced by using neural networks (abbreviated to NN hereinafter), which is one of the originalities of this study.
Several researches have used NN for robot calibration. For example, it was used for interpolating the relationship between joint angles and their errors due to joint compliance (Jang et al., 2001). Two joints liable to suffer from gravitational torques were dealt with, and the interpolated relationships were finally incorporated into the forward kinematic model. So the role of NN was supplemental for modeling non-geometric errors. It is reported that the relationship between Cartesian coordinates and positioning errors arising there was interpolated using NN (Maekawa, 1995). Joint angles themselves in forward kinematic model, however, were not compensated, and experimental result was limited to a relative (not absolute) measurement using a calibration block in a rather narrow space. Compared with these researches, in the method proposed in this study, the joint angles in the forward kinematic model are precisely compensated using NN so that the robot accuracy would be fairly improved in a comparatively wide area in the robot work space. As instrumentation for non-contact absolute coordinate measurement in 3-D wide space, which is inevitable for calibration of the robot model and estimation of the robot accuracy, a laser tracking system is employed in this study.
To speed up the calibration process, the smaller number of measuring points is preferable, while maintaining the satisfactory accuracy. As for a parallel mechanism, methods of reducing the measurement cost were reported (Tanaka et al., 2005;Imoto et al., 2008;Daney et al., 2005). As one of the methods of selecting optimal measurement poses, the possibility of using genetic algorithm (GA) was introduced (Daney et al., 2005): however, it was still on the idea stage, i.e., it was not experimentally applied to a practical parallel mechanism. As for a serial type articulated robot, it was reported that the sensitivities of parameters affecting on the accuracy are desired to be averaged, i.e., not varied widely, for achieving the good accuracy (Borm & Menq, 1991;Ishii et al., 1988). As the index of showing the extent how the sensitivities are averaged, observability index (OI) was introduced in (Borm & Menq, 1991), and the relationship between OI and realized accuracy was experimentally investigated: however, a method of selecting optimal measurement points to maximize OI under the limitation of point number has not been investigated in detail, especially for an articulated type robot having more than 6-DOF. In this paper, optimal spatial selection of measuring points realizing the largest OI was investigated using GA, and it was practically applied to a 7-DOF robot, which is also the originality of this study.

Robot arm and position measurement system
An articulated robot with 7-DOF (Mitsubishi Heavy Industries, PA10) was employed as a calibration object. A laser tracking system (Leica Co. Ltd., SMART310) was used as a position measuring instrument. The outline of experimental setup using these apparatuses is shown in Fig. 1 The basic measuring principle of laser tracking system is based on that proposed by Lau (Lau, 1986). A laser beam is emitted and reflected by a tracking mirror, which is installed in the reference point and is rotated around two axes. Then, this beam is projected to a retrowww.intechopen.com

Selection of Optimal Measuring Points
Using Genetic Algorithm in the Process to Calibrate Robot Kinematic Parameters 5 reflector called Cat's-eye, which is fixed at the robot arm's tip as a target (see Figs. 2 and 3). The Cat's-eye consists of two hemispheres of glasses, which have the same center and have different radiuses. A laser beam is reflected by the Cat's-eye and returns to the tracking mirror, following the same path as the incidence. The horizontal and azimuth angle information of laser direction is obtained by optical encoders, which are attached to the two axes of the tracking mirror. The distance information of laser path is obtained by an interferometer. Using the measured angles and distance, the position of the center of Cat's-eye, i.e., the position of robot arm's tip, can be calculated with considerably high accuracy (the detail is explained in the following subsection).

Estimation of measuring performance
According to the specification sheet, the laser tracking system can measure 3-D coordinates with repeatability of ±5 ppm (µm/m) and accuracy of ±10 ppm (µm/m). In this subsection, these performances are experimentally checked.
First, Cat's-eye was fixed, and static position measurement was carried out to verify the repeatability of the laser tracking system. Figures 4, 5, and 6 show the results of transition of measured x, y, and z coordinate, respectively. Looking at these figures, it is proven that the repeatability is within ±4µm, which does not contradict the above-mentioned specification which the manufacturer claims.
Second, the known distance between two points was measured to verify the accuracy of the laser tracking system. Strictly speaking, the performance estimated here is not the accuracy, but is to be the equivalence. The scale bar, to both ends of which the Cat's-eye be fixed, was used as shown in Fig. 7. The distance between two ends is precisely guaranteed to be 800.20 mm. The positions of Cat's-eye fixed at both ends were measured by the laser tracking system, and the distance between two ends was calculated by using the measured data. The results are shown in Fig. 8. Concretely, the measurement was done for each end, and the difference between corresponding data in these ends was calculated off-line after the measurement. Looking at this figure, it is proven that the data are within the range of ±10 µm; however, the maximal absolute error from 800.2 mm is 25 µm, which is somewhat degraded compared with the specification. The error is supposedly due to some uncalibrated mechanical errors of the laser tracking system itself.
In the following sections, although the robot accuracy is improved by calibration process, the positioning error still be in sub-millimeter order, i.e., several hundreds micrometer order, at the least. Therefore, the used laser tracking system, whose error is several tens micrometer order at the most, is much effective for the application of robot calibration.

Kinematic model using DH parameter
In this research, the kinematic model of the robot is constructed by using Denabit-Hartenberg (DH) parameters (Denavit & Hartenberg, 1955). The schematic outline of the DH notation is shown in Fig. 9. In this modeling method, each axis is defined as Z axis and two common perpendiculars are drawn from Using these four parameters, the rotational and translational relationship between adjacent two links is defined. The relationship between two adjacent links can be expressed by a homogeneous coordinate transformation matrix, the components of which include above-mentioned four parameters.

Fig. 9. DH notation
The nominal values of DH parameters of PA10 robot on the basis of its specification sheet are shown in Table I. The deviations between the calibrated values (see the next subsection) and the nominal ones are also shown in this table.
The kinematic model of the relationship between the measurement coordinate system (i.e., SMART310 coordinate system) and the 1st axis coordinate system of the robot is expressed by a homogeneous transformation matrix using 6 parameters (not 4 parameters of DH notation), which are 3 parameters of ,, r py   for expressing the rotation, and 3 parameters of 000 ,, xy z for expressing the translation.
The kinematic model from the robot base coordinate system to the 7th joint coordinate system is calculated by the product of homogeneous coordinate transformation matrices, which includes 4×7 = 28 DH parameters.
As for the relationship between the 7th joint coordinate system and the center position of Cat's-eye, it can be expressed by using translational 3 parameters 888 ,, x y z .
Thus, as the result, the kinematic model of the robot is expressed by using 6+28+3 = 37 parameters in total, which is as follows:

Nonlinear least square method for calibrating geometric parameters
The Cat's-eye is attached to the tip of PA10 robot, and it is positioned to various points by the robot, then the 3-D position of the robot arm's tip is measured by the laser tracking system. The parameters are obtained so that the errors between the measured positions and the predicted positions based on the kinematic model are minimized by a computer calculation.
The concrete procedure of calibration is described as follows (also see Fig. 10 , measured that be (,,) XYZ  X , nominal kinematic parameters based on DH notation be n P (see (1)). Then, the nominal forward kinematic model based on the specification sheet is expressed as (, ) n  Xf Θ P . Fig. 10. Calibration procedure using nonlinear least square method By using the nominal kinematic model, the joint angle r Θ to realize r X are calculated, i.e., the inverse kinematic is solved, which is expressed in the mathematical form as 1 (,) The joint angles are positioned to r Θ , then, the 3-D position of robot arm's tip is measured as X . Let the calibrated parameters be P , and the predicted position based on the calibrated model be X , then the forward kinematic model using them is expressed as ˆ( , ) r  Xf Θ P . The P is obtained so that the sum of errors between the measured positions X and the predicted positions X is minimized by using a nonlinear least square method.

Modeling of non-geometric errors (Method 1)
Referring to other researches (Whitney et al., 1986;Judd et al., 1990), the typical nongeometric errors of gear transmission errors and joint compliances are modeled herein, for the comparison with the method using NN proposed in this study, the detail of which is explained in the next subsection 3.4.
It is considered that the gear transmission error of gt  arises from the eccentricity of each reduction gear. This error is expressed by summation of sinusoidal curve with one period and that with n periods as follows: where i is joint number ( 1 7 i   ), i  is the joint angle detected by a rotary encoder sensor, i n is the reduction ratio of the gear, 121 2 ,, ,  (1), forming 68 parameters in total.

Using neural networks for compensating non-geometric errors (Method 2)
Non-geometric errors have severely nonlinear characteristics as shown in (2)-(4). Therefore, a method is proposed herein as follows: after the geometric parameters were calibrated, the residual errors caused by non-geometric parameters were further reduced by using NN, considering that NN gives an appropriate solution for a nonlinear problem.
The concrete procedure using NN is described as follows (also see Fig. 11 (Riedmiller & Braun, 1993), which modifies the conventional back-propagation method, is employed. Fig. 11. Learning procedure of NN Figure 12 shows the implementation of NN for practical robot positioning. When r X is given, the compensation parameter ˆP Θ is obtained by using the NN, then, the accurate kinematic model including ˆP Θ is constructed. Using this model, the joint angle 1(

, )
rr P    Θ fX P Θ is calculated numerically, and it is positioned by a robot controller. Then, r X is ideally realized.

Measurement points for teaching and verification
Measurement area of 400×400×300 mm was set, as shown in Fig. 13. This area was divided at intervals of 100 mm for x, y, and z coordinates, respectively. As the result, 5×5×4 = 100 grid points were generated. The group of the grid points was used for teaching set for calibration.
On the other hand, the group of 100 points was taken as shown in Fig. 14. Points were located at regular intervals on a circular path, of which radius is 100 mm and center is (500, 100, 600) mm. They were used for verification set for the calibration result.

Estimation of effect of calibrated model
The joint angles to realize the verification set were calculated based on the calibrated model, and they were positioned by a robot controller. Note that, this calculation of inverse kinematics is not solved analytically, so it should be numerically solved, since the adjacent joint axes in the calibrated model are no longer accurately parallel or perpendicular to each other.
Then, the Cartesian 3-D positions of the robot arm's tip, i.e., the verification set, were measured by the laser tracking system. By comparing the measured data with the designated data, the validity of the calibrated kinematic model was estimated.

Discussion
It was proven that the error was drastically reduced from 5.2 mm to 0.29 mm by calibrating geometric parameters using a nonlinear least square method. It was proven that the error was further reduced to 0.19 mm by compensating non-geometric parameters using NN, indicating effectiveness of Method 2. The error was reduced by calibrating both geometric and non-geometric parameters using a nonlinear least square method, i.e., by applying Method 1. The improvement from calibrating only the geometric parameters (not non-geometric parameters) using a nonlinear least square method, however, was subtle and incremental, which was from 0.29 to 0.24 mm.
To verify that the experimental result is repeatable, the calibration process was carried out again for the same verification data set on the same circular path, called Trial 2. And it was carried out for a data set on another circular path, of which z coordinate is shifted from original 600 to 700 mm, called Trial 3. The results are added and shown in Table 2. Compared Trial 2 and 3 with Trial 1, it is proven that the experimental trend of average errors is repeatable. Eventually, it was proven that Method 2 of first calibrating the geometric parameters and next further compensating the non-geometric parameters using NN is the best among these procedures. The reason of superiority of Method 2 is thought to be as follows: there are many unexpected non-geometric errors besides the gear transmission errors and joint compliances. Therefore, Method 1 of only considering these two type non-geometric errors did not work so well. On the other hand, NN can compensate all types of non-geometric errors by imposing the resultant errors in its learning process appropriately to the variety of connecting-weights of neurons.
Even in case of using NN, there remain still positioning errors of approximately 0.2 mm. They supposedly arise from the limitation of generalization ability of NN, since the points for verification are considerably apart from those for teaching.

Meaning of reducing number of measuring points
For shortening the time required for the calibration process, reducing the number of measuring points while maintaining the accuracy is effective. For increasing the calibration accuracy, it is important that the sensitivity of (tip position displacement)/(parameter fluctuation) is uniform for all the parameters in the kinematic model. As the index of showing the extent how the sensitivity is uniform among the parameters, observability index (OI) was reported (Borm & Menq, 1991). The larger OI means the higher uniformity. In this section, under the limitation of point number, optimal spatial selection of measuring points achieving the largest OI is investigated using genetic algorithm (GA).
The procedure of obtaining OI is described hereinafter. Let the forward kinematic model be (,)  Xf Θ P , as already explained in subsection 3.2. Then, the error of robot arm's tip ΔX with respect to the error of geometric parameters ΔP is expressed as follows: where (3 ) n  J is the Jacobian matrix, n is the number of geometric parameters. Assuming the number of measuring points be m, equation (5) is extended as follows: where … 12 ,, ,

Selection of measuring points using GA
It is impossible to analytically define the optimal measuring points that maximize OI. Therefore, GA is applied in this study, which is known as an effective method for searching an optimal (or nearly optimal) solution of a severely nonlinear problem.
The procedure of pursuing the optimal spatial selection of measuring points is described hereinafter. Let us assume that the number of measuring points is limited to 8, for example. Then, a chromosome is provided, which consists of X, Y, and Z coordinates of 8 points. As 8 bit is assigned to each coordinate, the chromosome consists of totally 8 points×3 coordinates×8 bit = 192 bit, as shown in Fig. 16. Since 14 singular values were almost zero, the effective number of singular values is 37-14=23 (Ishii et al., 1988). Three equations are obtained for X, Y, and Z coordinates at each point measurement, so the practical minimum number of measurement points is 8, since 23/3=7.67. Note that these 14 parameters are independent in a strict meaning; therefore they are uniquely obtained in the previous section. By contrast, in this section, the practical small measurement number is focused on; so they are regarded as approximately redundant (dependent) and omitted.
Six chromosomes are randomly employed at first. By repeating crossover and mutation at each generation with referring to the fitness function of OI, they are finally converged to such a chromosome that realizes the largest OI.

Experimental results of GA search
At several numbers of generations, GA search was stopped, and the resultant 8 measuring points and corresponding OI were checked. At these 8 points, the robot arm's tip was measured by the laser tracking system. Using the measured data, the kinematic model was calibrated by a nonlinear least square method. Then, based on the calibrated kinematic model, the robot arm's tip was positioned to 100 points for verification, where the absolute error was estimated again by the laser tracking system. These procedures were repeated during the progress of GA search.
The resultant relationship between OI and the positioning error is shown in Fig. 17. At first, the 8 points were selected at random, then, the GA search progresses, finally it is truncated when the number of generation reaches 1,000. From this figure, it is proven that OI is increased and the resultant error is reduced as the GA search progresses.  The data in cases that the number of measuring points is 12 and 15 are also shown in this figure. Looking at the figure, in these cases, the resultant error is less dependent on OI value. It is supposedly because the number of measuring points is enough compared with minimum 8 points. For reference, OI of 100 points in teaching points shown in Fig. 13, and the resultant error using these points, are also depicted in this figure of Fig.17. It indicates that 100 points are not necessary. As the result, even 8 minimal measuring points are enough for achieving good accuracy better than 0.5 mm in this example case, provided that they are optimally selected in advance using GA computational search. Figure 18 shows an example of 8 measuring points, which were selected by the GA search. The resultant OI for these 8 points was 1.75. For the reference, randomly selected 8 points at the beginning of the GA search are also shown in this figure, the OI for which is 0.3. Looking at this figure, measuring points with larger OI are distributed widely in the 3-D space, whereas those with smaller OI are gathered in a comparatively small area.

Conclusions
We employed a laser tracking system for measuring robot arm's tip with high accuracy. By using the measured data, the kinematic model of a 7-DOF articulated robot arm was calibrated. Using the calibrated model, high positioning accuracy within 0.3 mm was realized.
To briefly summarize the achievements of this article, 1) the geometric parameters were calibrated by minimizing errors between the measured positions and the predicted ones based on the kinematic model. 2) The residual errors mainly caused by non-geometric parameters were further reduced using neural networks. 3) Optimal measuring points, which realize high positioning accuracy with small point number, were selected using genetic algorithm (GA).
If the orientation of robot arm's tip could be precisely measured using some sensor such as a gyroscope (Fujioka et al., 2011b), the robot kinematic model of realizing both position and orientation can be calibrated, which is planned to do in a future projected work.