Nonlinear iterative learning control through dynamic optimization by