Transactive Energy for Aggregated Electric Vehicles to Reduce System Peak Load Considering Network Constraints

Due to the increasing utilization of electric vehicles (EVs), future power grids may face challenges of system peak load that are usually solved by means of grid reinforcements. By providing flexibility, acquired from flexible consumers, such as EVs, the need for grid reinforcements can be avoided or postponed. Therefore, in order to solve the peak load problem, this paper focuses on the provision of flexibility services through the local market. It presents a framework for the participation of aggregated electric vehicles in the local market, considering the operating constraints of the grid. In the proposed framework, aggregators interact in a transactive, market-based manner, with a transactive energy (TE) operator and distribution system operator (DSO) to resolve operational problems. For the market-based operation, a bidding model is proposed and formulated as an optimization problem that minimizes the total cost of DSO for acquiring flexibility services from EVs. The proposed model uses EVs as flexible loads to illustrate the method, and it is tested with case-studies conducted on two IEEE test systems.

Power load d at time t

I. INTRODUCTION
With the increasing integration of distributed energy resources (DER), like electric vehicles, the ever-evolving power system needs enhanced and flexible operation [1], especially at the distribution system level, since the increasing penetration of DERs is raising challenges from an operational point of view. For instance, at the distribution level, the network's power quality may face reverse flows, voltage limit violations, and congestion problems. To address these challenges, the distribution system operator (DSO) could decide for reinforcement and extension of grids, which may not be a cost-environment friendly solution, or for an alternate solution like demand response [2], [3] programs, where, the smart grid paradigm enables the employment of demand flexibility at the distribution level. Demand flexibility (DF) is usually used for a large customer; however small customers are also an efficient resource of flexibility [4]. To provide DF from small customers to the DSO, a new entity called an aggregator (AGR) is used, who represents these customers in electricity markets and is responsible for managing and operating their flexibility [5]. The aim of such markets, at the demand side, is to provide market access to these flexibility providers, and a support tool for the DSO to manage technical complications. To this point, the efforts on the development of appropriate market mechanisms in existing market structures are inadequate, which has impeded the full potential of DF.
To exploit the flexibility potential available at the demand side and to encourage significant involvement of the enduser in electricity markets, policymakers are paying more attention to transactive energy systems and market-based mechanisms [6], [7]. A survey on local energy markets and transactive energy systems is given in [8]. To facilitate the transactions between the buyers and the providers of DF a medium such as a regulated flexibility market is imperative. Furthermore, the new market mechanism must work in coordination with existing electricity markets, to avoid any negative impacts on other markets on account of flexibility activations [9].
In this respect, to manage flexible energy sources optimally, [10], [11] introduced a planning framework for determining the bidding curves and their focus was on price elasticity. In [12] a Universal Smart Energy Framework (USEF) for building smart energy products and services is suggested. The USEF framework aims to maximize the value of DF. Moreover, it follows a market-based coordination mechanism. Approaches examined in the relevant literature to achieve the effective participation of DF in electricity markets mostly revolve around concept development. In [13], [14], a novel market framework is proposed, which facilitates the involvement of demand flexibility in electricity markets. In the work of [15], an optimization problem is proposed to facilitate the DSO requests on flexibility. The proposed problem is for a novel aggregator named smart energy service provider, responsible for managing all flexible energy sources. It also serves as a platform for flexibility trading in a local electricity market. Similarly, [16] proposed an algorithm for the optimal schedule of the flexible devices in both day-ahead and real-time periods. This work contributes to considering the unpredictability of flexible loads; however, it neglects grid constraints in the optimization process.
For a day-ahead market structure, [17] proposed a framework for a flexibility market called a flexibility clearinghouse. The objective of the market is to promote the integration of small scale DERs as flexibility sources. This market works in parallel to existing markets and aims to assist the DSO in mitigating grid congestions such as overloading and voltage fluctuations. Furthermore, a market mechanism called De-Flex-Market is presented in [18], [19]. It is based on the traffic lights control system and aims to offer flexibility services to the DSO to mitigate capacity constraints and avoid network reinforcements.
It is worth noting that the researches mentioned above, significantly contribute to the concept development and relevant bidding processes. However, despite its importance, the potential of DF to reduce system peak load and relieving network congestions has not been well investigated. Besides, these works have neglected grid power flow constraints, which is crucial to practically model the impact of DF. The methodology presented here builds upon the authors' previous work [20] and further advances towards proposing a pragmatic approach for the application of flexibility services in a local market at the distribution level. The contributions of this work are three-fold: 1) A new bidding model is proposed for the EV participation in the local market by considering the interaction between the TE operator, the DSO, and aggregators. The bidding model is formulated as an optimization problem that minimizes the total cost of DSO for acquiring flexibility services from EVs. 2) The optimization problem considers power flow constraints along with bidding model constraints. We show that the consideration of these constraints ensures the technically viable solution, and it is vital to model the impact of demand flexibility practically.
3) The effectiveness of the proposed model in response to various settings, such as with network constraints, without network constraints, a sensitivity study of aggregator prices and scalability test of the proposed model has been investigated. We highlight the need for considering the network constraints, the adeptness of the model under different prices and scalability of the model for a large test system.
The rest of this study is organized as follows. Section 2 provides the transactive energy system for aggregated electric vehicles, as well as the key actors, are introduced. The optimization problem defined in this paper is detailed in 31520 VOLUME 8, 2020   Fig. 1 presents the transactive energy system for aggregated electric vehicles to reduce system peak load. In the system, several aggregators are responsible for managing DERs and interacting with TE operator and DSO, for eliminating peak load. The current system introduces a TE operator that facilitates the interaction between DSO and AGRs. AGRs are responsible for representing the interests of flexible consumers, i.e., EV owners. Their aim is to minimize the operating cost of consumers by generating the aggregated optimal energy power schedule for the complete scheduling period, and to participate in the local market. During these operations, the DSO's network security constraints should not be violated that is ensured by enabling control techniques such as the transactive-energy approach. The TE operator is therefore introduced to facilitate the interactions between DSO and AGRs. If the actions of AGRs cause network problems and there is a violation, the flexibility call is activated by the TE operator to resolve the issue. The operational functions of the three actors are presented as follows:

A. AGGREGATORS
The role of aggregator here is divided into two stages: aggregated energy schedule generation for electric vehicles and flexibility provision, accumulated from DERs. In the first stage, the aggregator collects the charging requirement of an individual electric vehicle. Based on these requirements an initial aggregated charging schedule of electric vehicles is created and an energy profile is provided to the DSO. In the second stage, if the flexibility call is activated, the aggregators accumulate the available flexibility from consumers to offer bids in the form of flexibility profiles with the information about electric vehicles that will refrain from charging. Note that the flexibility offer must be aligned with the DSO request.

B. DSO
The DSO is an entity that interacts with the aggregators and TE operator, to buy flexibility from the aggregators and is responsible for the network security. In addition, the initial power schedule of aggregators is also shared with the DSO to detect potential network problems. After receiving the energy profile from an aggregator, the DSO performs risk analysis and checks the possibility of network violation due to the charging schedule provided by aggregators during the following day of operation. If such risk is predicted (i.e. operational limits of the network are violated), the DSO sends the request of flexibility needs (i.e. flexibility call is activated) by announcing the power quantity to be reduced (i.e. refrain electric vehicles from charging at a certain time for the certain duration). Moreover, the DSO may also recommend the initial rate for price discovery and maximum amount DSO is willing to pay along with network information to TE operator. In addition, the DSO also shares the technical information such as system state and location of flexibility needed.

C. TRANSACTIVE ENERGY OPERATOR
The TE operator serves as a trading platform, and is an authorized entity responsible for clearing the market by determining the activated bids and prices, after receiving flexibility request and offers from the DSO and the aggregators, respectively. Afterward, the TE operator announces the result and shares the required information with aggregators and the DSO. As a result, aggregators adjust their energy profile to reduce peak loads.
It should be noted that after the TE operator announces the results, aggregators would again optimally generate their charging schedule according to the decision obtained from the TE operator. In other words, maximum power allowed to be consumed by aggregators will be updated in the aggregator model.
The method development and mathematical formulation of the proposed model are presented in the next section. However, the commonly used assumptions and simplifications are presented as follows: 1) This paper uses a basic linear programming-based optimization to generate the optimal charging schedule [21], [22], neglecting the EVs uncertainties such as driving patterns and charging efficiency. 2) In power system modeling, to show the effectiveness of the proposed model with power flow constraints, only DC-power flow is considered [23], and AC power flow will be adopted in future work.

III. METHOD DEVELOPMENT
In this section, first, the modeling of the aggregator's optimization problem is presented, who aims to minimize the charging cost for generating the optimal charging schedule, VOLUME 8, 2020 and the interaction of aggregators with TE operator is described. Second, the DSO's operational objective is presented where a bidding model is formulated as an optimization problem to minimize the cost of DSO for acquiring flexibility service from flexible consumers, to reduce the system peak load.

A. AGGREGATOR'S OPERATION
The optimization problem formulated for the charging of aggregated EVs is based on the requirements of EV owners and forecasted energy prices. For the optimal charging process of EVs, several methods can be found in the literature [24]- [26]. In this study, the aggregator optimization problem proposed in [22], [25] is adopted to minimize the charging cost as well as to fulfill the EV owners charging requirements. The optimal charging schedule for EVs is generated by formulating a linear programming-based optimization problem.
The objective function given in (1) reflects the minimization of EVs charging cost and of satisfying the individual EV's energy needs for the period of the next 24 hours. For each aggregator, the solution is introduced similarly In (1), P Ev e,t is the optimization variable for EV charging power and λ e,t is the DA predicted electricity price.
Equation (2) ensures the balance between the charged and requested energy for each EV. Equation (3) limits the charging rate from exceeding the maximum rate of the charger. It is crucial for aggregator(s) to provide charging locations of all schedules to DSO. It is assumed that the aggregators know the charging locations of EVs. The power requirement for each EV under aggregator i in time interval t at bus l is represented as P Ev The aggregated charging profile of electric vehicles, presented here is used by the DSO to predict the upcoming grid contingencies occurring on the subsequent day of operation. DSO is responsible for avoiding demand peaks in the system. Therefore, in the planning stage, DSO identifies the needs of acquiring flexibility services based on historical data or a time series baseload, assumed to be known. Once the need for acquiring flexibility service is determined, the DSO gathers the requirements of flexibility by identifying the type of flexibility needed, location of resources providing flexibility, and the required quantity of flexibility [27]. After the identification of requirements, a flexibility call is activated, the DSO recommends the requested quantity of a certain type of flexibility service and all aggregators are informed. Based on the information received from the DSO, the aggregator gathers the available flexibility offers from their flexible consumers to offer ahead-bids, to satisfy the corresponding service of DSO. Ahead bids are offered to TE operator, an independent entity, who chooses the suitable offers from the aggregators and clears the market.

B. DSO'S OPERATIONAL OBJECTIVE
The DSO's objective is to buy flexibility and keep the network in a secure state, in response to the network operation violations caused by the charging schedule of aggregators. Therefore, the approach presented here aims to reduce the system peak load by activating the flexibility service requested by DSO in the presented framework. The DSO acquire flexibility services from the EVs to reduce the system peak load to a reasonable extent, by incurring a certain cost of flexibility. The objective function given in (5) reflects the minimization of the DSO's total cost for acquiring the flexibility service. Flexibility cost (ϕ) under each bid comes from the flexibility contract [6], [15] between the flexibility providers and aggregators. The time resolution t is a flexible parameter in the problem; however, the trading period for one hour is considered here which is in accordance with the criteria of many European electricity markets. The TE operator, who receives information from both aggregators and the DSO, is responsible for clearing the market considering the constraints given in (6) - (14), where (6) -(10) represents bidding model equations and (11) -(14) represents network constraints. Note, for optimization variables in the bid, only active power is considered.
where in (5) p i,j,t represents the quantity (i.e. power needs to be reduced) for each bid and ϕ i,j,t represents the price for the power reduced in period t, bid j for aggregator i. It should be noted that the objective function given in (1) provides the aggregated charging schedule, which is used to predict the peak demand in the subsequent day of operation, and by doing so identifies the need of acquiring flexibility service. Whereas, the objective function given in (5) minimizes the total cost of DSO for acquiring flexibility service and is solved by TE operator.

1) BIDDING MODEL
In this model, EVs are used as a flexible load, which refrains from consuming energy according to an earlier schedule, and aggregators, on behalf of EVs, bid for the flexibility it can offer. The amount of energy refrained from consuming is offered in terms of flexibility bids by the aggregator. Flexibility bids, submitted by aggregators, consist of the quantity 31522 VOLUME 8, 2020 of the bid, i.e. power to be reduced for that bid p i,j,t and its price ϕ i,j,t . Fig. 2 illustrates the flexibility bid model with blocks of quantities and prices of flexibility based on the flexibility contracts. Bid prices of flexibility providers are sorted from the low-priced (high comfort level) to high-priced (low comfort level) offers. Fig. 2, exemplifies a flexibility bid structure, which considers the optimal benefits to the connected EVs, i.e., the unserved power demands of EVs are penalized to guarantee the maximum social welfare for EVs. The bid price submitted by the aggregator is the optimal price that is decided by considering the profit for EVs while fulfilling their charging requirements and the profit from activating the flexibility bid to guarantee the comfort and profitability of EVs.
The flexibility contracts stipulate the details of bid power and prices. The range of bid power depends on aggregators' experience [28], whereas, the bid prices depend on several factors. According to [27] the price of offered flexibility can be constituted from activation cost of each flexible load, the operation cost of affiliated DERs, flexibility service reservation cost, and possible penalty cost as well. In practice, the prices are based on the comfort level and operating plans of flexibility providers [15]. Flexible loads with high comfort levels (i.e. less required resources to consumers) offer their flexibility at low prices as compared to the loads with a lower comfort level. Resources offering flexibility at low prices will be activated prior to the ones with high prices that are already fulfilled in the proposed bidding model. Note, that pay-as-bid structure [29] is followed here for flexibility revenues, i.e., optimal bids directly receive their bidding prices.
The bidding equations are given in (6)-(10). The bid power range for each bid offered by aggregators is given in (6)(7)(8) and it ensures that the value of load-reduced is not greater than the offered bid. The bid power balance constraint is given in (9) where power reduced for each aggregator is equal to the sum of power reduced in all bids. Equation (10) limits for the shed power for each aggregator.
p i,j,t ≤ P i,1 ∀i, j, t = 1 (8) The model presented here advances on earlier studies by taking into account the network constraints. The effectiveness and practicality of the proposed model are shown with the consideration of power flow equations. Due to their complexity, modeling the power flow equations can be problematic. However, to practically model the impact of DF at the distribution side, considering power flow equations in the model is imperative. In addition, considering them will also have a significant impact on the activated bids, as technically infeasible bids will not be activated and hence this will modify the DSO's total cost of flexibility procurement.

2) POWER FLOW EQUATIONS
The power flow equations must be taken into account to only activate the technically feasible flexibility bids. Usually, the flexibility markets are operating at the distribution side, and using AC power flow is important due to the sensitivity of bus voltages on the reactive power. However, it introduces computational problems due to the non-linearity of AC power flow equations. Moreover, the presented work considers power flow equations in modeling the impact of DF. Therefore, to show the effectiveness of the proposed model, the DC power flow model, which is commonly used in the literature [30], [31] even for distribution networks [23], is considered, and AC power flow adoption is our future work.
The DC power flow model is included in the optimization problem and can be considered as power flow constraints for the objective function given in (5). As a result, the power flow equations modeled in this study are given in (11)- (14). In (11) power balance equation at any node is modeled where D(n) is a subset of power loads at power bus n. The phase angle of each bus is limited through (12) and the power flow at each line or the line capacity of the network is reflected through (13). The DC power flow is calculated using (14) from the phase angle difference.

IV. CASE STUDY
In this section, the proposed methodology of acquiring the flexibility service for peak load reduction is illustrated with the help of case studies. The aim here is to present the effectiveness of the proposed methodology in the handling of multiple flexibility bids with the minimum cost incurred by the DSO. The optimization problem presented in this study is validated with the help of three case studies. In the first case study, the optimization problem is solved using bidding constraints only. In the second case study, the power flow VOLUME 8, 2020  equations are also included with bidding constraints. The third case study, presents the sensitivity study of aggregators prices. In the last case study, the scalability test of the proposed model is presented using a modified IEEE test system. Two aggregators, AGR1 and AGR2, managing controllable consumption in grid area are considered. The number of EVs managed by AGR1 and AGR2 is 6 and 3, respectively. In the given network, EVs are connected at different locations. The battery capacity for EVs is set to 24kWh, initial battery SOC to 20% and maximum charging power is restricted to 3.7 kW. The optimal schedules for EVs under both aggregators are calculated according to (1). Table 1 presents the details about the number of EVs connected at each bus, total charging power required by connected EVs for whole charging period and charging power needed by connected EVs during peak hours i.e. hour number 15, 16 and 17. The charging requirement for electric vehicles connected at each bus is given in fig. 3. It can be seen from the figure that hours with high power requirements are at the start of the charging period.
The scheduling period for EVs, considered here is from 14 to 4 and an hourly interval is used. The baseload profile of the system with an aggregated charging schedule, for the day-ahead operation, and actual market prices in e/kWh obtained from the Nord pool market [32] is given in fig. 4. Based on the aggregated charging schedule and baseload profile, the expected load at hours 15 to 17 will cause a peak in demand. It can be addressed by either reinforcing the network or by acquiring flexibility services from customers, i.e. to reduce consumption at peak hours. In this study, flexibility service is used to handle this peak load during hours 15 to 17.

A. CASE STUDY I: OVERLOAD MANAGEMENT BY DEMAND FLEXIBILITY WITHOUT CONSIDERING POWER FLOW CONSTRAINTS
In order to test the proposed model without network constraints, this section provides a case study assuming that the flexibility bid powers, which are based on the different comfort levels of EV owners, are known by the aggregators. Note that the flexibility service prices are independent of actual market prices and depend on competition and contracting agreement of aggregators. Moreover, a small number of electric vehicles are considered here to illustrate the proposed model; however, it is scalable to include a large number of EVs. Power requirements for both aggregators, at hours of peak load, are given in table 1.
After receiving the requested amount of power reduced and offered aggregated bids, the TE operator is responsible for determining the suitable bids and prices, which accounts for required load reduction. According to fig. 4, the hours at which load reduction is required are hours 15, 16 and 17. Hour 15 is considered here to illustrate the effectiveness of the proposed method. Based on the comfort level of EV owners, each aggregator submits its bids with the number of EVs they will refrain from charging at peak hours. Table 2 presents the aggregated bids (AGRBID) offered by AGRs and the power requirement of each EV under both aggregators for hour 15. In addition, the amount of bid power and, their corresponding prices based on EV owners' comfort level are also shown. It should be noted from the table that the flexibility offered by AGR1 and AGR2 under each bid is in ascending order according to price. High prices reflect the level of customers' sensitivity to alter their charging plans. Moreover, each bid is sorted from the cheapest offer to the most expensive one, and the expensive prices show the unwillingness of the AGR for the flexibility to be activated.
The aggregated bids for both aggregators at each bus includes different blocks of flexibility. AGR1BID1 includes 31524 VOLUME 8, 2020  four blocks of flexibility, BID2 includes five blocks and BID3 includes two blocks of flexibility, whereas, AGR2BID1 and AGRBID2 include two and one blocks of flexibility, respectively. Blocks of flexibility, under each bid, are arranged in a non-decreasing manner based on their prices. Flexible power offered by AGR1 under each bid depends on the comfort level of EV owners. The difference in prices for different blocks of flexibility, as seen in Table 2, can be justified as the precedence of EV owner to change its charging plan. Table 3 summarizes the result of activated blocks from AGRBIDs without power flow constraints, by the TE operator, for peak hours.
The optimal combination of bids activated for load reduction from both aggregators is illustrated in Fig. 5. The flexibility activated in the first bid of AGR1 is 2.0376 kW, where the first block of bid1 is activated in full and from the second block, only a part of the bid is activated as shown in Fig. 5(a). In the second bid, the only first block is activated with the amount of 2.2021 kW as shown in Fig. 5(b), whereas, for the third bid, one block offered in this bid is activated completely corresponding to the amount of 1.4680 kW as shown in Fig. 5(c). Moreover, For AGR2, the first block was activated from bid 1, not selecting the second block, and the bid 2 flexibility offer was activated in full, as shown in Fig. 5(d-e).  Here, the power flow equations are included along with the bidding constraints in the optimization problem. The proposed method is tested on IEEE 13 bus system with two aggregators where the battery capacity, initial SOC and maximum charging power for both aggregators are considered the same. Fig. 6 depicts the topology of the power system used VOLUME 8, 2020 TABLE 4. Power reduced for each aggregator bid in day-ahead operation at peak hours with power flow constraints. and the details of the bus system with EV loads are provided in [33].
Each bus is feeding different loads including several DERs, electric vehicles in our study, with a different comfort level. DERs with high comfort levels (less sensitive and can easily provide flexibility) offer flexibility at lower prices as compared to lower comfort level DERs. Similar to the first case study, the number of EVs connected here are 6 for aggregator 1 and 3 for aggregator 2. In the given network, EVs are used for flexibility services and are connected at five different buses. The test system has 8 loads connected at different buses and EVs are connected with buses 3, 6, 8, 10, and 12. EVs connected at bus 3, 10 and 12 are managed by the AGR1whereas; EVs at bus 6 and 8 are managed by the AGR2. The flexibility power bid and prices are the same as those considered in the previous case study. The TE operator selects the optimal bids for peak load reduction while respecting the network constraints.
With the network constraints, the optimal bids activated to reduce peak load are illustrated in Fig. 7. For AGR1BIDs, the flexibility blocks activated from first, second and third bids amount to 1.7616 kW, 2.2021kW and 0.77674kW, respectively, as shown in Fig. 7(a-c). The first flexibility blocks of both BID1 and BID2 are activated in full, and remaining are not activated as shown in Fig. 7(a) and 7(b), respectively, whereas, flexibility activated from BID3 is only a part of the block as shown in Fig. 7(c). Furthermore, for AGR2BIDs, in BID1, the first block is activated along with some power from the second block with a total amount of 3.9034kW as shown in Fig. 7(d) and, the BID2 were activated in full, as shown in Fig. 7(e).
It should be noted from Fig. 5 and 7 that the amount of flexibility activated under different bids when power flow constraints are included is different when compared with flexibility activated without power flow constraints. Although the total amount of power activated under all bids (i.e. 11.58 kW, 17.12 and 12.52 for Hour 15, 16 and 17, respectively) in both cases is similar, the activated bids and their shed power are different in case of using the power flow constraints. That indicates the importance and effectiveness of considering the power system constraints. Table 4 summarizes the result of activated blocks, with power flow constraints, at peak hours.

C. CASE STUDY III: SENSITIVITY STUDY OF AGGREGATOR PRICES
In this scenario, we have emphasized on the analysis of the sensitivity study for different aggregator prices. In the first case, the bid prices are assumed based on the discussion given in section III. These prices are used to calculate the total cost incurred by DSO for total power shed at peak hours for each aggregator. In the second case, it is assumed that AGR1 changes its bidding price and bids only 90 % of its original prices. Similarly, in the third case, AGR1 bids 70% of the base price. The effect of this change in strategy can be seen from Table 5, where the total cost incurred by DSO and total power reduced for AGR1 and AGR2 change.
If the prices for AGR1 is changed to 90% from the base price, the total power reduces for AGR1 and AGR2 changes merely, however, a significant change can be observed in the 31526 VOLUME 8, 2020 total DSO cost for each aggregator. If the price for AGR1 is changed to 70% of its base price, the power reduced and the total cost of DSO for each aggregator changes significantly. Owing to lower prices than AGR2, the complete flexibility offered by AGR1 is selected first whereas the remaining flexibility power is selected from AGR2. If the price is lowered further, the total power reduced does not change as the offered power from AGR1 is selected first however, the price for AGR1 is reduced further.

D. CASE STUDY IV: SCALABILITY TEST OF THE PROPOSED MODEL
In this section, we select a modified IEEE 123-Bus power system with 5 aggregators and 340 electric vehicles, connected at different busses, as a largescale test system. The proposed bidding model is used to determine its scalability. The test system topology, parameters, and flexibility power bid and prices are described in further detail in [33]. The system has 124 power lines, 10 power generators, 85 power loads, and 340 electric vehicles connected at 13 different buses. EVs connected at bus 4, 5 and 6 are managed by the AGR1, EVs at bus 19, 20 and 22 are managed by the AGR2, AGR3 manages the EVs connected at bus 41, 43 and 46. AGR4 manages the EVs connected at bus 82, 83 and AGR5 manages the EVs connected at bus 104, 107. The TE operator selects the optimal bids for peak load reduction while respecting the network constraints. Table 6 summarized the numerical results under different cases, namely, the small system without and with power system constraints, the modified IEEE 123-bus system without and with power system constraints, respectively. The operational cost of DSO, the total power reduced by all aggregators during the flexibility activation, and the total execution time are listed. The total costs of aggregated charging schedules during and after solving the network security violations are also mentioned in the table.  From table 6, for a small test system, consideration of network constraints has caused an increase in the total cost incurred by DSO for acquiring flexibility services. Moreover, the consideration of network constraints also affects the total unserved power, which can be equal or more than the power unserved without considering network constraints. The aggregator's net cost before bidding is similar for both cases however after the bidding model is executed the aggregator's net cost has increased for considering network constraints due to the increase in the DSO flexibility cost. Similarly, for a large test system, the increase in DSO flexibility cost and aggregator net cost after the bidding is more significant when network constraints are considered. For a large test system, the cost incurred by DSO with no network constraints is increased by 49% with network constraints and the net cost of aggregators is increased by 1% as compared to without network constraints. In the end, the computation time (s) for all four cases is presented. With the inclusion of network constraints in the bidding model, the computational time increased. The computational time is influenced more by the large test system than the small test system. However, due to the linearity of the proposed model along with DC power flow equations, the proposed model is executed in a very fast time.

V. CONCLUSION AND FUTURE WORK
A market-based control framework is presented to facilitate the interaction of the AGR, the DSO, and the TE operator. In the presented model, the aggregators' role is to perform two tasks (1) energy profile of aggregated charging schedule (2) interaction with the TE operator in case of need for activating flexibility service. On the other hand, the TE operator is responsible for determining the activated flexibility bids for all aggregators and DSO to reduce system peak load. For this purpose, an optimization problem is formulated that models the total cost incurred by DSO while respecting the network constraints. To illustrate the effectiveness of the proposed methodology numerical simulations has been conducted on two test systems. The results show that the proposed bidding model optimally provides the decisions for the TE operator, who coordinates the decision with the DSO and flexibility providers. Consideration of power system constraints provides different solutions to the TE, which indicates the effectiveness of the proposed model to activate only the technical feasible flexibility bids. In addition, the sensitivity of aggregators' prices has been discussed to show the adeptness and optimality of the model. Finally, computational efficiency analysis has been validated by a modified IEEE 123-Bus system interacted with five aggregators to deliver power for 340 EVs. The results show that the overall framework can be solved in less time, as the model is based on linear programming. VOLUME 8, 2020 Future work includes the consideration of EV driving patterns, battery degradation for a more accurate model, considering the impact of EV load on voltage constraints, therefore, adoption of the AC-power flow model and understanding the impact of activating flexibility in real-time operation.