RC time constant τ = RC
When a step voltage is applied to a series RC circuit, the capacitor voltage rises exponentially: Vc(t) = Vs(1 − e^(−t/τ)). After one time constant the voltage reaches 63.2%; after 5τ it is considered fully charged.
- Time constant τ = R × C (Ω × F = seconds).
- Current decays as I(t) = (Vs/R) e^(−t/τ) — maximum at t=0.
- Cutoff frequency fc = 1/(2πτ) — the RC circuit acts as a low-pass filter.
Adding inductance: the RLC circuit
Adding a series inductor L creates a second-order system governed by LC d²Vc/dt² + RC dVc/dt + Vc = Vs. The response character depends on the damping ratio ζ.
- Natural frequency ωn = 1/√(LC) rad/s.
- Damping ratio ζ = R/(2√(L/C)).
- ζ < 1 → underdamped (oscillating); ζ = 1 → critically damped; ζ > 1 → overdamped.
Numerical integration with RK45
Closed-form solutions exist for step inputs but not for arbitrary waveforms. The simulator uses scipy's RK45 Runge-Kutta solver with adaptive step control for accurate results across all damping regimes.
- The ODE is cast as a 2-state system: [Vc, dVc/dt].
- Relative tolerance rtol=1e-8 ensures sub-0.001% error.
- The same solver handles both RC (first-order) and RLC (second-order) with the same code path.