Community-to-vehicle-to-community (C2V2C) for inter-community electricity delivery and sharing via electric vehicle: Performance evaluation and robustness analysis

Electric vehicles (EVs) possess untapped potential as mobile power banks for actively delivering electricity be-tween different energy communities, known as Community-to-Vehicle-to-Community (C2V2C) service. While C2V2C represents an effective means of inter-community electricity sharing, limited research explores EVs ’ role in electricity delivery between locations. Suitable control approaches of EV charging for the C2V2C service are lacking, and it is unclear how robust the C2V2C service is and how its performance is affected by different factors. This paper aims to bridge these research gaps by developing an advanced control of EV smart charging/ discharging to facilitate the C2V2C service. By comparing the power balance in the EVs ’ current-connecting and next-destination communities, the advanced control derives a target state-of-charge for the EVs in the current-connecting community, which can optimize the electricity delivery between the two communities. Then, the robustness of the C2V2C service is analyzed by evaluating its performances under different scenarios. Major factors like community combinations, renewable energy system (RES) configurations, EV battery capacity and numbers are examined for their impacts on C2V2C performance. The findings demonstrate that the C2V2C service significantly enhances energy balance across diverse community combinations, particularly in work-places with substantial RES capacity. A large EV battery capacity is beneficial for performance improvements, but the impact diminishes at higher values due to limited surplus renewables availability. The increasing EV number enhances both electricity delivery capability and utilization of self-produced renewables. This study validated the effectiveness of the C2V2C service and provides valuable insights into optimizing its application across different scenarios.


Introduction
The deployment of both distributed renewable energy systems, such as photovoltaics (PV) and wind turbines, and electric vehicles (EVs) has increased dramatically in the past decades.According to IEA statistics, global solar PV generation increased by 270 TWh in 2022, reaching a total of almost 1300 TWh in the energy mix [1].In the same year, the wind electricity generation increased by 265 TWh and reached totals >2100 TWh [2].In 2022, the global EVs sales exceeded 10 million, which is more than three times the sales in 2022 [3].There have been many policies and regulations facilitating their application, such as European Union 2030 climate and energy framework [4], climate targets and renewable energy targets in Nordic countries [5], the European Union's target of at least 30 million zero-emission vehicles on roads by 2030 [6], etc.To achieve the Net Zero Emissions by 2050 Scenario [7], more distributed renewable energy systems and electric vehicles will be utilized in the future.Both the distributed renewable productions and distributed EV charging loads need to be integrated into the power grid.However, most of the power grid infrastructures, which were built decades ago without considering the new power feed-in and electric demands, lack hosting capacity [8].Hosting capacity is the maximum amount of electricity consumption or generation that can be integrated into the power system, while still maintaining its performance within acceptable limits [9].As a result, many of the existing power grids are facing great stress, and problems such as voltage deviation, overloading of power system equipment, harmonics injection can occur [10].
It is possible to synergize the distributed renewable production and the EV charging loads, and such synergy can effectively improve the balance of the power grid, which in turn enhance the stability of the power grid [11][12][13].In order to achieve synergies, two of the most popular research directions are smart charging of EVs, and vehicle-togrid/home (V2G/H) [14].Smart charging of EVs refers to adjusting the EV charging loads considering the needs of the local power grid or the electricity prices, e.g., charge more in low-electricity-price periods while less in high-electricity-price periods [15].It can effectively improve the utilization of locally produced renewable power and shave the large peak.This can in turn allow larger room for integrating more renewables and EVs into the existing power grid.V2G/H allows bidirectional power flow between the grid/home and EVs [16,17].EVs can be used like a normal stational battery and discharge electricity to the power grid or homes when needed.V2G/H further boosts the flexibility of using EVs for improving synergies with distributed renewable energy sources.For instance, V2G can even allow EVs to participate in the frequency regulation market to help maintain the power grid stability [18].In addition to V2G/H, other studies have also investigated peer-to-peer EV smart charging methods, e.g., vehicle-to-vehicle (V2V) cooperative EV charging [19].V2V charging control schemes reduce energy purchasing from the grid by selling power from highly charged EVs to low charged EVs at the same location.Wireless chargingdischarging lanes (WCDLs) provide an alternative to stationary V2V EV charging [20].
Numerous studies have been conducted regarding control method development considering both smart EV charging and V2G/H [21][22][23].One example is the development of a centralized EV charging scheme for residential buildings, as detailed in [24].This scheme optimizes EV fleet charging rates by simultaneously considering individualized EV travel patterns and solar PV power production.In [25], a two-step control method is introduced, coupling EV smart charging with energy sharing within a PV-installed building community.This method first optimizes EV fleet charging loads and the charging/discharging of a 'virtual' aggregated battery storage system at the community-aggregated level.Subsequently, it coordinates the charging/discharging of individual battery storage systems, revealing that this integrated approach significantly improves energy performance at the community level.Cedillo et al. developed a bi-level dynamic optimal operation control of solarpowered EV charging station, which considers a set of varying factors including solar power generation, EV number, EVs' response to price and EV driving behavior, etc. [26].The bi-level control approach first optimizes the pricing strategies for charging station operators, and then it regulates EV charging and discharging by aligning with the pricing signals while adhering to customer preferences and charging technology constraints.In [27] an optimized bi-directional V2G operation framework is developed for conducting day-ahead scheduling of EV charging/ discharging with the purpose of reducing EV ownership charging costs via providing frequency and voltage regulation services.However, these EV charging controls only focus on power regulation in one location, i.e., either in the residential place or workplace, while neglecting their mobility features.EVs can be considered as mobile energy storage systems, which can travel to different places and regulate power balance in different places.Neglecting the EVs' mobility capability limits exploring their full potential.
Considering the mobility of vehicles, He et al. introduced the idea of employing portable energy storage systems, comprising an electric truck and a battery storage system, for transporting electricity between distinct locations within the power grid to alleviate grid congestion [28].A large power grid is divided into several nodes and regions with different power tariffs.The operation logic is that the truck travels to the nodes with high electricity prices (and thus large demand) to discharge electricity, and then it travels to the nodes with low electricity prices (and thus large renewable productions) to be charged.In this way, electricity is delivered between different places of the power grid without the risk of congesting the existing power grid.Economic analysis from the study shows that this portable storage system has short return-of-investment periods, and it is more profitable compared with stationary counterparts.However, despite being flexible, the portable storage system is solely used for the power balancing purpose, and it cannot meet the need of transporting people.Moreover, the optimization of charging/discharging accounts solely for the requirements at the current location, overlooking the imperative need to balance power distribution in subsequent destinations [28].
In recent years, some researchers have investigated using privately owned EVs for electricity delivery considering both the transportation and the power balancing purposes.In 2018, Barone et al. proposed the building-to-vehicle-to-building concept to help transform buildings into zero energy buildings [29].Their work considered using EVs, which commute between a residential building and a workplace, for electricity delivery.A control method was developed to optimize the energy performance.Results showed that such a framework could achieve energy savings between 45% and 77%.Despite being effective, however, their study did not consider the optimization of the EV charging in the current location, while the power regulation needs in the next destination are neglected.This leads to non-optimum solutions at the aggregated level.Moreover, restricting electricity delivery between just single buildings limits the potential of enhancing energy performances at a larger scale.By coupling with peer-to-peer energy sharing, the benefits of using for improving energy balance can be expected to be further boost [25].
Similarly, Zhou et al. created a spatio-temporal energy network to tackle the issue of regional energy balance within the Guangdong-Hong Kong-Macao Greater Bay [30].This network leverages commuting Electric Vehicles (EVs) between regions facing electricity demand shortages and those abundant in renewable resources, effectively regulating energy distribution.The outcomes of their work reveal that the utilization of EVs for electricity transport between diverse locations enhances the renewable self-utilization rate from 70% to 72.2% and increases the load coverage ratio from 2.1% to 3.9%.Their study considers neither smart charging controls of EVs nor the power regulation needs in the next destination.The charging/discharging of EVs are solely based on the power balance performances in the current location.In two consecutive studies [31,32], Yu et al. proposed a generic framework to evaluate the potentials of using EVs to reshape the net load profiles within a virtual microgrid which includes geographically separated residential buildings and an office.They designed a control method to optimize the charging/discharging of commuting EVs and tested this framework and method in a real-world scenario in Beijing.Their results showed that this electricity delivery service can effectively balance the power demand and renewable productions in the virtual microgrid.
To sum up, the existing literature related to EV smart charging mostly focuses on performance improvement in one sole location.Only a few studies consider using EVs for electricity delivery between different locations, but the charging/discharging of EVs does not consider the coordinated needs of multiple communities.Moreover, it is unclear how robust the performance of using EVs for electricity delivery between different communities can be and how different factors affect its performance.This paper aims to bridge these research gaps.An advanced control is first developed to optimize the EV charging/discharging considering the optimized amount of electricity to be delivered between different communities.Then using the developed control method, scenario analysis is conducted to investigate how different parameters affect the performances of the community-to-vehicle-to-community (C2V2C) service.Recommendations are drawn from the analysis regarding in which scenarios the C2V2C service can perform the best.This is one of the first papers which systematically investigate using EVs for active delivery of electricity between different communities.The major contributions of this study are summarized as follows: • Develop a fast and effective approach to decide the suitable amount of electricity to be delivered between different communities.• Design an advanced control method of EVs for active electricity delivery within the C2V2C framework.• Analyze the impacts of three types of factors (i.e., building-related, RES-related, and EV-related) on the performance of the C2V2C service and provide suggestions.• Prove the robustness and effectiveness of the C2V2C service in improving performance of multiple communities under various scenarios.

Principle of the community-to-vehicle-to-community (C2V2C) model
EVs batteries are underused.It is possible to use EVs like a mobile power bank to actively deliver electricity between different locations.Fig. 1 illustrates the concept of community-to-vehicle-to-community (C2V2C) model by using an example of EVs commuting between a workplace community and residential community.EVs commute between the two communities on workdays.During daytime, EVs can get charged using the surplus PV power in the workplace community.At nighttime when EVs arrive at the residential community, EVs can discharge some power to meet the large electricity demand there.In this way, EVs actively deliver electricity between the two communities.This can bring significant benefits, such as reducing the peak power feed-in to the power grid (for the workplace community), reducing the grid congestion, increasing the local utilization of renewable energy, and reducing the electricity costs.
Fig. 1 also shows how electricity delivery is implemented via two ways: 'over' charge and 'over' discharge.'Over' charge means EVs get charged with more electricity than needed, for instance, an EV gets charged with 20 kWh electricity if the EV just needs 10 kWh electricity for meeting the daily travel needs.A higher State-of-Charge (SoC) allows the EV to deliver the extra unused electricity to the next destination.On the other hand, 'over' discharge means EVs discharge electricity in one location instead of being charged, for instance, if one community needs 10 kWh to balance the large electricity demands, the EV can discharge 10 kWh from its battery.In this way, EVs get larger storage capacity, which can take more surplus renewables in another location.The developed coordinated control will consider the electricity balance in the current-parking and next-destination communities and optimize the EV charging and discharging to maximize the electricity delivery.s.

Methodology
Fig. 2 shows the flowchart of the methodology, which consists of two parts.In the first part, an advanced control method of EV charging is developed for the C2V2C service to optimize the amount of electricity delivery between different communities.This developed control includes data collection, estimation of EV target SoC in the current location, and optimization of EV charging load in the current location.To validate the developed control, its performances are compared with a base case without any smart charging and a case with smart charging but not electricity delivery.In the second part, parametric studies are conducted to evaluate how different factors will affect the C2V2C service performance using the validated control in the first part.The considered factors are classified into three types: building-related factors (i.e., combination of buildings), renewable energy system (RES)-related factors (i.e., RES production ratio, and PV-Wind power ratio), and EV-related factors (i.e., battery capacity, commuting electricity usage and number).Details about each step are explained in the following sub-sections.The C2V2C only considers electricity delivery between locations where EVs are parked for long time, e.g., workplaces and residential houses.The locations with short stay are excluded due to the lower flexibility in electricity demand response.

Data collection
This step collects the data related to electricity demand and renewable power generation in the two communities where EVs commute, as well the EV information, such as the EV battery capacity, number of EVs and the electricity usage for each trip (i.e., affected by the commuting distance and driving behavior).Note this study considers using EVs for electricity delivery between communities which include multiple buildings.This is because combining energy sharing within building communities and EV electricity delivery can maximize the electromobility and flexibility [25].Inside each community, the electricity demand (e i d,j (kW)) of the i th community in the j th hour is the aggregated demand of all buildings inside, and its hourly renewable production (e i s kW) is the aggregation of productions from all individual buildings.

Estimation of the EV target SoC in the current location
The most important part of the proposed coordinated control is to decide how much electricity needs to be delivered from the current location to the next location.As EVs store the electricity in their batteries, this amount of electricity delivery can be considered in the EV target SoC when departing from the current location.This step estimates the EV target SoC in the current location.
A merged power profile is first created based on the EV presence in each community.It is a combination of segments of power profiles of the community where EV is connected.The power mismatch of the merged profile in the j th hour is calculated by Eq. ( 1), e i mis,j (kW) is the power mismatch of the i th community, which is calculated by Eq. ( 2), e i mis,j = e i d,j − e i s,j . ( ∅ 1 j ~∅i j are binary for showing the presence of an EV.In each hour, an EV can be parked in any community and connected to a charger there, or on the way from one location to another.A value of 1 shows EV presence while a value of 0 shows EV not present.In each hour, the aggregation of ∅ i j is smaller than 1.Then, the EV target SoC in the current location will be decided considering the amount of electricity to be delivered between the current location and the next location.The available surplus renewable electricity production in each location is first evaluated. Amount of surplus in the current location (Location-a, E a surplus (kWh)): ) τ is the charging/discharging duration, which is set to be the same as the simulation timestep.Since the available power demand profile and renewable production data are in the resolution of 1 h, τ is set to 1 h for simplicity.Positive values show that there is surplus renewable production (than demand) in a location, which can be shared with another community.While negative values show no surplus renewable.According to the available surplus renewable generations in the two communities, the amount of electricity to be charged in the current location can be decided, as shown by the four conditions below.

Condition-A: Both locations have surplus renewable production.
If E a surplus ≥ 0 and E b surplus ≥ 0, the EV will get charged in the current location.The amount of electricity that can be charged to the EV (E a EV,charge (kWh)) is calculated by Eq. ( 5), The term [ ] distributes the remaining storage capacity of EV battery proportionally according to the surplus renewable production.E EV,travel (kWh) is the amount of electricity used by EV for travelling from one location to another.Cap EV,remain (kWh) is the remaining storage capacity of the EV battery, which is calculated by Eq. ( 6), SoC a EV,arrive is the SoC when the EV arrives at the current location.The target SoC (i.e., the SoC when the EV departs from the current location) is estimated by Eq. ( 7),

SoC a
EV,depart = max Cap EV (kWh) is the EV battery capacity.SoC EV,lowlimit is the lower limit of the EV battery SoC for protecting the EV battery.

Condition-B:
The current location has surplus renewable production, but the next location does not.
If E a surplus ≥ 0 but E b surplus < 0, the EV will get charged in the current location.The amount of electricity that can be charged to the EV is calculated by Eq. ( 8), The term [min ] evaluates the amount of electricity which needs to be delivered from Location-A to Location-B to improve the energy balance.The term [2 × E EV,travel ] considers the amount of electricity used for a round-trip to the current location.Similar to Strategy-A, the target SoC is estimated by Eq. ( 7).

Condition-C: The next location has surplus renewable production, but the current location does not.
If E a surplus < 0 but E b surplus ≥ 0, the EV will get charged in the next location.It means EV might discharge some electricity in the current location.The amount of electricity that can be discharged to the current location is calculated by Eq. ( 9),

E a
EV,discharge = min ( min The term [min ] evaluates the amount of electricity which needs to be delivered from Location-B to Location-A to improve the energy balance.In this strategy, the amount of electricity used for commuting for one trip is considered, as EVs can get charged more in the next destination.Cap EV,initial (kWh) is the initial amount of electricity stored in the EV battery upon arrival at the current location, which is calculated by Eq. ( 10), The target SoC at the current location is estimated by Eq. ( 11),

Condition-D: Both locations have no surplus renewable production.
If E a surplus < 0 and E b surplus < 0, the EV will might discharge some electricity to the current location.The amount of discharged electricity is calculated by Eq. ( 12), The term [ ] distributes the available electricity storage in the EV battery proportionally according to the lack of renewable production.After evaluating the amount of electricity discharging, the target SoC at the current location is calculated by Eq. (11).
The developed C2V2C control makes sequential optimization of EV charging and discharging according to when EVs are parked and connected to chargers in a community.For instance, if an EV arrives at a workplace community at 08:00 and will be parked there until 17:00, and after that it will travel to a residential community and park there between 18:00 and 07:00 (+1 day), the controller will compare the total energy balance in the current parking location (i.e., workplace community) during 08:00-17:00 and the total energy balance in the future destination location (i.e., residential community) during 18:00 and 07:00 (+1 day) to decide the amount of electricity to be delivered.Once the amount of electricity delivery is decided, the EV target SoC in the current parking location can be decided.The whole process will be repeated once the EV arrives at the future destination community.

GA-based optimization of EV charging loads
After deciding the target SoC in the current location, the next step will be optimizing the EV charging/discharging rates during the parking period (and thus connection period).Considering the ability to find global optimal solution at an acceptable computational load, genetic algorithm (GA) is used for finding the optimal solutions.The inputs for the GA simulation include the following data: • Segment of power profile in the current location, which is the deviation of power demand and renewable power supply, as calculated by Eqs. ( 1) and ( 2).• EV battery capacity (Cap EV (kWh)).
• EV initial SoC (SoC a EV,arrive ) upon arrival at the current location.• Parking period in the current location T (hours).• The upper and lower limit of charging rates (e up ev and e low ev ) (kW), which are constraints from chargers and also for protecting the EV battery from large current.
The analysis is conducted on an hourly basis.In each GA iteration, a set of trials of EV charging/discharging rates are generated, i.e., [ e 1  ev , e 2 ev , …e T ev ] . Then these trials are used for evaluating the fitness function values.This study considers maximizing the renewable energy utilization in the current location (i.e., self-consumption) as the control target, which is shown by Eq. (13).
(kWh) is the total amount of renewable energy used in the current location.It is calculated as the aggregation of the locally used renewable energy during all the hours in the current location, as shown by Eq. ( 14), In each hour, the locally used renewable energy (E sc,j ) is calculated by Eq. ( 15), τ is the charging/discharging duration, which is set to 1 h.Meanwhile, the operation of EV battery should meet the following constraints.(a) EV battery constraint: In each hour, the accumulative electricity storage in the EV battery should be within the range of 0 and its full capacity, see Eq. (16).
(b) Charging and discharging rates should be within the lower limit and upper limit, see Eq. ( 17).

e low
ev ≤ e ev,j ≤ e up ev (17) (c) While departing from the current location, the target SoC decided in Section 3.1.2should be met.

SoC a
EV,depart = SoC a EV,arrive + ( e ev,1 + e ev,2 + … + e ev,T ) × τ Cap EV (18) The output of GA is the hourly charging and discharging rates of EV in the current location, i.e., [e * ev,1 , e * ev,2 , …, e * ev,T ].Note that deciding the EV target SoC in the current location and optimization of EV charging and discharging profiles are repeatedly with the travel of EV.When the EV moves to the next location, a new target SoC will be evaluated, and then the EV charging and discharging profiles will be optimized again.The initial SoC when the EV arrives at the next location is calculated by Eq. ( 19), Cap EV (19) This whole optimization is an iterative process.When the EV commutes to the next destination, step 2 will be repeated to get the target SoC for that community.The whole iterative process will repeat until all the timesteps are considered.

Validation of the developed control
For validation, the developed coordinated control for the C2V2C service is compared with two operation modes.In the first mode (i.e., base case), there is no smart charging.The EV is charged at the rated charging rate immediately when plugged in until it gets fully charged.In the second mode (i.e., uncoordinated smart charging), the EV is charged smartly in the current location.But unlike the developed coordinated control, the EV is always charged to full capacity, without considering the energy balance performance in the next location, nor any electricity delivery.The following performance indicators are used for comparison.
a) The total amount of locally used renewable energy (E all sc,tot kWh) in the simulation period, which is calculated by Eq. ( 20), where E current sc,tot (kWh) is calculated by Eq. ( 14).
b) The self-consumption rate, which shows the percentage of electricity demand (including EV charging loads) met by renewable energy production.It is calculated by Eq. ( 21), where (e d,j + e ev,j ) (kW) is the total electricity demand in the j th hour, and τ (hour) is the duration, which is set to 1 h.
c) The amount of electricity delivered in each location is defined as the deviation between the charged electricity in the EV battery and the needed electricity for travelling to the next destination.As explained in Section 2, EVs deliver electricity via 'over' charge and 'over' discharge when necessary.The amount of electricity delivered in one location (E a EV,delivery (kWh)) is quantified by the amount of overcharged electricity or over-discharged electricity, as shown by Eq. ( 22) The first term ) is the amount of electricity charged into the EV battery in the current location.
The second term E EV,travel is the amount of electricity needed for the EV to commute to the next destination.A positive deviation between these two terms indicates 'over' charge of EV battery, while a negative deviation indicates 'over' discharge.The absolute value of their deviation is taken, as the 'over' discharge of EV battery allows more electricity to be stored in the next destination, which can also be considered as electricity delivery.
Considering that this study focuses on evaluating the robustness of the C2V2C model and the article length, only energy-related performance is evaluated in this paper.It can still be expected that the C2V2C model can reduce the electricity costs of the whole system, as the locally produced electricity is typically much cheaper than purchasing from the power grid.

Part 2: parametric analysis of the robustness of the C2V2C service
In this part, parametric analysis is conducted to investigate the robustness of C2V2C service as well as how different factors affect its performance.

Scenario design for parametric analysis
Three types of factors are considered in the parametric analysis: building-related, RES-related, and EV-related factors.Table 1 summarizes the considered parameters and how they vary in different scenarios.In total, this study investigates six parameters (i.e., six sets of analysis), with a total of 26 scenarios.Details about each factor are briefly explained below.
• Combination of buildings: Different types of buildings have different load profiles, which may affect the availability of surplus renewable production.Three combinations of residence-workplaces are considered.In all the three combinations, the same residential community is used.
• RES production ratio: The RES production ratio is defined as the ratio of the annual aggregated renewable production to the annual electricity demand.It is affected by the capacity of RES.The RES production ratio will affect the availability of surplus renewable production.In each cell of RES production ratio column of Table 1, the first ratio is for Community-1, and the second value is for Community-2.Five combinations of RES production ratios are considered.

• PV/Wind power ratio:
There can be different types of RES installed in a community, which will affect the power supply profile.This study considers a hybrid PV and wind power system.The ratio shows the percentage of PV power production to the total RES production.100% means a full PV system and 0 means a full wind power system.Again, the first ratio is for Community-1, and the second value is for Community-2.Five combinations of PV/wind power ratios are considered.
• EV battery capacity: EV battery will affect the maximum amount of electricity which can be delivered.Five scenarios of EV batter capacity are considered, ranging from 50 kWh to 90 kWh.• Commuting electricity usage: This parameter estimates the amount of electricity usage for EV to travel from the current location to the next location in a single trip.The daily electricity usage is assumed to be double this amount (considering a round trip).Four scenarios of commuting electricity usage are considered, ranging from 5 kWh to 20 kWh.

• Number of EVs:
With the increase of EV number, on the one hand, the electricity demand will increase, on the other hand, there is more storage capacity in the system for electricity delivery.Four scenarios of EV numbers are considered.
When analyzing the impacts of EV number on the C2V2C model performance, the optimization of electricity delivery is conducted oneby-one for each EV in a sequence according to the arrival time.After optimizing one EV's charging/discharging profile, the total power demand and supply profiles will be updated and used as new inputs for optimizing the next EV.The total computational time will increase with the number of EVs, but the computational loads will remain the same for optimizing each EV.

Performance evaluation and conclusions
In this step, the performances of the developed control are evaluated in each scenario by comparing with the two operation modes explained in Section 3.1.4.The relative improvement of self-utilized renewable energy is used as the performance indicator.Comparison of the performance in each set (in Table 1) will reveal how a related factor affects the C2V2C service performance.The conclusions can provide instructions about the application of the C2V2C service in reality.

Building electricity demand
In this study, four building communities are considered for analysis.Among the four communities, one is a residential community, and the other three are workplaces communities.In the analysis of C2V2C, the same residential community is used for different scenarios of building combinations.The three workplace communities include a recreation center, a workshop factory, and a university.All the four communities are located in the Dalarna region of Sweden.Real electricity demand data collected from these communities are used directly in the analysis [21].

RES modelling
The calculation of power generation from the PV panel, denoted as P PV (kW), is calculated by Eq. ( 23) [33,34], where γ (ranging from 0 to 1) is the transmittance-absorptance product of the PV cover for solar radiation at a normal incidence angle; I AM (ranging from 0 to 1) is the combined incidence angle modifier for the PV cover material; I T (kW/m 2 ) is the total amount of solar radiation incident on the PV collect surface; η is the overall efficiency of the PV array; CAP PV (m 2 ) is the PV surface area.
The power generated from a wind turbine, referred to as P WT (kW), is described by Eq. ( 24) [33,34], This equation includes several variables: C P (dimensionless) which characterizes power efficiency and is a function of the axial induction factor; ρ air (kg/m 3 ) represents air density; A R (m 2 ) donates the rotor area; U 0 (m/s) signifying the wind velocity in the free stream; CAP WT (kW) indicates the rated capacity of the wind turbine.In the analysis, the historical weather data in Borlänge (i.e., a city in Dalarna region of Sweden) is used for evaluating the PV and wind power production.

EV battery modelling
The EV battery is modelled using a simplified model.The amount of electricity stored in the EV battery is estimated by Eq. ( 25), SOC EV,t is the battery SoC at the time t, and e ev,1 ∼ e ev,t (kW) are the EV battery charging/discharging rates.The operation of EV battery should meet constraints described by Eqs. ( 17) to (20).For simplicity, the efficiency of charging and discharging is assumed to be 100%.

Case studies and results
The renewable power generation is simulated using the models described in Section 4.2 in TRNSYS.The TMY2 weather data in Borlänge of Dalarna region was used as the inputs.The EV is assumed to be at the workplace community from 8:00 to 16:00 and at the residential community from 17:00 to 07:00 the second day.The charging/discharging profiles were derived based on either the charging rule (i.e., in the base case) or the optimization (i.e., uncoordinated and coordinated cases).The power demand and supply information for the considered building communities are shown in Fig. 3. Subplots-(a) to (d) show the hourly power demand profiles of the three workplaces (i.e., recreation center, workshop, and university) and a residential community.In each case, EVs commute between one of the workplace communities and the residential community.The peak power demands of both the recreation center and residential community are both around 30 kWh.While it increases to 90 kW and 210 kW for the workshop and university, respectively.Subplots-(e) and (f) show the PV power production profile and the wind power production profile normalized to 40% of the total power demand of the residential community (i.e., the annual renewable production equals 40% of the annual electricity demand).The PV power production is high in summer and low in winter, while the wind power production is evenly distributed across the whole year but with large fluctuations.Each week from one season is selected for detailed performance analysis.The four weeks are highlighted in the dashed boxes in the six subplots.The details about the power demand in the four weeks are shown in the following sections.Note this study excludes the weekends, as EV owners have more stable travel patterns in workdays.

Performance comparison of the developed control
In the performance comparison, the configuration of simulation is summarized below.The two considered communities include a residential community and a recreation center (as a workplace).The RES production ratios are 40% and 40% for the two communities, respectively.The type of RES is a pure PV system in both communities.The EV battery capacity is 50 kWh.The electricity usage for travelling from one community to another is around 10 kWh (for a single trip).And only one EV is considered.In the initial state, the EV SoC is 25%.The control aims to maximize the utilization of renewable energy within the two communities.To reduce the computational load, the charging and discharging rates are assumed to be integer.
Fig. 4 shows the self-consumed renewable energy (as calculated by Eq. ( 20)) during the four selected weeks in each individual community Fig. 3. Annual electricity demand profile of the four building communities (a) to (d); and annual renewable power generation for the PV panels (normalized to 40% of annual electricity demand of the residential apartments) (e) and for the wind turbine (normalized to 40% of annual electricity demand of the residential apartments (f).and two-community aggregated level (Subplot-c).The bars show the mean daily values, and the error bars show the minimum and maximum daily values in each week.As can be seen, the self-consumed renewable energy in the residential community is very similar under the three cases of charging (as explained in Section 3.1.4).This is because the EV is parked in the residential community during nighttime when there is low renewable production.Most of the renewables can already be used to meet the building electricity demands, which makes the EV charging modes insignificant.While in the workplace community, the uncoordinated smart charging effectively improved the self-consumed renewables compared to the base case, and the coordinated smart charging further improved the self-consumed renewables.The improvements are obvious in the spring and summer weeks.The uncoordinated control increased the self-consumed renewables by 0-5.6%, and the coordinated control increased it by 0-14.1%.To investigate why there is such performance improvement, the detailed power flow profiles are analyzed.
Fig. 5 compares the power flow profiles in the summer week for the three charging modes.Each subplot shows a merged power profile taken from either the residential community or workplace community according to the EV presence.The sessions in each location are separated by vertical red dashed lines.'W' stands for the workplace, and 'R' stands for the residential community.The blue curve shows the power mismatch of the community: a positive value shows a larger power demand (then purchasing power from the grid is needed), and a negative value indicates a larger renewable production (then exporting power to the grid is needed).In the base case, there is neither smart charging nor electricity delivery.There are always large charging loads upon the EV arrival until the EV battery is fully charged.However, at that time, the renewable production is not usually large enough to meet all the   and c) Coordinated control case.The power mismatch is calculated as the deviation of the total power demand and power supply considering EV charging (as a demand) and discharging (as a supply).
A. Board et al.
electricity demand.As a result, purchasing power from the grid is usually needed (see the first four days in Subplot-a).In the uncoordinated control mode, the EV charging load is shifted to periods when there is large renewable production, which can be clearly observed in workplaces.This can explain the increased self-consumption in the workplace (as shown in Fig. 4(b)).In the residential community, renewable production in the parking period (from late evenings to early mornings) is small, and all these renewables are used for meeting the building electricity demands.As a result, the amount of self-consumed renewable energy is not improved, and this is consistent with Fig. 4(a).While in the coordinated control case, the electricity energy balances in both communities are considered.The EV is allowed to leave one community with very low SoC, provided it retains sufficient electricity to reach its subsequent destination.The EV can charge more than needed in the workplace during daytime (see the second, third and fifth days).When it commutes to the residential community in the evening, it can discharge some electricity from its battery storage.Such electricity delivery can increase the utilization of renewables produced in the workplace, which will further contribute to the overall increase of renewable selfutilization in the two communities.
As explained in Section 2, the electricity delivery is facilitated by 'over'-charge and 'over'-discharge of the EV battery.Using Eq. ( 22), the electricity delivery in each location is calculated and depicted in Fig. 6.The number 1-10 represent the 10 parking sessions in the five workdays.Odd numbers represent parking in the workplace, and even numbers indicate parking in the residential community.The bars in the summer week correspond to the power flow profile in Fig. 5(c).As can be seen, in most cases, the EV gets over-charged in the workplace and overdischarged in the residential community.Meanwhile, the EV battery SoC profiles and the charging/discharging rates in the summer week are plotted for each charging mode and presented in Fig. 7 and Fig. 8, respectively.The SoC benchmark is the aggregation of the SoC upon arrival and the level of SoC which can support the EV to travel to the next destination.In Session-3 and -9, large over-charge is observed in the workplace community, and in Session-6 and -10, large over-discharge is observed in the residential community.

Parametric study results of how different factors affect the C2V2C service
This section presents the parametric study results of how the three types of factors affect the performance of the C2V2C service.The configuration of each parametric study can be seen in Table 1.The two main investigated performance indicators are the self-consumption rate (as calculated by Eq. ( 21) which shows the percentage) and SC (as calculated by Eq. ( 20) which shows the amount of locally utilized renewables).

Impacts of building-related factor (i.e., combination of buildings)
Fig. 9 shows how the combination of building communities affects the electricity delivery performances in the two communities.Subplot-a shows the SC rate of the three combinations in the base case, uncoordinated charging case and coordinated charging case, respectively.Subplot-b shows the increase of locally utilized renewables in the uncoordinated charging and coordinated charging compared to the base case, as well as the relative improvements in the performances.The SC in the residential community and university combination is the highest.This is mainly because of the synergy between large electricity demand and renewable production during daytime in the university.As can be seen, uncoordinated control can improve the SC performance compared to the base case in all combinations of communities, and coordinated control can further boost the performances.As can be seen in Subplot-b, there is a large increase in the amount of self-utilized renewables in both the residential-workshop and residential-university combinations.This is mainly because of the large electricity demands in these two workplaces, as shown in Fig. 3.The analysis shows that the proposed C2V2C concept is robust in improving the energy balance performances for different combinations of building communities, regardless of their magnitudes of power demands.The performance improvement is in the range of about 2% to 11% for the three combinations, respectively.

Impacts of the RES-related factors
5.2.2.1.RES production ratio.Fig. 10 shows how the RES production ratio affects the electricity delivery performances in the two communities.With the increase of RES installation in the residential community, the total SC gradually decreases.This is because the large residential electricity demand at night cannot be met by PV power production.Meanwhile, the improvement in SC rate is the largest when all the PV systems are installed in the workplace.When the installation capacity increases in the residential community, the improvement gradually decreases.In the last two scenarios (i.e., 60% + 20% and 80% + 0), the C2V2C service does not improve the performance of the two communities.The SC increase compared to the base charging mode is purely contributed by the EV smart charging.Thus, the C2V2C service will perform better when there is large renewable energy system capacity in the workplace.The performance improvement can reach around 13% at combination of 0 and 80%.
This study focuses on optimizing the EV electricity delivery to improve the energy balance in different places.It is an innovative service designed on top of the existing renewable energy system (RES) already installed in the community.Whether the initially installed RES large or small, as long as it leads to surplus which cannot be used in the local community, EVs have potential to deliver some surplus to other places and use them there, instead of exporting the surplus to the power Fig. 6.Illustration of the EV electricity delivery in each connection session.
A. Board et al. grid (at low prices in most cases).Even a small PV power system could lead to surplus during daytime in summer, due to the long and large solar irradiance.Electricity delivery via EVs can help improve the selfutilization rates and thus the payback period.

5.2.2.2.
Impacts of the PV/wind power ratio.Fig. 11 shows how PV/ wind power ratio affects the electricity delivery performance.The values represent the PV production percentage in each community.The SC rate reaches the highest when the PV production percentage is 75% for both communities.This is because in such mix of renewable power production, the degree of match with electricity demand profile is the highest.Regarding the SC improvement, the C2V2C service performs the best in the 100% + 100% scenario, whereas the self-consumption rates are not the best.In such scenario, there is large surplus production in the workplace during daytime, and there is a large deficit in the residential community at night.This implies that in places where the degree of match between renewable generation and electricity demand is low, the C2V2C service has large potential to help increase the renewable SC.The performance improvement can reach around 9% at the 100% + 100% combination.

Impacts of the EV-related factors
5.2.3.1.EV battery capacity.Fig. 12 shows how the EV battery capacity affects the electricity delivery performance.As the EV electricity usage for commuting between the two communities does not change, the total EV charging loads remain the same under different battery capacity scenario.In the base charging mode and uncoordinated charging mode,  the SC rates remain constant as the EV battery capacity increases.This is because the ratio of demand met by the locally produced renewable energy does not change.On the other hand, in the coordinated charging mode, the SC rate increases slightly with the EV battery capacity (see Subplot-a).This is because a larger EV battery allows the EV to 'over'charge or 'over'-discharge more electricity, so that the amount of locally produced renewables which can be delivered increases.Subplot-b clearly shows the increase of local utilization of renewables with EV battery capacity.It is also interesting to note that the contribution to SC increase becomes marginal when EV battery capacity increases to a large value (e.g., 80 kWh in this analysis).This is because the amount of electricity delivery is also limited by the amount of available surplus renewables.The performance improvement can reach around 11% at an EV battery capacity of 90 kWh.

5.2.3.2.
EV commuting electricity usage.Fig. 13 shows how the EV travelling electricity usage affects the electricity delivery performance.In the uncoordinated charging control, the SC rate gradually increases with the increase of EV travelling distance, as can been seen in Subplots-(a) and (b).This is because the uncoordinated control can redistribute the increased EV charging loads to periods with surplus renewable production, leading to more electricity load met by the renewables.Such an increase is limited by the amount of available surplus renewables.In the coordinated control, the SC rate peaks when EV travel electricity usage is around 10 kWh.After that value, the SC rate gradually decreases.This is because in the coordinated control, the SC increase is contributed by two approaches: i) redistribution of EV charging loads to period with surplus renewables (like in the uncoordinated control), and ii) delivery of the surplus renewables from one location to another.When the EV travelling electricity usage is too large, it will comprise the EV's ability to deliver electricity between different locations.In other words, there is a trade-off between the redistribution of charging loads and the delivery of surplus renewables.The performance improvement reached 9% when EV travel electricity usage is 10 kWh.

Number of EVs.
Fig. 14 shows how the number of EVs affects the electricity delivery performance.With the increase of EV number, the SC rate gradually decreases.This is due to the increase in the total electricity demand.As a result, the percentage of electricity demand met by the locally produced renewables gradually decreases.Despite the decrease in SC, the amount of electricity delivery between the two locations increases dramatically with the EV number.As can be seen from Subplot-b, the relative improvement of SC increases dramatically with the EV number for the coordinated control case.The performance improvements are contributed by two factors: i) more EV charging loads are allocated to the periods with surplus renewable production, and ii) the electricity delivery capability increases as there is more EV battery storage capacity available.The performance improvement can reach 17% for the coordinate control when there are 4 EVs.
Fig. 15 shows the power flow profiles of the three charging modes in the same summer week as in Section 5.1.As can be seen, both the uncoordinated charging control and the coordinated charging control shifts the EV charging loads to periods with large renewable productions, and thus the SC performances are better compared to the base case.Furthermore, the coordinated control 'over'-charges the EV batteries in the workplace community using the surplus renewables and 'over'-discharges the EV batteries in the residential community (as can be seen in Day-3).This further boost the utilization of the locally produced renewables within the two communities.
This study considers only a small number of EVs, as in reality most EVs have only one common destination, either workplace community or residential community.On the other hand, the total number of EVs can become large if just one common destination is considered in the electricity delivery.For example, if EV owners are from the same workplace community but live in different places, it is possible to deliver surplus production from the workplace community to different residential communities, and vice versa.The C2V2C model can also be applied in such scenario by simply repeating the optimization with different inputs.In this regard, electricity delivery via EVs can be operated at an even larger scale, and thus be more powerful.

Conclusions
This paper has developed a sophisticated coordinated control of EV smart charging for facilitating the C2V2C services, which leverages EV batteries to actively deliver electricity between different locations.The proposed C2V2C model is a very cost-effective way to improve the resource-efficiency of the energy systems, as it makes use of EVs and renewable energy systems which already exist.Not much extra investment cost is needed for new systems.The developed control optimizes the amount of electricity delivery via EVs and the EV charging/ discharging profiles to improve the energy balance in multiple communities.For validation purpose, the performance of the developed coordinated controls has been tested and compared with a base case and an existing uncoordinated control case, with a specific focus on the selfutilization of the locally produced renewables.Then, the robustness of the C2V2C service was investigated via scenario analysis.The impacts of six factors on the C2V2C service performance have been investigated and discussed.The major findings are summarized as follows: • The coordinated control for the C2V2C service has demonstrated its effectiveness in improving the local utilization of renewables, achieving a remarkable daily performance improvement of up to 14% compared to the base case.The improved energy balance can further benefit reduction in the electricity costs for the communities, as the locally produced electricity is typically cheaper than the grid power purchase and the community peak power demand or power export to the grid can be reduced.This improvement can be attributed to two main factors: the redistribution of EV charging loads to periods of abundant renewable energy production and the active transfer of renewables between locations.• Impacts of community combinations: Irrespective of the magnitudes of power demands, the C2V2C service is robust in improving the energy balance performances for different combinations of building communities, with relative improvements ranging from approximately 2% to 11% in the specific case studied.• Impacts of the RES production ratio: The C2V2C service exhibits superior performance when there is a substantial renewable energy system capacity in the workplace (where EVs are parked during the daytime).The performance improvement reached approximately 13% at a combination of 0% + 80%.• Impacts of types of renewables: In locations with a low degree of alignment between renewable generation and electricity demand, the C2V2C service holds significant potential for boosting renewable self-consumption, resulting in a performance improvement of around 9% at the 100% + 100% combination.• Impacts of EV battery capacity: A larger EV battery capacity positively influences electricity delivery and sustainable consumption.However, the contribution to sustainable consumption enhancement becomes marginal as EV battery capacity reaches higher values (e.g., 80 kWh in this analysis), as it becomes limited by the availability of surplus renewables.The performance improvement was approximately 11% at an EV battery capacity of 90 kWh.• Impacts of EV commuting electricity usage: A higher EV charging demand promotes the utilization of locally produced renewables but, in turn, reduces the storage capacity available for electricity delivery.The overall impact on the C2V2C service performance represents a trade-off between these two factors, with a peak performance improvement of approximately 9% observed when EV travel electricity usage is 10 kWh.• Impacts of EV numbers: Increasing the number of EVs amplifies the electricity delivery capability and augments the utilization of selfproduced renewables.A substantial performance improvement of up to 17% compared to the base case is achievable with the inclusion of four EVs.
This study has validated the effectiveness of the C2V2C service in enhancing energy balance performances within diverse building communities.Furthermore, it has explored how various factors influence the service's performance, offering insights into the most promising scenarios for its application.This study did not consider the efficiency of EV battery charging and discharging, as well as its detailed mobility patterns.Future work will consider those factors and conduct more comprehensive studies.This study did analysis mainly from the technical perspective with a focus on energy performance.Future work will conduct cost-benefit analysis to fully understand the economic implications of the C2V2C model.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
of surplus in the next location (Location-b, E b surplus (kWh)):

Fig. 2 .
Fig. 2. Flowchart of the methodology used for analyzing the EV charging patterns.

Fig. 4 .
Fig. 4. Comparison of the self-consumed renewables in individual communities and the community-aggregated level.

Fig. 5 .
Fig. 5. Comparison of the merged power profiles in the summer week obtained from the three charging cases: a) Base case, b) Uncoordinated control case,and c) Coordinated control case.The power mismatch is calculated as the deviation of the total power demand and power supply considering EV charging (as a demand) and discharging (as a supply).

Fig. 7 .
Fig. 7. Comparison of the EV battery SoC in the summer week obtained from the three charging cases: a) Base case, b) Uncoordinated control case, and c) Coordinated control case.

Fig. 8 .
Fig. 8.Comparison of the EV battery charging/discharging in the summer week obtained from the three charging cases: a) Base case, b) Uncoordinated control case, and c) Coordinated control case.The filled bars show electricity usage for driving.A positive value indicates the EV being charged, and a negative value indicates the EV discharging some electricity.

Fig. 9 .
Fig. 9. Comparison of self-consumption performances under different combinations of residential houses and workplaces: (a) Self-consumption rate; (b) Improvements in self-consumption.

Fig. 10 .
Fig. 10.Comparison of self-consumption performances under different RES production ratios.The value on the left is for the residential community, and the value on the right is for the workplace.(a) Self-consumption rate; (b) Improvements in self-consumption.

Fig. 14 .
Fig. 14.Comparison of self-consumption performances under different number of EVs: (a) Self-consumption rate; (b) Improvements in self-consumption.

Fig. 15 .
Fig. 15.Power flow in the summer week under different number of EVs and different charging scenarios (a) Base case (no smart charging, no electricity delivery); (b) Uncoordinated control case (smart charging, no electricity delivery); (c) Coordinated control case (smart charging, electricity delivery).

Table 1
Configuration of the parametric studies for investigating the impacts of various factors on the C2V2C service performances.
*Cells highlighted in yellow are changing variables, i.e., its impacts on the C2V2C service performance will be investigated.**Forbuilding related factors and RES related factors, since there are two communities involved, the value on the left side of the plus sign is for Location 1, and the value on the right side of the plus sign is for Location 2. ***This is just the electricity usage for a one-way commute.The daily electricity is approximately double this value.****Forsimplification, all the EVs are assumed to have the same battery capacity.A. Board et al.