Review of ancillary services and optimal sizing of an energy storage system in a microgrid