Plug-in electric vehicles smart charging mechanisms for cost minimization and ancillary service provision

The increasing number of Plug-in Electric Vehicles (PEV) connected to the grid will create challenges to be addressed and opportunities that can be ceased. One challenge is the load shape dynamics, which might result in increasing the loading level on the distribution lines. On the other hand, there is an opportunity to use the PEV stored energy to provide ancillary services to the grid. Therefore, this paper proposes a new PEV charging mechanisms that not only aid in ancillary service provision, but also help in reducing the charging cost and avoiding the extra investment in peak generation units while maximizing the integrated PEVs. The proposed approach utilizes three stages to ensure the satisfaction of PEV owners with different preferences and to respect the grid limitations. The main objective is to develop different charging mechanisms for charging PEV’s in the parking lots to ensure the maximum satisfaction of the PEV owners by fulﬁlling their charging requirements with the minimum possible cost. The developed algorithm relies on a moving time window to address the real-time changes and considers the participation of PEVs in the frequency regulation and peak shaving. The effectiveness of the proposed algorithm is veriﬁed through simulation using real data.


INTRODUCTION
As awareness of adopting cleaner technology has increased, the regulation of the countries has encouraged the use of sustainable resources to reduce air pollution. One of the key sectors that produce a high amount of emissions is the transportation sector. It was found that the transportation sector is responsible for 64.7% of oil consumption in the world in 2015 [1]. Efforts must be made to reduce oil dependence, decrease energy consumption, and lessen the environmental impact of the transportation system. One of the feasible solutions to address the challenges linked to the transportation sector is to electrify this sector [2]. From an economical point of view, it costs more to purchase an Electric Vehicle (EV) than an internal combustion engine vehicle (ICEVs). However, the high efficiency of an electric motor reduces the operation cost compared to the ICEVs. the electric motor will reduce the total CO 2 emissions even within an electricity system with a high fraction of fossil fuel generation. From the point of view of the electric grid, it can also play an important factor in the integration of renewable energy into the existing electricity system [3]. The EV, currently, does not affect the grid as its penetration level is still on the low side. However, the International Energy Agency has set a target to have over 20 million EVs on the road by 2020 [4]. With this growth in the EV market, it is expected that it will affect the performance and efficiency of the electric grid. Extra investment in the generation and transmission capacity will be required due to an increase of peak loads under a simple charging strategy [3]. Other impacts of EV on electric distribution networks are power quality issues, transformer and line saturations, and the increase in electrical losses [3][4][5]. As a result, to integrate a high penetration of plug-in electric vehicles (PEVs) into the grid safely, network reinforcements, embedded generation, and a PEV charging management strategy, which is denoted as coordinated charging, are required. Two categories of solutions have been proposed in the literature to facilitate PEV charging [6]. The first solution is by utilizing uncoordinated PEV charging, which can be done either through upgrading the grid infrastructure or by deploying distributed generation (DG) to meet the excess power demand [7]. The second solution is to target coordinated PEV charging. Coordinated charging will help in reducing the need for upgrading the existing power grid to accommodate PEVs. It is known that upgrading the existing power grid is costly and may require the installation of additional power plants, which will lead to shifting the emission from the transportation sector to the power sector. Coordinated charging will benefit both the utility and the customers, as it will reduce the cost of charging while lowering the grid operation expense. It can also utilize the PEV as a distributed energy resource and use the V2G capability to support the grid in the form of short-term ancillary services [8].
The literature in the area of coordinated charging shows rapid growth over the last few years. Researchers have tackled the topic of coordinated charging from different perspectives. One of the important areas that were considered is the direction of the power flow. Initial research on PEV considered it only as a load that absorbs active power from the grid [7,[9][10][11]. However, V2G capabilities of PEVs have been considered later where PEVs were represented as loads that have the capability of bidirectional power flow by absorbing/delivering energy from/to the grid [12][13][14][15][16][17][18][19]. Coordinated charging was implemented considering various objectives such as, reduce power losses [10,14], maximize renewable energy integration [20,21], enhance voltage regulation [10,12,14,15], frequency regulation [9,16,22], reduce charging cost and increase the revenue for the customer [6,18,19,20]. The main focus within the area of coordinated charging was on energy management, and some methods have integrated this objective with other objectives such as voltage regulation, reducing power losses, reducing charging cost, and integrate renewable energy [6,11,13,17].
Factors to ensure the satisfaction of the PEVs user were considered and those factors include battery kilowatt-hour requirements, charger max power rating, and parking duration of the vehicle [11]. In [17], a strategy for fair energy scheduling based on the contribution of the PEV in charging and discharging mode has been considered. Two types of fairness are considered in the discharge control of SOC-based fairness. High SOC PEVs will be selected to complete the load shaving, and contribution-based fairness will be adopted in the charging period to ensure that PEVs with high contributions have a high priority to charge. Recent work considers customer agreement in participation in the coordinated charging program. It was found that customer participation has improved the performance of charging [13].
The authors, in [23], proposed a new approach for PEV scheduling in islanded microgrids based on the day-ahead scheme considering real-time pricing. A new stochastic PEV scheduling approach is introduced, in [24], considering ancillary services in a day-ahead scheme. A peak-load management approach using PEVs is introduced in [25], utilizing a set of heuristic rules on a small group of PEVs. All the aforemen- This paper proposes a new near real-time mechanism to coordinate the charging/discharging of high penetration of PEV. The proposed mechanism relies on optimizing the charging/discharging process, which is modelled as a mixed-integer nonlinear programming (MINLP). The main objective is to minimize the cost of charging while satisfying the PEV owners' by fulfilling their charging requirements. In addition, V2G strategy will be implemented to support the system frequency regulation and peak shaving.
The main contributions of this paper can be highlighted as follows: 1. Propose a new multi-stage PEV coordination mechanism based on moving time window concept that considers different PEV owners' preferences. 2. Introduce a new approach to allow and encourage PEV owners to participate in frequency regulation and peak shaving.
The paper is organized as follows: Section 2 presents the proposed methodology. Section 3 introduces the ancillary services considered in this work. Section 4 presents the case studies followed by the results and discussions in Section 5. Finally, Section 6 presents the conclusions.

PROPOSED METHODOLOGY
PEVs are classified in this work into three different categories, as shown in Figure 1. PEV owners who will require an immediate charging will be classified under the strict charging ( STR 1 ). In the strict charge mode, the power will always flow from the grid to the charger. PEV owners who will be willing to delay their charging will be classified under flexible charging ( FLX 2 ). In the flexible charging mode, the aggregator will control the flow of power within the allowable time span. PEV owners who will accept to discharge their batteries will be classified under the discharge category ( DCH 3 ), where bidirectional power flow is permitted between the PEV battery and the grid.
The PEV profile will be built based on five factors, including: arrival rate, parking duration, initial SOC, desired SOC, and battery capacity. The battery capacities for each PEV will be assigned randomly based on the percentage of market shares in the US for each model. The initial and desired SOC have also been assigned randomly. The initial state of charge was allocated randomly between 20% and 50%. A random target SOC will be bounded by the SOC that the PEV could reach depending on the duration of parking, charger power transfer limit to/from the battery, the efficiency of the battery, the efficiency of the charger, and the battery capacity of the vehicle connected to the charger.
To handle the decision-making process of charging/discharging in real-time, a moving time window (MTW) concept is adopted in this work with its concept shown in Figure 2. In the proposed approach, the optimal decisions are developed for a time span of 24 h with a resolution of 10 min. This is equivalent to 144 time segments within one day. At the beginning of each time segment, the proposed approach develops 144 optimal decisions for the next 24 h. Only the PEVs currently existing in the parking lot at the beginning of any time segment will be considered in the solution for that segment. Other PEVs arriving after the information gathering stage within a time segment will be considered in the next segment. The resolution of the decisions, that is, the duration of the time segment, is a trade-off between service wait time and computational time. If the time segment is too small, the PEVs arriving after the information gathering stage will wait less time, but the algorithm has to deal with a more significant number of decisions.
To develop the optimal charging/discharging decisions for PEVs in parking lots, this work proposes a multi-stage algorithm, as shown in Figure 3, to satisfy the requirements of PEVs for all aforementioned classifications. These stages are as follows: The main constraints will be the power flow constraints, voltage and thermal loading limits of the system feeder, demand at each bus, and SOC constraints.
The objective of the first stage is to maximize the energy delivered E del (ch, b (r ) ) overtime window t under strictly charged classification connected to charger ch at t (b (r ) ) as follows: where, X ch (ch, I PEV , b (r ) ) is a positive decision variable between 0 and 1, that is, X ch ∈ [0, 1], that represents the charging rate for charger ch of bus I PEV as a fraction of the charger capacity. PEVs that are plugged in first will be given a priority through a time weighting factor ( ). P tot (b (r ) ) is the total power consumed by the PEVs and S base is the base power for the per-unit system in kW.
The objective of the second stage is expressed as follows: At this stage, no priority will be given for any vehicle. The main target is to find the maximum SOC each vehicle can achieve within its parking time subject to the maximum limit of the desired SOC Target (ch) . The same objective will be applied for the discharge group as well. In the third and final stage, the costs of charging for the second and their category are minimized as in Equations (3) and (4), respectively. min X ch where, C FLX (ch, b (r ) ) is the cost of charging for the customer in flexible class, C ENG ( b (r ) ) is the price signal representing the cost of energy. For the discharge scenario, the objective is adjusted as follows: where, X dch (ch, I PEV , b (r ) ) is the discharging decision as a percentage of the allowable charging power, C DIS (ch, b (r ) ) is the cost of PEV charging is the discharge class, and C DEG (ch, b (r ) ) represents the cost to overcome battery degradation. C DEG (ch, b (r ) ) is calculated as in Equation (5) where Price DEG is representing the cost per kWh discharge. The price was calculated from Dallinger et al. basedon Figure 4 [26].

ANCILLARY SERVICES
In this work, two types of ancillary services are considered and explained in the next subsections. Cost of degradation per kWh discharge [26] max (SOC) SOC X ≤ SOC req SOC Y = SOC Y1A SOC Z = SOC Z1A

Stage 2B
Maximize energy delivered to G3 using the conditions above

Frequency regulation
Frequency regulation could be achieved in two different ways, either by regulation-down or regulation-up. In regulation-down, the purpose will be to balance the generation and load when the generation is higher than the load (surplus in power). In the case of parking lots, the PEV's could support in regulation down by charging the vehicles to absorb the extra generated power. However, since mostly the generation will be higher than the load during low-energy prices, almost all PEV's will tend to charge to the maximum level but limited by the different system constraints. During regulation-up, the load will be higher than the generation (deficiency in power). The PEV's could support or remove this imbalance by either stopping the charging or by discharging to the grid, which is the focus of the proposed work. To include the regulation-up service, the discharge stage is adjusted, as highlighted in Figure 5. It is assumed that the PEV under discharge classification will be allowed to charge up to 5% extra as a frequency slack, and a constraint will be added to ensure that no charge is allowed during frequency regulation time. From this stage, the PEV's will be classified into three categories: 1. If the final SOC from this stage is less than the required SOC, then those PEV's can't discharge during frequency regulation time, and they need to charge. Their charging during frequency regulation time will be ensured in the second stage (I FR3 ). 2. If the SOC from this stage is equal to the required SOC, then those PEV's will neither charge nor discharge (I FR2 ). 3. If SOC from this stage is higher than the required SOC, then those PEV's will be forced to discharge during frequency regulation time, and they will be giving a reward for their participation (I FR1 ).
The objective of the energy maximization stage in Equation (2) will stay the same while adjusting the constraints related to SOC, as shown in Figure 5. The objective of the cost minimization stage in Equation (4) is adjusted to include the reward for frequency regulation as follows: where, C REW (I FR1 , (r ) ) is the incentive paid to the customer for participating in frequency regulation, which is calculated as follows: where, Price FR ( (r ) ) represents the reward for PEV's participation in frequency regulation.

Peak shaving
It is essential to make sure that the peak is similar or less than a target value, to avoid paying extra demand charges. In this paper, it is assumed that the allowable peak is known from historical data or set by the parking lot owner. The objective is adjusted to make sure that the peak will not increase as follows: 38-bus node test feeder [27] where, Z peak is the demand charges per kW, P peak(max) is the maximum incurred total load power, P peak(allowed) is the target peak grid power value which must satisfy: P peak(max) ≥ P peak(allowed)

CASE STUDIES
The proposed multi-stage algorithm is tested considering the various charging mechanisms in conjunction with the proposed ancillary services. The system under study is the 38-bus distribution system given in Figure 6. It has a total peak load of 4.37 MVA. It includes a mix of residential, commercial, and industrial customers, with a present share of 23%, 67%, and 10% of the total system load, respectively [27]. The parking lot is connected to bus 35. The MATLAB software environment will be used together with the General Algebraic Modelling System (GAMS) to model the system under study. GAMS will be used to implement the aggregator's different modules in accordance with MATLAB. The PEVs' battery data, the offers, and the system data measurement will be modelled in MATLAB,  and accordingly, the decision optimization is executed in GAMS. Charging/discharging decisions will be sent back from GAMS to MATLAB to update the PEVs' status for the next decision-making period. The related simulation parameters are given in Table 1. Historical PEVs' arrivals and departures data are used in this study, which is provided by the Toronto Parking Authority (TPA) shown in Figure 7. The real-time price (RTP) signal given in Figure 8 is used in this work which is denoted as C ENG ( b (r ) ) . The real-time price data was acquired from the Independent Electricity System Operator (IESO).
In the next section, we will discuss six case studies, which are described in Table 2. Each case can have strict charging only, flexible charging only, or a mix between strict and flexible charging. The base cases without considering frequency regulation or peak shaving are cases A, B, and C. In case D, the frequency regulation is considered with a mix of PEV classes. Case E and F represent the peak shaving with frequency regulation using strict charging and mix of classes, respectively.

RESULTS AND DISCUSSION
In this section, we discuss the simulation results of the six case studies described in Table 1.

Case A: Strict charging
In the strict or first-come-first-served (FCFS) case, the PEVs will charge immediately once plugged-in the parking lot, given that there is no technical limit violation. As discussed, the PEVs arriving first will be given priority to charge first. Figure 9 shows the resulting charging profile. As shown in Figure 9, the PEVs start arriving at 8:00 AM, the charging starts immediately at this time. The charging rate increases until around 11:30 AM, as the number of PEVs reaches its maximum, although the price was approximately the highest at this time. The charging was then decreased until it is stopped as the PEV's almost reach their required SOC and start leaving the parking. At around 7:00 PM, the PEVs start arriving again, and the charging starts immediately once they enter, creating the second peak at around 8:40 PM. From Figure 9, it can be concluded that the charging profile is not affected by the price. The PEVs start charging immediately once it enters the parking lots regardless of the cost. The total cost of charging was found to be $212.52.

Case B: Flexible charging
In the flexible charging case, the PEVs will charge based on the price signal where most of the PEVs will delay their charging until the cost becomes lower, especially if they will stay for a long time in the parking lots. As shown in Figure 10, the PEVs start arriving at 8:00 AM, where the charging varies compared to the strict charge scenario. The charging pattern is distributed based on the arrival of the PEVs and the price signal. The charging starts immediately and increases until 11:00 AM as the price was still low. Once the price increased, the PEVs stopped charging until the price dropped again at around 1:00 PM when some of PEVs start charging again. At 2:00 PM, the price even becomes lower, so the charging reaches the highest rate. The number of PEV's was decreased later as most of the PEV's left the parking lot, so the charging was low only to satisfy those who didn't reach their required SOC yet. At around 7:00 PM, the second group of PEVs arrival starts, as shown in Figure 7. The charging reaches a peak around 10:00 PM as the cost becomes lower. From Figure 10, it can be seen that when the PEVs have the option to delay their charge, most of the charging occurs during the low-cost signal. This led to reducing the total cost of charging compared to case A. The total cost of charging in case B was found to be $197.73, which is 6.95% lower than case A. This shows that the flexible charging can benefit the customer, aggregator, and utility.

Case C: Flexible charge/discharge
In case C, the PEVs will charge based on the price signal as well as PEVs who will stay for a long time in the parking lots will   Figure 11 shows the resulting charging and discharging profile. As shown in Figure 11, the PEVs start arriving at 8:00 AM, the charging is different compared to the strict charge scenario, and it is comparable to the flexible scenario in terms of the time of charge with some differences in the charging capacity. The charging pattern is distributed based on the arrival of the PEVs and the price signal. The charging starts at around 8:00 AM, similar to the flexible case and until 11:00 AM, as the price was still low without any discharge. Then the charging rate decreases, and some of the PEVs benefit from the increase in price and discharge to support other PEVs. When the price decreased again at around 2:00 PM, the PEV's who still didn't satisfy their charging requirements continue their charging. Then the number of the PEV's dropped, and only those PEV's who stayed in the parking continue their charging from both utility and other PEV's. At around 9:00 PM, the second peak of PEV occurred, as shown in Figure 7. However, the charging rate was low and came mostly from other PEV's as the cost was high; it increases once the cost drops at 9:00 PM and reaches the peak at 10:00 PM. From Figure 11, we can conclude that in case of discharge, the PEVs will benefit by having the option to delay the charge to a low-cost price as well as making a profit from discharging at a high price signal. This will reduce the total cost of charging compared to the previous scenario. The total cost of charging in case C was found to be $197.68, which is 6.98% lower than case A and 0.03% lower than case B.

Case D: Flexible charge/discharge with frequency regulation request
In this case, a frequency regulation signal has been suddenly sent at 1:00 PM for half an hour from the utility to the parking lots. PEV's which can participate in frequency regulation by discharge will be given a reward. Figure 12 shows the resulted charging and discharging profile. As shown in Figure 12, the PEVs start arriving at 8:00 AM, where the charging is a bit similar to the discharge scenario. However, between 1:00 PM and 1:30 PM, the discharge rate was high due to frequency regulation support. After the high discharge, the PEV's start charging to compensate for the amount discharged. The peak of charging was reached at 2:10 PM, which gradually starts decreasing as the number of PEV's decreases. At around 9:00 PM, the second peak of PEV arrives, and the charge rate increases once the cost drops at 9:00 PM and reaches a peak at 10:00 PM. From Figure 12, it can be concluded that in case of discharge with frequency regulation support, the PEV's will benefit by having the option to delay the charge to low-cost price as well as making a profit from discharging at the time required by the utility to support frequency regulation. This results in reducing the total cost of charging compared to case C. The total cost of charging in case D was found to be $175.09, which is 11.43% lower than the case C. This shows the benefit of ancillary services for all the parties.

Peak shaving
In this section, an assumption has been made that the target peak demand is 450 kW. The target is to avoid any increase in the demand charges. All of the previous scenarios will be retested to study the effect of the peak demand

Case E: Strict charging
For strict charging, imposing a peak demand charge will not affect the charging profile as it is not coordinated. In this case, the charging profile was found to be precisely the same as case A of strictly charge in Figure 9, where the peak reaches 493.7 kW. This result is justified as the strict charge scenario doesn't get affected by the cost, and it only targets maximizing the energy delivered. The cost for this case was found to be $233.66, which is higher than the case of strictly charge in the previous chapter by 9.04%. This increase in the cost resulted from the demand

Time of day PEV Consumption (kW)
PEV charging PEV discharging Energy Price

FIGURE 13
Case F: Flexible charging/discharging with FR and peak demand cost, which is equal to $21.14 where the electricity cost is the same as the previous case, which is $212.52.

Case F: Frequency regulation
In this case, similar to case E, the frequency regulation will be applied with an extra condition to manage the peak to be below 450 kW but with a mix of charging classes. From Figure 13, it can be realized that this limit has been met, and the charging starts immediately; the charging rate continuously increases from 8:00 AM till 11:00 AM. It later decreases and increases again at 11:50 AM. However, the charging at a high price signal is more than the previous case, and that may cause an increase in price for this case compared to case E. At 1:00 PM till 1:30 PM, the discharge rate was the highest due to frequency support. Then the charge increases to compensate for the discharge until the PEV's left the parking lots. The charging starts again at 7:00 PM when the PEV's starts arriving again. Comparing case D in Figure 12 with case F, the charging and discharging was almost matching the variation on the peak. This variation has led to more charging in case F between 11:50 AM and 1:00 PM, and between 7:50 PM and 8:50 PM to compensate for the difference in the charging rate. It can be concluded that in case of discharge with frequency regulation support, the PEV's will benefit by having the option to delay the charge to low-cost price. Further, the PEV can generate some profit from discharging at the time required by the utility to support frequency regulation and managing the demand. This will lead to reducing the total cost of charging compared to the previous scenario. The total cost of charging in this scenario is found to be $183.08, which is 21.65% lower than case E.

DISCUSSION
Simulation tests using both MATLAB and GAMS were implemented to validate the proposed algorithm using a 38-bus distribution system. Six main case studies were tested. The results show that as customers become more flexible, they benefit more in terms of minimizing their cost of charging. Yet, in all cases, the PEVs owner reach their required SOC. Studying the effect of ancillary services, specifically, the frequency regulation and peak demand shows the benefit of the frequency regulation as it resulted in utility support and also reduced the cost of charging by rewarding the PEVs owners who discharge during the frequency regulation time. The benefit of managing the peak demand was also clear from the case studies as it led to the avoidance of the extra payment for the demand charges. Without including the peak demand charges, case D represents the least charging cost, as shown in Figure 14. With peak demand charges and a historical peak demand of 450 kW, strict charging, case E, costs 21.65% more than the flexible charging case, that is, case F. Finally, to investigate the impact of varying the charger capacity, we utilized a 22 kW charger in case E. The total charging cost was found to be $139.45, which is 23.78% less than the same case with a 9.6 kW charger. Therefore, employing a higher capacity chargers increases the ability of the PEVs to contribute to frequency response and peak demand shaving in addition to the added flexibility in charging.

CONCLUSION
As the electrification of the transportation sector is the key to reduce the energy demand and the emission of the transportation sector, it is essential to ensure the satisfaction of all parties affected by this process. The work in this paper has presented different charging mechanisms to accommodate the high penetration of PEV with the objective of maximizing the satisfaction of the PEV owners by fulfilling their charging requirements with the minimum cost. An optimization algorithm was developed using GAMS software to study the different charging mechanisms. Three main scenarios were presented, namely strictly charge scenario, flexible charge scenario, and discharge scenario. It was found that the cost of charging is the lowest for the discharge scenario because the PEVs staying for a longer time would transfer their charging time to those with the lowest peak as well as they will make a profit by supporting other PEV's. The effect of the ancillary services was studied under two different scenarios, the frequency regulation, and the peak shaving. It was realized that the frequency regulation reward was attractive for the PEV's as it led to high discharge, which supports the utility at the same time. In the peak shaving, it was found that peak shaving helps to avoid extra demand cost payment in all the scenarios except the strict charging scenario. It can be concluded that real-time interaction with PEVs owners was so effective. Case studies have proven that the smart charging mechanism was better than conventional charging.

Nomenclature
C h (i, p( i ,a)) Set of chargers in parking lot p on bus i under the jurisdiction of aggregator a C ENG Price signal representing the cost of energy, cents/kWh C REW (I FR1 , (r ) ) Price giving to a customer for participating in frequency regulation, cents/kWh C CHR (ch, b (r ) ) Price paid by a customer in charge class, cents/kWh C DEG (ch, b (r ) ) Price paid by a customer to overcome battery degradation, cents/kWh C DIS (ch, b (r ) ) Price paid by a customer in discharge class, cents/kWh C FLX (ch, b (r ) ) Price paid by the customer in flexible class, cents/kWh C h (.) Index of chargers in the parking lot (.) E BAT (ch) Battery capacity of a vehicle connected to charger ch, kWh E Con(ch,I PEV , b (r ) ) Energy consumed as an input to a charger during t (b (r ) ) to (t (b (r ) +1) , for a PEV connected to charger ch, kWh E del (ch, b (r ) ) The delivered energy during t (b (r ) ) to (t (b (r ) +1) , for a PEV connected to charger ch, kWh I FR1 Set of PEV who can participate in frequency regulation I FR2 Set of PEV not allowed to charge/ discharge for frequency regulation I FR3 Set of PEV not allowed to discharge but can charge for frequency regulation I PEV Set of PEV load buses N (pev) Index of number of PEV in the study P CH Charger power limit to/from the battery, kW P Grid (i, b (r ) ) Active generated power from the grid at bus i, and time instant t (b (r ) ) , pu P L (i, b (r ) ) Active power demand at bus i, and time instant t (b (r ) ) , pu P ch(ch,I PEV ,b (r ) ) Power delivered to the battery (internally) at bus i, kW P dch(ch,I PEV ,b (r ) ) Power delivered from the battery (internally) at bus i, kW P ev (ch, i, b (r ) ) Active power consumed by the PEV charging load at bus i, and time instant t (b (r ) ) per charger, kW P peak(allowed) Target peak the grid power value P peak(max) Maximum incurred total load power Price FR ( (r ) ) Representing the reward for EV's participate in frequency regulation, cents/kWh Price DEG Representing the cost per kWh discharge, cents/kWh P tot (b (r ) ) Total power consumed by EVs Q Grid (i, b (r ) ) Reactive generated power from grid at bus i, and time instant t (b (r ) ) , pu Q L (i, b (r ) ) Reactive power demand at bus i, and time instant t (b (r ) ) , pu SOC gain (N (pev) ) SOC that PEV could reach depend on the time of park, % SOC Final (ch, b (r ) ) Final SOC for the PEV connected to charger ch at t (b (r ) ) , % SOC Initial (ch, b (r ) ) Initial SOC for the PEV connected to charger ch at t (b (r ) ) , % SOC Target  (ch) Target SOC, % SOC Min Minimum SOC level for the predicted PEV arrivals, % S base Base power for the per-unit system, kW X ch (ch, I PEV , b (r ) ) Charging decision as a percentage of the allowable charging power X dch (ch, I PEV , b (r ) ) Discharging decision as a percentage of the allowable charging power b (r ) , Indices of time segments t park (N (pev) ) The duration that PEV spend in the parking lot, min V (i, b (r ) ) Magnitude of the voltage at bus and time instant t (b (r ) ) , pu Y (i, j ) Magnitude of the Y-bus matrix admittance, pu i, j Set of system load buses i, j Indices of buses (i, b (r ) ) Angle of the voltage at bus and time instant t (b (r ) ) , rad (i, j ) Angle of the Y-bus matrix admittance, rad ( ) Time weighting factor