In a real world, a short rectangular pulse would be used instead of an ideal dirac impulse. A heater is an example of a system where it might be impracticable because the response to a short pulse of maximum input power is too low to measure the transfer function with sufficient signal-to-noise ratio.
Generally the transfer function can be determined as correlation of input and output signal if the input signal stimulates all characteristic frequencies of the system. A pseudo random sequence can be e.g. used as a wide band stimulation.