In this paper, we propose a globally optimal scheduling scheme and a locally optimal scheduling scheme for EV charging and discharging. We first formulate a global scheduling optimization problem, in which the charging powers are optimized to minimize the total cost of all EVs which perform charging and discharging during the day. The globally optimal solution provides the globally minimal total cost. |