Numerical solution of nonlinear optimal control problems based on state parametrization