Diode losses in switching power supply
The following information is taken from the slides for Coursera's Introduction to Power Electronics class, which is based on ECEN5797 at the University of Colorado Boulder.

You will need to know the following parameters, which come from your design and the diode datasheet:

\$t_{r}\$: Diode reverse recovery time (typically tens of nanoseconds)

\$Q_{r}\$: Reverse recovery charge (not sure what's typical -- hundreds of nanocoulombs?)

\$I_L\$: Average inductor current

\$V_{DR}\$: Diode reverse voltage -- equal to the input voltage \$V_g\$ (for a buck converter) or the output voltage \$V\$ (for a boost converter)

\$T_S\$: The switching period

Assume that the diode changes at the end of the reverse recovery transient. This is a pessimistic assumption. These graphs show the transistor and diode waveforms for a buck converter:



Using this assumption, the reverse recovery power loss can be approximated as:

$$V_{DR}(\frac{t_r I_L}{T_S} + \frac{Q_r}{T_S})$$