TExcelTAD
Home › Electrical Machines & Transformers › Electromechanical Energy Conversion: Field Energy and Co-energy

Electromechanical Energy Conversion: Field Energy and Co-energy

A door lock solenoid snaps shut, a relay armature pulls in, a contactor closes on a motor. In each, current in a coil becomes force on a piece of iron, and the force is far larger than the Lorentz force BILBIL on the copper would suggest: there is no current in the moving iron at all. The force comes from the energy stored in the magnetic field, which changes when the iron moves. This lesson builds the one method that gives the force or torque of every machine in the course, from relays to synchronous generators: write the field energy (or its partner, the co-energy) as a function of position, and differentiate.

The energy balance

Treat the device as a lossless coupling field between an electrical port (voltage vv, current ii) and a mechanical port (force ff, position xx). Resistance, core loss and friction are moved outside into the ports, so the field only stores energy. Conservation of energy over a small step:

dWelec=dWfld+dWmech,dWelec=v i dt=i dλ,dWmech=f dxdW_\text{elec} = dW_\text{fld} + dW_\text{mech}, \qquad dW_\text{elec} = v\,i\,dt = i\,d\lambda, \qquad dW_\text{mech} = f\,dx

Here λ=NΦ\lambda = N\Phi is the flux linkage and v=dλ/dtv = d\lambda/dt by Faraday's law (Faraday's Law and Lenz's Law). The force ff is the force the field exerts on the moving part in the direction of increasing xx. So

dWfld=i dλ−f dxdW_\text{fld} = i\,d\lambda - f\,dx

The field energy is a state function of λ\lambda and xx: if you freeze xx and raise λ\lambda from zero, Wfld(λ,x)=∫0λi(λ′,x) dλ′W_\text{fld}(\lambda, x) = \int_0^\lambda i(\lambda', x)\,d\lambda'. Comparing with the total differential dWfld=(∂W/∂λ) dλ+(∂W/∂x) dxdW_\text{fld} = (\partial W/\partial \lambda)\,d\lambda + (\partial W/\partial x)\,dx gives

i=∂Wfld(λ,x)∂λ,f=−∂Wfld(λ,x)∂x∣λ consti = \frac{\partial W_\text{fld}(\lambda, x)}{\partial \lambda}, \qquad f = -\left.\frac{\partial W_\text{fld}(\lambda, x)}{\partial x}\right|_{\lambda\ \text{const}}

Co-energy: the current-controlled form

Coils are usually driven with a known current, not a known flux linkage. Define the co-energy

Wfld′(i,x)=iλ−Wfld=∫0iλ(i′,x) di′,dW′=λ di+f dxW'_\text{fld}(i, x) = i\lambda - W_\text{fld} = \int_0^i \lambda(i', x)\,di', \qquad dW' = \lambda\,di + f\,dx

so

f=+∂Wfld′(i,x)∂x∣i const,T=+∂Wfld′(i,θ)∂θ∣i constf = +\left.\frac{\partial W'_\text{fld}(i, x)}{\partial x}\right|_{i\ \text{const}}, \qquad T = +\left.\frac{\partial W'_\text{fld}(i, \theta)}{\partial \theta}\right|_{i\ \text{const}}

The second form is the same argument for rotation, with torque TT and angle θ\theta. Both formulas give the same instantaneous force; holding λ\lambda or ii constant is a mathematical device for taking the derivative, not a statement about how the device is driven.

ilambda WW' i1lambda1 W + W' = lambda1 i1 ilambda gap g1g2 < g1 linear: W = W' = L i^2 / 2

The figure shows what the two quantities are: on a λ\lambda–ii curve, WW is the area to the left of the curve and W′W' the area below it, and they add up to the rectangle λi\lambda i. When the core is linear, λ=L(x) i\lambda = L(x)\,i and the two areas are equal:

W′=12L(x) i2⇒f=12 i2 dLdx,T=12 i2 dLdθW' = \tfrac{1}{2}L(x)\,i^2 \quad\Rightarrow\quad f = \tfrac{1}{2}\,i^2\,\frac{dL}{dx}, \qquad T = \tfrac{1}{2}\,i^2\,\frac{dL}{d\theta}

The force always acts in the direction that increases the inductance: it closes gaps and pulls iron into the coil. That is why a relay pulls in and why a piece of iron aligns with a field.

Where the energy goes

Close a gap slowly at constant current. The inductance rises by ΔL\Delta L, the source pushes in i Δλ=i2 ΔLi\,\Delta\lambda = i^2\,\Delta L, the field energy rises by 12i2 ΔL\tfrac12 i^2\,\Delta L, and the other half, 12i2 ΔL\tfrac12 i^2\,\Delta L, becomes mechanical work. At constant flux linkage (a very fast motion, no time for the current to change) the source supplies nothing and the work comes out of the field, whose energy falls. Either way the mechanical work for a small step is the same to first order.

Worked example: a U-core electromagnet

armature N = 600, i = 0.8 A g = 1.5 mm (x2) pole faceA = 2 x 3 cm f (pulls armature down)

Given: a U-core with N=600N = 600 turns, i=0.8 Ai = 0.8\ \text{A}, two air gaps of g=1.5 mmg = 1.5\ \text{mm}, each pole face A=2×3 cm=6 cm2A = 2 \times 3\ \text{cm} = 6\ \text{cm}^2; iron reluctance neglected.

Find: the inductance, the gap flux density and the force on the armature.

Solve: the two gaps are in series, R=2g/(μ0A)\mathcal{R} = 2g/(\mu_0 A), so

L(g)=N2μ0A2g=6002⋅4π×10−7 H/m⋅6×10−4 m22⋅1.5×10−3 m=90.5 mHB=μ0Ni2g=4π×10−7⋅600⋅0.8 A3×10−3 m=0.201 Tf=12i2dLdg=−μ0N2A i24g2=−4π×10−7⋅6002⋅6×10−4⋅0.824⋅(1.5×10−3)2 N=−19.3 N\begin{aligned} L(g) &= \frac{N^2 \mu_0 A}{2g} = \frac{600^2 \cdot 4\pi \times 10^{-7}\ \text{H/m} \cdot 6 \times 10^{-4}\ \text{m}^2}{2 \cdot 1.5 \times 10^{-3}\ \text{m}} = 90.5\ \text{mH} \\ B &= \frac{\mu_0 N i}{2g} = \frac{4\pi \times 10^{-7} \cdot 600 \cdot 0.8\ \text{A}}{3 \times 10^{-3}\ \text{m}} = 0.201\ \text{T} \\ f &= \tfrac12 i^2 \frac{dL}{dg} = -\frac{\mu_0 N^2 A\, i^2}{4 g^2} = -\frac{4\pi \times 10^{-7} \cdot 600^2 \cdot 6 \times 10^{-4} \cdot 0.8^2}{4 \cdot (1.5 \times 10^{-3})^2}\ \text{N} = -19.3\ \text{N} \end{aligned}

The minus sign means the force acts toward smaller gg: the armature is pulled down.

Check: the magnetic pressure on an iron face is B2/(2μ0)B^2/(2\mu_0); two faces give 2⋅0.2012⋅6×10−4/(2⋅4π×10−7)=19.3 N2 \cdot 0.201^2 \cdot 6 \times 10^{-4}/(2 \cdot 4\pi \times 10^{-7}) = 19.3\ \text{N}, the same answer by a different route. Halving the gap to 0.75 mm0.75\ \text{mm} at the same current takes i2 ΔL=57.9 mJi^2\,\Delta L = 57.9\ \text{mJ} from the source, of which 29.0 mJ29.0\ \text{mJ} is stored and 29.0 mJ29.0\ \text{mJ} is the work done on the armature, matching ∫f dg\int f\,dg of the 1/g21/g^2 force over the stroke.

In Python: both derivatives agree

SymPy confirms that the energy route (constant λ\lambda) and the co-energy route (constant ii) give the same force.

python · try it yourself
import sympy as sp
N, A, mu0, i, lam, g = sp.symbols('N A mu_0 i lambda g', positive=True)
L = N**2 * mu0 * A / (2 * g)            # two air gaps in series, iron ideal
Wco = L * i**2 / 2                      # co-energy W'(i, g)
W = lam**2 / (2 * L)                    # energy W(lambda, g)
f_co = sp.diff(Wco, g)                  # +dW'/dg at constant current
f_w = -sp.diff(W, g)                    # -dW/dg at constant flux linkage
f_w_i = sp.simplify(f_w.subs(lam, L * i))
print("f from co-energy:", f_co)
print("f from energy   :", f_w_i)
print("same?", sp.simplify(f_co - f_w_i) == 0)
vals = {N: 600, A: 6e-4, mu0: 4e-7 * sp.pi, i: 0.8, g: 1.5e-3}
print(f"L = {float(L.subs(vals))*1e3:.2f} mH, f = {float(f_co.subs(vals)):.2f} N (minus: pulls the gap shut)")
f from co-energy: -A*N**2*i**2*mu_0/(4*g**2)
f from energy   : -A*N**2*i**2*mu_0/(4*g**2)
same? True
L = 90.48 mH, f = -19.30 N (minus: pulls the gap shut)

Real iron saturates, so λ(i)\lambda(i) is not a straight line and 12i2 dL/dx\tfrac12 i^2\,dL/dx no longer applies. The co-energy method still works: integrate λ\lambda over ii numerically and differentiate with respect to gg. The steel here follows B=Bstanh⁡(H/H0)+μ0HB = B_s \tanh(H/H_0) + \mu_0 H with Bs=1.6 TB_s = 1.6\ \text{T} and an initial μr\mu_r of 3000, on a 12 cm12\ \text{cm} iron path.

python · try it yourself
import numpy as np
from scipy.optimize import brentq
from scipy.integrate import quad
MU0 = 4e-7 * np.pi
N, A, lc = 600, 6e-4, 0.12                 # turns, pole area (m^2), iron path (m)
Bs, mur = 1.6, 3000                        # saturating steel: B = Bs tanh(H/H0) + mu0 H
H0 = Bs / (mur * MU0)
B_of_H = lambda H: Bs * np.tanh(H / H0) + MU0 * H

def flux_linkage(i, g):
    """lambda = N*Phi, from N i = H lc + 2 g B(H)/mu0 (iron path plus two gaps)."""
    if i <= 0:
        return 0.0
    H = brentq(lambda H: H * lc + 2 * g * B_of_H(H) / MU0 - N * i, 0, N * i / lc)
    return N * B_of_H(H) * A

def coenergy(i, g):                        # W'(i, g) = integral of lambda di at fixed g
    return quad(lambda x: flux_linkage(x, g), 0, i, limit=200)[0]

def force(i, g, dg=1e-7):                  # f = +dW'/dg at constant current
    return (coenergy(i, g + dg) - coenergy(i, g - dg)) / (2 * dg)

g = 1.5e-3
print(" i (A)   B gap (T)   f linear (N)   f saturating (N)")
for i in (0.4, 0.8, 1.6, 3.2, 6.4, 12.8):
    lin = -MU0 * N**2 * A * i**2 / (4 * g**2)
    B = flux_linkage(i, g) / (N * A)
    print(f"{i:5.1f}   {B:8.3f}   {lin:11.1f}   {force(i, g):14.1f}")
B = flux_linkage(0.8, g) / (N * A)
print(f"check at 0.8 A: two faces x B^2 A/(2 mu0) = {B**2 * A / MU0:.2f} N")
 i (A)   B gap (T)   f linear (N)   f saturating (N)
  0.4      0.099          -4.8             -4.7
  0.8      0.198         -19.3            -18.8
  1.6      0.397         -77.2            -75.1
  3.2      0.793        -308.8           -300.0
  6.4      1.562       -1235.3          -1164.5
 12.8      1.639       -4941.3          -1283.3
check at 0.8 A: two faces x B^2 A/(2 mu0) = 18.79 N

Up to about 0.8 T0.8\ \text{T} the force follows i2i^2 within 3 % (the small iron reluctance costs a little). Past the knee the flux density hardly rises, so the force stops growing with i2i^2: doubling the current from 6.46.4 to 12.8 A12.8\ \text{A} adds only 10 % more force while the coil dissipates four times the heat. Every electromagnet, contactor and machine is designed to work near, but not deep in, saturation.

Guided lab: pull force of a small DC solenoid

Hand calculation. Measure the pole area and coil turns (or take them from the datasheet), choose a fixed gap with non-magnetic shims (paper, plastic), and predict f=B2A/μ0f = B^2 A/\mu_0 per pair of faces from B=μ0Ni/(total gap)B = \mu_0 N i/(\text{total gap}). Expect the prediction to be high by 10 to 30 % because of leakage and fringing.

Simulation. The second program with your NN, AA, gap and an iron path estimated from the frame.

What you would measure. Use a small 12 V12\ \text{V} DC push-pull solenoid or a relay with an exposed armature, a bench supply in current-limit mode at 12 V12\ \text{V} or less, and a spring scale or a kitchen scale under the armature. Step the current (for example 0.10.1 to 0.5 A0.5\ \text{A}) at a fixed shim thickness and record the holding force; then repeat for two other shims. A plot of ff against i2i^2 should be a straight line at low current with a slope that scales roughly as 1/g21/g^2; a scale reading to ±0.05 N\pm 0.05\ \text{N} and shims known to ±0.02 mm\pm 0.02\ \text{mm} give a slope uncertainty of about 5 % for a 0.5 mm0.5\ \text{mm} gap.

Hazards and safe setup. Low voltage, current-limited supply only, never a mains solenoid. Put a flyback diode across the coil: breaking the current of an inductor produces a voltage spike that can bite and damage the supply. Many small solenoids are rated for intermittent duty and get hot within a minute at full current; keep each reading short. Keep fingers out of the stroke: the armature snaps shut with a force that rises as 1/g21/g^2.

Pitfalls

  • Using BILBIL on the iron. There is no current in a relay armature; the force on iron comes only from the energy method (or the equivalent Maxwell stress).
  • Mixing constants. f=−∂W/∂xf = -\partial W/\partial x needs λ\lambda held constant, f=+∂W′/∂xf = +\partial W'/\partial x needs ii held constant. The signs differ; the forces do not.
  • Forgetting saturation. 12i2 dL/dx\tfrac12 i^2\,dL/dx is only for a linear core; with saturation integrate the real λ(i)\lambda(i).
  • Sign of the force. The result is the force of the field on the part in the +x+x direction; a negative value with xx as the gap length means attraction.

Practice

  1. A single-gap plunger has L(x)=0.2/(1+400x) HL(x) = 0.2/(1 + 400x)\ \text{H} with xx in metres. Find the force at x=2 mmx = 2\ \text{mm} and i=2 Ai = 2\ \text{A}.
  2. A rotor has L(θ)=40+15cos⁡2θ mHL(\theta) = 40 + 15\cos 2\theta\ \text{mH}. Write the torque for a constant current ii and find its peak value at i=3 Ai = 3\ \text{A}.
  3. For the worked example, what current gives 50 N50\ \text{N} at the same gap (linear core)?
Answer
  1. dL/dx=−0.2⋅400/(1+400x)2=−80/1.82=−24.7 H/mdL/dx = -0.2 \cdot 400/(1 + 400x)^2 = -80/1.8^2 = -24.7\ \text{H/m}; f=12⋅4⋅(−24.7)=−49.4 Nf = \tfrac12 \cdot 4 \cdot (-24.7) = -49.4\ \text{N} (toward smaller xx).
  2. T=12i2 dL/dθ=−15×10−3 i2sin⁡2θT = \tfrac12 i^2\,dL/d\theta = -15 \times 10^{-3}\, i^2 \sin 2\theta; peak 15×10−3⋅9=0.135 N⋅m15 \times 10^{-3} \cdot 9 = 0.135\ \text{N} \cdot \text{m} at θ=±45∘\theta = \pm 45^\circ. This is a reluctance torque that pulls the rotor toward θ=0\theta = 0, where LL is largest.
  3. f∝i2f \propto i^2: i=0.850/19.3=1.29 Ai = 0.8\sqrt{50/19.3} = 1.29\ \text{A}.

Test yourself

With a linear magnetic circuit, the force on a movable part at constant current is…

  1. 12i2 dL/dx\tfrac12 i^2\, dL/dx
  2. i2 dL/dxi^2\, dL/dx
  3. −12i2 dL/dx-\tfrac12 i^2\, dL/dx
  4. L di/dxL\, di/dx

In which direction does the magnetic force on an iron part act?

  1. toward decreasing inductance
  2. toward increasing inductance
  3. always perpendicular to the flux
  4. it depends on the sign of the current

A gap closes slowly at constant current. Of the electrical energy i2 ΔLi^2\,\Delta L delivered by the source, how much becomes mechanical work (linear core)?

  1. all of it
  2. half
  3. none
  4. a quarter

Which statement about energy WW and co-energy W′W' is true?

  1. W=W′W = W' always
  2. W+W′=λiW + W' = \lambda i
  3. W′=∫i dλW' = \int i\, d\lambda
  4. W′W' is only defined for linear cores