Compensate for friction as function of position