Energy-efficient design of multipoint trajectories for Cartesian robots