Skip to content
RFrftools.io
Power ElectronicsMarch 1, 202611 min read

Magnetics Optimizer: Pareto-Optimal Transformers

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.

Contents

Why Magnetics Design Is Still Hard

Power electronics simulation has gotten really good. You can throw a full switching converter into SPICE, run Monte Carlo on your control loop, even predict radiated emissions before you've spun the board. But magnetics? Still stubbornly manual. The workflow hasn't changed much in decades: estimate your required volt-seconds, flip through a vendor catalog and pick a core based on power-handling rules of thumb, calculate turns, check that the winding actually fits in the window, verify peak flux density stays below saturation, and cross your fingers that the thermal rise is acceptable.

Here's the problem — "pick a core from the catalog" isn't really 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 one with different trade-offs. Each material has its own Steinmetz coefficients, saturation flux density, and thermal resistance. ETD cores give you high-volume winding space; PQ cores are better for low-profile assemblies. N87 and N97 ferrites from TDK have completely different core loss profiles at 100 kHz versus 500 kHz. Powdered iron toroids can handle higher saturation flux but you pay for it in high-frequency core loss.

And here's what makes it worse: there's 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 directly conflict with each other. The right trade-off depends entirely on your thermal budget, board footprint constraint, and efficiency target. Most engineers just pick something that looks reasonable and move on — but you're leaving performance on the table.

The Magnetics Optimizer addresses this head-on. 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. What you get back is the Pareto front: every design for which no improvement in efficiency is achievable without increasing volume. You're not guessing anymore — you're choosing from the mathematically optimal set.

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

The worked example we'll use throughout this post is a primary-side regulated flyback transformer. Specs are: 48V input (nominal), 12V output at 3A (36W total), 100 kHz switching frequency, 45% duty cycle. Pretty typical for a small isolated DC-DC converter. Here are 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 number drives everything else — turns selection and core area. It must be supported without saturating the core and reset completely during the off-time. This is the fundamental constraint that couples turns count, core geometry, and switching frequency. Get it wrong and your transformer either saturates or doesn't reset properly.

Why Multi-Objective Optimization Actually Matters

Let's look at two extreme designs for this flyback to see why you can't just optimize for one thing.

Design A — minimum loss: Use an ETD44 core with Ae=173mm2A_e = 173\,\text{mm}^2. That large cross-section supports the required volt-seconds with moderate turns and low peak flux density — maybe 80 mT. Core loss is small. You can use fat primary wire and keep DC resistance low. Efficiency exceeds 98%. Sounds great, right? Except the ETD44 has a volume of approximately 18 cm³. That's a big transformer. Design B — minimum volume: Use an EE25 core with Ae=52mm2A_e = 52\,\text{mm}^2. You need fewer turns, but peak flux density has to approach 240 mT to satisfy the volt-second constraint. Core loss increases substantially — and here's why that hurts: 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\%. That's brutal. But volume drops to around 3 cm³ — one-sixth of Design A.

Neither is universally better. If you're designing a data-center power supply, you'll take the larger core for the efficiency gain. If you're designing a medical wearable charger, you need the small footprint regardless of the efficiency hit. The correct answer isn't one design — it's the Pareto front. All the designs where no improvement in efficiency is achievable without increasing volume. Then you pick the one that fits your constraints.

The Algorithm: NSGA-II

The optimizer uses NSGA-II (Non-dominated Sorting Genetic Algorithm II), implemented with the DEAP library. If you're not familiar with genetic algorithms, here's the basic idea: maintain a population of candidate designs, evaluate both objectives for each candidate, rank individuals by Pareto dominance, and use a crowding-distance metric to preserve diversity along the front. That last part is important — it prevents the population from collapsing to a single point. You want the full spectrum of trade-offs, not just one "pretty good" design.

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 like flyback and forward, N2 isn't optimized directly. It's 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, which helps convergence.

Here's something important that most optimizers get wrong: the algorithm evaluates each candidate at 10 operating points. That's 5 load fractions (20%, 40%, 60%, 80%, 100%) times 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 just tuned to a single nominal condition. A design that looks great at 100% load and nominal input might saturate at 110% input voltage. The optimizer catches that.

With 200 individuals and 150 generations on the free tier, the optimizer performs approximately 120,000–150,000 evaluations. On the Fargate worker, this completes in roughly 20–40 seconds. Fast enough to iterate during a design review.

Physics Models

The fitness function chains four physics models in sequence for each candidate. Let's walk through them.

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 — frequency in Hz, flux density in T, power in W. For TDK N87, the coefficients are: Cm=0.0585C_m = 0.0585, α=1.86\alpha = 1.86, β=2.86\beta = 2.86. That steep β\beta exponent is the dominant sensitivity. Small reductions in peak flux density yield large core loss improvements. This is why pushing flux density to save volume is so expensive in terms of efficiency.

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

For power inductors, the formula changes slightly: Bpk=LIpeak/(N1Ae)B_{pk} = L \cdot I_{peak} / (N_1 \cdot A_e) where LL is computed from the gapped core inductance model. The point is that flux density is set by your volt-second product and core geometry — you can't cheat it.

AC winding resistance — Dowell model:

Skin effect and proximity effect both increase effective winding resistance at switching frequency. You can't ignore this at 100 kHz. 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 is δ=ρCu/(πfμ0)209μm\delta = \sqrt{\rho_{Cu}/(\pi f \mu_0)} \approx 209\,\mu\text{m}. AWG22 wire has a diameter of 0.644 mm, giving Δ1.5\Delta \approx 1.5. With 4 primary layers, FR5F_R \approx 5. Your AC resistance is five times your DC resistance. That's why proper interleaving matters so much — the optimizer evaluates all three interleaving options and selects the best automatically.

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. This is actually a useful property for manufacturing tolerance — you're not fighting batch-to-batch variation in ferrite permeability.

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. The optimizer won't hand you a design that melts.

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}
These aren't negotiable. A design that violates any of them is marked infeasible and discarded.

Running the Optimizer: Results for the 48V Flyback

After the run completes, the tool displays the Pareto front as a scatter plot — loss versus volume. Every point is clickable to view design details. There's also an evolution convergence chart showing the hypervolume indicator growing toward a plateau. Once that curve flattens, additional generations yield diminishing returns. You're done.

Here are 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 is 0.118 T against N87's Bsat=0.39TB_{sat} = 0.39\,\text{T} — that's a 70% saturation margin against the derated limit. Plenty of headroom.

Design A shows what the larger ETD44 buys you. Core loss drops because Bpk=0.071TB_{pk} = 0.071\,\text{T} is barely a third of Design B's flux density. With β=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. If you have the board space, this is a no-brainer.

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 you've built any hardware. That's valuable — most engineers don't discover thermal margin problems until the prototype is smoking.

Comparing Core Materials

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

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. This makes sense — N97 is more expensive, so you only use it when efficiency justifies the cost.

Powdered iron (R material, Mix26) appears on the Pareto front only when high saturation flux density is needed. That's 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. If you were designing a 500W boost converter with heavy DC bias, you'd see powdered iron show up.

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. That's brutal. Switching from N87 to 3F36 at 200 kHz recovers roughly half this increase. The optimizer finds this crossover empirically — there's no hard-coded frequency threshold. It just evaluates everything and picks the winner.

Saturation Margin and Fill Factor

When magnetics are designed by hand, the two most common production failures are core saturation and overfilled winding windows. I've seen both kill entire production runs. 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%. Combine that with a 10% reduction in N1N_1 from a tolerance-induced design change, and 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. Most engineers use 10–15%, which is tight. 20% gives you room for real-world variation. 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. Ask any magnetics house — they'll tell you 0.40 is already optimistic for hand-wound assemblies. The constraint is enforced strictly. No trade-off against loss or volume is accepted. If it doesn't fit, it's not a valid design.

Both values are reported in the design detail panel for every selected Pareto point. You get full visibility into design margins before committing to a core. This alone saves weeks of iteration with your magnetics vendor.

Interleaving and AC Winding Loss

At 100 kHz, AC winding resistance is frequently the largest single loss contributor — not core loss. Most engineers underestimate this. The Dowell model makes it 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. If you calculated resistance based on wire length and DC resistivity, you're off by a factor of five. That's why your prototype runs hot.

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. That's 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. You don't have to think about it — it's already optimized.

Practical Design Rules From the Optimizer's Tendencies

Running this optimizer across a range of topologies and frequencies reveals consistent patterns. These are the kinds of things you learn after designing a few hundred transformers, but now the optimizer just tells you.

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. If you're doing a 48V to 3.3V flyback with a 12:1 turns ratio, N97 wins almost every time. 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, but you should make it deliberately. Don't try to force N87 to work at 500 kHz — switch to N49 or 3F36 and save yourself the headache. 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. Finding that by hand iteration would take hours. The optimizer does it in 30 seconds. 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. If you're doing a high-temperature automotive design, pay attention to this.

Why This Matters

Manual transformer design produces workable designs that are rarely optimal. They're 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. You can get close, but you're leaving performance on the table.

The Magnetics Optimizer automates the exhaustive search. Up to 500 × 400 candidate evaluations on the 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. No more guessing. No more "let's just try a bigger core and see what happens." You know exactly what you're trading off.

Run the Magnetics Optimizer

Related Articles