Clamping mechanism for locally clamping a workpiece during a process with a machine comprising a tool which interacts with a first surface of the workpiece and exerts a process force on the workpiece, the clamping mechanism comprising: • a machine interface • one or more clamps for interacting with the first surface of the workpiece in the vicinity of the tool, wherein the one or more clamps are adapted to be moveable relative to the machine interface, wherein said one or more clamps are adapted to, when interacting with the first surface, exert a clamping force on the workpiece to attract the workpiece to the clamping mechanism • an actuator adapted to move the one or more clamps relative to the machine interface, wherein the actuator is adapted to provide an actuator force which is exerted to the workpiece via the one or more clamps and being characterized by the following: ° the machine interface comprising mechanical connection means adapted to connect the clamping mechanism to the machine for the process, wherein the machine interface is adapted to, when connected, be moveable together with the tool, wherein the mechanical connection means are adapted to attach the clamping mechanism in a releasable manner to the machine for the process • a control unit which comprises: i. a processing unit for determining a desired actuator force and/or desired actuator displacement, ii. an output terminal connected to the actuator for controlling the actuator force of the actuator during the process based on the determined desired actuator force and/or displacement, wherein the control unit further comprises an input terminal for receiving process information, wherein said input terminal is connected to the actuator, and/or a sensor; wherein the processing unit is configured to estimate the real-time feed rate of the tool of the process and/or movement of the workpiece based on said process information, and wherein the processing unit further is configured to determine the desired actuator force and/or displacement based on said estimated real-time feed rate and/or movement of the workpiece, and wherein the control unit is configured to control the actuator force via the output terminal based on said determined desired actuator force and/or displacement. • a machine interface • one or more clamps for interacting with the first surface of the workpiece in the vicinity of the tool, wherein the one or more clamps are adapted to be moveable relative to the machine interface, wherein said one or more clamps are adapted to, when interacting with the first surface, exert a clamping force on the workpiece to attract the workpiece to the clamping mechanism • an actuator adapted to move the one or more clamps relative to the machine interface, wherein the actuator is adapted to provide an actuator force which is exerted to the workpiece via the one or more clamps ° the machine interface comprising mechanical connection means adapted to connect the clamping mechanism to the machine for the process, wherein the machine interface is adapted to, when connected, be moveable together with the tool, wherein the mechanical connection means are adapted to attach the clamping mechanism in a releasable manner to the machine for the process • a control unit which comprises: i. a processing unit for determining a desired actuator force and/or desired actuator displacement, ii. an output terminal connected to the actuator for controlling the actuator force of the actuator during the process based on the determined desired actuator force and/or displacement, wherein the control unit further comprises an input terminal for receiving process information, wherein said input terminal is connected to the actuator, and/or a sensor; wherein the processing unit is configured to estimate the real-time feed rate of the tool of the process and/or movement of the workpiece based on said process information, and wherein the processing unit further is configured to determine the desired actuator force and/or displacement based on said estimated real-time feed rate and/or movement of the workpiece, and wherein the control unit is configured to control the actuator force via the output terminal based on said determined desired actuator force and/or displacement. • a control unit which comprises: i. a processing unit for determining a desired actuator force and/or desired actuator displacement, ii. an output terminal connected to the actuator for controlling the actuator force of the actuator during the process based on the determined desired actuator force and/or displacement, i. a processing unit for determining a desired actuator force and/or desired actuator displacement, ii. an output terminal connected to the actuator for controlling the actuator force of the actuator during the process based on the determined desired actuator force and/or displacement, wherein the control unit further comprises an input terminal for receiving process information, wherein said input terminal is connected to the actuator, and/or a sensor; wherein the processing unit is configured to estimate the real-time feed rate of the tool of the process and/or movement of the workpiece based on said process information, and wherein the processing unit further is configured to determine the desired actuator force and/or displacement based on said estimated real-time feed rate and/or movement of the workpiece, and wherein the control unit is configured to control the actuator force via the output terminal based on said determined desired actuator force and/or displacement.