TExcelTAD
Home › Differential Equations › RLC Circuits

RLC Circuits

A resistor, an inductor and a capacitor in series, driven by a voltage source, obey the same equation as a damped spring. The analogy is exact, which is why engineers once built "analog computers" out of circuits to simulate mechanical systems.

The equation

Kirchhoff's voltage law says the voltage drops around the loop add up to the source voltage E(t)E(t):

  • resistor: RIRI,
  • inductor: LI′LI',
  • capacitor: QC\frac{Q}{C}, where QQ is the charge and I=Q′I = Q'.

So

LQ′′+RQ′+1CQ=E(t).L Q'' + R Q' + \frac{1}{C}Q = E(t).

Differentiating once gives an equation for the current, LI′′+RI′+1CI=E′(t)LI'' + RI' + \frac{1}{C}I = E'(t).

Spring Circuit
mass mm inductance LL
damping cc resistance RR
spring constant kk 1/C1/C (inverse capacitance)
displacement xx charge QQ
force F(t)F(t) voltage E(t)E(t)

The natural (resonant) angular frequency is ω0=1LC\omega_0 = \frac{1}{\sqrt{LC}}, and the circuit is underdamped when R<2L/CR < 2\sqrt{L/C}.

First-order circuits: RC and RL

Without an inductor, RQ′+QC=ERQ' + \frac{Q}{C} = E is first order. Charging a capacitor from a battery E0E_0 gives

Q(t)=CE0(1−e−t/RC),Q(t) = CE_0\left(1 - e^{-t/RC}\right),

with time constant τ=RC\tau = RC: after τ\tau the capacitor holds 1−e−1≈63 %1 - e^{-1} \approx 63\,\% of its final charge, after 5τ5\tau over 99 %.

python · try it yourself
import numpy as np

R, C, E0 = 10e3, 100e-6, 5.0           # 10 kOhm, 100 microfarad, 5 V
tau = R * C
for n in (1, 2, 3, 5):
    print(f"t = {n} tau = {n * tau:.1f} s: capacitor voltage {E0 * (1 - np.exp(-n)):.3f} V")
t = 1 tau = 1.0 s: capacitor voltage 3.161 V
t = 2 tau = 2.0 s: capacitor voltage 4.323 V
t = 3 tau = 3.0 s: capacitor voltage 4.751 V
t = 5 tau = 5.0 s: capacitor voltage 4.966 V

Example: a series RLC circuit

L=0.5L = 0.5 H, R=4 ΩR = 4\ \Omega, C=0.02C = 0.02 F, E(t)=10cos⁡10tE(t) = 10\cos 10t V, starting with no charge and no current. Then 0.5Q′′+4Q′+50Q=10cos⁡10t0.5Q'' + 4Q' + 50Q = 10\cos 10t, or Q′′+8Q′+100Q=20cos⁡10tQ'' + 8Q' + 100Q = 20\cos 10t. Here ω0=10\omega_0 = 10: the source is exactly at the resonant frequency, and the steady state is Q=208⋅10sin⁡10t=0.25sin⁡10tQ = \frac{20}{8 \cdot 10}\sin 10t = 0.25\sin 10t.

python · try it yourself
import sympy as sp

t = sp.symbols("t", nonnegative=True)
Q = sp.Function("Q")
ode = sp.Eq(Q(t).diff(t, 2) + 8 * Q(t).diff(t) + 100 * Q(t), 20 * sp.cos(10 * t))
sol = sp.dsolve(ode, ics={Q(0): 0, Q(t).diff(t).subs(t, 0): 0}).rhs
print("Q(t) =", sol)
I = sol.diff(t)
print("current at t = 2:", round(float(I.subs(t, 2)), 4), "A; steady-state amplitude", 0.25 * 10, "A")
Q(t) = sin(10*t)/4 - 5*sqrt(21)*exp(-4*t)*sin(2*sqrt(21)*t)/84
current at t = 2: 1.0193 A; steady-state amplitude 2.5 A

At resonance the inductor and capacitor cancel each other, the circuit looks like a pure resistor, and the current amplitude is E0/R=2.5E_0/R = 2.5 A.

In software

  • Circuit simulators (SPICE and its descendants) assemble these equations for thousands of components and integrate them with implicit, stiff-stable methods (Stiff Equations).
  • Radio tuning is resonance: a variable capacitor moves ω0=1/LC\omega_0 = 1/\sqrt{LC} onto the station's frequency.
  • Power supplies, audio crossovers and USB signal lines are designed with the damping condition RR versus 2L/C2\sqrt{L/C} in mind, to avoid ringing.

Exercises

Exercise 1: Resonant frequency

Find ω0\omega_0 and the frequency in Hz for L=10L = 10 mH and C=1 μC = 1\ \muF.

Answer

ω0=104\omega_0 = 10^4 rad/s, about 1592 Hz.

Solution

LC=10−2⋅10−6=10−8LC = 10^{-2} \cdot 10^{-6} = 10^{-8}, so ω0=104\omega_0 = 10^4 and f=1042π≈1591.5f = \frac{10^4}{2\pi} \approx 1591.5 Hz.

Exercise 2: Damping

For L=1L = 1 H and C=0.25C = 0.25 F, which resistances give oscillating (underdamped) charge?

Answer

R<4 ΩR < 4\ \Omega.

Solution

Underdamped when R2<4L/C=16R^2 < 4L/C = 16.

Exercise 3: Discharge (code)

A 470 µF capacitor charged to 12 V discharges through 1 kΩ1\text{ k}\Omega. When is the voltage below 1 V?

Answer

After τln⁡12=0.47ln⁡12≈1.168\tau\ln 12 = 0.47\ln 12 \approx 1.168 s.

Solution

V=12e−t/RCV = 12e^{-t/RC} with RC=0.47RC = 0.47 s. 12e−t/0.47=112e^{-t/0.47} = 1 gives t=0.47ln⁡12t = 0.47\ln 12.

python · try it yourself
import math
print(round(1e3 * 470e-6 * math.log(12), 3))
1.168

Test yourself

In the spring-circuit analogy, inductance corresponds to…

  1. damping
  2. mass
  3. spring constant
  4. force

The time constant of an RC circuit is…

  1. R/CR/C
  2. RCRC
  3. 1/RC1/RC
  4. RC\sqrt{RC}

The resonant angular frequency of an LC circuit is…

  1. LCLC
  2. LC\sqrt{LC}
  3. 1/LC1/\sqrt{LC}
  4. L/CL/C