Autotuning principles for delayed systems