Nonlinear iterative learning control through dynamic optimization door