How to design a flyback transformer

The transformer for a flyback converter is used as the converters inductor as well as an isolation transformer.

=Variables and acronyms=
 * Universal constants
 * Permittivity of free space $$\mu_o$$ (Wb A−1 m−1)
 * $$\mu_o = 4\pi 10^{-7}$$ (Wb A−1 m−1)


 * Wire variables:
 * $$\rho$$, Wire resistivity                 (Ω-cm)
 * $$I_{tot}$$, Total RMS winding currents    (A)
 * $$I_{m,max}$$, Peak magnetizing current    (A)
 * $$I_{RMS}$$, Max RMS current, worst case (A)
 * $$P_{cm}$$, Allowed copper loss            (W)
 * $$A_c$$, Cross sectional area of wire    (cm2)


 * Xformer/inductor design parameters
 * $$n_1, n_2$$, turns                        (turns)
 * $$L_m$$, Magnetizing inductance (for an xformer)            (H)
 * $$L$$, Inductance                        (H)
 * $$K_u$$, Winding fill factor               (unitless)
 * $$B_{max}$$, Core maximum flux density     (T)


 * Core parameters
 * EC35, PQ 20/16, 704, etc, Core type                 (mm)
 * $$K_g$$, Geometrical constant             (cm5)
 * $$K_{gfe}$$, Geometrical constant         (cmx)
 * $$A_c$$, Cross-sectional area            (cm2)
 * $$W_A$$, Window area                      (cm2)
 * $$MLT$$, Mean length per turn             (cm)
 * $$l_m$$, Magnetic path length             (cm)
 * $$l$$, or $$l_g$$, Air gap length             (cm)
 * $$\mu$$, Permittivity                    (Wb A−1 m−1)
 * $$\mu_r$$, Relative Permittivity         (unitless)
 * $$\mu = \mu_o \mu_r$$


 * Acronyms
 * RMS: root-mean-squared - $$x_\text{rms} = \sqrt{ \langle x^2 \rangle} \,\!$$ (where $$\langle \ldots \rangle$$ denotes the arithmetic mean)
 * MLT: mean length turn
 * AWG: American wire gauge

=Initial calculations=


 * Variables
 * $$V_o$$ - output voltage [V]
 * $$V_{in}$$ - input voltage [V]
 * $$V_D$$ - diode voltage drop [V]
 * $$V_{Rds}$$ - transistor on voltage [V]
 * $$N$$ - turns ratio [unitless]
 * $$D$$ - duty cycle [unitless]

$$\frac{ V_o + V_D }{ V_{in} - V_{Rds} } = \frac{ 1 }{ N } * \left ( \frac{ D_{max} }{ 1 - D_{max} } \right )$$
 * Calculate turns ratio


 * Diode
 * Rectifier: $$V_D = 0.8V$$
 * Schottky diode: $$V_D = ?$$

=Inductance calculations= The inductance of the transformer, $$L_m$$, controls the current ripple.

Say you want a current ripple 50% of average current.

$$ \Delta i = 0.5 * I $$

let $$n = \frac{n_2}{n_1}$$
 * Solve for $$L_m$$:

$$ I=\frac{n}{D'}I_{load} $$

$$ \Delta i = \frac{nI_{load}}{2D'} $$

$$ L_m = \frac{V_g D T_s}{2 \Delta i} $$

$$ L_m=\frac{\mu A_c n_1^2}{l} $$

The permittivity of free-space is so much larger than the permittivity the transformer material, that the magnetic path length, $$l$$, can be estimated to be the air gap length, $$l_g$$. so $$l = l_g$$ and

$$ L_m=\frac{\mu_o A_c n_1^2}{l_g} $$

Minimize total power loss: $$P_{tot} = P_{fe} + P_{cu}$$
 * Solve for $$n$$:

Core loss: $$P_{fe} = K_{fe} \Delta B^\beta A_c l_m$$

$$B_{ac} = \frac{L_m \Delta i}{n_1 A_c}$$

The $$\beta$$ and $$K_{fe}$$ are in the core material's datasheets

=Core calculations=

Core selection

 * Variables
 * $$P_{Fe}$$ - power loss in the core [$$W$$]
 * $$B_{sat}$$ - saturation flux density [$$T$$]
 * $$B_{max}$$ - max flux density [$$T$$]
 * $$\Delta B $$ - change in  flux density [$$T$$], aka $$B_{ac}$$
 * $$A_w$$ - winding area [$$cm^2$$]
 * $$A_e$$ - effective cross-setional area of the core [$$cm^2$$]
 * $$AP$$ - Area Product [$$cm^4$$]
 * $$K_u$$ - window utilization factor, or fill factor [unitless]
 * $$N_P$$ - number of turns on the primary [unitless]
 * $$N_S$$ - number of turns on the secondary [unitless]
 * $$N_B$$ - number of turns on the bias [unitless]
 * $$\mu_o$$ - permittivity of free space (air) $$\mu_o = 2 \pi 10^{-7}$$ [H/m]


 * Material specifications

$$AP_{min} = 10^3 * \left ( \frac{ L_p * I_{Prms} }{ \Delta T^{ \frac{1}{2} } * K_u * B_{max} } \right )^{1.316}$$ [$$cm^4$$]
 * Calculate minimal AP needed


 * $$B_{max}$$ should be less than $$B_{sat}$$, to avoid core saturation. for example $$B_{sat} > 0.3T$$, then for a conservative calculation use $$B_{max} = 0.25T$$


 * $$\Delta T = T_{max} - T_{amb}$$
 * Generally $$T_{max} = 100C$$ and $$T_{amb}=30C$$


 * Using $$K_u=0.3$$ for off-line power supplies is a good estimate


 * Calculate minimum number of primary and secondary turns
 * $$N_{P-min} = \frac{ L_p * I_{pk} * 10^4 }{ B_{max} * A_e }$$
 * $$N_{S-min} = \frac{ N_{P-min} }{ N }$$


 * Calculate actual number of turn on the primary and secondary to be used.
 * $$N_S$$: Round up $$N_{S-min}$$ to the nearest integer
 * $$N_P = N * N_S$$

$$l_g = \frac{ \mu_o * N_P^2 * A_e * 10^{-2} }{ L_p }$$
 * Calculate air gap

=Current calculations=


 * Variables
 * $$I_{pk}$$ - Ripple current max peak
 * $$I_{min}$$ - Ripple current min peak
 * $$\Delta I_{pp}$$ - pk-pk ripple current $$I_{pk} - I_{min}$$

$$I_{pk} = \left ( \frac{ I_{out-max} }{ N } \right ) * \left ( \frac{ 1 }{ 1 - D_{max} } \right ) + \frac{ \Delta I_L }{ 2 }$$
 * Peak current

$$I_{dc}=D \frac{I_{pk}+I_{min}}{2}$$
 * DC current

$$I_{rms}=\sqrt{ D \left ((I_{pk}+I_{min}) + \frac{1}{3} (I_{pk}+I_{min})^2 \right )}$$
 * RMS current

$$I_{rms}=\sqrt{ I_{rms}^2 - I_{dc}^2 }$$
 * AC current

=Power Loss= $$P_{tot}=P_{fe}+P_{cu}$$

=References=
 * U of Colorado - Flyback transformer design
 * TI - "Magnetics Design 4 - Power Transformer Design" - very good, long, description of transformers and design
 * TDK ferrite materials
 * IRF - Flyback Transformer Design - nice description of howto wind the transformer
 * TI - Magnetics Design 5 - Inductor and Flyback Transformer Design - describes various converters DCM and CCM
 * OFFLINE FLYBACK CONVERTERS DESIGN METHODOLOGY WITH THE L6590 FAMILY - very good, full description of designing an offline flyback converter
 * Isolated 50 Watt Flyback Converter Using the UCC3809
 * TOPSwitch Flyback Transformer Construction Guide