A coordinated model predictive control of grid-connected energy storage systems