Stochastic load profile generator for residential EV charging

Electric vehicle (EV) charging loads have an impact on the power grid, but also represent a potential for energy flexibility. There is a need for EV data to evaluate effects on the power grid and optimal EV charging strategies. A stochastic bottom-up model is developed for residential EV charging, taking outdoor temperatures into account. The model input is based on real-world data from residential charging in Norway. The load profile generator provides hourly load profiles for any number and combination of small and large EVs, assuming immediate charging after plug-in. It is found that the model generates realistic load profiles for residential EV charging, reflecting today’s charging patterns. Data generated can be used for load and flexibility simulations for residential EV charging.


Introduction
The worldwide use of EVs is increasing rapidly (IEA, 2021).EV charging loads may have a severe impact on the peak loads in the power grid, however charging of EVs also represent a potential for energy flexibility (Gonzalez Venegas et al., 2021).When evaluating effects on the power grid and optimal EV charging strategies, knowledge is needed on EV charging habits, load profiles and flexibility potential (Calearo et al., 2021).However, the availability of such real-world EV data is scarce (Calearo et al., 2021).Norway had a 75% sales share of EVs in 2020 (IEA, 2021), and EVs are becoming the major car choice of the population.The main locations for EV charging are at home and work, where the charging power is limited by the charge points (CPs) and the AC onboard charger in the EVs.The number of CPs is increasing in Norway, with 3.6 to 7.4 kW as typical charging power limitations (Figenbaum & Amundsen, 2022).EV charging habits have a sporadic nature, with e.g.varying plug-in/plug-out time, weekly charging frequency, and energy charged per charging session.Several CP operators (CPOs) provide charging reports to their users, with information on the individual charging sessions.Such CPO reports have formed the basis for recent research on residential charging habits, load profiles and flexibility potential (Sørensen et al., 2021a).It is found that EV load profiles also depend on the characteristics of the EV, such as onboard charging power and battery capacity (Sørensen et al., 2022).EVs with a smaller charging power and battery capacity tends to be charged more frequently, and have a lower annual charging need, compared to EVs with larger capacity values.The flexibility potential is related to the noncharging idle time of the charging sessions, when the EV is connected to the CP without charging, thus potentially offering smart charging or Vehicle-to-grid (V2G) services.High charging power, frequent connections, and long connection times are positive elements for reaching a high flexibility potential (Sørensen et al., 2022).It can be challenging to access quality time series with residential EV data and load profiles.In some situations, there is an advantage to use a model to generate stochastic load profiles, compared to analysing original EV data and load profiles directly.A stochastic load profile generator can provide load profiles for any number of EVs, and with EV parameters for different types of EV fleets.In addition, local parameters can also be taken into account, such as climate or traffic data.Several studies have been carried out to model the stochastic nature of EV charging, where the probability distributions are typically based on factors such as driving distances, plug-in/plug-out times, and start state of charge (SoC) estimations.Fischer et al. (2019) presented a stochastic bottom-up model to assess EVs' impact on load profiles at different parking locations.Influencing factors and probability distributions were identified, based on analysis of a German mobility dataset, with e.g.driven distances, driving and parking durations.The model outputs were presence at a CP and its corresponding electricity demand.Ayyadi et al. (2019) applied probability distributions for driven distances and plugin/plug-out times by using Monte Carlo simulations.The probability distributions were based on a driving behaviour survey with GPS data in China.Other studies model energy charged instead of driven distances and SoC.Flammini et al. (2019) analysed real-world EV data from public CPs in the Netherlands, based on data similar to the CPO reports used in our work.The researchers provided probability distributions for plug-in/plug-out times, connected, charge and idle times, and energy charged per charging session, by applying a Beta Mixture Model approach.This paper presents a stochastic load-profile generator for residential EV charging.The methodology used is similar to the approach presented by Fischer et al. (2015).The methodology is improved by including outdoor temperature as an explanatory variable, since a dependency is identified between energy charged and outdoor temperature.The contributions of the paper are: 1) The model is based on information typically available in CPO reports in Norway, reflecting real charging patterns in Norway.
2) The generator provides hourly charging load profiles for individual or aggregated EVs, where the charging happens at private CPs, located at the residents own parking spaces.
3) The hourly charging loads are generated for a full year, and can be used as input in EV load and flexibility simulations.4) The composition of an EV fleet can be defined in the generator, including "small" EVs, "large" EVs, or a mix of EV types.Such distinguishment makes it possible to generate load data for the current EV fleet in a certain location, as well as future EV fleet composition scenarios.

Data CPO reports for residential EV charging
The load-profile generator is developed based on data from residential charging in Risvollan, Norway, with 5466 charging sessions from residents using 56 private CPs (Sørensen et al., 2021a;Sørensen et al., 2021b).The number of CPs are increasing during the period, from zero in December 2018 to 56 in January 2020.Each charging session includes the following data: user ID, plug-in and plug-out times, connection time, and charged energy for each charging session.Risvollan housing cooperative (lat. 63.39470, long. 10.43028) is located approx.4 km from Trondheim city.In our paper EV charging is in focus, but also other energy analyses from the apartment buildings are available in Sørensen et al. (2019a;2019b;2019c).

Outdoor temperature dependency of EV charging
The vehicle range of EVs is reduced in cold temperatures, e.g.due to the heating the EVs cabin (Al-Wreikat et al., 2022).Due to the sporadic nature of EV charging, long time series are advantageous for identifying whether charged energy per user ID may be influenced by outdoor temperatures.For the studied data series, only 7 of the 56 user IDs have a full year data period.Figure 1 shows weekly charging need and average outdoor temperatures for six of these EV users (the 7 th user has few sessions).
The stochastic character of EV charging is clear in the figures.Still, for some users and periods, a temperature dependency is visible.Pearson's correlation coefficient (Maechler, 2022) is calculated , for weekly charging need and outdoor temperatures during week 10 to 52.The three users with highest correlation values (TRO_R_AsO2-1, TRO_R_Bl2-1, TRO_R_Bl2-2)", have correlation coefficients from -0.46 to -0.27 (with p-values from 0.002 to 0.091), which indicate a correlation.For the three remaining users the correlation is weak, with p-values from 0.5-0.7.
Figure 1: Real weekly charging need and average outdoor temperatures for six EV users.Classifying EV user types for the user IDs Each EV user ID in the dataset is classified as a "small" EV or a "large" EV depending on the maximum charged energy per session (which is a proxy for the battery size of the car).If < 25 kWh, the user is classified as a "small EV", and if > 25 kWh as a "large EV" (see overview in Table 1).The battery threshold value of 25 kWh is determined based on EV market information (Sørensen et al., 2021a), where most EVs with smaller batteries are either plug-in hybrid EVs (PHEVs) or earlier models of battery EVs (BEVs), which often have onboard charger capacity of about 3.6 kW.Newer BEVs normally have larger battery capacity > 25 kWh, and onboard charger capacity of at least 7.2 kW.The maximum average charging power per user ID is evaluated, as shown in Figure 2. Based on this, an average charging power of either 3.6 kW or 7.2 kW is allocated to each of the user IDs.For the allocation it is assumed that at least one session per user ID is ended before the EV is fully charged, as described in Sørensen et al. (2022).

Overall description of the EV load profile generator
The stochastic bottom-up model is developed in Westad (2021), and simulates hourly load profiles for individual EVs during a year, assuming immediate charging after plug-in.Any number of EVs can be simulated by the model, with a specified share of "large" or "small" EVs, referring to the charging power and battery sizes of the cars.In addition to the hourly load profiles for each EV user, the plug-in and plug-out time, charged energy, and non-charging idle hours are provided.Based on the individual load profiles, aggregated load profiles are created.An illustration of the process for generating EV load profiles is shown in Figure 3, while Table 2 lists the probability distributions, model parameters, variables used, and model outputs from the load profile generator.
The model is written in the Python programming language (Python Software Foundation, 2022).

Identifying probability distributions
The load profile generator uses 4 stochastic parameters for each user ID and day: 1) weekly charging frequency, 2) charging need per session, and 3) plug-in and 4) plugout time of session.The flow chart in Figure 4 shows how the stochastic model parameters are obtained from the identified probability distributions based on the dataset.Several probability distributions were evaluated in the process, and a Kolmogorov-Smirnov test was used to estimate the goodness of fit between the data and the tested distributions, to find the best-fitted distribution for the stochastic parameters.A selection of the chosen probability distributions is shown in Figure 5 -Figure 6.

1) and 2) Weekly charging frequency and charging need per session:
In the profile generator, the weekly charging frequency is limited to maximum one plug-in per day, for simplification.In the dataset, 74% of the charging sessions happen during weeks with maximum 7 plug-ins, if removing possible faulty sessions (energy charged < 1 kWh and 1 user Bl2-5).As shown in Figure 5a, EVs classified as "small" has higher plug-in frequencies than the large EVs, due to their smaller battery sizes.The distribution for charging needs per session depends on both the EV type, and the weekly charging frequency, as shown in Figure 5b-c  3) and 4) Plug-in and plug-out times of session: The plug-in and plug-out times are only dependent on the type of day (workday/Saturday/Sunday).A combination of different distributions was necessary to describe the plugin and plug-out times, since they do not fit well with a single distribution, as illustrated in Figure 6a-e.The plug-in and plug-out times are found by first randomly drawing which distribution to use, and then randomly drawing a daily hour from this distribution.The plug-in time is separated by type of day only, while the plug-out time during workdays is additionally related to the plug-in time.The distributions for plug-in times are identified for the following groups "Early and late-night (0-6)", "Early morning (6-9)", "Late morning (9-12)", "Early afternoon (12-15)", "Late afternoon (15-18"), "Early evening (18-21)" and "Late evening (21-23)".When the plug-in day is a Friday, Saturday or Sunday, the plug-out time is related to the day of the plug-in, not the hour since there is less data available for these days.

Other parameters
Connection time limitation: In the generator, connection time is limited to a maximum of 24 hours, for simplification.Less than 1% of the charging sessions in the data are connected for longer than 24 hours.Since the generator assumes EV charging immediately after connection, this simplification will normally not affect the charging load results.However, the simplification may underestimate the generated non-charging idle times.In addition, the connection time one day may be limited by the plug-in time the next day, since there are no requirements of minimum time between charging sessions.For the sessions connected long enough, charging will continue until the charged energy is equal to the energy need.When this is not the case, charging will last the entire connection duration of maximum 24 hours.Outdoor temperature dependency is included in the generator.The intention was to use the real-world data to calculate the dependency, however since the data period is relatively short and knowledge on driving ranges were lacking, the scaling factor is based on a temperaturedependent driving range estimation for Nissan Leaf EVs (Nissan, 2022), which per March 2022 is the most sold EV in Norway (Edvardsen, 2022).The reference temperature is set to 5°C, since this is the average temperature for the data period.Charging need per session is multiplied with a scaling factor, as shown in Figure 7.

Model Mathematical equations
The mathematical equations of the generator are expressed in equation 1-7.The connection duration (equation 1) is a result of the plug-in and plug-out times.
The hourly load profile (equation 2) depends on the maximum charging power level for the EV, and whether the EV is charging (equation 3).For the remaining charging need at each hour, the calculation depends on whether the EV is connected overnight, meaning that  ,  +  , ≤ 24 and  ,  >  ,  .
When the EV is not connected overnight (equation 4), the remaining charging need is expressed by the session charging need, and if the EV is connected (equation 5

Generating load profiles
To illustrate the output from the load generator, hourly load profiles for a whole year are simulated for 1000 EVs.Three scenarios are investigated, each with a different mix of user types: 1. "BASE": the mix of "small" and "large" EVs types and charging power are identical to the original data (ref. Table 1), 2. "LOW": "small" EVs only, 3.6 kW charging power, 3. "HIGH": "large" EVs only, 7.2 kW charging power.The Root Mean Squared Error (RMSE) is used to evaluate the performance, comparing the original data with BASE.

Coincidence factors
Coincidence factors are used to calculate the simultaneous demand of several customers, while coincident peak demand describes the maximum demand for a group of customers during periods of peak system demand (Dickert & Schegner, 2010).To investigate the coincidence factor  and peak load  max per EV for an increasing number of EVs, a fleet of 100 single load profiles is used.By drawing n single load profiles from this fleet, the aggregated load profile is found   sum () = ∑  ,  =1 , and the coincidence factor c(n) and average individual peak load  max,avg () are calculated using equation 8 and 9.This is done for n = 1, ..., 50.The procedure is repeated 50 times for each n, and the maximum, minimum and mean results are collected.

Aggregated load profiles
Load profiles are simulated for 1000 EVs, where the EV mix is either BASE, LOW or HIGH.Table 3 presents the main results for the three EV scenarios and for the original data.The values for the BASE case are closest to the original data, which is as expected since this scenario reflects the original mix of EV types.The annual charging need is about 2500 kWh for BASE, and is 25% higher for HIGH compared to LOW.This can be explained by higher energy demand for larger EVs and/or longer annual driving ranges.However, the difference may also be influenced by the model limitation of maximum one charging session per day, since "small" EVs are more affected by this simplification.The EVs in LOW charge 1.7 times more frequent and about half the amount of energy per session, compared to HIGH.Charging time and non-charging idle time are part of the output for each user, making it possible to analyse EV flexibility potentials.The BASE value for average idle time per week is 32.2 hours, considerably lower than in the original data of 42.4 hours.This can most likely be explained by the limitations of maximum one charging session per day, and maximum 24 hours connection time.
Since HIGH has fewer weekly charging sessions compared with LOW, the weekly connection time is also shorter.HIGH needs less time to charge, but the non-charging idle time is still shorter than for LOW and BASE.However, the potential to move the charging in time is higher for HIGH, due to the increased charging power: 139 kWh idle energy capacity per week for LOW compared to 173 kWh per week for HIGH.
The average daily load profiles per EV user are shown in Figure 8.In all three scenarios, the average daily peak load occurs between hour 17 and 18 on workdays, between hour 18 and 19 on Saturdays, and between hour 19 and 20 on Sundays.This is in line with the original data (Sørensen et al., 2021a) as shown in Figure 9, and also similar to average daily load profiles analysed for other residential locations (Sørensen et al., 2022).A 95% confidence interval is shown in the figure, where the original dataset, with n = 18 to 56 EV users, has a greater variability than the BASE scenario, with n = 1000 EV users.This is in line with general expectations, that larger samples would produce a narrower confidence interval.However, a dependency between charging need and type of day is indicated in the data.Especially Saturdays stand out, with about 15% lower charging need compared to the other days.This dependency is not included in the generator, resulting in a similar charging need for all type of days.

Effect of the outdoor temperature dependency
Figure 10 shows aggregated hourly charging need versus outdoor temperatures for the BASE scenario during a full year.Figure 11 illustrates an example winter week (average temperature of about -10°C) and an example summer week (average temperature of about 20°C).Due to the temperature dependency, the charging need increases with a factor of about 1.6, assuming similar user behaviour.(Dickert & Schegner, 2010).Figure 12 shows minimum, mean and maximum coincidence factors and peak load per EV for an increasing number of EVs in the BASE scenario.In Figure 13, mean coincidence factor and peak load values are shown for all the three scenarios.The figures show how the peak load per EV user is stabilizing with an increasing number of users.Assuming charging immediately after plug-in, the peak load per EV is descending towards 1.4 kW in BASE, 1.3 kW for "small" EVs (LOW), and 1.9 kW for "large" EVs (HIGH).

Conclusion and Further work
A stochastic bottom-up model is developed for residential EV charging, taking outdoor temperatures into account.The generator is based on data from residential charging in Norway, with 5466 charging sessions from 56 private CPs.The EV load profile generator provides hourly load profiles for any number and combination of "small" and "large" EVs, assuming immediate charging after plug-in.The data generated can be used for e.g.load and flexibility simulations for residential EV charging.Load profiles are simulated for 1000 EVs, where the EV mix is either BASE (reflecting the dataset mix), LOW ("small" EVs only) or HIGH ("large" EVs only).For the BASE scenario, the charging need is about 2500 kWh per year, which is in the range of the original data.Comparing the LOW and HIGH scenarios, the EVs in LOW charge about 25% less energy on an annual basis.The EVs in LOW are charged more frequently than in HIGH (1.7 times), but charge less energy per session (0.5 times).The potential to move the charging in time is higher for HIGH, due to the increased charging power.Coincident peak demand is an important factor in grid dimensioning, and is calculated for the three mixes of user types, with the number of EVs increasing from 1 to 50.Assuming EV charging immediately after plug-in, the average peak load per EV is descending towards 1.4 kW for BASE, 1.3 kW for "small" EVs, and 1.9 kW for "large" EVs.It is found that the model generates realistic hourly load profiles for residential EV charging, reflecting today's charging patterns.The results illustrate how charging habits and load profiles depend on the EV type, and how this affect coincidence factors and coincident peak demand.It is our intention to further improve the EV load profile generator.Prospects for future works include: • Creating new probability distributions based on a larger dataset, to make the model more robust and reflect a more general situation.• Considering improvements in the EV load profile generator, e.g. to include a dependence between energy charged and type of day; to allow more than one charging session per day; to allow the connection time to be longer than 24 hours; to include a dependence between plug-in and plug-out time also for plug-ins Friday, Saturday or Sunday; to add a minimum period between two charging sessions, e.g. based on a statistical dependence between previous plug-out time and the new plug-in time.
• Improving the temperature dependency based on real data, possibly with a difference between "small" and "large" EVs.Considering how other seasonal factors impact the scaling factor, such as season dependent tyres, driving habits, cabin and battery preheating, and user behaviour.• Differentiate between holiday periods or special days.
• Characterizing the EV charging sessions and their energy loads as flexible or non-flexible, depending on the duration of the non-charging idle times.• Improving the characteristics of EV types and adding hourly battery SoC to the output data, based on methods in Sørensen et al. (2022).• Considering if hourly local traffic density should be included as a possible input from the generator user, since correlation is found between plug-in/plug-out times and local hourly traffic (Sørensen et al., 2021a).

Figure 2 :
Figure 2: Maximum average charging power per user ID, and their allocation to a charging power level.

Figure 3 :
Figure 3: Process for generating EV load profiles.Table 2: Probability distributions, model parameters, variables, and outputs from the load profile generator.

Figure 4 :
Figure 4: Detailed flow chart for obtaining stochastic model parameters in the load profile generator.1) and 2) Weekly charging frequency and charging need per session: In the profile generator, the weekly charging frequency is limited to maximum one plug-in per day, for simplification.In the dataset, 74% of the . a) Weekly charging frequency b) Charging need, small EVs c) Charging need, large EVs

Figure 5 :
Figure 5: Probability distributions used in generator for weekly charging frequency and session charging need.
a) Plug-in time workdays b) Plug-in time Saturdays c) Plug-in time Sundays d) Plug-in related plug-out time workdays e) Plug-in related plug-out time Saturdays

Figure 6 :
Figure 6: Probability distributions used in generator for plug-in and plug-out times.Other parametersConnection time limitation: In the generator, connection time is limited to a maximum of 24 hours, for simplification.Less than 1% of the charging sessions in the data are connected for longer than 24 hours.Since the generator assumes EV charging immediately after connection, this simplification will normally not affect the charging load results.However, the simplification may underestimate the generated non-charging idle times.In addition, the connection time one day may be limited by the plug-in time the next day, since there are no requirements of minimum time between charging sessions.For the sessions connected long enough,

Figure 7 :
Figure 7: Scaling factor for temperature dependency of charging need, with reference temperature 5°C.
Figure 9 also shows the RMSE for each hour of the day, comparing the original dataset with the BASE scenario.Smaller RSME values indicate higher accuracy.The average error is 0.18 kW/user.

Figure 8 :
Figure 8: Daily average EV load profile per EV user for three scenarios of EV user types.(unstacked)

Figure 10 :
Figure 10: Hourly EV load profile per EV user for BASE scenario versus average daily outdoor temperatures.

Figure 11 :
Figure 11: Example weeks Winter (January) and Summer (July): EV load profile per EV user for BASE scenario versus average daily outdoor temperatures.

Figure 12 :
Figure 12: Coincidence factor and average peak load per EV for an increasing number of EVs.BASE scenario.

Figure 13 :
Figure 13: Mean coincidence factor and average peak load per EV.All three scenarios.Coincidence factors Coincidence factor and coincident peak demand are important factors in grid dimensioning (Dickert &

Table 1 :
Classification of EV types for dataset user IDs. 3.

Table 2 :
Probability distributions, model parameters, variables, and outputs from the load profile generator.

outputs from the generator
• EV user type (Small EV, Large EV) • Charging power per user (3.6 kW, 7.2 kW) • Plug-in time each day for a year (1...24) • Plug-out time each day for a year (1...24) • Connection time each session • Energy need per session • Connection profile per hour for a year • Charging profile per hour for a year • Aggregated charging profile for a year

Table 3 :
Main results for dataset and three scenarios.