Optimal control of robotic manipulator for laser cutting applications