Compensation of position for slip of ac motor