This paper proposes two power flow control algorithms for a grid-connected voltage source converter used as part of the energy storage for a smart grid under unbalanced voltage conditions. Both algorithms are improvements of the dual vector current control algorithm (DVCC). The first proposed algorithm, DVCC_CL, optimizes the method of limiting phase currents for the duration of voltage unbalance. The second proposed algorithm, DVCC_HB, provides high bandwidth control of active and reactive power. Which of the two proposed algorithms is the better choice depends on the grid code requirements and the constraints imposed by the particular energy storage system which the inverter connects to the grid. The operation of both algorithms was verified within the framework of an ultralow-latency hardware-in-the-loop emulator, which makes accurate analysis of converter behavior safe and easy for any grid conditions. Index Terms-Current control, energy storage, hardware-inthe-loop (HIL), power control, power quality, smart grid.