Battery Energy Storage for Grid Flexibility and Resilience