finite-horizon non-linear controller using Sequential Dynamic Programming