Capacity optimization of hybrid energy storage system for flexible islanded microgrid based on real-time price-based demand response