Series-resonant energy conversion with multi-segment current waveforms for bipolar energy flow