Bi-level stochastic energy trading model for technical virtual power plants considering various renewable energy sources, energy storage systems and electric vehicles

The ongoing transition of the energy system towards being low-carbon, digitized and distributed is accelerating. Distributed Energy Resources (DERs) are playing a major role in this transition. These DERs can be aggregated and controlled by Virtual Power Plants (VPPs) to participate in energy markets and make full use of the potential of DERs. Many existing VPP models solely focus on the financial impact of aggregating DERs and do not consider the technical limitations of the distribution system. This may result in technically unfeasible solutions to DERs operations. This paper presents an expanded VPP model, termed the Technical Virtual Power Plant (TVPP), which explicitly considers the technical constraints of the network to provide operating schedules that are both economically beneficial to the DERs and technically feasible. The TVPP model is formulated as a bi-level stochastic mixed-integer linear programming (MILP) optimization model. Two objective functions are used, the upper level focuses on minimizing the amount of power imported into the TVPP from the external grid, while the lower level is concerned with optimally scheduling a mixture of DERs to increase the profit of the TVPP operator. The model considers three TVPPs and allows for energy trading among the TVPPs. The model is applied to several case studies based on the IEEE 119-node test system. Results show improved DERs operating schedules, improved system reliability and an increase in demand response engagement. Finally, energy trading among the TVPP is shown to further reduce the costs of the TVPP and power imported from the upstream electrical network.


Motivation and background
There is a worldwide movement to transition energy systems towards those systems that are characterized as low-carbon, digitized and distributed [1]. A key driver of this movement is the growth of smallscale Distributed Energy Resources (DERs) that are consumer-owned and typically connected to the low voltage network [2]. These DERs are essential in future power systems and their rapid adoption has been fueled by several reasons including environmental, economic, energy security and resilience concerns [3,4]. Electricity generated by DERs can be used locally to offset demand or exported to other consumers or the upstream grid [5]. Apart from electricity generation, different DERs may be able to provide additional services to better incorporate uncertain supply from renewable energy sources (RES) or fluctuations in demand [6]. Ancillary services may also be provided by DERs to the wider grid to help maintain a reliable and efficient system [7]. These DERs may be included in novel emerging energy markets which can incentivize their optimal operation, including markets that make use of aggregators or VPPs [8].
In small numbers, the DERs can easily be managed by their owners as their collective impact is not substantial. However, at higher penetrations of these devices, the need for and potential for aggregated control of DERs becomes more important [9]. Aggregated control of DERs can also help bundle enough capacity to meet the minimum bid requirements that may exist in various wholesale energy markets. These aggregating agents or Virtual Power Plants (VPPs) are able of coordinating diverse DERs and act as a single entity in electricity markets [10]. VPPs can group diverse consumers to increase the diversity of their portfolio, thus reducing the risk associated with any one single DER or consumer group [11]. While this diversity of portfolio DERs brings advantages to the VPP, it can also increase the complexity of operating as a single agent in energy markets. Other challenges arise due to the increased diversity of DERs such as settlement and economic matters, environmental considerations and increased challenges associated with meeting the demands of both the market operator and the DER owners [12].
The existing aggregators or VPPs typically focus on the economic and financial aspects of grouping diverse DERs to bid into various energy markets. These models tend to ignore the constraints relating to the technical characteristics of the electrical network [13]. This may result in bids or operating schedules which are physically infeasible to implement. Thus the technical constraints of the distribution system must be explicitly included in the VPP scheduling models. VPPs which take these constraints into account are termed Technical Virtual Power Plants [12]. An overview of such a TVPP is shown in Fig. 1. The figure shows the TVPP is at the center of operations and communicates directly with various other actors, including the wholesale market operator and the DER owners. Additionally, the TVPP should communicate with RES owners to forecast energy supply to prepare their flexible demand if needed. The operator of the TVPP also optimizes the dispatch of its constituent DERs in a technically and economically feasible manner.

Literature review
The Virtual Power Plant (VPP) concept can be defined as an aggregating agent for a diverse set of DERs to act as a single entity to participate in existing and this concept has been the subject of much research interest recently. Broadly speaking, the existing work has concentrated on economic or financial motives such as reducing consumer costs or maximizing VPP profit. An example of this is the VPP model developed by [14] which participates in energy and regulation services markets using a combination of DERs, including battery energy storage systems.
VPPs can also include other DERs such as Electric Vehicles (EVs). One such model to increase the amount of usable generation from wind was developed by [15]. The framework was composed of two stages, the first developed the framework and control strategy of the VPP while the second stage optimized energy storage systems and EVs. There was no consideration of other types of DERs or RES and the lack of diversity may Power transferred from DG to EV (kW) P l , Q l , θ l Active power flow, reactive power flow, and voltage angle difference of branch l (MW, MVAr, radians) PL l , QL l Active and reactive power losses for branch l (MW, MVAr) V ni , V nj Voltage magnitudes at node i and j (kV) u l,h DER binary operating variable θ ni , θ nj Node i and j voltage angle (radians) x l,h Line status binary variable limit the benefits that the VPP can provide to consumers and the external grid. An example of a multistage model which incorporated EVs within the VPP was developed by [16]. The authors used stochastic mixedinteger linear programming to include several types of uncertainties in the model. In addition, Time-of-Use and Real-Time tariffs were utilized. An important contribution of the paper was to allow VPPs to trade energy among themselves to help respect the technical constraints of the network. Several types of RES and different consumers were included in the model proposed by [17] with the objective of analysing the changes in operating costs of the VPP. The model operated in the real-time market but did not include technical constraints of the network in the formulation. A VPP model composed of two stages and using various RES was formulated by [18]. The model used controllable HVAC units and used two aggregation models, termed static and dynamic. The static model aggregated the load once the model was initialized while the dynamic model aggregated the loads for each time step. Technical constraints of the network were not considered in the model formulation. The optimal scheduling of both thermal and electrical resources in a commercial VPP was explored by [19]. The problem was formulated as a stochastic MILP to increase the profit of the VPP operator while also investigating the effects of various forms of uncertainty, including solar radiation, wind speed and electricity price uncertainty, on the profit. The model considered a single VPP without technical network constraints and demand response programs were not considered.
A paper which used robust optimization to account for the uncertainties was presented by [20]. The model is a tri-level model where each layer focuses on a specific objective, namely maximizing the profits of the VPP through optimal operation, ensuring system security through optimal regulation commands and finally a layer dedicated to scheduling the optimal regulation services to minimize costs. The model was transformed into an equivalent single-layer cone programming problem and the results show improved VPP profits and reduced probabilities of power flow violations relative to existing methods. The model only considered a single VPP and so could not assess the impact of energy trading among the consumers in the VPP or among different VPPs.
Contrary to the above examples, a study that focused entirely on the game-theoretical approaches to estimating the benefits of a VPP was produced by [21]. The authors did not consider the technical characteristics of various DERs at all but rather used economic descriptions and indicators to determine the payback period and total lifecycle costs of a VPP. The authors found that significant energy savings could be achieved by implementing a VPP and go on to provide policy guidance for implementing VPPs in an urban Japanese environment. A two-stage model for a single VPP acting as a price taker was developed by [22]. The VPP acted in both the day-ahead market as well as reserve energy markets. The upper level of the model was concerned with the operating decisions of the VPP while the lower level considered the clearing of the energy and reserve markets. The model did not consider any network constraints. Results showed that the VPP's profits increased when the VPP operator behaved strategically compared to a case when the VPP acted as a pure price-taker.
The model developed by [23] constructs a nested VPP model which considers intra and inter-provincial energy balancing by VPPS. The model was initially a bi-level model which was reformulated into a single-level model using the Karush-Kuhn-Tucker (KKT) conditions. The upper level of the model aims to minimize the operational cost of the overall market while the lower level aims to minimize the cost of renewable energy purchases, however, the model does not consider the technical constraints of the network at either the lower or upper level. Each VPP can act as a load-balancing authority which in turn improves the outcomes of the model. Expanding on this concept of using multiple VPPs to collaboratively manage an energy market, the paper by [8] schedules several VPPs to optimally operate an active distribution network considering network topology and constraints. The model was formulated as a bilevel model with the goal of the upper level to minimize the operating costs of the entire system considering both system security and economical operations. The lower level sought to maximize the profit of each VPP by optimally scheduling their DERs. The model was transformed into a single level model using the KKT conditions. Results showed both increased system security and economic outcomes for the VPP operators. A model for the operation and control of a single TVPP was developed by [24] who developed a MILP model to optimize the schedule of a diverse set of DERs, including HVAC units, within the IEEE 119 node test system. The authors quantified and allocated the benefits of the different types of DERs to the system using the Vickery Clarke Groves mechanism and the results showed that electric vehicles had the greatest impact on the system. The model did not account for energy trading among several TVPPs.
The preceding paragraphs show that the concept of the VPP has been studied using a diverse set of technologies and objective functions. Despite this, a research gap has been identified, and this gap is the question of the operation of several TVPPs that aggregate DERs and utilize both inter and intra-VPP energy balancing. This research gap is shown in Table 1 which summarizes the existing literature on VPPs and shows how the current model extends the state of the art. To date, there has been very little research which considers the technical constraints of the distribution network and congestion management concerns. To address this, this paper presents a comprehensive two-stage model investigating the potential of several TVPPs in a hierarchal energy market which seeks to maximize the profit of the VPPs while respecting the technical constraints and congestion management issues at both the lower and upper levels. A preliminary and simplified version was presented earlier [25]. In that paper, a basic TVPP model was developed considering DERs and commercial demand response. However, energy trading among the TVPPs was not considered. Also, the technical constraints of both the inter-VPP and intra-VPP energy trading were ignored. In the current paper, the model has been reformulated as a stochastic bi-level model, which considers numerous TVPPs. To the best of the authors' knowledge, this is the first paper to consider energy trading among TVPPs. Using the TVPP concept allows for the model to produce optimal scheduling decisions in terms of both economic and technical aspects.

Contributions
As the previous section has shown, the technical constraints of a VPP have not been examined in depth. Failing to include these technical constraints into account may lead to sub-optimal or infeasible solutions in terms of scheduling the growing number of DERs within an electrical network. In addition, several existing studies were concerned with a single-operating VPP. Including numerous VPPs within the system and allowing them to trade energy will allow them to actively contribute to balancing the supply and demand of energy within a system which may entail additional financial benefits for the constituent consumers.
Based on the literature reviewed and the research gaps highlighted in the previous section, this paper has the following contributions: • Firstly, a stochastic mixed-integer linear programming model is formulated to analyze the impact of various types of DERs on the operation of a TVPP. The network constraints include energy losses, voltage profiles and line congestion. • Secondly, the model is developed as a two-stage model to ease the computational complexity. The split-level nature of this model relies on the TVPP as a key operator in the model. The TVPP operator is responsible for coordinating with the consumer to schedule demand and supply within its operational area and then the TVPP operator also coordinates with other TVPPs and the external grid. Thus, through aggregation and utilizing local generation to meet consumers' needs, the TVPP reduces the amount of information exchanged between consumers and the external grid. This will also help to ensure the privacy of individual consumers' information as it only exchanges information with a single trusted entity, the TVPP operator. • Thirdly, the model is formulated in such a manner to allow for both inter and intra energy TVPP trading. This is an important aspect to consider as it helps to increase the utilization of locally generated electricity and reduce the dependence on the external grid. Finally, the model introduces extensive use of EV charging in commercial parking lots to increase the flexibility of the TVPP.

Paper structure
The remainder of the paper is structured as follows. Section 2 contains the mathematical formulation of the model. The details of the case studies considered, the test systems used and the results are presented in Section 3. Section 4 presents relevant conclusions from the model.

Model context
The stochastic bilevel model presented in this section has the aim to maximize the TVPP's profit by optimally scheduling various DERs while allowing energy trading among the TVPPs. The model is composed of two layers. The upper level manages and optimizes the energy flows between the TVPPs and the external grid. The lower level allows for the TVPPs to optimally schedule the DERs considering the technical constraints. By splitting the market into two clear layers, sensitive data relating to the technical and economic characteristics of the DERs are only shared with the TVPP operator and not with the wider system. The model runs the two stages sequentially with the lower level being solved first and reporting results up to the upper level. With this information, the upper level then optimizes the energy trading between the TVPPs and the external grid to maximize TVPP profit. Fig. 2 shows the overall concept of the system of TVPPs and their interactions with each other, the external grid, and their constituent DERs. Each TVPP will have a different collection of DERs which they can optimize according to the consumers' preferences and the technical constraints of the network. Depending on the results of this scheduling, the TVPP operator may communicate with other TVPP operators or the external grid to purchase or sell energy. In this model both information and energy are exchanged between consumers, the TVPP operators and the external grid.
The model is composed of the following steps which are shown in Fig. 3. To begin with, weather data and driving profiles (arrival and departure times) for the electric vehicles, are imported to the individual scheduling problem for a TVPP. In each TVPP there is a single entity charged with operating and optimizing the assets which constitute the TVPP. This TVPP operator performs individual scheduling using the developed MILP model. This model incorporates uncertainty regarding the weather data for the PV and wind energy assets, load uncertainty as well as uncertainty related to EV driving patterns. This scheduling problem is run for a single day (D) for the following 24 h and at each hour, the balance between generation and load within the TVPP is evaluated. If there is a difference between the generation and demand, the TVPP operator communicates this to the other TVPPs to investigate if the other TVPPs may help balance the load and generation for the specific hours. If the TVPP operators can resolve the generation/load imbalance by themselves the model moves to the next day. If there is still a shortfall or excess of electricity in the TVPP's operational area, the external grid is used to resolve this imbalance, either by buying or selling energy to the TVPP operator. Once this step is complete and the energy balance is met for all hours of the selected day, the model moves forward to the next day.

Upper level
The upper level of the model is responsible for ensuring that the energy balance of the system is respected. This is shown in (1) where the objective is to balance the energy used for all loads, including charging EVs for each TVPP plus any imported energy from either the other TVPPs or the external grid. This is balanced against the electricity generated in the TVPPs plus any discharging from EVs combined with any export from the TVPP to other TVPPs or the external grid. This upper-level model is solved once the lower level model has scheduled the operation of the various DERs in each of the TVPPs.

Lower level
The lower level aims to maximize the profit of the TVPP operator by optimally scheduling various DERs. The profit is composed of two terms namely, revenue from power sold to customers (PSC) and the operating cost of the TVPP (TVPPC) plant. The lower level objective function is shown in (2).

Max Profit = PSC-TVPPC
In (3), the PSC revenue term is decomposed into its constituent components. This equation represents the daily power consumption from individual consumers to meet their load demands, including EV charging multiplied by the time interval (Δ t ). The consumer's power consumption is subject to Time of Use (TOU) tariffs.

PSC
The TVPPC term is presented in (4). In this term are the costs paid to consumer-owned DG for electricity produced and maintenance costs. A focus of this model is on commercial EV charging taking place in parking lots. The occupancy of the parking lots is related to typical working hours. Therefore, the arrivals and departures of the EVs are represented by the following normal distribution shown in (5): where ev = {1, 2, …, N} represents the number of EVs, σ h and μ h are the average and standard deviation, respectively. EVs are modelled by the expressions (6)- (15). The power from the DG and the market to the various EVs should be less than the maximum charging capacity of the various EVs and this is shown in (6).
Likewise, the power discharged from the EVs to the market should be less than the maximum discharging capacity of the EVs which is captured in (7). Inequalities (8) and (9) detail the maximum charging and discharging rates. Inequality (10) prohibits charging or discharging from occurring simultaneously.
The EV's state of charge (SoC) is shown in (11). It is based on the SoC of the previous period and any changes from charging or discharging in the current period. Inequality (12) sets the permissible range for the energy stored in the EV. For simplicity, both η ch ev and η dch ev are set to be equal to each and represented as a percentage and are based on the node where the EVs are connected. The calculation of the charging status of the EV is shown in (13) and this relies on the arrival and departure time (and state of charge of the battery when the EV arrives) as well as the capacity of the EV battery given by BC ev . Eq. (14) ensures that when the EVs are disconnected, either before the arrival time or after the departure time, from the parking lot, there is no energy flow from the DG or market to the EV and no discharge from the EV to the market.
The flow through a given line has a maximum limit which is given by inequality (19). The active/reactive power line losses are given by Eqs. (20) and (21).
The active/reactive DGs power limits are provided by (22) and (23). Inequality (24) For stability reasons, (25) and (26) The reactive power that is withdrawn from the substation is subject to the bounds presented in inequality (27).
Eq. (28) requires that all nodes with demand at hour h are connected. The inequality presented in (29) provides an upper bound of 1 input flow for terminal nodes. ∑ l∈Ω l χ l,h = 1, ∀m ∈ Ω k ; l ∈ n (28) Fig. 4. IEEE 119 node test system.

System details
The various case studies and results from the model being applied to these cases are presented in this section. The three TVPPs contained various amounts of wind turbines, PV panels, energy storage systems and electric vehicles. In this model, there are three distinct TVPP types. This was done to replicate different generation and load profiles that may exist between different consumers. The first TVPP is composed of numerous residential consumers. Some of these consumers own DERS including end generation, PV, ESS and EVs but the uptake is limited. The load profiles for this TVPP follow typical residential load profiles. The second TVPP introduces large service buildings into the system, these service buildings will have increased renewable energy generation as well as ESS capacity. The third VTPP contains loads from commercial buildings and EV parking lots. The number of renewables, especially PV, is larger than the other two TVPPs and this TVPP contains the EV parking lots.
The case studies consist of a baseline model followed by three variations. The benchmark case, Case 1, was used to examine how the existing external energy market can meet the loads of the various consumers in the system. Case 2 then introduced the concept of the TVPPs. Case 3 increased the penetration of DERs in the system to examine the energy trading between the TVPPs. Case study 3 was further divided into two separate case studies which were 3A and 3B. In Case 3B, the only DERs were the EVs and the renewable generation and ESS were removed. This allowed for the calculation of the contribution of the EVs to the improved system performance.
The standard IEEE-119 node test system was chosen for the simulations and validation of the mathematical model [27]. The single line diagram of the test system is shown in Fig. 4. Wind and solar PV were chosen as the two types of DG units used in the model. For both RES, a 1 MW installed capacity was chosen. The wind and solar PV costs are extracted from [28]. The following set of assumptions and system data are included in the formulation: • A 24-h time horizon is used. • Nominal voltage is 12.66 kV.
• The substation acts as the reference node and the voltage is set to 12.66 kV. • A lagging power factor of 0.95 is used for the DG units.
• The power factor at the substation is set at 0.80. • The EV charging and discharging rates are equal and set at 90 %.
• The costs of charging and discharging the EVs are €5/MWh.
• A minimum battery capacity for EVs is set to 40 %.
• The operating costs for the solar PV and wind are €/40MWh and €20/ MWh, respectively.
• The model is based on a summer operating season There are several commercial customers spread through the network. These are located at nodes 14, 29, 34, 43, 52, 56, 61, 66, 69, 73, 77, 83, 100, 107, 112 and 116. Each commercial customer has an EV parking lot which contains 10 vehicle chargers. The remaining nodes are assumed to be residential consumers and own various DERs. Stochastic optimization was used in this model to account for the uncertainties. Accurately including and accounting for the uncertainties inherent in a VPP model is a difficult challenge to overcome and there are several methods that can be used to this end.
Stochastic optimization relies on scenario generation to adequately address uncertainties within a given model. The adequacy of the results from a stochastic optimization model relies on the number and quality of the scenarios generated. In this paper, the well-known k-means clustering technique was used to perform scenario reduction to represent typical operation states.
Robust optimization, as was used in [20], also offers an effective technique for dealing with uncertainty. This technique is especially useful when there is a shortage of historical data as it uses parametric bounds to represent the uncertain input parameters. Robust optimization presents optimal solutions for worst-case scenario operations but may be conservative [20]. As the objective of this problem was to maximize TVPP profit and sufficient historical data was available, stochastic optimization was selected.
There are three sources of uncertainty accounted for in this model. These are concerned with solar generation, wind generation and demand. Using the historical data mentioned above, the different types of uncertainty are accounted for by using a set of three scenarios for each parameter. This results in 27 scenarios which were reduced utilizing the k means technique [26]. The model was formulated as a Mixed Integer Linear Programming Model (MILP) and solved using CPLEX 12.0. Simulations are performed on a workstation with two 3.1GHz processors and 256 GB RAM.

Model impacts on profit and energy trading
The major objective of the TVPP operators is to maximize their profit through the optimal scheduling of DERs. This is achieved in the first stage of the proposed model while the second stage allows for energy trading among the TVPPs to further reduce the need for importing energy from the external grid. This section describes the financial performance of the TVPPs in this model in both the first and second stages. Table 2 shows the financial performance of the TVPPs operating in the system for the various case studies considered. Note that in Case 3B, only the commercial TVPP3 has EVs included and the revenues and costs of this TVPP are from the operation of these EV parking lots. Comparing the total revenues, costs and profits across the case studies shows the clear benefits of using the TVPP model to manage and schedule the DERs within the system. The profit in Case 2 is 72.52 % higher than the profit in Case 1. This is mainly due to a 37.43 % decrease in costs with only a 0.57 % increase in revenues. The cost reduction is mainly due to the lower cost of purchasing power from local DERs compared to purchasing the power from the existing grid. Case 3A increases the profits further relative to Case 2 as inter TVPP trading is now allowed, and this contributes to further cost decreases of 2.73 percentage points and revenue increases of 1.3 percentage points. Case 3B only presents cost, revenue and profit information for TVPP 3 as it contains the EV parking lots and the individual contribution of these parking lots were investigated in this case study. It can be seen that the costs are increased, and revenues are decreased in this case study compared to Case 3A which leads to a lower profit. These results will be discussed further in later sections which examine the question of which technology plays the largest role in increasing profits for the operator of the TVPP. Fig. 5 shows the influence of every technology to help meet demand in Case 2. The energy mix for TVPP1 in Case 1 has the same load and all demand is met through grid imports. In this second case, small-scale wind and solar PV accounted for 38.14 % of the energy used to meet the demand of the consumers within the TVPP.
In terms of the energy mix in Case 2 for TVPP 3, there is a significant contribution from RES, achieving 72.9 % of total demand. Wind generation contributes with 60.16 % of demand, though there is also considerable PV generation, and this energy mix for TVPP 3 in Case 2 is shown in Fig. 6. During peak solar PV production, there is sufficient generation from renewable sources to ensure there is no import from the external grid during the hours of solar PV generation.
In Case 3, there is an increase in the EVs used in TVPP 3, this means that while there is still no grid import of energy during peak solar production, there is still a small shortfall between generation and demand within the TVPP. This shortfall is met by importing energy from the other two TVPPs. The imported energy from other TVPPs accounts for 6.55 % of total demand during the 24 h. This helps to lower energy costs for the consumers compared to cases where energy trading among TVPPs is not allowed. The energy mix of TVPP 3, in this case, is shown in Fig. 7.
The exact energy trades taking place between the TVPPs as well as the import from and export of energy to the grid in both Case 2 and Case 3 are shown in Figs. 8 and 9 respectively. In Case 2 there is no energy trading allowed while in Case 3 the TVPPs may trade energy. These figures show the total amount of power traded during the 24 h under consideration. Fig. 8 shows the flows of energy where there is no energy trading among the TVPPs. The thickness of the lines and the direction of the arrow show the magnitude and direction of the energy trading, for example, TVPP3 received 64.38 MWh of energy during the 24 h from the external grid. In Fig. 9 the energy trading among TVPPs is allowed and it can be seen that TVPP1 and TVPP2 provide 11.19 MWh and 15.46 MWh of energy to TVPP3, respectively. This reduces the amount of energy that is needed to be imported from the external grid by TVPP3 and this will contribute to cost reductions for consumers of TVPP3.

Model impacts on technical characteristics
The voltage profile for every TVPP considered is displayed in Figs. 10, 11, and 12. As there is no TVPP in operation for Case 1, each of the TVPPs has the same voltage profile in this case study as this is the system-wide voltage profile. Case 2 represents the TVPPs in operation, and Case 3A expands Case 2 to allow for energy trading between the TVPPs. Case 3B is not included as only TVPP 3 was considered in the case study. The figures show that there are significant decreases in the   voltage deviations for all the TVPPs as their ability to interact with the energy system increases. Table 3 below shows the changes in the percentage voltage deviation in the three TVPPs in Case 2 and Case 3. The percentage voltage deviations decrease for each TVPP in Case 3. For TVPP 1 there is a 15 % reduction in voltage deviations in Case 2 relative to Case 1 and a 21.94 % reduction in voltage deviations in Case 3. TVPP 2 shows a 43.69 % reduction in voltage deviations in Case 2 and this improvement is increased to 49.65 % in Case 3. Finally, TVPP 3 shows a reduction in the average deviation of 52.34 % for Case 2 and 56.31 % for Case 3.
DGs and EVs combined with the energy trading in Case 3 indicate that we have less imported power from the substation. The average nodal voltage profile for each node in the three TVPPs for the three case studies is shown in the respective figures below. Fig. 10 shows the profile for TVPP 1 while Fig. 11 presents the profile for TVPP 2. Finally, TVPP 3's profile is shown in Fig. 12. From these figures, it can be concluded that the model improved the average nodal voltages of the system.
A further technical constraint that was considered in this model is the  impact of the TVPP operation on the line congestion experienced in the system. Table 4 below shows the congestion in the lines for Case 1, Case 2 and Case 3. The line congestion is significantly reduced in Case 2 compared to Case 1 with a 79.35 % reduction in congestion. The congestion is reduced further in Case 3, with a reduction of 81.17 % relative to Case 1. The major reason for this is the presence of DGs within the system reducing the among of power needed from the substations. The ability of EVs to alleviate congestion is limited by their energy and power ratings. Finally, the impact of the model on the power losses experienced by the system was investigated. These losses in the lines for all TVPPs in the various case studies were examined. The average losses for each hour for TVPP 3 for all three case studies are shown in Fig. 13. From the figure, it is clear to see the reduction in losses between each of the case studies with case 3 having the lowest average nodal losses. The losses are reduced by 69.6 % between Case 1 and Case 2 and by 73.7 % for Case 3 relative to Case 1. This has several technical benefits for the TVPP operators and in addition, it also provides economic benefits to the consumer as less energy will need to be purchased in total to satisfy their energy needs.
The model performed well in terms of computation time. The time taken to solve Case 1 was 20.5 s, Case 2 required 86.7 s while the times taken for Case 3A and Case 3B were 123.1 s and 104 s, respectively. This shows that the model can be implemented without a significant impact on the time taken to obtain a solution.

Conclusions
This paper has analyzed the potential for a network of TVPP operators to positively impact the local distribution system, through the aggregation of DERs, EVs and demand response services to minimize the amount of energy imported from the external grid and maximize the profit of the TVPP operators. This was carried out using a two-stage MILP model considering different DER technologies and forms of N12 N24 N37 N50 N63 N75 N87 N100 N113     Table 4 Line congestion in the system.