# Transient Current in an LC circuit with a DC supply Here is a LC circuit with a DC supply.

When the switch is closed at t=0 capacitor behaves as a short circuit while the inductor behaves as an open circuit as the voltage across the inductor immediately jumps to battery voltage.

Now we know that the current in inductor increases while in a capacitor current exponentially decreases with respect to time.

I wonder then how the current will overall behave in that circuit as when capacitor is short circuit inductor is open circuit at t=0 then when current in capacitor decreases then at the same time in inductor it is expected to increase. So what will be the overall shape of the current with respect to time. How will its graph look like and whats the theoratical explaination for that ?

• Wow the young people of today .I remember seeing this problem in school .Yes high school and not some elite school .These days the problem is very relavent because MLC caps are much less lossy than electros and it is normal to have inductance in series with the DC input and it is not uncommon to have a low resistance circuit .So this is undergrad now so grade inflation has really happened over the past 39 years .+1 because power rail ringing can and does really occur .When you place a diode in series which represents reverse polarity protection the horrible voltage peak still happens – Autistic Mar 18 '17 at 11:41
• "Now we know that the current in inductor increases while in a capacitor current exponentially decreases with respect to time". Definitely a wrong assumption in this circuit, since the L and C are in series with no branching, the current through L and C are equal. – rioraxe Mar 19 '17 at 0:53

## 3 Answers

Your exponential decay is from another case. That case has a resistor in series with a capacitor.

Your LC circuit, if lossless, starts to oscillate. The current is sinusoidal and the voltages over the L and C are both sinusoidal, too. The voltage over the C swings between 0 and 2E.

In circuit theory you have 2 state variable differential equations, one for the inductor current and one for the capacitor voltage. They can be used "as is" for numerical simulation.

Those equations reduce to one 2nd order differential equation for analytical solution. Refer nearly any introductory circuit analysis textbook. (level = undergraduate academic).

Or see this: https://en.wikipedia.org/wiki/LC_circuit

ADDENDUM: due the comment

You're right when thinking the C to be empty in the beginning and the current to start grow gradually due the inductance. The current reaches its maximum when the C has voltage = E. The current starts to decrease, but it still charges the C until it has voltage 2E.

The state variable equations can be expressed as words. They are the most basic circuit laws since Ohm's and Kirchoff's laws an the calculation of the power. The equations:

Inductor current grows at rate (Amperes per second) = the voltage over the inductor divided by the inductance

Capacitor voltage grows at rate (Volts/second) = the charging ciurrent divided by the capacitance.

From these you should notice that the inductor keeps up the charging well over the battery voltage.

The charging current decreases (=negative voltage over the L) when the capacitor voltage has reached and bypassed E. At 2E the inductor current has dropped to zero; no more charging. Due the negative inductor voltage the current starts to grow to reversed direction ie. the capacitor discharges. When the capacitor voltage is zero, one full oscillation cycle is done and the next cycle starts.

See te numerical simulation example simulate this circuit – Schematic created using CircuitLab In practice the oscillation dies away due the resistance and in high frequencies also due the radiowave radiation. Only superconductive circuits can retain the oscillation long time, but the circuit can't have a battery.

In LC oscillator circuits (for ex. in radios) the oscillation can be continuous, because the losses are compensated by amplifiers.

• you mean the voltages and current in this circuit will oscillate ? can you please explain why this will happen ? the source is dc so how the oscillation will happen ? – Alex Mar 18 '17 at 10:58
• Can you explain why this circuit will oscillate when the source is DC ? – Alex Mar 18 '17 at 11:06
• @Alex a qualitative explanation is added. There seems to be a valid another answer that proposes you to do the numerical simulation by replacing the derivatives (=growth rates) by finite step differences. The same is done automatically in circuit analysis software. The proposed method is known as Euler's method from the 18th cetury – user287001 Mar 18 '17 at 11:22
• thanks alot . just few more minutes. can u please tell why and how C will charge to 2E ? – Alex Mar 18 '17 at 11:46
• @Alex, the supply is DC, but the stimulus seen by the LC network is not. They see 0 V when the switch is open and "E" V when the switch is closed, so that's a time-varying voltage applied to the LC network. – The Photon Mar 18 '17 at 15:42 simulate this circuit – Schematic created using CircuitLab

I would like to provide you the analytical approach of getting the result as mentioned by others already!

In the circuit shown, assuming the the initial conditions of the inductor current and capacitor voltages being:

$$i_L(0^-)= 0 A \\ v_c(0^-)= 0 V$$ From the topology, $$V_s = L \frac{di_L(t)}{dt} + v_c(t)$$ $$v_c(t) = \frac{1}{C}\int i_L(t) dt$$ $$V_s = L \frac{di_L(t)}{dt} + \frac{1}{C}\int i_L(t) dt$$ Now writing the laplace transform for the above we end up with $$V_s(s) = L[sI_L(s) - i_L(0^-)] + \frac{I_L(s)}{Cs} -v_c(0^-)$$ The variables in capital letters denote frequency domain representation and those in small letters denote it's time domain counterparts. Knowing the initial conditions for the state variables respectively, $$i_L(0^-)= 0 A \ , v_c(0^-)= 0 V$$ $$V_s(s) = LsI_L(s) + \frac{I_L(s)}{Cs}$$ For a dc voltage source or step input excitation voltage of magnitude Vs, $$V_s(s)=\frac{V_s}{s}$$ $$\frac{V_s}{s} = \frac{LCs^2+1}{Cs}I_L(s)$$ $$I_L(s) = \frac{\frac{V_s}{L}}{s^2+\frac{1}{LC}}$$ Laplace transform of sin(at) is $$\frac{a}{s^2+a^2}$$ Similarly we get, $$i_L(t) = \sqrt\frac{C}{L}V_s \sin(\frac{t}{\sqrt{LC}})$$ Substituting iL(t) in other equations , one can get the cap voltages as, $$v_c(t) = V_s[1- \cos\frac{t}{\sqrt{LC}}]$$

The simple general rules for capacitors and inductors in circuits are: $$v(t) = L{d i(t)\over dt}$$ and $$i(t) = C{d v(t)\over dt}.$$

The exponential decays that you ask about are special cases of these same rules, so is the AC behaviour.

You can try to approximate what will happen by calculating the following for a few short snippets in time:

$$i_{j+1} = i_j + (t_{j+1} - t_j) {1\over L} (E-v_j)$$ and $$v_{j+1} = v_j + (t_{j+1} - t_j) {1\over C} i_j$$ starting with $v_0 = i_0 = 0$.

You can even do this in a spreadsheet to get an idea of what happens in real life.

You can read quite a few answers further explaining that the reason for these equations are the energy that is stored in the magnetic field or the electric field respectively.