# [sdiy] Analogue hardware simulations in LTspice

rsdio at audiobanshee.com rsdio at audiobanshee.com
Sat Oct 12 23:33:02 CEST 2019

```On Oct 3, 2019, at 7:23 AM, Ingo Debus <igg.debus at gmail.com> wrote:
> Am 03.10.2019 um 15:20 schrieb Richie Burnett <rburnett at richieburnett.co.uk>:
>> For anyone interested in simulating analogue hardware, I've put the LTspice schematics for three bits of classic hardware on my website for download here:
>
> Thank you, Richie!
>
> Speaking of LTSpice, does anyone know a simple way to get an impulse response of a circuit other than sending a narrow pulse into it? I mean, LTSpice can generate the frequency response of a circuit, so there should be a simpler way, no?
>
> Ingo

You can also send a step function into a circuit instead of a narrow impulse, but I forget the math involved in translating the response between the two. LTspice may be able to graph the results for you in the form of a frequency response from a step function input.

The simplest way to get an impulse response is with an impulse input. But, just like in the physical analog world, sometimes that can be too much energy for the circuit, and it overloads unnecessarily. Although the LTspice software wouldn’t “overload,” it’s simulation of the individual components would probably model the distortion of the nearly-infinite energy input of a narrow pulse or step. LTspice also allows a frequency sweep, which is what the analog folks do to avoid overloading the components in a system with “infinite” power. If you’re just plotting the frequency response, then no further processing is necessary.

If you want to use an impulse response, i.e. convolution, plugin to impart the characteristics of an audio system onto a recording, then you need to convert a frequency sweep output to an impulse response. Lots of software like Logic Studio Pro will generate the frequency sweep over a precise range with a precise rate of change and allow you to record the response. Then, there is a software step that compresses the sweep into an instant, mathematically, without the overload. That way, you have impulse data that can be used via convolution math to impart the timbre of the measured system onto any audio signal.

I haven’t gone looking for it, but if you could find configurable software that converts from a frequency sweep into an impulse response, then you might be able to save the data from an LTspice frequency sweep into a file and convert that to an impulse response. You’d need to carefully coordinate the range and rate of frequency change parameters from LTspice into the conversion software so that the calculations would be accurate. Theoretically, it would work perfectly. I’ve only used the easy button in Logic Studio Pro, since it’s automatically coordinated, so I wouldn’t have to think about math while trying to get something else done.

Brian

```