The source that you're showing in the last pictures is a good approach: it has unity area, but you forgot to adjust that to the filter in question. The time constant for the filter is 100 * 1 µs = 100 µs, while the pulse width is 1 ms, or 10 times larger. It also has too sharp rise/fall times. They will work, but there's no need to exaggerate: making them 1000 times smaller than the pulse width is enough. It's physically impossible to have them zero.
Try making the source pulse 0 1g 0 1p 1p 999p
. Or use a step source (pwl 0 0 1p 1
) and differentiate the output with a G source and a unity inductance in parallel (as mentioned by Neil_UK). However you decide to do it, the result will be an output in the GV range, which will obscure the result, so you'll have to either zoom the Y axis, or use a limiter at the output to avoid the "Dirac" impulse to show. For example a simple E source with table(-10k, -10k, 0, 0)
. I chose this value because that's the minimum value the impulse response has:
$$\mathcal{L}^{-1}\left(\dfrac{s}{s+\dfrac{1}{RC}}\right)=\delta(t)-\dfrac{1}{RC}\text{e}^{-\frac{t}{RC}}=\delta(t)-10^4\text{e}^{-10^4t}$$
Another way would be to simply perform a frequency analysis (.AC
) for, say ±3 decades from the corner frequency (~1.6 kHz), and then perform an (I)FFT on that. You may need some 1k points for .AC
or more, maybe even more decades, for a good enough IFFT.
Note that using a FFT on the .TRAN
analysis will not give you what you're looking for, since the source can never be modelled as a good Dirac source. You could try to use the distribution formula for it, but that won't work, either:
$$\delta(t)=\dfrac{1}{|a|\sqrt{\pi}}\text{e}^{-\frac{x}{a}^2}$$
It might have something to do with Dirac being a pure mathematical concept, not physically possible. So you're left with two choices: either try to approximate the impulse response in .TRAN
, or find the frequency response in .AC
, using conventional methods.