Why is KiCad simulation different from LTspice simulation for this LC filter?

The following is a simple LC filter to remove AC noise:

In LTspice this will generate something like this:

Schematic in LTspice:

• A 10H inductor useful at 1MHz would be pretty special. Commented Aug 1 at 20:40
• You must use a source resistance with an LC filter because this schematic has issues with infinite Q at resonance. Are you aware of the Q factor X/R with R=0? Commented Aug 2 at 0:04
• @D.A.S. The capacitors have ESR around 10 ohm.
– kile
Commented Aug 2 at 20:59
• @SpehroPefhany I don't understand why kicad only shows y-axis only 3.3 volts. shouldn't that starts at 0 volts?
– kile
Commented Aug 2 at 21:02
• @kile Both plots only show 3.300 V +/- xxx uV. It's just that your long settling times and plot start times are different and you need to choose after startup done or the same start plot time at 0 or >>10x Tau for Tau=L/R and R=DCR+ESR Commented Aug 5 at 13:56

It looks like LTspice has solved the transient response based on it first calculating the steady-state conditions. This is sometimes useful and sometimes a right royal pain in the posterior.

I suggest that you mess around with the LTspice start-up condition and force it to begin at true t = 0. I believe you can do this with a .IC command that forces the capacitor voltage to be zero at start-up. IC means initial condition.

Then, you will see the output voltage rising from 0 volts up to about 3.3 volts over a period of time for both simulators. I use microcap as a simulator so I can't really advice how you set this in either LTspice or KiCAD.

• The command is uic in LTspice. Thank you for your advice. However, I don't understand why kicad only shows y-axis only 3.3 volts. shouldn't that starts at 0 volts?
– kile
Commented Aug 2 at 21:02
• Look at both y scales and ask yourself which one is different to the other. Or, force the scales on both y axes to be the same numerically. Commented Aug 2 at 21:05

Maybe one of issues is that "startup" does not ramp up the 3.3V offset in your sine wave source over 20usec in LTspice, as it would if you just put a 3.3V source in series with the AC source. The initial condition is solved with the 3.3V source active.

KiCad uses ngspice, which I'm not very familiar with. Startup may behave differently, or may not be implemented. I also would expect the GND to be node 0.

Also LTspice tries to keep Q=$$\\infty\$$ situations from happening by having a default 1mΩ series resistance as an inductor property default. You can set resistance for the capacitors (default is 0) but it might be easier to see if you use sensible discrete (and therefore visible) series resistors for all.

Something that looks remotely like a 10H inductance at 1MHz is probably something that is not physically realizable, though. Inductors 100x smaller have SRFs in the low hundreds of kHz.

Finally, looking at the graphs on a reasonable vertical scale (like 3.29 to 3.31V), they're all saying 3.3V.

• What maximum value of inductance have seen on PCB? " scale (like 3.29 to 3.31V), " But Kicad only shows 3.3v despite of the voltage slope change.
– kile
Commented Aug 4 at 14:47
• @kile Exactly. You can't see the amount of change from the plot. It could be tens of mV or fV. Maybe there's a way to rescale it, as there is in LTspice (though, IIRC, it's not persistent over runs, at least by default). Commented Aug 4 at 15:10