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 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 , current ) and a mechanical port (force , position ). Resistance, core loss and friction are moved outside into the ports, so the field only stores energy. Conservation of energy over a small step:
Here is the flux linkage and by Faraday's law (Faraday's Law and Lenz's Law). The force is the force the field exerts on the moving part in the direction of increasing . So
The field energy is a state function of and : if you freeze and raise from zero, . Comparing with the total differential gives
Co-energy: the current-controlled form
Coils are usually driven with a known current, not a known flux linkage. Define the co-energy
so
The second form is the same argument for rotation, with torque and angle . Both formulas give the same instantaneous force; holding or constant is a mathematical device for taking the derivative, not a statement about how the device is driven.
The figure shows what the two quantities are: on a – curve, is the area to the left of the curve and the area below it, and they add up to the rectangle . When the core is linear, and the two areas are equal:
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 , the source pushes in , the field energy rises by , and the other half, , 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
Given: a U-core with turns, , two air gaps of , each pole face ; iron reluctance neglected.
Find: the inductance, the gap flux density and the force on the armature.
Solve: the two gaps are in series, , so
The minus sign means the force acts toward smaller : the armature is pulled down.
Check: the magnetic pressure on an iron face is ; two faces give , the same answer by a different route. Halving the gap to at the same current takes from the source, of which is stored and is the work done on the armature, matching of the force over the stroke.
In Python: both derivatives agree
SymPy confirms that the energy route (constant ) and the co-energy route (constant ) give the same force.
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 is not a straight line and no longer applies. The co-energy method still works: integrate over numerically and differentiate with respect to . The steel here follows with and an initial of 3000, on a iron path.
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 the force follows within 3 % (the small iron reluctance costs a little). Past the knee the flux density hardly rises, so the force stops growing with : doubling the current from to 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 per pair of faces from . Expect the prediction to be high by 10 to 30 % because of leakage and fringing.
Simulation. The second program with your , , gap and an iron path estimated from the frame.
What you would measure. Use a small DC push-pull solenoid or a relay with an exposed armature, a bench supply in current-limit mode at or less, and a spring scale or a kitchen scale under the armature. Step the current (for example to ) at a fixed shim thickness and record the holding force; then repeat for two other shims. A plot of against should be a straight line at low current with a slope that scales roughly as ; a scale reading to and shims known to give a slope uncertainty of about 5 % for a 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 .
Pitfalls
- Using 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. needs held constant, needs held constant. The signs differ; the forces do not.
- Forgetting saturation. is only for a linear core; with saturation integrate the real .
- Sign of the force. The result is the force of the field on the part in the direction; a negative value with as the gap length means attraction.
Practice
- A single-gap plunger has with in metres. Find the force at and .
- A rotor has . Write the torque for a constant current and find its peak value at .
- For the worked example, what current gives at the same gap (linear core)?
Answer
- ; (toward smaller ).
- ; peak at . This is a reluctance torque that pulls the rotor toward , where is largest.
- : .
Test yourself
With a linear magnetic circuit, the force on a movable part at constant current is…
In which direction does the magnetic force on an iron part act?
- toward decreasing inductance
- toward increasing inductance
- always perpendicular to the flux
- it depends on the sign of the current
A gap closes slowly at constant current. Of the electrical energy delivered by the source, how much becomes mechanical work (linear core)?
- all of it
- half
- none
- a quarter
Which statement about energy and co-energy is true?
- always
- is only defined for linear cores