Pure Inductor and Voltage Source Modelling (and how to speed up simulations with them) using LTspice

From LTwiki-Wiki for LTspice

In the initial versions of SPICE there were a few elements that could not be simulated directly with nodal analysis in the circuit's admittance matrix, ideal inductors and voltage sources being the most common among them. However, starting with some version of SPICE 2 this deficiency was removed when modified nodal analysis (MNA) was added to the simulation engine (requiring an additional computational enhancement sometimes called the auxiliary matrix, I believe).

Modified nodal analysis is an extension of nodal analysis which not only determines the circuit's node voltages (as in classical nodal analysis), but also some branch currents. This permits the simulation engine to crunch ideal inductors and voltages sources (true Thevenin circuit elements) but at a cost of incrementally increasing the matrix size and difficultly about twice as much as for when "easy" Norton type elements (e.g., resistors, capacitors and current sources) are added.

In other words, adding one ideal inductor slows down the simulation about as much as adding two ideal capacitors. However, there is a small additional silver lining to this, as it also comes with the possible advantage of "free" (whether you use it or not) automatic sensing of instantaneous inductor current.

LTspice treats inductors in a special way in that they are normally given a default series resistance of 1 m-ohm unless a value of zero is explicitly entered for that parameter. Having a non-zero series resistance allows LTspice to "Nortonize" the inductor such that it can be processed as a normal branch within the circuit matrix, thereby allowing the simulation to run marginally faster. This also makes the inductor "look" like any other of the "easy" elements so that it is not a numerical problem to parallel it with a stiff voltage source. If a series resistance parameter is entered for a voltage source, it also becomes Nortonized.

Nortonizing an inductor or voltage source comes at the cost of giving up free sensing of the instantaneous branch current, which is not a cost at all if this current is not being used elsewhere. However, as soon as you call out the inductor current in *any way* in any b-source behavior expression, LTspice changes the default series resistance for that inductor back to zero ohms and reverts back to the standard MNA way of processing it within the circuit matrix so that it can get access to the inductor's instantaneous current.

Only true Thevenin type elements have the possibility of being used as the instantaneous current sense for a current controlled switch (or other similar current controlled devices). The SPICE standard is to only allow voltage sources for this purpose, but apparently LTspice accepts zero ohm inductors as well.

One last note, LTspice is indeed able to measure the current in any element, including Norton type devices, but for these devices the current measured will necessarily be a time step delayed version (perhaps several steps, Mike?) that may not be suitable for tight feedback loops (there is a warning about this in the Help file section on b-sources). -- a.s.