RFrftools.io
Power ElectronicsMarch 1, 202611 min read

Magnetics Optimizer: Finding the Pareto-Optimal Transformer Design With NSGA-II

Designing a flyback transformer by hand means picking one core from hundreds and hoping your intuition about the efficiency-versus-size trade-off is close. The Magnetics Optimizer runs NSGA-II across a 113-core vendor database, evaluates every candidate at 10 operating points, and hands you the Pareto front — the complete set of designs where you cannot improve efficiency without growing the core, and vice versa.

Contents

Why Magnetics Design Is Still Hard

Power electronics simulation has come a long way. You can model a full switching converter in SPICE, run Monte Carlo on your control loop, and predict radiated emissions before the board is spun. But magnetics design remains stubbornly manual. The standard workflow is: estimate required volt-seconds, pick a core from the catalog based on power-handling rules of thumb, calculate turns, check that the winding fits in the window, verify peak flux density stays below saturation, and hope the thermal rise is acceptable.

The problem is that "pick a core from the catalog" is not a deterministic step. TDK, Ferroxcube, Magnetics Inc., and Micrometals collectively offer dozens of ferrite materials and hundreds of core shapes — EE, ETD, PQ, RM, toroids. Each material has its own Steinmetz coefficients, saturation flux density, and thermal resistance. ETD cores favor high-volume winding; PQ cores favor low-profile assemblies. N87 and N97 ferrites from TDK have different core loss profiles at 100 kHz versus 500 kHz. Powdered iron toroids tolerate higher saturation flux but pay a penalty in high-frequency core loss.

On top of that, there is no single best design. A design optimized for minimum loss uses a large core with low flux density and fat wire. A design optimized for minimum size pushes flux density toward saturation and packs the winding window tight. These objectives conflict, and the right trade-off depends on your thermal budget, board footprint constraint, and efficiency target.

The Magnetics Optimizer addresses this directly. It treats core selection and winding geometry as a multi-objective optimization problem, solved with NSGA-II across all 113 cores in the database simultaneously, returning the Pareto front: every design for which no improvement in efficiency is achievable without increasing volume.

The Design Problem: 48V Flyback, 36W, 100 kHz

The worked example throughout this post is a primary-side regulated flyback transformer: 48V input (nominal), 12V output at 3A (36W), 100 kHz switching frequency, 45% duty cycle. The parameters entered into the tool:

ParameterValue
TopologyFlyback transformer
V_in (nominal)48 V
V_out12 V
I_out3 A
f_sw100 kHz
Duty cycle45%
Ambient temperature40°C
T_max100°C
Objective weight0.3 (balanced)
With a 48V input and 45% duty cycle, the volt-second product applied to the primary during the on-time is:
λ=VinDfsw=48×0.45100,000=216μVs\lambda = \frac{V_{in} \cdot D}{f_{sw}} = \frac{48 \times 0.45}{100{,}000} = 216\,\mu\text{Vs}

This drives turns selection and core area. It must be supported without saturating the core and reset completely during the off-time — the fundamental constraint that couples turns count, core geometry, and switching frequency.

Why Multi-Objective Optimization Matters

Consider two extreme designs for this flyback:

Design A — minimum loss: Use an ETD44 core (Ae=173mm2A_e = 173\,\text{mm}^2). The large cross-section supports the required volt-seconds with moderate turns and low peak flux density — perhaps 80 mT. Core loss is small. Fat primary wire keeps DC resistance low. Efficiency exceeds 98%. But the ETD44 has a volume of approximately 18 cm³. Design B — minimum volume: Use an EE25 core (Ae=52mm2A_e = 52\,\text{mm}^2). Fewer turns are required, but peak flux density must approach 240 mT to satisfy the volt-second constraint. Core loss increases substantially — the Steinmetz exponent β2.86\beta \approx 2.86 means loss scales steeply with flux density. A 10% increase in peak flux density increases core loss by (1.10)2.86132%(1.10)^{2.86} - 1 \approx 32\%. Volume drops to around 3 cm³ — one-sixth of Design A.

Neither is universally better. A data-center power supply accepts the larger core for the efficiency gain; a medical wearable charger needs the small footprint regardless. The correct answer is the Pareto front: all designs where no improvement in efficiency is achievable without increasing volume.

The Algorithm: NSGA-II

The optimizer uses NSGA-II (Non-dominated Sorting Genetic Algorithm II), implemented with the DEAP library. NSGA-II maintains a population of candidate designs, evaluates both objectives for each candidate, ranks individuals by Pareto dominance, and uses a crowding-distance metric to preserve diversity along the front — preventing the population from collapsing to a single point.

Each individual encodes a complete transformer design as a chromosome of 7 genes:

  • Core index — integer index into the 113-core database
  • Primary turns N1 — integer, 3–120
  • Secondary turns N2 — derived from turns ratio for transformers; varied for coupled inductors
  • Primary wire gauge — AWG 14–40
  • Secondary wire gauge — AWG 14–40
  • Air gap — 0–3 mm (continuous)
  • Interleaving — None / P-S-P / S-P-S / Full (integer 0–3)
For transformer topologies (flyback, forward), N2 is not optimized directly — it is derived from the turns ratio constraint N2=round(N1Vout/(VinD))N_2 = \text{round}(N_1 \cdot V_{out} / (V_{in} \cdot D)). This is physically correct and reduces the search space.

The algorithm evaluates each candidate at 10 operating points: 5 load fractions (20%, 40%, 60%, 80%, 100%) × 2 input voltages (nominal and +10%). Fitness values are the worst-case total loss and core volume across all 10 points. This ensures the optimizer finds designs that are robust across the operating range, not tuned to a single nominal condition.

With 200 individuals and 150 generations (free tier), the optimizer performs approximately 120,000–150,000 evaluations. On the Fargate worker, this completes in roughly 20–40 seconds.

Physics Models

The fitness function chains four physics models in sequence for each candidate.

Core loss — Steinmetz equation:
Pcore=CmfαBpkβVeP_{core} = C_m \cdot f^{\alpha} \cdot B_{pk}^{\beta} \cdot V_e

where CmC_m, α\alpha, and β\beta are material-specific Steinmetz coefficients stored per material in the core database, and VeV_e is effective core volume in m³. Units are SI throughout (f in Hz, B in T, P in W). For TDK N87: Cm=0.0585C_m = 0.0585, α=1.86\alpha = 1.86, β=2.86\beta = 2.86. The steep β\beta exponent is the dominant sensitivity: small reductions in peak flux density yield large core loss improvements.

Peak flux density for single-ended topologies (flyback, forward):
Bpk=VinDN1AefswB_{pk} = \frac{V_{in} \cdot D}{N_1 \cdot A_e \cdot f_{sw}}

For power inductors: Bpk=LIpeak/(N1Ae)B_{pk} = L \cdot I_{peak} / (N_1 \cdot A_e) where LL is computed from the gapped core inductance model.

AC winding resistance — Dowell model:

The skin effect and proximity effect both increase effective winding resistance at switching frequency. The Dowell model computes FR=Rac/RdcF_R = R_{ac}/R_{dc} as a function of the normalized wire diameter Δ=hlayer/δ\Delta = h_{layer}/\delta (where hlayer=dwπ/4h_{layer} = d_w \sqrt{\pi/4} for round conductors) and the number of winding layers nln_l:

FR=Δ[sinh2Δ+sin2Δcosh2Δcos2Δ+nl2132(sinhΔsinΔ)coshΔ+cosΔ]F_R = \Delta \left[ \frac{\sinh 2\Delta + \sin 2\Delta}{\cosh 2\Delta - \cos 2\Delta} + \frac{n_l^2 - 1}{3} \cdot \frac{2(\sinh\Delta - \sin\Delta)}{\cosh\Delta + \cos\Delta} \right]

Skin depth at 100 kHz: δ=ρCu/(πfμ0)209μm\delta = \sqrt{\rho_{Cu}/(\pi f \mu_0)} \approx 209\,\mu\text{m}. AWG22 wire has diameter 0.644 mm, giving Δ1.5\Delta \approx 1.5. With 4 primary layers, FR5F_R \approx 5. The optimizer evaluates all three interleaving options and selects the best.

Air gap inductance:
L=μ0N2Aelgap+le/μrL = \frac{\mu_0 N^2 A_e}{l_{gap} + l_e/\mu_r}

Once lgap>le/μrl_{gap} > l_e/\mu_r, the air gap dominates and inductance becomes nearly independent of core material permeability — a useful property for manufacturing tolerance.

Thermal:
ΔT=PtotalRth\Delta T = P_{total} \cdot R_{th}

Lumped thermal resistance RthR_{th} is stored per-core from manufacturer data. The thermal ceiling Tambient+ΔTTmaxT_{ambient} + \Delta T \leq T_{max} is a hard constraint. Designs violating it at any operating point receive a penalty that dominates both fitness objectives.

Hard feasibility constraints:
  • Bpk<0.8×BsatB_{pk} < 0.8 \times B_{sat} — 20% saturation margin at worst-case voltage
  • Fill factor ku=(N1Aw1+N2Aw2)/Wa<0.40k_u = (N_1 A_{w1} + N_2 A_{w2})/W_a < 0.40
  • Tambient+PtotalRth<TmaxT_{ambient} + P_{total} \cdot R_{th} < T_{max}

Running the Optimizer: Results for the 48V Flyback

After the run completes, the tool displays the Pareto front as a scatter plot (Loss vs. Volume), with every point clickable to view design details. The evolution convergence chart shows the hypervolume indicator growing toward a plateau — once the curve flattens, additional generations yield diminishing returns.

Three representative solutions from the final Pareto front:

DesignCoreMaterialVolume (cm³)Total Loss (W)EfficiencyB_peak (T)ΔT (°C)Thermal
A — min lossETD44N9717.80.6198.3%0.07119PASS
B — balancedETD34N877.820.6698.2%0.11828PASS
C — min volumeEE25N874.101.3196.4%0.24151PASS
Design B is the optimizer's recommended balanced solution for the nominal 40°C ambient. ETD34 with N87 material, 28 primary turns and 7 secondary turns (turns ratio 4:1 for 12V from 48V at 45% duty cycle), AWG22 primary and AWG18 secondary, 0.5 mm air gap, P-S-P interleaving. Total loss 660 mW, efficiency 98.2%, temperature rise 28°C. Peak flux density 0.118 T against N87's Bsat=0.39TB_{sat} = 0.39\,\text{T} — a 70% saturation margin against the derated limit.

Design A shows what the larger ETD44 buys: core loss drops because Bpk=0.071TB_{pk} = 0.071\,\text{T} is barely a third of Design B's flux density. At β=2.86\beta = 2.86, that factor of 1.66 in flux density reduces core loss by (1.66)2.865×(1.66)^{2.86} \approx 5\times. The trade-off is 2.3× more volume.

Design C is thermally safe at 40°C ambient but marginally so — at 55°C ambient, the 51°C rise pushes junction temperature to 106°C, violating the constraint. The Pareto front makes this boundary explicit before any hardware exists.

Comparing Core Materials

The optimizer answers the material selection question automatically. For 100 kHz, the pattern is consistent:

MaterialVendorCmC_mα\alphaβ\betaBsatB_{sat} (T)Typical range
N87TDK0.05851.862.860.3925–200 kHz
N97TDK0.03801.902.800.4225–200 kHz, efficiency-critical
N49TDK0.00951.702.550.37400 kHz–3 MHz
3C95Ferroxcube0.00601.902.600.43Low-loss ferrite
3F36Ferroxcube0.01201.752.600.35200 kHz–1 MHz
R (−26)Magnetics Inc.0.05001.652.251.50DC-bias inductors
At 100 kHz, N97 consistently beats N87 for efficiency-critical designs. Its lower CmC_m reduces core loss by approximately 35% at the same flux density and frequency. The optimizer selects N97 at the low-loss end of the Pareto front and N87 at the balanced and minimum-volume end.

Powdered iron (R material, Mix26) appears on the Pareto front only when high saturation flux density is needed — typically for power inductors with significant DC bias. For a 36W flyback, ferrite dominates throughout because the stored energy per cycle is moderate and the low CmC_m of ferrite wins.

For switching frequencies above 200 kHz, N49 or 3F36 consistently dominate. The fαf^{\alpha} scaling with α1.86\alpha \approx 1.86 means doubling frequency from 100 kHz to 200 kHz increases core loss by 21.863.6×2^{1.86} \approx 3.6\times. Switching from N87 to 3F36 at 200 kHz recovers roughly half this increase. The optimizer finds this crossover empirically — no hard-coded frequency threshold needed.

Saturation Margin and Fill Factor

When magnetics are designed by hand, the two most common production failures are core saturation and overfilled winding windows. The optimizer eliminates both with hard constraints.

Saturation is checked at the worst-case operating point (Vin×1.1V_{in} \times 1.1, any load). A 10% input over-voltage alone increases BpkB_{pk} by 10%. Combined with a 10% reduction in N1N_1 from a tolerance-induced design change, the cumulative effect can push a marginal design into saturation. The optimizer's 20% derate (Bpk<0.8×BsatB_{pk} < 0.8 \times B_{sat}) provides this headroom explicitly. Fill factor ku<0.40k_u < 0.40 accounts for wire insulation, bobbin wall thickness, and interlayer tape. A design showing ku=0.42k_u = 0.42 on paper is physically impossible to wind consistently. The constraint is enforced strictly — no trade-off against loss or volume is accepted.

Both values are reported in the design detail panel for every selected Pareto point, giving the engineer full visibility into design margins before committing to a core.

Interleaving and AC Winding Loss

At 100 kHz, AC winding resistance is frequently the largest single loss contributor — not core loss. The Dowell model makes this visible, and the interleaving choice has a dramatic effect.

For the ETD34/N87 design with AWG22 primary wire, Δ=dwπ/4/δ1.37\Delta = d_w \sqrt{\pi/4} / \delta \approx 1.37. With a simple P-S arrangement and 4 primary layers, the Dowell model gives FR4.8F_R \approx 4.8. Primary copper loss is 4.8× the DC prediction.

P-S-P interleaving splits the primary into two halves flanking the secondary. Each half now has only 2 effective layers. The proximity effect term (nl21)(n_l^2 - 1) drops from 15 to 3 — a 5× reduction. The resulting FRF_R falls from 4.8 to approximately 1.9, cutting AC copper loss by more than half.

For the 48V flyback example, switching from P-S to P-S-P interleaving reduces primary copper loss from approximately 310 mW to 120 mW — 190 mW recovered from a winding order change that costs nothing in BOM or board area. The optimizer evaluates all four interleaving options (None, P-S-P, S-P-S, Full) for every candidate and selects the best automatically.

Practical Design Rules From the Optimizer's Tendencies

Running this optimizer across a range of topologies and frequencies reveals consistent patterns.

Higher turns ratio → prefer N97 over N87 for efficiency. A 4:1 turns ratio increases N1 relative to N2, raising fill factor pressure and favoring geometries with larger winding windows. N97's lower core loss in larger ETD geometries (ETD39, ETD44) provides the right combination. Above 200 kHz, change materials before changing core geometry. The f1.86f^{1.86} core loss scaling makes material selection more impactful than size selection at high frequency. The optimizer selects this material crossover empirically; the design engineer should make it deliberately. The optimizer finds the right air gap automatically. Smaller gap gives higher magnetizing inductance and lower reactive copper loss but brings BpkB_{pk} closer to saturation. Larger gap lowers BpkB_{pk} but wastes turns in magnetizing current. The optimizer's gap selection for the ETD34/N87 design — 0.5 mm — balances these effects across all 10 operating points and would be difficult to find by hand iteration. For tight thermal budgets, ETD outperforms PQ at similar volume. ETD cores have lower thermal resistance per unit volume than PQ cores of equivalent power handling. For the same total loss, an ETD design runs 8–12°C cooler. When the thermal constraint is binding (ambient above 50°C or power density above 0.5 W/cm³), ETD geometries dominate the Pareto front.

Conclusion

Manual transformer design produces workable designs that are rarely optimal — either oversized for their efficiency target, or thermally marginal because the core was selected for minimum volume without evaluating worst-case operating points. The interaction between core geometry, material Steinmetz coefficients, AC winding resistance, air gap, and thermal resistance is too high-dimensional for intuition to navigate reliably.

The Magnetics Optimizer automates the exhaustive search: up to 500 × 400 candidate evaluations (paid tier), 113-core vendor-agnostic database, evaluated at 10 operating points per candidate, returning the complete Pareto front of efficiency versus volume. You choose where on that front your application sits — and you have the physics-grounded data to defend the choice.

Run the Magnetics Optimizer

Related Articles