Multi-mode tri-state operation of a 4-switch bidirectional DC-DC converter for interfacing a supercapacitor to a DC grid