>
section 8 of 127 min read

8. Transients: When Switches Flip

So far we have looked at steady-state behavior, DC after a long time, or AC after sinusoids have settled. But circuits also have transient behavior: the dynamics that play out right after you flip a switch.

8.1 Why transients matter

Real circuits do not jump instantaneously between steady states. A capacitor's voltage cannot change suddenly (would require infinite current). An inductor's current cannot change suddenly (would require infinite voltage). So when you switch, the response evolves over time according to a differential equation.

Initial conditions at the instant of switching:

  • Capacitor: VC(0+)=VC(0)V_C(0^+) = V_C(0^-), voltage continuous.
  • Inductor: IL(0+)=IL(0)I_L(0^+) = I_L(0^-), current continuous.

These two rules are foundational; they let you find initial conditions when something switches.

8.2 First-order RC circuits

Series resistor and capacitor, with a step voltage applied at t=0t = 0. The cap charges:

VC(t)=Vfinal(1et/τ),τ=RCV_C(t) = V_{final}\left(1 - e^{-t/\tau}\right), \qquad \tau = RC

After one time constant τ\tau, VCV_C has reached 63.2% of its final value. After 5τ, 99.3%.

Discharging is symmetric: VC(t)=V0et/τV_C(t) = V_0 e^{-t/\tau}.

Bucket-fill analogy. A bucket being filled through a small hose, with a leak proportional to its depth. Initially fills fast (big difference between target and current); slows down as it approaches full. Exponential approach. The time constant is set by how big the bucket is (capacitance) and how restrictive the hose is (resistance). RCRC is exactly the bucket-and-hose product.

Real-world examples:

  • Power-on reset. A small RC delays the release of an MCU's reset line until VDD has settled, typically ~10 ms.
  • Switch debouncing. RC smooths out a few ms of mechanical contact bounce into one clean transition.
  • Camera flash charge. A small charging resistor and a big cap fill the flash slowly over a few seconds.
  • Audio coupling. A coupling cap forms an RC high-pass with cutoff below 20 Hz, passing audio while blocking DC bias.

8.3 First-order RL circuits

Symmetric: a series resistor and inductor with a step voltage. The inductor's current rises:

IL(t)=Ifinal(1et/τ),τ=L/RI_L(t) = I_{final}\left(1 - e^{-t/\tau}\right), \qquad \tau = L/R

Same shape, different time constant. Used in switch-mode power supplies and motor drives where inductance is part of the design.

8.4 Second-order RLC circuits, in detail

Series RLC fed a step. The differential equation, applying KVL and the constitutive equations of each element, is second-order:

Ld2qdt2+Rdqdt+qC=Vsu(t)L \frac{d^2 q}{dt^2} + R \frac{dq}{dt} + \frac{q}{C} = V_s \cdot u(t)

where qq is the charge on the capacitor and Vsu(t)V_s u(t) is the step input. Equivalently, using i=dq/dti = dq/dt:

Li¨+Ri˙+i/C=V˙sL \ddot{i} + R \dot{i} + i/C = \dot{V}_s

The natural (undamped) frequency: ω0=1/LC\omega_0 = 1/\sqrt{LC}. The damping ratio: ζ=R2C/L\zeta = \frac{R}{2}\sqrt{C/L}.

Three regimes by damping:

  • Overdamped (ζ>1\zeta > 1): two real, negative roots. Two exponential decays, no oscillation. Slow approach to steady state.
  • Critically damped (ζ=1\zeta = 1): repeated real root. Fastest decay without oscillation. The "best" damping for many applications.
  • Underdamped (ζ<1\zeta < 1): complex conjugate roots. Damped oscillation, overshoots, rings, settles.

Car suspension analogy. An overdamped suspension is mushy: drive over a bump and the car slowly settles, no oscillation. Critically damped: the car returns to level smoothly and quickly. Underdamped: drive over a bump and the car bounces, sometimes violently. Sports cars tune for slightly underdamped; luxury cars for nearly critically damped.

The ringing you see on a digital signal's edge is exactly an underdamped RLC response: the trace's inductance, the line's capacitance, and the output's small resistance form an RLC network. Fix it with termination (a resistor that matches the line impedance, see Chapter 9) or by slowing the edges (lower bandwidth means less ringing).

Worked example: step response, all three regimes

Take a series RLC with L=1L = 1 mH, C=1C = 1 µF, so ω0=31,623\omega_0 = 31{,}623 rad/s (f05.03f_0 \approx 5.03 kHz). Apply a 5 V step, cap initially uncharged. The Laplace transfer function (Section 8.5) is

VC(s)Vs(s)=1LCs2+RCs+1=ω02s2+2ζω0s+ω02\frac{V_C(s)}{V_s(s)} = \frac{1}{LC s^2 + RC s + 1} = \frac{\omega_0^2}{s^2 + 2\zeta\omega_0 s + \omega_0^2}

with closed-form step responses in each damping regime.

Underdamped (R=10R = 10 Ω, ζ=0.158\zeta = 0.158): vC(t)=Vs[1eζω0t(cosωdt+(ζω0/ωd)sinωdt)]v_C(t) = V_s[1 - e^{-\zeta\omega_0 t}(\cos\omega_d t + (\zeta\omega_0/\omega_d)\sin\omega_d t)], with damped frequency ωd31,213\omega_d \approx 31{,}213 rad/s and envelope time constant 200 µs. About one cycle of overshoot and ringdown in ~1 ms.

Critically damped (R=2L/C63.2R = 2\sqrt{L/C} \approx 63.2 Ω, ζ=1\zeta = 1): vC(t)=Vs[1eω0t(1+ω0t)]v_C(t) = V_s[1 - e^{-\omega_0 t}(1 + \omega_0 t)]. Settles within 1% in about 158 µs. No overshoot; fastest nonoscillatory rise.

Overdamped (R=200R = 200 Ω, ζ=3.16\zeta = 3.16): two real exponentials with s1,2=ζω0±ω0ζ21s_{1,2} = -\zeta\omega_0 \pm \omega_0\sqrt{\zeta^2 - 1}. For our numbers s15132s_1 \approx -5132, s2194,868s_2 \approx -194{,}868. The slow exponential dominates and settling takes ~1 ms, much slower than critical.

A Python plot makes this concrete:

python
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import lti, step
 
L, C = 1e-3, 1e-6
w0 = 1/np.sqrt(L*C)
Vs = 5.0
t = np.linspace(0, 1.5e-3, 1000)
 
for R, label in [(10, "underdamped"), (63.2, "critical"), (200, "overdamped")]:
    sys = lti([w0**2], [1, R/L, w0**2])
    _, y = step(sys, T=t)
    plt.plot(t*1e3, Vs*y, label=f"R={R}Ω ({label})")
plt.xlabel("time (ms)")
plt.ylabel("V_C (V)")
plt.legend()
plt.title("RLC step response")
plt.grid(True)
plt.show()

The underdamped curve overshoots past 5 V and rings. The critically-damped curve approaches monotonically and reaches near-target fastest. The overdamped curve crawls.

Hardware-security angle: ringing as side-channel signature

A chip's transient current draw, fed through the inductive bondwire and PCB and a few decoupling caps, looks exactly like an underdamped RLC step response: a sudden current step from a logic gate, then a few cycles of damped ringing in the supply network. The ringdown frequency depends on the L and C of the package and PCB, and the damping depends on the resistance. Different chips ring at different frequencies; even different operations on the same chip can excite different modes. Side-channel-attack toolkits look at exactly this RLC-style ringing and use it as a fingerprint to identify which cryptographic operation is running. Defenders can break this by adding more aggressive decoupling (more CC closer to the chip, lower LL in the path) so the network damping is higher and the modes are less distinct.

8.5 Solutions via Laplace transforms

The Laplace transform turns ODEs into algebra:

L{f(t)}=F(s)=0f(t)estdt\mathcal{L}\{f(t)\} = F(s) = \int_0^\infty f(t) e^{-st} dt

Key transforms: step u(t)1/su(t) \to 1/s; exponential eatu(t)1/(s+a)e^{-at}u(t) \to 1/(s+a); sinusoid sin(ωt)ω/(s2+ω2)\sin(\omega t) \to \omega/(s^2 + \omega^2); differentiation sF(s)f(0)\to sF(s) - f(0^-); integration F(s)/s\to F(s)/s.

S-domain element impedances: resistor RR, inductor sLsL, capacitor 1/sC1/sC. All of network analysis (KVL, KCL, Thevenin, etc.) works in the s-domain by replacing resistances with these. Inverse-transform the resulting V(s)V(s) or I(s)I(s) to get the time response. Chapter 3 treats Laplace in much more depth.

8.6 The s-plane: where the action is

A circuit's response in the time domain is set by the poles of its s-domain transfer function, the values of ss that make the denominator zero. The location of the poles in the complex s-plane tells you everything:

  • Real, negative pole: pure exponential decay (overdamped).
  • Repeated real, negative pole: critically damped.
  • Complex conjugate poles with negative real part: damped oscillation (underdamped).
  • Pure imaginary poles (real part zero): undamped oscillation.
  • Right-half-plane (positive real part) pole: unstable, response grows without bound.

We will use the s-plane heavily in Chapter 8 (Control Systems). For now, just know: poles in the left half plane equal stable. Poles on the imaginary axis equal on the edge of stability. Poles in the right half plane equal unstable.

A useful Python sketch: plot a Bode magnitude of a series-RLC bandpass and watch the resonant peak grow as QQ increases.

python
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import lti, bode
 
L, C = 1e-3, 1e-6
w0 = 1/np.sqrt(L*C)
f = np.logspace(2, 5, 500)
w = 2*np.pi*f
 
for R in [200, 63.2, 10]:
    sys = lti([R/L, 0], [1, R/L, w0**2])  # voltage across R / V_s
    _, mag, _ = bode(sys, w=w)
    plt.semilogx(f, mag, label=f"R={R}Ω, Q≈{w0*L/R:.1f}")
plt.xlabel("frequency (Hz)")
plt.ylabel("|V_R/V_s| (dB)")
plt.title("Series RLC bandpass response")
plt.legend()
plt.grid(True, which="both")
plt.show()

The peak around 5 kHz gets sharper as RR shrinks (Q grows). Off-resonance attenuation also gets steeper. This is exactly what a radio's input stage does to pluck one carrier out of the band.