Energy Storage System Optimization