Self-consumption and self-sufficiency for household solar producers when introducing an electric vehicle

The aim of this study was to analyse how electric vehicles (EVs) affect the levels of electricity selfconsumption and self-sufficiency in households that have in-house electricity generation from solar photovoltaics (PV). A model of the household electricity system was developed, in which real-time measurements of household electricity consumption and vehicle driving, together with modelled PV generation were used as inputs. The results show that using an EV for storage of in-house-generated PV electricity has the potential to achieve the same levels of self-consumption and self-sufficiency for households as could be obtained using a stationary battery. As an example, the level of self-sufficiency (21.4%) obtained for the households, with a median installed PV capacity of 8.7 kWp, was the same with an EV as with a stationary battery with a median capacity of 2.9 kWh. However, substantial variations (up to 50% points) were noted between households, primarily reflecting driving profiles. © 2019 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
The total global installed capacity of solar photovoltaics (PVs) exceeded 500 GW by the end of Year 2018 [1], and the installation of solar PVs globally has increased by more than 4000% since 2007 [2]. A similar global trend is seen for the number of electric vehicles (EVs), which have increased exponentially from 61,000 in Year 2011 to over 3,100,000 vehicles by Year 2018 [3]. Further increases in the numbers of solar PV installations and EVs can be expected in the coming decades, not least due to reductions in production costs and the responses to climate mitigation policies [4]. The acquisition of an EV by a household that has solar PV electricity generation can have effects on the levels of self-consumption and self-sufficiency of that household. Self-consumption of PV-generated electricity has been defined by Luthander, Wid en, Nilsson and Palm [5] as the share of locally generated electricity that is being consumed inhouse, while self-sufficiency is defined as the share of total demand that is being supplied by in-house-generated electricity. Selfconsumption of the generated electricity is economically advantageous for households that have solar PV, since other costs (e.g., electricity taxes and grid fees) that are added to the end-user price for electricity can be avoided [6].
Stationary battery installations in Swedish households increase the level of self-consumption of PV-generated electricity, although there is a diminishing marginal effect when the battery size is increased, since the storage times in the battery become longer [7,8]. Munkhammar, Grahn and Wid en [6] have shown, based on a stochastic model, that the yearly total electricity demand for households increases on average by around 40% when an EV is introduced into a residential household. Furthermore, they have reported that introducing EV charging results in a lower level of self-sufficiency for households, even if the PV capacity is increased by the same magnitude as the EV demand [6]. Munkhammar, Grahn and Wid en [6] and Luthander, Lingfors, Munkhammar and Wid en [9] have shown that there is a mismatch in time between PV generation and the EV charging demand. As a consequence, the increase in self-consumption is limited when introducing an EV [6,9]. From the economic point of view, the charging of an EV can be optimised with respect to electricity prices, as described in several studies [10e14]. Zhao, Kucuksari, Mazhari and Son [10] have shown that optimised charging can yield monetary savings, as compared to uncontrolled charging, both for households that have only an EV and for households that have an EV, solar PV electricity generation, and battery storage. Potentially, the EV can transfer electricity back to the household through a vehicle-to-home (V2H) technology, which can lead to cost reductions in comparison to unidirectional charging of the EV [11,13]. With the additional option to transfer electricity from the EV to the grid (vehicle-to-grid technology), the cost of electricity for households can be further reduced, as shown by Erdinc, Paterakis, Mendes, Bakirtzis and Catalão [12].
Most of the studies mentioned above (e.g. Refs. [6,10e12]) have used real-life data regarding the households' electricity consumption (excluding EV charging demand) and PV generation levels. However, none of these studies used real-life data, e.g., Global Positioning System (GPS) measurements, as the basis for EV driving patterns. Instead, different assumptions have been made, for instance as to when the EVs are plugged in at home, the daily electricity consumption of EVs, and the storage levels of the EV batteries when arriving home. Munkhammar, Grahn and Wid en [6] have applied a stochastic model to mimic different lifestyles, thereby generating household load and driving demand, together with charging patterns for the EVs. Zhao, Kucuksari, Mazhari and Son [10], Wu, Hu, Teng, Qian and Cheng [11], Erdinc, Paterakis, Mendes, Bakirtzis and Catalão [12], and Erdinc [13] have assumed fixed times for the EV arriving home in the afternoon and departing in the morning. In these studies, the time for plug-in at home varies between 5 p.m. and 8 p.m., while the time for plug-out occurs between 6 a.m. and 7 a.m. These times are most likely based on general travelling patterns with different travel surveys used as background, even though none of the studies refers to any specific survey. In addition, some of these studies [11e13] adopt an assumed state of charge (SOC) level for the EV battery when the EV is plugged in, and presume that the EV battery should be fully charged when the EV is un-plugged in the morning. This can be compared with the report of Zhao, Kucuksari, Mazhari and Son [10], where different values for the EV battery levels, both when arriving and leaving home, are used.
Data from self-reported travelling surveys often under-estimate the frequency of trips and focus on the travel behaviours of persons during a single day rather than the movement patterns of cars over longer time periods [15]. Elango, Guensler and Ogle [16] have shown that individual car movements vary considerably from day to day. Such behaviour could be of importance when estimating the impacts on self-sufficiency and self-consumption, not only for an average day but for a longer time span, such as 1 year. A more detailed measurement of individual car movement patterns can be achieved by measuring the time of travel and position with a GPS over a longer time period. However, a limited number of representative GPS-measured data-sets are available for passenger vehicles in which data have been gathered and made available for scientific purposes, with most having been collected over a short time period and/or for a smaller geographical area [17e21]. There are only a few studies that have focused on the charging patterns of EVs based on GPS travel data (e.g. Ref. [22]). However, the study carried out by Wu [22] does not consider electricity management in households specifically, instead focusing on the role of work-place EV charging.
Therefore, there is a lack of studies that have investigated selfsufficiency and self-consumption for households using real-time driving data. The present study addresses this gap in the literature by employing real-time GPS measurements of vehicles' driving patterns in combination with measured data for household electricity consumption and modelled PV electricity generation profiles, as applied to Swedish households. In contrast to the previous studies, the present study uses 400 combinations of unique households and vehicles. The aim of this study was to answer two main questions: How does the introduction of an EV affect the self-consumption and self-sufficiency levels of households with in-house electricity generation from solar PV? Can an EV complement or alternatively replace a stationary battery for storage of electricity in households with in-house electricity generation from solar PV? This paper is organized as follows: Section 2 outlines the modelling approach applied and the descriptions of the metrics applied; Section 3 describes the data used and the variation in input parameters studied; Section 4 presents the results in terms of selfconsumption and self-sufficiency, and the impact of the variations in inputs studied; Section 5 presents a discussion of the results and uncertainties in the methodology; finally section 6 summarizes the conclusions drawn from the study.

Modelling
This study uses an optimisation model for the electricity system in a household. This model covers the load for heating (if electric heating is present), household equipment and charging of the EV, a stationary and EV battery, and PV electricity generation. Optimisation is carried out with respect to maximising the households' self-sufficiency, and thereby, also the level of self-consumption of in-house generated electricity. The model is optimised for 400 combinations of households and EVs, for 30 different combinations of sizes of the PV system and stationary battery for households without an EV, and for 120 different combinations of sizes of the PV system, stationary battery, and EV battery for households with an EV. A temporal resolution of 1 h is used, and the optimisation is performed with perfect foresight over 1 year. Fig. 1 illustrates the structure of the model and its main input and output parameters.

The model
In the model formulation, the amount of electricity imported from the grid to a household is minimised. As a result of the formulation, the dispatch of the EV battery and the stationary battery (in the scenarios when these batteries are available for the household) is optimised so that the levels of self-consumption and self-sufficiency of the household are maximised. The sizes of the PV system, the EV battery, and the stationary batteries are exogenously provided to the model.

ALR
Array-to-load ratio (i.e., PV panel size (W p ) divided by the annual household load (W)) BDR Battery-to-demand ratio (i.e., stationary battery size (kWh) divided by the annual household demand (kWh)) EV Electric vehicle E Capacity of the battery k kilo L Load from the household including EV charging M Electricity generated from PV panels that is being used in-house in every instance, either immediately or later in the household after storage in a stationary or EV battery P The instantaneous PV electricity generation within the household SOC State of charge V2H Vehicle-to-home Wh Watt-hours W p Watt peak The electricity demand for each time-step in the household can be fulfilled through: (i) electricity generated by the PV system; (ii) electricity supplied from the stationary battery and/or from the EV battery if the vehicle is plugged in at home; and (iii) transmission of electricity from the grid. The stationary battery and the EV battery have to be charged during a previous time-step to be able to deliver electricity, and charging and discharging of the same battery within the same time-step is not possible. When leaving home, the EV battery must have a sufficient SOC level to allow completion of all trips until the EV returns home again. Each household is modelled individually and does not influence the other households in the model. No economic factors are accounted for in the model.
The model is based on that developed and described by Nyholm, Goop, Odenberger and Johnsson [7]. Equations (1)e(7) in this paper are equations that were either added (Eqs. (2)e(6)) or affected by the introduction of an EV (Eqs. (1) and (7)), as compared to Nyholm, Goop, Odenberger and Johnsson [7]. The equations in the model of Nyholm, Goop, Odenberger and Johnsson [7] that were not affected by the inclusion of an EV are included in Appendix A. Bold letters indicate decision variables in the optimisation process. The equations affected by the EV relate to: the objective function (Eq. (1)), the electricity balance for each household at every time-step (Eq. (2)), the SOC level in the EV battery at every time-step (Eq. (3)), the limits pertaining to the storage level and the charge and discharge capacities of the EV battery (Eqs. (4)e(6)), and the constraints that restrict all the variables so that they assume only positive values (Eq. (7)). In case there is a need for range extension, i.e., if the assumed driving distance described in the investigated profile is too long for the investigated EV battery capacity, such recharging is assumed to be possible outside the home, although obviously it only covers the energy needed to return home. To the greatest extent possible, the model minimises charging outside the household. Thus, the objective function for the model includes both electricity drawn from the grid to the households and any eventual charging of vehicles outside the household. The charging outside the household is multiplied by a factor two to avoid such charging if it is not necessary to meet the driving demand. h bat battery efficiency q v,t hourly distance driven for EV v at time-step t c EV energy consumption at the wheels (see Table 1) g maximum charging and discharging capacities of the EV battery

Definition of PV electricity self-consumption and selfsufficiency
The level of self-consumption of in-house PV electricity generation and the level of self-sufficiency of the household are calculated using the definitions proposed by Luthander, Wid en, Nilsson and Palm [5]. Self-consumption is expressed as: PðtÞdt (8) where M(t) is the electricity generated from PV panels that is being used in-house in every instance, either immediately or later in the household after storage in a stationary or EV battery. The energy lost as heat during charging/discharging is not considered as selfconsumed, and therefore, is not included in M(t). P(t) is the instantaneous PV electricity generation within the household. To capture seasonal variations in load and PV generation, Eq. (8) is integrated over the time period of 1 year.
By replacing the PV generation, P(t), with the load from the household that includes EV charging, L(t), the self-sufficiency for households, both with and without an EV, is calculated as: Both the stationary battery and the EV battery are used exclusively for storage of in-house generated PV electricity, i.e., they are not used for the purpose of arbitrage on the electricity market. The integration is performed with respect to the discrete input data with an hourly resolution, despite the fact that the above formulations call for continuous integration over the investigated timeperiod.

Sizing of the PV system, stationary battery, and EV battery
The sizes of the PV panel system and stationary battery for each household are related to the electricity load in the household, before the introduction of an EV. The sizes of the PV panel systems and stationary batteries are related to the load of each household to facilitate comparisons of the results between households. The installed PV capacity is expressed using the array-to-load ratio (ALR), defined by Wid en, W€ ackelgård and Lund [23] as: In the same way, the size of the stationary battery is related to the demand by the battery-to-demand ratio (BDR), as defined by Nyholm, Goop, Odenberger and Johnsson [7]: The battery capacity in the model is the useable share of the battery, so it is assumed that the battery can be fully charged and discharged. The size of the EV battery is varied independently of the electricity load of the household. This is the case because the size of an EV battery is currently set by the manufacturers, with a few discrete sizes to choose from. Thus, there is a limited possibility to choose a specific battery size based on personal preference.

Data
The input data regarding the households' electricity consumption levels used in the present study are taken from the measured hourly load profiles of 2221 single-family houses in Sweden. The data cover both terraced houses and detached houses, and the annual electricity demand per household is in the range of 1.76e45.78 MWh per year. Several different types of heating systems are used in the houses, both electric-based (heat pump or direct electric heating) and non-electric (e.g., district heating), which determine whether or not the heating system is part of the electricity demand. For additional information about this data-set, see Nyholm, Goop, Odenberger and Johnsson [7].
The data regarding the driving patterns of vehicles are taken from The Swedish Car Movement Data Project [24]. In total, more than 700 vehicles, randomly selected and representative of the region of V€ astra G€ otaland and all powered by gasoline or diesel, were measured using a GPS for more than 50 days in the period between June 2010 and November 2012. The data used as input for this study are from 426 of these vehicles (the vehicles with quality data and without any gaps in the measurements). From this dataset, the following pieces of information have been extracted for each vehicle: (i) home location; (ii) hours parked at the home location; and (iii) the distance driven between starting and stopping at the home location. The home location is assumed to be the location at which the vehicle is parked for the most hours during the measured period. The data for the measured time period for each vehicle has been extrapolated to one full year (see Appendix A for more details of the method for extraction of the data and extrapolation). The EV is assumed to be plugged into the electricity system of the household for all the hours when the EV is parked at home.
Of the 2221 available households, 20 were selected based on their levels of annual electricity consumption and potential PV electricity generation. This selection was performed to obtain as large a variation as possible among the selected households with respect to both electricity demand and PV electricity generation. Similarly, 20 EVs were selected to obtain as large variations as possible based on the number of hours plugged in at home and the total driving distance over the year (see Appendix A). The total number of hours that the EV was at home was in the range of 2002e7946 h, with a median of 5151 h for all 20 vehicles. This yielded 400 combinations of households and EVs as an input to the model. Table 1 shows the model input data for the PV system, stationary battery, and EV. The solar PV panels are assumed to be tilted at an angle of 31 (representing the average house-roof tilt in Sweden), BDR ¼ battery energy capacity ðWhÞ average annual hourly household demand; excluding EV ðWhÞ (11) be south-facing, and comprise polycrystalline silicon panels. The outputs of the installed PV systems are expressed in relation to the installed capacities for the households, and are based on the data of Norwood, Nyholm, Otanicar and Johnsson [25] and King, Kratochvil and Boyson [26]. Meteorological data (temperature and solar radiation levels) with hourly resolution, acquired from different sites in Sweden, are used as an input [27]. To represent the life-time degradation of the solar panels, a degradation efficiency constant is used. The energy consumption levels for the EVs in the model (Table 1) are based on the work of Taljegard, G€ oransson, Odenberger and Johnsson [28], with adjustment, as they calculated only highway driving, while the present study considers all types of driving. Home chargers for EVs are assumed to be available in every household in the model, providing three-phase electricity at 400 V and 16 A. In contrast, the maximum charging power of the stationary batteries is variable and is adjusted to the installed battery capacity. The maximum charging/discharging power of the stationary battery is 1*E, where E is the capacity of the battery. Thus, a battery with capacity of 2 kWh has a maximum charging power of 2 kW. The same battery efficiency level is used for both stationary batteries and EV batteries.

Varied model input parameters
A range of combinations of ALR, BDR, and size of EV battery were investigated. ALR values from 1 up to 8 were used in the model, corresponding to PV sizes of 0.32 kW P to 40.69 kW P depending on the household electricity demand (ranging from 2779 kWh/year up to 44,674 kWh/year among the selected households). For an ALR of 8, some of the households in the model become net producers on an annual basis, i.e., reaching levels of generation at which full selfsufficiency theoretically becomes possible. BDR values from 1 up to 4, in steps of 1 were used, corresponding to stationary batteries with capacities from 0.32 kWh up to 20.34 kWh depending on the household electricity demand. The households were also modelled without a stationary battery (BDR ¼ 0) as a reference case. The size of the EV battery was varied independent of the electricity demand of the household or EV, from 15 kWh up to 75 kWh, to cover the relevant battery sizes for both plug-in hybrid EVs and pure batterypowered EVs. These input values for sizing the PV panel, stationary battery, and EV battery are presented in Table 2 and gives in total 120 combinations modelled. From this, a range of possible combinations of PV, stationary battery and EV in relevant dimensions for households considering one or several of the actual installations are investigated.
To evaluate the relevance of certain parameters for the results, three additional model runs were performed. First, the model was run with EVs that lacked the ability to undergo bidirectional charging (i.e., V2H), to be able to analyse the impact of the V2H technology on the results. Second, the model was run in a scenario in which a minimum level of energy (i.e., to allow at least 50 km of driving) was required to be in the EV battery during all the hours when the EV was plugged in at home. This minimum battery level would permit spontaneous trips but would limit the possibilities for V2H to some extent. Third, the charging power of the EV battery was reduced to 3.7 kW (230 V, single-phase, 16 A).

Results
The self-consumption and self-sufficiency outcomes are presented and compared for the different combinations of PV system size, stationary battery size, and EV battery size. The results for all 400 combinations of households and EVs modelled are presented. The data used for the households and vehicles are selected to include as large variations as possible, which means that they are not representative of a normal distribution. To assign a lower impact to the extreme data-points, median values are presented. For all the results, unless stated otherwise, the EVs have the possibility to discharge electricity back to the households (V2H) during all the hours that the EV is parked at the home location.

Self-consumption
Fig. 2 shows the median levels of self-consumption for households with an EV (blue lines), households with a stationary battery (red lines), households with both an EV and a stationary battery (grey line), and households without any storage (black dashed line). For clarity, the grey line in Fig. 2 shows the combination of a stationary battery with BDR of 2 and an EV battery size of 50 kWh, although combinations of all the stationary battery sizes and EV battery sizes are included in the analysis (see Fig. B1 in Appendix B). Fig. 2 shows that with increased installed PV capacity in the households (i.e., higher ALR), the degree of self-consumption is decreased, for households with and without an EV. However, the relative increase in self-consumption for households with an EV, as compared with the scenario with a stationary battery and no EV, is greater with a larger PV capacity. With a PV capacity in the lower investigated range, a stationary battery enables a higher median level of self-consumption for the households compared to having an EV, which is explained by that the stationary battery has the benefit of high availability and that there is low risk of that the excess PV generation is larger than the battery itself. As comparison, the EV have a risk of not being at the home location during these hours, yet, if present it provides a large battery storage volume. At larger PV capacities, an EV promotes a higher median level of self-consumption than a stationary battery, due to the size of the EV battery as well as the introduction of the new electricity demand that increase the possibility to make use of daily excess PV generation. As ALR increases, it should be kept in mind that potential surplus PV generation increases, both in terms of electricity generation and the number of hours when it happens, and that a stationary battery is limited to provide a storage solution with high availability. However, an EV battery is limited in availability, yet larger than a relevant stationary battery, and cause a change in the household demand itself, which can have a positive effect on the self-consumption.
As an example, with an ALR of 3 (corresponding to a PV panel size of 8.7 kW p for the median household), an EV that has a 50-kWh battery entails almost an equal median level of self-consumption (0.4% points lower) for the households as does a stationary battery with a BDR of 3 (corresponding to a battery size of 8.7 kWh for the median household). When increasing the ALR to 4 (corresponding to a PV panel size of 11.5 kW p for the median household), the same EV reaches almost the same median level of selfconsumption (0.6% points lower) as a stationary battery with a BDR of 4 (corresponding to a battery size of 11.5 kWh for the median household). The median level of electricity self-consumption is higher when the combination of a stationary and EV battery is used, as compared to using only one of them, independent of the size of the PV panel, as shown in Fig. 2. The impact on self-consumption of the combination relative to only an EV or only a stationary battery depends on the PV capacity. For cases with only an EV, the greatest impact is seen at lower ALRs, while for the cases with only a stationary battery the greatest benefit is seen at higher ALRs. Thus, unsurprisingly, the benefits of both storage systems can be exploited. However, when introducing an additional storage option, the increase in electricity self-consumption is never as large as when the first option is offered to a household without any previous storage technology, as shown in Fig. 2 (i.e., the effects are not additive).
The size of the EV battery affects the level of electricity selfconsumption of a household, as seen in Fig. 2. The difference between the different EV battery sizes increases with larger sizes of PV panels (i.e., higher ALRs). Nevertheless, the difference in selfsufficiency between the different EV battery sizes is smaller for the largest batteries (50 kWh and 75 kWh), compared to between the smallest battery sizes (15 kWh and 25 kWh), as shown in Fig. 2. The marginal benefit in terms of the level of self-consumption accrued from increased EV battery size thus decreases, since longer storage times and thereby, expanded storage options are needed to increase further the level of self-consumption.
It is worth noting that the trends depicted in Fig. 2 are median trends, whereas the variations seen between different combinations of households and EVs are large. In Fig. 3, the variations in self-consumption for households without any storage (white boxes), households with a stationary battery (red boxes), households with an EV (blue boxes), and households with both an EV and stationary battery (grey boxes) are shown. The variations between different households without any storage are large for all the investigated PV sizes and BDR values (at most, 41.6% points), as shown in Fig. 3. However, the variation drastically increases if one includes an EV, as seen in Fig. 3. As an example from Fig. 3, the difference between the maximum and minimum levels of selfconsumption for households with a PV panel with an ALR of 4 is 26% points without any storage, 31% points with a stationary battery (BDR of 2), 59% points with an EV (50 kWh), and 54% points with both an EV (50 kWh) and a stationary battery (BDR of 2). The fact that EV batteries have a higher capacity than stationary batteries, which is not related to the magnitude of the electricity load in the households, and the variations in driving profiles between EVs, are contributing factors to the larger spread in selfconsumption levels for households with an EV. Median levels of self-consumption of electricity for households with an EV, a stationary battery, both an EV and a stationary battery, and without any storage. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household. Fig. 3. Variations in the percentages of electricity self-consumption for households without any storage, households with a stationary battery, households with an EV, and households with both an EV and stationary battery, for households that generate electricity using PV panels with different ALRs. For households without an EV, the variation is shown for the 20 modelled households. For households with an EV, the variation for 400 combinations of households and vehicles is modelled. The central line in each box indicates the median value, while the bottom and top edges of the box indicate the 25th and 75th percentiles, respectively. Values considered as outliers 11 are indicated by red crosses, while the whiskers are extended to the most extreme data-point not considered to be an outlier. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.) Fig. 4. Median levels of self-sufficiency for households without a storage option, households with a stationary battery, households with an EV, and households with both a stationary battery and an EV. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household.

Self-sufficiency
The median percentages of electricity self-sufficiency are shown in Fig. 4 for households without storage option (black dashed line), households with a stationary battery but without an EV (red lines), households with an EV but without a stationary battery (blue lines), and households with both an EV and a stationary battery (grey line). For clarity, Fig. 4 only shows the combination of a stationary battery with a BDR of 2 and an EV battery size of 50 kWh, although combinations entailing all stationary battery sizes and EV battery sizes are included in the analysis (see Fig. B2 in Appendix B). An EV can increase or decrease the electricity self-sufficiency of households, depending on whether the potential increase in selfconsumption outweighs the additional electricity demand from charging the EV. A decrease in self-sufficiency from introducing an EV (À3.8% for an EV with a 50-kWh battery) can be seen for households with the smallest PV panel size investigated (ALR of 1, corresponding to a median capacity of 2.9 kW p ) and without a stationary battery. In these cases, the new load is larger than the additional PV electricity that can be stored in the EV battery and used at a later stage, which implies a reduction in the selfsufficiency of the households. However, for all other PV panel sizes, the introduction of an EV increases the median level of selfsufficiency for households that do not have a stationary battery. For households with an EV but without a stationary battery, the median level of self-sufficiency can be as high as that for households with a stationary battery but without an EV. This holds true for larger PV systems (ALR>3), as shown in Fig. 4. As an example, at an ALR of 4, households with an EV that has a 50-kWh battery have almost the same median level of electricity self-sufficiency (0.3% points lower) as if they would have a stationary battery with BDR of 2 (Fig. 4). These values of ALR and BDR correspond to an 11.5-kW p PV panel and a 5.8-kWh stationary battery (median sizes) for the households investigated.
A positive influence on self-sufficiency from an EV can be seen with increasing size of the installed PV capacity (i.e., higher ALR), in a similar way as for self-consumption. Nevertheless, the median level of self-sufficiency with an EV never reaches the level obtained with the largest stationary battery investigated. Thus, despite the larger storage capacity provided by an EV battery, it cannot replace a stationary battery regardless of its size and procure the same level of self-sufficiency, due to the hours when the EV battery is not available to the household. At most, an EV can secure a slightly higher level of self-sufficiency than a stationary battery with BDR of 3 for the median household; this occurs at an ALR of 8. Since the majority of the households in the model become net-producers on an annual basis with a PV capacity with ALR >8, these findings hold true for a reasonable range of PV capacities for a residential household.
As for the self-consumption, a diminishing marginal benefit from increased battery capacity in the EV is observed also for selfsufficiency (Fig. 4). To be able to utilise the additional battery capacity provided to the households by the EV, the EV must be plugged in at home during the hours with PV generation. Thus, both the number of hours and the actual point in time when the EV is plugged in at the home location have an impact on the influence that the EV exerts on the electricity self-sufficiency of households (see Fig. B3 in Appendix B). If the EV accounts for a larger share of the total electricity demand in the household (>26.7% at an ALR of 3, for households without a stationary battery and an EV with a 50-kWh battery), the EV has a negative impact on self-sufficiency for a large fraction of the households. In contrast, an EV that accounts for a smaller share of the total demand has a positive influence on the self-sufficiency level of most of the households (see Fig. B4 in Appendix B).
The level of self-sufficiency will always be increased when adding a stationary battery to a household with an EV. However, for smaller sizes of PV panels (ALR<2), the level of self-sufficiency is higher for households that have only a stationary battery, as compared to household that have the combination of a stationary battery and an EV. In these cases, not enough additional electricity can be stored in the EV battery to outweigh the extra electricity demand from the EV, resulting in lower self-sufficiency for the households. Thus, if the presence of a stationary battery is sufficient to handle most of the potential excess of PV-generated electricity, the introduction of an EV is not needed for storage purposes, and hence, the new demand is likely to lead, at least partly, to increased purchases from the grid. For households that have larger PV systems (ALR>3), the combination of an EV and a stationary battery is proven to be optimal for self-sufficiency purposes. Naturally, the highest median level of self-sufficiency of 42.6% is obtained with the largest storage available, which is a combination of an EV (75-kWh battery) and a stationary battery (BDR of 4).
The trends depicted in Fig. 4 are median trends, although the variation in self-sufficiency between different households and combinations of households and EVs is large. The variations in selfsufficiency for households without any storage (white boxes), households with a stationary battery (red boxes), households with an EV (blue boxes), and households with a stationary battery plus an EV (grey boxes) are shown in Fig. 5. The variation in selfsufficiency increases with larger size of PV panel system, both with and without an EV. However, the variations are of the same magnitude when one adds a stationary battery to households that already have an EV. This indicates that EVs are the most prominent factor influencing the variations in self-sufficiency between different households, as previously shown for self-consumption. Fig. 6a shows the median self-consumption, and Fig. 6b shows the median self-sufficiency for: households with EV without V2H (green line); households with EV with V2H (blue line); households with only a stationary battery (red lines); and households without any storage (black dashed line). With the V2H technology, the median level of self-consumption with an EV that is equipped with a 50-kWh battery is higher than with the investigated stationary battery sizes for ALRs >4. The median level of self-consumption with an EV that has a 50-kWh battery without V2H at most show similar performances to a stationary battery with BDR of 2. The difference in self-consumption levels for households with an EV with or without the V2H technology is greater for those households that have larger installed PV panel capacities (Fig. 6a).

Impact of the V2H technology
However, in the case of self-sufficiency, removing the possibility for V2H results in a lower self-sufficiency, as compared to cases with a stationary battery for all ALRs <8 (Fig. 6b.) Thus, the ability of an EV to replace a stationary battery and obtain the same level of self-sufficiency is strongly affected by the V2H technology. Fig. 7 shows the median amount of electricity discharged from the EVs to the households relative to the amount of electricity used for driving the EVs, for households with only an EV (blue line) and for households with an EV and a stationary battery (grey lines). For specific combinations of households and EVs (not shown in Fig. 7) the amount of discharged electricity from the EV to the household can be higher than the amount of electricity that is needed to meet the driving demand. For such cases, the EV batteries act more as 1 Data-points are drawn as outliers if they are greater than q3 þ w Â (q3 e q1) or less than q1 e w Â (q3 e q1), where w is the maximum whisker length (set as 1.5), and q1 and q3 are the 25th and 75th percentiles of the sample data, respectively. batteries for the household than for the EV, since the largest share of the electricity charged into the EV battery is discharged back to the household. However, the median amount of discharged electricity from the EVs is never higher than the electricity demand for driving when all combinations of households and EVs are summarised (Fig. 7). Discharging from the EV battery using the V2H technology is carried out independent of the size of the EV battery, although the discharged amount is slightly higher with increasing Variations in the percentages of electricity self-sufficiency for households without any storage, households with a stationary battery, households with an EV, and households with both an EV and stationary battery, for households that generate electricity using PV panels with different ALRs. For households without an EV, the variation is shown for the 20 modelled households. For households with an EV, the variation for 400 combinations of households and vehicles is modelled. The central line on each box indicates the median, while the bottom and top edges of the box indicate the 25th and 75th percentiles, respectively. Values considered as outliers 21 are indicated by red crosses, while the whiskers are extended to the most extreme data-point not considered to be an outlier. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.) Fig. 6. Self-consumption (a) and self-sufficiency (b) levels for households without storage, households with a stationary battery, and households with EV, with or without V2H. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics, V2H, vehicle-to-home technology. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household. EV battery size as there is more space for storage beyond what is needed to fulfil the driving demand. Utilisation of the EV battery as an energy storage unit for the households is executed to a greater extent for households with larger PV capacities, as shown in Fig. 7.

Impacts of other parameters
Setting a requirement at the SOC level of the EV battery has a greater impact on the ability of EVs with smaller batteries to act as energy storage units for households, since the energy required for an EV to travel a distance of 50 km occupies a larger share of these batteries (see Fig. B5 in Appendix B). As an example, for households with an ALR of 3 (PV capacity of 8.7 kW p for the median household) and no stationary battery (BDR of 0), the median level of selfsufficiency is 6.5% lower if there is a requirement placed on the energy level in the EV, for an EV with a 15-kWh battery. There are corresponding reductions in self-sufficiency of: 2.4% for a 25-kWh EV battery; 0.9% for a 50-kWh EV battery; and 0.2% for an EV battery of capacity 75 kWh. The impact on the results of having a lower maximum charging power for the EV has been proven to be negligible.

Discussion
The possibility for EVs to contribute to increased electricity selfconsumption and self-sufficiency for households is strongly affected by when and for how long the EVs are plugged in at home. This study shows a greater potential for using an EV as an electricity storage system for households with in-house solar PV electricity generation, as compared to the results presented in the literature. This discrepancy is most likely due to differences in EV travelling patterns. Previous studies have often used an assumed travelling pattern in which the EVs are leaving in the morning and arriving home in the evening. The travelling data from the GPS measurements used in the present study show that at least 36% of the 426 measured vehicles have the possibility to be plugged in at the home location, independent of the time of day or the day of the week. These real measurements of vehicle driving also differ from the driving patterns used in previous studies regarding the magnitude of the increase in electricity demand for households that the introduction of an EV implies. The variation observed in our study for different combinations of households and EVs is substantial, ranging from 366 kWh to 6227 kWh per year, resulting in an increase in the household load of 0.8% up to 224%. The median increase for all modelled combinations of households and EVs ranges from 8.5% for an EV with a 15-kWh battery to 10.5% for an EV with a 75-kWh battery, since a larger share of the demand can be supplied with home charging by increasing the size of the EV battery. As an example from other studies, Munkhammar, Grahn and Wid en [6] found a 37% increase in demand from EVs.
The results of this study should be regarded as the technical potential to use an EV battery as an energy storage unit for a residential household, not as an economic evaluation, and not in terms of any future predictions. When comparing this study to the results in the literature, it is noteworthy that most of the previous studies optimised EV charging with respect to electricity prices on the market. However, this difference in optimisation objective should not affect the results regarding the potential for usage of an EV battery as storage for households to a large extent, since it in most cases is preferable to use in-house-generated PV electricity in the household also from an economic perspective.
The input data used in this study are representative of northern latitudes, with a negative correlation between electricity generation from solar PV and residential power demand, both on a daily Fig. 7. Usage of the vehicle-to-home technology to discharge electricity from the EVs to the households. Shown are the median amounts of electricity discharged from the EV to the household relative to the amount of electricity needed for driving, summarised over a full year for households that generate electricity using PV panels with different ALRs. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. An ALR of 3 corresponds to PV panel capacity of 8.7 kW p for the median modelled household. 2 Data-points are drawn as outliers if they are greater than q3 þ w Â (q3 e q1) or less than q1 e w Â (q3 e q1), where w is the maximum whisker length (set as 1.5), and q1 and q3 are the 25th and 75th percentiles of the sample data, respectively. and an annual basis [6]. For such circumstances, a storage solution is useful only during the months with excess PV generation. In regions with a more even electricity generation from solar PV on an annual basis, a storage solution, such as an EV battery, can be used as storage for households during a higher number of days over the year, due to the greater number of hours with excess PV generation. At the same time, less installed PV capacity is needed for households to become net producers on annual basis, leading to a better match between PV generation and household demand, and thus less hours with excess PV generation where a large storage capacity is useful.
The results show that the ability of an EV to replace a stationary battery and procure the same level of self-sufficiency is strongly affected by the V2H technology. For some households, EV batteries act more as batteries for the household than for the EV. However, this result should be seen as the maximum technical potential for the usage of V2H. In reality, the willingness to use the EV battery as an electricity storage system for the household likely is affected by the planning in the household, since one do not always know when the EV is needed and how much energy that is required to complete the next trip. For such a situation, one likely would prefer to have an energy margin secured in the EV battery. A system with a SOC level in the EV battery that is designed to accommodate such unplanned trips is shown to have a greater impact on the potential to use EVs as storage devices when smaller EV battery sizes are used. On the one hand, the V2H technology might increase the degradation rate of the EV batteries, owing to the higher frequency of cycling of the batteries. On the other hand, using the EV battery also for V2H can avoid the need for investment in a stationary battery or reduce the size of the stationary battery. A previous study conducted by Nyholm [33] has shown that a possible economic investment level for Swedish households is an ALR of 2e4 and a BDR of 1e2. As the EVs have been shown to fulfil the same function as stationary batteries of those sizes, it is possible that they could replace the stationary batteries in such a scenario. However, further studies are needed to ensure that the same economic dispatch is possible for the EV batteries as for the stationary batteries.
As the use of real-life vehicle driving patterns is the basis for these results, the processing of these data obviously has an impact on the results. Driving patterns for a full year are missing, and in this study shorter periods (30e73 days) of measurements are extrapolated. This could affect the results for a specific EV, for example, where the measured period is not representing an average for the whole year. This would mainly affect the results for the outliers in this study. The selection of the 20 EVs and households influences the results. This selection was done in a way that includes as large variations as possible in the electricity consumption and PV generation levels of the households, and in the driving and plug-in patterns of the EVs. Therefore, the modelled combinations do not reflect a statistical selection. Furthermore, the combination of households and vehicles from different studies might not be suitable for all combinations. Consequently, the spread seen in the results for households with EV is probably exaggerated. With that said, the results should be seen more as an analysis of the possible impacts of introducing an EV to households with different habits regarding electricity consumption and vehicle driving.
The hourly resolution of the input data has been reported by Cao and Sir en [34], Wid en, W€ ackelgård, Paatero and Lund [35], and Linssen, Stenzel and Fleer [36] to be problematic with respect to determining the self-sufficiency and self-consumption levels for individual households, resulting in over-estimations of selfsufficiency and self-consumption. However, the introduction of energy storage has been shown to resolve this issue [34,37].
Another assumption made in the present study is that the data regarding driving patterns for gasoline-and diesel-powered vehicles are valid for EVs. For some EVs in the model, additional charging outside the home is needed to complete some trips. This charging ranges from a median of 20.5% of the total electricity demand for driving for all combinations of households and EVs with a 15-kWh battery to a median of 5.3% of the total driving demand with an EV for all combinations of households and EVs with a 75-kWh battery. Charging stations are becoming more common at work-places, in public parking spaces, and along highways. Therefore, the SOC level of the EV batteries when arriving at home could be affected by charging outside of the home location, and this is likely to become more common in the coming years.

Conclusions
The present study shows that residential households with inhouse solar PV electricity generation can achieve the same levels of self-consumption and self-sufficiency with an EV as they can with a stationary battery. A range of different PV capacities (expressed in ALR from 1 to 8, corresponding to a median capacity for all modelled households that ranges from 2.9 kWp to 23.1 kWp), stationary battery sizes (expressed in BDR from 1 to 4, corresponding to a median capacity for all modelled households that ranges from 2.9 kWh to 11.5 kWh), and EV battery sizes (from 15 kWh to 75 kWh) was investigated. For households with a median PV panel size of 11.5 kW p , an EV (with 50-kWh battery) can confer a median level of electricity self-consumption that is similar (only 0.4% points lower) to that provided by a stationary battery with a median size of 8.7 kWh. Similarly, households with the mentioned PV capacity reaches almost the same median level of self-sufficiency (0.3% points lower) with an EV (50-kWh battery) as with a stationary battery that has a median size of 5.8 kWh. However, there is a large variation between households depending on factors such as the driving profile and number of hours parked at home. A stationary battery and an EV battery for storage complement each other for households with larger PV capacity installed (ALRs of 3e8), and the highest median self-sufficiency for all modelled combinations of households and EVs (43%) is obtained for households with both an EV and a stationary battery. Even though the stationary battery in most cases is smaller in capacity than the EV battery, it has the advantage of always being available, whereas the EV is unavailable when not parked at the home location. The V2H technology is necessary for an EV to provide the same service as a stationary battery, and thereby, enable the same level of selfsufficiency. Nevertheless, the levels of self-consumption and selfsufficiency do increase for most households after the introduction of an EV without V2H, as compared to no storage.

Declaration of competing interest
The authors declare no competing interests.
where c h is the charging power capacity of the battery, and b h is the energy capacity of the stationary battery in household h.

Processing of vehicle driving data. Related to section 3 Data
In the vehicle data, the GPS coordinates for the start and end locations of each trip are available, although the GPS coordinates of each vehicle's home are not provided. To identify these locations, the driving pattern of each vehicle was analysed in a way similar to that described by Wu [22]. For each vehicle, a grid of 1 Â 1 km squares were generated based on the vehicle's outermost positions in each direction during the measured time period. Only those trips with less than 1 km between the starting location and previous ending location were used in this analysis. For trips with both their end and start positions within the same square, the parked times in direct connection to these trips were allocated to this square. From this analysis, the home location of each vehicle was defined by assuming it to lie within the square were the vehicle had been parked for the highest number of hours during the measured time period.
In the input data to the model, each EV is set as being plugged in at home during one actual hour if the corresponding vehicle in the measured driving data is parked at home for more than half of that actual hour. If the measured vehicle is not parked at all or parked for a shorter time than half of the hour within this square then the EV is designated as being plugged out. The distance driven for each trip is allocated to the hour when the trip is completed, regardless of whether or not the trip ends at home. This gives the input data for each EV with an hourly resolution as one binary parameter, and one parameter of total driving distance. Thus, an EV can have registered a distance during the hours when it is designated as being plugged in, as a consequence of the hourly resolution. To be able to use the data in a year-based simulation, the driving data were extrapolated from the original period (31e160 days depending on the vehicle) to 12 months, which means that the driving data for each vehicle are used repeatedly. This extrapolation was performed with respect to the days of the week, so that the driving data were matched with the levels of household consumption and PV generation for the same week-day.
Selection of households and vehicles as input to the model. Related to section 3 Data Among the 2221 available households, 20 were selected based on their annual levels of electricity consumption and potential PV electricity generation. First, the households were divided into ten intervals depending on their yearly electricity consumption, ordered from largest to smallest. The ranges of electricity consumption in each of these ten intervals were equally broad, resulting in that not necessarily the same number of households was sorted into each interval. For each of these ten consumption intervals, two new intervals were generated based on the yearly PV electricity generation by the households in each interval, ordered from largest to smallest. The two PV generation intervals for each consumption interval were equally large in terms of the range of the PV electricity generation. The households in each consumption interval were sorted into the corresponding PV generation interval. Finally, one household was randomly selected from each of these, in total, 20 samples. This approach was used to obtain as large a variation as possible in the selected households, with respect to both electricity demand and PV generation.
In a similar way, 20 of the 426 EVs with measured data were selected based on the number of hours that they were plugged in at home and the total driving distance covered over the year. In this selection, vehicles measured during the summer (June to August) were excluded, since their driving patterns most likely would differ from their normal driving behaviour, e.g., due to vacation. First, the EVs were divided into ten intervals depending on how many hours they were plugged in at home during the whole year. These ten intervals were equal in terms of the number of hours, and ranged from the highest to the lowest number of hours at home among all the EVs. For each of these ten intervals, two new intervals were generated based on the EVs' yearly driving distances, from longest to shortest. Each pair of these distance intervals was equally large in term of the range of total distance. The EVs in each of the ten intervals regarding hours at home were sorted into their corresponding distance interval. Finally, one EV was randomly selected from each of these, in total, 20 samples. . Related to section 4.2 Self-sufficiency. Difference in levels of electricity self-sufficiency depending on the correlation between the amount of solar PV electricity generation and the number of hours when the EV is plugged in at home. On the x-axis is the total annual electricity generation per installed kW of PV panels (kWp) during hours when the vehicle is plugged in at home. This correlation is calculated for each combination of household and vehicle and plotted against the difference in self-sufficiency for the household after the introduction of an EV to the household. The difference is positive if the level of self-sufficiency of the household is higher with an EV than without an EV. The plot is for households that lack a stationary battery, and for EVs with a 50-kWh battery. Similar trends, albeit not as significant, can be observed for households that have a stationary battery installed. Abbreviations: ALR, array-to-load ratio; BDR, battery-to-demand ratio; EV, electric vehicle; PV, photovoltaics. Fig. B4. Related to section 4.2 Self-sufficiency. Differences in levels of electricity self-sufficiency between households without an EV and the same households with an EV, depending on how large a share of the total electricity demand for the household (including EV charging) that the EV represents. The difference is positive if the self-sufficiency of the household is higher with an EV than without an EV. The plot is for an EV battery size of 50 kWh and for households that lack a stationary battery. The same trends can be seen for households that have a stationary battery installed. Across all the modelled combinations, EVs account for a median of 9% of the total electricity demand of the households. Abbreviations: ALR, array-to-load ratio; BDR, battery-todemand ratio; EV, electric vehicle; PV, photovoltaics.