Efficient Quantification and Representation of Aggregate Flexibility in Electric Vehicles

Aggregation is crucial to the effective use of flexibility, especially in the case of electric vehicles (EVs) because of their limited individual battery sizes and large aggregate impact. This research proposes a novel method to quantify and represent the aggregate charging flexibility of EV fleets within a fixed flexibility request window. These windows can be chosen based on relevant network operator needs, such as evening congestion periods. The proposed representation is independent of the number of assets but scales only with the number of discrete time steps in the chosen window. The representation involves $2T$ parameters, with T being the number of consecutive time steps in the window. The feasibility of aggregate power signals can be checked using $2T$ constraints and optimized using $2(2^T-1)$ constraints, both exactly capturing the flexibility region. Using a request window eliminates uncertainty related to EV arrival and departure times outside the window. We present the necessary theoretical framework for our proposed methods and outline steps for transitioning between representations. Additionally, we compare the computational efficiency of the proposed method with the common direct aggregation method, where individual EV constraints are concatenated.


I. INTRODUCTION
Integrating Electric Vehicles (EVs) into the power network presents challenges and opportunities.Unregulated EV charging can strain the grid, but smart control of these processes can benefit the power networks [1].EV batteries offer flexibility as they are often available at charging stations for longer periods than the time required to charge them, creating a buffer for energy storage.This flexibility can be leveraged by adjusting charging power levels, delaying charging, or enabling bidirectional power flow to the grid [2].
While leveraging the flexibility of a single EV is straightforward, its potential to support the grid is limited due to its smaller battery capacities.To effectively deploy EV flexibility at a large scale, it is necessary to aggregate the flexibility of individual EVs, taking into account their operational and technical constraints [3].However, the aggregate control of EV fleets is a complex process that necessitates appropriate The research was supported by the ROBUST project, which received funding from the MOOI subsidy programme under grant agreement MOOI32014 by the Netherlands Ministry of Economic Affairs and Climate Policy and the Ministry of the Interior and Kingdom Relations, executed by the Netherlands Enterprise Agency.The authors would like to thank ROBUST consortium partners for fruitful discussions during the preparation of this paper.mathematical models, extensive calculations, advanced ICT infrastructure, and upgraded charging facilities and poses challenges, particularly in terms of scalability and accuracy [4].This paper looks at the challenges associated with efficient and scalable aggregation of EV flexibility.
Aggregation of multiple flexible assets can be done using bottom-up or top-down approaches.Bottom-up approaches start from the properties of individual assets, which are combined to estimate the flexibility for the overall system.A common example is the direct aggregation of EV flexibility, where constraints for individual EVs are concatenated to determine the overall system flexibility.This approach is frequently employed in classical EV scheduling problems, where charging schedules are optimized by one or more aggregators [5], [6].In many cases, direct aggregation can include other operational constraints, for instance, the power flow of the network [7].
One of the primary challenges of direct aggregation is the increase of model size with the number of assets.This rapidly results in a large computational burden, even when advanced solvers are used, making real-time utilization difficult.Another challenge lies in the lack of a concise representation for efficient information sharing and decentralized optimization.
Applying set-based aggregation can effectively address many of the challenges associated with direct aggregation.In this approach, individual asset constraints are initially transformed into quantifiable parameters or metrics that can capture their unique flexibility characteristics.These parameters are then aggregated to determine the overall system's flexibility.Using aggregate parameters facilitates a more efficient representation; for instance, representing the feasible flexibility using convex polytopes can aid aggregators in participating in flexibility markets.This has the potential to enhance scalability and simplify decentralized decision-making.In the context of markets, it is imperative that such flexibility representations align with the market design [3].
Exact aggregation of individual feasible flexibility sets (i.e., achievable power consumption patterns) is known as the Minkowski sum or simply M-sum.However, computating the M-sum is challenging and is in general an NP-hard problem, which may become intractable in practice [8].Researchers have attempted to address this issue through various approximation methods, such as inner and outer approximation techniques [3], [9], [10], [11].For instance, in [12], the authors introduced a virtual battery model to aggregate flexibility from thermostatically controlled loads in buildings for providing grid services by summing up individual asset parameters to obtain the aggregate approximation, an outer approximation of the feasible flexibility.At a larger scale, power system units such as generators can be aggregated by adding their individual flexibility metrics, such as energy, power and ramp rates [13].However, such direct summation of individual flexibility constraints results in an outer approximations that are overly optimistic regarding aggregate flexibility.To avoid this, inner approximations based on zonotopes ( [10]), inner volume maximisation ( [3]), and homothets ( [9]) have been proposed.Although inner approximations will not lead to infeasible operating points, they may grossly underestimate flexibility, potentially causing economic losses.Striking a balance between accuracy and computational complexity is crucial in such scenarios.
Exact set-based aggregation methods have been developed for the special case of discharging (or charging) of heterogeneous stationary batteries [14], [15], [16].However, these cannot be directly applied to EV smart charging scenarios because they do not consider minimum charge requirements (and disconnection) of EVs.
Top-down approaches such as [17] directly approximate EV fleet flexibility.Data-driven approximation methods have emerged that directly identify parameters of aggregate EV load models and simulate EV charging demand under diverse electricity market scenarios [18].However, such data-driven approaches may suffer from computational complexity, limited scalability, and high specificity to particular cases.
This paper considers the problem of control and aggregation of many EVs by proposing a novel method for aggregating the flexibility of EVs using concepts from set-based aggregation that is scalable and not dependent on the population size.We use EV as shorthand for battery EV (BEV).Further, we show different representations for the proposed methodology and how each representation can have different use cases.

A. Notation
Matrices are denoted in upper case (M ), vectors by arrows (⃗ v), and their components by subscripts (M ij , v i ) respectively.A subscript referring to a specific EV may be added to a vector (⃗ v n ).Element-wise comparison between vectors is indicated by ≺, ⪯, ≻ and ⪰.

B. Single EV flexibility
We consider the smart charging of an EV during a flexibility window T consisting of T discrete time intervals indexed by t = 1, . . ., T .Each interval is of duration ∆t, and power consumption is assumed to be constant within the interval.The charge requirements and flexibility of each EV are determined by four parameters: the lower and upper charging rate limits (p, p) and the minimum and maximum energy requirements (e, e).These parameters are assumed to be internally consistent, e.g., e ≥ T p, and discharging is not permitted (p ≥ 0).Together, the parameters constrain the power ⃗ p ∈ R T with which the EV can charge as follows: It is straightforward to verify that this is a convex set.The feasible flexibility of an EV F EV can also be written in the form of a polytope (P EV ≡ P EV (p, p, e, e)) whose H-representation (c.f.[19]) is given as: where (1) is a column vector of length T with elements equal to 1.

C. Aggregate flexibility
Having defined the charging flexibility of a single EV, we consider a population of EVs indexed by n ∈ N = {1, . . ., N }.We assume all EVs under consideration are connected during the window T .In reality, vehicles are connected to and disconnected from chargers at different times during the day.This idealised model representation accurately represents various relevant use cases: The minimum and maximum charge levels of the EV may be adjusted to reflect the amount of charge that must/can be stored during the window.
• Large fleets of EVs, such as commercial delivery vehicles or buses, spend the night hours in a depot connected to a charger.The flexibility request window where (nearly) all vehicles are connected can be substantial in this case.• For very large fleets, we may consider only the flexibility of all vehicles that connect around time t 1 and disconnect around time t 2 , and construct different flexibility representations for all relevant combinations of t 1 , t 2 .To utilize the flexibility of all EVs in N effectively, it is essential to understand the operational and technical constraints of the aggregate system.The charging flexibility of each individual EV n is given by ( 3), with vehicle-specific parameters (p n , p n , e n , e n ).The remainder of this paper is concerned with the question of how to represent the feasible flexibility of a fleet of EVs, i.e. the set of feasible aggregate power signals ⃗ P , where We denote the aggregate flexibility by F ΣEV = { ⃗ P }, with constraints derived from the elementary EV flexibilities.
Two common approaches for determining F ΣEV exist.The first is by direct aggregation ([5], [6], [7]), where ( 5) is directly embedded in the problem, alongside (1)-( 2) for each EV.This effectively constructs F ΣEV as a N T -dimensional polytope projection to T dimensions.A downside of this approach is that the complexity scales linearly with N : this representation has 4N parameters, (N + 1)T variables, 2N (T + 1) inequalities, and equality (5).For large N , this becomes highly inefficient and increases memory and processing speed requirements.
A second approach is the direct representation of F ΣEV as a polytope in R T , a geometric object that is bounded by a finite number of facets that are generated by intersecting hyperplanes.It can provide a concise representation of feasible flexibility by capturing the feasible points that lie within the boundaries.Each hyperplane corresponds to a different constraint, allowing for a clear delineation of the feasible region.Polytopes are valuable as they enable efficient optimization, constraint modelling, and analysis of feasible solutions.The set-based aggregation into a polytope is written as [20]: where the ⊕ operator represents Minkowski summation.
Definition 3 (Minkowski summation).The Minkowski sum of two polytopes in R T defined by the two sets F 1 ⊆ R T and F 2 ⊆ R T , is defined as It follows from ( 7) that Minkowski summation is associative and commutative, so that the aggregation can be done in any order.Moreover, as (3) is convex, so is (6).By definition, this procedure results in a T -dimensional representation of F ΣEV (T variables), but the process of determining the constraints is NP-hard in general, and direct approaches to compute (6) without approximations have so far not been successful [8], [10].
Fig. 1 shows both approaches to aggregating flexibility alongside the approaches that will be developed in the remainder of this paper, with references to relevant theorems and definitions.

D. Motivating example
Let us consider two EVs that are connected for a duration of three time steps of 1 hr.The first EV has a maximum charge rate of 20 kW, a minimum charge rate of 0 kW, and an energy requirement of 15-25 kWh.If desired, it can satisfy its minimum charge requirements in a single time step.The second has permissible charge rates between 5 kW and 10 kW and requires a total energy of 20-30 kWh; it needs a minimum of two time steps to satisfy its charge requirements.
A representation as a 'simple virtual battery' that is obtained by the addition of the parameters of both EVs (as proposed in [13], [17]) results in limits on the instantaneous power consumption of 5-30 kW and energy consumption of 35-55 kWh.This representation is overly optimistic: at the low end of power consumption, the aggregate representation would suggest that ⃗ p = (5, 30, 0) T kW is a valid solution, but this would force EV #2 to charge at an unattainable rate during the second interval to meet its minimum charge requirement.At the high end of power consumption, the solution ⃗ p = (25, 30, 0) T kW fails because it either violates the upper energy limit of EV #1 or the upper power limit of EV #2.

III. UL-FLEXIBILITY
The feasible flexibility of an individual EV as defined in (3), has three generic properties: (i) it is restricted to positive values (F EV ⊆ R T ); (ii) it considers discrete time intervals; (iii) permutations of feasible charging patterns ⃗ p are also feasible.In this section, we develop the concept of UL-flexibility, a discrete-time permutable flexibility representation that is built on these properties.

A. Definition Definition 4 (Convex/concave vectors). A vector
Definition 5 (Zero-extended vectors).For any vector ⃗ v ∈ R T we define the zero-extended vector 0 ⃗ v as (0, v 1 , . . ., v T ) T ∈ R T +1 .Using these auxiliary concepts, we define the UL-flexibility representation for an energy consuming flexible asset as: Definition 6 (UL-flexibility).The UL-flexibility F(⃗ u, ⃗ l), with ⃗ u, ⃗ l ∈ R T , is given by the set of all signals ⃗ p ∈ R T for which, for all k ∈ {1, . . ., T }: 1) The energy consumed in any k intervals does not exceed the upper bound u k ; 2) The energy consumed in any k intervals does not drop below the lower bound l k .The vectors ⃗ u and ⃗ l must satisfy the following properties: i) The vector 0 ⃗ u is concave, and element-wise non-negative and increasing.ii) The vector 0⃗ l is convex, and element-wise non-negative and increasing.iii) The vector 0 ⃗ u + R • 0⃗ l, with the order-reversing matrix R ∈ R T +1×T +1 , is element-wise increasing.
Lemma 1 (Ordered UL representation).The UL-flexibility for vectors ⃗ u, ⃗ l can be expressed as Here, ⃗ p is the component-wise descending permutation of ⃗ p, 1 L ∈ R T ×T is the lower triangular matrix where all lower triangular elements are 1 and R ∈ R T ×T is the order reversing matrix, where the 1 elements reside on the antidiagonal and all other elements are zero.
Proof.Definition 6 states the constraints in an inherently permutation invariant manner ("any k intervals"), so that we may restrict ourselves to the decreasing signal ⃗ p := descending(⃗ p).The largest energy consumption in k intervals is then given by the partial sum over the k first intervals: ∆t k j=1 pj .Imposing the energy upper bound for all k results in ∆t1 L ⃗ p ⪯ ⃗ u.Similarly, the partial sum over the last k values of the ordered vector ⃗ p reflects the lowest energy consumption during k intervals, resulting in the final constraint ∆t1 L R ⃗ p ⪰ ⃗ l.
The ordered representation presented in (8) can come in handy to check the feasibility of a discrete power signal graphically.For an asset with flexibility parameterised by ⃗ u and ⃗ l, we can arrange the reference power signal in ascending and descending order.For a signal to be feasible (cf.fig.2), the integral of the ascending power signal should always be greater or equal to the lower energy bounds ( ⃗ l), and the integral of the descending power signal should be smaller or equal than the upper energy bound (⃗ u).Fig. 2 shows an examples for ⃗ u, ⃗ l given by (24) , corresponding to the parameters of EV 1 in section:II-D.The reference power signal [10,5,10] kW (left plot) is feasible as it satisfies 8, whereas the reference signal [2,22,11] kW is infeasible as it violates u 1 (power at t=2 exceeds the maximum power).
For the simpler case with ⃗ l = 0, this graphical approach is equivalent to the E-t diagram presented in [16] and (in different coordinates) the E-p diagram [14], when applied to piecewise constant power signals.
Proof.Property (i) follows directly from the fact that l T ≤ u T (implied by (iii) in Definition 6), combined with the knowledge that 0 ⃗ u is concave and 0⃗ l is convex.To prove (ii), we can define the constant power signal ⃗ p c = (c, . . ., c) T , with c = u T /(T ∆t).Concavity of 0 ⃗ u and convexity of 0⃗ l, together with (8) show that this is a feasible signal.Therefore, the set F(⃗ u, ⃗ l) is non-empty.

B. Polytope representation
Theorem 3 (Polytope representation).The UL-flexibility set F(⃗ u, ⃗ l) = P(⃗ u, ⃗ l), where the polytope can be represented in H-space as: with the (2 T − 1) × T matrices Here, (0) i and (1) i represent column vectors of length T i with values 0 and 1, respectively, and C i is the T i ×T matrix with rows that contain all permutations of i 1s and T − i 0s.
Proof.The representation follows directly from Definition 6, by enumerating all permutations of k time intervals and matching them with the relevant bounds l k and u k .Lemma 4 (Spanning set).The polytope P(⃗ u, ⃗ l) is spanned by the set of vertices where The polytopes representing the feasible flexibility region of EV 1 , EV 2 and EV 1 ⊕ EV 2 are plotted in fig. 3 for three time steps.

VI. COMPUTATIONAL EFFICIENCY
To assess the effect of scaling on computational times and peak memory usage for the proposed UL-flexibility representation, a simple linear problem to find the maximum capacity that an aggregate EV fleet could deliver in all time steps was solved, both for the ULflexibility and direct aggregation, for T ∈ {1, 2, 4, 16} and N ∈ {121, 5700, 36108, 90084, 166286, 245706}.The computational complexity of the solved problem is indicative of general optimization problems using UL-flexibility for EV aggregation.The optimization model was solved using realworld charging transaction data as inputs after pre-processing, which involved extracting the maximum and minimum power and energy values for all the connected EVs between 6-7 p.m.This window span was divided into T time steps with interval size 1/T hr.
The optimization problem was solved using a machine configuration featuring the Apple M2 MAX chip with 12-core CPU, macOS Ventura Version 13.5.1,32GB RAM, in conjunction with Python 3.10.11and the Gurobi 10.0.2 optimization solver.Solve and build time along with the peak memory use was recorded and plotted in fig. 4.
As expected from the formulation and supported by the results, the direct aggregation approach's computational time and memory requirements increase as a function of the number of time intervals T and vehicles N .In contrast, the ULflexibility approach has requirements independent of N .Both time and memory requirements are minimal for a low number of time intervals T (up to 4, in this case), but they increase sharply for larger numbers of time intervals.Nevertheless, for sufficiently large N , the UL-flexibility approach is always more efficient.VII.CONCLUSION As shown in earlier sections, the proposed UL-flexibility can be easily used to aggregate feasible flexibility exactly using set-based aggregation, replacing an NP-hard operation.Unlike direct aggregation, the complexity of proposed approach is independent of the number of assets to aggregate.Moreover, UL-flexibility improves on approximate flexibility aggregation algorithms by its exact aggregation properties, which is beneficial for aggregators in planning and operational decision-making.Hence, the proposed methodology is an efficient and scalable approach for aggregating EVs, especially when optimizing their charging behaviour across short time windows.

Figure 1 :
Figure 1: Different approaches for aggregating flexibility in EVs.Computational complexity is indicated by the number of parameters (P), variables (V) and constraints (C), where N is the number of vehicles and T is the number of time steps

Figure 2 :
Figure 2: Graphical check of feasibility using ordered ULflexibility.The UL values plotted here correspond to EV 1 as explained in section II-D.⃗ u and ⃗ l for the EV is represented by and respectively.The feasibility of the reference signals ( ) is checked by comparing the descending(⃗ p) ( ) and ascending(⃗ p) ( ) by their respective upper and lower limits.

Figure 3 :
Figure 3: Graphical representation of 3-d polytope representing the feasible flexibility of EV 1, EV 2 and EV 1 ⊕ EV 2 respectively as described in Section II-D.

Figure 4 :
Figure 4: Comparison of computational resources used by the UL-flexibility approach with direct aggregation for different time steps and quantities of EVs.The results of the base case are shown using dashed lines.