Inverse Differential Riccati Equation to Optimized Human-Robot Collaboration