Efficiency of energy storage systems