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 :
- resistor: ,
- inductor: ,
- capacitor: , where is the charge and .
So
Differentiating once gives an equation for the current, .
| Spring | Circuit |
|---|---|
| mass | inductance |
| damping | resistance |
| spring constant | (inverse capacitance) |
| displacement | charge |
| force | voltage |
The natural (resonant) angular frequency is , and the circuit is underdamped when .
First-order circuits: RC and RL
Without an inductor, is first order. Charging a capacitor from a battery gives
with time constant : after the capacitor holds of its final charge, after over 99 %.
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
H, , F, V, starting with no charge and no current. Then , or . Here : the source is exactly at the resonant frequency, and the steady state is .
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 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 onto the station's frequency.
- Power supplies, audio crossovers and USB signal lines are designed with the damping condition versus in mind, to avoid ringing.
Exercises
Exercise 1: Resonant frequency
Find and the frequency in Hz for mH and F.
Answer
rad/s, about 1592 Hz.
Solution
, so and Hz.
Exercise 2: Damping
For H and F, which resistances give oscillating (underdamped) charge?
Answer
.
Solution
Underdamped when .
Exercise 3: Discharge (code)
A 470 µF capacitor charged to 12 V discharges through . When is the voltage below 1 V?
Answer
After s.
Solution
with s. gives .
import math
print(round(1e3 * 470e-6 * math.log(12), 3))1.168
Test yourself
In the spring-circuit analogy, inductance corresponds to…
- damping
- mass
- spring constant
- force
The time constant of an RC circuit is…
The resonant angular frequency of an LC circuit is…