Electricity
RLC circuits
Watch voltage and current change over time in circuits with a resistor, an inductor and a capacitor, and find resonance.
Launch simulationHow it works
A capacitor stores energy in an electric field and its voltage cannot jump; an inductor stores energy in a magnetic field and resists changes in current. When a capacitor charges through a resistor, its voltage rises with the time constant τ = R·C. An inductor and a capacitor form an oscillating circuit: energy swaps between them at f₀ = 1/(2π√(L·C)), and the resistor damps the oscillation. Driven at the resonant frequency, the capacitor voltage can be several times higher than the source voltage.
τ = R·Cτ = L/Rf₀ = 1 / (2π·√(L·C))Q = (1/R)·√(L/C)
Try it yourself
- Open “RLC resonance” (R = 30 Ω, L = 100 mH, C = 10 µF) and click “▶ Run simulation”. The resonant frequency is about 159 Hz and the capacitor voltage reaches about 16.7 V, although the source amplitude is only 5 V.
- Reduce the resistance to 10 Ω and run it again. Predict first: the quality factor Q rises from 3.3 to 10, the capacitor voltage approaches 50 V and the oscillation takes longer to settle.
- In “Capacitor charging”, read from the graph how long it takes for the voltage to reach 63 % of its final value. That is the time constant τ = R·C.
- “Free LC oscillation” shows undamped oscillations. Make the capacitance four times larger and check that the period doubles.
Model limitations
Components are ideal and linear: the inductor has no winding resistance, the capacitor has no leakage and the switch uses model resistances of 1 mΩ / 1 GΩ. The time response is computed by an adaptive second-order method (SDIRK2) whose accuracy was checked against analytical solutions.