---
title: Induction lab
heading: Flux, mutual inductance, transients, eddy losses and wireless power, computed
eyebrow: B6 · Lesson 14 · Induction lab
xp: 50
---

::: hook
Induction is where magnetism turns into circuit elements: mutual inductance between two loops, the voltage a switching current induces in a nearby trace, the loss in a transformer core, the efficiency of a phone charger's coils. Few of these have tidy formulas. In this lab you'll compute flux by integration, mutual inductance from Neumann's double sum around two loops, an RL transient by stepping, eddy losses by averaging the induced current across a lamination, and the best load for a pair of coupled coils.
:::

::: play
- Two resonant coils, each with quality factor Q, are coupled with coefficient k. The curve is the best efficiency they can reach, with the load chosen to maximize it, against k.
- Efficiency depends only on the product $kQ$: weak coupling can be made up for with high Q, which is how a charging pad works across a few millimeters of plastic.
- The readout gives the best efficiency at k = 0.1.
:::

```sim plot
view: graph
x: k = 0.001..1 log
y: eta = 0..1
slider: qf = 10..1000 = 100 log
plot: (k*qf)^2/(1 + sqrt(1 + (k*qf)^2))^2 | label: best efficiency | samples: 400
readout: best efficiency at k of 0.1 = (0.1*qf)^2/(1 + sqrt(1 + (0.1*qf)^2))^2 | digits: 3
```

::: predict
## A 10 A current in a long trace switches off in 10 µs. A rectangular loop 5 cm by 10 cm lies beside it, its near side 2 cm away. Roughly what EMF does the loop pick up?

- [ ] About 25 µV
- [x] About 25 mV
- [ ] About 25 V
- [ ] Nothing: the loop doesn't touch the trace

::: reveal
About 25 mV. The mutual inductance is $\frac{\mu_0b}{2\pi}\ln\frac{d + a}{d} = 25$ nH, and $\frac{dI}{dt} = 10^6$ A/s, so the EMF is $M\frac{dI}{dt} = 25$ mV. That's how a fast edge on one trace puts a glitch on a neighboring circuit, and why fast loops are kept small and close to their return paths.
:::
:::

::: nameit
## Flux by integration

The flux through a surface is $\int\mathbf B \cdot d\mathbf A$. For a rectangle beside a long wire, B falls as $\frac1r$ across it, so split the rectangle into strips parallel to the wire: $\Phi = \int_d^{d + a}\frac{\mu_0I}{2\pi r}b\,dr = \frac{\mu_0Ib}{2\pi}\ln\frac{d + a}{d}$.

## Neumann's formula

The mutual inductance of two loops is a double sum over their pieces,

$$M = \frac{\mu_0}{4\pi}\oint\oint\frac{d\mathbf l_1 \cdot d\mathbf l_2}{r},$$

symmetric in the two loops, which is why $M_{12} = M_{21}$. For two coaxial circles it has an exact answer in elliptic integrals, which makes a good test of a numerical sum. Far apart, it falls to the dipole result $\frac{\mu_0\pi R_1^2R_2^2}{2z^3}$.

## Transients by stepping

An RL circuit obeys $L\frac{di}{dt} = V - Ri$. Euler's method, $i \leftarrow i + \frac{h}{L}(V - Ri)$, approaches the exact $\frac VR(1 - e^{-Rt/L})$ as the step shrinks, with error proportional to h.

## Eddy-current loss

In a lamination of thickness t, a changing field $B\sin\omega t$ induces a current density $J = \sigma\omega Bx\cos\omega t$, growing with the distance x from the middle. Averaging $J^2/\sigma$ over the thickness and a cycle gives $P_v = \frac{\pi^2f^2B^2t^2}{6\rho}$ per cubic meter: thin laminations cut the loss as $t^2$.

## Wireless power

Two resonant coils with quality factors $Q_1$, $Q_2$ and coupling k, the receiver's load being a times its coil resistance, transfer power with efficiency $\eta = \frac{U^2a}{(1 + a)(1 + a + U^2)}$, $U^2 = k^2Q_1Q_2$. The best load is $a = \sqrt{1 + U^2}$, giving $\eta_\text{max} = \frac{U^2}{\left(1 + \sqrt{1 + U^2}\right)^2}$.
:::

::: example
## Two coaxial loops of radius 5 cm sit 50 cm apart. How does the exact mutual inductance compare with the dipole approximation?

::: solution
1. **Dipole approximation.**
   $$\begin{aligned} M &= \frac{\mu_0\pi R^4}{2z^3} \\ &= \frac{4\pi \times 10^{-7} \times \pi \times 6.25 \times 10^{-6}}{2 \times 0.125} \\ &= 98.7\ \text{pH} \end{aligned}$$
2. **Exact value.** Neumann's double sum, or the elliptic-integral formula, gives
   $$M = 95.8\ \text{pH}$$
3. **Compare.** At ten radii the dipole picture is 3% high.
4. **Up close.** There it fails completely: at 2 cm apart, loops of 5 and 3 cm radius have M = 28.9 nH, nowhere near what the dipole formula says.

**Answer:** the dipole approximation gives 98.7 pH against the exact 95.8 pH, 3% high at ten radii.
:::
:::

::: example
## A transformer core of silicon steel (ρ = 4.7 × 10⁻⁷ Ω·m) is built of 0.35 mm laminations and runs at 1.5 T, 50 Hz. What is its eddy-current loss?

::: solution
1. **Loss per cubic meter.**
   $$\begin{aligned} P_v &= \frac{\pi^2f^2B^2t^2}{6\rho} \\ &= \frac{\pi^2 \times 50^2 \times 1.5^2}{6 \times 4.7 \times 10^{-7}} \\ &\quad \times (3.5 \times 10^{-4})^2 \\ &= 2412\ \text{W/m}^3 \end{aligned}$$
2. **Loss per kilogram.** At 7650 kg/m³,
   $$\frac{2412}{7650} = 0.32\ \text{W/kg}$$
3. **A solid core.** A solid core of the same steel, say 10 cm thick, would by the same formula lose about 80 000 times more:
   $$\left(\frac{100\ \text{mm}}{0.35\ \text{mm}}\right)^2 \approx 80\,000$$
   In practice that means the field never gets into it at all: the skin effect takes over.
4. **What laminations do.** Insulated from each other, they break the eddy paths into thin layers.

**Answer:** the eddy-current loss is 2412 W/m³, or 0.32 W/kg.
:::
:::

::: example
## Two charging coils have Q = 100 each. What is the best efficiency at k = 0.1, and at k = 0.01?

::: solution
1. **Figure of merit at k = 0.1.**
   $$\begin{aligned} U &= kQ \\ &= 10 \end{aligned}$$
2. **Best load ratio.**
   $$\sqrt{101} = 10.05$$
3. **Best efficiency at k = 0.1.**
   $$\begin{aligned} \eta_\text{max} &= \frac{100}{(1 + 10.05)^2} \\ &= 81.9\% \end{aligned}$$
4. **Best efficiency at k = 0.01.** Now U = 1, so
   $$\begin{aligned} \eta_\text{max} &= \frac{1}{(1 + \sqrt2)^2} \\ &= 17.2\% \end{aligned}$$
5. **What it means.** The efficiency stays high while $kQ \gg 1$ and collapses once it falls below 1, which sets how far apart coils can be. Raising Q tenfold restores the efficiency at a tenth of the coupling, if the coils can be kept in tune.

**Answer:** the best efficiency is 81.9% at k = 0.1 and 17.2% at k = 0.01.
:::
:::

::: check
kind: python

## Step 1. Write `flux_wire(I, d, a, b, n)` that integrates the field of a long straight wire carrying I over a rectangle beside it (near side d from the wire, extending a away from it and b along it), in n strips with the midpoint rule.

```python starter
import numpy as np
mu0 = 4e-7 * np.pi

def flux_wire(I, d, a, b, n):
    return mu0 * I / (2 * np.pi * d) * a * b

print(flux_wire(10, 0.02, 0.05, 0.1, 1000))
```

```python solution
import numpy as np
mu0 = 4e-7 * np.pi

def flux_wire(I, d, a, b, n):
    dr = a / n
    r = d + (np.arange(n) + 0.5) * dr
    return float(np.sum(mu0 * I / (2 * np.pi * r) * b * dr))

print(flux_wire(10, 0.02, 0.05, 0.1, 1000))
```

```python tests
import numpy as np
mu0 = 4e-7 * np.pi
F = flux_wire(10, 0.02, 0.05, 0.1, 1000)
exact = mu0 * 10 * 0.1 / (2 * np.pi) * np.log(0.07 / 0.02)
assert abs(F / exact - 1) < 1e-6, f"The flux is μ0Ib ln((d + a)/d)/(2π) = 0.2506 µWb; got {F * 1e6:.5f}."
assert abs(flux_wire(10, 0.02, 0.05, 0.1, 1000) / flux_wire(1, 0.02, 0.05, 0.1, 1000) - 10) < 1e-9, "Flux is proportional to the current."
```

::: right
Right. Dividing the flux by the current gives the mutual inductance, 25 nH here.
:::
:::

::: check
kind: python

## Step 2. Write `neumann(R1, R2, z, n)` for two coaxial circular loops of radii R1 and R2 a distance z apart: split each into n pieces and evaluate $\frac{\mu_0}{4\pi}\sum\sum\frac{d\mathbf l_1 \cdot d\mathbf l_2}{r}$ with NumPy arrays.

```python starter
import numpy as np
mu0 = 4e-7 * np.pi

def neumann(R1, R2, z, n):
    return mu0 * np.pi * R1**2 * R2**2 / (2 * z**3)

print(neumann(0.05, 0.03, 0.02, 400))
```

```python solution
import numpy as np
mu0 = 4e-7 * np.pi

def neumann(R1, R2, z, n):
    p = 2 * np.pi * (np.arange(n) + 0.5) / n
    dl1 = np.c_[-np.sin(p), np.cos(p)] * R1 * 2 * np.pi / n
    dl2 = np.c_[-np.sin(p), np.cos(p)] * R2 * 2 * np.pi / n
    x1, y1 = R1 * np.cos(p), R1 * np.sin(p)
    x2, y2 = R2 * np.cos(p), R2 * np.sin(p)
    r = np.sqrt((x1[:, None] - x2[None, :])**2 + (y1[:, None] - y2[None, :])**2 + z**2)
    return float(mu0 / (4 * np.pi) * np.sum((dl1 @ dl2.T) / r))

print(neumann(0.05, 0.03, 0.02, 400))
```

```python tests
import numpy as np, math
mu0 = 4e-7 * np.pi
def exact(R1, R2, z):
    k2 = 4 * R1 * R2 / ((R1 + R2)**2 + z**2); k = math.sqrt(k2)
    a, b, s, p = 1.0, math.sqrt(1 - k2), k2 / 2, 0.5
    while abs(a - b) > 1e-15:
        c = (a - b) / 2; a, b = (a + b) / 2, math.sqrt(a * b); p *= 2; s += p * c * c
    K = math.pi / (2 * a); E = K * (1 - s)
    return mu0 * math.sqrt(R1 * R2) * ((2 / k - k) * K - 2 / k * E)
M = neumann(0.05, 0.03, 0.02, 400)
assert abs(M / exact(0.05, 0.03, 0.02) - 1) < 1e-9, f"Expect the elliptic-integral value 28.93 nH; got {M * 1e9:.4f}."
assert abs(neumann(0.03, 0.05, 0.02, 400) / M - 1) < 1e-12, "Mutual inductance is symmetric: M12 = M21."
far = neumann(0.05, 0.05, 0.5, 400)
assert abs(far / (mu0 * np.pi * 0.05**4 / (2 * 0.5**3)) - 0.971) < 0.002, "At ten radii it's 3% below the dipole formula."
```

::: right
Right. The double sum converges very fast for smooth loops, matching the elliptic integrals to nine digits with 400 pieces each.
:::
:::

::: check
kind: python

## Step 3. Write `rl_step(V, R, L, T, n)` that steps $L\frac{di}{dt} = V - Ri$ from i = 0 with n Euler steps up to time T and returns the current.

```python starter
import math

def rl_step(V, R, L, T, n):
    return V / R

print(rl_step(12, 10, 0.1, 0.01, 10000))
```

```python solution
import math

def rl_step(V, R, L, T, n):
    h = T / n
    i = 0.0
    for _ in range(n):
        i += h * (V - R * i) / L
    return i

print(rl_step(12, 10, 0.1, 0.01, 10000))
```

```python tests
import math
exact = 1.2 * (1 - math.exp(-1))
i = rl_step(12, 10, 0.1, 0.01, 10000)
assert abs(i - exact) < 1e-4, f"After one time constant the current is 63.2% of 1.2 A, 0.7585 A; got {i:.5f}."
e1, e2 = abs(rl_step(12, 10, 0.1, 0.01, 1000) - exact), abs(rl_step(12, 10, 0.1, 0.01, 2000) - exact)
assert 1.9 < e1 / e2 < 2.1, "Halving Euler's step should halve its error."
```

::: right
Right. The same stepping that integrates motion integrates circuits: an inductor's current behaves exactly like a mass's velocity under a force and a linear drag.
:::
:::

::: check
kind: python

## Step 4. Write `eddy_loss(f, B, t, rho, nx, nt)` that averages $\rho J^2$, with $J = \frac{\omega Bx\cos\omega\tau}{\rho}$, over nx midpoints across a lamination of thickness t (x from $-\frac t2$ to $\frac t2$) and nt midpoints in one period, returning the loss in W/m³.

```python starter
import numpy as np

def eddy_loss(f, B, t, rho, nx, nt):
    return 0.0

print(eddy_loss(50, 1.5, 0.35e-3, 4.7e-7, 400, 400))
```

```python solution
import numpy as np

def eddy_loss(f, B, t, rho, nx, nt):
    w = 2 * np.pi * f
    x = (np.arange(nx) + 0.5) / nx * t - t / 2
    tau = (np.arange(nt) + 0.5) / nt / f
    J = (w * B * np.cos(w * tau))[None, :] * x[:, None] / rho
    return float(np.mean(rho * J**2))

print(eddy_loss(50, 1.5, 0.35e-3, 4.7e-7, 400, 400))
```

```python tests
import numpy as np
P = eddy_loss(50, 1.5, 0.35e-3, 4.7e-7, 400, 400)
exact = np.pi**2 * 50**2 * 1.5**2 * 0.35e-3**2 / (6 * 4.7e-7)
assert abs(P / exact - 1) < 1e-4, f"Expect π²f²B²t²/(6ρ) = 2412 W/m³; got {P:.1f}."
assert abs(eddy_loss(50, 1.5, 0.175e-3, 4.7e-7, 400, 400) / P - 0.25) < 1e-6, "Half the thickness, a quarter of the loss."
```

::: right
Right. The current density grows toward the lamination's faces, and averaging its square brings in $t^2$: halving the thickness quarters the loss.
:::
:::

::: check
kind: python

## Step 5. Write `wpt_efficiency(k, Q1, Q2, a)` using $\eta = \frac{U^2a}{(1 + a)(1 + a + U^2)}$ with $U^2 = k^2Q_1Q_2$, and `best_load(k, Q1, Q2)` that tries load ratios a from 0.01 to 50 in 5000 steps and returns `(a, efficiency)` for the best.

```python starter
import numpy as np

def wpt_efficiency(k, Q1, Q2, a):
    return 1.0

def best_load(k, Q1, Q2):
    return 1.0, wpt_efficiency(k, Q1, Q2, 1.0)

print(best_load(0.1, 100, 100))
```

```python solution
import numpy as np

def wpt_efficiency(k, Q1, Q2, a):
    U2 = k**2 * Q1 * Q2
    return U2 * a / ((1 + a) * (1 + a + U2))

def best_load(k, Q1, Q2):
    a = np.linspace(0.01, 50, 5000)
    e = wpt_efficiency(k, Q1, Q2, a)
    i = int(np.argmax(e))
    return float(a[i]), float(e[i])

print(best_load(0.1, 100, 100))
```

```python tests
import numpy as np
a, e = best_load(0.1, 100, 100)
assert abs(a - np.sqrt(101)) < 0.01 and abs(e - 0.8190) < 1e-4, f"The best load is √(1 + U²) = 10.05 coil resistances, giving 81.9%; got {a:.3f} and {e:.4f}."
a2, e2 = best_load(0.01, 100, 100)
assert abs(e2 - 0.17157) < 1e-4, f"At k = 0.01 the best is 17.2%; got {e2:.4f}."
```

::: right
Right. The search finds $a = \sqrt{1 + U^2}$: a load much heavier or lighter than that wastes power in the coils' own resistance.
:::
:::

::: check
kind: parts
given: k = 0.02 | 0.05 | 0.2; Q = 50 | 200

## Two charging coils, each with Q = {Q}, are coupled with k = {k}.

::: part
answer: sqrt(1 + (k*Q)^2)
tolerance: 0.5%

### What load, in multiples of the receiver coil's resistance, gives the best efficiency?

::: misses
- [any] $a = \sqrt{1 + k^2Q_1Q_2}$.
:::
:::

::: part
answer: (k*Q)^2/(1 + sqrt(1 + (k*Q)^2))^2*100
unit: %
tolerance: 0.5%

### What is that best efficiency?

::: misses
- [any] $\frac{U^2}{\left(1 + \sqrt{1 + U^2}\right)^2}$.
:::
:::
:::

::: check
given: d = 1 | 3; a = 2 | 10; b = 5 | 20
answer: 4*pi*1e-7*b/100/(2*pi)*ln((d + a)/d)*1e9
unit: nH
tolerance: 0.5%

## A rectangular loop's near side is {d} cm from a long wire; it extends {a} cm away from the wire and {b} cm along it. What is the mutual inductance?

::: right
Right. $\frac{\mu_0b}{2\pi}\ln\frac{d + a}{d}$.
:::

::: misses
- [4*pi*1e-7*b/100/(2*pi)*a/d*1e9] The field falls across the loop as $\frac1r$: integrate to a logarithm.
- [any] Divide the flux by the current.
:::
:::

::: explain
## Why does making a transformer's laminations thinner reduce its eddy-current loss so sharply?

::: model
The changing flux induces an EMF around every closed path in the steel, and the larger the path, the more flux it encloses and the bigger the EMF. In a lamination the largest paths are limited by the thickness, so the induced electric field, and the current density, grow in proportion to the distance from the lamination's middle, reaching a maximum proportional to the thickness. The heat goes as the current density squared, so the loss per unit volume goes as the thickness squared: halving the thickness quarters the loss. The insulation between laminations is what stops the currents from finding the larger paths through the whole core.
:::
:::

::: practice

::: check
given: f = 50 | 400; B = 1 | 1.5; t = 0.1 | 0.5
answer: pi^2*f^2*B^2*(t/1000)^2/(6*4.7e-7)/7650
unit: W/kg
tolerance: 0.5%

## Eddy loss per kilogram in {t} mm silicon-steel laminations at {B} T and {f} Hz?

::: misses
- [any] $\frac{\pi^2f^2B^2t^2}{6\rho}$, over the density 7650 kg/m³.
:::
:::

::: check
given: U = 0.5 | 3 | 30
answer: U^2/(1 + sqrt(1 + U^2))^2*100
unit: %
tolerance: 0.5%

## Best wireless-power efficiency with kQ = {U}?

::: misses
- [any] $\frac{U^2}{\left(1 + \sqrt{1 + U^2}\right)^2}$.
:::
:::
:::
