## 1 Introduction
### The Mathematical Model of AGC Power Dynamic Allocation with EV Charging Stations  
Under the framework of auxiliary frequency regulation of EV charging stations, the regulation cost target is considered in AGC power allocation with EV charging stations. Particularly, it aims to distribute the total generation command of the EV centralized control center among all the EV charging stations. Moreover, the dynamic regulation features of all EVs are similar for AGC, as they can regulate their power outputs with a much faster response speed than the traditional thermal or hydro units. Hence, the objective function only regards the cost as the cost coefficient is the main difference between different EVs, which can be expressed as follows:  
\[\text{min}f=\sum_{i=1}^{n}\sum_{w=1}^{W_{i}}C_{iw}\Delta P_{iw}, \tag{1}\]  
where \(f\) represents the total regulation cost target of the EV participating the frequency regulation; \(C_{iw}\) means the regulation cost coefficient of the \(w\)th battery of the \(i\)th EV charging station, which is the main parameter of each station; \(\Delta P_{iw}\) is the power generation instruction assigned to the \(w\)th EV  
Figure 1: Framework of automatic generation control (AGC) power dynamic allocation with electric vehicle (EV) charging stations. battery of the \(i\)th EV charging station, which is also the decision variable; \(i\) represents the number of EV charging stations; \(W_{i}\) represents the total number of EV batteries of the \(i\)th EV charging station; and \(n\) is the number of charging stations. To minimize the total regulation cost, the AGC power dynamic allocation should simultaneously satisfy various operation constraints, as follows:  
(1) Power balance constraint: the total generation command should be balanced by all the charging stations, while the generation commands of each charging station should be equal to the sum of generation command of its controlled individual EVs, as follows:  
\[\left\{ \begin{array}{c}\Delta P_{\text{EV}\,\Sigma}=\sum\limits_{i=1}^{n} \sum\limits_{w=1}^{W_{i}}\Delta P_{iw}\\ \Delta P_{i}=\sum\limits_{w=1}^{W_{i}}\Delta P_{iw},i=1,2,\ldots,n\end{array}  \right., \tag{2}\]  
where \(\Delta P_{\text{EV}\,\Sigma}\) denotes the general power generation instruction issued by the power grid dispatching center sent to the EV centralized control center; and \(\Delta P_{i}\) represents the power generation instruction of the \(i\)th EV charging station, which is also the decision variable. (2) Regulation direction constraint: the regulation direction of each charging station should be consistent with the total generation command, as follows:  
\[-\Delta P_{\text{EV}\,\Sigma}\cdot\Delta P_{iw}<0,i=1,2,\ldots,n,m=1,\;2, \cdots,W_{i}. \tag{3}\]  
(3) Capacity constraint: both the regulation power and the SOC of each EV should be limited within their lower and upper bounds, and the direction of each charging station should be consistent with the total generation command, as follows:  
\[\left\{ \begin{array}{c}\Delta P_{iw}^{\text{min}}\leq\Delta P_{iw}\leq \Delta P_{iw}^{\text{max}}\\ \text{SOC}_{iw}^{\text{min}}\leq\text{SOC}_{iw}\leq\text{SOC}_{iw}^{\text{ max}}\\ i=1,2,\ldots,n,m=1,\;2,\cdots,W_{i}\end{array} \right., \tag{4}\]  
where \(\Delta P_{iw}^{\text{max}}\) and \(\Delta P_{iw}^{\text{min}}\) denote the upper and lower limit, respectively, of the regulating capacity of the \(w\)th EV battery in the \(i\)th EV charging station, which are the known parameters; SOC\({}_{iw}^{\text{max}}\) and SOC\({}_{iw}^{\text{min}}\) are the upper and lower limit constraints, respectively, of the \(w\)th EV battery in the \(i\)th EV charging station allowed to participate the frequency regulation, which are the known parameters. Under the framework of real-time dispatching of a power system that involves EV charging stations, the charging stations participate in power system frequency regulation with the expectation of obtaining certain benefits.