Day-ahead charging operation of electric vehicles with on-site renewable energy resources in a mixed integer linear programming framework

The large-scale penetration of electric vehicles (EVs) into the power system will provoke new challenges needed to be handled by distribution system operators (DSOs). Demand response (DR) strategies play a key role in facilitating the integration of each new asset into the power system. With the aid of the smart grid paradigm, a day-ahead charging operation of large-scale penetration of EVs in different regions that include different aggregators and various EV parking lots (EVPLs) is propounded in this study. Moreover, the uncertainty of the related EV owners, such as the initial state-of-energy and the arrival time to the related EVPL, is taken into account. The stochasticity of PV generation is also investigated by using a scenariobased approach related to daily solar irradiation data. Last but not least, the operational flexibility is also taken into consideration by implementing peak load limitation (PLL) based DR strategies from the DSO point of view. To reveal the effectiveness of the devised scheduling model, it is performed under various case studies that have different levels of PLL, and for the cases with and without PV generation.


Nomenclature
In this section, the main nomenclature used throughout the study is detailed as abbreviations, set and indices, parameters, and variables.  P r, n, v, s, t agg total charging power of aggregator n under region r during period t for scenarios s and v (kW) P r, n, k, m, v, s, t EV, ch charging power of EV m in EVPL k under aggregator n in region r during period t for scenarios s and v (kW) P r, n, k, v, s, t EVPL total charging power of EVPL k under aggregator n in region r during period t for scenarios s and v (kW) P i, v, s, t f total active power provided by substation at node i in scenario v and s during period t (kW) P i, v, s, t f , load active power provided by substation at node i in scenario v and s during period t to cover the demand (kW) P b, v, s, t loss power losses of branch b in scenario v and s during period t (kW) P r, v, s, t region, tot total active power demanded of region r in scenario v and s during period t (kW) P v, s, t sell, grid power injected to upstream grid in scenario v and s during period t (kW) SoE r, n, k, m, v, s, t EV SoE of EV m in EVPL k under aggregator n in region r during period t for scenarios s and v (kWh) u v, s, t grid binary variable. 1 if there is a power exchange between upstream grid and regions in scenario v and s in period t; else 0 z b, v, s, t, p SOS2 variables that are used to approximate the power losses 1 Introduction

Motivation and background
In recent decades, the incessant technological needs of humankind play a key role in the increase in electrical energy use. The irresistible spreading of technology and augmentation of industrial applications have resulted in a copious amount of environmental problems together with imbalances between supply and demand sides. According to the revealed report [1], it was stated that total electricity demand has increased by the rate of 3.1% in 2017. After three years of remaining value as flat, global greenhouse gas (GHG) emission rose by 1.4% sets a historical record of 32.4 G [1].
To tackle the energy demand and GHG emissions, researchers have investigated new remedies on sustainable and renewable energy. International Renewable Energy Agency published a capacity statistic report related to renewable energy systems in which an increase in total RES capacity around 4.83 and 6.84% is stated for Europe and USA, respectively [2].
At the same time, transportation systems also need to be evolved into the paradigm of green vehicles to gradually decrease GHG emissions and dependence on fossil fuels. Therefore, the aforementioned paradigm has caused the emergence of a new player named as electric vehicle (EV). The number of EVs has outstandingly increased in recent years and this increment will proceed without a doubt. It is stated in a published report in [3] that the worldwide number of EVs is expected to be exceeded over 150 million in 2040.
Thanks to the increase in the number of EVs, a crucial amount of decreasing in the GHG emission will also be provided. Because it has already indicated in [4] that the transportation sector is responsible for 23% of the energy-related GHG emissions in the year 2017.
The aforementioned circumstances suggest that owing to the smart grid concept, the energy imbalances between demand and supply sides can be handled by implementing demand response (DR) strategies as an alternative way along with the increasing amount of electricity generation.
Moreover, EVs can be taken into consideration as a substantial asset to provide a more flexible power system in an operational manner [5,6]. Last but not least, energy efficiency can be enhanced by accurate scheduling of charging operations among the different regions.

Relevant literature
There are many studies dealing with the scheduling of the EVs' charging operations in the existing literature. However, only a few of them have concerned the parking lots framework, and among them, while some studies considered DR strategies, the others did not even mention.
Rezaee et al. [7] investigated the total daily impact of EVs charging/discharging interactions in the EV parking lot (EVPL) on the grid based on statistical data and the general regulations. Chukwu and Mahajan [8] presented mathematical models to estimate the power capacity of an EVPL which is enriched with vehicle-to-grid (V2G) feature. Moreover, together with the stochasticity, photovoltaic (PV) rooftops were taken into consideration to enhance the related power capacity in the EVPL. In [9], Shaaban et al. stated that a novel online charging coordination method was devised in a smart distribution network with the aims of maximising the EV owners' satisfaction and minimising system operating cost. Furthermore, different busses were considered as having different EVPLs. Yazdani-Damavandi et al. [10] modelled an EVPL within the concept of a multi-energy system (MES) considering the uncertain behaviour of the EV owners. In [10], the authors developed a new operational process of the parking lots by considering MES and EVPL simultaneously. In [11], a centralised EVs recharging scheduling system was proposed by considering real mobility/parking profile on individual EVPL. Also, the objective of that work was twofold, which were to maximise the income of the parking lot and the number of recharged EVs.
In [12], an energy management system (EMS) for charging/ discharging operations of an EVPL was propounded. It was stated that the EMS aimed to minimise the cost of charge and to maximise their profit by selling energy back to the grid. Ghazanfari et al. [13] devised a decentralised management for DC EVPLs equipped with diverse types of distributed generation units. Moreover, the devised model was demonstrated in real-time hardware-in-the-loop studies. In [14][15][16] the topic was approached from different points of view. With the aid of EVs' V2G feature, EVPLs were considered to enhance distribution system reliability enriched by renewable generation units. The work in [17] proposed planning for the penetration of renewable energy sources, energy storage, and EVs. Moreover, a comparison between coordinated and uncoordinated charging was provided by the devised model. Shafie-Khah et al. [18] propounded a two-level model for EVPLs in renewable-based distribution systems to minimise the overall cost from distribution system operator (DSO) point of view and maximising EVPL and the relevant aggregator profit. In [19], the power flow of EVs due to traffic flow was investigated, and EVPL's charging operations based on traffic pattern were explored. In [20], Chen et al. studied on the charging facilities planning equipped with multiple-charger multiple-port charging to schedule charging/discharging transactions in an effective manner. Shafie-Khah et al. explored the optimal EVPL behaviour in another study [21]. It should be noted that EVPLs were evaluated as DR agents considering price and incentive based DR strategies. In [22], both EVPLs located near commercial places and residential buildings were addressed by taking day-time and night-time periods into account. Furthermore, thanks to the dynamic electricity price, DR strategies were also regarded. Neyestani et al. [23] suggested a model to explore the interactions of EVPLs with the electricity markets. The proposed model was equipped with distributed generation units and DR programs were considered. Sengor et al. [24] devised an EVPL model to schedule the charging operations of EVs under peak load reduction based DR programs.
The research by Yang et al. [25] explored the wind power potential on the roof of high-rise buildings for EV charging demand to maximise profit of buildings. Also, the authors considered the uncertainty of wind power generation together with EV owners' behaviour. However, any DR programs were not mentioned. In [26], the authors improved a real-time optimal energy management controller for EVs' charging in a microgrid environment. The proposed management systems aimed to minimise the cost of energy at the workplace. The stochasticity of PV generation along with the EV journey pattern was addressed.

368
IET However, DR programs were neglected. The authors in [27] proposed an efficient power management algorithm in fuzzy logic inference for an EVPL. However, power flow among the regions in a distribution system and the renewable energy systems were neglected in this paper. In [28], the charging management of EVs in a commercial parking lots was handled as a real-time model together with considering PV based renewable energy and energy storage systems. Nevertheless, the propounded model focused on a single EVPL so neither different aggregators nor different EVPLs were evaluated. In [29,30], the charging scheduling of the EVs in an EVPL was addressed considering PV based renewable energy systems and the profit maximisation was the main goal in both studies. However, peak load limitation (PLL) based DR and power flow among the regions were not evaluated in the scope of the papers.
The main difference of this study from the abovementioned works is to evaluate charging operations of many EVPLs controlled by multiple aggregators under different regions from DSO point of view. In the existing models, the charging management of a single EV or EVs in the parking lots were investigated from either aggregator perspective or the EV owners' profit point of view. In this study, the DSO can directly manipulate the total load demands of a distribution system by limiting the peak load. Moreover, the power limitation reflects the regions based on the power demand of the aggregators and EVPLs owing to the power flow among the related regions. It is worth noting that DSO handles improved operational flexibility via a direct access ability to impose PLL during the daily operation of the regions and it is properly applied to the other regions by considering power flow in this study.

Contributions and organisation
In this study, day-ahead scheduling of EVs charging operation among the regions that include multiple aggregators and various EVPLs is propounded in a mixed integer linear programming (MILP) framework. Herein, the power flow between the regions is considered with the aim of minimising the branch energy losses. As seen in Table 1, many studies have focused on EVs' charging from different points of view. It can be deduced from the table that centralised and decentralised management perspectives together with multiple aggregators under different regions is taken into account the first time in the existing literature. It should be underlined that dealing with the topic from the perspective of DSO separates this study from the other studies in the literature.
The novel contributions are threefold: i. The centralised direct manipulation capability of the DSO on EV operation is taken into account together with the decentralised management strategies of EVPL aggregators and EVPLs as the first time in the literature. Moreover, the proposed model was tested in a real distribution system in Turkey along with in a test system existing in the literature. ii. EVs' charging coordination among the PV generation-based regions including multiple aggregators and various EVPLs is presented together as a hierarchical structure. iii. Along with the PV generations' stochasticity, the uncertainties related to EV owners' behaviours such as remaining state-ofenergy (SoE) and arrival time to a parking lot are also considered. Besides, power flow among the regions is taken into account during implementation of PLL-based DR strategies to provide a more realistic approach.
The presentation of the paper is organised as follows: Section 2 gives the details about mathematical basis of the EV motion power and the devised energy management structure among the regions. Input data and the discussion of the related results of the selected case studies are presented in Section 3. Finally, concluding remarks are highlighted in Section 4.

An overview of the proposed structure
The proposed EVPL aggregators' EMS can be demonstrated with the block diagram as shown in Fig. 1. It is worthy to indicate that one of the most important targets of this model is to schedule the charging behaviour of EVs in different regions under EVPLs and aggregators to enhance the effectiveness of DSO. On the other hand, there is a connection between the upstream grid and the regions, which enables bi-directional power flow in parties. Thus, demanded power is supplied by upstream grid and/or locally distributed PV plants. Also, the available energy can be injected to the upstream grid and/or stored in EVs' battery units by taking optimal operational requirements into consideration. A considerable amount of different types and brands of EVs and a DR strategy demanded by the load-serving entity (LSE) are considered in this detailed framework. Moreover, the stochastic nature of PV production plants and the behaviour of EVs are modelled as a scenario-based stochastic optimisation approach to address various uncertainties. The rest of this section describes the mathematical background of both the EV motion and the devised energy management strategy, respectively.

Mathematical background of EV motion
The mathematical model of EV motion is presented in this section to obtain different scenarios of EV arrival times and also calculate the remaining SoE that belongs to each EV by taking different driving cycles into consideration. The mathematical framework is presented to model an EV motion based on Newton's second law of motion by analysing the forces acting on it. These forces can be demonstrated as in Fig. 2, which have an impact on EV motion during travel. It is to be indicated that the total traction force F t t is the total force required to move the EV and also aided to determine the maximum torque need as expressed in (1). It consists of five main forces, which are aerodynamic drag force, F a, t , rolling friction (resistance) force, F r, t , the force caused by the gravity when driving on non-horizontal roads, F g, t , the disturbance force that summarises all other effects, F d, t , and lastly the force by the acceleration of the vehicle [21]. Equation (2) states the aerodynamic drag force where A expresses front surface of vehicle in m 2 , C x represents the drag coefficient, and ρ indicates air density in kg/m 3 . Rolling friction force is an opposing motion that occurs due to the rolling motion between wheels and surface as indicated in (3). Besides, the other forces acting on the motion are expressed by (4). So, it is evident that it depends on the values of C r , α, g, m v which represent the rolling resistance coefficient, road slope in rad, the gravity of earth in m/s 2 , and mass of the vehicle in kg, respectively. More specifically, the gravity force can be defined as a resistance that pulls the vehicle back on the non-horizontal roads.
The vehicle acceleration can be expressed by (5) with using the difference between consecutive values of v t divided by the time granularity ΔT . It is noted that if the EV is slowing down acceleration will be negative. Equation (6) states the electrical power demand of the EV in period t in watt, P t , where P v t represents the mechanical power need in period t in watt, and driving efficiency is expressed by η d . P v, t is obtained by multiplying vehicle speed v t in m/s in period t, and total traction force F t, t in Newton acting on EV in period t in (7)

Devised regional EVPL aggregator energy management model
An optimisation based EVPL aggregator energy management framework is presented in this study, to enhance the DSO effectiveness and also to provide more flexible power system considering highly penetrated EV integration. The comprehensive mathematical model aims to analyse system requirements and conditions to accomplish management strategies within the scope of smart grid paradigm.

Objective function:
The objective function expressed by (8) is created aiming at minimising total losses in the branches

Power balance, branch flow limits, and substation limits:
Herein, the power balance of this model, given in (9), includes total generated power by PV plants P v, t pv, tot and the power injected from the upstream grid for meeting the regions' demand P r, v, s, t region, total . Also the powers which enter the node and are sent from reference bus i to load busses are considered in (9) and represented as Equation (10) states that the active power can be transmitted to upstream grid or vice versa during the period t in scenario v and s according to the optimal solution within the constraint of the branch flow capacity. Also, the amount of transferred power from the upstream grid P i, v, s, t f should meet the demand of buses P i, v, s, t f , load and losses P b, v, s, t loss as indicated in (11). To schedule energy exchanges between parties, the unit commitment based formulations are to be used.
Thanks to the inequalities (12) and (13), it is not possible to provide bi-directional power flow at the same time. N is chosen as a sufficiently large positive constant as a limitation for the power exchange with the upstream grid. Lastly, substation node's generator power limit P i f , max is determined by (14) (see (9))

Linear approximation of the losses:
The active power losses in the branches are formulated as a second-order function with the constants of d and c as expressed in (15). However, it consists of a non-linear term f b, v, s, t 2 that should be linearised. Therefore, Special Order Sets of Type 2 (SOS2), one of the most common linearisation methods in the literature, is used in order to obtain appropriate function and integrate into MILP framework. Equation (16) states the SOS2 variables while the power flow is approximated by using these variables and constraints in (17) and (18)

Regional limits:
It is worth noting that this coordinated scheme proposes a hierarchical system design in which every party is controlled by upper layers during the whole simulation. Hence, the total active power demand of each region P r, v, s, t region, tot is obtained by summation of charging power of aggregators P r, n, v, s, t agg during period t for scenarios v and s as expressed in (19). Similarly, the total charging power of aggregator n can be calculated by summation of every EVPLs' power need P r, n, k, v, s, t EVPL as stated in (20). Lastly, the total power for each EVPL is obtained by the summation of charging power of EVs P r, n, k, m, v, (27) 2.3.6 Imposed power constraint for PLL-based DR strategy: Apart from all aforementioned formulations, (28) is described to apply for PLL-based DR program in this optimisationbased system structure. Each aggregator's peak power demand can be restricted by the DSO to increase operational flexibility and to provide more sustainable, economical, and a cost-efficient power grid

Input data
In the scope of this study, ten different commercially available EVs are considered along with the related simulations. To execute a more realistic approach, totally 500 EVs, each with a different remaining SoE and arrival times to the related EVPL. To ensure the stochasticity of the initial SoE before charging operation and arrival time to the related EVPLs of each EV, 8 different driving cycles are taken into consideration which is given in Table 1. The technical specifications of each used EV have already detailed in [24]. Fig. 3 illustrates the arrival time frequencies of 100 EVs to the related EVPLs. It should be reminded that the arrival density of EVs is demonstrated for only 100 EVs for clearer representation. It can be seen that EVs reach to the related EVPLs very frequently throughout the day, which proves that the evaluated arrival times are close to real-life. The devised model is addressed in a five-node test system derived from [32] which is shown in Fig. 4 to explore the operational feasibility. It is worthy to underline that each node represents a region which is composed of three different aggregators and each aggregator arranges two different EVPLs' operations.
Throughout the study, it is assumed that the two selected regions are supplied by 100 kW PV farms to support the regions during EVs' charging operations. Regarding the nature of the renewable-based generation units, the power production of the PV farms is modelled as a stochastic approach by using real irradiation and temperature data from [33].
Herein, irradiation and temperature data from 4 real days are used to obtain the power production patterns related PV farms. Fig. 5 depicts PV power production profiles related to four scenarios for the PV farm located in Region-2. It is worth noting that the related scenarios are selected from both cloudy and sunny days to provide a realistic approach. As can be seen in Fig. 5, while

Simulation results
To minimise the line losses between the regions during the charging of EVs, the proposed MILP model is tested in GAMS v.24.1.3 with CPLEX v.12 solver [34]. The input data for the model such as the initial SoE just before plug-in and the arrival time to the related EVPL of each EV are obtained by using MATLAB/Simulink [35].
It is worth indicating that the substantial challenge for the model execution is the computational burden of the simulations. However, the longest case takes 4 h to solve the model by using a computer with 2.3 GHz CPU and 32 GB RAM.
The performance of the proposed model has been investigated under various case studies with and without PV production, and also with different PLL imposed by the DSO. The addressed case studies are detailed as follows: • Case-1: There is no PLL and PV farms are not located in the regions. • Case-2: There is no PLL and 100 kW rated power PV farms are located in two regions. • Case-3: 200 kW PLL is imposed by the DSO and PV farms are not located in the regions. • Case-4: 200 kW PLL is imposed by the DSO and 100 kW rated power PV farms are located in two regions. • Case-5: 0 kW PLL is imposed by the DSO and 100 kW rated power PV farms are located in two regions.
It must be underlined that for the all evaluated case studies, there is an obligation for the EVs, which is to leave at least 12 am from the related EVPL. The aggregators have more relaxation to arrange the charging process owing to this circumstance. Another crucial assumption is to be reminded that each EV has to be fully charged before leaving from the related EVPL. It should also be stated that the regions with PV farms can sell the excess energy back to the grid thanks to the bidirectional power flow option. The power balance of the bus which represents the Region-1 in the Case 4 is illustrated in Fig. 6. It should be stated that this decomposition is obtained for the driving cycle scenario-2 and PV production scenario-3. It can be seen that the summation of the total energy transferred by the related lines, the energy losses in those lines, and the energy consumption of the Region-1 is equal to the total injected energy from the upstream grid for each period. Moreover, for a better presentation, a further zoomed subfigure is also provided. As seen in the same illustration, PLL-based DR strategy is demanded by the DSO for the period between 12 am and 2 pm.
After the implementation of the PLL, Region-1 does not consume energy during the DR program, only transfers the energy to the other regions. Therefore, only the transferred energy and the energy losses on the lines are observed in the related period.
In Fig. 7, the effect of the PLL demanded by the DSO on the power consumption of each region can be observed. Moreover, with the introduction of the PLL at 12 pm, the power consumption of each region is remarkably decreased. Since the proposed model is based on minimising power losses, the regions that are closer to the substation are affected more negatively during the PLL based DR program, as it is expected. For sure, this decreasing on the power consumption is related with different parameters such as EVs' arrival/departure times and initial SoE levels just before charging process. Fig. 8 demonstrates the impacts of the PLL amount on the energy flow during DR program. It has to be reminded that the selected cases in the mentioned figure include PV farms. Although the DSO does not request any PLL in Case-2, the power to be supplied from the upstream grid is restricted in Case-4 and Case-5 by 200 and 0 kW, respectively. Moreover, it can be expressly concluded from the further zoomed subfigure in Fig. 8 that Region-1 is needed to be supplied by the regions enriched with PV farms in Case-5. Because of the tough limitation of the grid power in Case-5, the generator bus located in Region-1 is supplied by the PV farms located in other regions. While line flows are positive in other cases, it is negative in Case-5 due to the power flow from the PV farms to the Region-1. Fig. 9 is demonstrated to observe the impact of the weather condition on the system operation. It should be stated that Fig. 9 is illustrated for cloudy and sunny day scenarios in Case-5 for the Region-2. In the mentioned figure, while the continuous blue line represents the transferred energy on the related line for the sunny day, the other is for the cloudy day. Further, the columns in the figure are used for the indication of the PV farm power production. As can be deduced from Fig. 9, the PV farm power production is regular in case of the sunny day which is shown with the dark grey column. Therefore, the energy transferred on the line is lower than that of the cloudy day. Besides, the surplus energy is transferred to the other regions during the PLL-based DR program between 12 am and 2 pm. Fig. 10 is illustrated to show the impacts of PV scenarios on the energy losses in the lines between the regions. In the mentioned figure, the hourly energy losses in the lines are observed according to the cloudy and sunny day scenarios. As expected, further power is needed to be supplied from the main grid for EVs' charging due to the lack of PV production on a cloudy day. It can be seen from Fig. 10 that hourly energy losses in the lines are much more on a cloudy day than a sunny day.
Another substantial factor on the line losses is a limitation of peak load demanded by the DSO. In Fig. 11, the hourly energy losses are demonstrated for Case-1 and Case-3. While there are no PV farms in any regions for both cases, 200 kW PLL is imposed in only Case-3 between 12 am and 2 pm. Although there are fewer energy losses during the DR program, the energy losses in the lines relatively increase compared to the no PLL case before and after DR. The model propounded to minimise the energy losses on the lines is also addressed under various case studies to show the validation of the study. Table 2 encloses the results of the evaluated case studies in this study. It can be deduced from Table 2 that Case-1 does not include either a PLL-based DR program or a PV farm in any region. The DSO does not request any PLL hence the related aggregators are more relax to schedule the EVs' charging operations. However, the energy losses, in that case, are 2706.82 kWh for the day period. Comparing Case-2 with Case-1 reveals the impact of the local PV farms on the energy losses during the process on the lines. It can be seen that introducing PV farm in two selected regions decreases the energy losses to 1848.50 kWh by a rate of 32%.
To figure out the effect of the PLL-based DR program on energy losses, Case-3 is performed in the devised model. 200 kW PLL is demanded by the DSO without PV farms in Case-3. It can be declared that PLL has negative effects on the energy losses by comparison of Case-3 with Case-1. In case of lacking energy, the energy losses on the lines are raised because of the increasing energy transferred from the regions which have PV farms. Case-4 and Case-5 are evaluated to show how the amount of PLL impacts on energy losses. It can be deduced from the comparison of Case-2, Case-4, and Case-5 that the amount of PLL has a crucial effect on the line losses. When the DSO limits the grid power by 0 kW PLL, the line losses are then gradually boosted with a rate of 11% according to the Case-2.
Another quirky result is that the managing of EVs charging transactions to minimise line losses plays a positive role in increasing the load factor of the daily operation. Table 3 provides some comparison samples related to the load factors for every level of the hierarchical system. As seen from Table 3, while Region-1 is operated with the load factor of 0.24 without the management system, it increased to 0.325 with a rate of 35.4% after introducing the proposed management system. A similar situation is observed in aggregators and EVPLs level so that the load factor boosted by a rate of 26.5 and 16.8%, respectively.

Implementation of the model in the real distribution system
To test validity of the propounded model, the real data of a distribution system in Turkey are provided. There are seven regions fed by the substation; moreover, this distribution system has 650 kWe PV based distribution generation unit. The single line diagram of the real distribution system is given in Fig. 12. In the tests, fast charging and normal charging are taken into account throughout the simulations. Also, the PLL based DR program is assured to enhance the operational flexibility of the DSO during the daily operation of the distribution system.
In Fig. 13, the total drawn power of the distribution system is demonstrated to reflect the impact of the PLL based DR program together with the sunny and cloudy days. As expected, the amount of drawn power in cloudy day scenario is more than the scenario with the sunny day. Furthermore, in the case that the DSO requests the PLL in a certain period of a day, while the power is limited during DR program, to satisfy the aggregators' demands the drawn power is remarkably increased in the other periods of a day. Figs. 14 and 15 are illustrated to validate the propounded model. As seen in Fig. 12, b1, b2, b3, b4, b5, and b6 present the branches among the different regions in the distribution system. The power flows in each branch are demonstrated based on the sunny and   cloudy day scenarios in Figs. 14 and 5, respectively. In the sunny day scenario in Fig. 14, three of the regions (power flows in branches b1, b2, and b3 are from the grid to the loads) are supplied by the grid, while the others from the PV farm. As seen from Fig. 15, four of those regions are fed by the grid during the daily operation because of the lack of irradiation in cloudy day scenario. In addition, 100 kW PLL is applied to a distribution system in both scenarios. As seen from the mentioned figures, PLL based DR program affects the power flows in branches in different ways thanks to the consideration of power flow in the proposed model.

Conclusion
To minimise the total power losses in branches, a MILP-based energy management model for scheduling of EVs' charging interactions was developed in this study. The proposed model was implemented in the five node test system in which each of the nodes represents the regions. Also, the model was assumed to be composed of several EVPLs controlled by the different aggregators under various regions. Furthermore, two selected regions were enriched with 100 kW PV farms. It is worthy to underline that the designed system was modelled in a scenario-based stochastic manner by considering both EV owners' behaviour and PV farms' generation by using real data. Last but not least, PLL-based DR strategies were implemented to enhance the operational flexibility in terms of the DSOs. In addition, to prove the effectiveness of the designed model, various case studies were performed throughout the study. Moreover, the propounded energy management model was tested in a real distribution system so that the effectiveness of the model was validated. Consequently, it has been observed that including PV farms has a crucial impact on reducing the power losses in the branches. Moreover, an important outcome of the study was that even though a PLL-based DR strategy provides an operational flexibility for the DSOs, it has unfavourable effects on the power losses. It has to be stated that the proposed EMS, which aims to minimise line losses, impacts the load factor during daily operation in an enhancement manner.