Optimal Robot Speed Trajectory by Minimization of the Actuator Motor Electromechanical Losses