Control of the travel curve of the relative movement between electrode and workpiece