Machining method for a workpiece by means of a tool of a machine tool , - wherein a control device of the machine tool implements a position controller and a model of a position-controlled axis , - wherein the position controller in each case receives a position setpoint value (x*) of a sequence of position setpoint values (x*), a position actual value (x) detected on the output side of the position-controlled axis by means of a measuring device and a compensation value (ex) sequentially one after the other, - wherein by adding the respective position setpoint value (x*) and the respective compensation value (ex) and subtracting the respective actual position value (x), the position controller determines a resulting value, based on the resulting value determines an actuating signal (S) for the position-controlled axis in each case and outputs the respective actuating signal (S) to the position-controlled axis , - wherein the position-controlled axis is set by the actuating signal (S) according to the position setpoint value (x*) and thereby the position (x, y, z) and/or the orientation (α, β) of the tool relative to the workpiece is varied, - wherein in order to determine the respective compensation value (ex) from a storage device in which a sequence of successive control errors (e) is stored, one of the control errors (e) is read sequentially one after the other according to the sequence and - wherein the respectively read-out control error (e) is supplied to the model of the position-controlled axis which determines the respective compensation value (ex) by simulating the mechanical dynamic behavior of the position-controlled axis on the basis of the respectively read-out control error (e) and supplies the determined compensation value (ex) to the position controller . - wherein a control device of the machine tool implements a position controller and a model of a position-controlled axis , - wherein the position controller in each case receives a position setpoint value (x*) of a sequence of position setpoint values (x*), a position actual value (x) detected on the output side of the position-controlled axis by means of a measuring device and a compensation value (ex) sequentially one after the other, - wherein by adding the respective position setpoint value (x*) and the respective compensation value (ex) and subtracting the respective actual position value (x), the position controller determines a resulting value, based on the resulting value determines an actuating signal (S) for the position-controlled axis in each case and outputs the respective actuating signal (S) to the position-controlled axis , - wherein the position-controlled axis is set by the actuating signal (S) according to the position setpoint value (x*) and thereby the position (x, y, z) and/or the orientation (α, β) of the tool relative to the workpiece is varied, - wherein in order to determine the respective compensation value (ex) from a storage device in which a sequence of successive control errors (e) is stored, one of the control errors (e) is read sequentially one after the other according to the sequence and - wherein the respectively read-out control error (e) is supplied to the model of the position-controlled axis which determines the respective compensation value (ex) by simulating the mechanical dynamic behavior of the position-controlled axis on the basis of the respectively read-out control error (e) and supplies the determined compensation value (ex) to the position controller . <EOS>