Previous Article in Journal
An Intelligent Path Planning System for Urban Airspace Monitoring: From Infrastructure Assessment to Strategic Optimization
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrated Vehicle-to-Building and Vehicle-to-Home Services for Residential and Worksite Microgrids

by
Andrea Bonfiglio
1,*,
Manuela Minetti
1,
Riccardo Loggia
2,
Lorenzo Frattale Mascioli
2,
Andrea Golino
2,
Cristina Moscatiello
2 and
Luigi Martirano
2
1
Department of Electrical, Electronic, Telecommunications Engineering and Naval Architecture, University of Genoa, Via Opera Pia 11a, I-16145 Genoa, Italy
2
Department of Astronautics Electric and Energetic Engineering, Sapienza University of Rome, 00185 Roma, Italy
*
Author to whom correspondence should be addressed.
Smart Cities 2025, 8(3), 101; https://doi.org/10.3390/smartcities8030101
Submission received: 22 April 2025 / Revised: 11 June 2025 / Accepted: 13 June 2025 / Published: 19 June 2025

Abstract

:

Highlights

The rapid development of electric mobility is introducing novel opportunities and solutions for electric vehicle integration into the electricity system.
The integration of several EV-charging scenarios is a key element in defining a novel and smart integration of sustainable mobility systems, providing mutual benefits to EV owners, third parties, and the electricity system. This paper proposes a novel approach to EV-charging’s integration into the house/work routine of an EV owner, providing shared benefits to the owner and the working site, and providing an effective balancing of renewable power fluctuations. The application of the proposed methodology was tested in the experimental facility of the Sapienza University of Rome, considering real data coming from real load, photovoltaic, and storage units.
What are the main findings?
  • A novel integrated approach to V2B service;
  • The exploitation of novel EV battery management strategies.
What are the implications of the main findings?
  • Improved exploitation of EV capabilities to reduce energy dependency and costs.
  • Novel possibilities to achieve charging cost reduction by providing V2B service and, thus, making EV mobility more sustainable and affordable.

Abstract

The development of electric mobility offers new perspectives in the energy sector and improves resource efficiency and sustainability. This paper proposes a new strategy for synchronizing the energy requirements of home, commercial, and vehicle mobility, with a focus on the batteries of electric cars. In particular, this paper describes the coordination between a battery management algorithm that optimally assigns its capacity so that at least a part is reserved for mobility and a vehicle-to-building (V2B) service algorithm that uses a share of EV battery energy to improve user participation in renewable energy exploitation at home and at work. The system offers the user the choice of always maintaining a minimum charge for mobility or providing more flexible use of energy for business needs while maintaining established vehicle autonomy. Suitable management at home and at work allows always charging the vehicle to the required level of charge with renewable power excess, highlighting how the cooperation of home and work charging may provide novel frameworks for a smarter and more sustainable integration of electric mobility, reducing energy consumption and providing more effective energy management. The effectiveness of the proposed solution is demonstrated in a realistic configuration with real data and an experimental setup.

1. Introduction

Over the last few years, increasing energy demand and increased awareness of environmental problems have encouraged governments, industries, and researchers to pursue sustainable solutions in energy resource management. Technological advancements, policy incentives, and reaching stringent targets for emission reductions have all combined to drive rapid growth in the EV market [1]. Indeed, aggressive strategies by manufacturers and supportive policies in Europe aim to increase the adoption of EVs to meet more stringent environmental legislation. It is foreseen that EVs will contribute significantly to achieving an average of 60% of the required emissions reductions by 2025, thus making them a huge contributor to the decarbonization of transport [2,3,4].
Power distribution systems are now increasingly integrated with renewable energy sources (RESs) and smart technologies, giving rise to smart microgrids, which have the potential to enhance the resilience and efficiency of electricity infrastructure. Microgrids, capable of operating in both grid-connected and islanded modes, represent a fundamental enabling system for the energy transition, particularly when combined with EVs, one of the most promising innovative solutions in the sustainable mobility environment [5,6]. The integration of EVs into smart microgrids has huge potential both to optimize energy consumption and improve grid flexibility, which is a key feature in the evolution to a smart distribution power system [7,8]. EVs’ role in this changing scenario is more than the one related to sole mobility service. EVs may also be used for other grid and user services, such as mobile resources for energy storage and redistribution due to advanced energy management strategies [9]. This makes EV charging stations a key component of the network, capable of reducing demand peaks and facilitating the integration of RESs [10,11].
The problems that still need to be solved include the number of charging stations, charging time, and the impact of EV operations on grid reliability. Many papers identify the role of shared models for charging stations and smart energy management systems in further enhancing grid resilience and EV accessibility [10,12]. Battery degradation in V2B operation is yet another critical challenge that needs innovation in battery technologies and their management systems [13,14].
Along with the integration of EVs, there is an important focus on the implementation of photovoltaic (PV) systems in microgrids due to their modularity and ease of interfacing in decentralized networks [15]. However, the non-programmable and intermittent nature of solar energy raises critical challenges in grid stability and energy reliability. In this context, EVs assume a dynamic and flexible role by behaving like mobile storage units that can compensate for the intermittent and stochastic behavior of PV systems [16]. Their ability to store excess PV energy during periods of high production and redistribute it during peak demand improves flexibility and reliability in microgrids. Specifically, vehicle-to-grid (V2G), V2B, or vehicle-to-home (V2H), generally referred to as vehicle-to-X (V2X) technologies, provide energy in the uncertainty of non-schedulable renewable energy and shave peak demand, thus improving the overall performance of the grid, homes, or buildings [17]. In this context, several studies have highlighted the need to develop management strategies that consider user mobility profiles and needs in order to ensure both energy system efficiency and user acceptance [18,19].
Integrating EVs with PV-powered microgrids can further create energy ecosystems [20]. Microgrids equipped with an advanced energy management system [21], along with predictive algorithms [22], will be able to efficiently manage the charging and discharging schedules of EVs coupled with PV generation patterns. This will improve not only the energy supply but also reduce the demand for stationary battery storage, reducing investment costs in the infrastructure, as described in [4,13]. Furthermore, the energy storage systems (ESSs) with EV batteries will provide resilience in case of a shortfall in generation from PVs or grid failure conditions [10].
In the current state of the art, there are many papers focusing on the charging management algorithms with V2B/V2H functions, but many of these do not consider user requests and priorities, which, instead, will play a fundamental role in the large-scale diffusion of these technologies in the future. The paper in [23] proposes a home energy management system (HEMS) for a house equipped with a photovoltaic system, a storage system, and the integration of an electric vehicle with V2H functionality, with the aim of reducing operating costs. However, the claims of the vehicle owner are not considered. Indeed, the final SoC of the battery is not considered in that algorithm, and no measures are taken to maintain the health of the battery. These aspects are fundamental to embracing EV owners to make their vehicles available for additional services. In our paper, instead, battery health is of crucial importance, and the use of VPA, as well as the choice of optimal charging and discharging power based on battery capacity, allow the depth of battery discharge to be limited and excessively high charging or discharging powers to be avoided, which would involve faster battery degradation.
The analysis presented in [24] is close to our paper in terms of the variables considered, the input data used, and the goals. In particular, a forecasting module based on an exponential damping model was developed to estimate photovoltaic production and electricity consumption. The forecasts obtained are the input for the optimization module, which uses a mixed integer linear programming (MILP) model to determine the optimal charging plan for EVs, considering technical constraints and user comfort. These models offer optimal solutions but require high computational costs. Furthermore, to improve the accuracy of the forecasts, a large amount of historical data and variables are required. Our model measures power in real time and distributes it dynamically and optimally. Real-time measurements are more reliable and accurate than any forecast. This allows us to achieve better results than those obtained with predictive models and with significantly reduced computational complexity.
Numerous studies on V2H and V2B technologies focus on optimizing individual aspects or specific scenarios, often neglecting the interaction between different areas (such as residential, commercial, or business areas) or the scalability of the proposed solutions. In [25], the authors propose an optimization model for hotel energy management using V2B integration. In [26], a V2H model is proposed to show how the system can be suitable in areas with unstable or poorly managed energy distribution networks in emerging countries. Our algorithm, instead, introduces an innovative approach based on the virtual partitioning of the EV battery, splitting it into two sections, one dedicated to mobility and one to V2X services. This partition can be made dynamic, adapting to the specific needs of the user, home, and office. The innovative element of our work is precisely the synergy and coordinated interaction between the home and work environments, which makes the proposed system a scalable solution capable of adapting to different operating scenarios.

2. Materials and Methods

2.1. EV Integration Scenarios

The first step to define an effective and efficient strategy for EVs’ integration into smart energy systems is the formal classification of the different scenarios in which an EV can operate. For this reason, in the following, different scenarios are classified according to the type of EV owner, home-charging/work-charging availability and typical utilization strategies, and the possibility of interaction with renewable energy production sites.
  • Scenario 1: A private EV owner with single-family housing equipped with a PV system, a domestic charging infrastructure, and the possible presence of a residential energy storage system. EV charging that is mainly associated with solar energy and the possibility of the utilization of excess energy for the house needs the implementation of a V2H service.
  • Scenario 2: A private EV owner with a private garage and available parking at the workplace with charging opportunities. The car will charge both at home and at work; V2B is available at the workplace to enable energy management strategies to improve flexibility in the cost of the charge at work.
  • Scenario 3: A private EV owner with a private garage without workplace parking. The home will be the main solution for charging, buying energy from the distribution system, with occasional charging from public infrastructures for long trips.
  • Scenario 4: A private EV owner with no private garage and a workplace without equipped parking. EV charging is performed only at public charging infrastructures. V2G is the only available option to alleviate charging costs and provide grid-supporting services during peak load by feeding energy back to the grid.
  • Scenario 5: A private EV owner with shared condominium parking and workplace parking. It charges mostly at work or in the condominium.
  • Scenario 6: An EV owner with shared condominium parking and no workplace parking. The owner uses the condominium charging structures primarily, paired with public charging as required.
  • Scenario 7: A private EV owner participating in an energy community. Charging is performed from shared renewable energy sources in the community. V2X optimizes energy management in coordination with other participants within the community.
  • Scenario 8: A rented/shared EV. EVs are usually part of a fleet owned by the rental/sharing service provider. Charging is carried out in the rental company’s charging infrastructure. The time connected to the grid might be relevant for this type of EV; hence, V2G services are an interesting source of extra gain and a relevant opportunity for grid support.
  • Scenario 9: Company-owned EVs, with company charging infrastructures, with or without a PV system. The company can benefit from PV power for charging if available and V2B services to support energy management, aiming for cost reduction for the company.
As one can notice, there are many foreseeable scenarios for the integration of EVs in the next future smart city scenario, and one of the most interesting aspects to be studied and developed is how different scenarios of the utilization of EVs can be integrated and coordinated to obtain the most effective results for both the electricity system and the EV users.
The proposed methodology aims at integrating home and work charging of the EV, thus considering the scenario of a private EV owner with both their home and workplace equipped with solar panels, a battery, and a charging station (Scenarios 1 and 2).
The key innovative aspects claimed with this model are as follows:
  • Accomplish the requirements of both environments and the vehicle owner, with crucial attention to battery health;
  • Using real data measured in real time, overcoming approaches based exclusively on forecasts;
  • Expanding the analysis to multiple operating scenarios (commercial, residential, or business). To optimize the entire daily cycle of EVs, it is essential to consider the interaction between different areas and infrastructures, promoting an integrated and flexible approach.
In these scenarios, shown in Figure 1, the EV owner can maximize renewable energy utilization, reducing dependence on the power grid and optimizing resource use at home and work. Both the home and the workplace are equipped with solar panels, stationary batteries, and EV charging stations.
At home, the owner charges the EV mainly from solar power, with high energy autonomy and low grid dependence, particularly during the day. Any surplus energy from the PV is fed into the home battery and can be used to light the house or charge the car during the night or during times of low solar production.
Where appropriate, the EV can be operated in V2H mode to supply the home with energy, enhancing energy resilience and lowering overall energy costs.
Moreover, the car can be charged at the workplace during the day. V2B technology can further be employed to power the workplace, enhancing microgrid energy management.
EV owners are enabled to provide V2H and V2B service claims for the definition of suitable solutions to preserve EV driving autonomy, according to the needs of the EV users. With this aim in mind, the proposed solution accounts for the energy assignment for the different services that the EV shall be called to provide. To achieve this, a virtual partitioning of the EV is considered, so that the owner can decide which share of the EV battery capacity to preserve for mobility and which to use for the generic V2X service [27,28].
The suggested approach proposes the idea of the virtual repartition of the EV battery proposed in [27,28], where a virtual-partitioning algorithm (VPA) was designed for the a priori energy allocation of the EV capacity to be dedicated to the only-V2H service. This way, the EV battery behaves like two independent batteries, where one is available for generic V2X services and the other for EV mobility. In Figure 2, a conceptual representation of the EV battery partition is shown schematically.
However, in the assumptions of [27,28], VPA is used with a fixed virtual repartition of the total EV battery capacity and only for the utilization of the V2H service (Scenario 1). The present methodology aims to exploit the VPA capabilities in a more comprehensive and generalized way, integrating many of the previously defined scenarios and exploiting the possibility of adjusting the virtual repartition of the EV battery share to maximize the impact for the EV owner.
In more detail, integrating Scenarios 1 and 2 requires us to consider a configuration where the private EV user is exploiting the V2H service at his location characterized by a PV plant and residential storage unit that can also benefit from a working parking space with charging infrastructure and PV generation also at work, where the V2B service is available.
In this context, these three fundamental aspects need to be coordinated:
  • Home load balancing (with V2H): Stabilize household energy consumption, reduce peak loads, maximize solar energy self-consumption, and ensure energy continuity, especially during the evening and nighttime.
  • Work microgrid renewable production exploitation (with V2B): Balance energy flows within the workplace microgrid, promote self-consumption, and minimize corporate energy costs.
  • Economic return of V2B services: Benefit both the EV owner and the company providing charging possibilities for its employees.
The system can leverage advanced models to predict household and corporate loads, as well as renewable energy generation. The dynamic adaptation of the virtual energy repartition of the EV battery can provide an important degree of flexibility to maximize the three aspects mentioned above. In the proposed methodology, data from the home, vehicle, and workplace are integrated to optimize energy distribution, synchronizing decisions according to the specific needs in each context.
Ideally, when the EV is being charged at home, its battery is virtually split into two parts, choosing these shares based on how much the typical home energy demand is when the owner is at home and the minimum required for their mobility.
When the vehicle arrives at the work parking lot, the V2B algorithm receives, as input, the share of the EV battery that the user is dedicating to the V2X services. During the time scheduled for charging the vehicle, the algorithm recharges the dedicated mobility “reservoir” by taking advantage of the microgrid surplus. At the same time, it draws from the “reservoir” dedicated to V2X services to optimize the laboratory energy flows. However, at the time when the EV is planned to leave, the virtual V2X-related part of the EV battery reaches at least the user’s chosen charge, as detailed in Section 2.2.3.
Essentially, the system works in two main stages. At home, the vehicle is charged based on excess solar energy from the home’s PV system and fixed storage to maximize efficiency. At the workplace, the V2B algorithm dynamically manages the amount of energy provided by the vehicle to support the workplace energy demand. This way, the domestic, office, and driver’s needs can be satisfied.
This enables the full exploitation of locally produced solar energy, operation cost reduction, and the enhancement of the energy-autonomous capability of the house and workplace microgrids. The approach allows flexibility in users’ choices to prioritize either mobility or energy service use depending on their needs. In other words, this solution will optimize the energy fluxes both for residential and work environments with the efficient and sustainable integration of electric vehicles into energy systems, providing a scalable and adaptable model for real applications.
In conclusion, the integrated strategy aims to offer practical and easy application for the development of smart cities, particularly in areas of decentralized energy management, integration of electric mobility, and sustainable urban infrastructure [29]. Specifically, its implementation within a smart city context supports intelligent and integrated energy management across different buildings by leveraging existing ICT platforms and energy management systems while addressing user mobility needs and reducing both energy costs and CO2 emissions, thus contributing to the core objectives of smart grids and urban sustainability strategies.
The detailed methodology description and implementation are fully described in the following subsection.

2.2. Methodology Description

2.2.1. VPA Algorithm Recall

As detailed in [27,28], VPA implies that the EV battery operates by splitting the overall battery energy capacity into two virtual sub-batteries according to a sharing parameter defined as αV2X, between 0 and 1. The capacity of the two virtual partitions, expressed in kWh, can be defined as
E ~ V 2 X , m a x   = α V 2 X · E E V T , m a x     E ~ E V 1 , m a x   = ( 1 α V 2 X ) · E E V T , m a x   ,
where E E V T , m a x is the overall capacity of the EV′S physical battery, expressed in kWh. From now on, tilde-hatted quantities shall indicate virtual quantities to distinguish them from physical ones. Virtual energy partitions charge and discharge according to virtual power signals, namely, P ~ V 2 X and P ~ E V 1 , both expressed in kW. These signals need to be consistent with the actual physical charging power of the charging station, i.e.,
P E V t = P ~ E V 1 t + P ~ V 2 X t ,
The latter provides consistency between the physical energy in the battery, E E V T , and the virtual energy of the two partitions, E ~ V 2 X and E ~ E V 1 :
E E V T   t = E E V T _ 0 + 0 t P E V τ   d τ = E ~ V 2 X t + E ~ E V 1   ( t ) ,
under the assumption that E E V T _ 0 is split according to (1). This allows defining two virtual SOCs as
S O C ~ V 2 X   ( t ) = E ~ V 2 X   t E ~ V 2 X , m a x   · 100 S O C ~ E V 1   ( t ) = E ~ E V 1   ( t ) E ~ E V 1 , m a x   · 100   ,
while the physical SOC of the EV is obviously defined as
S O C E V T   ( t ) = E E V T ( t ) E E V T , m a x · 100 ,

2.2.2. V2H Algorithm at Home

For the home scenario, the condition of a residential single-user housing with photovoltaic generation and an additional residential storage system is considered (Scenario 1), as depicted in Figure 3.
In the house context, as already discussed in [11], the virtual partition dedicated to the V2H service aims at operating at a fixed α V 2 X value and with the aim of compensating for situations where the residential storage is not able to balance the house’s power demand. Details about this scenario are omitted since they have been deeply discussed in [11]. However, this configuration is relevant for the purpose of this work to highlight the integration needs between different services provided by the EV exploiting the VPA.

2.2.3. V2B Algorithm at Work

The V2B algorithm’s integration into the work infrastructure is designed for the optimal management of energy flow in the worksite microgrid. Similarly, in the house configuration, the work energy system is characterized by renewable energy production, e.g., a PV system, loads, a dedicated storage system, and, of course, an EV charging station, as shown in Figure 4.
The proposed V2B algorithm aims to balance the energy needs of the company with those of the EV owner while encouraging the self-consumption of locally generated PV energy and reducing the dependence on the external electrical grid.
The V2B algorithm relies on power measurements from the various circuits within the workplace energy system while imposing key parameters, such as the expected worker departure time ( T d )   and the expected vehicle SoC ( S o C E V T , l i m .) required at the end of the user’s work period.
When the EV connects to the charging station, the algorithm initializes by reading key system parameters, including the EV′S state of charge S o C E V T , the state of health of the EV battery S o H E V T , the state of charge of the storage system in the workplace microgrid S o C w o r k , S T , and the EV′S connection time instant T a . Additionally, it requests from the EV owner the input paraments T d and S o C E V T , l i m .
The algorithm continuously monitors the   S o C E V T to ensure that the desired charge level, S o C E V T , l i m , is achieved by the specified departure time. Specifically, the S o C E V T during the time interval in which the EV is connected to the microgrid charging station at the workplace is defined as
S o C E V T T d = S o C E V T T a + T a T d P E V T t   d t
As described in the flowchart in Figure 5, the algorithm proposes different battery operation modes depending on the value of S o C E V T and the power exchanged between the microgrid and the main grid, P w o r k , M G . These include optimal charging at the optimal power ( P E V T , O P T ), fast charging at the maximum power ( P E V T , m a x ), charging at the minimum between the optimal power ( P E V T , O P T ) and the power P w o r k , M G , and discharging at the minimum between P E V T , O P T   and P w o r k , M G   to V2B services. Specifically, P E V T , O P T is the optimal charging and discharging power, chosen to prevent overstressing the battery, whose numerical value corresponds to a defined fraction β of the EV′S battery capacity. Similarly, the value of P E V T , m a x corresponds precisely to the maximum battery capacity of the EV.
The power exchanged by the microgrid P w o r k , M G is determined as
P w o r k , M G ( t ) = P w o r k , P V ( t ) + P w o r k , S T ( t ) P w o r k , L ( t )
where P w o r k , P V is the power delivered by the PV system, P w o r k , S T represent the power delivered by the fixed storage, and P w o r k , L is the power consumed by the loads within the lab/office microgrid.
Focusing on the algorithm, once the parameters are initialized and the input values are received, it first checks the stop condition. Specifically, the algorithm verifies whether the emergency stop button has been activated or if the current time has reached the departure time T d . In either case, the algorithm must be stopped. Subsequently, the algorithm enables the EV′S optimal charging if the time required to charge the vehicle at P E V T , O P T from the current S o C E V T to S o C E V T , l i m is greater than zero and equal or greater than the remaining dwell time. Therefore, the conditions for optimal charging are expressed as
( S o C E V T , l i m S o C E V T t ) · E E V T , m a x P E V T , O P T T d t
            ( S o C E V T , l i m S o C E V T t ) · E E V T , m a x P E V T , O P T > 0
If Conditions (8) and (9) are not satisfied, it either means that the value of S o C E V T , l i m has already been reached, or that there is still a lot of time left, and the EV does not need to be recharged immediately. In this case, the algorithm compares the value of S o C E V T with S o C E V T , m i n and S o H E V T with a specified threshold value, S o H T h r e s h o l d .
If S o C E V T < S o C E V T , m i n , the fast charging at maximum power, P E V T , m a x , is activated, provided the dwell time is less than or equal to the time required to charge the vehicle at P E V T , m a x and reach S o C E V T , m i n from the current S o C E V T , which is needed to ensure vehicle mobility. This condition is described as
T d t ( S o C E V T , m i n S o C E V T t ) · E E V T , m a x P E V T , m a x = ( S o C E V T , m i n S o C E V T t )
where P E V T , m a x and E E V T , m a x are simplified since they are numerically equal.
Meanwhile, if Condition (10) is not met, and the microgrid generates surplus power ( P w o r k , M G > 0 ) , the EV is charged to the minimum value between P w o r k , M G and P E V T , O P T , and the algorithm cycle is completed. The same operating mode is required for the EV battery in the case where Conditions (8) and (9) are not satisfied and S o H E V T < S o H T h r e s h o l d .
Moreover, if S o C E V T > S o C E V T , m i n , S o H E V T > S o H T h r e s h o l d , and the microgrid generates and injects power into the network, the EV is charged using the same operating mode, unless its S o C E V T is 100%. However, if the microgrid imports power, the vehicle is allowed to be discharged to the grid and offers V2B service at a power equal to the minimum value between P E V T , O P T and P w o r k , M G . According to the algorithm logic, the V2B mode can be maintained if the microgrid import condition remains and if the S o C E V T is greater than the S o C E V T , m i n .
The algorithm operates based on the balance of power in the microgrid P w o r k , M G . In surplus microgrid conditions, the EV is recharged up to the minimum of   P w o r k , M G   and P E V T , O P T , while in deficit conditions, the EV can discharge and offer V2B service, supplying power equal to the minimum of ∣ P w o r k , M G ∣ and P E V T , O P T . Discharging is allowed if S o C E V T > S o C E V T , m i n   and the   S o H E V   exceeds a predefined threshold, ensuring the EV retains sufficient energy for mobility and its battery does not degrade. When S o C E V T S o C E V T , m i n , the algorithm prioritizes recharging the EV to maintain its minimum mobility requirements. In critical situations, fast charging is enabled to ensure that the vehicle can satisfy its mobility needs within the available time before departure.
The main aim of the proposed algorithm is to minimize grid dependency by optimizing the use of locally generated PV energy and efficiently managing the storage systems while considering the needs of the vehicle owner. Specifically, the goal is to maximize the difference between the energy that would be drawn from the grid without the V2B functionality ( E G ) and the energy required with the algorithm active ( E G A ):
E G = E w o r k , L + E E V c h a r g e ( E w o r k , P V + E w o r k , S T ) ,
E G A = E w o r k , L + E E V c h a r g e ( E w o r k , P V + E w o r k , S T E E V , d i s c h a r g e ) ,
where E w o r k , L   , E w o r k , P V   ,   E w o r k , S T   ,   E E V c h a r g e , and E E V , d i s c h a r g e represent, respectively, the energy consumed by the loads, the energy generated by the PV system, the energy exchanged with the storage system within the microgrid located at the workplace, and the energies of the vehicle connected to the microgrid charging station, calculated over the connection time interval T d T a .
E w o r k , S T > 0 when the battery is discharging, E w o r k , S T < 0 when the battery is charging, E E V c h a r g e > 0 when the EV is charging, and E E V , d i s c h a r g e < 0 when the EV is discharging in V2B mode.
At the same time, it must always be ensured that
S o C E V T ( t = T d ,   ) S o C E V T , l i m ,
In order to maintain optimal performance, the algorithm operates in real time, updating all system parameters and decisions every second to ensure adaptive and dynamic energy management, therefore balancing the microgrid’s and EV owner’s needs. This demonstrates the possibility of making use of EV′S as flexible energy assets in microgrid environments for better efficiency and sustainability within a system.

2.2.4. Algorithm Integration

In particular, the V2H and V2B algorithms interact thanks to the VPA in an attempt to optimize the management of the energy flow between the home microgrid and those of the office/laboratory by sharing critical operational data, namely,
  • The SoC of the fixed storage systems at home and the office/laboratory, which enables both algorithms to consider available local energy reserves;
  • The SoC of the EV battery, so that mobility requirements and energy-sharing services are consistently met;
  • Historical data related to the consumption of load and PV generation in a home microgrid, which helps the VPA predict surplus energy and refine charging strategies for the EV.
The integration of the VPA and V2B algorithms ensures that the partition of the battery dedicated to mobility at time T d   will always be 100% charged and gives the user the flexibility to choose the final charge of the part dedicated to V2X services according to his needs (e.g., to perform the load balancing of his home at night). For this reason, the VPA communicates the α V 2 X value to the lab microgrid, which is appropriately processed by the V2B algorithm to calculate the following:
S o C E V T , m i n   = ( 1 α V 2 X ) · E E V T , m a x   E E V T , m a x · 100 ,
S o C E V T , l i m   = S o C E V T , m i n   + α V 2 X · E E V T , m a x   E E V T , m a x · 100 · x ,
where x is expressed as
x = E * V 2 X α V 2 X · E E V T , m a x  
and E * V 2 X represents the energy required by the user for V2H services.
This ensures the EV leaves the office/laboratory with sufficient energy for transportation and to support the home microgrid by leveraging surplus PV energy.
The coordination of the algorithms ensures a significant enhancement of PV self-consumption in both microgrids, offering the EV as a dynamic energy reservoir. This EV can offer its flexible services, first, to the office/laboratory microgrid during the power deficit period and, later on, to the home through V2H. Real-time updates and historical analyses, together, optimize the energy allocation, minimizing the dependence on the grid, while balancing the sustainability–user need equation and, hence, ensuring efficient and flexible energy management across the interconnected systems.

3. Results

To show the effectiveness and to validate the proper integration and robustness of the two described algorithms, two typical operation scenarios, representing realistic operating situations, were analyzed. In both cases, a user’s workday was evaluated, with the possibility of recharging his EV both at home and at work, in accordance with the description of Scenarios 1 and 2. The EV′S physical battery capacity E E V T , m a x   was assumed to be equal to 50 kWh.
A PV system was installed at the residence, while the work environment was a microgrid equipped with both a storage system and a PV system. The details of the two analyzed scenarios are described in Section 3.1.
At home, the vehicle managed the energy flows by subordinating recharging to the orders of the VPA, while during working hours, the management and optimization of the flows was performed by the V2B algorithm.
Validation was performed by referring to two different test cases, one corresponding to the situation of a full-time worker, and the other related to the case of a part-time worker. Moreover, a comparison was provided, with the case where no V2H or V2B services were provided by the EV.

3.1. Experimental Setup Description

Validation tests were performed by integrating the algorithms in the experimental setup represented by the microgrid located in a laboratory/office environment of Sapienza University, whose electrical layout is shown in Figure 6.
The lab microgrid consisted of a photovoltaic system of about a 50 m2 surface and a peak power of 12.5 kW (Figure 7). The photovoltaic modules were split into two parts, an 11.9 kW portion of the system was connected to the three-phase lab bus bar via a standard three-phase inverter, while the remaining 1.6 kW portion was connected via a single-phase inverter to a single-phase portion of the laboratory. The three-phase inverter was equipped with a DC–DC converter controlled via MPPT to maximize the output of the system.
The laboratory microgrid also included a 6.5 kWh battery energy storage system (Figure 8), with a maximum charging and discharging power of 1.8 kW and a diesel generator set with a rated voltage of 400 V and rated active power of 5 kW.
The EV battery was emulated through a 50 kWh lithium iron phosphate (Flex’ion 23 MFe) battery. This storage system used Saft’s patented SLFP™ technology with an advanced control system that provided real-time data on the SoC, SoH, temperature, and alarms, with support for communication protocols, such as Modbus, CanOpen, and TCP-IP. Information was accessed both locally via touchscreen and remotely, enabling the effective management of critical operating parameters. In fact, the system is subject to minimum and maximum voltage limitations, as well as possible over- and under-temperature hazards, which can affect its performance and require close monitoring. The proposed V2H and V2B algorithms were implemented within a PLC that communicated via the Modbus RTU protocol with the “Advantics” control unit, which allowed, through inverter control, the EV to be emulated. Figure 9 shows the internal structure of the storage system, while Figure 10 shows the bidirectional inverter with which the battery was connected to the laboratory’s three-phase busbar.
The house environment was modeled using historical recorded data of the single-family housing with a 6.5 kW PV plant and a charging wallbox for charging the electric vehicle with a 6 kW maximum power. The recorded data were used in the laboratory microgrid to replicate the expected behavior at home.
For both of the test cases considered, the EV battery parameters and VPA settings are shown in Table 1.

3.2. Test Case 1: Full-Time Worker

In the first test case, the user was a full-time worker, with working hours ranging from 8:30 a.m. to 5:30 p.m. For this reason, the EV remained connected to the home system for 14 h, from 6:00 p.m. to 8:00 a.m.
Figure 11 reports the profiles of the house consumption and PV production during the periods when the EV was connected to the house.
The EV′S physical charging of the EV with the proposed V2H service is reported in Figure 12. As one can notice, the VPA charging power substantially provided energy back to the house to balance the evening and nighttime energy requests of the house loads.
Table 2 shows the values of the energy absorbed by the loads, produced by the PV, and absorbed by the EV, respectively, during the considered period. In this table, one can notice that the EV1 virtual partition, dedicated to mobility, charged for 12.5 kWh, while the V2X virtual part discharged to compensate for the house needs.
In Figure 13, we note the SoC profiles of the virtual battery partition intended for mobility (in black), the virtual partition dedicated to V2X services (in green), and that for the real SoC of the physical battery (in red). One can notice how the S O C ~ E V 1   quickly rises to 100%, while the S O C ~ V 2 X   discharges to 0% to balance the home load and recharge the dedicated mobility partition. For the sake of completeness, Figure 14 shows the EV power profiles of the two partitions.
From Figure 15, one can see how the proposed V2H service provides a sensible reduction in energy purchase by the grid since the virtual part of the battery dedicated to V2H services is able to compensate for consumption most of the time (for about 12 h).
The values of the output variables from the V2H of test case 1 are summarized in Table 3.
At the end of the first part of the simulation, it was assumed that the EV left the house to reach the workplace. For the purpose of the simulation, a 20 km commute from home to the office was assumed, taking about 30 min and consuming 3.75 kWh, which corresponded to 15% of the S O C ~ E V 1   . Upon arriving at work, the user connected the EV to the charging station in the company parking, thus initiating the proposed V2B algorithm. The EV parameters when arriving at work are shown in Table 4.
At this point, the user set the input time parameters of the V2B algorithm, which, in turn, derived the values of S o C m i n   and S o C l i m   based on Equations (17) and (18). In particular, since parameter x depended on household consumption, it was evaluated on the basis of the history of the energy absorbed by the loads, the energy delivered by the PV, and the energy the vehicle needed to be 100% charged at home (in the analyzed cases it corresponded to 3.75 kWh). In this way, enough energy was always ensured to balance the loads in the house. According to these assumptions, the input data of the V2B algorithm at work are shown in Table 5.
These values correspond to S O C ~ E V 1 , m i n   = S O C ~ E V 1 , l i m   = 100 % and S O C ~ V 2 B , l i m   = 48.48 % . Figure 16 shows the power flows of the laboratory microgrid, specifically, the production from the PV system (in yellow), the power absorbed by the loads (in red), the power exchanged from the fixed storage (in green), the power exchanged with the EV (in blue), and the power exchanged with the grid (in light blue).
It can be seen that until 4:30 p.m., the power surplus was such that the loads were balanced, and the EV was recharged. During the last hour, however, the EV entered V2B mode.
In particular, P E V can be seen as established by Equation (2). Figure 17 shows the EV power profiles of the mobility partition (in black) and the V2X services partition (in green). Figure 18 shows the variations in the various SoCs. The S O C ~ E V 1   reached 100%, while the S O C ~ V 2 X   , due to the power surplus, reached 91.2%, far above the required limit.
The vehicle left the lab with the following parameters, as shown in Table 6.

3.3. Test Case 2: Part-Time Worker

In the second test case, the user was a part-time worker, with working hours ranging from 1:30 p.m. to 5:30 p.m. For this reason, the EV remained connected to the home system for 19 h, from 6:00 p.m. to 1:00 p.m. The input variables to the VPA algorithm were the same as in test case 1.
In Figure 19, the power generated by the PV system and the power absorbed by the household loads are observed. As for the first test case, the energies are shown in Table 7.
Also, for this test case, Figure 20 and Figure 21 show the SoC and power profiles of the virtual battery partitions and that for the real SoC of the physical battery.
Figure 22 reproduces the power profiles delivered by the home charging station with V2H.
Again, the power required from the grid was greatly reduced in the case of VPA because the portion of the battery dedicated to V2H services was able to offset the consumption most of the time by itself (Figure 23).
The values of the output variables from the VPA of test case 2 are summarized below, in Table 8.
As in the first test case, a commute of about 20 km from home to the office was assumed, during which the vehicle took about 30 min and consumed about 3.75 kWh, which corresponded to 15% of the S O C ~ E V 1   . The EV arrived at the company parking lot with the following values, as shown in Table 9.
Then, the user set the input time parameters of the V2B algorithm, which, in turn, derived the values of S o C E V T , m i n   and S o C E V T , l i m   . In particular, since the parameter x depended on household consumption, it was evaluated on the basis of the history of the energy absorbed by the loads, the energy delivered by the PV system, and the energy the vehicle needed to be 100% charged after it arrived at home (in the analyzed cases, it corresponded to 3.75 kWh). In this way, enough energy was always ensured to balance the loads in the house. The input data of the V2B algorithm are shown in Table 10.
These values correspond to S O C ~ E V 1 , m i n   = S O C ~ E V 1 , l i m   = 100 % and S O C ~ V 2 X , l i m   = 46.4 % . Figure 24 shows the power flows of the laboratory microgrid. It can be seen that up to 4:00 p.m., the power surplus was such that it ensured load balancing and EV charging. After that, however, EV charging began at P O P T to ensure the S o C l i m   was reached.
Figure 25 shows the EV′S power profiles of the mobility partition (in green) and the V2X services partition (in black), which are related to each other by Equation (2).
Figure 26 illustrates the variations in the various SoCs. The S O C ~ E V 1   reached 100%, while the S O C ~ V 2 B   , as the vehicle arrived at the descent phase of the output from the PV system, failed to charge through surplus, but at the P O P T taken from the grid, it reached precisely 46.4%, as requested by the user.
The vehicle left the laboratory with the following parameters, as shown in Table 11.
The proposed analysis provided a detailed description of the implementation of the integrated strategy based on the virtual battery partitioning, which coordinated the control algorithms at both the workplace and residential settings, with the parameter α chosen to be equal to 50%.
To evaluate the impact of the α parameter on the energy allocated to the mobility partition and the energy associated with the V2X service partition, a sensitivity analysis was conducted for three different α values: 30%, 50%, and 70%. The results are summarized in Table 12 and Table 13 for test case 1 and test case 2, respectively. For the sake of clarity, the energy associated with the V2X service is reported as an aggregate value; it does not separately indicate the share of energy used to supply the workplace and residential loads, nor the portion used to store the photovoltaic production at the two different locations.

4. Discussion

The results achieved by the proposed analysis highlight how the proposed integration of V2B services, at home and at the EV user’s worksite, provides mutual benefits for both the EV user and the company, allowing a better exploitation of renewable energy production by the company that is used by the user when returning home after work. This also provides indirect benefits for the distribution power system, where the self-consumption of energy production is shared among different subjects, avoiding renewable production export to the grid in the daytime and improving the energy autarky of EV users at home.
In the specific test cases, it is evident how the user benefited from the storage of extra power produced by the worksite microgrid during the day, saving it, thanks to the proposed VPA, for the time when the car was connected to the house’s residential charging infrastructure. In the simulations corresponding to α = 50%, EV users could retrieve 20.5 kWh in test case 1 from the office, which basically corresponded to the energy need of the house during the evening and nighttime. In test case 2, the energy taken from the office was lower, but the user could benefit from their own photovoltaic production. Similar considerations regarding the use of the V2X partition can be extended to the cases with α = 30% and α = 70%, as reported in Table 12 and Table 13. However, in specific circumstances and in the presence of several employers with EVs and residential photovoltaic plants, the worksite microgrid could also benefit from EV energy, which, thanks to the VPA, will not affect the actual range of the EV.
As expected, focusing on test case 1 and the residential site, it was observed that as α increased, the energy absorbed by the partition dedicated to mobility decreased, while the energy used to satisfy the residential load increased, with respective values of −1.65 kWh, −5.51 kWh, and −7.30 kWh for α equal to 30%, 50%, and 70%. These values are not explicitly reported in Table 12, where E ~ V 2 X   accounts for both the residential load and the load associated with the mobility partition. As regards the lab microgrid, it is noted that for α values of 50% and 70%, the energy allocated for recharging the mobility partition remained identical to 3.75 kWh, as the vehicle departed from the residential unit with a SoC of 100%. Conversely, for an α equal to 30%, the energy E ~ E V 1   amounted to 7.50 kWh, as the SoC at departure was lower, equal to 89.30%.
As expected, test case 2 shows lower values of E ~ V 2 X   compared with test case 1, as the part-time worker was connected to the microgrid for fewer hours and, therefore, stored a smaller amount of photovoltaic energy.
The economic benefits associated with the proposed strategy, from the perspective of the EV owner, can be evaluated by considering the electricity exchanged at the point of interconnection with the public distribution grid in the residential context, along with the energy utilized for charging and V2X services within the workplace microgrid. Considering an electricity selling price equal to EUR 0.1/kWh and a purchase price of EUR 0.4/kWh, as referenced in [28], Table 14 presents the energy sold and purchased for different values of the α parameter, along with the corresponding cost savings in the residential environment compared with the case without the implementation of the VPA algorithm. The results highlight the high potential impact of the proposed VPA in improving residential self-sustainability and reducing energy costs of the house.
As for the workplace, the analysis focused on the advantages for the user of charging the EV at the company microgrid compared with home charging, at a cost of EUR 0.4/kWh. Considering the connection of the EV to the workplace microgrid during midday hours, the cost of electricity for charging both partitions—within the framework of corporate welfare policies—can reasonably be set equal to the electricity selling price (e.g., EUR 0.1/kWh). For the sake of completeness, Table 15 reports the total purchased energy and the cost savings at the work microgrid for both test cases.
A summary of the economic benefits is provided in Table 16, which shows the percentage total cost savings achieved by adopting the proposed strategy for three different partitioning coefficient values and for both test case 1 and test case 2 on the considered reference day. As the value of α varied, the total percentage savings achieved through the proposed strategy ranged from 65.69% to 86.87% for test case 1, and from 56.20% to 91.25% for test case 2, over the considered reference day.
As one can observe, the proposed integrated strategy significantly reduced operational costs by improving the exploitation of local photovoltaic energy and reducing the grid consumption for EV charging and residential loads, resulting in substantial savings for the EV owner.
Regarding fixed costs, the proposed strategy did not incur additional expenses beyond those associated with V2G technology and bidirectional charging, which is natively supported by an increasing number of vehicles or can be enabled via manufacturer-provided adapters. Therefore, the integrated approach relies on V2G-compatible charging stations, whose costs vary depending on the specific electric vehicle manufacturer.
Based on energy considerations, the proposed integrated strategy enabled the effective storage of renewable energy generated by the photovoltaic system at the workplace, allowing it to be used to supply residential loads during nighttime hours without compromising the user’s mobility needs. The implementation of a mobile partition and an integrated strategy, which improved the efficient exploitation of renewable resources available at the workplace and reduced the energy drawn from the distribution grid to satisfy residential demand, resulted in measurable energy cost reductions and CO2 emission savings for both users and grid operators.
In this context, and as a potential future development, a machine learning-based methodology, with reference to the approaches presented in [26], could be employed to determine the optimal value of the partitioning parameter α, with the aim of minimizing energy costs and CO2 emissions, while ensuring the user’s mobility needs are met. Moreover, a techno-social perspective analysis, structured as proposed in [18], could be further explored, particularly in relation to user behavior, acceptance, and the broader societal implications of the proposed energy management strategy.

5. Conclusions

This study analyzed the integration of EVs into residential and business microgrids through the implementation of V2H and V2B services. The proposed methodology is based on a virtual EV battery partitioning approach, which allows for more optimal management of energy use while meeting both mobility and V2X service delivery requirements.
The integration of the VPA and V2B algorithms made it possible to create a system that gives the user greater knowledge of what is happening. In this way, he can optimally plan his charging strategies, depending on his habits and goals. The ability of the user to choose how to virtually allocate the EV battery gives the entire system considerable flexibility.
Simulations have shown that the intelligent management of an EV′S battery allows it to maximize the self-consumption of locally produced energy from the PV panels, reducing the withdrawal from the grid.
Future developments could include integration with energy management systems based on artificial intelligence and advanced predictive models to improve dynamic energy resource management.

Author Contributions

Conceptualization, A.B., L.M., M.M. and R.L.; methodology, A.B., L.M., M.M. and R.L.; software, A.G., L.F.M., M.M. and R.L.; validation, A.G., L.F.M., M.M. and R.L.; formal analysis, A.B., L.M., M.M. and R.L.; investigation, A.G., L.F.M., M.M. and R.L.; resources, A.G., L.F.M., M.M. and R.L.; data curation, A.G., L.F.M., M.M. and R.L.; writing—original draft preparation, A.B., A.G., L.F.M., M.M. and R.L.; writing—review and editing, A.B., L.M. and C.M.; visualization, A.G., L.F.M., M.M. and R.L.; supervision, A.B. and L.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Dik, A.; Omer, S.; Boukhanouf, R. Electric vehicles: V2G for rapid, safe, and green EV penetration. Energies 2022, 15, 803. [Google Scholar] [CrossRef]
  2. Vyas, A.M.; Kushwah, G.S. Accelerating the Shift to Electric: A Review of Government Purchasing Incentives for E-Vehicles. In Proceedings of the 2023 IEEE Renewable Energy and Sustainable E-Mobility Conference (RESEM), Bhopal, India, 17–18 May 2023; IEEE: New York, NY, USA, 2023. [Google Scholar]
  3. Cifuentes-Faura, J. European Union policies and their role in combating climate change over the years. Air Qual. Atmos. Health 2022, 15, 1333–1340. [Google Scholar] [CrossRef] [PubMed]
  4. Sachan, S.; Deb, S.; Singh, P.P.; Alam, M.S.; Shariff, S.M. A comprehensive review of standards and best practices for utility grid integration with electric vehicle charging stations. Wiley Interdiscip. Rev. Energy Environ. 2022, 11, e424. [Google Scholar] [CrossRef]
  5. Hajar, K.; Guo, B.; Hably, A.; Bacha, S. Smart charging impact on electric vehicles in presence of photovoltaics. In Proceedings of the 2021 22nd IEEE International Conference on Industrial Technology (ICIT), Valencia, Spain, 10–12 March 2021; IEEE: New York, NY, USA, 2021. [Google Scholar]
  6. Saadaoui, A.; Ouassaid, M.; Maaroufi, M.J.E. Overview of integration of power electronic topologies and advanced control techniques of ultra-fast EV charging stations in standalone microgrids. Energies 2023, 16, 1031. [Google Scholar] [CrossRef]
  7. Aghamohamadi, M.; Mahmoudi, A.; Ward, J.K.; Haque, M.H. Review on the State-of-the-art Operation and Planning of Electric Vehicle Charging Stations in Electricity Distribution Systems. In Proceedings of the 2021 IEEE Energy Conversion Congress and Exposition (ECCE), Vancouver, BC, Canada, 10–14 October 2021; IEEE: New York, NY, USA, 2021. [Google Scholar]
  8. Abdelsattar, M.; Ismeil, M.A.; Aly, M.M.; Abu-Elwfa, S.S. Analysis of renewable energy sources and electrical vehicles integration into microgrid. IEEE Access 2024, 12, 66822–66832. [Google Scholar] [CrossRef]
  9. Kermani, M.; Loggia, R.; Massaccesi, A.; Moscatiello, C.; Calcara, L.; Martirano, L. EV Charging Station Implementation in Urban and Non-Urban Areas: Policies, Challenges, and Opportunities. In Proceedings of the 2024 IEEE/IAS 60th Industrial and Commercial Power Systems Technical Conference (I&CPS), Las Vegas, NV, USA, 19–23 May 2024; IEEE: New York, NY, USA, 2024. [Google Scholar]
  10. Loggia, R.; Moscatiello, C.; Kermani, M.; Flamini, A.; Massaccesi, A.; Martirano, L. Electric Vehicles Charging Stations Sharing Model Control. In Proceedings of the 2022 IEEE/IAS 58th Industrial and Commercial Power Systems Technical Conference (I&CPS), Las Vegas, NV, USA, 2–5 May 2022; IEEE: New York, NY, USA, 2022. [Google Scholar]
  11. Shao, S.; Pipattanasomporn, M.; Rahman, S. Grid integration of electric vehicles and demand response with customer choice. IEEE Trans. Smart Grid 2012, 3, 543–550. [Google Scholar] [CrossRef]
  12. Kumar, G.V.B.; Palanisamy, K.; Tuglie, E.D. Energy management of PV-Grid-Integrated microgrid with hybrid energy storage system. In Proceedings of the 2021 IEEE International Conference on Environment and Electrical Engineering and 2021 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Bari, Italy, 7–10 September 2021; IEEE: New York, NY, USA, 2021. [Google Scholar]
  13. Valsera-Naranjo, E.; Sumper, A.; Lloret-Gallego, P.; Villafafila-Robles, R.; Sudria-Andreu, A. Electrical vehicles: State of art and issues for their connection to the network. In Proceedings of the 2009 10th International Conference on Electrical Power Quality and Utilisation, Lodz, Poland, 15–17 September 2009; IEEE: New York, NY, USA, 2009. [Google Scholar]
  14. Gong, J.; Wasylowski, D.; Figgener, J.; Bihn, S.; Rücker, F.; Ringbeck, F.; Sauer, D.U. Quantifying the impact of V2X operation on electric vehicle battery degradation: An experimental evaluation. Etransportation 2024, 20, 100316. [Google Scholar] [CrossRef]
  15. Yang, M.; Zhang, L.; Zhao, Z.; Wang, L. Comprehensive benefits analysis of electric vehicle charging station integrated photovoltaic and energy storage. J. Clean. Prod. 2021, 302, 126967. [Google Scholar] [CrossRef]
  16. Venegas, F.G.; Petit, M.; Perez, Y. Active integration of electric vehicles into distribution grids: Barriers and frameworks for flexibility services. Renew. Sustain. Energy Rev. 2021, 145, 111060. [Google Scholar] [CrossRef]
  17. Adhikary, S.; Biswas, P.K.; Babu, T.S.; Balasubbareddy, M. Bidirectional operation of electric vehicle charger incorporating grids and home energy storage: V2G/G2V/V2H/V2X for sustainable development. Renew. Energy Plug-Electr. Vehicles 2024, 191–207. [Google Scholar] [CrossRef]
  18. Saxena, S.; Farag, H.E.Z.; Hilaire, L.S.; Brookson, A. A techno-social approach to unlocking vehicle to everything (V2X) integration: A real-world demonstration. IEEE Access 2023, 11, 17085–17095. [Google Scholar] [CrossRef]
  19. Gschwendtner, C.; Sinsel, S.R.; Stephan, A. Vehicle-to-X (V2X) implementation: An overview of predominate trial configurations and technical, social and regulatory challenges. Renew. Sustain. Energy Rev. 2021, 145, 110977. [Google Scholar] [CrossRef]
  20. Penthia, T. Integration of PV to EV charging systems—State of the art. In Handbook on New Paradigms in Smart Charging for E-Mobility; Elsevier: Amsterdam, The Netherlands, 2025; pp. 3–52. [Google Scholar]
  21. Cheikh-Mohamad, S.; Sechilariu, M.; Locment, F. Real-time power management including an optimization problem for PV-powered electric vehicle charging stations. Appl. Sci. 2022, 12, 4323. [Google Scholar] [CrossRef]
  22. Sathyan, S.; Pandi, V.R.; Antony, A.; Salkuti, S.R.; Sreekumar, P. ANN-based energy management system for PV-powered EV charging station with battery backup and vehicle to grid support. Int. J. Green Energy 2024, 21, 1279–1294. [Google Scholar] [CrossRef]
  23. Ellemund, G.; Fresia, M.; Bracco, S. Energy Management System for a Prosumer with Vehicle-to-Home: A Case Study in Italy. In Proceedings of the 2024 International Conference on Smart Energy Systems and Technologies (SEST), Torino, Italy, 10–12 September 2024; IEEE: New York, NY, USA, 2024. [Google Scholar]
  24. Wi, Y.-M.; Lee, J.-U.; Joo, S.-K. Electric vehicle charging method for smart homes/buildings with a photovoltaic system. IEEE Trans. Consum. Electron. 2013, 59, 323–328. [Google Scholar] [CrossRef]
  25. Valett, L.; Bollenbach, J.; Keller, R. Empowering sustainable hotels: A guest-centric optimization for vehicle-to-building integration. Energy Inform. 2024, 7, 91. [Google Scholar] [CrossRef]
  26. Shemami, M.S.; Sefid, M. Implementation and Demonstration of Electric Vehicle-to-Home (V2H) Application: A Case Study. In Developing Charging Infrastructure and Technologies for Electric Vehicles; IGI Global Scientific Publishing: Hershey, PA, USA, 2022; pp. 268–293. [Google Scholar]
  27. Bonfiglio, A.; Minetti, M.; Procopio, R. Electric Vehicle Battery Virtual Partitioning Algorithm for Residential Vehicle-to-Home Service. In Proceedings of the 2024 International Conference on Smart Energy Systems and Technologies (SEST), Torino, Italy, 10–12 September 2024; IEEE: New York, NY, USA, 2024. [Google Scholar]
  28. Bonfiglio, A.; Minetti, M.; Procopio, R. Vehicle-to-Home Service Via Electric Vehicle Energy Storage Virtual Partitioning. IEEE Trans. Ind. Appl. 2025, 1–11. [Google Scholar] [CrossRef]
  29. Lai, C.S.; Jia, Y.; Dong, Z.; Wang, D.; Tao, Y.; Lai, Q.H.; Wong, R.T.K.; Zobaa, A.F.; Wu, R.; Lai, L.L. A review of technical standards for smart cities. Clean Technol. 2020, 2, 290–310. [Google Scholar] [CrossRef]
Figure 1. EVs integrated with a smart house and workplace microgrid for optimized energy management through V2H and V2B functionalities.
Figure 1. EVs integrated with a smart house and workplace microgrid for optimized energy management through V2H and V2B functionalities.
Smartcities 08 00101 g001
Figure 2. Conceptual representation of battery partition.
Figure 2. Conceptual representation of battery partition.
Smartcities 08 00101 g002
Figure 3. Considered residential prosumer plant layout. Arrow direction indicates the positive sign of power assumed as a sign convention.
Figure 3. Considered residential prosumer plant layout. Arrow direction indicates the positive sign of power assumed as a sign convention.
Smartcities 08 00101 g003
Figure 4. Considered work microgrid plant layout.
Figure 4. Considered work microgrid plant layout.
Smartcities 08 00101 g004
Figure 5. Algorithm flowchart.
Figure 5. Algorithm flowchart.
Smartcities 08 00101 g005
Figure 6. Laboratory/office’s main electrical scheme.
Figure 6. Laboratory/office’s main electrical scheme.
Smartcities 08 00101 g006
Figure 7. Lab’s rooftop photovoltaic system.
Figure 7. Lab’s rooftop photovoltaic system.
Smartcities 08 00101 g007
Figure 8. VARTA storage.
Figure 8. VARTA storage.
Smartcities 08 00101 g008
Figure 9. SAFT Flex’Ion 23 MFe storage system.
Figure 9. SAFT Flex’Ion 23 MFe storage system.
Smartcities 08 00101 g009
Figure 10. Three-phase bidirectional inverter connected to Flex’Ion battery.
Figure 10. Three-phase bidirectional inverter connected to Flex’Ion battery.
Smartcities 08 00101 g010
Figure 11. Generation profiles from PV and household load for 14 h considered.
Figure 11. Generation profiles from PV and household load for 14 h considered.
Smartcities 08 00101 g011
Figure 12. Power profiles of charging station with V2H in test case 1 at home.
Figure 12. Power profiles of charging station with V2H in test case 1 at home.
Smartcities 08 00101 g012
Figure 13. SoC profiles of battery partitions and EV′S physical battery in test case 1 at home.
Figure 13. SoC profiles of battery partitions and EV′S physical battery in test case 1 at home.
Smartcities 08 00101 g013
Figure 14. Power profiles of battery partitions and EV′S physical battery in test case 1 at home.
Figure 14. Power profiles of battery partitions and EV′S physical battery in test case 1 at home.
Smartcities 08 00101 g014
Figure 15. Grid power profiles with and without V2H in test case 1 at home.
Figure 15. Grid power profiles with and without V2H in test case 1 at home.
Smartcities 08 00101 g015
Figure 16. Active power flows in microgrid in test case 1 at work.
Figure 16. Active power flows in microgrid in test case 1 at work.
Smartcities 08 00101 g016
Figure 17. EV power profiles in test case 1 at work.
Figure 17. EV power profiles in test case 1 at work.
Smartcities 08 00101 g017
Figure 18. Variations in SoC profiles in test case 1 at work.
Figure 18. Variations in SoC profiles in test case 1 at work.
Smartcities 08 00101 g018
Figure 19. Generation profiles for PV and household load for 19 h considered.
Figure 19. Generation profiles for PV and household load for 19 h considered.
Smartcities 08 00101 g019
Figure 20. SoC profiles of battery partitions and EV′S physical battery in test case 2 at home.
Figure 20. SoC profiles of battery partitions and EV′S physical battery in test case 2 at home.
Smartcities 08 00101 g020
Figure 21. Power profiles of battery partitions and EV′S physical battery in test case 2 at home.
Figure 21. Power profiles of battery partitions and EV′S physical battery in test case 2 at home.
Smartcities 08 00101 g021
Figure 22. Power profiles of charging station with V2H in test case 2 at home.
Figure 22. Power profiles of charging station with V2H in test case 2 at home.
Smartcities 08 00101 g022
Figure 23. Grid power profiles with and without V2H in test case 2 at home.
Figure 23. Grid power profiles with and without V2H in test case 2 at home.
Smartcities 08 00101 g023
Figure 24. Active power flows in the microgrid in test case 2 at work.
Figure 24. Active power flows in the microgrid in test case 2 at work.
Smartcities 08 00101 g024
Figure 25. EV′S power profiles in test case 2 at work.
Figure 25. EV′S power profiles in test case 2 at work.
Smartcities 08 00101 g025
Figure 26. Variations in SoC profiles in test case 2 at work.
Figure 26. Variations in SoC profiles in test case 2 at work.
Smartcities 08 00101 g026
Table 1. Simulation data and parameters.
Table 1. Simulation data and parameters.
DescriptionSymbolValue
EV′S battery capacity E E V T , m a x 50 kWh
Charging station’s power rating P E V T , m a x 6 kW
Charging power of mobility virtual part P ~ E V 1 1 kW
Coefficient for V2X service α V 2 X 50%
EV′S initial SoC S O C E V T , 0   65%
Initial SoC of mobility virtual part S O C ~ E V 1,0 50%
Initial SoC of V2X virtual part S O C ~ V 2 X , 0   80%
Table 2. Energy values of load and PV and EV virtual partitions for test case 1.
Table 2. Energy values of load and PV and EV virtual partitions for test case 1.
SymbolValue
E L O A D S 9.51 kWh
E P V 1.14 kWh
E ~ E V 1 12.5 kWh
E ~ V 2 X −20.6 kWh
Table 3. EV′S battery status at end of home charging in test case 1.
Table 3. EV′S battery status at end of home charging in test case 1.
SymbolValue
S O C ~ E V 1 , o u t   100.0%
S O C ~ V 2 X , o u t   0.0%
S O C E V T , o u t   50.0%
E ~ E V 1 , o u t   25.0 kWh
E ~ V 2 X , o u t   0.0 kWh
E E V T , o u t   25.0 kWh
Table 4. EV′S battery status arriving at work in test case 1.
Table 4. EV′S battery status arriving at work in test case 1.
SymbolValue
S O C ~ E V 1   85.0%
S O C ~ V 2 X   0.0%
S O C E V T   42.5%
E ~ E V 1   21.25 kWh
E ~ V 2 X   0.0 kWh
E E V T   21.25 kWh
Table 5. Input data of V2B algorithm for test case 1.
Table 5. Input data of V2B algorithm for test case 1.
SymbolValue
S O C E V T , m i n   50.0%
S O C E V T , l i m   74.24%
S o H T h r e s h o l d 80.0%
β0.30
T a 8:30 a.m.%
T d 5:30 p.m.
α V 2 X 0.50
x 0.24
Table 6. EV′S battery status at end of work charging in test case 1.
Table 6. EV′S battery status at end of work charging in test case 1.
SymbolValue
S O C ~ E V 1 , o u t   100.0%
S O C ~ V 2 X , o u t   91.2%
S O C E V T , o u t   95.6%
E ~ E V 1 , o u t   25.0 kWh
E ~ V 2 X , o u t   22.8 kWh
E E V T , o u t   47.8 kWh
Table 7. Energy values of loads and PV and EV virtual partitions for test case 2.
Table 7. Energy values of loads and PV and EV virtual partitions for test case 2.
SymbolValue
E L O A D S 17.3 kWh
E P V 9.5 kWh
E ~ E V 1 12.5 kWh
E ~ V 2 X −19.3 kWh
Table 8. EV′S battery status at end of home charging in test case 2.
Table 8. EV′S battery status at end of home charging in test case 2.
SymbolValue
S O C ~ E V 1 , o u t   100.0%
S O C ~ V 2 X , o u t   4.6%
S O C E V T , o u t   52.3%
E ~ E V 1 , o u t   25.0 kWh
E ~ V 2 X , o u t   1.2 kWh
E E V T , o u t   26.2 kWh
Table 9. EV′S battery status arriving at work in test case 2.
Table 9. EV′S battery status arriving at work in test case 2.
SymbolValue
S O C ~ E V 1   85.0%
S O C ~ V 2 X   4.6%
S O C E V T   44.9%
E ~ E V 1   21.25 kWh
E ~ V 2 X   1.2 kWh
E E V T   22.45 kWh
Table 10. Input data of V2B algorithm for test case 2.
Table 10. Input data of V2B algorithm for test case 2.
SymbolValue
S O C E V T , m i n   50.0%
S O C E V T , l i m   73.2%
S o H T h r e s h o l d 80.0%
β0.30
T a 1:30 a.m.
T d 5:30 p.m.
α V 2 X 0.5
x 0.23
Table 11. EV′S battery status at end of work charging in test case 2.
Table 11. EV′S battery status at end of work charging in test case 2.
SymbolValue
S O C ~ E V 1 , o u t   100.0%
S O C ~ V 2 X , o u t   46.4%
S O C E V T , o u t   73.2%
E ~ E V 1 , o u t   25.0 kWh
E ~ V 2 X , o u t   11.6 kWh
E E V T , o u t   36.6 kWh
Table 12. EV energy for mobility and V2X service for test case 1.
Table 12. EV energy for mobility and V2X service for test case 1.
α = 30%α = 50%α = 70%
E ~ E V 1     [kWh] E ~ V 2 X   [kWh] E ~ E V 1   [kWh] E ~ V 2 X   [kWh] E ~ E V 1     [kWh] E ~ V 2 X   [kWh]
Home14.0−12.712.5 −20.67.5−15.67
Lab microgrid7.5014.63.7520.53.7520.6
Table 13. EV energy for mobility and V2X service for test case 2.
Table 13. EV energy for mobility and V2X service for test case 2.
α = 30%α = 50%α = 70%
E ~ E V 1     [kWh] E ~ V 2 X   [kWh] E ~ E V 1   [kWh] E ~ V 2 X   [kWh] E ~ E V 1     [kWh] E ~ V 2 X   [kWh]
Home17.86−11.2912.5−19.37.47−19.72
Lab microgrid3.7510.403.7510.443.7510.46
Table 14. Economic evaluation at home for test case 1 and test case 2.
Table 14. Economic evaluation at home for test case 1 and test case 2.
Test Case 1Test Case 2
Without
VPA
α = 30%α = 50%α = 70%Without
VPA
α = 30%α = 50%α = 70%
Purchased
energy [kWh]
22.129.640.370.00 26.8914.221.050
Sold energy
[kWh]
0.000.000.000.00−2.100.000.000.00
Net cost
at home [EUR]
8.853.860.150.0010.555.680.420.00
Cost saving
at home [EUR]
--4.998.708.85-4.8710.1310.55
Table 15. Economic evaluation in work microgrid for test case 1 and test case 2.
Table 15. Economic evaluation in work microgrid for test case 1 and test case 2.
Test Case 1Test Case 2
α = 30%α = 50%α = 70%α = 30%α = 50%α = 70%
Purchased energy [kWh]22.1024.2524.3514.1514.1914.21
Cost to buy at home EUR 0.4/kWh8.849.709.745.665.685.68
Cost to buy at work EUR 0.1/kWh2.212.432.441.421.421.42
Cost saving in work microgrid [EUR]6.637.277.304.244.264.26
Table 16. Total cost and percentage savings for test case 1 and test case 2.
Table 16. Total cost and percentage savings for test case 1 and test case 2.
Test Case 1Test Case 2
α = 30%α = 50%α = 70%α = 30%α = 50%α = 70%
Total cost savings with
proposed strategy [EUR]
11.6215.9716.159.1114.3914.81
Total cost without
proposed strategy [EUR]
17.6918.5518.5916.4216.2316.23
Total percentage saving
with proposed strategy [%]
65.6986.0986.8756.2088.6691.25
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bonfiglio, A.; Minetti, M.; Loggia, R.; Mascioli, L.F.; Golino, A.; Moscatiello, C.; Martirano, L. Integrated Vehicle-to-Building and Vehicle-to-Home Services for Residential and Worksite Microgrids. Smart Cities 2025, 8, 101. https://doi.org/10.3390/smartcities8030101

AMA Style

Bonfiglio A, Minetti M, Loggia R, Mascioli LF, Golino A, Moscatiello C, Martirano L. Integrated Vehicle-to-Building and Vehicle-to-Home Services for Residential and Worksite Microgrids. Smart Cities. 2025; 8(3):101. https://doi.org/10.3390/smartcities8030101

Chicago/Turabian Style

Bonfiglio, Andrea, Manuela Minetti, Riccardo Loggia, Lorenzo Frattale Mascioli, Andrea Golino, Cristina Moscatiello, and Luigi Martirano. 2025. "Integrated Vehicle-to-Building and Vehicle-to-Home Services for Residential and Worksite Microgrids" Smart Cities 8, no. 3: 101. https://doi.org/10.3390/smartcities8030101

APA Style

Bonfiglio, A., Minetti, M., Loggia, R., Mascioli, L. F., Golino, A., Moscatiello, C., & Martirano, L. (2025). Integrated Vehicle-to-Building and Vehicle-to-Home Services for Residential and Worksite Microgrids. Smart Cities, 8(3), 101. https://doi.org/10.3390/smartcities8030101

Article Metrics

Back to TopTop