# Orderly Charging and Discharging Group Scheduling Strategy for Electric Vehicles
## 2 Electric Vehicle Cluster Layered Response Process
### Electric Vehicle Cluster Hierarchical Response Process  
This paper considers the electric vehicle cluster from the day-ahead and the real-time perspectives. In the previous period, the charging load of electric vehicles was simulated on the basis of historical traffic statistics, and the probabilistic statistical models were obtained for the moment when the electric vehicles were connected to the grid, \(t_{a,i}\), and the moment when they left the grid, \(t_{b,i}\). In the intraday phase, the EVGMS system takes into full consideration the willingness to respond and the response capacity by collecting information on EV charging and discharging willingness, access status, and the travel plan in real time. The EVGMS system collects information on EV charging and discharging willingness, access status, and the travel plan in real time and fully considers the response willingness and response capability. The EVs that are capable of and willing to participate in V2G are placed into the same cluster, with \(t_{a,i}\) and \(t_{d,i}\) as the cluster characteristic values, and the EVGMS system dispatches the cluster.  
In formulating the orderly charging and discharging strategy, the idea of real-time optimization is introduced into the group dispatching for the actual constraints and different characteristics of single electric vehicles, and a real-time response fractional group dispatching model designed for the orderly charging and discharging of electric vehicles in the V2G mode is established by comprehensively considering the constraints of the network, battery, and vehicle owner under the premise of ensuring the safe operation of the distribution network and the economic benefits of the vehicle owner. The model is divided into upper and lower layers to obtain charging and discharging scheduling plans for electric vehicles. The upper layer coordinates the charging and discharging power of the EV clusters in each period from the perspective of the EV clusters, to minimize the variance of the distribution network load curve in the scheduling time interval; the lower layer solves the economic cost to each electric vehicle owner within a cluster from the perspective of the optimal power allocation of the charging and discharging power of a single EV. Throughout the optimization process, each stratum utilizes the preceding optimization outcome from the counterpart layer as a known condition, facilitating information exchange between the two layers through several iterations.  
Figure 1: Electric vehicle cluster response architecture.  
The V2G real-time response group scheduling flow for electric vehicles is shown in Figure 2.  
YALMIP, as a MATLAB optimization toolbox, supplies the basic linear programming algorithms as well as the CPLEX, GLPK, and Lpsolve tools. YALMIP manages to model all problems uniformly. In particular, CPLEX has strong robustness, high optimization efficiency, and fast computation, which facilitates the solution of linear planning, quadratic planning, and the corresponding mixed-integer planning problems. CPLEX, an external solver by YALMIP, is used in this paper to solve the constructed two-layer optimization model. For each dispatch period, the optimization model yields the schedule of the electric vehicles. Ultimately, this paper takes the typical regional distribution grid load data as an example, and the model guarantees the economic operation of the grid and maximizes the  
Figure 2: Electric vehicle group scheduling process.  
economic efficiency of vehicle owners based on meeting their travel needs. The validity is verified by using the above strategies.