# Inverse Kinematic Solutions of Dual Redundant Camera Robot Based on Genetic Algorithm

Authors: Libo Zhang; Jingjie He; Su Wang
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

Inverse kinematic solutions for a dual redundant camera robot in position are examined in order to alleviate operation difficulty and reduce time. The inverse kinematic algorithm is based on a basic genetic algorithm, and the genetic algorithm which is used to solve the problem of a redundant robot is mainly optimized in the joint space. On this basis, the genetic algorithm improvement strategies are studied. In this paper, a genetic algorithm with constrained 2 redundant degrees of freedom (DOF) is proposed through setting 2 parameter variables, with more flexible structure of optimization objective function and more efficient algorithm than basic genetic algorithm. Finally, the result of inverse kinematic algorithm is achieved in terms of the physical prototype.


---

## Body

## 1. Introduction

Coupled with mechanism geometric flexibility, a robot intelligent control system serves to complete a variety of complex operational tasks [1]. The geometric structure of a redundant robot is highly flexible, which provides valuable sources for both theoretical research and practicability [2]. The inverse kinematic solutions for a redundant robot are expressed as solutions of nonlinear equations, which generally can only be solved based on numerical iterative methods. Moreover, analytic solutions can be achieved only in some special geometric structures [3]. For special structures, the algebraic method employed to obtain inverse kinematic solutions can effectively reduce computational complexity, which is also conducive to online applications [4–13]. There are infinitely many solutions which can be used to solve inverse kinematics of a redundant robot. As a result, the identification of optimal solution is of relevant significance [14–16].Generally, a genetic algorithm is employed to optimize inverse kinematic solutions of a redundant robot in the joint space [17]. Optimization objective function, sometimes called fitness function, consists of the minimum position error and rotation angle of each joint and solves to inverse kinematics in accordance with explicit expression from transformation matrix of a redundant robot [18]. Although optimization accuracy can achieve a desired effect, there is a certain gap between optimal solutions and target position, because only the end position is optimized.This paper analyzes an 8 DOF serial camera robot, which boasts flexible movement and accurate positioning ability. It requires a control of position and orientation of end-effector in position to solve inverse kinematics of camera robot primarily [19, 20]. This camera robot has 2 redundant DOF, complicated mechanical structure, and large size of sample space, which renders it challenging to achieve effective inverse kinematic solutions. Therefore, genetic algorithm for the inverse kinematics is proposed. End-effector minimum position and orientation error are commonly considered as optimization objective function of a basic genetic algorithm, which fails to identify the effective inverse kinematic solutions due to the large size of sample space, poor convergence of a genetic algorithm, and running over time. According to structural characteristics of the camera robot, a subinterval of optimal solutions is determined in advance to reduce dimension of the solution space. Subsequently, the relative position between body structure and target point is identified. Finally, a theoretical effective initial population is set by virtue of pattern search algorithm to reduce operation time and improve quality of the optimal solution. The directors can directly specify end-effector position without any support of professional operators and automatically select a best track to audition through the genetic algorithm. Meanwhile, total running time of this algorithm is in an allowed time.


## 2. Inverse Kinematic Solutions Based on Genetic Algorithm with Physical Constrained 2 Redundant DOF

### 2.1. Establishing Mathematical Mode

In this paper, the camera robot is an 8 DOF PRRPR-S robot. Compared with the traditional industrial robot, upper arms can be extended, and the robot body can be moved in a linear orbit, which can be found in Figure1.Figure 1
Camera robot physical prototype.The kinematic model of this camera robot is established based on an assumption that robot is a rigid body. DH model is adopted for the first 7 joints of the robot [21–24], and the last one employs 6-parameter model. Finally, connecting rod coordinate system is created, as presented in Figure 2.Figure 2
Connecting rod coordinate system.There are 8 movement axes. As shown in Figure2,  r1 is the displacement of bottom linear motion, θ2 is the rotation angle of bottom annular rotator, θ3 is the rotation angle of top pitch rotator, r4 is the displacement of top linear motion, θ5 is the rotation angle of top distal pitch rotator, θ6 is the rotation angle of end-effector posture rotator, θ7 is the rotation angle of end-effector pitch rotator, θee is the rotation angle of end-effector roll rotator, and the major structure of camera robot is the annular structure.According to the position and orientation analysis of robot, the transformation matrix is obtained as(1)A0=0010100001000001A1=100000100-10r1+r100001A2=cos⁡θ2-π20-sin⁡θ2-π20sin⁡θ2-π20cos⁡θ2-π200-10r20001A3=cos⁡θ3-π20-sin⁡θ3-π2l3·cos⁡θ3-π2sin⁡θ3-π20cos⁡θ3-π2l3·sin⁡θ3-π20-1000001A4=100000-10010r4+r400001A5=cos⁡θ5+π20-sin⁡θ5+π20sin⁡θ5+π20cos⁡θ5+π200-1000001A6=cos⁡θ60sin⁡θ60sin⁡θ60-cos⁡θ60010r60001A7=cos⁡θ7-π20-sin⁡θ7-π20sin⁡θ7-π20cos⁡θ7-π200-1000001Aee=cos⁡θeesin⁡θee00-sin⁡θeecos⁡θee0000100001.Then the forward kinematic matrices of the robot are(2)Tee=A0·A1·A2·A3·A4·A5·A6·A7·Aee.


### 2.2. Inverse Kinematic Basic Genetic Algorithm in the Joint Space

Inverse kinematic basic genetic algorithm for the camera robot is currently an explicit expression of end-effector position according to the robot transformation matrix, and the key to solve inverse kinematic solutions is on the basis of the forward kinematic equation with genetic algorithm.Make CRCP camera robot current position zero point; paT is homogeneous matrix of target position.(3)CRCP=00000000TpaT=1005000010150000115000001.In terms of this algorithm, the basic genetic algorithm parameters are set in the joint space, and an experiment is simulated by MATLAB. It turns out that computing time with this algorithm is about 2094.838654 s, and the minimum value of fitness function is 62858.09908986.The solution set of effective inverse solution for camera robot is(4)CRTP=6851.622.72550.0195132.3-2.6053-1.0593.4355-0.5001.Robot reaches the target position, as shown in Figure3.Figure 3
The target position on basic genetic algorithm.According to the experiment results, camera robot does not reach the target position, and computing time of this algorithm takes about half an hour, which is beyond endurance in practice. That is principally due to a large number of camera robot joints, large movement of each axis especially linear motion at the top and the bottom, uncertain optimization objective function of algorithm, and complex camera robot mechanism, as well as many transformational matrices.Therefore, the inverse kinematic solutions based on basic implicit genetic algorithm with constrained 2 redundant DOF are herein proposed to replace explicit expression of fitness function on individual genes.


### 2.3. Inverse Kinematic Solutions Based on Implicit Genetic Algorithm with Physical Constrained 2 Redundant DOF

The inverse kinematic solutions of camera robot are obtained by genetic algorithm, which takes an arbitrary set of 2-dimensional vector of 2 redundant DOF as an individual in physical constraint. Effective inverse solutions which are obtained with least relative weight of each joint angle variation are extracted in infinite inverse solutions through limiting optimization objective function. This indicates that, in the same movement time, there is small variation with large load inertia and large variation with small load inertia.Make CRCP camera robot current position, CRTP camera robot target position, and CRMD movement displacement of each axis.(5)CRCP=r1Cθ2Cθ3Cr4Cθ5Cθ6Cθ7CθeeCTCRTP=r1Tθ2Tθ3Tr4Tθ5Tθ6Tθ7TθeeTTCRMD=CRTP-CRCP=Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT=r1T-r1Cθ2T-θ2Cθ3T-θ3Cr4T-r4Cθ5T-θ5Cθ6T-θ6Cθ7T-θ7CθeeT-θeeCT.Absolute movement displacement of each axis is considered to be a measure of movement, represented by CRMDA.(6)CRMDA=Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT.Considering load rotary inertia of each motor, make CRMW movement weight of each axis.(7)CRMW=w1w2w3w4w5w6w7wee=502001005030111.In this paper, in terms of weight assignment principle, the larger the load rotary inertia is, the larger the weight is, and vice versa. After achieving optimization objective function, the rotary inertia becomes larger, the displacement becomes smaller, and vice versa. Besides, the smaller the value of the optimization objective function, the better the optimization performance to camera robot operation.Based on our knowledge, the bottom line motion almost dose not lead to vibration of end-effector of camera robot. Therefore, the movement of bottom linear motion axis can be large. Conversely, the bottom annular rotating axis has a great impact on end-effector with movement as small as possible. Movement of the top linear motion should be smaller without requirement of a higher operational height. There can be more movement of end-effector, and load rotary inertia of each motor on end-effector is fairly small.On this basis, camera robot movement amplitude weighting as the optimization objective function is represented by CRMAW.(8)CRMAW=CRMW·CRMDA=w1w2w3w4w5w6w7wee·Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT=w1·Δr1+w2·Δθ2+w3·Δθ3+w4·Δr4+w5·Δθ5+w6·Δθ6+w7·Δθ7+wee·Δθee.The larger the value of CRMAW, the larger the movement amplitude weighting and the greater the maximum value of acceleration in the motion process, and vice versa. In addition, the solutions minimizing value of CRMAW are extracted from the infinite number of inverse solutions in an ideal situation.For invalid inverse solutionr1r4, the movement amplitude weighting is set as a very large value, that is, nCRMAWF=600000.Fitness function to be optimized is called objective function in the classical optimization algorithm. In this paper, the minimum value of objective function is found through using the setting of GA toolbox in MATLAB, and the movement amplitude weighting is taken as optimization objective function, which is included in fitness functionHijGAFcn,(9)FitnessFunction=HijGAFcn.In function structure,[nFitFcn]=HijGAFcnr, function variable r=r1r4. In order to develop a more profound understanding of the optimization space, the image of fitness functionHijGAFcn under the target position paT is drawn, as presented in Figure 4.Figure 4
The graph of fitness function.Figure4 shows that the minimum value of fitness function exists in a space consisting of r1∈1000,2000 and r4∈0,500, which is related to the weight setting of optimization objective function.A set of randomr1r4 as a 2-dimensional individual is introduced to the genetic algorithm, Individual=FUTS=r1r4. The 50-group target value of bottom linear motion axis and top linear motion axis are randomly selected, with 2 genes for each individual. As a result, there are 10 rows and 2 columns in population matrix with identical individuals in the population at the same time.The setting of zero position CRTP and target position paT are the same as basic genetic algorithm. Genetic algorithm parameters are set, and experiment is simulated in MATLAB. It turns out that computing time with this algorithm is about 112.775544 s, and the minimum value of fitness function is 390739. Average and minimum values of fitness function change with the genetic algebra, as shown in Figure5.Figure 5
Average and minimum values of fitness function change with the genetic algebra on implicit genetic algorithm.In this simulation experiment, although the minimum value of fitness function is consistent with the mean value of population after 8 generation, it fails to converge all the time. At this time, the individual corresponding value of fitness function can be obtained as(10)r1r4=7296.7505.9.The solution set of effective inverse solution for camera robot is(11)CRTP=7296.72.71459-0.04783505.9-2.3732300.85027-0.42700.Robot reaches the target position, as shown in Figure6. The green dashed line is initial position, and the blue line is target point position.Figure 6
The target position on implicit genetic algorithm.Contrasting with the graph of fitness function, it shows thatr1∈7000,8000 is local optimization after optimizing, and the optimization effect is not ideal. It is due to the fact that the range of bottom and top linear motion is larger, and the possibility of obtaining effective solution from random values in 2 redundant DOF is quite low.


## 2.1. Establishing Mathematical Mode

In this paper, the camera robot is an 8 DOF PRRPR-S robot. Compared with the traditional industrial robot, upper arms can be extended, and the robot body can be moved in a linear orbit, which can be found in Figure1.Figure 1
Camera robot physical prototype.The kinematic model of this camera robot is established based on an assumption that robot is a rigid body. DH model is adopted for the first 7 joints of the robot [21–24], and the last one employs 6-parameter model. Finally, connecting rod coordinate system is created, as presented in Figure 2.Figure 2
Connecting rod coordinate system.There are 8 movement axes. As shown in Figure2,  r1 is the displacement of bottom linear motion, θ2 is the rotation angle of bottom annular rotator, θ3 is the rotation angle of top pitch rotator, r4 is the displacement of top linear motion, θ5 is the rotation angle of top distal pitch rotator, θ6 is the rotation angle of end-effector posture rotator, θ7 is the rotation angle of end-effector pitch rotator, θee is the rotation angle of end-effector roll rotator, and the major structure of camera robot is the annular structure.According to the position and orientation analysis of robot, the transformation matrix is obtained as(1)A0=0010100001000001A1=100000100-10r1+r100001A2=cos⁡θ2-π20-sin⁡θ2-π20sin⁡θ2-π20cos⁡θ2-π200-10r20001A3=cos⁡θ3-π20-sin⁡θ3-π2l3·cos⁡θ3-π2sin⁡θ3-π20cos⁡θ3-π2l3·sin⁡θ3-π20-1000001A4=100000-10010r4+r400001A5=cos⁡θ5+π20-sin⁡θ5+π20sin⁡θ5+π20cos⁡θ5+π200-1000001A6=cos⁡θ60sin⁡θ60sin⁡θ60-cos⁡θ60010r60001A7=cos⁡θ7-π20-sin⁡θ7-π20sin⁡θ7-π20cos⁡θ7-π200-1000001Aee=cos⁡θeesin⁡θee00-sin⁡θeecos⁡θee0000100001.Then the forward kinematic matrices of the robot are(2)Tee=A0·A1·A2·A3·A4·A5·A6·A7·Aee.


## 2.2. Inverse Kinematic Basic Genetic Algorithm in the Joint Space

Inverse kinematic basic genetic algorithm for the camera robot is currently an explicit expression of end-effector position according to the robot transformation matrix, and the key to solve inverse kinematic solutions is on the basis of the forward kinematic equation with genetic algorithm.Make CRCP camera robot current position zero point; paT is homogeneous matrix of target position.(3)CRCP=00000000TpaT=1005000010150000115000001.In terms of this algorithm, the basic genetic algorithm parameters are set in the joint space, and an experiment is simulated by MATLAB. It turns out that computing time with this algorithm is about 2094.838654 s, and the minimum value of fitness function is 62858.09908986.The solution set of effective inverse solution for camera robot is(4)CRTP=6851.622.72550.0195132.3-2.6053-1.0593.4355-0.5001.Robot reaches the target position, as shown in Figure3.Figure 3
The target position on basic genetic algorithm.According to the experiment results, camera robot does not reach the target position, and computing time of this algorithm takes about half an hour, which is beyond endurance in practice. That is principally due to a large number of camera robot joints, large movement of each axis especially linear motion at the top and the bottom, uncertain optimization objective function of algorithm, and complex camera robot mechanism, as well as many transformational matrices.Therefore, the inverse kinematic solutions based on basic implicit genetic algorithm with constrained 2 redundant DOF are herein proposed to replace explicit expression of fitness function on individual genes.


## 2.3. Inverse Kinematic Solutions Based on Implicit Genetic Algorithm with Physical Constrained 2 Redundant DOF

The inverse kinematic solutions of camera robot are obtained by genetic algorithm, which takes an arbitrary set of 2-dimensional vector of 2 redundant DOF as an individual in physical constraint. Effective inverse solutions which are obtained with least relative weight of each joint angle variation are extracted in infinite inverse solutions through limiting optimization objective function. This indicates that, in the same movement time, there is small variation with large load inertia and large variation with small load inertia.Make CRCP camera robot current position, CRTP camera robot target position, and CRMD movement displacement of each axis.(5)CRCP=r1Cθ2Cθ3Cr4Cθ5Cθ6Cθ7CθeeCTCRTP=r1Tθ2Tθ3Tr4Tθ5Tθ6Tθ7TθeeTTCRMD=CRTP-CRCP=Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT=r1T-r1Cθ2T-θ2Cθ3T-θ3Cr4T-r4Cθ5T-θ5Cθ6T-θ6Cθ7T-θ7CθeeT-θeeCT.Absolute movement displacement of each axis is considered to be a measure of movement, represented by CRMDA.(6)CRMDA=Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT.Considering load rotary inertia of each motor, make CRMW movement weight of each axis.(7)CRMW=w1w2w3w4w5w6w7wee=502001005030111.In this paper, in terms of weight assignment principle, the larger the load rotary inertia is, the larger the weight is, and vice versa. After achieving optimization objective function, the rotary inertia becomes larger, the displacement becomes smaller, and vice versa. Besides, the smaller the value of the optimization objective function, the better the optimization performance to camera robot operation.Based on our knowledge, the bottom line motion almost dose not lead to vibration of end-effector of camera robot. Therefore, the movement of bottom linear motion axis can be large. Conversely, the bottom annular rotating axis has a great impact on end-effector with movement as small as possible. Movement of the top linear motion should be smaller without requirement of a higher operational height. There can be more movement of end-effector, and load rotary inertia of each motor on end-effector is fairly small.On this basis, camera robot movement amplitude weighting as the optimization objective function is represented by CRMAW.(8)CRMAW=CRMW·CRMDA=w1w2w3w4w5w6w7wee·Δr1Δθ2Δθ3Δr4Δθ5Δθ6Δθ7ΔθeeT=w1·Δr1+w2·Δθ2+w3·Δθ3+w4·Δr4+w5·Δθ5+w6·Δθ6+w7·Δθ7+wee·Δθee.The larger the value of CRMAW, the larger the movement amplitude weighting and the greater the maximum value of acceleration in the motion process, and vice versa. In addition, the solutions minimizing value of CRMAW are extracted from the infinite number of inverse solutions in an ideal situation.For invalid inverse solutionr1r4, the movement amplitude weighting is set as a very large value, that is, nCRMAWF=600000.Fitness function to be optimized is called objective function in the classical optimization algorithm. In this paper, the minimum value of objective function is found through using the setting of GA toolbox in MATLAB, and the movement amplitude weighting is taken as optimization objective function, which is included in fitness functionHijGAFcn,(9)FitnessFunction=HijGAFcn.In function structure,[nFitFcn]=HijGAFcnr, function variable r=r1r4. In order to develop a more profound understanding of the optimization space, the image of fitness functionHijGAFcn under the target position paT is drawn, as presented in Figure 4.Figure 4
The graph of fitness function.Figure4 shows that the minimum value of fitness function exists in a space consisting of r1∈1000,2000 and r4∈0,500, which is related to the weight setting of optimization objective function.A set of randomr1r4 as a 2-dimensional individual is introduced to the genetic algorithm, Individual=FUTS=r1r4. The 50-group target value of bottom linear motion axis and top linear motion axis are randomly selected, with 2 genes for each individual. As a result, there are 10 rows and 2 columns in population matrix with identical individuals in the population at the same time.The setting of zero position CRTP and target position paT are the same as basic genetic algorithm. Genetic algorithm parameters are set, and experiment is simulated in MATLAB. It turns out that computing time with this algorithm is about 112.775544 s, and the minimum value of fitness function is 390739. Average and minimum values of fitness function change with the genetic algebra, as shown in Figure5.Figure 5
Average and minimum values of fitness function change with the genetic algebra on implicit genetic algorithm.In this simulation experiment, although the minimum value of fitness function is consistent with the mean value of population after 8 generation, it fails to converge all the time. At this time, the individual corresponding value of fitness function can be obtained as(10)r1r4=7296.7505.9.The solution set of effective inverse solution for camera robot is(11)CRTP=7296.72.71459-0.04783505.9-2.3732300.85027-0.42700.Robot reaches the target position, as shown in Figure6. The green dashed line is initial position, and the blue line is target point position.Figure 6
The target position on implicit genetic algorithm.Contrasting with the graph of fitness function, it shows thatr1∈7000,8000 is local optimization after optimizing, and the optimization effect is not ideal. It is due to the fact that the range of bottom and top linear motion is larger, and the possibility of obtaining effective solution from random values in 2 redundant DOF is quite low.


## 3. The Improved Genetic Algorithm

### 3.1. Improved Genetic Algorithm Based on Theoretical Constraints onr1 and Physical Constraints on r4

The implicit genetic algorithm with physical constrained 2 redundant DOF is improved through analyzing range of motion for dual redundant camera robot. Known target position, the movement range of bottom linear motionr1, and top linear motion r4 are prejudged with mechanism characteristics of camera robot, which refers to limiting the range of genetic variables of genetic algorithm to improve the computational efficiency of genetic algorithm. The improved genetic algorithm flow chart is presented in Figure 7.Figure 7
Improved genetic algorithm flow chart.In Figure6, paT represents a target point; vR1TS is the range of r1 with theoretical constraints. vR4PS is the range of r4 with physical constraints, andR1TSFcn is obtained from the analysis of camera robot workspace and motion range. vR1TS can be deduced out fromR1TSFcn through processing paT, which only considers the physical constraint on r4. Given paT, r1, and r4, the inverse kinematic of camera robot is operated byHijGAFcn, the inverse kinematic solutions are substituted into CRMAW, and CRMAW corresponding optimum solution r1r4 is treated as the current fitness function ngFitFcn.Prior to solving inverse kinematics of the camera robot, ifr1 subinterval existing minimum fitness function value is determined at first, the computation time can be reduced by half. The intersection point of top pitch axis of camera robot ring body and plane perpendicular to the bottom line is defined as S, namely, shoulder point. The X coordinates Sx is specified as decision point of robot main body, and the pT coordinate pTx is identified as decision point of target point. In addition, according to analysis of robot motion range, the target point in robot workspace is arbitrarily given, and the motion range of bottom linear motion can be obtained as(12)r1∈r1a,r1b∪r1c,r1d.WhenSx≤pTx, r1 is limited to r1a,r1b, and when Sx>pTx, r1 is limited to r1c,r1d.The setting of initial position, target position, and parameters of genetic algorithm are the same as before. Based on the simulation results, the computing time is about 109.602341 s with this improved genetic algorithm, and the minimum value of fitness function is 390739. Average and minimum values of fitness function change with the genetic algebra, as shown in Figure8.Figure 8
Average and minimum values of fitness function change with the genetic algebra by limiting genetic variables.After improvement, the minimum values of fitness function is 70361.4, and the individual corresponding value of fitness function is(13)r1r4=1403.060.42.Effective inverse solution for the camera robot is(14)CRTP=1403.060.5238-0.018920.42-2.5702401.0184-2.6178.Pose of the camera robot when target position is reached is shown in Figure9.Figure 9
The target position by limiting genetic variables.Although efficiency of implicit genetic algorithm has been improved, the genetic algorithm has a slow convergence rate at each time. Besides, a rather large gap exists between the minimum value and average value of fitness function, and the minimum value of fitness function is also different, even the failure of optimization algorithm. It is due to fact that the selection of population individual is still random, and the optimal individual still can not be obtained as expected, even though expanding population size and increasing the truncated generation.


### 3.2. Setting the Initial Population and Using Pattern Search Algorithm

In order to further improve algorithm, ther1 is averagely selected in its theoretical intervals, the value range of r4 is determined according to each r1 value, and the intermediate value of interval is selected as the value of r4. Setting on the basis of this initial population, the individual is evenly distributed in theoretical range. In addition, it can solve the problem that the excellent gene r4 is lost due to matching with inappropriate gene r1. However, the more accurate local optimization ability for complex fitness function is poor, and population size and truncated generation are limited by the computing time. According to Figure 3, value distribution of fitness function boasts certain regularity, and the minimum function value is few in number. As a result, after identifying the global optimal solutions, the pattern search method is used to address the precise optimal solutions [25].The setting of initial position, target position, and parameters of genetic algorithm is the same as before. 20 values are selected in effective theoretical intervals ofr1, the value range of r4 is determined according to each r1 value, and the intermediate value of r4 interval and r1 forms an individual. The initial population individual constitutes an initial population matrix gInitPop, the reference value ofHybridFcn is set aspatternsearch, and then simulation experiment is conducted for 10 times.After the experiment, computing time is on average about 203.6 s at a time, and the minimum values of fitness function in 10 experiments are shown in Figure10.Figure 10
The minimum values of fitness function in 10 experiments.The minimum value of fitness function is about 70283 in 10 experiments, and the optimal individual difference is very small, which is nearly(15)r1r4=1401.923790.000001.Corresponding inverse solution for the camera robot is(16)CRTP=1401.90.52360-0.019310.000001-2.5679601.01647-2.617994.The camera robot position when reaching target position is shown in Figure11.Figure 11
The target position on improved genetic algorithm.According to experimental results, it can be found that each time the results are basically consistent, which is close to the global minimum of fitness function. In accordance with the 10 key points, total running time is about 0.5 hours, and the running time is considered as acceptable.


### 3.3. Comparison

In the same setting of initial position, target position, and parameters of genetic algorithm, the final improved algorithm in comparison with initial algorithm implicit genetic algorithm with physical constrained 2 dual redundant DOF, and the motion range of each axis is shown in Table1.Table 1
Comparison of genetic algorithm (GA).
Parameter
Initial position
Basic GA
Implicit GA
Improved GA
r
1
0
6851.62
7296.7
1401.9
θ
2
0
2.7255
2.71459
0.52360
θ
3
0
0.0195
−0.04783
−0.01931
r
4
0
132.30
505.9
0.000001
θ
5
0
−2.6053
−2.37323
−2.56794
θ
6
0
−1.0590
0
0
θ
7
0
3.4355
0.850267
1.01647
θ
e
e
0
−1.5001
−0.42700
−2.61799The comparison between motion range and movement weight of each axis demonstrates that the movement of bottom linear motion, the rotation angle of bottom annular rotator, and the rotation angle of top pitch rotator are reduced significantly. It indicates that translation and rotation of main structure are very small, and the top distal pitch axis has more movement in comparison with top pitch axis, when camera robot reaches the target point. End-effector with 3 axes and small load inertia has more movement than the unimproved one. This comparison achieves the desired optimization results, and the movement of axis with smaller load inertia is larger. On the contrary, the movement of axis with larger load inertia is smaller. Besides, the top linear movement is about 0, which accords with the idea that the movement of top linear motion is reduced as much as possible in the case of operational height.


## 3.1. Improved Genetic Algorithm Based on Theoretical Constraints onr1 and Physical Constraints on r4

The implicit genetic algorithm with physical constrained 2 redundant DOF is improved through analyzing range of motion for dual redundant camera robot. Known target position, the movement range of bottom linear motionr1, and top linear motion r4 are prejudged with mechanism characteristics of camera robot, which refers to limiting the range of genetic variables of genetic algorithm to improve the computational efficiency of genetic algorithm. The improved genetic algorithm flow chart is presented in Figure 7.Figure 7
Improved genetic algorithm flow chart.In Figure6, paT represents a target point; vR1TS is the range of r1 with theoretical constraints. vR4PS is the range of r4 with physical constraints, andR1TSFcn is obtained from the analysis of camera robot workspace and motion range. vR1TS can be deduced out fromR1TSFcn through processing paT, which only considers the physical constraint on r4. Given paT, r1, and r4, the inverse kinematic of camera robot is operated byHijGAFcn, the inverse kinematic solutions are substituted into CRMAW, and CRMAW corresponding optimum solution r1r4 is treated as the current fitness function ngFitFcn.Prior to solving inverse kinematics of the camera robot, ifr1 subinterval existing minimum fitness function value is determined at first, the computation time can be reduced by half. The intersection point of top pitch axis of camera robot ring body and plane perpendicular to the bottom line is defined as S, namely, shoulder point. The X coordinates Sx is specified as decision point of robot main body, and the pT coordinate pTx is identified as decision point of target point. In addition, according to analysis of robot motion range, the target point in robot workspace is arbitrarily given, and the motion range of bottom linear motion can be obtained as(12)r1∈r1a,r1b∪r1c,r1d.WhenSx≤pTx, r1 is limited to r1a,r1b, and when Sx>pTx, r1 is limited to r1c,r1d.The setting of initial position, target position, and parameters of genetic algorithm are the same as before. Based on the simulation results, the computing time is about 109.602341 s with this improved genetic algorithm, and the minimum value of fitness function is 390739. Average and minimum values of fitness function change with the genetic algebra, as shown in Figure8.Figure 8
Average and minimum values of fitness function change with the genetic algebra by limiting genetic variables.After improvement, the minimum values of fitness function is 70361.4, and the individual corresponding value of fitness function is(13)r1r4=1403.060.42.Effective inverse solution for the camera robot is(14)CRTP=1403.060.5238-0.018920.42-2.5702401.0184-2.6178.Pose of the camera robot when target position is reached is shown in Figure9.Figure 9
The target position by limiting genetic variables.Although efficiency of implicit genetic algorithm has been improved, the genetic algorithm has a slow convergence rate at each time. Besides, a rather large gap exists between the minimum value and average value of fitness function, and the minimum value of fitness function is also different, even the failure of optimization algorithm. It is due to fact that the selection of population individual is still random, and the optimal individual still can not be obtained as expected, even though expanding population size and increasing the truncated generation.


## 3.2. Setting the Initial Population and Using Pattern Search Algorithm

In order to further improve algorithm, ther1 is averagely selected in its theoretical intervals, the value range of r4 is determined according to each r1 value, and the intermediate value of interval is selected as the value of r4. Setting on the basis of this initial population, the individual is evenly distributed in theoretical range. In addition, it can solve the problem that the excellent gene r4 is lost due to matching with inappropriate gene r1. However, the more accurate local optimization ability for complex fitness function is poor, and population size and truncated generation are limited by the computing time. According to Figure 3, value distribution of fitness function boasts certain regularity, and the minimum function value is few in number. As a result, after identifying the global optimal solutions, the pattern search method is used to address the precise optimal solutions [25].The setting of initial position, target position, and parameters of genetic algorithm is the same as before. 20 values are selected in effective theoretical intervals ofr1, the value range of r4 is determined according to each r1 value, and the intermediate value of r4 interval and r1 forms an individual. The initial population individual constitutes an initial population matrix gInitPop, the reference value ofHybridFcn is set aspatternsearch, and then simulation experiment is conducted for 10 times.After the experiment, computing time is on average about 203.6 s at a time, and the minimum values of fitness function in 10 experiments are shown in Figure10.Figure 10
The minimum values of fitness function in 10 experiments.The minimum value of fitness function is about 70283 in 10 experiments, and the optimal individual difference is very small, which is nearly(15)r1r4=1401.923790.000001.Corresponding inverse solution for the camera robot is(16)CRTP=1401.90.52360-0.019310.000001-2.5679601.01647-2.617994.The camera robot position when reaching target position is shown in Figure11.Figure 11
The target position on improved genetic algorithm.According to experimental results, it can be found that each time the results are basically consistent, which is close to the global minimum of fitness function. In accordance with the 10 key points, total running time is about 0.5 hours, and the running time is considered as acceptable.


## 3.3. Comparison

In the same setting of initial position, target position, and parameters of genetic algorithm, the final improved algorithm in comparison with initial algorithm implicit genetic algorithm with physical constrained 2 dual redundant DOF, and the motion range of each axis is shown in Table1.Table 1
Comparison of genetic algorithm (GA).
Parameter
Initial position
Basic GA
Implicit GA
Improved GA
r
1
0
6851.62
7296.7
1401.9
θ
2
0
2.7255
2.71459
0.52360
θ
3
0
0.0195
−0.04783
−0.01931
r
4
0
132.30
505.9
0.000001
θ
5
0
−2.6053
−2.37323
−2.56794
θ
6
0
−1.0590
0
0
θ
7
0
3.4355
0.850267
1.01647
θ
e
e
0
−1.5001
−0.42700
−2.61799The comparison between motion range and movement weight of each axis demonstrates that the movement of bottom linear motion, the rotation angle of bottom annular rotator, and the rotation angle of top pitch rotator are reduced significantly. It indicates that translation and rotation of main structure are very small, and the top distal pitch axis has more movement in comparison with top pitch axis, when camera robot reaches the target point. End-effector with 3 axes and small load inertia has more movement than the unimproved one. This comparison achieves the desired optimization results, and the movement of axis with smaller load inertia is larger. On the contrary, the movement of axis with larger load inertia is smaller. Besides, the top linear movement is about 0, which accords with the idea that the movement of top linear motion is reduced as much as possible in the case of operational height.


## 4. Experimental Validation

Considered as Coordinate Measuring Machine, Metronor is used to measure the space position of target point. Besides, the results of optimal solution obtained by final improved algorithm are verified on the physical prototype.The initial position of camera robot is(17)CRCP=00000000.Pose matrix of end-effector coordinate system relatively to inverse solutions world coordinate system is(18)paZ=00135000-100100-3300001.The matrix of target position is(19)paT=1005000010150000115000001.Pose homogeneous matrix of target point coordinate system based on end-effector coordinate system is(20)paTZ=paZ-1·paT=00118300-10-150010015000001.Optimum solution obtained by improved algorithm is(21)CRTP=1401.90.52360-0.019310-2.5679601.01647-2.617994.According to kinematic model and reduction ratio of the robot physical prototype, the position input command vector of host computer is obtained as(22)StU=1800168-2688607961320-113138620-3105818-395250.The end-effector coordinate system is set, as shown in Figure12.Figure 12
(a) Camera robot with end-effector. (b) Measuring surface of coordinate frame.
(a)
(b)The end-effector coordinate system is represented by 3 space points, coordinate originO, point X in the x-axis, and point Z in the z-axis, respectively. In addition, Metronor system is employed to determine the coordinates of this 3 target space points, digital camera placement, and shooting angle, as shown in Figure 13.Figure 13
(a) Digital camera placement. (b) digital camera shooting angle.
(a)
(b)Measurements of 3 points in the end coordinate system are shown in Table2Table 2
Measurements of 3 points in the end coordinate system.
Parameter
Zero position
Target position
O
Z
1281
.
147
-
1217.745
-
7351.774
-
686.575
762.754
-
6850.280
X
Z
1278.963
-
1170.012
-
7361.370
-
731.258
756.734
-
6868.342
Z
Z
1248.746
-
1219.657
-
7362.201
-
688.626
795.572
-
6854.896Among them, coordinates of all point are relative to the world coordinate system of Metronor. The coordinate system of end-effector adopts right-hand rule.Y direction vector is obtained by the cross product of 2 unit vector in X and Z direction, as shown in Table 3.Table 3
Direction vector in the end coordinate system.
Parameter
Vector
Unit vector
O
Z
X
Z
-
2.184
47.733
-
9.596
-
0.0448
0.9794
-
0.1969
O
Z
Y
Z
—
0.3106
-
0.1734
-
0.9333
O
Z
Z
Z
-
32.401
-
1.912
-
10.427
-
0.9504
-
0.0561
-
0.3059
O
T
X
T
-
44.683
-
6.02
-
18.062
-
0.92
-
0.1239
-
0.3719
O
T
Y
T
—
-
0.3848
0.1049
0.9170
O
T
Z
T
-
2.051
32.818
-
4.616
-
0.0618
0.9884
-
0.139The zero position of the end-effector coordinate system which is relative to the world coordinate system of Metronor is obtained based on Table3. The homogeneous matrix of the zero position is(23)paZM=-0.04480.3106-0.95041281.1470.9794-0.1734-0.0561-1217.745-0.1969-0.9333-0.3059-7351.7740001.And the homogeneous matrix of the target position is(24)paTM=-0.92-0.3848-0.0618-686.575-0.12390.10490.9884762.754-0.37190.917-0.139-6850.2800001.Thus, when the paZ is a reference coordinate system, the homogeneous matrix of paT relative to paZ is(25)paTZ=paZM-1·paTM=-0.055-0.0650.9981856.5400.083-0.996-0.061-1426.1660.9980.082-0.0021516.8160001.Compared with (20), it can be seen that the measurement is almost consistent with theoretical position. The target pose error between actual measurement and theoretical simulation is primarily attributed to the parameter error of robot links and the artificial error of three coordinate measuring systems.


## 5. Conclusions

The present study aims to reduce the difficulty and time used for the inverse kinematic algorithm and the complex camera robot. It is hard to obtain effective inverse kinematic solutions due to the large size of sample space, poor convergence of GA, and running over time. Therefore, a new algorithm is proposed and improved. Although the optimal solution can be obtained based on a new algorithm, stability of the algorithm is relatively poor even with expanding population size and increasing truncated generation. In addition, the inverse kinematic solutions are obtained through analyzing the range of motion for dual redundant camera robot. The improved algorithm achieved by setting the initial population and using pattern search algorithm can converge to a global optimum, which meets the requirements of practical application.Finally, the zero position of physical prototype is calibrated through using coordinate measuring machine, and the camera robot is driven to specified target position based on optimal inverse solutions. The actual measurement position of end-effector is basically consistent with the theoretical results, and the goal of alleviating operation difficulty and reducing operation time of camera robot is consequently reached.



---

*Source: 7486178-2017-09-26.xml*