An optimal open-loop strategy for handling a flexible beam with a robot manipulator