# Multitask-Based Trajectory Planning for Redundant Space Robotics Using Improved Genetic Algorithm
## 4 Numerical Simulations
### Comparisons  
Comparisons between IGA and two other algorithms, AL1 and AL2, were developed. In the IGA, the second part of each chromosome is encoded with the binary mechanism. In AL1, the integer mechanism is employed to encode the second part. This comparison refers to [22]. In both the IGA and AL1, the variation trend of each joint between adjacent waypoints is depicted with a sine function, whose argument is a cubic polynomial. The angular velocity of each joint, shown in Equation (10), varies during the maneuver of the space robot. Therefore, the third part of each chromosome is variable. However, joint angular velocities are defined as a constant in [20; 21; 22; 23; 24; 41], leading to joint trajectories being depicted with the linear functions, and the third part of each chromosome being depicted with a constant. In AL2, joint angular velocity is defined as 0.8 rad/s (45.8 deg/s) [41]. Based on the IGA, AL1, and AL2, the MTTP for space robotics is solved successively. Two cases of space robotics are considered, where the MTTPs for FFSR1 and for FFSR2 are solved in Case 1 and in Case 2, respectively. To further validate the developed approach, different numbers of waypoints, 5, 7, 10, 15, 20, and 30, are considered in each case. With the same number of waypoints, each algorithm is carried out for 25 times. Tables 2-4 shows the average execution time (AET), the worst fitness (WF), the best fitness (BF) and the average fitness (AF) of 25 executions. The AET using AL2 is less than that using IGA or AL2. However, the optimization results using AL2 is much worse than results using IGA or AL1. Figure 11 represents the AF values. It should be noted that the optimal fitness value denotes the minimum value of \(F_{1}\) in Figure 11a and denotes the minimum value of \(F_{1}+\alpha F_{2}\) in Figure 11b. First, the fitness values of AL2 are much larger than those of IGA and AL1, meaning that the joint movements with constant joint angular velocity do not work well. Second, the fitness values of AL1 grow larger than those of IGA as waypoints increase. It can also be seen that the difference between fitness values of IGA and AL1 in each case is not large. To further analyze the results using IGA and AL1, fitness values of IGA and AL1 plotted in Figure 11 are once again shown in Figure 12. In Case 1, the difference generated by IGA and AL1 is smaller than 1 when the number of waypoints is less than 10. The difference gradually becomes large as waypoints increase, and the difference is about 5 when the number of waypoints is 30. In Case 2, the difference is 0.9 when the number of waypoints is 5, and the difference is 3 when the number is 7. However, difference grows faster as waypoints increase, compared with the case of MTTP for FFSR1. It can be seen in Figure 12b that the difference is 8 when the number of waypoints is 30. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Body**} & **Mass** & **Length** & **Principle Moment of Inertial (kg \(\cdot\)m\({}^{2}\))** \\ \cline{2-5}  & **(kg)** & **(m)** & \(\mathbf{I_{xx}}\) & \(\mathbf{I_{yy}}\) & \(\mathbf{I_{zz}}\) \\ \hline
0 & 500 & 0.2 & 100 & 100 & 200 \\
1 & 20 & 0.1 & 4 & 4 & 5 \\
2 & 10 & 0.3 & 2 & 2 & 3 \\
3 & 50 & 0.4 & 10 & 10 & 20 \\
4 & 20 & 0.5 & 4 & 4 & 5 \\
5 & 50 & 0.3 & 10 & 10 & 20 \\
6 & 10 & 0.2 & 2 & 2 & 3 \\
7 & 20 & 0.1 & 4 & 4 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Physical parameters of the space robotic system. According to the above analysis, the proposed approach is validated. It can be seen that depicting each joint angular trajectory with piecewise- and continuous-sine functions makes the joint angular velocity variable and contributes to a better solution. Generally, it is almost impossible for any optimization algorithm to find the best solution. However, compared with the integer mechanism of the second part in each chromosome, the binary encoding mechanism contributes to a preferable second-best solution.