Design of a control unit for advanced gate drivers featuring adaptive dead-time and diagnostics