Bidirectional energy storage inverter modeling