Multi-mode control of series and parallel converters for bidirectional power systems