Size a flyback's RCD clamp by choosing the clamp voltage above the reflected voltage (typically 1.5 to 2.5 times it), then the resistor dissipates , so , and the capacitor sets the ripple, . For a 48 V to 12 V, 24 W, 100 kHz flyback with 7.7 µH of leakage and a 1.375 A peak, a 64 V clamp gives 1.46 W, 2.81 kΩ and 71 nF; simulated, the clamp settles at 59.9 V and the resistor takes 1.28 W, and the formula stays within 2 % of the simulation when it is given the simulated peak current and reflected voltage.
This article explains why the clamp is needed, how to choose its voltage, where the formula comes from and where it stops being accurate, what the capacitor does, and when a TVS diode is the better clamp. The numbers come from Voltecx runs, checked by a test in the Voltecx source.
Why a flyback needs a clamp
A flyback transformer is a coupled inductor: while the switch is on, the primary stores energy in the magnetising inductance; when it turns off, the secondary diode conducts and the energy goes to the output. The coupling is never perfect. A part of the primary inductance, the leakage inductance , is not coupled to the secondary, and its current at turn-off has nowhere to go: it cannot jump to the secondary.
Without a clamp, the leakage current charges the switch's output capacitance and the drain rises until the switch avalanches. With an RCD clamp, the drain rises only until the clamp diode conducts at ; the leakage current then flows into the clamp capacitor and falls at the rate , while the secondary current rises. The clamp capacitor holds and the resistor bleeds the energy off between pulses.
Erickson and Maksimović (Fundamentals of Power Electronics, 3rd ed., chapter 6) derive the flyback; C. Basso, Switch-Mode Power Supplies: SPICE Simulations and Practical Designs, 2nd ed., chapter 7, covers the clamp in practice; and Fairchild Semiconductor's application note AN-4147, Design Guidelines for RCD Snubber of Flyback Converters, gives the formulas used below (its equations 3 to 5).
The circuit
The example is the flyback template of Voltecx (circuit.template with {"topology":"flyback","vin":48,"vout":12,"iout":2,"fsw":100e3}): 48 V to 12 V at 2 A, 100 kHz, duty cycle 0.4, continuous conduction. The template computes:
- the turns ratio , so the reflected voltage is V;
- the magnetising current A with a 20 % ripple of 0.25 A, so the primary peak is A;
- the primary inductance = 771.9 µH and a coupling of = 0.995, so the leakage is µH;
- an ideal switch with 340 pF across it, a 10 mΩ clamp diode, and the clamp and from the clamp voltage V.
The runs last 8 ms on the template's fixed 50 ns step, long enough for the clamp to settle (its time constant is at most 1.6 ms in the sweeps), and the measurements use the last 0.2 ms.
Choosing the clamp voltage
The clamp voltage is a trade-off between the switch's voltage rating and the clamp's loss:
- The switch sees plus a small overshoot. Here V, so a 150 V MOSFET has margin.
- The clamp must stay above the reflected voltage, or it would conduct the magnetising energy that belongs to the output. As approaches , the leakage current falls slowly (its rate is ), the secondary takes over slowly, and the clamp takes energy from the input as well as the leakage.
That is the factor in the loss formula. At the clamp dissipates twice the leakage energy; at , three times; at , 1.5 times. Most designs settle between 1.5 and 2.5 times , and the template uses 2.
The formula
During the clamp interval the leakage current falls linearly from to zero in
and the clamp receives per period. Per second:
For the example:
The capacitor is chosen for the ripple of the clamp voltage. It is charged once per period and discharges through for nearly a whole period:
For a 5 % ripple, V and nF.
What the simulation shows
At the designed values the clamp settles at 59.9 V and its resistor takes 1.28 W, both below the design's 64 V and 1.456 W. The drain peaks at 108.7 V. After the clamp diode stops, the drain rings around : the leakage inductance against the switch's 340 pF.
Two things in the simulation differ from the design's assumptions:
- the primary current peaks at 1.32 A, not 1.375 A, and
- the output sits at 11.2 V, not 12 V: the template runs open loop at D = 0.4, and its source has 0.96 Ω, so the reflected voltage is V.
Given those two, the formula gives 60.9 V, 1.7 % above the simulated 59.9 V. The design formula is on the safe side: it overestimates the loss and the clamp voltage, which is what you want for choosing the resistor's rating and the switch's.
The ripple is 2.91 V against the formula's 3.00 V, 3 % below it.
Sweeping the resistor
Changing moves the clamp voltage: with more resistance the capacitor must charge higher before the resistor bleeds off the energy. Solving the formula for :
with . Against the simulation (the formula with the simulated peak and reflected voltage at each point):
| , Voltecx | Loss, Voltecx | Formula below simulation by | |
|---|---|---|---|
| 0.7 kΩ | 41.9 V | 2.51 W | 0.9 % |
| 1.4 kΩ | 49.6 V | 1.76 W | 1.0 % |
| 2.81 kΩ | 59.9 V | 1.28 W | 1.7 % |
| 5.6 kΩ | 76.5 V | 1.05 W | 3.2 % |
| 11.2 kΩ | 95.5 V | 0.82 W | 8.4 % |
| 22.4 kΩ | 118.1 V | 0.62 W | 14.9 % |
(The last column is how far the simulated clamp voltage is below the formula's.)
Up to about twice the reflected voltage, the formula is within 2 %. At higher clamp voltages it overestimates more and more: at 118.1 V the simulated clamp is 15 % below it and the resistor takes 0.62 W, less than the leakage energy alone (0.67 W at the simulated peak). The formula assumes all the leakage energy reaches the clamp. In the circuit, the switch's output capacitance takes part of it on the way: the drain must charge from to before the clamp diode conducts, and that capacitive energy grows with ; it later rings back. Cutting the switch's capacitance from 340 pF to 20 pF at 22.4 kΩ reduces the gap from 15 % to 4 %. The remaining 4 % comes from the formula's other simplifications, such as the secondary current that starts to flow while the drain is still rising.
For design this is good news: at the usual 1.5 to 2.5 times the formula is accurate, and above that it errs on the safe side.
Sweeping the capacitor
At 2.81 kΩ, changing hardly moves the mean clamp voltage but sets its ripple:
| Ripple, Voltecx | ||
|---|---|---|
| 10 nF | 20.5 V | 21.2 V |
| 22 nF | 9.37 V | 9.66 V |
| 71.1 nF | 2.91 V | 3.00 V |
| 220 nF | 0.94 V | 0.97 V |
The ripple matters because the drain peak follows the top of it: with 10 nF the drain reaches 117.6 V instead of 108.7 V. A capacitor too small wastes the switch's voltage margin; one too large only costs board area and slows the clamp's response at start-up and in load steps. The clamp capacitor carries the leakage current pulses, so use a part rated for pulse current (film or C0G ceramic).
A TVS clamp
A TVS diode (or a Zener) clamps at a fixed voltage instead of one set by a resistor and the leakage energy. Voltecx's flybackTvsClamp example shows it on a small flyback: 12 V in, a 1:1 coupled inductor of 50 µH with = 0.95 (so µH), 100 kHz at D = 0.4, an RCD clamp with a deliberately large 100 kΩ resistor, and a Vishay SMBJ24A across the resistor (document 88392, revision 09-Jan-2024: stand-off 24 V, breakdown 26.7 to 29.5 V, 38.9 V at 15.4 A).
- With the TVS, the clamp stays between 27.6 V and 32.2 V (mean 28.4 V), the drain peaks at 44.2 V ( V), the TVS carries 0.80 A pulses and takes 0.40 W.
- Without it, the 100 kΩ resistor cannot bleed the energy until the clamp has climbed to 178 V, most of the way within a millisecond and all of it by about 2 ms, and the drain peaks at 191 V.
A TVS clamp holds the drain at a known voltage regardless of the load and the leakage, which an RCD cannot, so it is common in low-power supplies and as the upper limit in parallel with an RCD. Its losses are the same leakage energy times the same factor, only at a fixed , and they heat a small package: check the TVS's average power rating, not only its pulse rating. Its clamping voltage also moves with current and temperature, so the switch's margin must cover the upper end of its range.
Common mistakes
- A clamp voltage too close to . The clamp then takes magnetising energy as well, the loss grows steeply, and the efficiency falls.
- Forgetting the input voltage. The switch sees ; at high line it is the input that sets the switch's rating.
- Sizing at the nominal point only. The leakage energy grows with the square of the peak current; size the clamp where the peak is highest. Voltecx's design flow sizes it at the highest input and full load.
- A slow clamp diode. Use an ultrafast diode: during its reverse recovery the clamp capacitor discharges back into the leakage.
- Using the formula far above . It overestimates there; at high clamp voltages simulate it.
How to do it in Voltecx
- Build the flyback with
circuit.templateand{"topology":"flyback","vin":48,"vout":12,"iout":2,"fsw":100e3}; its reply lists the design values with their formulas, among themLlk,Vsn,Psn,RsnandCsn. - Set Simulation › Settings (
simulation.settings)tEndto 8 ms and run (Simulation › Run Simulation,simulation.run). - Measure over the last 0.2 ms with Scope › Measurements (
scope.measure): the mean ofi(Rsn)times is the clamp voltage, its RMS squared times is the loss, and the maximum ofi(T1.1)is the primary peak. - Sweep
Rsn.rorCsn.cwith Analysis › Parameter Sweep (analysis.paramSweep). - Open File › Open Example › flybackTvsClamp (Power quality) for the TVS clamp.
- The automatic design (
design.auto) re-sizes the clamp with the designed transformer's own leakage at the highest input and full load.
The numbers are checked by the_rcd_post_clamp_voltage_and_loss_match_the_formula and the_rcd_post_tvs_caps_the_clamp_voltage in crates/engine/src/auto/tests_blog.rs. The transformer side of the same design is in flyback transformer design, step by step.
Frequently asked questions
What clamp voltage should a flyback RCD clamp have?
Between about 1.5 and 2.5 times the reflected voltage , and low enough that plus an overshoot stays inside the switch's rating. At the clamp dissipates twice the leakage energy.
How do I calculate the RCD clamp resistor?
Compute the clamp power at the highest peak current, then . In the example, 1.456 W at 64 V gives 2.81 kΩ.
How do I size the clamp capacitor?
For the ripple you accept: . A 5 % ripple on 64 V with 2.81 kΩ at 100 kHz needs 71 nF. The simulated ripple is 3 % below the formula.
Why is my clamp voltage lower than calculated?
The formula assumes the whole leakage energy reaches the clamp. Part of it charges the switch's capacitance, and part goes to the secondary while the drain is still rising, so the clamp settles lower, increasingly so at high clamp voltages. In the example the clamp is 1.7 % below the formula at the design point and 15 % below it at 22.4 kΩ.
RCD or TVS clamp?
An RCD clamp's voltage floats with the load and the leakage; a TVS holds a fixed voltage. A TVS gives a predictable switch stress and suits low power; an RCD spreads the loss over a resistor and suits higher power. Many designs use an RCD with a TVS as the upper limit.