1. A method for determining a feedforward transfer function of a control system in a lithographic apparatus, the method comprising: a) iteratively learning a feedforward output signal of the control system using an iterative learning control for a given setpoint signal; b) determining a relation between the learned feedforward output signal and the setpoint signal; and c) applying the relation as the feedforward transfer function of the control system.