Frequency response and impulse response of black box I am trying to find out the transfer function of a real life continuous-time black box.

First thought is of course to input a delta and get the impulse response as the books have taught us but I think it is not feasible as you can't have a proper delta (infinite at one point).

Q1. How can I simulate a Dirac input in a way that I don't break my system and in a way that it is going to give me a pretty accurate result? Accurate meaning something that will look a lot like the impulse response.

Second thought is to do a frequency response analysis where I will input a few sinusoids at different frequencies and store the output.

Q2. How many periods should I gather for each sinusoidal so that I get an accurate output?

Q3. What effect would a few leading zeros on my input have on my output spectrum? Is it going to be the same as zero-padding?

A3. Yes, because zero-padding the input will lead to zero-padding the output which I will then FFT.

Q4. If the input signal stops abruptly and went to zero after a sufficient signal length time, would that discontinuity affect my output spectrum as well?
If the system is continuous-time then you can't simulate an impulse (Dirac delta).

Generally people take a number of approaches:


Instead of using an impulse, find the step response of the system of interest.  This can be related to the integral of the impulse response as the unit step is the integral of the unit impulse.
Generate a set of spaced sinusoids and measure the output phase and amplitude of each.  The transfer function is found by interpolating these discrete frequency points.
Generate a swept sine wave (chirp) signal over a known frequency range and deconvolve the output to find the transfer function.
Generate a pseudorandom noise sequence, measure the response, and use it to estimate the transfer function.