Impact of EV charging on the electric load of smart buildings and energy communities

—The paper presents the sizing and profiling of charging systems for electric vehicles integrated into a smart grid in the town of Campobasso, in Molise. After having described and examined the main variables that characterize the system, the work focuses on the profiling of the electrical power absorbed by the building and the loads deriving from the charging stations of electric vehicles. The intensive use of software (especially MATLAB) and databases available online has been essential for the analysis of the random and stochastic values of the model developed. 4 different scenarios are studied, varying according to the number of charging electric vehicles. These scenarios are analyzed for three different typical days of winter, summer and mid-season. The different scenarios are compared qualitatively and quantitatively through the introduction of specific KPIs, which indicate the value of the power and the energy consumption of each specific asset, as can be seen in the results. Finally, various hypotheses are proposed regarding the integration of a storage system and the shifting of electric vehicles charges, for a more efficient energy exchange between the building and the network.


I. INTRODUCTION
The concept of smart building and more generally the efficient and rational management in the use of energy is a topic widely examined especially in the last decade. In particular, the integration of electric vehicle charging systems in a real infrastructure is a technological solution that could allow an increase in the quality of life in the near future, leading to social, cultural, economic, industrial and energy benefits. The inclusion of charging columns for electric vehicles in the buildings of a city would also encourage the spread of plug-in or battery electric vehicles, which are becoming increasingly common in the automotive sector and leads to a decrease in the share of CO2 emitted into the atmosphere.
These advantages have therefore allowed the development of a growing involvement and participation by specialists and researchers, especially in recent years.
A smart building consists of an advanced integrated communication and energy distribution system that allows bidirectional integration with innovative systems that improve efficiency, reliability, stability, control and quality of service.
For optimized management it is necessary to take into account different distributed generation systems, which can also be of small size, as the case of the electric vehicles.
The installation of the charging station in the building can be carried out for private use (for the inhabitants of the building or for employees) or for public use, thus extended to all citizens.
In both cases, compliance with current legislation must obviously be ensured in all its aspects, with the charging columns supplied fully assembled and tested, guaranteeing maximum safety for users and vehicles. In addition, the models of charging columns chosen should be characterized by an easy and quick installation.
In addition to the legislative and construction aspects, particular attention must be paid to the energy aspects concerning this particular type of technology.
For this reason, an analysis that acquires particular importance is that aimed at modeling the loads that involve the EV's charging stations.
One of the fundamental steps to correctly carry out this type of analysis concerns the profiling of the single charging cycle of an electric vehicle. Thus, examples have been found concerning the characteristic of a lithium-ion battery (the battery most often used by manufacturers and builders of electric cars), in which the values of voltage and current are represented as a function of the state of charge [21,22,23].
In addition to the current and voltage trend, the power profile can be observed in [24], where the charging cycle of a Kia Soul is analysed.
Similar results can be found in [25,26] which show the charging profile of a Nissan lithium-ion battery having a maximum charging power of 7 kW.
In [27] four types of single charging cycles are analysed, depending on the initial battery state of charge (SoC), the charging power value and the type of vehicle.
In addition to the study on the single charging cycle, to evaluate the impact in terms of power and energy consumed by an electric vehicle charging station, it is also essential to analyse all the other aspects that characterize the behaviour of users during the charging phase, such as the start charging time and the charging methods in dedicated stations.
The charging behaviour of a large number of users driving electric vehicles in UK is monitored over a period of one year in [28]. This study introduces a probability distribution function which represents the probability that an electric vehicle will start charging at a certain time of day in the charging station. These relations are developed for both weekdays and weekends.
Understanding the habits, as well as the type and frequency of daily activities of electric vehicle users is essential to initialize the variables introduced in the charging model developed. Other recent studies [29,30] propose the probability density function, based on different stochastic considerations and methodologies.
In [32, 33, 34] the start charging time probability distribution function is represented through the evaluation of data deriving from the National Household Travel Survey (NHTS). These data are based on a 24-hour survey of US vehicle users. In this papers, private charging is examined and the time in which the vehicle is connected to start charging corresponds to the time in which the user arrives at home.
Studies based on NHTS data can also be observed in [36], where the probability density function is obtained as a function of the time of departure and arrival at home and the average distance traveled by the user.
Papers [42] and [43] base their study on the evaluation of the number of daily charges in a public station. The results obtained show the probabilistic nature of these charging sessions. Both studies stress that determining this number requires the development of a simulation model or a field measurements system.
From the literature it can therefore be stated that the electric vehicles user's behaviour and therefore the aspects that characterize the charging sessions, derives from data of different types and origins.

II. CASE STUDY
The building considered is an historic building, which have structural and plant engineering renovations. It is a former elementary school that has been decommissioned and redeveloped to house a cultural center used both as a library and as a gallery for art exhibitions. It was built in 1922 to then become a school for technical jobs. The total area of the building is 7500 m 2 with 62 rooms spread over 4 floors. Currently only 1/3 of the total building area is operational, while the rest is subject to a redevelopment process.
The main features of the building are described in Table I. The table also shows the thermal consumption (expressed in Nm 3 ) and electrical consumption (in kWh), obtained from the analysis of the bills of the last year. As regards the thermal consumption of this specific building, reference is made to the year 2016.
As regards the profiling of the electrical loads of the building (excluding the electric vehicle charging stations), the values have been reported considering a scale factor that takes into account the future use of the building, based on the value of 56 kW recorded in January. These values are based on hypotheses deriving from meetings with the technical office of the municipality of Campobasso.
The charging columns that will be installed in the building will be three for public use in Via Roma and three for employees in the internal courtyard of the building. Both stations will provide 22 kW in Mode 3 and charging connectors of Type 2 or 3A.

III. LOAD PROFILING MODEL
As already introduced previously, in order to develop a model that realistically represents the behaviour of the vehicles in charge, a substantial research in the literature on the subject in question has been necessary. Particular attention has been paid to the analysis of data and characteristics regarding the charging stations and the vehicles themselves.
The numerical values of the variables introduced in the model vary according to the scenario analysed. This differentiation has been made possible through the introduction of a variable scale factor depending on the number of electric vehicles presents at the charging station.
In this chapter, the model relating to the scenario corresponding to the maximum number of charging electric vehicles will be described.

A. Public charging stations
To develop the profiling model concerning the charging vehicles in the public station (consisting of three charging columns), the first step has been the realization of a preset curve representing the probability density function of the start charging time of the vehicle that arrives at the station.
Through the research of studies previously done in the literature it has been possible to understand the fundamental variables for the realization of a correct preset curve, which has been subsequently implemented in MATLAB.
From the daily data acquired in the literature, 24 probability values have been distinguished. These values have been then reported as constants in the MATLAB model and interpolated to have 96 distinct elements, representing the quarters of an hour that elapse in a day, in order to streamline the daily division.
The preset curve composed of these values has been then compared through an if cycle, with a random curve implemented with a given mean value and a standard deviation. This procedure has been done for each timestep of the day. The comparison of these curves can be seen in the following figure. In the model it has been necessary to introduce a logic function (with a value equal to 0 or 1) that would represent the presence or absence of another vehicle (in addition to the one already charging) in the same time interval and in the same charging station.
The vehicle charging profile starts if the following conditions occur: the value of the logic function described before is equal to 0 (no other vehicle is already present in the station) and the difference between the developed random curve and the preset curve is less than a certain value (equal to 0.2%). In reality, the verification of both conditions of the model reflects the situation in which the user finds the charging station free and can proceed to charge his vehicle.
This operation is done for each timestep.
The results of the code written for a charging station have been implemented for three charging stations by means of a for loop. The charging profiles are represented in the following figure. The figure below schematically shows the procedure followed to develop the code.
The constants initialized in the model (such as the average capacity of the electric vehicle and the charging power) and the other variables of the implemented model (such as the energy gap that must be covered, the state of charge (SoC) of the vehicle arriving at the station and the final SoC at which the vehicle leaves the station) have been set with a certain mean and standard deviation, based on a careful observation of studies done previously in the literature.

B. Private charging stations
The simulation model developed for the profiling of private charging station (corresponding to the three columns for employee use) has some differences with the model developed for public charging in the previous paragraph.
In this case, an average arrival time of the vehicle has been established equal to 9.00 in the morning, with a certain standard deviation equal to half an hour, in order to have a wider time interval in which the vehicle could be charged.
In a similar way to to the model for public charging, the arrival SoC of the vehicle has been introduced with an average value (equal to 50%) and a certain standard deviation (equal to 10%). The code developed for one charging station has then been implemented for three charging stations. The daily power profiles obtained are shown for the three columns in the same graph below. As can be seen from the graph, the time interval that the vehicle takes to charge is variable and proportional to the energy gap that must be covered to have a final battery level of 80% (established as target SoC).

C. Profiles aggregation
The power profiles of the two charging stations obtained have been implemented in the same daily graph. In addition to the same graph, the power profiles of the buildings and the photovoltaic generation system have been reported.
In particular, the photovoltaic profiling has been carried out following an appropriate sizing, carried out with the aid of PVGIS (Photovoltaic Geographical Information System), thanks to which it has been possible to obtain data regarding the average daily irradiation of the area considered, for the months of February, June and October.
The goal of this power profile overlap is to quantitatively and qualitatively evaluate the consistency of the building's electrical loads, in order to analyse the building's selfsupporting capacity with the photovoltaic generation system. In this way it will be possible to understand the number of electric vehicles that can be charged, so that the photovoltaic system is able to support most of the energy consumed by the building in a specific setup.
Through this analysis it will therefore be possible to understand under which conditions the system manages to be as independent as possible from the electric grid. To differentiate the four scenarios, a charging coefficient (Kc) has been introduced in the final code. This coefficient takes into account the volume of electric vehicles arriving at the two charging stations daily.

IV. KPIS CALCULATION
Through the introduction of specific KPIs (Key Performance Indicators), the following energy analysis will provide results both in qualitative and quantitative terms of the electricity consumption and the self-consumption capacity of the building, in relation to the number of electric vehicles that charge in the two stations, in a specific scenario.
For the comparison between the KPIs expressed in p.u. scenario 1 has been taken as a reference since it represents the situation with the lowest amount of energy consumed, being characterized by zero charging electric vehicles.
The energy KPIs analysed for a typical winter, summer and mid-season day will therefore be defined as follows: -KPI tot,consumed equal to the ratio between the total energy consumed over the 24 hours of a given scenario and the same energy consumed in scenario 1, as expressed by the following formula: KPI tot,consumed = tot,consumed tot,consumed,1 Where: tot,consumed = load + EV tot,consumed,1 = load,1 + EV,1 The relationship is defined in p.u. In the formula, load represents the energy consumed daily by the electrical loads of the building, while represents the daily energy consumption related to charging electric vehicles. load,1 and EV,1 represent the same quantities described previously relating to scenario 1.
-KPI PV,grid,in defined in p.u. as the ratio between the value of energy that the photovoltaic system feeds into the grid and the same quantity relating to scenario 1: is equivalent to the daily energy value produced by the photovoltaic system, while self−consumed represents the self-consumed energy, equal to the energy consumed by the total electrical loads in the hours in which the photovoltaic produces energy.
load,1 and EV,1 as in the previous case, represent the same quantities relative to scenario 1.
-KPI grid,withdrawn which defines in p.u. the ratio between the energy drawn from the grid in the hours in which the photovoltaic does not produce energy and the same quantity in scenario 1. The formula for the evaluation of this KPI is the following: In the formula, as introduced for the first defined KPI, the quantity , represents the total energy consumed.

V. RESULTS
The three different KPIs defined in the previous paragraph will be calculated for different simulations developed for three typical days (winter, summer, mid-season). Each day will be divided into 4 different scenarios, depending on the number of electric vehicles that charge at the station.

A. Winter day
Having chosen February as a typical winter day, the diversified power profiles for the 4 scenarios analysed are shown in the following figure. As it can be seen from the graphs, this month is characterized by a reduced energy production from the photovoltaic system (orange line) compared to the summer and mid-season months (as will be seen later) and by high values of energy consumption of the building (blue line), due to an higher activity by users. The scenarios differ by the charging electric vehicles number and therefore by a different EV power profiling (yellow line).
It can be also observed that most of the daily charges fall within the interval between timestep 60 and 80, corresponding to 15:00 to 20:00 in the afternoon, in which the typical user ends his working day.
The following table shows the values of the total daily energy consumed ( tot,consumed ), the energy fed into the grid by the photovoltaic system ( PV,grid,in ), the energy drawn from the grid ( grid,withdrawn ) and the KPI values, for the winter day. From the table it can be noted how in scenario 3, KPI PV,grid,in has a very low value, equal to 0.03. This means that, in this particular scenario, the energy generated by the photovoltaic system and fed into the grid is minimal. Therefore, this scenario corresponds to a number of charging electric vehicles that allows an optimal energy coverage by the PV system. In scenario 4, the same KPI then passes to a negative value, which means that in this particular setup, the PV system is insufficient to fully cover the building's electric consumption.
Finally, it is possible to observe in the following figure the overlap of the net power profiles of the building, for the 4 scenarios analysed.
As a convention, the users' one has been taken. The electrical consumption of the building and the electrical loads resulting from the charging of electric vehicles therefore have a positive sign, while the power generated by the photovoltaic system will have a negative sign.

B. Summer day
For the summer day, June has been chosen as the reference month. This month, compared to the winter one, is characterized by higher values of power generated by the photovoltaic system, due to more favorable weather conditions (higher solar irradiation values). In addition, the values of electricity consumed by the building are lower.
The values of the KPIs analysed for the 4 scenarios are shown in the following table. From the table it can be seen how the KPI trend in the different scenarios is similar to the trend seen in the case of the winter day. Unlike the winter case, in this case KPI PV,grid,in never assumes a value close to zero. This means that in this particular typical day, the photovoltaic system always feeds a considerable amount of energy into the grid.
The net power profiles for the summer case are shown in the following figure. In this graph we can see how in the summer case, the energy values generated by the photovoltaic system are significantly higher. From this fact it follows that in all 4 scenarios, the net power profile assumes negative values for most of the time, so the energy generated by the PV is greater than the energy consumed by the building. This can also be observed by the absolute values of E PV,grid,in (higher than those of the winter case) and E grid,withdrawn (lower than those of the winter case).

C. Mid-season day
An October day has been chosen as the midseason day. The KPI values for the 4 scenarios analysed are shown in the following table. grid and the energy absorbed by the network, are placed between the values of the summer and winter months.
The following graph shows the overlapping of the net power profiles for the midseason day. Fig. 9. Net load profiles overlap Also graphically it can be confirmed the fact that October is characterized by net profiles with values higher than those of the summer month and lower than those of the winter month.

VI. CONCLUSIONS
The proposed study had as its objective the qualitative and quantitative analysis of the energy performance of the absorption and generation systems implemented in the case study building.
By observing the power profiles and calculating the specific energy KPIs introduced, it has been possible to compare three typical days of three different seasons (winter, summer and mid-season), for 4 different scenarios, based on the number of electric vehicles that charge daily in the two stations analysed.
Through the KPI values it has been possible to ascertain that the winter month represents the worst case from the point of view of photovoltaic generation and energy consumption of the building. For this typical day, in all 4 scenarios, the energy withdrawn from the grid assumes consistent values.
It has also been observed that in scenario 3, the energy fed into the grid has a very low value. This scenario corresponds to a number of daily charging electric vehicles that are almost perfectly balanced with the energy produced by the photovoltaic system. In this case, therefore, the building is able to sustain itself from an energy point of view.
The summer month is characterized by a lower energy demand by the building. For this case, unlike in the winter month, there is no optimal energy balancing scenario and the photovoltaic system, for all 4 scenarios, feeds a consistent amount of energy into the grid.
To allow a better integration between the photovoltaic system and the electrical loads of the building, it could be hypothesized the implementation of an energy storage system, which has the capacity to absorb excess energy in the time interval in which there is an excess of energy generated by the PV and to return it when the PV does not produce energy.
A second hypothesis for optimizing consumption concerns the EV charging stations for employee use. For these stations, in fact, an automatic charging programming system could be promoted, modifying the time interval in which the electric vehicles are charged, in order to more efficiently exploit the energy generated by the photovoltaic system.
The model developed in this study wants to represent a starting point for possible future developments that can deepen the two hypotheses proposed previously.
Further studies may also concern the analysis of data through field measurements, concerning in particular the state of charge of the vehicles, the charging time and the number of vehicles present in the station, by means of specific instruments.