# Finite-Horizon Kinetic Energy Optimization of a Redundant Space Manipulator
## 3 Results and Discussion
### Simulation Results  
Table 5 compares the kinetic energy integral for all the considered methods and trajectories, both in absolute and relative terms. The PMKE method presented in this paper is used as a reference and highlighted in grey. PMKE computational times have also been included, as measured on a machine featuring an Intel i7 ninth generation exa-core processor with 32 GB RAM, SSD mass storage, and using Windows 10 and Matlab version 2019b. It can be noticed that the LSV method is outperformed by the PMKE one for all the trajectories: non-singular trajectories feature relative differences ranging from 30.1% to 47.4%, while the trajectory that is singular using the LSV method (trajectory 3) is not singular using the PMKE method, resulting in a very high improvement of kinetic energy integral (relative difference of 187.36%). The absolute value of the difference between PMKE solutions and global optimal solutions, on the other hand, is very small (0.13%) for short trajectories and grows with the length of the trajectory (up to 23.6%). This can be explained by observing that, the longer the distance covered by the end-effector, the higher the chance of an energy consuming motion taking place beyond the PMKE prediction window. Kinetic energy integral profiles are shown in detail in Figure 3.  
It has also to be noticed that the execution times of the PMKE method (see Table 5) allow for a real-time kinematic inversion, as it is discussed below. The core of the PMKE  
Figure 3: Kinetic energy integral plots for the four considered trajectories. PMKE: dashed black lines; LSV: continuous black lines; global optimal method: red lines. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Simulation nr.** & **PMKE Result [Js]** & **LSV Result [Js]** & **Global Result** & **PMKE Computational** \\ \hline
1 & \(5.98\times 10^{-3}\) & \(8.81\times 10^{-3}\) & \(5.97\times 10^{-3}\) & 0.915 \\  & & (+47.4%) & (\(-0.13\%\)) & 0.934 \\
2 & \(4.08\times 10^{-3}\) & \(5.37\times 10^{-3}\) & \(3.87\times 10^{-3}\) & 0.934 \\  & & (+31.7\%) & (\(-5.03\%\)) & 0.961 \\
3 & \(7.57\times 10^{-3}\) & \(2.17\times 10^{-2}\) & \(6.09\times 10^{-3}\) & 0.961 \\  & & (+187\%) & (\(-19.5\%\)) & 0.961 \\
4 & \(3.97\times 10^{-2}\) & \(5.17\times 10^{-2}\) & \(3.03\times 10^{-2}\) & 0.914 \\  & & (+30.1\%) & (\(-23.6\%\)) & 0.914 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Simulation results. method performs two operations: the optimization (steps 4-5 of the method as described in Section 2.1), and the generation of the coefficients of the 4 th order splines used for interpolation (step 6). A hybrid C-Matlab implementation has been deployed to perform these operations. As a result, the optimization of steps 4-5 is performed in C in an average time of \(\sim\)0.0011 s, while the computation of the spline coefficients of step 6 is performed in Matlab in an average time of \(\sim\)0.0010 s. The overall average computational time for the two operations is \(\sim\)0.0021 s, which is compatible with real-time implementation, since the considered time step \(\Delta t\) is equal to 0.01 s. Even faster computation can be obtained by implementing both of these operations in C/C++ and optimizing the code. In order to make a more detailed comparison of the results obtained with the PMKE and LSV methods, Figures 4-7 show (top to bottom) the stroboscopic views of the robot motion, joint positions, and joint velocities for both the PMKE (left) and LSV (right) methods. In each stroboscopic plot, the joint 1 (which allows the rotation between link 1 and the base frame) is in the origin and, in the joint positions and velocities plots, joint 1 is shown in blue, joint 2 in red, and joint 3 in yellow. PMKE results for trajectories 1 and 2 feature a behavior that has been previously noticed when using kinetic energy saving algorithms [5; 13]: the joints that are closer to the end-effector feature higher velocities compared to those closer to the base of the manipulator.