TExcelTAD
Home › Circuit Theory & Network Analysis › Inductors in Circuits

Inductors in Circuits

A small relay is switched by a transistor. It works for a day, then the transistor dies. Nothing in the circuit exceeds 12 V, so where did the voltage that destroyed it come from? From the relay coil: an inductor resists changes of current, and when the transistor tries to stop the current in a microsecond, the coil produces whatever voltage it takes to keep it flowing. This lesson gives the inductor's circuit law, its energy, the continuity rule that explains the kick, and the diode that tames it. The physics of flux and Faraday's law is in Magnetism, Induction and Inductance; real parts (cores, saturation, winding resistance) in Capacitors and Inductors as Components.

The element law

An ideal inductor links a flux λ=Li\lambda = Li with its own current. Faraday's law gives the voltage across it, with the passive sign convention (current entering the + terminal):

v(t)=Ldidt,i(t)=i(t0)+1L∫t0tv(τ) dτv(t) = L \frac{di}{dt}, \qquad i(t) = i(t_0) + \frac{1}{L} \int_{t_0}^{t} v(\tau)\, d\tau

The inductor is the dual of the capacitor: swap vv and ii, CC and LL, and every statement carries over.

  1. Constant current, zero voltage. In a DC steady state, di/dt=0di/dt = 0, so an ideal inductor is a short circuit.
  2. Current cannot jump. A step of current would need an infinite voltage. So i(0+)=i(0−)i(0^+) = i(0^-); the voltage can jump.
  3. Memory. The inductor's state is its current.

The stored energy is

w(t)=12Li2(t)w(t) = \frac{1}{2} L i^2(t)

Intuition: voltage follows the slope of the current

When a current ramps up linearly, the voltage is constant and positive; when it ramps down, the voltage is negative. The faster the change, the larger the voltage.

200 mA 0 i(t) +2.5 V 0 -2.5 V v(t) = L di/dt 4 ms 8 ms t

Series and parallel

Inductors combine like resistors (assuming no magnetic coupling between them; coupled coils are the subject of Mutual Inductance):

Lseries=L1+L2+⋯ ,1Lparallel=1L1+1L2+⋯L_\text{series} = L_1 + L_2 + \cdots, \qquad \frac{1}{L_\text{parallel}} = \frac{1}{L_1} + \frac{1}{L_2} + \cdots

Worked example 1: voltage from a current waveform

Given: L=50 mHL = 50\ \text{mH} carrying the triangle of the figure: 0→200 mA0 \to 200\ \text{mA} in 4 ms4\ \text{ms}, back to 00 at 8 ms8\ \text{ms}.

Find: v(t)v(t), the peak energy, and the voltage if the 200 mA200\ \text{mA} were interrupted in 1 μs1\ \mu\text{s}.

Solve:

v0-4=50 mH⋅200 mA4 ms=+2.5 V,v4-8=−2.5 Vwmax=12⋅50 mH⋅(0.2 A)2=1.0 mJvkick=50 mH⋅200 mA1 μs=10 kV\begin{aligned} v_{0\text{-}4} &= 50\ \text{mH} \cdot \frac{200\ \text{mA}}{4\ \text{ms}} = +2.5\ \text{V}, \qquad v_{4\text{-}8} = -2.5\ \text{V} \\ w_\text{max} &= \tfrac{1}{2} \cdot 50\ \text{mH} \cdot (0.2\ \text{A})^2 = 1.0\ \text{mJ} \\ v_\text{kick} &= 50\ \text{mH} \cdot \frac{200\ \text{mA}}{1\ \mu\text{s}} = 10\ \text{kV} \end{aligned}

Check: volt-seconds balance: +2.5 V⋅4 ms−2.5 V⋅4 ms=0+2.5\ \text{V} \cdot 4\ \text{ms} - 2.5\ \text{V} \cdot 4\ \text{ms} = 0, so the current ends where it started. Any inductor in a periodic steady state must have zero average voltage, a rule used constantly in power electronics. The 10 kV10\ \text{kV} is the ideal-model answer; in reality the switch breaks down or an arc forms first, which is exactly how the transistor of the opening story died.

The flyback diode

+ - V1 12 V L 50 mH, 20 Ohm S transistor D flyback i, S open

With a diode across the coil (cathode to the supply end), the coil current has a path when the switch opens. The coil voltage reverses only to about one diode drop, 0.7 V0.7\ \text{V} above the supply rail, and the stored energy is burned in the winding resistance and the diode. With winding resistance RR and diode drop VDV_D, the coil current obeys L di/dt=−(Ri+VD)L\,di/dt = -(Ri + V_D), so

i(t)=(I0+VDR)e−tR/L−VDR,toff=LRln⁡(1+I0RVD)i(t) = \left(I_0 + \frac{V_D}{R}\right) e^{-tR/L} - \frac{V_D}{R}, \qquad t_\text{off} = \frac{L}{R} \ln\left(1 + \frac{I_0 R}{V_D}\right)

The price is a slower release: the relay drops out later. Faster clamps (a Zener in series with the diode) trade a higher clamp voltage for a quicker release.

Worked example 2: the relay coil

Given: V1=12 VV_1 = 12\ \text{V}, coil L=50 mHL = 50\ \text{mH} with R=20 ΩR = 20\ \Omega, switch closed long ago, flyback diode VD=0.7 VV_D = 0.7\ \text{V}.

Find: the coil current, the stored energy, and how long the current takes to reach zero after the switch opens.

Solve: in DC steady state the ideal part of the coil is a short, so I0=12 V/20 Ω=0.60 AI_0 = 12\ \text{V}/20\ \Omega = 0.60\ \text{A} and w=12⋅50 mH⋅(0.60 A)2=9.0 mJw = \tfrac{1}{2} \cdot 50\ \text{mH} \cdot (0.60\ \text{A})^2 = 9.0\ \text{mJ}. The time constant is L/R=2.5 msL/R = 2.5\ \text{ms}, and

toff=2.5 ms⋅ln⁡(1+0.60⋅200.7)=2.5 ms⋅ln⁡18.1=7.2 mst_\text{off} = 2.5\ \text{ms} \cdot \ln\left(1 + \frac{0.60 \cdot 20}{0.7}\right) = 2.5\ \text{ms} \cdot \ln 18.1 = 7.2\ \text{ms}

Check: 7.2 ms7.2\ \text{ms} is about three time constants, reasonable for a decay that ends early because of the constant diode drop. The switch sees at most 12+0.7=12.7 V12 + 0.7 = 12.7\ \text{V} instead of kilovolts.

In Python: the element law, the kick and the clamp

python · try it yourself
import numpy as np

L = 50e-3
for t0, t1, i0, i1 in [(0, 4e-3, 0.0, 0.2), (4e-3, 8e-3, 0.2, 0.0)]:
    print(f"{t0*1e3:.0f}-{t1*1e3:.0f} ms: v = {L*(i1 - i0)/(t1 - t0):+.2f} V")
for dt in [1e-3, 1e-6, 1e-8]:
    print(f"interrupt 0.2 A in {dt:.0e} s: v = {L*0.2/dt:.3g} V")

V1, R, VD = 12.0, 20.0, 0.7
I0 = V1 / R
tau = L / R
t_off = tau * np.log(1 + I0 * R / VD)
print(f"coil: I0 = {I0:.2f} A, energy = {0.5*L*I0**2*1e3:.2f} mJ, tau = {tau*1e3:.2f} ms")
print(f"with flyback diode: current reaches zero after {t_off*1e3:.2f} ms")
for t in [0, 1e-3, 2.5e-3, 5e-3]:
    i = (I0 + VD/R) * np.exp(-t/tau) - VD/R
    print(f"  t = {t*1e3:3.1f} ms: i = {float(i)*1e3:6.1f} mA")
print(f"series 10+22 mH = {10+22} mH, parallel = {1/(1/10 + 1/22):.3f} mH")
0-4 ms: v = +2.50 V
4-8 ms: v = -2.50 V
interrupt 0.2 A in 1e-03 s: v = 10 V
interrupt 0.2 A in 1e-06 s: v = 1e+04 V
interrupt 0.2 A in 1e-08 s: v = 1e+06 V
coil: I0 = 0.60 A, energy = 9.00 mJ, tau = 2.50 ms
with flyback diode: current reaches zero after 7.25 ms
  t = 0.0 ms: i =  600.0 mA
  t = 1.0 ms: i =  390.7 mA
  t = 2.5 ms: i =  198.6 mA
  t = 5.0 ms: i =   50.9 mA
series 10+22 mH = 32 mH, parallel = 6.875 mH

Interactive: a triangle of current makes a square of voltage

The netlist lab drives the 50 mH50\ \text{mH} inductor with the triangle current of worked example 1 (a current source; the 100 kΩ100\ \text{k}\Omega resistor stands in for a scope probe and draws a negligible 25 μA25\ \mu\text{A}). The node voltage is the inductor voltage.

-202051015t (ms)V-200 mA0 A200 mAI (A)V(a)I(L1)at t = 16.00 msV(a)-2.50 VI(I1)0 AI(L1)25.0 uAI(Rp)-25.0 uA

The lab integrates with backward Euler ("method": "be"); the default trapezoidal rule rings numerically at the sharp corners of this waveform, a known quirk of that method that SPICE users also meet. At t=2 mst = 2\ \text{ms} the lab reads about 2.5 V2.5\ \text{V} across the inductor, at t=6 mst = 6\ \text{ms} about −2.5 V-2.5\ \text{V}. Doubling LL doubles the square wave.

Guided lab: measure an inductance from its time constant

Hand calculation. Put a 10 mH10\ \text{mH} inductor in series with 100 Ω100\ \Omega and drive it from a function generator with a 00 to 5 V5\ \text{V} square wave at 1 kHz1\ \text{kHz}. The total resistance is 100 Ω100\ \Omega plus the generator's 50 Ω50\ \Omega output resistance plus the winding resistance, say 10 Ω10\ \Omega: 160 Ω160\ \Omega. Then τ=L/R=10 mH/160 Ω=62.5 μs\tau = L/R = 10\ \text{mH}/160\ \Omega = 62.5\ \mu\text{s}, and the half period of 500 μs500\ \mu\text{s} is 8 time constants, long enough to settle.

Simulation. The netlist lab with V1 in 0 PULSE(0 5 0 1u 1u 0.5m 1m), R1 in a 160, L1 a 0 10m shows the voltage across the inductor jumping to 5 V5\ \text{V} and decaying with τ=62.5 μs\tau = 62.5\ \mu\text{s}; the details are in RL Circuits.

What you would measure. Scope across the 100 Ω100\ \Omega resistor (its voltage is 100 Ω100\ \Omega times the current; put it at the grounded end). Read the time to reach 63 % of the final value, then L=τ⋅RtotalL = \tau \cdot R_\text{total}. Measure the winding resistance with a DMM first. Expect LL within the part's tolerance, often ±10 %\pm 10\,\% to ±20 %\pm 20\,\%; the scope's timebase adds only about 1 %, but reading the 63 % point by eye adds a few percent.

Hazards and safe setup. Signal-generator levels only. When you switch DC through any coil (relays, solenoids, motors), always fit the flyback diode, even on a 5 V bench supply: the kick can reach tens of volts and damage a transistor or a meter on a low range. Do not open a circuit carrying current through a large inductor with your fingers across the gap.

Pitfalls

  • Assuming the inductor voltage is continuous. Only its current is.
  • Opening an inductive circuit without a path for the current. That is the kick; plan where the energy goes.
  • Forgetting winding resistance. A real coil in DC steady state is a resistor, not a short. It sets the current and the time constant.
  • Saturation. Above its rated current a cored inductor's LL collapses, and the current rises much faster than the ideal law predicts.

Practice

  1. A 2.2 mH2.2\ \text{mH} inductor has 5 V5\ \text{V} across it. How fast does its current rise, and how long until it carries 1 A1\ \text{A} from zero?
  2. A 100 mH100\ \text{mH} coil with 50 Ω50\ \Omega winding resistance is on a 5 V5\ \text{V} supply. Find the current and energy.
  3. Why must an inductor's average voltage be zero in a periodic steady state?
Answer
  1. di/dt=V/L=5 V/2.2 mH=2273 A/sdi/dt = V/L = 5\ \text{V}/2.2\ \text{mH} = 2273\ \text{A/s}; t=1 A/2273 A/s=0.44 mst = 1\ \text{A}/2273\ \text{A/s} = 0.44\ \text{ms}.
  2. I=5/50=0.10 AI = 5/50 = 0.10\ \text{A}; w=12⋅0.1 H⋅(0.1 A)2=0.5 mJw = \tfrac{1}{2} \cdot 0.1\ \text{H} \cdot (0.1\ \text{A})^2 = 0.5\ \text{mJ}.
  3. Over one period Δi=1L∫v dt\Delta i = \frac{1}{L}\int v\, dt. Periodic means the current returns to its start value, Δi=0\Delta i = 0, so ∫v dt=0\int v\, dt = 0 over a period: zero average.

Test yourself

In a DC steady state, an ideal inductor behaves like…

  1. an open circuit
  2. a short circuit
  3. a current source of zero amps
  4. a capacitor

What quantity of an inductor is continuous at a switching instant?

  1. its voltage
  2. its current
  3. its power
  4. its resistance

A flyback diode across a relay coil is connected with its cathode…

  1. to the end of the coil at the positive supply
  2. to ground
  3. to the transistor's base
  4. in series with the coil

The current in a 20 mH20\ \text{mH} inductor rises at 500 A/s500\ \text{A/s}. The voltage across it is…

  1. 0.01 V0.01\ \text{V}
  2. 10 V10\ \text{V}
  3. 25 V25\ \text{V}
  4. 40 V40\ \text{V}