Flyback Converter Design Calculator: Clamp, Transformer and Loop

Rc Cc Dc Q1 D1 C1 Vout1 D2 C2 Vout2 Vin Lm TL431 + opto peak current
The flyback: while Q1 conducts the primary stores energy in the gap and the output diodes are blocked, because the secondaries have the opposite polarity (the dots); when Q1 opens the energy goes to the secondaries. Leakage-inductance energy does not: the Rc–Cc–Dc clamp collects it, limiting the drain voltage.

Introduction

The flyback is a buck-boost with a transformer in place of the inductor: the transformer isolates, scales voltages and allows several outputs with a single switch. The price is all in the transformer, which does not transfer energy but stores it in the gap, and in its leakage inductance, whose energy has to be dumped into a clamp every cycle. That is why a flyback is designed in three steps that constrain each other: the stage with its turns ratio and clamp, the transformer, the loop.

The tool covers DC input, one to three outputs, continuous and discontinuous conduction. The transformer is wound on the TDK N87 cores of the inductor calculator, with the same losses; the loop is the peak-current one with TL431 and optocoupler from the control loop calculator. Finally a switching simulation, with leakage, clamp, drain capacitance and every output, checks the numbers: the MOSFET voltage, the clamp power, cross-regulation, the loop gain and the load step.

WhatFormula
Reflected voltage\( V_{OR} = \dfrac{N_p}{N_s}\,(V_{out}+V_F) = V_{in,min}\,\dfrac{D_{max}}{1-D_{max}} \)
Magnetising inductance\( L_m = \dfrac{V_{in,min}\,D_{max}}{f_s\,K_{RP}\,I_{pk}} \)
Clamp power\( P_{cl} = \tfrac{1}{2}\,L_{lk}\,I_{pk}^2\,f_s\,\dfrac{V_{cl}}{V_{cl}-V_{OR}} \)
Right-half-plane zero (CCM)\( f_{RHP} = \dfrac{n^2 R\,(1-D)^2}{2\pi\,D\,L_m} \)

Card 1 — Specifications and power stage

Outputs (the first is the regulated one)
Vout (V)Iout (A)VF diode (V)C (µF)ESR (mΩ)
1
Stage design
VinModeDIpkPrimary RMS IVDSClamp

The design starts from the duty cycle at minimum Vin: it gives the voltage reflected onto the primary and the turns ratios. More duty means less primary peak current but more voltage on the MOSFET and less on the output diodes; 40–50 % is the usual choice. KRP sets the magnetising inductance: with 1 the flyback works at the boundary with discontinuous conduction at minimum Vin and full load, with lower values it stays in continuous conduction, with larger transformers but lower RMS currents.

Leakage is the figure you do not know before winding: 1–3 % of Lm is typical for a carefully wound transformer, and it must be measured with the secondaries shorted. With the clamp voltage chosen as a multiple of VOR the formula gives the clamp power: the closer the clamp is to VOR, the more magnetising energy it takes away.

Card 2 — Transformer

WindingNConductorIrmsRdcFR a fsLayersLoss

Primary turns come from the allowed peak B; secondary turns from the ratios, rounded to whole numbers. Rounding shifts the voltage of the unregulated outputs, and the “Outputs from the turns” field says by how much. The gap comes from TDK’s gapped AL values, with fringing, as in the inductor tool.

Transformer losses and temperature

Core loss follows the generalised Steinmetz equation on the real flyback flux, which rises for D·Ts, falls for D2·Ts and in discontinuous conduction stays flat for the rest of the period; the coefficients are N87’s at 100 °C. Copper loss is computed winding by winding with Dowell’s model on the harmonics of the real current — a trapezoid in the primary, a shifted trapezoid in the secondaries — and the temperature rise with Rth ≈ 53/√Ve.

Dowell’s model is approximate here: primary and secondaries conduct at different times, and the field between layers depends on how the windings are arranged. The tool treats each winding as if it occupied the bobbin width on its own, which is the worst case; sandwiching the primary between two halves of the secondary lowers losses and leakage.

Card 3 — Loop with TL431 and optocoupler

PartPositionComputedStandard

In continuous conduction the flyback referred to the primary is a buck-boost: the tool uses the control loop tool’s peak-current model, with Lm, the load and the capacitor referred through the turns ratio, and there is the right-half-plane zero that limits the bandwidth. In continuous conduction too the tool removes from the gain the part of the energy that leakage diverts into the clamp instead of delivering it to the output. In discontinuous conduction the transformer empties every cycle, the transferred energy depends only on the peak current and the stage has a single pole; at high frequency the shape of the secondary current pulse matters: a rise in peak current lifts the whole triangle (that is Vorperian’s 2·fs/D2 pole) and also shifts its start, and together the two make a delay of (D + D2)·Ts/2.

With several outputs the model adds to the main output’s capacitors those of the others, referred through the square of the turns ratio, because during the off-time the secondaries are tied together only by leakage; the other outputs’ load enters referred by power. If an output is lightly loaded and leakage is large the tie loosens at high frequency: the switching simulation of card 4 tells by how much.

Card 4 — Switching check

QuantityModelSimulation

The first graph is a zoom over three periods at nominal Vin. When Q1 opens, the leakage current charges the drain capacitance until the clamp stops it; then the current passes to the secondaries. In discontinuous conduction, when the secondaries run dry, the drain rings between Lm and Cd around Vin: that is the valley quasi-resonant controllers work on.

The table compares the calculation with the simulation: the clamp power, the peak VDS, the output voltages — the unregulated ones shift through cross-regulation, due to leakage, resistances and diode drops — and the loop gain at fc, measured by injecting a signal as with a network analyser. The second graph is a load step on the main output, with the other outputs following it; each point is the average over one period.

In the simulation the MOSFET is a switch and the resistance from card 1 (primary plus RDS(on)) is split half and half between MOSFET and primary, diodes have a fixed drop, the given leakage, which is the one measured on the primary with the secondaries shorted, is split half and half between primary and secondaries, and at turn-on current moves from the secondaries to the primary instantly. The drain capacitance is used only for the first graph and the peak VDS. The ringing between leakage and Cd after the clamp does not decay, because the simulation has no losses at tens of MHz (winding AC resistance, Coss losses): on the real circuit it dies out within a few hundred nanoseconds.