Inverse optimal controller for nonlinear systems with convex input constraints