Compensation for changing stiffness, deformation of workpiece