Optimization of Battery Energy Storage Systems for Energy Markets and Future Energy Communities | IEEE Conference Publication | IEEE Xplore