How can we formulate the current for an LR series circuit which has an AC sine source? The current formula must include both transient current and steady state current. So the i(t) function should give us the instantaneous current for any t. The equation should also make sense when R is set to zero. Some suggested superposition of transient response and steady state. I just want to see the right equation and see how R and L effect the settling time to steady stage.

enter image description here

edit1: Here is how I would put it. But Im not sure:

transient current: i_tr(t) = V/R*(1-exp(-Rt/L))

steady state current: i_s(t) = V/sqrt(R^2 + w^2*L^2)*sin(wt + arctan(wL/R))

total current after superposition:

i(t) = i_tr(t) + i_s(t)

i(t) = V/R*(1-exp(-Rt/L)) + V/sqrt(R^2 + w^2*L^2)*sin(wt + arctan(wL/R))

And if R = 0;

I cannot understand this because V/R goes to infinity and parenthesis goes to zero.

edit2: Here is LTspice simulation for 10V 60Hz AC sine source 10mH inductor: enter image description here

Unfortunately LTpice puts some resistor even-though you don't have any resistor in circuit.

And here is LTspice simulation for 10V 60Hz AC cosine source 10mH inductor:

enter image description here

As you see when the source is cosine, the current starts from 10KA. I guess this is actually infinity for pure inductive circuit? In my formula setting R = 0 leads infinity*zero so I cannot relate it and be sure.

And if the source is sine it is like there is no sudden voltage jump at t = 0 unlike in cosine case. But still it takes time for the current to settle to steady state and again I cannot relate it to my formula when R = 0:;

Do you agree that if R = 0 theoretically(which cannot be achieved in simulation) and the source is AC sine, current would never go to negative and oscillate above zero? I cannot see that both in LTspice and from the equation.

I hope I could express my problem.

  • \$\begingroup\$ Show us some of your maths. \$\endgroup\$
    – Transistor
    May 21, 2016 at 23:33
  • \$\begingroup\$ Transient current implies an interrupted sine wave. Is the transient at the sine wave peak, or where? What duration? Do we get a frequency or R and L values? \$\endgroup\$
    – user105652
    May 21, 2016 at 23:39
  • \$\begingroup\$ @transistor please see my edit \$\endgroup\$
    – user16307
    May 21, 2016 at 23:50
  • \$\begingroup\$ @transstor all that fuss started when I tried to simulate a pure inductive circuit on LTspice see my previous question: electronics.stackexchange.com/questions/235531/… \$\endgroup\$
    – user16307
    May 21, 2016 at 23:53
  • \$\begingroup\$ Why not just plug this in to LTSpice and let it give you the answer? You seem to be understanding why the answer you got from LTSpice is not just the steady state response. \$\endgroup\$
    – The Photon
    May 22, 2016 at 0:05

2 Answers 2


Analytic solution using Laplace Transform

I manually solved this problem with a lot of algebra (it took me four pages), using a concept of circuit analysis called Laplace Transform. I don't know if you know how to use it, but it is very useful to obtain mathematical equations precisely, when you want them.

For the sake of brevity I will only post the final result here, especially because I don't have the time to patiently write the solution in LaTeX right now.


  • Voltage source is \$v(t) = A \cos (\omega t + \phi)\$
  • Initial current (at \$t = 0^-\$) on the inductor is \$I_0\$


  • calling \$i_t(t)\$ is the transient current
  • calling \$i_s(t)\$ is the steady state current
  • \$u(t)\$ is the Heaviside Step Function
  • writing \$\exp(x)\$ for \$e^x\$

$$i(t) = i_t(t) + i_s(t)$$


$$i_t(t) = I_0 \exp\left(-\frac{R}{L}t\right)u(t) - \dfrac{A}{R^2 + \omega^2 L^2}\left(R\cos \phi + \omega L \sin \phi\right) \exp\left(-\frac{R}{L}t\right)u(t)$$


$$i_s(t) = \dfrac{A}{\sqrt{R^2 + \omega^2 L^2}}\cos \left(\omega t + \phi - \arctan \dfrac{\omega L}{R}\right) u(t)$$

Interpretation of the result

  • The steady state current clearly matches the expected
  • The transient current indeed vanishes at \$t = \infty\$, unless \$R = 0\$. It is interesting to note that LTSpice has a default value of \$1 \text{ m}\Omega\$ as the series resistance of an inductor, so if you wait enough, the simulation will reach the steady state, as you noticed.

Using the equations to analyze the case where \$I_0 = 0\$, \$R = 0\$ and we are using a sine wave

  • To analyze a sine voltage source, we put \$\phi = -\frac{\pi}{2}\$ (since \$\cos (\omega t - \frac{\pi}{2}) = \sin (\omega t)\$.
  • If I'm not mistaken, LTSpice defaults to \$I_0 = 0\$ on inductors.

Setting \$\phi = -\frac{\pi}{2}\$, \$I_0 = 0\$ and \$R = 0\$ on the obtained equation yields:

$$i_t(t) = \dfrac{A}{\omega L}u(t)$$

$$i_s(t) = \dfrac{A}{\omega L}\cos \left(\omega t + \frac{\pi}{2} - \frac{\pi}{2}\right) u(t) = -\dfrac{A}{\omega L}\cos (\omega t) u(t)$$

$$\implies i(t) = \dfrac{A}{\omega L}(1 - \cos (\omega t))u(t)$$

Therefore, the current will oscillate forever between 0 and \$\dfrac{2A}{\omega L} \approx 5.3052 A\$, with a mean value of \$\dfrac{A}{\omega L} \approx 2.6526 A\$, which is precisely what your simulation shows!! Impressive. I am indeed amazed on how great LTSpice was this time.

Using the equations to analyze the case where \$I_0 = 0\$, \$R = 0\$ and we are using a cosine wave

Just follow the same steps for the sine wave, but now you use \$\phi = 0\$ (instead of \$-\frac{\pi}{2}\$), since we want a cosine wave. Hint: since \$R = 0\$, the whole \$i_t(t)\$ becomes a constant.

The expected result is hidden below (in a "spoiler" markup - hover your mouse to see the answer):

\$i(t) = \dfrac{A}{\omega L}\sin (\omega t)u(t)\$

About the huge current on your cosine wave simulation

According to LTSpice user guide, page 68:

The .ic directive allows initial conditions for transient analysis to be specified. Node voltages and inductor currents may be specified. A DC solution is performed using the initial conditions as constraints. Note that although inductors are normally treated as short circuits in the DC solution in other SPICE programs, if an initial current is specified, they are treated as infinite-impedance current sources in LTspice.

This means that if you don't do anything about it, LTSpice will start considering inductors as short-circuits for a transient analysis. If they start as short-circuits, of course the starting current will be huge. In fact, since we also know that LTSpice includes a series resistance of \$1 \text{ m}\Omega\$ with the resistor, we actually predict those 10 KA as well (10 V divided by 0.001 ohm). Now, if you don't want this behaviour, you can use a SPICE directive such as .ic I(L1)=0, and the simulation will now match the predictions of my equations above (see for yourself). I did it here, and it worked for me. Also, instead of using a SPICE directive, you can go to Edit Simulation Command and check the checkbox Skip Initial operating point solution. Both ways worked for me, with the simulation now showing a sine wave, as my equations would expect.

Wikipedia page on Laplace Transform - example of studying a capacitor

I know this answer can be heavily improved if I include my calculations instead of just the final result, but I really don't have time to type all that LaTeX right now. I might do it on another time.

  • \$\begingroup\$ 1-) If the voltage source is sine, see my simulation; the current first oscillates above zero(0 to 5A) and after some seconds goes to steady states and alternates above and below zero (-2.5 to 2.5A). If we set R= 0 really instead of 1mOhm of LTspice addition, I guess the current would always oscillate between 0 and 5A. Do you agree?? \$\endgroup\$
    – user16307
    May 22, 2016 at 1:29
  • \$\begingroup\$ 2-) If the voltage source is cosine again when R= 0 really, the current would start from infinity? And decreases ? \$\endgroup\$
    – user16307
    May 22, 2016 at 1:30
  • \$\begingroup\$ 1: In theory (although LTSpice does not allow me to set R=0) I agree with you! I will add an explanation on my answer about this. 2: The current would start from zero and osillate like a sine wave (as if the steady state was reached immediately). I will also give a better explanation of this soon (in an edit). \$\endgroup\$
    – Pedro A
    May 22, 2016 at 1:34
  • \$\begingroup\$ just an advice on "2": try to simulate in LTspice 10mH inductor with SINE(0 10 60 0 0 90) which is a 10V 60Hz cosine. And see the current will start from around 10KA not from zero. \$\endgroup\$
    – user16307
    May 22, 2016 at 1:42
  • \$\begingroup\$ @user16307 Actually the equation is correct, for L=0 we have exp(-R/0), which is exp(-infinity) which is 0, so really the transient portion of the solution just disappears for L=0. If you see 10kA in the simulation it may be because LT-Spice was starting the simulation from a DC solution. You may get a different result if you select that supplies start at 0 in the simulation options. \$\endgroup\$
    – user4574
    May 22, 2016 at 1:45

For a pure sinusoid, \$\small v=Vcos(\omega t)\$ connected to a pure inductive load, \$\small L\$, we must have \$\small v=L\large \frac{di}{dt}\$, hence, integrating:

$$\small i=\frac{1}{L}\int v\:dt\:+K=\frac{1}{L}\int Vcos(\omega t)\:dt\:+K$$

thus $$\small i=\frac{V}{\omega L} sin(\omega t)\:+K$$

initial condition is: \$\small t=0\$, \$\small i=0\$, giving \$\small K=0\$. Hence $$\small i=\frac{V}{\omega L} sin(\omega t)$$

Alternatively, taking \$\small v=Vsin(\omega t)\$ and integrating, gives: $$\small i=-\frac{V}{\omega L} cos(\omega t)\:+K$$

but this time the initial condition is \$\small t=0\$, \$\small i=\large -\frac{V}{\omega L}\$, giving \$\small K=0\$. Hence $$\small i=-\frac{V}{\omega L} cos(\omega t)$$

NOTE: It seems that some simulation software defaults to the initial condition: \$\small t=0\$, \$\small i=0\$, giving the erroneous results: \$\small K=\large \frac{V}{\omega L}\$ and hence $$\small i=\frac{V}{\omega L}[1- cos(\omega t)]$$

  • \$\begingroup\$ both in sine and cosine my simulations are not matching these results. The only difference is LTspice adds series resistance 10mOhm. Dod you see my simulations? In source is sine case: the current first oscillates above zero(0 to 5A) and after some seconds goes to steady states and alternates above and below zero (-2.5 to 2.5A). In source voltage is cosine case the current starts from 10KA. \$\endgroup\$
    – user16307
    May 22, 2016 at 1:34
  • \$\begingroup\$ im not sure if u understand what i am asking \$\endgroup\$
    – user16307
    May 22, 2016 at 1:36
  • \$\begingroup\$ Yes, I understand what you are trying to do, but your initial assumptions about steady state and transient are wrong. The starting point should be a differential equation or Laplace transform model. You seem to want the theory to match the simulation results, rather than the other way round. Simulations often fall over and this is the case here. \$\endgroup\$
    – Chu
    May 22, 2016 at 8:20
  • \$\begingroup\$ ... by ignoring the true initial condition, LT-spice has introduced a transient with a 1sec time constant (L/R = 1sec) \$\endgroup\$
    – Chu
    May 22, 2016 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.