TExcelTAD
Home › Circuit Theory & Network Analysis › RL Circuits and the General First-Order Method

RL Circuits and the General First-Order Method

A solenoid valve is switched off and a node that sat at +4 V+4\ \text{V} is suddenly at −12 V-12\ \text{V}, more than the supply, and of the opposite sign. Nothing is broken: an inductor is keeping its current flowing. RL circuits behave exactly like RC circuits with current and voltage swapped, and once you have seen both you can solve any circuit with one capacitor or one inductor in three numbers: the initial value, the final value and the time constant. This lesson builds that general first-order method and applies it to switching and to pulse trains.

The RL step

An inductor LL in series with RR, switched onto a DC source VsV_s at t=0t = 0, obeys KVL:

Vs=R i+Ldidt⟺τdidt+i=VsR,τ=LRV_s = R\,i + L \frac{di}{dt} \qquad\Longleftrightarrow\qquad \tau \frac{di}{dt} + i = \frac{V_s}{R}, \quad \tau = \frac{L}{R}

The current rises as i=(Vs/R)(1−e−t/τ)i = (V_s/R)(1 - e^{-t/\tau}) and the inductor voltage falls as vL=Vse−t/τv_L = V_s e^{-t/\tau}. Note the time constant is L/RL/R: a larger resistance makes an RL circuit faster, the opposite of RC. Units: H/Ω=(V⋅s/A)/(V/A)=s\text{H}/\Omega = (\text{V} \cdot \text{s/A})/(\text{V/A}) = \text{s}.

The general method

Every quantity in a circuit with one storage element (and resistors and DC sources) obeys the same first-order ODE, so every quantity has the same form after a switching event at t=0t = 0:

x(t)=x(∞)+[x(0+)−x(∞)]e−t/τ,t>0x(t) = x(\infty) + \left[ x(0^+) - x(\infty) \right] e^{-t/\tau}, \qquad t > 0

Three steps:

  1. Initial value x(0+)x(0^+). Find the storage element's state just before the switch, vC(0−)v_C(0^-) or iL(0−)i_L(0^-), usually from the old DC steady state (capacitor open, inductor short). That state is continuous, so it is also the value at 0+0^+. Any other quantity at 0+0^+ follows by treating the capacitor as a voltage source vC(0+)v_C(0^+) or the inductor as a current source iL(0+)i_L(0^+).
  2. Final value x(∞)x(\infty): the new DC steady state.
  3. Time constant: τ=RThC\tau = R_\text{Th} C or τ=L/RTh\tau = L/R_\text{Th}, where RThR_\text{Th} is the resistance seen from the element's terminals in the new circuit with independent sources zeroed (Thevenin and Norton Equivalents).

The same τ\tau applies to every voltage and current in the circuit after that switching event; only the initial and final values differ.

Worked example: switching off an inductive branch

+ - V1 12 V S opens at t = 0 R1 30 Ohm R2 60 Ohm R3 20 Ohm L 100 mH a iL before: iL = 0.2 A va = +4 V after: iL decays through R3 + R2

Given: the circuit above. The switch has been closed for a long time and opens at t=0t = 0.

Find: iL(t)i_L(t) and va(t)v_a(t) for t>0t > 0, and where the stored energy goes.

Solve. Before (t=0−t = 0^-), the inductor is a short, so R3 is in parallel with R2: 60∥20=15 Ω60 \parallel 20 = 15\ \Omega, total 30+15=45 Ω30 + 15 = 45\ \Omega:

I=12 V45 Ω=0.267 A,va(0−)=0.267 A⋅15 Ω=4.0 V,iL(0−)=4.0 V20 Ω=0.20 AI = \frac{12\ \text{V}}{45\ \Omega} = 0.267\ \text{A}, \quad v_a(0^-) = 0.267\ \text{A} \cdot 15\ \Omega = 4.0\ \text{V}, \quad i_L(0^-) = \frac{4.0\ \text{V}}{20\ \Omega} = 0.20\ \text{A}

After, the source is disconnected. The inductor current continues down through R3 and L and returns up through R2, so the loop resistance is RTh=20+60=80 ΩR_\text{Th} = 20 + 60 = 80\ \Omega:

τ=100 mH80 Ω=1.25 ms,iL(t)=0.20 A e−t/1.25 ms\tau = \frac{100\ \text{mH}}{80\ \Omega} = 1.25\ \text{ms}, \qquad i_L(t) = 0.20\ \text{A}\, e^{-t/1.25\ \text{ms}}

The same current flows upward through R2, so va=−60 Ω⋅iLv_a = -60\ \Omega \cdot i_L:

va(0+)=−12 V,va(t)=−12 V e−t/1.25 ms,va(∞)=0v_a(0^+) = -12\ \text{V}, \qquad v_a(t) = -12\ \text{V}\, e^{-t/1.25\ \text{ms}}, \qquad v_a(\infty) = 0

The stored energy 12⋅0.1 H⋅(0.2 A)2=2.0 mJ\tfrac{1}{2} \cdot 0.1\ \text{H} \cdot (0.2\ \text{A})^2 = 2.0\ \text{mJ} is shared in proportion to resistance: 1.5 mJ1.5\ \text{mJ} in R2 and 0.5 mJ0.5\ \text{mJ} in R3.

Check: vav_a jumps from +4 V+4\ \text{V} to −12 V-12\ \text{V} while iLi_L stays at 0.20 A0.20\ \text{A}: the inductor current is continuous, node voltages are not. The size of the jump scales with R2: had R2 been 10 kΩ10\ \text{k}\Omega (a "harmless" high-value bleeder), va(0+)v_a(0^+) would be about −2.4 kV-2.4\ \text{kV} (iL(0−)i_L(0^-) rises to 0.24 A0.24\ \text{A}). That is the inductive kick of Inductors in Circuits.

Closing the switch again gives a different time constant: the inductor then sees R3+(R1∥R2)=20+20=40 ΩR_3 + (R_1 \parallel R_2) = 20 + 20 = 40\ \Omega, so τ=2.5 ms\tau = 2.5\ \text{ms}, and iLi_L rises from 00 back to 0.20 A0.20\ \text{A}.

The lab below has the same decaying loop: 0.2 A0.2\ \text{A} in 100 mH100\ \text{mH} decaying through 80 Ω80\ \Omega (V=16 VV = 16\ \text{V} sets V/R=0.2 AV/R = 0.2\ \text{A}). At t=τt = \tau it reads τ=1.25 ms\tau = 1.25\ \text{ms} and i=73.6 mAi = 73.6\ \text{mA}, 36.8 % of the start.

+-R = 80.0 Ohmsource shorted at t = 0V = 16.0 V, L = 100 mHtau = L/R = 1.25 mst1.25 mst/tau1.00vL-5.89 Vi73.6 mAvR5.89 V-16.0-8.00.08.016.001 tau2 tau3 tau4 tau5 tau6 tautv (V)-200 mA0 A200 mAi36.8 %5 tau: 0.7 %vL(t), inductor voltagei(t)

Pulse trains

Drive an RC circuit with a square wave and the general method applies to every edge, each one starting from where the last ended. When the half period is long compared with τ\tau, the output reaches both levels; when it is short, the capacitor never catches up and settles into a steady-state ripple between VminV_\text{min} and VmaxV_\text{max}. For a 00 to VV square wave with 50 % duty and half period ThT_h, let a=e−Th/τa = e^{-T_h/\tau}. Matching the end of the high half to the start of the low half gives

Vmax=V1+a,Vmin=aV1+aV_\text{max} = \frac{V}{1 + a}, \qquad V_\text{min} = \frac{a V}{1 + a}

Their average is V/2V/2, the square wave's average: a slow RC circuit acts as an averager, the idea behind turning PWM into an analog voltage.

0240246810t (ms)VV(in)V(out)at t = 10.00 msV(in)0 VV(out)1.89 VI(V1)1.89 mAI(R1)-1.89 mAI(C1)-1.89 mA

With τ=1 ms\tau = 1\ \text{ms} and Th=0.5 msT_h = 0.5\ \text{ms}, a=e−0.5=0.607a = e^{-0.5} = 0.607: the output settles between 1.89 V1.89\ \text{V} and 3.11 V3.11\ \text{V} after a few periods. Slide R1R_1 to 100 Ω100\ \Omega and the output follows the square wave; slide it to 10 kΩ10\ \text{k}\Omega (τ=10 ms\tau = 10\ \text{ms}) and the ripple shrinks below 0.2 V0.2\ \text{V} peak-to-peak (0.12 V0.12\ \text{V} in the periodic steady state), while the average is still climbing towards 2.5 V2.5\ \text{V} (about 1.5 V1.5\ \text{V} at the end of the 10 ms10\ \text{ms} window).

In Python: one function for every first-order transient

python · try it yourself
import numpy as np

def first_order(x0, xinf, tau, t):
    return xinf + (x0 - xinf) * np.exp(-t / tau)

# switching example
L, R1, R2, R3, V = 0.1, 30.0, 60.0, 20.0, 12.0
Rp = R2 * R3 / (R2 + R3)
iL0 = V / (R1 + Rp) * Rp / R3
tau_off = L / (R3 + R2)
tau_on = L / (R3 + R1 * R2 / (R1 + R2))
print(f"iL(0-) = {iL0:.3f} A, tau_off = {tau_off*1e3:.2f} ms, tau_on = {tau_on*1e3:.2f} ms")
for t in [0, 0.5e-3, 1.25e-3, 5e-3]:
    iL = first_order(iL0, 0.0, tau_off, t)
    print(f"t = {t*1e3:4.2f} ms: iL = {iL*1e3:6.1f} mA, va = {-R2*iL:7.3f} V")
print(f"|va| below 1 V after {tau_off*np.log(12/1)*1e3:.2f} ms")

# pulse train: simulate edge by edge, compare with the closed form
Vp, tau, Th = 5.0, 1e-3, 0.5e-3
v = 0.0
for k in range(20):
    v = first_order(v, Vp, tau, Th); vmax = v
    v = first_order(v, 0.0, tau, Th); vmin = v
a = np.exp(-Th / tau)
print(f"after 20 periods: {vmin:.4f} V to {vmax:.4f} V")
print(f"closed form:      {a*Vp/(1+a):.4f} V to {Vp/(1+a):.4f} V")
iL(0-) = 0.200 A, tau_off = 1.25 ms, tau_on = 2.50 ms
t = 0.00 ms: iL =  200.0 mA, va = -12.000 V
t = 0.50 ms: iL =  134.1 mA, va =  -8.044 V
t = 1.25 ms: iL =   73.6 mA, va =  -4.415 V
t = 5.00 ms: iL =    3.7 mA, va =  -0.220 V
|va| below 1 V after 3.11 ms
after 20 periods: 1.8877 V to 3.1123 V
closed form:      1.8877 V to 3.1123 V

Guided lab: an RL time constant and its kick

Hand calculation. A 10 mH10\ \text{mH} inductor (winding resistance about 10 Ω10\ \Omega; measure it) in series with 100 Ω100\ \Omega, driven by a 00 to 5 V5\ \text{V}, 1 kHz1\ \text{kHz} square wave from a generator with 50 Ω50\ \Omega output: R=160 ΩR = 160\ \Omega, τ=62.5 μs\tau = 62.5\ \mu\text{s}, final current 5/160=31 mA5/160 = 31\ \text{mA}.

Simulation. In the netlist lab: V1 in 0 PULSE(0 5 0 1u 1u 0.5m 1m), R1 in a 160, L1 a 0 10m, transient to 2 ms2\ \text{ms}.

What you would measure. Scope across the 100 Ω100\ \Omega resistor (at the grounded end): the current rises and falls exponentially with τ≈62 μs\tau \approx 62\ \mu\text{s}. The inductor voltage, the difference of the two channels, jumps to +5 V+5\ \text{V} on the rising edge and to about −5 V-5\ \text{V} on the falling edge: here the generator gives the current a path, so no kick. Expect τ\tau within ±15 %\pm 15\,\% (inductor tolerance and its resistance).

Hazards and safe setup. Low-voltage signals. If you instead switch a DC bench supply into a coil with a switch or transistor, fit a flyback diode first; without one, opening the switch produces a spike limited only by stray capacitance and arcing. Keep the supply current limit at about twice the expected coil current.

Pitfalls

  • Using the old circuit for τ\tau. The time constant belongs to the circuit after the switch.
  • Assuming node voltages are continuous. Only vCv_C and iLi_L are. Compute other 0+0^+ values from the circuit at 0+0^+.
  • RL intuition from RC. In RL, larger RR means smaller τ\tau.
  • Pulse trains from the wrong start. The first few periods differ from the steady ripple; the closed form is for the periodic steady state.

Practice

  1. In the worked example, the switch closes again at t=10 mst = 10\ \text{ms} (when iL≈0i_L \approx 0). Write iL(t)i_L(t) after that.
  2. An RL circuit with L=0.5 HL = 0.5\ \text{H} and R=25 ΩR = 25\ \Omega is connected to 10 V10\ \text{V}. How long until the current reaches 0.3 A0.3\ \text{A}?
  3. A 00 to 3.3 V3.3\ \text{V} PWM at 50 % feeds an RC filter with τ=10 ms\tau = 10\ \text{ms} at 1 kHz1\ \text{kHz}. Estimate the ripple.
Answer
  1. iL(10 ms)=0.2 e−8≈0.07 mA≈0i_L(10\ \text{ms}) = 0.2\,e^{-8} \approx 0.07\ \text{mA} \approx 0, final 0.20 A0.20\ \text{A}, τon=2.5 ms\tau_\text{on} = 2.5\ \text{ms}: iL=0.20 A (1−e−(t−10 ms)/2.5 ms)i_L = 0.20\ \text{A}\,(1 - e^{-(t - 10\ \text{ms})/2.5\ \text{ms}}).
  2. Final 0.4 A0.4\ \text{A}, τ=20 ms\tau = 20\ \text{ms}: t=20 ms⋅ln⁡(0.4/0.1)=27.7 mst = 20\ \text{ms} \cdot \ln(0.4/0.1) = 27.7\ \text{ms}.
  3. Th=0.5 msT_h = 0.5\ \text{ms}, a=e−0.05=0.9512a = e^{-0.05} = 0.9512: Vmax−Vmin=3.3(1−a)/(1+a)=82 mVV_\text{max} - V_\text{min} = 3.3(1 - a)/(1 + a) = 82\ \text{mV} peak-to-peak around 1.65 V1.65\ \text{V}.

Test yourself

The time constant of an RL circuit with L=40 mHL = 40\ \text{mH} and R=200 ΩR = 200\ \Omega is…

  1. 8 s8\ \text{s}
  2. 0.2 ms0.2\ \text{ms}
  3. 5 ms5\ \text{ms}
  4. 8 ms8\ \text{ms}

In the general first-order method, the time constant is computed from…

  1. the circuit before the switching event
  2. the circuit after the switching event, sources zeroed, seen from the storage element
  3. the largest resistor in the circuit
  4. the initial and final values

Right after a switch opens, which quantity is guaranteed to equal its value just before?

  1. every node voltage
  2. the inductor current
  3. the inductor voltage
  4. the resistor currents

An RC circuit with τ\tau much longer than the period of a 0 to 5 V, 50 % square wave settles to…

  1. a 0 to 5 V square wave
  2. a small ripple around 2.5 V
  3. a small ripple around 5 V
  4. zero