Aggregated Representation of Electric Vehicles Population on Charging Points for Demand Response Scheduling

Charging electric vehicles (EVs), whose number is increasing, is a great challenge for the power grid due to the charging load variability. Coordinated charging and schedule optimization with seized demand response opportunities are well-known conceptual solutions to that. Still, the main challenge is to adequately predict availability and parameters of electric vehicles which is crucial for determining the charging schedule and the demand response potential. We propose a method to represent a population of electric vehicles that on the one hand enables prediction via machine learning and on the other it enables an accurate optimization of the charging schedule and demand response ability. The method essence is to use five discrete-time signals spanned over a prediction horizon period which are related to envelopes of feasible charging power and charging states for the EV population on that horizon. We also introduce a robust conversion of any sequence of these signals into individual EVs data. It enables to pose and solve the optimization problem of charging scheduling with included demand response for a predicted population in the introduced representation. The proposed method is validated by schedule optimization using first the original data and then using reconstructed population data. The validation results show that the proposed EV population representation method preserves the valuable information needed for the charging schedule optimization and demand response.


I. INTRODUCTION
S IGNIFICANT and highly variable power demand related to charging of massively deployed electric vehicles threatens the power grid operation if it is not properly managed [1], [2].Coordinated EV charging brings also a significant added value to the power grid via ancillary services through demand response (DR) [3].Data analysis [4] shows that average idle time of an EV connected to a public charging The authors are with the University of Zagreb, Faculty of Electrical Engineering and Computing, Laboratory for Renewable Energy Systems, Zagreb, Croatia (e-mail: marko.kovacevic@fer.hr;mario.vasak@fer.hr).
Digital Object Identifier 10.1109/TITS.2023.3286012point is 4 h.This fact brings an opportunity for offering ancillary services such as tertiary frequency regulation without any inconvenience for the EV owner.This article is focused on a parking lot equipped with charging points operated by an aggregator as a central entity with a role similar to a smart microgrid [5].The aggregator can optimize EV charging schedule to maximize its profit and/or to reduce charging fee for the EV owners.The optimization is based on volatile energy prices and an extra income for the aggregator is obtained by offering ancillary services to the grid operator [6], [7], [8].Two prerequisites for such EV aggregator are optimization and prediction algorithms.These algorithms together enable the EV aggregator day-ahead planning and real-time control of EV charging.
One group of prediction algorithms focuses on time-series prediction of one aggregated load profile for the whole EV population charged in a non-coordinated way, by using different machine learning techniques [23], [24], [25], [26].Such predicted load profile cannot be used for charging scheduling, only for the production side management of the power grid.The second group of algorithms is based on classification of EV behaviour [27], [28], [29], [30], [31] to predict quantities of certain EV types that will come to a parking lot to charge.The EV types are distinguished by state of energy at the arrival as well as by arrival and departure times.

A. Motivation and Hypothesis
The state-of-the-art misses a method to describe a population of heterogeneous EVs connected to charging stations that is suitable both for population prediction based on machine learning and for charging scheduling with demand response ability assessment.We propose a method to fill the mentioned gap.Its main usage steps are shown in Fig. 1.
The proposed method transforms historical individual onarrival commitment data [14] to five discrete-time vectors related to envelopes of feasible charging powers and charging states for the EV population whereas these signals are suitable for quantification of demand response ability.The method has the following features: • it captures population's flexibility to offer demand response; • it can describe any EV population represented in discretetime; • it allows that every EV has a different nominal charging power, relative capacity and connection time.From the first and the most important feature follows the main hypothesis of this paper: the proposed aggregated representation of an EV population has small enough loss of information so it can be used for charging scheduling and DR of an EV aggregator.
The aggregated representation and the corresponding reconstructed individual EV data can be input to any optimization problem or demand response scheme that is compatible with individual EV description in Table I.

B. EV Aggregator Context
This paper is focused on a parking lot equipped with charging points (CPs) that are controlled by an aggregator.The aggregator is an entity that achieves a profit by demand response in excess to selling electrical energy to the EVs.Charging schedule and power of all CPs is optimized by the aggregator to maximize its profit while respecting charging needs of the EVs.Its corresponding optimization problem, the orange block in Fig. 1, is defined in Section III.On its arrival to the parking lot and connection to the CP, the EV owner provides the data about the planned departure time, its charging target and allowed power.With this data an EV becomes a charging task for the aggregator.
An EV population is made of all EVs connected to the aggregator's CPs during any time interval of interest.The number of the CPs is finite and is not important for the proposed method.The aggregator optimizes the charging schedule for the whole population at once.The concept of the aggregator control that utilizes the proposed representation method for the population of charging EVs is shown in Fig. 1.

C. Outline
The work is organized as follows.Section II describes the proposed representation method.The charging optimization problem used to exploit the introduced representation is defined in Section III and the validation of the main hypothesis is given in Section IV.The conclusion is given in Section V.

II. INDIVIDUAL VEHICLE DATA AND AGGREGATED REPRESENTATION
Individual EV data consists of a set of parameters shown in Table I, similar to [14].From the optimization perspective, an EV charging task consists of constraints on relative state of energy SoE i , charging u ch,i and discharging energies u dch,i , where index 'i' denotes the EV.Relative SoE i is always zero at the moment of the arrival and equal to relative capacity C i at the moment of departure.These constraints can be visualised with Fig. 2, similar to approaches in [18], [19], and [32].Full blue line is the upper constraint on EV's state of energy based on as-soon-as-possible (ASAP) charging and derived from the EV's nominal maximum charging power P nom,i , relative capacity C i and discretization time T .Full red line is the lower constraint based on as-late-as-possible (ALAP) charging and taking care about the EV being fully charged at the departure time instant.In Fig. 2. it can be seen that full blue and red lines are not completely straight which is a consequence of time discretization and that C is not a multiple of P nom η ch T , where η ch denotes the charging efficiency of the battery and its corresponding power converter that is assumed to be the same for all EVs.This assumption is justified considering that the historical EV data comes only from the side of CPs as charging tasks, as described in subsection IV-A, and so no data from the vehicle is needed.Namely, effectively the relative capacity in the representation of the EV could be also regarded as C/η ch , i.e. as already with included efficiency.
Dashed blue line is explicitly defined with C while dashed red line is a consequence of a decision that in any case the EV should not leave the parking lot with less energy than it has arrived with, no matter if the owner approved possible discharging of the battery or not.Both in Fig. 2. and further in this paper, k ∈ {1, 2, . . ., N } denotes a discrete-time instant where N ∈ N is the length of the optimization or prediction horizon.The proposed method represents an EV population with five discrete-time signals related to envelopes of feasible charging powers and charging states whereas one such envelope is shown in Fig. 2. The method consists of two algorithms, marked with green dashed line in Fig. 1.The first, Algorithm 1, constructs the five discrete-time signals from the individual data while the other, Algorithm 2, reconstructs the individual EV data of the population back from the discrete-time signals.Algorithm 1 is used to transform historical individual EV data to obtain data that can be input to a machine learning model.The output of the model is the predicted population described with aggregated representation and needs to be transformed to individual EV data using Algorithm 2 to be used for the optimization problem construction.
The feasible solution in Algorithm 2 cannot be guaranteed.Algorithm 2 is thus upgraded to Algorithm 3 that can always return an EV population described with individual EV data.Algorithm 3 was used to experimentally validate the main hypothesis about near-equivalence of the optimization results obtained with the original and the reconstructed EV population.

A. Aggregated Representation
Input in Algorithm 1 is an EV population described with individual data and length N of the prediction horizon of interest.The outputs of the algorithm are discrete-time signals P a , P c , P d , P r and P const that together describe the original EV population.
Two characteristic discrete-time instants, k c,i and k r,i , are determined for every EV in the population to calculate the EV's contribution to the time vectors of the population.Time instants k c,i and k r,i are shown in Fig. 2 and it can be seen that k c,i is the last time instant of ASAP charging while k r,i is the first time instant of charging with the maximum power in ALAP case.The time instants are derived as follows: where i denotes a specific EV.
The first time vector P c ∈ R N carries information about the charging power decrement in case of ASAP charging due to reaching battery capacity and thus implicitly contains information about the capacity of EVs that are part of the population.It is constructed using the characteristic time instant k c,i and can be defined as: (3) Equation ( 3) is only valid under the assumption that The assumption can be avoided if it is defined that in ASAP charging mode the EV charging will be turned off gradually through two steps, as shown in Fig. 2. The initial maximal charging power P nom,i is first reduced at the time instant k c,i to P rem,i so that the EV will be fully charged right at the next time instant.Power P rem,i is determined with: where mod(•, •) is the remainder (modulo) operator.Then, at time instant k c,i +1 charging is completely turned off.Using (4) vector P c is finally defined with: It can be seen that the first and the second sum correspond to power decrements from the first and the second step, respectively, represented with full blue lines in Fig. 2.
Similarly, in the case of ALAP charging mode, EV charging is gradually turned on just on time so that EV is fully charged at k d,i .Vector P r ∈ R N carries information about the mentioned charging power increments in ALAP charging mode, marked with full red lines in Fig. 2. and it is defined as: The subsequent two vectors are quite intuitive -P a (k) ∈ R N and P d (k) ∈ R N give information about power of all maximum charging powers related to EVs arriving and departing at time interval k, respectively: The last vector P const ∈ R N is the cumulative EV population charging power in the constant charging mode where an EV is being charged with constant power from the first time instant after its arrival k a,i until the last time instant before departure k d,i .Of course, constant charging power for every EV is determined so that the EV is fully charged at departure.Vector P const is defined as: Finally, the construction procedure of P a , P c , P r , P d and P const is described with Algorithm 1.

Algorithm 1 Construction of Population Describing Vectors
Require: EV 1 described with tuples (P nom , C, k a , k d ) Ensure: EV 2 described with P a , P c , P r , P d , P const initialize P a , P c , P r , P d , 2) add contribution of E V i to P a , P c , P r , P d , P const ▷ (4)-( 9) end for Fig. 3. Example of a population containing all EVs from one day, represented using vectors P a , P c , P r , P d and P const .The last EV (orange) departed at k = 64 and the rest of the day is not shown for brevity.
An example of a population represented with these vectors and time discretization T = 15 min can be seen in Fig. 3. Every color represents a contribution of one EV.

B. Reconstruction of Individual EV Data
In this subsection we show how individual EVs descriptions can be reconstructed from the aggregated representation introduced in the previous section.
Lemma 1 allows us to describe any EV population with a population EV 2 that contains only EVs with ratio Discrete-time instants k c and k r are derived from individual data by using ( 1) and (2) while in opposite direction P nom is calculated from: P nom,1 T η ch ∈ R can be rewritten as E V 2 and E V 3 defined with attributes obtained from equations: where P nom,3 T η ch ∈ N, time instants k a and k d are the same for all three EVs.Thus, we define set K N of all possible unique tuples (k a,i , k c,i , k r,i , k d,i ): Constraints on k a , k c , k r and k d in (15) assure that all EVs are realistic meaning that they depart after they arrive and respect the assumption that they will be fully charged.
It is possible that two or more EVs have the same parameters (k a , k c , k r , k d ) ∈ K N .Lemma 2 allows us to represent them with only one EV and population EV 2 can consist of only one EV for every element in K N with associated power P sol,i ≥ 0 in order to describe any original population.Dimension M N of vector P sol ∈ R M N is equal to the cardinal number of the set K N .
Lemma 2: All electric vehicles with the same arrival k a , departure k d and the same ratio C i P nom,i T η ch ∈ N can be represented as one electric vehicle with C = i C i and P = i P nom,i .For easier following, proofs of Lemma 1 and Lemma 2 are given in Appendices A and B.
For a population EV 2 to have the same aggregated representation as the original population EV 1 , P sol must be a solution of the following underdetermined equation system: Of course, the case when element P sol,i = 0 is understood as there is no EV with parameters {k a,i , k c,i , k r,i , k d,i } in the population EV 2 .On the other hand, if P sol,i > 0, an EV with nominal charging power P sol,i , capacity C i calculated by using (10), arrival and departure at time instants k a,i and k d,i , respectively, is added to the reconstructed population EV 2 .
For a more compact representation, the relations ( 16) can be rewritten as: where θ = [ P ⊤ a , P ⊤ c , P ⊤ r , P ⊤ d , P ⊤ const ] ⊤ and matrix A N follows from (16).
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
Finally, the individual EV data reconstruction procedure is defined with the Algorithm 2.

Algorithm 2 Reconstruction of Individual EV Descriptions
initialize EV 2 = ∅ find P sol as a solution of ( 17)

C. Robust Reconstruction of Individual EV Data
Constrained equation system ( 17) is underdetermined and matrix A N is rank-deficient.Dimensions of matrix A N are 5N x M N and rank(A N ) = 4N − 3. The sum of every N rows that belong to the one of the first four equations in ( 16) is equal to a vector of ones Last N rows that belong to equation related to P const are linear combinations of other rows.Consequently, due to existing linear dependencies of rows in A N as well as due to the requirement that all P sol must be non-negative, there is a possibility that (17) has no solution.
To generalize the method and make it applicable to the proposed concept in Fig. 1, Algorithm 3 was designed as the robust version of Algorithm 2. Solution feasibility in Algorithm 3 is guaranteed by optimization problem (18) that is derived from (17), with equation constraints implemented as soft constraints: where ||•|| denotes the second norm and vector θ is the second norm closest one to the input vector θ for which it is possible to find P sol .Finally, the robust individual EV data reconstruction procedure is defined with the Algorithm 3.
) end for Algorithm 3 was used to validate the proposed aggregated representation in a way that it is applied directly to the outputs of Algorithm 1 so there is at least one possible solution P * sol with θ = θ -the population that was the input to Algorithm 1.

D. Number of EVs in the Reconstructed Population
As a consequence of Lemma 1 and the way of the capacity C reconstruction in (10), one original EV will be reconstructed as two EVs.From the day-ahead scheduling perspective only cumulative electric energy consumption of the aggregator and its DR capacity are of interest for the aggregator.This fact allows the number of reconstructed EVs to be bigger than the number of CPs on the aggregator's parking lot.During the operation of MPC (real-time operation), the aggregator explicitly schedules the charging only of the known present and connected EVs.Future EVs, the ones to arrive to the parking lot along the prediction horizon, are reconstructed from the prediction in the form of the proposed five vectors.Such predicted EVs do not need to be allocated to specific physical CPs but they require a part of cumulative charging power to be scheduled and assigned to them.

III. VALIDATION THROUGH OPTIMIZATION
FOR DEMAND RESPONSE In order to validate the introduced EVs representation, worst-case optimization is applied to schedule charging of EVs connected to the CPs of an EV aggregator that offers an active power reserve.The optimization problem is an extension of our previous work [5] where a microgrid is replaced with n CPs, where n is always big enough to serve the whole population.Optimization horizon is one day, from midnight to midnight, and starts and ends with the empty parking lot.The problem is solved one day-ahead to obtain optimal frequency regulation reserve power to contract with the transmission system operator.

A. Charging Point Model
The 24-hours ahead scheduling problem engages n CPs, where n is equal to the maximum concurrent number of EVs in the population.In accordance with the elaboration in II.D, number n could be even higher than the physically available number of CPs on the parking lot.
A CP is modeled as a system with one state SoE cp that is equal to zero when CP is not occupied.Otherwise, it is equal to the relative SoE of a connected EV, which is described as: where the index cp denotes a CP, u ch,cp and u dch,cp are charging and discharging energies of the CP, respectively, η ch = 0.9 and η dch = 0.9 are charging and discharging efficiency, respectively, O cp is the set of time intervals in which the CP indexed with cp is occupied with an EV connected to the CP and I cp is the set of time intervals when the CP is not occupied.It can be also seen that relative SoE is automatically initialized to zero at the arrival when the EV is connected to a CP.The value of the efficiency coefficients η ch and η dch are equal for all EVs since the predicted vehicle in the population is not made concrete (or personalized) and only represents a forthcoming generic charging task for the aggregator of the charging stations.
In the absence of an EV u ch,cp (k) and u dch,cp (k) must be zero.During an EV presence, the EV's battery charger defines power constraints: where i denotes the corresponding EV connected to the charging point cp at the k th discrete-time interval and T is discretization time.EV relative battery capacity C i constrains the CP state as follows: Constraint (22) ensures that E V i leaves the parking lot with the battery charged to the required level.

B. Explicit Demand Response Scheme
Commercial rules for flexibility provision by the Croatian Transmission System Operator (TSO) are used as a setup for our case study.Unlike in [5], the aggregator with the TSO contracts frequency regulation reserve power P res ( f ) separately per every 15 min interval f ∈ F in a day, one day ahead.Set F is the set of all discrete-time instants when the activation can occur.Since the parking lots in the datasets we use for verification belong to faculty buildings, the set F contains only discrete-time intervals in period between 8:00 and 13:15 h to reduce the computational requirements due to lack of EVs outside of that period.According to the contract, the TSO can request consumption reduction P act during a time interval that starts at discrete-time interval f which is not longer than 1 h.Request P act is constant for the whole time interval and must be lower than P res ( f ).Minimum time T r between starts of two consecutive activations is defined by the TSO.The aggregator is notified about the activation 15 min ahead of it.

C. Cost Variables
In this subsection components of the cost function for energy exchange between the aggregator and the grid including DR functionality are introduced.These components include day-ahead energy cost, intra-day energy cost, peak power penalization, frequency regulation reserve power revenue, activation energy revenue and battery degradation cost.The charging behaviour is indifferent to charging fee since the final amount of the energy given to the EVs is constant due to constraint (22) and thus the charging fee is not taken into account.The charging fee and payment streams for EV charging depend on the aggregator's business model and are not further discussed here.The energy exchange with the grid in time interval [kT, (k + 1)T ) is defined with: 1) Day-Ahead Energy Cost: The exchanged electrical energy cost J da is calculated in the following way: where c da ∈ R N is a vector of day-ahead prices for every 15-min discretization interval, obtained from the market.
2) Intra-Day Energy Cost: On the intra-day market, deviation of the exhibited energy exchange profile E g from the day-ahead predicted/declared reference energy profile E g,ref is penalized with the cost function: (25) where | • | denotes the absolute value.
3) Peak Power Penalization: The aggregator contracts peak power P pp,c to the grid on a monthly basis.Peak power cost considered in this paper is derived based on peak power billing in Croatia [33], [34] (Fig. 4) and is defined with: where ε pp is an auxiliary variable, c pp is the price of peak power obtained from the grid and ε pp,past is the maximum value of ε pp since the beginning of the month until the optimization is started.

4) Frequency Regulation Reserve Power Cost:
The aggregator contracts unique reserve power P res ( f ) for every 15 minute interval the next day and it is rewarded with: where c res is the reservation power price and sgn(P res ) is obtained from the TSO, where negative and positive values denote reduction and increase of power, respectively.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

5) Frequency Regulation Energy Cost:
When the grid activates a part of or the whole agreed flexibility reserve, the aggregator is rewarded for the exhibited difference in electrical energy consumption compared to the declared consumption: where P act is a regulation power request of the grid that must be of the same sign and in absolute value lower than P res ( f ), ε act is an auxiliary variable, c act is the price of regulation energy and α = 0.25 is a tolerance factor.A correction factor γ compensates the aggregator's deviation from the reference profile E g,ref prior to the moment of activation and corrects the reference.Coefficient γ is calculated as follows: The definition in (31) introduces a nonlinearity in the optimization problem in which E g,ref is also optimized and linear relaxations are explained later in subsection III-E.6) EV Battery Degradation: Battery capacity is degraded by every charging and discharging action.Since the EV owner expects the battery is charged to the target state, battery charging is not penalized.In the case the EV owner agrees with discharging of the battery it is penalized with double degradation price since the battery must be charged again after the discharging: where c bd is the battery degradation cost [35].Expression (32) is formally correct both for the cases when the EV is owned by a person that needs to be reimbursed for the vehicle-to-grid service and when the aggregator owns the EV and it should take (32) into account for its long-term profit.

D. Worst-Case Problem
The considered optimization problem consists of one scenario S f for the activation at every time instant f ∈ F and of a scenario S n without activation.Further on, indices f and n used for different variables denote a scenario to which a particular variable belongs.The information about the activation at the moment f becomes available between the time instants f − 1 and f which means that all optimization variables of the scenario S f must be equal to the ones of the scenario S n until the activation occurs.Such an optimization problem can be qualified as the worst-case multistage recourse problem according to [36].
Constraints that connect scenarios S n and S f assure that all decision variables are calculated using only information available at the corresponding moment: When an activation occurs, it is certain that the next activation can occur at f + T r /T at earliest, because of the recuperation period respected by the grid operator that utilizes the flexibility.After the recuperation period has passed, i.e. for k ≥ f + T r /T , constraints are added as follows: Constraints (34) ensure that the aggregator is ready for the next activations that may occur after the recuperation period.Scenario S f can be seen as a branch in a scenario tree which is then connected back to the scenario S n .

E. Complete Demand Response Optimization Problem for an EV Population
It is assumed that the aggregator every day declares nominal energy exchange profile E g,n to the grid entity that utilizes the flexibility so E g,n is used as a reference profile to calculate J id and J act .That causes a nonlinearity in calculating γ in (31).The nonlinearity is bypassed by adding constraints: that limits γ to be equal to 1 in the worst case and allows us to use γ = 1 instead of (31).Total costs J n of the scenario without activation and J f of the scenarios with activation at interval f are defined as: It can be seen from ( 37) that every scenario assumes the grid will activate the whole contracted reserve power P res .
The optimization variables of the offline problem are u ch and u dch of all scenarios and the vector of contracted 15 min regulation power reserve P res while the cost being minimized is: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
where β is empirically chosen equal to 0.001 and is used to prevent certain scenarios not being optimized, which would be a consequence of that only the worst scenario contributes to J worst (case where β = 0).

F. Aggregated Battery Model
To emphasize the necessity for the introduced EV population representation method and its corresponding conversion algorithms, the optimization was also carried out with using an aggregated battery model similar to [18], [19], and [32].
Instead with ( 19)-( 22), the dynamics of all EVs' batteries is modeled with only one state and one pair of control signals: Aggregated relative state of energy is constrained with: where R agg ∈ R N is a vector of aggregated energy requests and it is derived from P r and P d .Visually, it is the sum of all constraints on individual EVs, marked red in Fig. 2. Similarly, C agg ∈ R N is derived from P a and P c : Aggregated battery energy is constrained with: Vector P max ∈ R N can also be defined as a sum of nominal powers of all EVs power converters connected to CPs at a specific moment.At first sight constraint (40) guarantees that every EV will be fully charged but that is not the case as will be shown in Section IV-C by a counter-example.

IV. EXPERIMENTAL VALIDATION
The proposed method was validated by optimizing the charging schedule for an EV population using first the original data and then using reconstructed population data obtained by reconstruction of the proposed aggregated representation of the same original population (Fig. 5).Two measures are used for comparison of the two populations: the reserved frequency regulation power and the calculated total optimization cost.Results were also compared with optimization results based on the aggregated EV battery

A. Experimental Data
Our method is tested on real historical data provided by ACN-Data [37] that include two datasets from parking lots of the California Institute of Technology (CalTech) and the Jet Propulsion Laboratory (JPL).The datasets contain 1057 and 928 days, respectively.The original data consist of: • Connection time when an EV was plugged in (t con ); • Done-charging time when the last non-zero current draw was recorded (t full ); • Departure time when the EV was disconnected (t d ); • Delivered energy to the EV (E delivered ).In order to represent an EV charging session as shown in Fig. 2 and Table I., the data is preprocessed to obtain EV power P and capacity C that are not contained in the data.Power is determined using conservative assumption that EV was being charged full time between the connection time t con and the done-charging time t full : After discretization of t con and t d into k a and k d , it is possible that charging session becomes infeasible.For that reason, with the assumption that the EV was fully charged or was being charged during the whole connection period, the relative capacity C is determined by using: Since the data is gathered from the CPs side there is no information about EVs that left without being charged due to no available CP.Such information is however irrelevant from the microgrid and DR point of view.
Values of the electrical prices used in the optimization problem (38)

B. Computational Requirements
Quadratic optimization problem (QP) (18) was set up in Python [38] using Numpy [39] and Scipy [40] modules and as a solver IBM Cplex [41] was used.The construction of the matrix A N in (17) lasts for 5 minutes for N = 96 while loading the prepared matrix from the memory lasts for 20 s.QP solving times are given in Table II.The size and the computational time of the optimization problem (38) depend on the number of EVs in the population, as shown in Fig. 7.For every point on the x axis a single EV population was used such that it is possible that for a specific case larger number of EVs gives a smaller computation time, but still the growing trend is visible.The bigger number of EVs in the reconstructed population is discussed in Subsection II-D.Computations were run on a Linux server with processor AMD Epyc 7351 CPU @ 2.4 GHz (16 cores) and 64 GB RAM.

C. Analysis of Results
Simulation results are compared by using the optimized daily cost and reserved regulation power.We propose those measures as deviation measures between the populations since they are the data of interest for the aggregator's cost analysis and DR contracting with the power grid.Cost deviation can be seen in Fig. 8.A small deviation was expected since the reconstructed EV population is generally not identical to the original one due to the underdetermined reconstruction problem (17) that has multiple solutions.Daily operation costs of the reconstructed populations are mostly higher than the ones of the original populations which corresponds with mostly lower flexibility power shown in Fig. 9.
An example explaining too optimistic results of the aggregated battery model is given in Fig. 10.Two different populations (Fig. 10a and 10b) with the same aggregated battery model (Fig. 10c) are compared.An aggregated charging trajectory is given for the case of higher energy  prices between intervals k = 5 and k = 9 when charging is avoided.If the original population consists of E V 1 and E V 2 then both of EVs are fully charged and the aggregated charging trajectory corresponds to the sum of their individual trajectories.For the mentioned case of energy prices, E V 1 will be charged as soon as possible, while E V 2 will be charged as late as possible.In the case of population in Fig. 10b E  be charged only during the mentioned period with high prices.To satisfy the chosen aggregated charging trajectory E V 4 must be discharged at the same time and of course pre-charged before and charged again after the high price period.Such case does not take into account battery degradation cost and energy losses due to E V 3 charging, discharging and charging again.Consequently the aggregated battery model operational cost is seemingly lower than the real operational cost.
This effect is even more emphasized when the aggregator participates in DR when in the specific intervals all charging must be reduced to obtain reward from the power grid.The proposed aggregated representation method distinguishes the two populations with vector P const , as shown in Fig. 10d.Applying the reconstruction Algorithm 2 to the discrete-time signals in Fig. 10d will result populations identical to the original ones.
Empirical results showed that for big enough EV populations in which more EVs are present at the same time, the reconstructed number of EVs is up to five times bigger than the original number of EVs.To better explore this effect, the proposed reconstruction algorithm was iteratively applied on the population which was stacked with one EV every iteration.The EVs which were stacked belonged to the original population of one working day from the dataset.The order of the EVs stacking was according to their arrivals.The results of the experiment are shown in Fig. 11.It can be seen that for the initial small number of EVs, the number of the reconstructed EVs is two times bigger than the original number, which matches the effect mentioned in II-D and that is a consequence of Lemma 1.For the larger number of EVs, the ratio can even be five to one.That is a consequence of underdetermination of the system (17).The influence of a larger number of the reconstructed EVs to the error of the optimal daily cost is acceptable, as evidenced in Fig. 11.
Since the charging fee is not included in the daily optimization cost J , negative values in Fig. 8. and Table III denote that the aggregator can obtain profit already by participating in DR.The DR participation and profit possibilities obviously rise with the number of EVs in the population.With some tolerance chosen using statistical data from Table III and IV, reconstructed results could be used to contract day-ahead frequency regulation power.Finally, the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

V. CONCLUSION
This paper proposes the method of representing an EV population connected to a set of charging points that are managed by an aggregator.The method preserves the information valuable for EV charging scheduling in order for the aggregator to participate in tertiary frequency regulation, peak power shaving and volatile prices market.It consists of creating five vectors from which an equivalent population can be reconstructed.The simulation was run using real world data and charging scheduling was optimized for both the original population and the reconstructed one.The daily cost and the optimal reserved power of the reconstructed population match to the optimization result of the original population with acceptable deviation.The proposed method for EV population representation can be used in prediction of the EV population using machine learning.

APPENDIX A PROOF OF LEMMA 1
Proof: If we take a realistic E V 1 for an example with attributes {C 1 , P nom,1 , k a,1 , k d,1 } we can calculate the corresponding k c,1 , k r,1 and P rem,1 using (1), ( 2) and ( 4).Since we observe only one EV -E V 1 , the aggregated representation vectors consist only of several non-zero elements according to (5)-( 9): P a (k a,1 ) = P nom,1 , P c (k c,1 ) = P nom,1 − P rem,1 , P c (k c,1 + 1) = P rem,1 , P r (k r,1 ) = P rem,1 , P r (k r,1 − 1) = P nom,1 − P rem,1 , P d (k d,1 ) = P nom,1 , By solving relations (17) with vectors values from (49), two reconstructed EVs are obtained with attributes shown in Table V.If capacities C 2 and C 3 are summed, it can be seen in ( 50) that together they are equal to the initial C 1 according to (4).In the second expression of (50) the first and the  It can be seen in Table V. that P nom,1 = P nom,2 + P nom,3 , k a,1 = k a,2 = k a,3 and k d,1 = k d,2 = k d,3 which proves that the population consisting of only E V 1 is for optimization problem (38) analogous to the population consisting of E V 2 and E V 3 .□ APPENDIX B PROOF OF LEMMA 2 Proof: Unlike the aggregation example in Section IV-C, aggregation in Lemma 2 is valid since all the batteries are present during the intervals [k a,1 , k d,1 ).The following ratios ensure that all the batteries are empty or full at the same moment to prevent that the aggregator relies on a power contributions of already full batteries.
Since both control signals u ch,i and u dch,i and battery relative state of energy SoE i of E V 1 and their constraints can be explicitly expressed, there is no information loss and every charging trajectory of E V 1 can be realized with u ch,i and u dch,i without any other hidden costs or energy losses.
From (51) follows that result of floor operator in (1) and ( 2) is the same for E V 1 and E V i .Since k a,1 = k a,i and k d,1 = k d,i it is also k c,1 = k c,i and k r,1 = k r,i .□

Manuscript received 6
July 2022; revised 22 February 2023; accepted 25 May 2023.Date of publication 22 June 2023; date of current version 4 October 2023.This work was supported in part by the European Union from the European Regional Development Fund via Operative Program Competitiveness and Cohesion 2014-2020 for Croatia within the project Dynamic Predictive Health Protection of an Electric Vehicle Battery (EVBattPredtect) under Contract KK.01.1.1.07.0029 and in part by the Croatian Science Foundation (HRZZ) through the Young Researchers' Career Development Project-Training New Doctoral Students under Contract DOK-2018-09-5161.The Associate Editor for this article was R. Arghandeh.(Corresponding author: Marko Kovačević.)

Fig. 1 .
Fig. 1.The proposed concept of aggregated population prediction using machine learning and charging scheduling of individual electric vehicles.The paper is focused on two steps, marked with dashed green lines.The corresponding arrows from left to right denote Algorithm 1 and Algorithm 3 of this paper, respectively.

Fig. 2 .
Fig. 2. Visualisation of envelope of feasible charging powers and charging states for a vehicle connected to the charging point, where k c and k r are auxiliary characteristic discrete-time instants defined in subsection II-A.
are as follows: c pp = 0.116 e/kW, c res = −0.0162e/kW, c act = 0.065 e/kWh, c batt = 0.226 e/kWh.Vector of day-ahead prices c da is shown in Fig. 6.Discretization time is T = 15 min and recuperation period is T r = 24 h.Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

Fig. 7 .
Fig. 7. Computational times of the optimization problem (38) for the original and the reconstructed EV population.

Fig. 8 .
Fig. 8.Comparison of optimal daily operation cost for one-day populations from datasets a) CalTech, b) JPL.

Fig. 9 .
Fig. 9. Reserved regulation power for the considered time intervals per day in one week.

Fig. 10 .
Fig. 10.A qualitative example of two populations (a), (b) with the same representation using the aggregated battery model (c) and the proposed method with vectors P a , P c , P r , P d and P const (d).

Fig. 11 .
Fig. 11.Comparison of the original and the reconstructed population sizes.

TABLE I SET
OF PARAMETERS DESCRIBING AN INDIVIDUAL EV (EV CHARGING SESSION)

TABLE III STATISTICAL
COMPARISON OF THE RECONSTRUCTED J AND THE ORIGINAL J ′ , WHERE • DENOTES MEAN VALUE AND (•) STANDARD DEVIATION

TABLE IV STATISTICAL
COMPARISON OF THE RECONSTRUCTED P res AND THE ORIGINAL P ′ res , WHERE • DENOTES MEAN VALUE AND σ (•) STANDARD DEVIATION experimental proof of the main hypothesis can be seen in Fig 8., Fig 9., Table III and IV altogether.

TABLE V EXPLICITLY
GIVEN PARAMETERS OF THE RECONSTRUCTED E V 2 AND E V 3 second member can be recognized as parts of the capacity C 1 which are the multiplier of P nom,1 * T and the remaining part, respectively.