Power grid energy storage battery charging and discharging working principle