Intelligent optimal non-linear control