# The Arbitrary Inductor model

LTspice allows specifying a behavioral inductance via an expression for inductor flux. Within this expression the inductor's current can be uniquely referred to by the special keyword "x", but otherwise the expression may be completely arbitrary, that is, it may be any valid function of system dynamics (e.g., time and/or node voltages and/or branch currents).

Below is a netlist example of an inductor with simple saturation.

* 330mH inductor "saturates" at 2A (L*Isat = 0.66 volt-seconds) L1 0 1 flux=0.33*2*tanh(x/2) * I1 supplies unity di/dt so inductance corresponds to voltage I1 0 1 PWL(0 0 1 1) * 5s transient run starting after 1us with 10ms maximum step size .tran 0 5 1u 10m .end

LTspice's behavioral inductor may be parametrized, but the parser requires that all parameters or strictly parametric expressions must be enclosed within *curly braces*. Strictly parametric expressions may * not* include "x" (inductor current) or other

*dynamic variables*. Below is a flux expression example of this technique.

flux={L*Is}*tanh(x/{Is}) ; L= inductance and Is= "saturation" current

Here this is further extended to add exponential control of saturation "sharpness" where an exponent of a=1 is normal and a>1 is sharper.

flux={L*Is}*sgn(x)*tanh((abs(x)/{Is})**{a})**{1/a} ; a= saturation "sharpness" (1=normal, >1=sharper)

Note that the parameters for the above expressions must be defined elsewhere upon the schematic, usually as a parameter statement within a SPICE Directive (SPICE text placed anywhere within the schematic).

.param L=330mH Is=2A a=3 ; fairly sharp saturation at 2A (the "a" factor is exponential)

Unlike the standard inductor, which defaults to a series resistance of 1mΩ, the arbitrary inductor has no series resistance unless explicitly specified (ctrl-right-mouse-button-click on the inductor). Also note that the numerical dynamic range of the arbitrary inductor seems to be about 15 decades or so.