A controller for a machine tool or production machine, comprising a device for apportioning a movement of a machine element driven by at least two drives for movement along a drive axis of the machine tool or production machine, said device including a low-pass filter that filters predetermined desired drive axis values to generate filtered desired drive axis values, a first controller receiving the filtered desired drive axis values as control input value for controlling a first of the at least two drives, a delay unit with a constant group delay time, said delay unit temporally delaying the desired drive axis values to generate delayed desired drive axis values, a subtracter that determines a difference between the filtered desired drive axis values and the delayed desired drive axis values, and a second controller receiving the determined difference and providing, based on the determined difference, a second control input value for controlling a second of the at least two drives.