How energy storage technology is used in power grids