Calculation formula for grid-side energy storage demand