time optimal ctrl