Improved Photovoltaic Self-Consumption in Residential Buildings with Distributed and Centralized Smart Charging of Electric Vehicles

The integration of photovoltaic (PV) and electric vehicle (EV) charging in residential buildings has increased in recent years. At high latitudes, both pose new challenges to the residential power systems due to the negative correlation between household load and PV power production and the increase in household peak load by EV charging. EV smart charging schemes can be an option to overcome these challenges. This paper presents a distributed and a centralized EV smart charging scheme for residential buildings based on installed photovoltaic (PV) power output and household electricity consumption. The proposed smart charging schemes are designed to determine the optimal EV charging schedules with the objective to minimize the net load variability or to flatten the net load profile. Minimizing the net load variability implies both increasing the PV self-consumption and reducing the peak loads. The charging scheduling problems are formulated and solved with quadratic programming approaches. The departure and arrival time and the distance covered by vehicles in each trip are specifically modeled based on available statistical data from the Swedish travel survey. The schemes are applied on simulated typical Swedish detached houses without electric heating. Results show that both improved PV self-consumption and peak load reduction are achieved. The aggregation of distributed smart charging in multiple households is conducted, and the results are compared to the smart charging for a single household. On the community level, both results from distributed and centralized charging approaches are compared.


Introduction
The increase of greenhouse gas emissions due to human activity has been a root cause of climate change [1]. Two of the biggest greenhouse gas emitters are the transport and power sectors, which account for 14% and 25% of global emission, respectively [2]. The environmental awareness in both sectors has expedited the adoption of electric vehicles (EVs) and renewable energy sources (RESs), such as photovoltaic (PV) power generation [3,4]. However, both EVs and PV pose challenges to the power grids. A high penetration of PV power generation and EV charging load in the power grids can lead to several disadvantages such as high load variability, voltage fluctuations, high peak loads, power loss increases, and component overloading [5,6].
Besides into the power grids, both EV and PV can also be integrated into buildings, such as at workplace offices or residential houses where they will interact with other electrical loads. The integration of PV systems in buildings has increased in recent years due to the trend of transforming buildings into net zero energy buildings (NZEBs) [7]. In an NZEB, the yearly energy consumption should be matched by local or on-site energy production [8]. With the addition of an EV charging load in the building, the integration of on-site RES such as PV becomes more crucial in achieving the NZEB criteria.
However, NZEBs might have unfavorable mismatches between power consumption and power production since the NZEB concept only considers the yearly energy balance, not the instantaneous power matching. The mismatch between power consumption and production is one of the main sources of problems in the distribution grid. Specifically for residential buildings at high latitudes, such as in Sweden, PV power production and residential electricity consumption are negatively correlated on both an annual and diurnal basis. Several techniques such as building demand side management (DSM) and battery energy storage have been proposed to improve the load matching and prevent potential problems in the distribution grid [9]. Time-shifting EV charging load, which is often called the EV smart charging scheme, is an example of the DSM strategy that has the potential to improve the matching between load and production [10,11].

Related Work and Motivation
Assessing self-consumption of PV power production within buildings has been a major topic within solar energy system studies in recent years. Considerable amounts of research on the improvement of PV self-consumption at residential buildings by battery and DSM have been carried out. The works in [12][13][14] presented PV self-consumption improvements using residential battery storage. Applying DSM schemes to improve PV self-consumption was studied in [15][16][17]. The schemes were mainly based on shifting flexible household loads to times when solar power production was high. For example, controlling heat pumps has been one of the most common DSM schemes for residential buildings [8].
Adding EV charging load to household load to improve PV self-consumption has also been assessed. The work in [18] quantified the improvement of PV self-consumption in residential buildings with the inclusion of opportunistic EV charging for a case study in Sweden. From the paper, it was concluded that uncontrolled charging barely increased PV self-consumption due to the negative correlation between EV charging behavior and PV power generation. In fact, the work in [19] showed that the high penetration of uncoordinated EV charging in residential areas increased the peak loads and could potentially lead to a significant decrease of the expected transformer life. Another study in [8] showed that both high penetration of PV power generation and uncoordinated EV charging led to voltage problems, but that overvoltage problems due to unconsumed high PV power production were more significant.
Recent research has shown that the load matching, or the synergies between EV charging load and PV power production, could decrease the burden on power grids and increase the benefits for users, building owners, and grid operators [20]. These include increasing PV self-consumption and reducing peak loads. While PV power production is naturally uncontrollable and cannot be shifted in time, it is possible to control and shift EV charging load in time due to the long parking duration of EVs. Based on mobility surveys in six European countries, vehicles are parked 22 hours on average with 16 hours of uninterrupted parking [21]. The survey also found that most of the uninterrupted parking took place in residential areas. This flexibility potential has attracted many stakeholders to propose EV smart charging schemes for residential buildings. Furthermore, the EV battery can also act as an energy storage device, which can discharge power when needed if bi-directional power flow from and to an EV is enabled. This scheme is called vehicle-to-anything (V2X), which includes vehicle-to-grid (V2G), vehicle-to-home (V2H), and vehicle-to-building (V2B) [22].
Until now, avoiding the increase in household peak loads has been one of the most common objectives for smart charging schemes for residential buildings. The works in [23,24] proposed rule-based smart charging schemes to reduce the peak loads in residential distribution grids. The works in [25,26] proposed smart charging schemes with a quadratic programming approach and objectives to reduce the peak loads and load variability at residential buildings. The work in [27] proposed a smart charging and discharging control employing a V2G scheme with a quadratic programming approach, which extended the utilization of the EV flexibility not only to avoid peak load increases, but also for peak shaving purposes. However, these papers did not include PV power production in their studies.
Most of the PV related smart charging schemes were designed for non-residential buildings such as workplaces and universities. This is reasonable as most of the cars are expected to be parked there during the midday when the solar power peaks. In [28], a mixed-integer linear programming was employed for a smart charging scheme with the objective to increase PV self-consumption in a workplace. In [29], smart charging schemes to improve PV self-consumption in commercial buildings with different optimization methods, i.e., the genetic algorithm, particle swarm optimization, and the real-time decision making algorithm, were proposed and compared. In [30], a rule-based smart charging approach with the objective to increase the solar-to-vehicle ratio at a university was proposed.
To the best knowledge of the authors, there are no studies that have assessed the improvement of PV self-consumption at residential buildings by employing EV smart charging schemes. Smart charging in residential areas is expected to be different from, e.g., workplace smart charging, mainly since the parking pattern is expected to be different [31].
Smart charging schemes could be divided into two categories based on the approach: centralized and distributed. In this paper, both distributed and centralized charging approaches are developed and evaluated. In the centralized charging approach, a central unit decides the charging rate and time of the EV fleet, while in the distributed charging approach, the charging of each EV is decided on the user level [5]. The centralized charging approach utilizes the grid capacity more efficiently. However, it is more complex and requires an advanced communication infrastructure. The distributed charging approach is comparatively less complex, has low communication requirements, and has low privacy violations [32].

Aim and Structure of the Paper
This paper aims to complement previous research by assessing the self-consumption improvement by EV smart charging schemes for residential buildings with PV systems. In this study, as a limitation, no V2X scheme is considered. The objective of the smart charging is to minimize the net load variability. Minimizing the net load (load minus local RES production) variability also implies increasing the self-consumption of RES, as well as reducing the peak loads. The decrease in load variability will lead to fewer voltage fluctuations and lower peak loads and power losses [5]. The following topics will be investigated in this study: 1.
The potential of improved synergy between PV generation and household load, including EV home-charging, by smart charging schemes quantified by self-consumption and self-sufficiency metrics.

2.
The impact of the aggregation of multiple households with smart charging schemes on energy performances.

3.
A comparison between centralized smart charging and aggregation of distributed smart charging on energy performances. 4.
The impact on different PV power shares relative to self-consumption and self-sufficiency improvements by smart charging schemes.
This paper is organized as follows: Section 2 presents the proposed smart charging schemes, simulation data, assumptions, as well as definitions and measures. Section 3 presents the results for self-consumption and peak load reduction improvements by smart charging schemes compared to the uncontrolled charging scheme. In Section 4, the highlight of the results is discussed, and the main conclusions are presented.

Methodologies
In this section, the details of the models, data, and assumptions used in this study are described. The simulations in this study were mainly based on the conditions for Sweden.

EV Charging Schemes
This section describes the uncontrolled and two smart charging schemes simulated in this study. All the schemes assumed that all EVs would only charge once a day, and the charging would only take place at residential buildings. Simulations were made based on users' usual mobility patterns, which implied that the user did not have to change their mobility behavior for the charging schemes. Another assumption was that each simulated household had one EV, which was expected to be most common [33]. The maximum charging power rate was set to 3.7 kW, and the charging efficiency was set to 90%, which referred to the average of Level 2 charging efficiency [34]. It was assumed that the charging efficiency was constant regardless of the charging power. The simulations had a 15 min resolution, which was one of the most common temporal resolutions for DSM schemes and self-consumption studies; see [9,35,36]. Furthermore, even though a perfect forecast was assumed in this study, the practical side on the forecast horizon was also considered. Higher forecast resolution, e.g., 1 min, was not so common for two of the main variables in this study, i.e., solar power production and electricity consumption, especially for electricity consumption [37]. In the end, the smart charging scheme would rely on the forecast resolution since the scheduling time step resolution would also have the same time step resolution as the forecast. In other words, the car could arrive at any time, but if the resolution of the optimization input, i.e., the forecast, was 15 min, the optimal charging schedule would have a 15 min resolution. It is understandable that there might be a vast amount of arrival-departure behavior happening instant-by-instant. In this case, if a car arrived at e.g., the 125th minute of the day, the car would be assigned to the 7th time step of the day, since floor (125/15) + 1 = 7.
In this study, all the simulations were conducted within the MATLAB simulation environment using a computer with an Intel i7-8650U processor and installed RAM of 16.0 GB. The optimization problems in both distributed and centralized smart charging schemes were solved using MATLAB quadprog with the interior-point-convex algorithm [38]. Each simulated charging scheme in this study is further described in detail in the following subsections.

Uncontrolled Charging
In the uncontrolled charging scheme, the charging was opportunistic and always started upon arrival with the maximum charging rate. The charging scheme did not consider the household electricity consumption nor PV power production. The charging finished when the battery state of charge (SoC) met the targeted SoC.

Distributed/Local Smart Charging
In the distributed or local smart charging scheme, the charging did not always start immediately upon arrival nor did it always use the maximum charging rate. The charging scheme considered a perfect forecast of local (i.e., single household) power consumption and PV production. Since the simulations used a perfect forecast of load and PV generation, results from the smart charging scheme would be a best-case approximation. The charging scheme also used information about the parking period duration and the EV energy demand. From these data inputs, the smart charging scheme would minimize the net load variability of a single household with the constraints of targeted SoC and maximum charging rate. Minimizing the load variability in each individual household could contribute to the decrease in the load variability of the distribution grid or even the regional grid [25]. The smart charging scheme would determine the charging rate in each time-slot during the parking period. Figure 1 shows an overview of the proposed distributed/local smart charging scheme.

PV power production
Electricity consumption EV energy demands Arrival and departure times Smart charging optimization: Minimizing the net-load variability Charging rates in the scheduled period The population variance equation was used to represent net load variability. However, in the optimization formulation, only the numerator part was taken into account since the denominator was a constant and would not affect the optimization result. Thus, the optimization problem of the smart charging scheme can be defined as: where t arr and t dep are the arrival and departure times of the car, respectively, x t is the charging power rate at time t, n t is the net load at time t, and µ tpark is the mean net load during the parking period including EV charging. In the constraint, η x is the charging efficiency, SoC target is the state of charge targeted in the battery, SoC arr is the state of charge in the battery on arrival, and x max is the maximum charging power rate. The net load n t is obtained from: where l t is the household load at time t and s t is the solar power production at time t. The mean net load during the parking period µ tpark is obtained from: Note that the charging scheduling for the whole scheduled parking period was conducted only at the arrival time t arr , and the output of the optimization was a vector containing x t arr , x t arr+1 , . . . , x t dep−2 , x t dep−1 .

Centralized Smart Charging
In the centralized smart charging scheme, the charging control was done by a central unit instead of at the individual user level. Figure 2 illustrates the difference between distributed/local and centralized charging schemes in the control architecture. The centralized smart charging scheme used the same variables as the distributed smart charging. However, the power consumption and production on the community level were considered instead of the information from a single household level. In other words, the centralized charging scheme would minimize the net load variability of the whole community. The community power consumption L t , PV generation S t , and net load N t at time-slot t with K number of households respectively can be written as: Thus, the objective function of the centralized smart charging scheme can be written as: where the new variable M tpark is introduced as the mean community net load during the parking period, taking into account the charging demand of the EV that is being scheduled. The new variable M tpark is obtained from: Home charging box Centralized energy controller Communication network The constraints of this quadratic programming model are identical to the constraints in the distributed/local smart charging scheme, which are defined in Equation (2). After each time the charging schedule of one EV is defined, the community net load profile between the arrival time t arr and the departure time t dep is updated by adding the charging load profile to the old net load profile, which can be defined as: With this update, the next EV charging scheduling considers the changes of the load profile due to previously scheduled EV charging load.
If more than one car arrives at time step t, the order of the charging scheduling is done based on the future departure time. The charging scheduling of the car that will depart earlier will be executed earlier, since the cars that park longer have a higher flexibility.

Residential Household Load
In this study, the residential household load was generated from the Widén model for generating synthetic electricity consumption profiles [39,40]. It is a Markov chain based model that generates the electricity use profile in one minute resolution based on occupant activity patterns. The model was trained on Swedish electricity use profiles and set to simulate a detached house without electric heating with two adult inhabitants per household. In this study, the synthetic data were averaged to 15 min resolution in order to match the resolution of the simulation setup. There were two different scenarios that were simulated in this study: a single household load and the aggregation of 100 households, which represented a small-sized community.

Mobility Patterns and Daily Charging Demands
This study utilized user mobility data from the Swedish travel survey in 2006 [41]. The time of arrival and departure of trips made by cars, the distance traveled, as well as the origin and destination locations of these trips were available in the survey. The arrival and departure time of EVs were randomly sampled with a Monte Carlo method using the survey data with an assumption that each EV made one round trip per day. Home-work-home mobility patterns were used for the simulation on weekdays, while home-other-home patterns were used for the simulation on weekends. The arrival and departure time data originally had one minute resolution, but in this study were averaged to 15 min resolution in order to match the resolution of the simulation setup. Figure 3a,b shows the histogram of the time of home-arrival and home-departure and the fraction of vehicles parked at home in this study, respectively.
Daily energy demand of EVs was also estimated with a Monte Carlo method using the survey data. The daily charging requirement E (kWh) is estimated by: where η is the specific consumption of EVs (kWh/km) and D is the daily driving distance. In this study, η was assumed to be 0.15 kWh/km, and the maximum usable energy in the battery was set to 30 kWh. This was assuming that the battery was able to provide sufficient energy for the trips within a city. The daily driving distance D was calculated by doubling the trip distance sampled randomly from the trip distances of the recorded trips arriving at home [41]. This was assuming that each EV was driven in two equally long trips a day, such as a trip from home to the workplace and back to home again.

Solar PV Power Production
The PV power production profiles were based on the data of global horizontal irradiation (GHI) in 2018 in Stockholm with latitude 59.3 • N and longitude 18.0 • E, recorded by the Swedish Meteorological and Hydrological Institute (SMHI) [42]. The data originally had a one hour resolution, but was interpolated to 15 min resolution in order to match the resolution of the simulation setup. The PV system in this study was not specifically sized with kWp metrics; instead, it was scaled relative to the total yearly electricity demands, as a conversion could be made when that was suitable. The yearly PV production to the yearly household electricity demands R is defined as: where P annual is the yearly solar electricity production and L annual is the yearly household electricity demand including EV charging for each household. R = 1 means that the households produce the same amount of electricity as they consume, making them NZEBs. In this study, a number of scenarios with different R were conducted to see the impact from the amount of PV power production, i.e., R = 0.10, 0.25, 0.50, 0.75, 1.00, 1.25, and 1.50, in order to reflect both undersized and oversized PV systems.

PV Self-Consumption and Self-Sufficiency
This section describes the self-consumption and self-sufficiency metrics, which are two of the most common load matching indicators for buildings with PV systems [9]. Figure 4 shows a schematic outline of residential daily electricity net demand represented by Area A and PV net generation represented by Area B. The overlapping part in Area C is the PV electricity directly utilized within the building. Self-consumption SC is defined as the fraction of the self-consumed PV electricity to the total PV electricity production. Based on the illustration in Figure 4, it can be defined as: Self-sufficiency SS is defined as the fraction of the load supplied by local PV energy to the total load. Based on the illustration in Figure 4, it can be defined as: A high self-consumption means that a large share of the PV production is self-consumed to supply the load. A high self-sufficiency means that the load is mostly supplied from the locally produced PV electricity.

Peak Load Reduction
In this paper, the peak load reduction was calculated by comparing daily peak load with the uncontrolled charging scheme to peak load with smart charging schemes. Figure 5 shows a schematic outline of daily load profiles and their peak loads with the uncontrolled charging scheme (UCS) and the smart charging schemes (SCS). Based on the illustration in Figure 5, the daily peak load reduction can be defined as: daily peak load reduction = UCS peak load -SCS peak load UCS peak load .
In Section 3, the daily load production in a year is averaged in order to observe the annual energy performance. The arrows point out peak loads. The difference between the pointed out peak loads is the amount of peak power reduced.

Net Load Variability
Since the objective function is to minimize the net load variability, it is important to assess how well the smart charging performance is with a variability measure. In this paper, the variability was measured by calculating the standard deviation or the square-root of the variance between the values of the net load profiles. The net load variability is a useful indicator, as it relates to voltage fluctuations in distribution grids, and on a larger scale, it relates to grid frequency fluctuations [5,26]. Figure 6 shows the net load profiles with uncontrolled charging, smart distributed charging, and smart centralized charging schemes for different seasons for a community with 100 households and one EV in each household. With respect to the smart distributed charging, the optimization was conducted for each of the households. Then, the net load of each household was summed up to obtain the community net load profile, which is shown with red-dotted lines. The mean daily load profile and solar power production are shown in Figure 7. In both figures, the ratio of the yearly PV electricity production to the yearly electricity consumption is R = 0.50.

Results
By visual inspection, it can be seen from Figure 6 that the net load with uncontrolled charging was easily distinguishable from net loads with smart charging schemes. Furthermore, it can be observed that the net load with the distributed smart charging scheme was similar to the net load with the centralized smart charging scheme. The major difference between the two was that the net load with the centralized smart charging scheme was smoother, while the net load with the distributed smart charging scheme had more ripples, which was a result from the charging control not being coordinated by one central unit.
As can be seen from Figure 6c, the peak load reduction by the smart charging schemes was clearly visible for winter. During this season, the solar power production was low; thus, the smart charging schemes were significantly more important in decreasing the peak loads. In summer, the impact of the smart charging schemes was not as significant as it was in winter, as can be seen in Figure 6b. However, a flatter net load profile was still achieved with the smart charging schemes. The net load was often negative during the midday in summer due to the peaks of solar power production. The smart charging schemes barely compensated for the high negative net load problems in the summer since the fraction of EVs at home was low during midday when the solar production peaked, as shown in Figure 3b. In spring, shown in Figure 6a, the peak load reduction by the smart charging schemes could be noticed more easily than in the summer. However, it still had similar problems with negative net loads. Based on daily average shown in Figure 7, it can be seen that in the smart charging schemes, the peak load was significantly lower. In this figure, the intersection area between the load and the PV generation is increased with the smart charging schemes, even though it is not as clear as the peak load reduction. This indicated that the PV self-consumption increased. It can also be seen that there was more daytime charging with centralized charging than with distributed charging.
The following sections present quantified numerical results on self-consumption, self-sufficiency, peak load reduction, as well as net load variability.

PV Self-Consumption and Self-Sufficiency
The PV self-consumption and the self-sufficiency in the simulated scenarios are shown in Figure 8. In these figures, black lines represent the uncontrolled charging scheme, red lines the distributed smart charging scheme, blue lines the centralized charging scheme, thinner lines schemes with a single household, and thicker lines represent with 100 households aggregated. From these figures, it can be seen that if the share of PV production was higher, then the self-consumption was lower and the self-sufficiency higher. It could also be concluded that regardless of the charging scheme, both the self-consumption and the self-sufficiency were improved when multiple residential net load profiles were aggregated.
In terms of the impact from the distributed or local smart charging scheme, smart charging schemes in a single household achieved more prominent improvements in both the self-consumption and the self-sufficiency compared to the one on the community level. This was because the aggregation of net load profiles already improved the performance of both indicators, thus leaving only smaller room for improvements for the proposed local smart charging scheme. However, with the centralized smart charging approach, self-consumption and self-sufficiency improvements on the community level were higher than the ones with local smart charging and close to the improvement made by the local smart charging for a single household. Tables 1 and 2 present the changes in self-consumption and self-sufficiency from the proposed smart charging schemes. In Tables 1 and 2, the averaged increases in self-consumption and self-sufficiency per household by the centralized smart charging scheme are also shown. It could be concluded that the self-consumption in each household was not penalized by the implementation of the centralized smart charging scheme. Instead, the self-consumption on the single household level increased with the centralized smart charging scheme, even though improving self-consumption in each household was not the main objective. However, the increases were not as significant as the ones with the local smart charging scheme. Table 1. Self-consumption improvements by smart charging schemes for a single household and on the community level with both distributed and centralized charging approaches.  Table 2. Self-sufficiency improvements by smart charging schemes for a single household and on the community level with both distributed and centralized charging approaches. Among the simulated scenarios, the scenario where the production-to-consumption ratio R was 0.50 had the highest self-consumption improvements with an 8.7% increase on the single household level with distributed charging, a 3.7% increase on the community level with distributed charging, a 3.8% increase on average on the single household level with centralized charging, and an 8.5% increase on the community level with centralized charging. For the self-sufficiency, the scenario with the highest R = 1.5 had the highest self-sufficiency improvements with a 6.9% increase on the single household level with distributed charging, a 2.8% increase on the community level with distributed charging, a 4.7% increase on average on the single household level with centralized charging, and a 5.5% increase on the community level with centralized charging.

Self-Sufficiency Increase
Ideally, the charging time was shifted to the time when the solar power peaked, which would likely lead to the self-consumption and the self-sufficiency increasing more. However, that is not always possible with unchanged driving patterns, which was an assumption in this study. The improvements in both self-consumption and self-sufficiency by the smart charging schemes were limited by the low fraction of vehicles at residential buildings during the peaks of solar power production.

Peak Load Reduction
Since the charging loads in the uncontrolled charging scheme often coincided with the household peak loads, smart charging schemes have a significant potential to reduce the peak loads. Peak load reduction was achieved by shifting and distributing the EV charging load to the time when the household electricity consumption was lower, as long as it is still within the parking period. Table 3 provides the information on the average of daily peak load reduction in a year by the smart charging schemes compared to the uncontrolled charging scheme in several scenarios In general, with the distributed/local smart charging scheme, the peak load reduction was higher on the single household level than on the community level. The reason was because the peak loads of each household did not always coincide with each other. Thus, when multiple load profiles were aggregated, the increase in the peak loads might not be linear with the number of the aggregated load profiles. Consequently, the peak loads relative to the mean load were most probably lower on the community level than on the single household level, which was likely beneficial for the power grid. However, it left less room for improvement in terms of peak load reduction on the community level for the proposed smart charging scheme.
On the community level, the peak load reduction was higher with the centralized charging scheme than with the distributed/local charging scheme. The peak load reductions on the community level with centralized charging were close to the one achieved in the single household with a local charging scheme.  Figure 9 shows the net load standard deviation per household in the simulated scenarios compared with yearly production-to-consumption ratio R. Based on the figure, it can be seen that the aggregation of multiple households would decrease the net load variability.

Net Load Variability
From the figure, it can also be concluded that the higher the share of PV power production, the higher the net load variability. In these cases, the high value in variability was due to unconsumed PV power during the day. Overall, the proposed smart charging schemes decreased the net load variability, and with centralized smart charging, the performance was slightly better than with the distributed/local smart charging. However, the difference in net load variability between uncontrolled and smart charging schemes was lower with a higher share of PV power.
Since the smart charging schemes were programmed to minimize the net load variability, the net load variability improvements reflected the effectiveness of the smart charging. From the results, it could be concluded that the effectiveness of the smart charging schemes, approach-wise, was decreased when the PV power share was higher.  Figure 9. Net load standard deviation per household against production-to-consumption ratio R.

Concluding Discussion
In this paper, a distributed and a centralized EV smart charging scheme with the objective of minimizing the net load variability of residential buildings were presented. The proposed smart charging schemes considered EV energy demands, arrival and departure times, and forecasts of both PV power production and electricity consumption, which in the study were perfect forecasts. By minimizing the net load variability, the PV self-consumption was increased, and the peak loads were reduced.
Results showed that with a distributed/local smart charging scheme in a single household, the self-consumption and the self-sufficiency could be increased up to 8.7% and 6.9%, respectively, depending on the share of PV power production. Even though the distributed smart charging scheme for a single household provided improvements in terms of self-consumption and self-sufficiency, it should be noted that the simulations in this study were based on perfect forecasts of PV production and load and thereby represented an identified upper limit case. In practice, the forecast of PV production and load for a single building level is less reliable than for an aggregated level [43]. Less reliable forecasts are expected to negatively impact the smart charging scheme's effectiveness, but be more realistic, and this is left for future studies.
Regardless of the EV charging schemes, the aggregation of multiple household net loads improved self-consumption since the PV power that was not self-consumed at one household could be consumed by neighbors. If the distributed/local smart charging scheme was employed on a community level, the self-consumption increase in the community level by the scheme was not as high as for a single household. This was due to less room for improvement for the distributed smart charging scheme since the aggregation already increased the self-consumption. On the community level, the centralized smart charging scheme performed better than the distributed smart charging scheme in terms of increasing self-consumption. However, it should be noted that in practice, centralized charging schemes need a more complex communication infrastructure. Overall, the increase in self-consumption was limited by the low fraction of vehicles parked during the peaks of solar power production.
In terms of the smart charging performance with respect to its main objective (i.e., minimizing net load variability), the smart charging schemes reduced net load variability to a large extent when the PV power share was low, and that the performance was lower when the share of PV power was higher. Since the number of EVs was the same for different scenarios of PV power share, as the PV power share was higher, the number of EVs became less significant compared to the PV power share.
Considering higher PV power share led to higher net load variability, the smart charging schemes with unchanged number of EVs would not have a significant impact on lowering the net load variability.
We could also see from the results that the smart charging schemes could decrease household peak loads to a large extent. However, the PV power production excess that was not self-consumed would still be difficult to match with EV smart charging if the share of PV power was high.
Several conclusions can be drawn from this study: 1.
Self-consumption and self-sufficiency in residential buildings could be improved with EV charging schemes; however, the improvements were limited by low vehicle occupancy adjacent to the buildings during the period of high solar power production. 2.
Self-consumption and self-sufficiency improvements by the distributed smart charging scheme on the aggregate level were lower than for a single household. This was due to the fact that the aggregation of multiple households already improved self-consumption and self-sufficiency, leaving less room for the smart charging scheme to improve the performance.

3.
On the community level, the centralized charging scheme was superior at improving self-consumption and self-sufficiency compared with the distributed charging scheme. 4.
The higher the PV power share, the higher the load variability due to unconsumed PV power. The improvement in load variability by the smart charging schemes became less significant with higher PV power share.
The computational burden of the proposed smart charging schemes is an important aspect for practical implementations. In the proposed distributed smart charging scheme, the optimization was conducted on an individual level; thus, the computation burden was distributed among users. In the proposed centralized smart charging scheme, a central unit would need to execute the optimization of each car. Even though the optimization problem in the smart charging schemes was convex, which made it relatively fast to solve, the computation could be demanding when many of the cars arrive at the same time. In the simulation environment used in this study, the optimization time on average by MATLAB quadprog was 0.004 s per car. In the centralized charging, the computation time at time step t was linear with the number of cars arriving at time step t. In further research, practical implementations of the proposed smart charging schemes and analysis of their computational burden are encouraged. The computation time of the optimization process was expected to be higher when the smart charging scheme resolution was higher. Even though the studies in [9,35] showed that 15 min resolution was sufficient for a self-consumption study, future studies using a higher resolution are recommended in order to find out the trade-offs between the computation speed and the accuracy.
In further research, it would also be interesting to include realistic load and PV generation forecasts to the schemes and investigate how forecast reliability will impact the performance of the schemes. In addition, future studies should also combine EV smart charging schemes with other energy management strategies, such as PV curtailment, home energy storage, or smart control of other flexible household loads, in order to reduce PV power production excess. Furthermore, it is interesting to investigate the impacts of smart charging schemes on city-scale energy performances, which should include mobility patterns and power production and consumption, not only in residential buildings, but also in workplaces and other locations. Funding: This project was funded by the Swedish Electromobility Centre Project "Modeling and implementation of smart-charging using the Annex D standard: Initial study".