# Multitask-Based Trajectory Planning for Redundant Space Robotics Using Improved Genetic Algorithm
## 2 Preliminaries and Notation
### Minimum Base Attitude Disturbance
#### 2.2.3 Formulation of Joint Trajectories among Waypoints  
During the maneuver of the space robot when the end effector successively visits the waypoints, the joint trajectories are depicted with the piecewise-sine functions expressed in Equation (9). It can be seen that the sine function has the superiority of considering the physical limits on joint angles, and making the joint movements more practical.  
\[q_{j}^{i}(t)=A\cdot\sin\left[a_{3j}^{i}(t-T_{j-1})^{3}+a_{2j}^{i}(t-T_{j-1})^ {2}+a_{1j}^{i}(t-T_{j-1})+a_{0j}^{i}\right] \tag{9}\]  
Figure 2: Process for constructing the arm angle \(\psi\). (**a**) the 7-DOF robot SRS; (**b**) the arm angle \(\psi\) between the reference plane and the arm plane in SRS; (**c**) the arm angle \(\psi\) between the reference plane and the arm plane with vectors \(k\) and \(e\), and (**d**) the case when the arm angle \(\psi\) is set to 0.  
In Equation (9), \(i=1,...,n,j=1,...,N-1\), and \(T_{0}=0\). \(q_{j}^{i}(\cdot)\) denotes an angular trajectory of the \(i\)th joint, corresponding with a \(j\)th subpath along which the end effector moves from the \(j\)th waypoint to the (\(j+1\))th waypoint. \(A\) denotes the physical limit on each joint angle, which is defined as 180 deg. \(a_{mj}^{i}(m=0,1,2,3)\) denotes the coefficients of the argument, where all \(a_{3j}^{i}\) share the same absolute value. Based on Equation (9), joint angular velocities are given by:  
\[\begin{split} q_{j}^{i}(t)=& A\cdot\cos\left[a_{3j }^{i}(t-T_{j-1})^{3}+a_{2j}^{i}(t-T_{j-1})^{2}+a_{1j}^{i}(t-T_{j-1})+a_{0j}^{i} \right]\cdot\\ &\left[3a_{3j}^{i}(t-T_{j-1})^{2}+2a_{2j}^{i}(t-T_{j-1})+a_{1j}^{ i}\right]\end{split} \tag{10}\]  
Corresponding with the \(j\)th subpath of the end effector, the angle of the \(i\)th joint is denoted as \(q_{j0}^{i}\) at initial time \(t_{js}^{i}\) (\(t_{js}^{i}=T_{j-1}\)), and denoted as \(q_{jf}^{i}\) at final time \(t_{jf}^{i}\), shown in Equations (11) and (12). To ensure the continuity of the joint movements during the whole travel, the space robot has the same joint configuration at the final time of \(j\)th subpath and at the initial time of \((j+1)\)th subpath, shown in Equation (13).  
\[q_{j}^{i}(t_{js}^{i})=q_{j0}^{i} \tag{11}\]  
\[q_{j}^{i}(t_{jf}^{i})=q_{jf}^{i} \tag{12}\]  
\[q_{jf}^{i}=q_{(j+1)0}^{i} \tag{13}\]  
In Equation (13), \(q_{N0}^{i}=q_{(N-1)f}^{i}\). Moreover, joint angular velocities are limited to be zero at each waypoint, given by:  
\[\dot{q}_{j0}^{i}=\dot{q}_{jf}^{i}=0 \tag{14}\]  
Substituting Equations (11)-(14) into Equations (9)-(10), the values of \(a_{0j}^{i}\), \(a_{1j}^{i}\), \(a_{2j}^{i}\) and \(t_{jf}^{i}\) are derived as follows:  
\[a_{0j}^{i}=arcsin\left(\frac{q_{j0}^{i}}{A}\right) \tag{15}\]  
\[a_{1j}^{i}=0 \tag{16}\]  
\[a_{2j}^{i}=-\frac{3}{2}a_{3j}^{i}\left(t_{jf}^{i}-T_{j-1}\right) \tag{17}\]  
\[t_{jf}^{i}=\left\{\frac{2\left[a_{0j}^{i}-arcsin\left(\frac{q_{jf}^{i}}{A} \right)\right]}{a_{3j}^{i}}\right\}^{\frac{1}{3}}+T_{j-1} \tag{18}\]  
If the optimal value of \(a_{3j}^{i}(i=1,...,n;j=1,...,N-1)\) is derived, the joint trajectories corresponding with the \(j\)th subpath of the end effector and time period \(T_{j}\) are obtained. It should be noted that the case, \(a_{3j}^{i}=0\), is meaningless and not considered.