Understanding Diode Reverse Recovery and its Effect on Switching Losses