Запис е-пошти: A Model Predictive Control Framework for Combining Energy Arbitrage and Power Quality Applications From Energy Storage Systems