Abstract Convergence is an important issue in the design and application of iterative learning control (ILC) to batch processes. This paper presents a design of a robust iterative learning controller. Sufficient and necessary condition to ensure BIBO (bounded-input–bounded-output) stability is derived for the optimal ILC when tracking arbitrary bounded output reference. A practical scheme of the weighting matrices selection is also proposed for the process with uncertain initial resetting and disturbances, to ensure system performance improvement from batch to batch. Finally, an application to the injection molding control is given to demonstrate the effectiveness of the proposed algorithm.