*3.1. The CoC-Based Optimal PEV Charging Control*

The concept of capacity of curtailment is defined to evaluate the capability of a PEV to allow charging power curtailment as shown below:

$$\text{CoC} = \left(\text{e}^{-\left(\text{T}\_{\text{Dap}} - \text{t}\right)} + 1\right) \left(\frac{\text{SOC}\_{\text{t}}}{100} \cdot \text{cap}\_{\text{batt}} + \text{I}\_{\text{batt}} \left(\text{T}\_{\text{Dap}} - \text{t}\right) - \frac{\text{SOC}\_{\text{Tar}}}{100} \cdot \text{cap}\_{\text{batt}}\right) \tag{1}$$

where SOCt and SOCTar represent the current and target state of charge, respectively. Ibatt denotes the battery charging current at the DC terminal. TDep is the PEV departure time and capbatt is the vehicle battery capacity in amp-hours. A positive value of COC means that the target SOC can be reached before the departure time with the current charging power rate. A time-related weighting factor e−(TDep−1) boosts the CoC value when a vehicle approaches its departure time.

The objective of CoC-based optimal VGI microgrid control algorithm is to curtail the charging power of PEVs with higher CoC values and leave the power capacity for the PEVs with lower CoC values when the total charging power of a microgrid is limited. In other word, the set of CoC values of the controllable PEVs in a microgrid is considered as a collection of time-varied functions of the PEV charging power: **CoC** = CoCi(PEV,i), |i ∈ **I**(*si*=1) , where the set **I**(*si*=1) represents the set of controllable PEVs. The objective is to calculate the proper charging powers for the controllable PEVs to maximize the infimum of the CoC set as shown in Equation (2).

$$\begin{aligned} \max\_{\mathbf{P}\_{\text{EV},i,i \in I\_{(\kappa\_i=1)}}} \\ \text{s.t. } \mathbf{y} \le \mathbf{C} \mathbf{o} \mathbf{C}\_i (\mathbf{P}\_{\text{EV},i}); \ \mathbf{P}\_{\text{EV},i} \in \boldsymbol{\phi}\_{\text{EV} \text{SE},i}; \text{ and } \sum\_{i \in \mathbf{I}} \mathbf{P}\_{\text{EV},i} \le \mathbf{P}\_{\text{cap}} \end{aligned} \tag{2}$$

where y is the infimum, which is the largest value that is smaller than all the CoC values. Pcap is the limited charging power of the microgrid. si represents the EVSE state. φEVSE,i is the feasible range of power consumption of EVSE i, which can be represented as Equation (3)

$$\phi\_{\text{EVSE},i} = \begin{cases} \{0\} & \text{if } s\_i = 0\\ \{\left[\text{P}\_{\text{I}1772, \text{min}} \cdot \text{P}\_{\text{EV},i,\text{max}}\right]\} & \text{if } s\_i = 1\\ \{\text{P}\_{\text{EV},i}\} & \text{if } s\_i = 2\\ \{\text{P}\_{\text{EV},i,\text{max}}\} & \text{if } s\_i = 3 \end{cases} \tag{3}$$

where PJ1772,min is the minimum PEV charging rate when the AC minimum charging current is 6 A. PEV,i,max denotes the maximum charging power of the PEV charger.

The CoC-based optimal VGI microgrid control algorithm presents the control design for different available power capacities. If the available charging power is greater than the charging power demand, all the PEVs in charging stage 1 will be charged at the maximum power of the charging stations and the PEVs in charging stage 2 will be charged at the required power for constant voltage charging. If the available charging power is not enough for all connected PEVs even at the minimum charging power, the control scheme temporarily shuts off some of PEVs in charging stage 1. If the available charging power is between the maximum and minimum charging power demands, the optimization is performed to reallocate the charging power to individual PEVs in charging stage 1. If a PEV is being charged at maximum charging power but still has the lowest CoC value, this PEV is considered as an uncontrollable load.
