# Energy Optimization of Functionally Redundant Robots through Motion Design
## 4 Trajectory Optimization and Results
### Test-Case 1
Since manipulability is a local measure, i.e., it is related to a single value of the robot configuration \(\mathbf{q}\), the measure is extended to a whole task by measuring its time integral along the duration of the task, leading to the following optimization problem:  
\[\min_{[\theta(t),\psi(t)]} \int\limits_{0}^{T}\frac{1}{m(\mathbf{q}(t))}dt\] (10) subject to: \[\theta(t)\in[-\pi/9,\pi/9]\ rad;\] \[\psi(t)\in[25/18\pi,29/19\pi]\ rad;\] \[t\in[0,T]\]  
We chose five different approaches, by adopting standard motion profiles to define \(\theta(t)\) and \(\psi(t)\). The actual motion of the robot axes is then defined by its inverse kinematics. The first approach, which is also the simplest one, aims at reducing the energy consumption by finding two constant values of the pitch and yaw angles, always within the allowable \(\pm 20\ deg\) domain. In this situation the tool orientation is constant along the whole trajectory, and the position of the end-effector follows the prescribed straight line. The constant values of pitch and yaw are found by solving the trajectory optimization problem of Equations (8) or (10). A different approach can be defined by assuming that the tool orientation can be continuously changed during the execution of the task, moving from an initial value to a final value, always allowing to vary both pitch and yaw. These four angle values, i.e., initial and final pitch angle, initial and final yaw angle, are therefore the unknown parameters, i.e., the optimization variables. The motion primitive assumed to define these motions leads to the other four strategies investigated in this work. In the second scenario the pitch and yaw motion are allowed to move at constant speed. The third, fourth and fifth optimization scenarios are defined by assuming three simple standard trajectories: a symmetric trapezoidal speed profile with with 150 ms ramp duration, a third-order polynomial profile, and a fifth order polynomial profile, respectively. The results of the computation of the five optimization scenarios are reported in Table 5. The results include also the manipulability index measured as in Equation (10), as well as a comparison with the non-optimized motion. As expected, all the optimization routines provide a meaningful energy saving. The least effective way to reduce the energy consumption is to choose constant value for the pitch and yaw: such a method, in the case under consideration, provides a rather modest saving, which falls just below 3%. Rather higher savings can be obtained when a motion of the end-effector pose is allowed: in such cases the estimated energy reduction varies between 15.97% and 18.60%, reaching therefore quite significant energy savings. The best option is, within this test-case selection, to adopt a trapezoidal speed profile, nevertheless other choices provide similar results. By looking at the manipulability too, as reported in Table 5, it can be seen that the non-optimized motion leads to the lowest, i.e., 'worst', manipulability measure. As suggested by this evidence, the effect of the maximization the manipulability on the effective energy consumption is analyzed by the results presented in \[\theta(t)\in[-\pi/9,\pi/9]\)\(rad\); \[\psi(t)\in[25/18\pi,29/19\pi]\)\(rad\]0 The data show that, regardless of the specific choice of the parametrization of the end-effector pose, the maximization of the manipulability is incapable of reducing the overall energy consumption associated with the task. This means that this simple and commonly used metric is not capable of capturing the complexity of the dynamics associated with the robot energy consumption which involves several other robot properties.