How to calculate the energy storage formula for electrical equipment