# LTspice Inductance simulation

I would like to vary the value of the inductance in function of the current flowing through it.

Here is the simulation :

I have some troubles to make the current at t = 0 to be equal to 0 without adding an inductance (L3). Also, I do not know how to "measure" the current through the inductance without adding a voltage source (V3)

Above all my simulation has a problem of "timestep" too small, but I do not know how I can do a simpler simulation ... Is impossible for LTspice to evaluate the inductance each time with the formula given by the arbitrary voltage source (B1) ?

Version 4
SHEET 1 1208 680
WIRE 336 192 112 192
WIRE 112 256 112 192
WIRE 336 304 336 192
WIRE 112 384 112 336
WIRE 336 432 336 384
WIRE 320 464 224 464
WIRE 224 512 224 464
WIRE 336 560 336 496
WIRE 224 624 224 592
FLAG 112 384 0
FLAG 336 560 0
FLAG 224 624 0
SYMBOL voltage 112 240 R0
WINDOW 3 -369 62 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(5 0 0 1e-3 1e-3 0.5 1)
SYMATTR InstName V2
SYMBOL AutoGenerated\\VARICOIL 336 464 R0
SYMATTR InstName U1
SYMBOL bv 224 496 R0
SYMATTR InstName B1
SYMATTR Value V=(-0.204*ln(I(V3)*34/0.01273)+1.1283)*350e-6
SYMBOL voltage 336 288 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value 0
TEXT 48 536 Left 2 !.tran 1s
TEXT 48 480 Left 2 !.ic I(L1) = 0
TEXT 56 440 Left 2 ;Ix(U1:1)
TEXT 496 184 Left 2 !.param l_wire = 0.01273 N = 34 a = -0.204 b =1.1283


Thank you very much ! :)

• I suppose, you should use behavioural voltage source instead of B1. Also see this answer. Dec 18 '20 at 13:14
• What's a VARICOIL? Looks like you autogenerated it from some kind of subcircuit? Dec 18 '20 at 21:51
• Maybe this or this will help? Dec 18 '20 at 22:00
• @aconcernedcitizen Thank you !
– Jess
Dec 21 '20 at 9:02

I would like to vary the value of the inductance in function of the current flowing through it.

You might be inadvertently trying to break the laws of physics.

If inductance is proportional to current (for instance) then at t = 0 (before current starts to flow) inductance must be a zero value or a short circuit. That might explain one problem you have.

Also, if inductance rises, then, to keep the energy the same at that instant (because energy just cannot appear or disappear instantaneously), current has to reduce and this creates an anomaly because then, the inductance has to fall (being proportional to current) which causes current to rise (in order to conserve the energy). That sort of situation will certainly cause problems with a simulator.

It sounds to me like you are trying to do something that is prone to difficulty.

• You re right ! My simulation sounds weird
– Jess
Dec 18 '20 at 13:08
• Do you know a better way for simulating an inductor which depends on the current flowing through it ?
– Jess
Dec 18 '20 at 13:32
• @Jess I think your idea breaks the laws of physics. If you can provide more context as to what you are trying to achieve it may shed a different light of course. Dec 18 '20 at 13:34
• Thank you ! I will open a new post ;)
– Jess
Dec 18 '20 at 14:11