Numerical optimal control of a wind turbine system