User Tools

Site Tools


simulating_a_time-varying_inductor_in_spice

This is an old revision of the document!


Simulating a time-varying inductor in Spice

The relationship between the voltage $v_L$ over and the current $i_L$ through an inductor is determined by its inductance $L$:

$$ v_L(t)=L\frac{di_L(t)}{dt}$$

However, this current-voltage relationship is not valid when the inductor is varying in time. For a time variant inductor, the equation modifies to:

$$ v_L(t)=\frac{d}{dt}[L(t).i_L(t)]=L(t)\frac{di_L(t)}{dt}+i_L(t)\frac{dL(t)}{dt}$$

Rearranging this equation gives an expression for the current through the inductor:

$$ i_L(t)=\frac{1}{L(t)}[L(0)i_L(0)+\int_0^t v_L(t) dt] $$

valid if $L(t)\neq 0$ at any time.

We will use this expression to simulate a time-varying inductance in LT Spice. Notice the limitation that $L(t)\neq 0$ at any time.

Suppose we want we simulate a sinusoidal value in function of time with a certain offset: $L(t)$= 5 mH + 3 mH.sin(2π.100 kHz.t). In order to realize this, we have to introduce a custom component in SPICE with the following subcircuit:

.subckt inductor + - params: IL0=0
.func L(time) {1m*(1+0.8*sin(2*pi*50k*time))}
gcurr + - value={(sdt(V(+,-))+IL0*L(0))/L(time)}
.ends

References

  • Biolek, D., Kolka, Z., & Biolkova, V. (2007). Modeling time-varying storage components in PSpice. In Proc. Electronic Devices and Systems IMAPS CS International Conference EDS (Vol. 2007, pp. 39-44).
simulating_a_time-varying_inductor_in_spice.1725868686.txt.gz · Last modified: by bm