Simulation of Electric Vehicle Charging Stations Load Profiles in Office Buildings Based on Occupancy Data

Transportation vehicles are a large contributor of the carbon dioxide emissions to the atmosphere. Electric Vehicles (EVs) are a promising solution to reduce the CO2 emissions which, however, requires the right electric power production mix for the largest impact. The increase in the electric power consumption caused by the EV charging demand could be matched by the growing share of Renewable Energy Sources (RES) in the power production. EVs are becoming a popular sustainable mean of transportation and the expansion of EV units due to the stochastic nature of charging behavior and increasing share of RES creates additional challenges to the stability in the power systems. Modeling of EV charging fleets allows understanding EV charging capacity and demand response (DR) potential of EV in the power systems. This article focuses on modeling of daily EV charging profiles for buildings with various number of chargers and daily events. The article presents a modeling approach based on the charger occupancy data from the local charging sites. The approach allows one to simulate load profiles and to find how many chargers are necessary to suffice the approximate demand of EV charging from the traffic characteristics, such as arrival time, duration of charging, and maximum charging power. Additionally, to better understand the potential impact of demand response, the modeling approach allows one to compare charging profiles, while adjusting the maximum power consumption of chargers.


Introduction
The transport sector is responsible for almost a quarter of worldwide total CO 2 emissions, while about three quarters of these emissions are attributable to cars and trucks. According to the IEA report, car ownership, trucking activity, and air travel would increase substantially by 2050 [1]. Appropriately, the IEA expects the energy use to increase by 70%, and greenhouse gas emissions to increase by 50%, if no new policies are introduced [2]. Besides promoting the climate change, the increasing number of combustion engine vehicles adds to the problem of airborne particle pollution. According to WHO report, it already affects the health of more than 90% of the world's population [3]. Thus, one of the challenges is to enable mobility without accelerating the climate change and prevent adding up to the already existing pollution problem [4]. Due to absence of emission during operation, Electric Vehicles (EVs) have become a promising technology that offers practical reduction of the CO 2 emissions and air pollution if the increased power demand necessary to charge EVs is sustainable. To successfully implement the solution and maximize the technological advantage, it requires a multilevel approach that involves car manufacturers, car owners, building owners, and power system authorities to collaborate. EV deployment has been growing rapidly over the past ten years. The global stock of EV passenger vehicles passed 5 million in 2018, with an increase of 63% since 2017, and the rising trend continues. At the same time, there is also a growing trend of installation of EV charging points. Charging infrastructure follows the EV trend. In 2018, according to IEA in the global EV outlook, the number of charging points was estimated to be 5.2 million, which is 44% more than in 2017, where 90% were in the private sector [5].
A large number of Electric Vehicles (EVs) and the growing trend in installation of EV charging points may create more challenges for electrical power system. The EV charging patterns are stochastic due to uncertainties in the travel behavior of each individual driver and charging preferences. Coupled with increasing share of Renewable Energy Sources (RES) in the generation mix and their intermittent nature, large-scale EV charging can lead to grid overloading, especially during the peak loading hours [6][7][8]. With well-designed incentives for EV users and charging service providers, EVs may be used as flexible loads that help to mitigate the load variations and peak demand in the power system [8].
Previous research supports the importance of conducting EV modeling, investigating EVs and the related impact on the electric power system. Reference [9] proposes an optimization model for determining the capacity of RES, while utilizing EVs with other sources to capture fluctuations of RES. Reference [10] utilizes Support Vector Regression (SVR) approach to create a charging load forecasting model based on various historical data. Reference [11] describes a model that forecasts the daily load profile of EV charging stations in commercial building premises. Reference [12] models power profiles using a variational auto-encoder. The research emphasizes that peak load will rise due to uncontrolled charging of EVs [13][14][15][16]. If it is possible to impact the charging behavior, using different charging strategies, this flexible capacity could be used to keep the grid stable with an increased amount of variable renewable energy. With higher penetration of EVs, their batteries in an aggregate become a flexible capacity in the power system [8]. This is an opportunity to use them as individual and flexible loads which may be considered for grid-support to mitigate load variation and load peaks. Reference [17] describes how various EV charging strategies can help to reduce the peak demand and improve system load factor. If there are well-designed incentives for EV users to take part in grid-support, the value of driving an EV and having EVs in the electrical system increases. The opportunity of using EVs as grid ancillary services was studied in [18][19][20][21][22]. While modeling approaches in the literature focus on modeling average hourly power profiles, modeling the demand-side management and demand response events requires minutes or even seconds resolution. For example, the technical requirements for participation in the frequency containment reserve in Finland require the activation time of the reserve from sub-minute values to 3 min, depending on the type of the reserve [23]. Taking into consideration that aggregated EV load is an intermittent and a stochastic source of flexibility, new data-driven modeling approaches require smaller resolution for modeling of power profiles.
The present article is prepared for a special issue on the subject of load modeling in power systems, where the general theme is modeling of loads in the context that includes analysis and control of existing electricity supply networks and future "smart grids", at all voltage levels and in a variety of applications. Applications include measurement-based and component-based load modeling approaches, modeling and representation of aggregate loads and evaluation of their impact, load modeling in related "smart grid" applications, e.g., demand-side management and demand-response schemes, functionalities, and services.
This article presents a modeling approach that allows one to use EV charger occupancy data for simulation of load power profiles. In the context of analysis and control of existing electricity supply networks, the current approach allows one to extend the existing modeling methods by creating seconds resolution load profiles of EV charging infrastructure, while utilizing the data straight from the service provider and mapping the possible expectations of load profiles during the demand-side management and demand response events. It is used to model various charging scenarios, e.g., with an increasing charging demand in the future it helps finding the necessary number of chargers and the peak load with the corresponding number of daily events, or use it on historical data obtainable from the local service provider. This is important to the building owner, as it is necessary to understand the approximate charger demand and peak power demand to be able to carry out a decision on, e.g., upgrading the charging infrastructure. Simulating scenarios of using EVs as a flexible load for mitigation of load variation and load peaks by reducing or increasing the maximum charging load in the charging infrastructure allows one to showcase the pros of EVs as a flexible load and a necessity of a robust charging infrastructure, which implicates larger levels of EV penetration. Object-oriented design of the simulation tool allows one to incorporate real data, zoom in, and find possible bottlenecks in the availability of the service on standalone chargers. Aggregators and flexibility service providers want to understand the implications of adjusting the available charging power on the probability of having enough available procurement for delivery in DR events. It is beneficial to prepare a set of scenarios before creating a pilot to have expectations about the aggregate load and individual or collective response.
The remainder of the article is organized as follows. Section 2 describes the types of EVs, relevant for modeling parameters, field EV charging data, and the modeling approach of the EV charging power. Section 3 presents the modeling results. Section 4 discusses the implications of utilizing the modeling approach for creating scenarios of EV profiles during the demand response (DR) events. It also discusses the bottlenecks for extending the research, as well as the future research directions. Section 5 provides the link to the source code for possible updates and documentation.

Methodology
Electric vehicles can be mainly subdivided into plug-in electric vehicles (PEVs), hybrid electric vehicles (HEVs), and plug-in hybrid electric vehicles (PHEVs). PEVs have an electric motor and a battery that can be recharged from the power grid. HEVs have both an electric motor and an internal combustion engine; however, the battery cannot be charged from the grid, while the combustion engine recharges it. PHEVs have both an electric motor with a battery that can be externally charged from the grid and, additionally, a combustion engine [8]. The original dataset described the PEV and PHEV arrival times and charging duration; however, the available electric vehicle parameter data describes only PEVs; thus, in this simulation, we used only PEVs, which, in the rest of the article, are denoted as simply EVs.

Electric Vehicle Parameters
EV power consumption depends on battery temperature, utilizing of heating, ventilation, driving speed, road friction, etc. [4], and battery utilization requires regular charging. Charging is carried out by connecting the EV to the power grid through an off-board EV charging station, and additional charging happens through regenerative breaking. Perhaps the most popular option for charging is charging at home. It is practical because majority of people do not use their cars at night and it is easy to charge it for the next day [24]. Additional economic incentive is the cheaper electricity tariff during the night [25]. Otherwise, there is an expanding possibility to charge in public places, such as business premises, universities, hospitals, shopping malls, among others [11]. Adequate investments in charging infrastructure are necessary to make EVs a practical alternative to internal combustion engine cars [4]. According to Reference [26], the lack of EV charging infrastructure is one of the most critical barriers to successful deployment of EVs at a large scale. In addition, charging strategies play an important role in the effectiveness and sustainability of EVs. Following the growing trends of EV vehicles and charging facilities [5], with high levels of penetration, uncontrolled charging of large EV fleets may coincide with the peak power demand [4,[27][28][29]. Uncontrolled charging may lead to phase imbalances, current harmonics, and transformer and fuse failures in the distribution system [4,30]. One solution besides reinforcing the distribution grid is to manage the EV load optimally to avoid the negative impacts. For example, it may help to schedule the time intervals where probable charging peak coincides with the peak load in the power systems and reduce the charging power or the number of available chargers in the area, while EV owners may benefit from cheaper electricity [4,31]. In further text, it is referred to as a demand response (DR) event.
EV charging power is determined by several factors, such as: battery voltage, maximum current, number of available phases, and maximum allowed power of the charging pole. Potentially, there also might be further limitations, for example, the total combined charging power of all charging poles in the area, such as building premises, might be capped. In Finland, the phase voltage is 230 V. Thus, the charging power is about 3.6 kW and 7.4 kW for single-phase charging with 16 A and 32 A, respectively. Charging power is about 11 kW and 22 kW for three-phase charging with 16 A and 32 A, respectively [4].
According to Reference [32], currently, the distribution of EVs and plugin hybrids in Espoo municipal area in Finland is 19% and 81%, respectively. The distribution of the most common EVs in the area is adapted from Reference [33] and presented in Table 1, as well as the maximum values for AC charging power, battery capacity, and charging times. The names of the models and manufacturers are omitted. Maximum charging power and the share in the EV mix is used during the modeling process. Occupational data utilized during the modeling was gathered from a university campus area in Otaniemi, Espoo, Finland. At the moment, there are five publicly available charging places for EVs. Of these places, three have just two chargers, one has four chargers, and the other has eight public charging spots. All of the spots have the chargers installed with the maximum charging power capped at 11 kW. With the introduction of charging-time-based pricing some time ago, the maximum available charging power was changed from 22 kW. As a result, the use of the charging facilities by hybrids decreased substantially.
The original dataset included the following parameters: • Charging duration • Transaction energy • Timestamps of charging event start and stop Since there was no information provided that would reflect the unique identifiers for EVs, it was not possible to track individual EVs in between the campus charging stations and implement spacial coefficients between them. Thus, the data was used to prepare the probability distributions of the charging start hour and duration. Figure 1 presents a distribution of charging duration after removing the outliers for weekdays and weekends, respectively. The duration value is a difference between two timestamps when the car was first connected to the charger and then disconnected from it. Thus, the reason for removing the outliers from the dataset is to remove obviously flawed data points where the vehicle occupied the charger for an improbable time larger than the cars maximum battery charging time from Table 1.  Figure 2 depicts the distribution of a charging start hour for weekdays and weekends in the dataset. The data shows that there is a difference in the charging starting hours during the weekend, which is mostly shifted by several hours during the weekend. Figure 3 depicts the distribution plot of transaction energy for weekdays and weekends, where the difference is less obvious: weekday mean is 8.9 kWh, and weekend mean is 7.6 kWh. Main parameters that are used during the simulation modeling are drawn values of the charging start hour and the duration of charging, depending on the day type. The following subsection elaborates how these parameters fit in the simulation model.

Modeling of EV Charging
The article presents a modeling approach which produces power profiles and impact of DR events on the peak power consumption of an aggregate of EV chargers. The approach is based on deriving parameters from distributions of the arrival time and the duration of charging, depending on the day type. In the contrast to the majority of the studies about EV charging power this data does not include prior knowledge about the state of charge (SOC) of the vehicle. Due to the present communication protocols between EVs and chargers, this parameter is not communicated during charging between the EV and the charging station. Thus, it is unavailable in the most datasets. In the presence of the described parameters, it is not as relevant to the objective of modeling power consumption profiles of aggregated chargers.
The simulation approach can be subdivided into two parts. Figure 4 depicts the first part of the simulation, where we set the simulation parameters and create the relevant simulation objects, such as building chargers, EVs, and charging events. First, events are created where event parameters are derived according to the distributions specified in the data section. Each event is, essentially, an EV of a specific model, which arrives at a certain time to the charger and charges for a certain duration. When an event is created, the EV model is derived according to the distribution in Table 1. The selected model has a maximum charging power parameter which is later used during the simulation to create the power profile. After the EV model is selected for the event, the arrival time and the duration of charging are derived from Figures 1 and 2 with a specified day type. Next, the events are arranged into a timeline with seconds resolution, which is used in the simulation algorithm. The last preparation step prior to the simulation is creating a specified number of chargers. Each of the chargers has the maximum power, which is a constant value of charging power that it can provide to an EV at that particular time. The power profile of the charger at each time t will have a value smaller or equal to the charger maximum power. The next step is to execute the simulation algorithm depicted in Figure 5. Power profiles are in seconds resolution; thus, the algorithm has 86,400 iterations which result in a calculated a daily profile of power consumption. The algorithm starts by finding all of the free and the occupied chargers from a vector of all chargers C. It proceeds to check if there are any events starting at the time t, e.g., if there are any EVs willing to get charged. If such is the case, the algorithm checks if there is a free charger from the previously found vector O c to provide the charging service to the EV. If there are none, then the charging event is registered as an unsuccessful in the counter and the algorithm proceeds. Otherwise, the event is registered as a successful, the EV is assigned to a random free charger if there are more than one free in O c , and the charger instantaneous load is updated according to the Equation (1). P c k := P max_c , P max_c ≤ P max_ev P max_ev , P max_c > P max_ev , where P c k is the instantaneous load of charger k, P max_c is the charger maximum charging power, and P max_ev is the maximum charging power of the EV.
In case there were no events starting at the time t, the algorithm proceeds to deal with finishing events. It checks at each time t if there are any events that are finishing. If there are, the instantaneous load of affected chargers from vector F c is updated to 0 since they become unoccupied.
Once all of the instantaneous powers, P c , of all chargers are updated and set for time t, the algorithm fills (updates) the value of the power profile P k,t for each charger k at time t.

Modeling of Demand Response
We refer to a demand response event as the adjusting of the maximum charging power of chargers for a time interval, as measure opposite to the uncontrolled charging of EVs. When translated into the modeling approach, the simulation of Figure 4 would include additional steps, as presented in Figure 6. Essentially, DR events represent a signal that is sent to a specific charger or across all chargers which indicates the change in the charger maximum power. A DR event has its start time, duration and an adjustment coefficient for the charger maximum power. Thus, before arranging events into the timeline, the approach includes creating DR events. Figure 6 indicates these additional steps in color.
In turn, the addition of DR events would also affect the simulation algorithm, since now it needs to be aware of DR events that might take place and affect the charger maximum power. Figure 7 depicts the changes in the algorithm caused by the addition of DR events in color.
The absence of behavioral data when adding DR events to the simulation forces to make assumptions about an unknown parameter of how many charging events' duration gets affected by a DR event. The assumption in this work about potential EV owners behavior is that, with a changing maximum charging power during DR events, the owners can be subdivided in the following way:

•
Those who arrive at the charging premises strictly for a specific interval of time, thus, cannot afford staying longer than the initially derived duration of charging. This category of EVs can be referred to as 'time-based'.

•
Those who arrive at the charging premises for an indefinite interval of time and will charge their EV until it reaches its predefined target. This category of EVs can be referred to as 'energy-based'. Therefore, in an occasion of a DR event when the maximum charging power is affected, the 'energy-based' EVs charging event duration gets affected, as well. This happens when: where C P_DR is the maximum power coefficient from Figure 6. The described simulation model accommodates this with an energy counter, which is calculated from the initial duration of the charging. When the charging duration is derived prior to the simulation loop, the target of the energy charged for the car is saved in the event information, according to Equation (3).
where t ev is the initial duration of the charging, and P c k is the nominal charger load, selected according to Equation (1). Thus, the charging events ending time is offset until all of the energy is charged.

Results
The simulation approach allows one to simulate power consumption profiles for each of the chargers and their aggregate, as well as adjusting the charger maximum power and counting successful charging events. The results section illustrates how the simulation approach helps to visualize and plan the charging infrastructure, e.g., number of chargers and maximum charging power. Additionally, it allows one to model DR events to understand the consequences, such as the reduced power and the decrease in the level of service.

Simulating Various Number of Chargers
To show how crowded is the charging infrastructure in situations with various number of events and chargers, Figure 8 depicts the average values of successful events against the number of daily events for four sets of chargers: 2, 4, 8, and 16. The values are calculated over 100 iterations, which was selected arbitrarily. The mean percentage of successful events shows borders of the installed charger capacity event-wise, which could be used, for example, as acceptable levels of provided charging service.
The figure shows mean values for successful charging events and the 95% confidence interval of the mean value. The figure could be interpreted the following way. A building has two chargers in the premises, with 5 charging events per day it is possible to successfully service on average 80-90% of the vehicles with the current distributions of arrival time and charging duration as depicted in Figures 1 and 2. With a rising trend in EVs the building owner decides to install more chargers. Figure 8 shows that, if they would like to retain the 80-90% successful charging service level, to accommodate 10-15 EVs daily, they would require to double on chargers, while, to service 20-30 EVs daily, they would need to install 6 additional chargers.
Installation of infinite number of additional chargers is not possible in case there is not enough power capacity. Figure 9 depicts the mean values of maximum charger load for four sets of chargers for various number of daily events in 100 iterations.
For each set of chargers, after a certain number of daily events, the EV flow starts to be overwhelming for the installed capacity of chargers, and the increasing number of daily events causes the average maximum load to saturate and become asymptotic to the sum of the maximum charging power of the charger set. The simulation helps to identify the magnitude of the average maximum loads for various numbers of daily events. These should be taken into account when decisions about installation of new chargers are made from the point of view of technical specification, e.g., connection to the power source, selecting phases, etc.

Modeling Demand Response Events
We modeled a DR event as a reduction of maximum charging power of all building chargers by 30% for 1 hour from 10:00 to 11:00, the value of 30% was selected arbitrarily, while 10:00-11:00 is close to the power peak, which is the busiest time. The simulation algorithm described in Section 2.3 allows one to portray the effect of reducing charger maximum power by comparing the load profile in two situations. Figure 10 depicts the comparison of average power profiles with and without a DR event in 100 iterations for a building with 8 chargers with an average of 40 charging events per day.
Changing the chargers maximum available power affects those EVs that have their maximum charging power greater than the adjusted maximum value during DR. Figure 10 shows a clear reduction in the average power during the DR event. The quality of service is decreased and those users who were planning to get a strict amount of energy from the charging event will have to sacrifice more time, while those who cannot afford to wait would undercharge. Additionally, less EVs will be able to charge during that time.
The following two figures illustrate this by showing two simulated cases with a DR event when chargers maximum power is reduced by 30% for the duration of the event. The set has 8 chargers, 11 kW each, the duration of the event is 1 hour from 10:00 till 11:00. The figures feature various number of daily events, where in each time the probability of EV being time-and energy based was equal to 50%. Figure 11 depicts the the average power consumption during the time of the DR event (10:00-11:00) in cases when there is a DR event and when there is none. The figure additionally depicts the differences between the average values. The average power consumption grows until the number of daily events starts to be overwhelming, and the average power saturates towards the sum of the maximum available charging power. The average reduced power as a result of the DR event follows similarly. Figure 12 depicts percentage values of the successful events for the same simulation. The figure shows that, for a larger number of daily events, there starts to be a difference in successful charging. The impact is not large in percentage, because the simulated DR event is only 1 hour long, while the average charging time is 2 hours, and there are 50% time-based events. Thus, not that many events fit in the affected time bin, and the effect is limited. The decrease in the number of successful events becomes more prominent with more DR events, with larger duration of time intervals, with the increasing number of daily events and with a larger share of energy-based events. Figure 11. The effect of a DR event on the average value of power consumption during 10:00-11:00 for a building with 8 chargers of 11 kW each. DR event power reduction is 30% for 1 hour with 50 to 50% of time-and energy-based events, respectively. Black vertical bars indicate a 95% confidence interval of the mean value. The difference between bars mean values is presented on top. Figure 12. The effect of a DR event on the average value of successful charging events during the day for a building with 8 chargers, 11 kW each. DR event power reduction is 30% for 1 hour from 10:00 to 11:00 with 50 to 50% of time-and energy-based events, respectively. Black vertical bars indicate a 95% confidence interval of the mean value. The difference is presented on top.

Discussion and Conclusions
This article presents an algorithm that allows one to incorporate measured EV occupancy data for modeling EV charging power consumption. The proposed algorithm keeps track of successful charging events and allows one to compare various scenarios of charger configuration, e.g., number of chargers and number daily events. The main focus is on modeling the aggregated daily charger load profiles and comparing them with the load profiles during a demand response event when the maximum available charging power is reduced.
Modeling demand response (DR) allows one to peek into future scenarios of an abundance of EVs, to study the available flexibility of EV fleets, and to understand the necessity of installation of additional chargers and the building technical restraints in terms of the peak load across charging infrastructure. One of the main obstacles in the modeling of future scenarios is the uncertainty in EV owner behavioral patterns, e.g., how large of a group of EV owners permits their maximum charging power to diminish during charging in a public domain, such as in the office building. Another large obstacle is unavailability of EV vehicle labeling in the dataset, which constitutes the inability to model spatial coefficients, so that it is possible to take into consideration the geographical location of the charging infrastructure. With a large level of EV penetration, there is a corresponding growing trend in expanding the charging infrastructure, which would result in a more sophisticated relationship between the unavailable charger in the respective building and the possibility of an EV owner to charge the car at the neighboring building. Reference [34] showed that not only the utilization rate of the charging infrastructure depends on their geographical location but also the idle times. Idle time is the period when the EV is plugged in but not charging. The study concluded that utilization of charging stations at the residential level was the highest, followed by the utilization in the office buildings. Additionally, these locations showed the highest idle time. Reference [34] said that there was no specific penalty for the occupation of the charging station without charging. Our original dataset lacks idle time information, which would help to improve the understanding of how time-based payment system would affect the idle times.
We illustrated how the proposed algorithm can be utilized to understand if additional charger infrastructure is necessary, depending on the desired average percentage of successful events compared to the daily number of events. Modeling of DR events, e.g., adjusting the maximum allowed power consumption in a time interval, demonstrates that EV flow in coup with the existing charging capacity are the two main factors that affect the existing flexibility potential. Specifically, a larger charging infrastructure potentially provides the largest potential for power adjustment, however, requires an adequate flow of vehicles throughout the studied time interval. At the same time, a large number of daily events that restricts the maximum charging power decreases the number of successful chargings; thus, this ratio is a subjective preference of a building owner or a technical designer. Additional understanding of incoming EV flows is required to study the probabilities of EVs to be in place for DR events, so that aggregators can utilize that information during modeling process, for example, for the frequency containment markets. Perhaps one of the greatest obstacle is scarceness of available data and limited possibility to identify single EV units to create spatial models.

Materials and Methods
The proposed modeling approach was developed using Python, and the source code with full documentation and example code is available https://version.aalto.fi/gitlab/power_systems_ research_group_aalto/ev_charging_sim.