Next Article in Journal
Prototyping and Experimental Investigation of Digital Hydraulically Driven Knee Exoskeleton
Next Article in Special Issue
A Survey on Hybrid SCADA/WAMS State Estimation Methodologies in Electric Power Transmission Systems
Previous Article in Journal
Analysis of the Exhaust Emissions of Hybrid Vehicles for the Current and Future RDE Driving Cycle
Previous Article in Special Issue
Sub Synchronous Oscillations under High Penetration of Renewables—A Review of Existing Monitoring and Damping Methods, Challenges, and Research Prospects
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Management of Energy Communities Hosting a Fleet of Electric Vehicles

Dipartimento di Ingegneria dell’Informazione e Scienze Matematiche, Università di Siena, 53100 Siena, Italy
*
Author to whom correspondence should be addressed.
Energies 2022, 15(22), 8697; https://doi.org/10.3390/en15228697
Submission received: 14 October 2022 / Revised: 9 November 2022 / Accepted: 17 November 2022 / Published: 19 November 2022
(This article belongs to the Collection Feature Papers in Smart Grids and Microgrids)

Abstract

:
In this paper, we study the problem of managing an energy community hosting a fleet of electric vehicles for rent. On the day ahead, service requests for electric vehicles are submitted to the community. Then, the optimal request-to-vehicle assignment has to be found, as well as the optimal charging schedule of vehicle batteries. A suitable model is presented and included in an existing energy community architecture. The overall community management problem is formulated as a bi-level model, featuring two nested optimization problems. The optimal request-to-vehicle assignment requires the solution of a mixed-integer linear program. To reduce the computational complexity, a heuristic solution to the assignment problem is presented. Numerical results show that participation in the community grants a remarkable reduction in the electric vehicle charging cost. The adoption of the heuristic assignment solution provides a dramatic reduction in the computation time required to solve the bi-level model. At the same time, the level of suboptimality introduced appears to be negligible, being less than 1% in most of the considered cases.

1. Introduction

Energy communities are social aggregations of entities, that exchange energy among themselves through the public grid they are connected to. The single entities may engage in generation (especially from renewable energy sources), consumption, and energy storage, as well as provide energy services to other community members or the public grid. Participation of entities in an energy community is voluntary and open. To solicit this participation, the primary purpose of energy communities is to provide environmental, economic, or social benefits to its members or shareholders [1]. This process can also be favored by existing social relationships [2]. Several pilot studies carried out worldwide have shown that aggregation is actually capable of generating benefits of different types (see, e.g., [3,4]).
The constitution of, as well as incentives granted to, energy communities are regulated by national or local laws [5], whereas each energy community may typically decide the internal mechanisms governing its operation. Indeed, an energy community is based on a physical layer, whose components (loads, distributed energy resources, energy storage systems, electric vehicles) should be suitably coordinated, managed, and controlled to fully exploit all the benefits of aggregation.
In the literature, energy volumes to be exchanged within a community are often obtained together with energy prices by clearing a suitably designed local energy market. Local energy markets can be organized either in a centralized or peer-to-peer fashion (see [6] for a comprehensive review). The centralized solution is typically based on a community operator, who manages trading activities inside the community, as well as plays the role of intermediator between the community and the rest of the system [7,8,9]. In peer-to-peer market design, entities directly negotiate with each other, achieving consensus on an energy transaction for a certain amount of energy and a price without centralized supervision [10,11,12]. The mechanism governing the operation of a community may also include a strategy to redistribute community benefits among the members [7].
Besides energy exchange among its members, energy communities may also engage in providing flexibility and services to the grid, e.g., through enrollment in demand response programs and the provision of reserves. Another option, as explicitly highlighted in [1], is to provide charging services for electric vehicles (EVs). Given the increasing penetration of EVs in the transportation sector [13], this option is expected to become more and more concrete, and bring benefits at different levels. Indeed, mass adoption of EVs is known to have a number of impacts on distribution grid operation and management [14,15]. One of these is the high peak power consumption determined by the simultaneous charging of a large number of EVs [16]. In this respect, EV charging within energy communities could help reduce peak power thanks to the overall optimization performed at the community level. Moreover, including EVs in energy communities could provide additional flexibility to enable the integration of renewable energy into existing power grids. At the user level, social and economic benefits are expected because the energy for EV charging can be bought at cheaper prices resulting from the internal market of the community [7]. To achieve the expected benefits, EV charging has to be suitably scheduled and optimized. The management of EV charging stations connected to distribution grids has been addressed in numerous contributions, see, e.g, [17,18,19,20,21,22]. However, to the best of the authors’ knowledge, the optimal integration of a fleet of EVs into energy communities has received little attention so far. The energy management system for a public EV charging station integrated within a community microgrid is proposed in [23]. The aim is to minimize the cost of energy for EV charging and to meet the community demand while maximizing the revenue from selling the surplus energy of a photovoltaic (PV) system and the energy discharged from EVs. The scheduling of a community-integrated energy system with an EV charging station is considered in [24]. Here, an integrated demand response program is designed to promote a balance between energy supply and demand. In both contributions, the resulting problems are formulated in the framework of mixed integer programming.
In this paper, we extend the energy community architecture proposed in [7], by introducing a new entity that manages a fleet of EVs for rent. A local market based on the marginal pricing scheme is organized at a centralized level. The market aims at maximizing the social welfare of the community. This is performed by defining energy prices and volumes to achieve a more efficient allocation of resources, a reduction in the peak, and an increased amount of reserve at the community level. Since we focus on a setup where EV rental requests are submitted to the community one day ahead, two additional problems must be addressed. First, each rental request must be assigned to a vehicle. Then, the optimal EV charging scheduling must be found. A community operator is assumed to manage the market and to redistribute the community benefits among the entities, in such a way that the solution achieved by each entity within the community is not worse than that obtained by acting individually. Different from [7], where the clearing of the local market is formulated as a linear program, in this work the request-to-vehicle assignment requires the introduction of binary variables, which makes the local market optimization problem a mixed-integer linear program (MILP). To avoid the high worst-case computational complexity of solving the MILP (as could be faced in practice, when the numbers of EVs and requests increase), a heuristic procedure is proposed to solve the assignment problem, based only on the set of the received requests. Once the assignment of requests to vehicles has been fixed, the local market optimization problem becomes again a linear program, that can be efficiently solved. Numerical results presented in the paper show that the proposed heuristics has a very cheap cost in terms of computation time, and performs very well in instances for which the MILP can be solved at the optimum, thus making it possible to compare the solution of the heuristics with the optimal one.
The paper is organized as follows. Section 2 reviews the problems formulated in [7] for the clearing of the local market, and the redistribution of community benefits. The two problems are presented in a unified fashion in the form of a bi-level program. Section 3 shows how to include a fleet of EVs for rent in the framework previously introduced. The proposed heuristic solution to the request-to-vehicle assignment is described in Section 4. Numerical results are reported in Section 5 and discussed in Section 6. Finally, Section 7 draws the conclusions.
Notation: The subscript t is used to denote a discrete time instant within the considered time horizon T = { 1 , , T } . The time between two consecutive time instants is denoted by Δ . The subscript u is used to denote an entity in the entity set U . The subscript d denotes an EV in the vehicle set D . Finally, the subscript h is used to denote an EV service request in the request set H .

2. Energy Community Model

An energy community is a collection of entities located in the same geographical area that pool their resources using the public distribution network. Entities can be very heterogeneous, ranging from residential customers to small and medium-sized enterprises. In general, an entity is characterized by a number of different components that may include one or more loads (sheddable or non-sheddable), generators (steerable or non-steerable), electrical storage systems and EV charging stations. The members of a community exchange electricity between them, share energy storage systems and provide services to the external grid. An energy community may bring several benefits, such as energy cost savings, peak cost reduction and provision of reserve on an aggregate basis.
While it is assumed that the entities are connected to the same local bus, the energy community provides a virtual layer over which entities may exchange energy flows (see Figure 1). Denote by e u , t gri 0 and i u , t gri 0 the energy exported to and imported from the grid by entity u at time t. Moreover, let e u , t com 0 and i u , t com 0 be the energy exported to and imported from the community by entity u at time t. Then, the net energy flowing from entity u to the local bus amounts to ( e u , t gri + e u , t com ) ( i u , t gri + i u , t com ) . Since the energy balance at the community level implies u U ( i u , t com e u , t com ) = 0 , the net energy flowing from the grid to the local bus is u U ( i u , t gri e u , t gri ) .
It is assumed that the energy flows with the external grid are subject to the same pricing mechanism as if the entities were not part of a community. Conversely, the peak power penalty is applied to the aggregate net power flow, and the provision of the reserve to the grid is remunerated at the community level, depending on the aggregate amount of power reserve provided. A community operator coordinates the behavior of the entities in order to maximize the benefits for the community. On the day ahead, the operator collects the load and generation profiles of each entity, as well as their flexibility, and schedules the operation of the devices based on the prices of the electricity imported from or exported to the grid. For the remuneration of this activity, the entities pay a fee to the operator, which is assumed to be proportional to the aggregate amount of energy exchanged within the community, i.e., it is equal to γ com u U t T ( e u , t com + i u , t com ) , where γ com [€/kWh] is a given unitary price. In [7], an optimization model was proposed to solve the problems that the community operator has to face. In the following, such a model is briefly reviewed. For the sake of exposition, the mathematical details are skipped and the interested reader is referred to [7] for an exhaustive description. In Section 3, it will be shown how to extend this model so as to include the management of a fleet of EVs for rent.
The community operator has to determine the energy flows among the entities and the corresponding prices (i.e., the operator has to clear the market), and then it has to share the profits among the community members. These tasks can be simultaneously formulated as a bi-level model, which is a mathematical program composed of two nested optimization problems, termed upper and lower level [25]. In general, a bi-level model can be written as
max x X F ( x , y * )
s . t . y * arg max y Y f ( y ; x ) ,
where F and f are the objective functions of the upper and lower level problems (1) and (2), respectively. In the framework considered in [7], the lower-level problem models the market clearing task, while the upper-level problem takes care of profit redistribution. In the following, we outline the main features of both problems.

2.1. Lower Level Problem

The objective function f ( y ; x ) of problem (2) represents the social welfare of the community over a given time horizon T . It is composed of three terms:
f ( y ; x ) = f E ( y ) + f R ( y ) + f P ( y ) .
The term f E ( y ) accounts for costs and revenues related to the energy flows. Among others, they include the costs of energy purchased from the grid or from the community, the costs of shed demand and steered generation, the costs of storage usage and the fees paid to the community operator. The revenues come from selling energy to the grid or to other community members. The term f R ( y ) represents the revenues collected by the community for providing symmetric reserve to the grid. It is assumed that the revenue is proportional to the aggregate reserve r sym provided by the community, i.e., it is equal to π res r sym , where π res [€/kW] is a given reserve price. The term f P ( y ) corresponds to the loss incurred by the community for the peak power p ¯ consumed by the community from the grid over the time horizon T , and it is equal to π peak p ¯ , where π peak [€/kW] is the peak price. The vector of the optimization variables y Y includes the energy volumes exchanged by each entity and the charging/discharging profiles of the storage devices. The feasible set Y is used to enforce technical constraints on the optimization variables (e.g., maximum steerable generation, maximum capacity of a storage system, etc.), as well as to model the storage dynamics and to guarantee the energy balance for each entity at all times. In [7], it is shown that the lower level problem (2) can be cast as a linear program and thus efficiently solved. Moreover, according to the marginal pricing framework [26], the dual variables of the energy balance constraints represent the optimal purchase/selling prices of the energy traded within the community.

2.2. Upper Level Problem

The purpose of problem (1) is to share the community profit among the entities according to a given redistribution policy. A possible choice is to maximize the smallest (absolute or relative) profit increase that the entities experience when participating in the community. The objective function F ( x , y * ) naturally reflects the chosen policy. The optimization variables x include the fraction of revenues from reserve provision and peak costs that are ascribed to each entity, as well as slack variables instrumental to encoding the redistribution policy in the objective function. The feasible set X ensures that no entity is penalized compared to acting individually. In particular, this means that when participating in the community, the profit of each entity cannot be less than the profit the entity would achieve by acting individually.
Remark 1.
In a bi-level model (1) and (2), the optimizer y * and the feasible set Y of the lower level depend, in general, on the optimization variables x of the upper level. In turn, the feasible set X of the upper level may depend on y * . However, in the considered application, the lower level problem (2) is a linear program that does not depend on x, i.e. f ( y ; x ) = f ( y ) , see (3). Moreover, for a given solution y * of the lower level problem, the upper level is also a linear program. As a consequence, problem (1) and (2) can be efficiently solved as the cascade of two linear programs, one corresponding to the lower level, and the other corresponding to the upper level. A discussion about possible solution strategies can be found in [7].

3. EV Charging Management

In this section, we show how to include an entity hosting a fleet of EVs in the energy community model previously introduced. To this aim, we first present a model of such an entity and then describe how to modify the upper and lower level problems (1) and (2) accordingly.

3.1. EV Rental Service Model

For the sake of exposition, we assume that one entity of the community is hosting | D | vehicles, i.e., this entity does not have any other kind of load, generation or storage systems other than the vehicles. The considered scenario is that of an entity that runs a fleet of EVs for rent. On the day ahead, a customer submits a request h to the entity, by specifying the departure time t h l , the return time t h r and the expected amount of energy E h consumed for the vehicle usage. The first problem the entity has to face is to decide which vehicle to assign to each request (vehicle assignment problem). For the sake of exposition, we assume that EV requests are such that there always exists a feasible assignment. An optimal charging schedule for the vehicles should be found. In order to come up with a solution that is optimal at the community level, we assume that the vehicle requests are forwarded to the community operator that returns the optimal vehicle assignment and charging schedule as a result of the social welfare maximization problem (2). Let us define the following request parameters
σ h , t = 1 if t = t h r 0 else , ω h , t = 1 if t = t h l 0 else ,
δ h , t = 1 if t h l t < t h r 0 else .
In (4), σ h , t and ω h , t are equal to one only when the time index t coincides with the return and departure times of request h, respectively. On the other hand, δ h , t in (5) is equal to one if request h is active at time t. Concerning the assignment problem, it can be formulated by introducing the following set of constraints
z h , d { 0 , 1 } h H , d D
d D z h , d = 1 h H
h H δ h , t z h , d 1 d D , t T .
where the variable z h , d is such that z h , d = 1 if and only if request h is assigned to vehicle d. Clearly, each request must be fulfilled by exactly one vehicle and a vehicle cannot serve more than one request at the same time instant. These two conditions are imposed by constraints (7) and (8), respectively.
In order to model the dynamics of the EV batteries, let s d , t denote the battery energy level of vehicle d at time t, and by a d , t the fraction of the power rating P ¯ d that the battery of vehicle d consumes at time t. Then, for each d D , the battery level satisfies
s d , t = s d , t 1 + η d Δ P ¯ d a d , t h H σ h , t z h , d E h t T
s d , 0 = S ¯ d , s d , T = S ¯ d
0 s d , t S ¯ d , 0 a d , t 1 t T .
In (9), the parameter η d represents the battery charging efficiency of vehicle d. Moreover, if vehicle d is fulfilling request h, its battery level is reduced by E h when the vehicle returns to the entity (at time t h r ). In (10) the battery level of each EV at the initial and final time is set. For the sake of simplicity, we are imposing that the EV batteries are filled up to the maximum level S ¯ d at the beginning and at the end of the considered time horizon, but different choices can be made. Clearly, both the battery level and the charging rate must be within the limits enforced by (11). Finally, it must be noted that a vehicle cannot be charged while fulfilling a request (so that a d , t must be zero during the request period). Moreover, if a vehicle is assigned to a request h, then its battery level at departure time t h l must be not less than the energy E h required by the request. These constraints can be written as
a d , t 1 h H δ h , t z h , d d D , t T
s d , t h H ω h , t z h , d E h d D , t T .
The fleet of EVs contributes to the power reserve that the community provides to the grid. If we assume no vehicle-to-grid power injection, each EV can provide only a downward reserve when charging (i.e., it can increase the power consumed from the grid if needed). The maximum power increase is dictated by the residual battery capacity, as well as by the current and the maximum charging rate. Clearly, when a vehicle is fulfilling a service request, it cannot provide any reserve. Hence, the downward reserve r d , t 0 provided by vehicle d at time t must satisfy the following constraints
r d , t S ¯ d s d , t η d Δ d D , t T
r d , t P ¯ d ( 1 a d , t ) d D , t T
r d , t P ¯ d 1 h H δ h , t z h , d d D , t T .

3.2. Lower Level Problem

We can now summarize the modifications to problem (2) that are required to include the entity hosting the fleet of EVs. In the following, let v U be the index of such an entity in the entity set U .
Concerning the objective function f ( y ; x ) in (3), the quantity f E ( y ) includes an additional term π t igr i v , t gri γ com i v , t com representing the energy cost and the contribution of the EV fleet to the community operator fee, where π t igr is the price of the energy imported from the grid at time t. The revenue f R ( y ) coming from reserve provision and the cost f P ( y ) related to peak power is modeled by means of the slack variables r sym and p ¯ , respectively. Hence, the contribution to reserve and peak power boils down to modifying existing constraints that define the set Y in (2) with the following ones
r sym u U \ { v } r u , t + d D r d , t t T
p ¯ u U \ { v } i u , t gri e u , t gri / Δ + i v , t gri / Δ t T ,
where r u , t in (17) is the amount of downward reserve that entity u can provide at time t, whereas the sum in (18) would be the community peak power at time t without the fleet of EVs.
There are two kinds of additional optimization variables that need to be included in the vector y in (2). First, the entity hosting the fleet of EVs requires a set of variables common to all other entities, namely the energy flows imported from the grid or the community ( i v , t gri , i v , t com ) and the downward reserve r d , t provided by each EV. Conversely, the new variables which are specific to the rental requests and the EVs are the binary assignment variables z h , d , the EV battery levels s d , t and the EV charging rates a d , t .
Concerning the new constraints defining the feasible set Y in (2), besides (6)–(16), the energy balance at entity v must be added, as follows
i v , t gri i v , t com + Δ d D a d , t P ¯ d = 0 , t T .

3.3. Upper Level Problem

The purpose of the upper-level problem (2) is to redistribute the community profit among the entities. In this paper, the adopted redistribution policy aims at maximizing the smallest relative profit increase in the entities. This choice is slightly different from what was performed in [7], where the smallest absolute profit increase was considered. Let J * = f ( y * ) be the optimal profit of problem (2). Denote by J u the profit of entity u U when participating in the community. Clearly,
J * = u U J u .
The underlying idea is to decompose J u as
J u = J u E + J ˜ u u U .
The term J u E in (21) represents the profit coming from the energy generation and consumption of entity u when operating in the community. Notice that J u E can be easily obtained from the solution of (2) by extracting the community energy prices from the dual variables of the energy balance constraints (see [7] for the details). Moreover, u U J u E = f E ( y * ) in (3). Conversely, J ˜ u in (21) is left free as an optimization variable of the upper-level problem.
In order to express the relative profit increase in an entity, denote by J u SU the optimal profit of entity u when acting as a single user, i.e., outside the community. Notice that the value J u SU is computed by solving for each entity an optimization problem similar to problem (2), but without any interaction among the entities. Then, introduce the slack variable α 0 and consider the constraints
J u J u SU α | J u SU | u U .
Maximizing α corresponds to maximizing the minimum relative profit increase J u J u SU | J u SU | for the entities such that | J u SU | > 0 . Notice that, since α 0 , constraints (22) imply that J u J u SU , u U , ensuring that no entity is penalized compared to acting individually, thus promoting the participation in the community.
Summarizing, the objective function of problem (1) is simply F ( x , y * ) = α . The vector x of the optimization variables includes J u , J ˜ u and α . The feasible set X is defined by constraints (20)–(22), besides the condition α 0 .
Remark 2.
The bi-level model (1) and (2) resulting after the introduction of the fleet of EVs retains its original structure. Specifically, it enjoys the same decoupling property between the upper and lower levels. As such, it can still be tackled by solving sequentially the lower level and the upper level problem. The upper-level problem is still a linear program. The major difference is that now the lower-level problem involves binary optimization variables (the assignment variables z h , d ) so it becomes a MILP. A flow chart of the overall procedure is shown in Figure 2a.
Large-sized instances of the lower-level problem, featuring many requests and a large number of EVs, require an excessive computational burden to be solved at the optimum. A possible way to deal with this issue is to solve the assignment problem beforehand, prior to the market clearing. This approach leads in general to suboptimal solutions but makes the lower-level problem a linear program. To this purpose, in the next section, we propose a heuristic procedure that can be used to solve the assignment problem, based only on the requests received on the day ahead.

4. Heuristic Assignment

In this section, we present a heuristic solution to the problem of assigning an EV to each request. The requests are sorted by their departure time and they are processed sequentially in that order. The proposed heuristic builds the final assignment incrementally, starting from z h , d ( 0 ) = 0 , for all h , d . At iteration i, a vehicle d i is assigned to a new request h i by setting z h i , d i ( i ) = 1 and z h , d ( i ) = z h , d ( i 1 ) for all h h i and d d i . In doing so, it must be guaranteed that the resulting assignment z h , d ( i ) is a feasible assignment. Specifically, three conditions must be met. First, z h , d ( i ) must satisfy (8). This amounts to verifying that, in the previous assignment z h , d ( i 1 ) , vehicle d i was not already assigned to requests overlapping with request h i . Second, there must exist a feasible charging profile a d i , t such that condition (13) is verified for d = d i , z h , d = z h , d ( i ) . Practically, this amounts to checking that, given the initial battery level s d i , 0 in (10), the previous assignment z h , d ( i 1 ) and the maximum charge rate P ¯ d , the battery of vehicle d i at departure time t h i l can be charged up to E h i (the amount of energy required by request h i ). Third, there must exist a feasible charging profile a d i , t such that the constraint s d i , T = S ¯ d in (10) is verified. Again, this can be checked from s d i , 0 , z h , d ( i 1 ) and P ¯ d .
In general, at iteration i there exist multiple EVs that can be assigned to request h i without violating any of the above conditions (candidate vehicles). In this case, the heuristic attempts to assign to h i the most promising candidate vehicle, by maximizing the time that a vehicle has at its disposal to recharge its battery before request h i begins. For each candidate vehicle c i , the availability time is computed as the maximum of the return times of the requests associated with vehicle c i in z h , d ( i 1 ) . Then, request h i is assigned to the candidate vehicle having the earliest availability time. Intuitively, the heuristic tries to maximize the time between two consecutive requests that must be served by the same vehicle. This choice aims at introducing more flexibility in the charging schedule problem to be solved afterwards, thus obtaining less suboptimal results.
Remark 3.
When the assignment problem is addressed by means of the proposed heuristic procedure, problem (2) boils down to a linear program, since the binary variables z h , d are assigned. Hence, the overall bi-level model (1) and (2) can be efficiently tackled by solving two linear programs sequentially. The resulting flow chart is shown in Figure 2b. The proposed procedure leads to a dramatic reduction in the computational burden, although it is not guaranteed to return the optimal solution. However, numerical simulations have shown that the heuristic solution attains a cost close to the optimal one. These aspects will be extensively discussed in the next sections.

5. Numerical Results

To validate the proposed approach, three examples are provided. The first two are toy examples reported to illustrate how the proposed procedure works, while a third example aims at evaluating the procedure’s performance and computational feasibility in a more realistic scenario. In each example, a comparison between the proposed heuristic for vehicle assignment and the optimal solution of the MILP is carried out. In all simulations, the optimization horizon is assumed to be 24 h. In the following examples, the peak price is set to π peak = 0.5 €/kW, while the reserve price is π res = 0.3 €/kW. Finally, the fee received by the community operator is γ com = 0.01 €/kWh. Simulations have been performed on Matlab, the optimization problem is formulated in Yalmip [27] and solved by Gurobi [28] on an Intel i7-11700 @ 3.60 GHz, 32 GB of RAM.
Example 1.
Let us consider a community composed of three entities, and let us perform a simulation of one day. The sampling time is set to Δ = 1 h. The first entity is assumed to be a non-flexible load, whose demand of 5 kW is kept constant throughout the day. The second entity may provide steerable generation up to 7.5 kW, while the third entity is equipped with two identical EVs. EV battery capacities are set to S ¯ d = 50 kWh with a maximum charging power P ¯ d = 7.4 kW. Battery efficiencies are set to η d = 0.9 . Three EV requests are considered, as detailed in Table 1.
Electricity prices for import from and export to the grid are assumed to be constant during the day and equal to π t igr = 0.15 €/kWh and π t egr = 0.035 €/kWh, respectively. Moreover, the unit cost of steerable generation is assumed constant and amounts to 0.04 €/kWh.
In Table 2, the request assignment is reported. Specifically, an entry is labeled if a vehicle and a request are matched by one of the procedures (H stands for heuristic, while O stands for the optimal MILP solution). In this setup, the optimal solutions obtained from solving the MILP and applying the proposed heuristic coincide.
In fact, to mitigate the peak power consumption, the optimal allocation is the one that maximizes the time between consecutive requests of each vehicle, since it provides more flexibility for the recharge. In Figure 3, it can be noticed that EV batteries are charged at a power rate lower than its maximum, in order to limit the peak consumption.
Notice that the power imported from the grid never exceeds 2.5 kW and the steerable generation facility (entity 2) sells all the generated energy to the community in order to achieve the minimum aggregated cost. From the community market point of view, the prices change three times a day. At the beginning of the day, only entity 1 is demanding energy, which is satisfied by the steerable generation. From 9 to 13, the EV charging process begins, but the power imported from the grid remains below the daily peak, which occurs in the last part of the day when the community is asking the grid for a constant power of 2.5 kW. The community incurs an overall cost of 15.08 with respect to a total cost of 32.33 if each entity would act alone exchanging energy only with the grid.
The energy flows at the community level and the community prices are reported in Figure 4.
Example 2.
To provide an example where the heuristic is suboptimal, a setup similar to that reported in the previous example is considered. The same data of Example 1 have been used, except for the price of energy imported from the grid, and the maximum amount of steerable generation. The import energy price is set to π t igr = 0.30 €/kWh for t = 9 , , 17 , while it remains π t igr = 0.15 €/kWh for the rest of the day. The maximum steerable generation is null from 9 to 17, while it is set to 7.5 kW at other times.
It is apparent that it is not convenient to charge vehicles in the interval [9,17] since the energy price is doubled and steerable generation is not available. However, the solution returned by the heuristic coincides with that of Example 1, because it does not depend on prices and on other entity features. On the other hand, the optimal MILP solution assigns the first two requests to one EV and the last one to the other vehicle, as reported in Table 3. In this case, the optimal cost incurred by the community is 30.73 €, while that provided by the heuristic assignment amounts to 32.55 €.
Example 3.
Let us consider a more realistic framework composed of 5 entities as described in Table 4. Each table entry denotes the number of non-flexible loads (nfl), sheddable loads (she), non-steerable generators (nst), steerable generators (ste), storage systems (sto) and EVs. Notice that, entity 5 is equipped with 10 identical vehicles. A simulation of 100 days is carried out, solving problem (1) and (2) for each day. The sampling time is Δ = 10 min.
The non-flexible energy demand profiles for entities 2 and 4 in a given day are depicted in Figure 5. Such profiles are a slightly perturbed version of those reported in [29]. Sheddable loads of entities 1 and 3 can reduce their consumption up to 25 % of the nominal value.
Non-steerable generation is assumed to be provided by PV plants (see Figure 6), whereas the steerable generators are capable of producing up to 5, 7.5 , 8 kW of electrical power for entities 1, 2 and 3, respectively.
The storage system of entity 3 has a capacity of 40 kWh with maximum charging/discharging power equal to 10 kW, while the charging and discharging efficiencies are both set to 0.9 .
Regarding the vehicles associated with entity 5, a set of 10 EVs with identical specifications are considered. Their battery capacity is S ¯ d = 50 kWh, while their maximum charging power and battery efficiency are set to P ¯ d = 22 kW and η d = 0.9 , respectively. For each day, up to 30 EV service requests are considered. These requests are chosen to ensure the feasibility of the heuristic procedure. Departure times are drawn from a discrete uniform distribution from 1 to 108 time steps, corresponding to the range 12 a.m.–6 p.m. On the other hand, for a given EV request h, its duration is set according to a discrete uniform distribution from 1 to 4 h. The energy required by each request follows a uniform distribution in the interval [ 10 , 40 ] kWh. Finally, the prices of energy imported from the grid are taken from the Italian electricity market [30] (see Figure 7), while the export energy prices are set to 25 % of the import energy prices.
The unit cost of sheddable demand and steerable generation are considered constant throughout the day and their values are 0.09 €/kWh and 0.07 €/kWh, respectively.
Concerning the simulation results, the procedure based on the heuristic assignment provides an average community daily cost of 114.16 , whereas the total cost of all the entities acting individually would be 129.48 . Energy flows and community prices for a given day are reported in Figure 8.
Focusing on the entity hosting EVs, it would incur an average daily cost of 71.21 by acting alone, while joining the community grants a cost reduction of 11.83 % . To evaluate the optimality level of the heuristic, the solution obtained by the proposed procedure is compared to that returned by the MILP. In the considered setup, the two approaches show similar results. In fact, the maximum daily gap between the two solutions is less than 1 % .
Regarding the computation time, the average time to find a solution to problem (1) and (2) for one day using the heuristic procedure or solving the MILP is 0.79 and 144.29 s, respectively. Hence, in this case, the proposed heuristic is around 200 times faster than the optimal procedure.

6. Discussion

While Examples 1 and 2 reported in the previous section are toy examples aimed at illustrating how the proposed procedure works, Example 3 is more realistic and allows one to obtain insight into the potential performance of the proposed approach.
The main outcome is that the cost of EV charging is significantly reduced when the rental service operates within the energy community (more than 10% in the considered setup). Notice that this comes at no expense to the other community members. Overall, the community enjoys an average daily cost saving of about 15€, which is then shared among all the entities. The adopted redistribution policy ensures that, when participating in the community, all the entities benefit from a cost reduction, compared to operating alone (i.e., outside the community).
In order to evaluate the level of conservatism introduced by the heuristic assignment procedure presented in Section 4, the heuristic solution (i.e., the one computed as in Figure 2b) was compared with the optimal solution (i.e., the one computed as in Figure 2a). Notice that the latter requires the solution of a MILP, whose complexity scales badly with the number of binary variables. This was the reason of the size of Example 3, in which the number of entities and EVs was chosen such that the MILP could be solved in reasonable time. Quite remarkably, the cost returned by the heuristic solution is very close to the optimal one, with a performance degradation that is always less than 1%. As a matter of fact, on many days, the heuristic assignment coincides with the optimal one.
A third aspect that was analyzed is the computational complexity of the proposed approach. In the considered example, the processing time required to compute the heuristic solution is about 200 times less than that needed to find the optimal solution. Such a dramatic time reduction is expected to be even more evident in larger and more realistic scenarios. Indeed, when the number of EVs increases, the solution of the MILP quickly becomes intractable. On the other hand, the complexity of the proposed approach scales nicely with respect to the problem size, since it does not require the solution of any combinatorial problem. We stress that the possibility of skipping the solution of a MILP is what mainly distinguishes our contribution with respect to [23,24].
We stress that the obtained results are in agreement with European energy policy directives [1], stating that the primary purpose of energy communities is to provide environmental, economic or social community benefits to its members or shareholders. Indeed, the more advantageous energy prices originated within the community bring clear economic benefits to the members, but also induce social benefits, by helping fight energy poverty through lower supply tariffs. Environmental benefits are achieved not only by fostering the penetration of renewable energy sources, but also enabling the decarbonization of the transportation sector by making EV management more affordable. Optimization performed at the community level promotes more virtuous consumption behaviors at the household level, by fostering concepts of common responsibility. Finally, optimal community management brings benefits also at the system level, by enabling the reduction in the peak power resulting from uncoordinated simultaneous charging of a large number of EVs.

7. Conclusions

In this paper, the optimal management of an energy community hosting a fleet of EVs for rent has been considered. The contribution is threefold. First, a new optimization model for EV rental service has been proposed, which includes the request-to-vehicle assignment problem, as well as the optimal charging schedule of the vehicle batteries. Second, it has been shown how to embed such a model into an existing optimal management architecture of energy communities. The resulting optimization problem is a bi-level model, whose exact solution requires tackling a MILP. Third, a heuristic solution to the assignment problem has been devised. This results in a dramatic reduction in the overall computational complexity, at the price of minor performance degradation.
Several research directions are currently under investigation. A more extensive experimental validation of the proposed heuristic is needed in order to evaluate its ability to return feasible assignment solutions in case of a high request-to-vehicle ratio. The proposed management model solves a planning problem on the day ahead. A further step is to derive online operation policies that adjust the day-ahead schedule on the basis of the actual load and generation profiles, as well as of the deviation of vehicle usage from the times and energy declared in the submitted requests. In this respect, it will also be useful to incorporate more accurate techniques for the prediction of EV charging duration time [31,32] in our model.

Author Contributions

Conceptualization, A.G., M.C. and S.P.; methodology, M.C. and A.G.; software, G.G.Z.; validation, G.G.Z. and S.P.; writing—original draft preparation, A.G., S.P.; writing—review and editing, G.G.Z. and M.C.; supervision, A.V.; funding acquisition, A.V. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been supported by the Italian Ministry for Research in the framework of the 2017 Program for Research Projects of National Interest (PRIN), Grant No. 2017YKXYXJ.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Directive (EU) 2019/944 of the European Parliament and of the Council. Off. J. Eur. Union 2019, L, 125–199.
  2. Savelli, I.; Morstyn, T. Better together: Harnessing social relationships in smart energy communities. Energy Res. Soc. Sci. 2021, 78, 1–6. [Google Scholar] [CrossRef]
  3. Mengelkamp, E.; Gärttner, J.; Rock, K.; Kessler, S.; Orsini, L.; Weinhardt, C. Designing microgrid energy markets: A case study: The Brooklyn Microgrid. Appl. Energy 2018, 210, 870–880. [Google Scholar] [CrossRef]
  4. Kroposki, B.; Bernstein, A.; King, J.; Ding, F. Good grids make good neighbors. IEEE Spectr. 2020, 57, 38–43. [Google Scholar]
  5. Warneryd, M.; Håkansson, M.; Karltorp, K. Unpacking the complexity of community microgrids: A review of institutions’ roles for development of microgrids. Renew. Sustain. Energy Rev. 2020, 121, 1–16. [Google Scholar] [CrossRef]
  6. Sousa, T.; Soares, T.; Pinson, P.; Moret, F.; Baroche, T.; Sorin, E. Peer-to-peer and community-based markets: A comprehensive review. Renew. Sustain. Energy Rev. 2019, 104, 367–378. [Google Scholar] [CrossRef] [Green Version]
  7. Cornélusse, B.; Savelli, I.; Paoletti, S.; Giannitrapani, A.; Vicino, A. A community microgrid architecture with an internal local market. Appl. Energy 2019, 242, 547–560. [Google Scholar] [CrossRef] [Green Version]
  8. Moret, F.; Pinson, P. Energy Collectives: A Community and Fairness based Approach to Future Electricity Markets. IEEE Trans. Power Syst. 2019, 34, 3994–4004. [Google Scholar] [CrossRef] [Green Version]
  9. Sudhoff, R.; Schreck, S.; Thiem, S.; Niessen, S. Operating Renewable Energy Communities to Reduce Power Peaks in the Distribution Grid: An Analysis on Grid-Friendliness, Different Shares of Participants, and Economic Benefits. Energies 2022, 15, 5468. [Google Scholar] [CrossRef]
  10. Morstyn, T.; Teytelboym, A.; Mcculloch, M.D. Bilateral Contract Networks for Peer-to-Peer Energy Trading. IEEE Trans. Smart Grid 2019, 10, 2026–2035. [Google Scholar] [CrossRef]
  11. Sorin, E.; Bobo, L.; Pinson, P. Consensus-Based Approach to Peer-to-Peer Electricity Markets With Product Differentiation. IEEE Trans. Power Syst. 2019, 34, 994–1004. [Google Scholar] [CrossRef] [Green Version]
  12. Rao, B.V.; Stefan, M.; Brunnhofer, T.; Schwalbe, R.; Karl, R.; Kupzog, F.; Taljan, G.; Zeilinger, F.; Stern, P.; Kozek, M. Optimal capacity management applied to a low voltage distribution grid in a local peer-to-peer energy community. Int. J. Electr. Power Energy Syst. 2022, 134, 107355. [Google Scholar] [CrossRef]
  13. International Energy Agency. Global EV Outlook 2021; International Energy Agency: Paris, France, 2021. [Google Scholar]
  14. Richardson, D.B. Electric vehicles and the electric grid: A review of modeling approaches, impacts, and renewable energy integration. Renew. Sustain. Energy Rev. 2013, 19, 247–254. [Google Scholar] [CrossRef]
  15. Gonzalez Venegas, F.; 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]
  16. Casini, M.; Vicino, A.; Zanvettor, G.G. A receding horizon approach to peak power minimization for EV charging stations in the presence of uncertainty. Int. J. Electr. Power Energy Syst. 2021, 126, 1–10. [Google Scholar] [CrossRef]
  17. Song, Y.; Zheng, Y.; Hill, D.J. Optimal Scheduling for EV Charging Stations in Distribution Networks: A Convexified Model. IEEE Trans. Power Syst. 2017, 32, 1574–1575. [Google Scholar] [CrossRef]
  18. Zheng, Y.; Song, Y.; Hill, D.J.; Meng, K. Online Distributed MPC-Based Optimal Scheduling for EV Charging Stations in Distribution Systems. IEEE Trans. Ind. Inform. 2019, 15, 638–649. [Google Scholar] [CrossRef]
  19. Zhang, Y.; You, P.; Cai, L. Optimal Charging Scheduling by Pricing for EV Charging Station With Dual Charging Modes. IEEE Trans. Intell. Transp. Syst. 2019, 20, 3386–3396. [Google Scholar] [CrossRef]
  20. Casini, M.; Zanvettor, G.G.; Kovjanic, M.; Vicino, A. Optimal Energy Management and Control of an Industrial Microgrid with Plug-in Electric Vehicles. IEEE Access 2019, 7, 101729–101740. [Google Scholar] [CrossRef]
  21. Dukpa, A.; Butrylo, B. MILP-Based Profit Maximization of Electric Vehicle Charging Station Based on Solar and EV Arrival Forecasts. Energies 2022, 15. [Google Scholar] [CrossRef]
  22. Hsaini, S.; Ghogho, M.; Charaf, M.E.H. An OCPP-Based Approach for Electric Vehicle Charging Management. Energies 2022, 15, 6735. [Google Scholar] [CrossRef]
  23. Ahmad, F.; Alam, M.S.; Shariff, S.M.; Krishnamurthy, M. A Cost-Efficient Approach to EV Charging Station Integrated Community Microgrid: A Case Study of Indian Power Market. IEEE Trans. Transp. Electrif. 2019, 5, 200–214. [Google Scholar] [CrossRef]
  24. Li, Y.; Han, M.; Yang, Z.; Li, G. Coordinating Flexible Demand Response and Renewable Uncertainties for Scheduling of Community Integrated Energy Systems With an Electric Vehicle Charging Station: A Bi-Level Approach. IEEE Trans. Sustain. Energy 2021, 12, 2321–2331. [Google Scholar] [CrossRef]
  25. Bard, J.F. Practical bilevel optimization: Algorithms and applications. In Nonconvex Optimization and Its Applications; Springer: Boston, MA, USA, 1998; Volume 30. [Google Scholar]
  26. Schweppe, F.C.; Caraminis, M.C.; Tabors, R.O.; Bohn, R. Spot Pricing of Electricity; Kluwer Academic Publishers: Norwell, MA, USA, 1988. [Google Scholar]
  27. Löfberg, J. YALMIP: A Toolbox for Modeling and Optimization in Matlab. In Proceedings of the CACSD Conference, Taipei, Taiwan, 2–4 September 2004; pp. 284–289. [Google Scholar]
  28. Gurobi Optimization, LLC. Gurobi Optimizer Reference Manual. 2022. Available online: https://www.gurobi.com (accessed on 13 October 2022).
  29. Marszal-Pomianowska, A.; Heiselberg, P.; Kalyanova Larsen, O. Household electricity demand profiles—A high-resolution load model to facilitate modelling of energy flexible buildings. Energy 2016, 103, 487–501. [Google Scholar] [CrossRef]
  30. Gestore Mercati Energetici. Andamento dei Prezzi e dei Volumi; Gestore Mercati Energetici: Roma, Italy, 2022. [Google Scholar]
  31. Ullah, I.; Liu, K.; Yamamoto, T.; Zahid, M.; Jamal, A. Prediction of electric vehicle charging duration time using ensemble machine learning algorithm and Shapley additive explanations. Int. J. Energy Res. 2022, 46, 15211–15230. [Google Scholar] [CrossRef]
  32. Ullah, I.; Liu, K.; Yamamoto, T.; Shafiullah, M.; Jamal, A. Grey wolf optimizer-based machine learning algorithm to predict electric vehicle charging duration time. Transp. Lett. 2022, 1–18. [Google Scholar] [CrossRef]
Figure 1. Energy flows in an energy community. Red arrows: imported energy; blue arrows: exported energy.
Figure 1. Energy flows in an energy community. Red arrows: imported energy; blue arrows: exported energy.
Energies 15 08697 g001
Figure 2. (a) Flow chart of the procedure leading to the optimal solution. (b) Flow chart of the proposed heuristic solution.
Figure 2. (a) Flow chart of the procedure leading to the optimal solution. (b) Flow chart of the proposed heuristic solution.
Energies 15 08697 g002
Figure 3. Example 1. Battery level s d , t of vehicles 1 (blue) and 2 (red).
Figure 3. Example 1. Battery level s d , t of vehicles 1 (blue) and 2 (red).
Energies 15 08697 g003
Figure 4. Example 1. Energy exchanged inside the community (purple), energy exchanged with the grid (black) and community prices (green) for entities 1, 2 and 3.
Figure 4. Example 1. Energy exchanged inside the community (purple), energy exchanged with the grid (black) and community prices (green) for entities 1, 2 and 3.
Energies 15 08697 g004
Figure 5. Example 3. Non-flexible energy demand profiles in day 10.
Figure 5. Example 3. Non-flexible energy demand profiles in day 10.
Energies 15 08697 g005
Figure 6. Example 3. Non-steerable generation profiles in day 10.
Figure 6. Example 3. Non-steerable generation profiles in day 10.
Energies 15 08697 g006
Figure 7. Example 3. Prices of import from the grid in day 10.
Figure 7. Example 3. Prices of import from the grid in day 10.
Energies 15 08697 g007
Figure 8. Example 3, proposed heuristic. Energy exchanged inside the community (purple), energy exchanged with the grid (black) and community prices (green) for all entities in day 10.
Figure 8. Example 3, proposed heuristic. Energy exchanged inside the community (purple), energy exchanged with the grid (black) and community prices (green) for all entities in day 10.
Energies 15 08697 g008
Table 1. Set of EV requests in Example 1.
Table 1. Set of EV requests in Example 1.
t l [h] t r [h] E h [kWh]
Request 15924
Request 2121518
Request 3172018
Table 2. Request assignment in Example 1.
Table 2. Request assignment in Example 1.
EV 1EV 2
Request 1H,O
Request 2 H,O
Request 3H,O
Table 3. Request assignment in Example 2.
Table 3. Request assignment in Example 2.
EV 1EV 2
Request 1H,O
Request 2OH
Request 3HO
Table 4. Configuration of the community in Example 3.
Table 4. Configuration of the community in Example 3.
Entity nfl she nst ste sto EV
1011100
2101100
3010110
4101000
50000010
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zanvettor, G.G.; Casini, M.; Giannitrapani, A.; Paoletti, S.; Vicino, A. Optimal Management of Energy Communities Hosting a Fleet of Electric Vehicles. Energies 2022, 15, 8697. https://doi.org/10.3390/en15228697

AMA Style

Zanvettor GG, Casini M, Giannitrapani A, Paoletti S, Vicino A. Optimal Management of Energy Communities Hosting a Fleet of Electric Vehicles. Energies. 2022; 15(22):8697. https://doi.org/10.3390/en15228697

Chicago/Turabian Style

Zanvettor, Giovanni Gino, Marco Casini, Antonio Giannitrapani, Simone Paoletti, and Antonio Vicino. 2022. "Optimal Management of Energy Communities Hosting a Fleet of Electric Vehicles" Energies 15, no. 22: 8697. https://doi.org/10.3390/en15228697

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop