A method of obtaining improved feedforward data for a feedforward control system to move a component through a setpoint profile, said setpoint profile comprising a plurality of target states of said component each to be substantially attained at one of a corresponding sequence of target times, said method comprising:
- a) moving said component with the feedforward control system according to the setpoint profile using a first set of feedforward data;
- b) measuring a state of said component at a plurality of times during said moving;
- c) comparing the measured states with corresponding target states defined by said setpoint profile to obtain a set of errors;
- d) comparing the set of errors to a threshold and determining if the set of errors or a subset of the set of errors are above the threshold;
- e) filtering said set of errors with a dead zone non-linear filter if the set of errors or the subset of the set of errors are above the threshold;
- f) generating improved feedforward data based on the filtered errors, said improved feedforward data being usable by said feedforward control system during a subsequent moving of said component more accurately through the setpoint profile;
- g) repeating steps (a) to (f) iteratively, using the most recently obtained improved feedforward data instead of the first set of feedforward data, until it is determined that the set of errors or the subset of the set of errors obtained in step (c) are below the threshold.