Distributed photovoltaics provides key benefits for a highly renewable European energy system

Distributed solar photovoltaic (PV) systems are projected to be a key contributor to future energy landscape, but are often poorly represented in energy models due to their distributed nature. They have higher costs compared to utility PV, but offer additional advantages, e.g., in terms of social acceptance. Here, we model the European power network with a high spatial resolution of 181 nodes and a 2-hourly temporal resolution. We use a simplified model of distribution and transmission networks that allows the representation of power distribution losses and differentiates between utility and distributed generation and storage. Three scenarios, including a sector-coupled scenario with heating, transport, and industry are investigated. The results show that incorporating distributed solar PV leads to total system cost reduction in all scenarios (1.4% for power sector, 1.9-3.7% for sector-coupled). The achieved cost reductions primarily stem from demand peak reduction and lower distribution capacity requirements because of self-consumption from distributed solar. This also enhances self-sufficiency for countries. The role of distributed PV is noteworthy in the sector-coupled scenario and is helped by other distributed technologies including heat pumps and electric vehicle batteries.

obtained costs in a one-node model representing Germany to assess grid expansion need for a 100% renewable system by 2050. In another bottom-up approach, Baecker and Candas 23 developed a co-optimization framework for the transmission and distribution levels of the German energy system. This framework included the development of several typical urban and rural microgrids connected to the transmission grid with an interface, being modeled in a period of 10 days to reduce the computational complexity. The results showed a positive correlation between low-cost distributed PV and the smart operation of heat pumps and EV charging stations, indicating the importance of flexibility in the low voltage grid. In a topdown approach, Müller et al. 24 first modeled the HV level of the German grid, then used the results as input for optimization of curtailment and storage units installed in LV level. They concluded that HV results limited optimization on the LV level. Clack et al. 25 employed a parametrization method to divide the utility and distribution grid by using substations as an interface where electricity flow would cross the boundary of one grid. This interface has the option to include separate costs for inflow and backflow and allowed the simultaneous optimization of utility and distribution infrastructure. This approach was employed for optimizing the energy system of the US from 2020 to 2050, and different scenarios showed cumulative cost savings of up to 18% from distributed generation by 2050.
Child et al. 26 also followed a two-steps optimization process. First, distributed technology capacities were determined with the goal of minimizing electricity cost for prosumers, then the capacity of other technologies is optimized with the goal of minimizing the cost for the whole system. A 17% drop in annual electricity imported from the grid, and a 6% reduction of the peak demand was achieved by solar PV prosumers. Finally, the TYNDP 2022 scenario report 27 assessed three scenarios for modeling the green transition of European energy grid from 2020 to 2050. The assumptions for the 'Distributed Energy' scenario included lower costs for solar PV systems and batteries, higher cost for wind, more decommissioning of conventional plants, and less gas demand than the other scenarios. The optimization for this scenario led to a higher share of renewables than the two other scenarios, in addition to higher electricity demand due to more electrification in the transport and heat sectors.
We extend the previous knowledge by addressing the research gap of modelling distributed and utility PV separately while examining their operational impact on the entire energy system. Hence, our primary research question is: Does distributed PV generate sufficient cost savings from self-consumption and capacity deferrals in the distribution and transmission network to counterbalance economies of scale and benefit the overall energy system? Our focus is to understand the role of distributed PV in system-wide cost optimization, adopting a social planner's perspective and utilizing a model that incorporates realistic grid mechanisms. Additionally, we address the challenge of modeling distributed PV in a macro-energy system that minimizes total system cost. To achieve this, we employ a simplified approach, which is elaborated in the Methods section.
To summarize the following study, we implement a stylized model of the distributed PV that enables to co-optimize its capacity together with other system components in a highly renewable European energy system with 181 nodes and two hourly resolution. This study represents a novel approach as it incorporates high-resolution modeling of the distribution grid and analyzes the role of distributed PV in the European Energy system. We investigate: (i) the effect of distributed solar PV on costs, components, and operation of the system; (ii) the effect of distribution grid costs and losses on the capacity and operation of distributed solar PV, and (iii) the relation between distributed solar PV and distribution grid with other system components such as transmission network and storage. We show that including distributed PV in a cost-optimal European energy system leads to a a cost reduction of 1.4% for the power system, and 1.9-3.7% when the complete sector-coupled system is analyzed. This is because, although distributed PV has higher costs, the local production of power reduces the need for HV to LV power transfer. Distributed PV is utilized alongside home batteries and predominantly installed in conjunction with a higher share of EVs and heat pumps connected to the distribution grid.

Methods
We model a future European energy system with global CO 2 emissions limited to 5% of 1990 level, using 2-hour time resolution for a full year, and 181 nodes to represent the different regions ( Figure 2). We co-optimise distributed PV generation and investment together with the entire energy system, including generation, storage, transmission, and distribution. We model the configuration shown in Figure 1 by defining two buses: HV and LV. Each HV bus is connected to HV buses through AC or DC transmission lines, and to the LV bus of the same node. The connection from the HV to the LV bus represents the lumped capacity of distribution grids in each node, a capacity which can be extended if deemed cost-effective. This way, the capacity of the distribution network is part of the optimisation.
Distribution grids for each region are aggregated into one bidirectional connection based on the assumption that all the individual grids within a node, for example those corresponding to different municipalities within a country, have similar levels of PV and electric vehicles penetration. Basically, distributed technologies are assumed to be equally prevalent in close regional based on community perceptions and government policies.  losses are based on the approximate minimum and maximum values from Table 1 to best demonstrate the effects of distribution grid features (refer to SI, figure S4). It should be noted that since transmission network has no losses in the reference scenario, we assume all the power losses happen in the distribution grid.
A summary of each scenario's parameters is shown in Table 2. Since our main goal is to assess how distributed solar affects the system, every scenario is simulated once without any distributed PV and storage, and once with these technologies included. Our model assumes greenfield optimization for most of the technologies and costs for 2030 (refer to SI, table S2). One exception is that the wind and solar PV installed capacities in 2020 and the capacities of the existing transmission lines are imposed as lower limits. Another exception is that reservoir and run-of-river hydropower plants, as well as pump hydro storage (PHS), are exogenously fixed at 2020 capacities since their potential expansion is limited in Europe. We selected greenfield optimization under the assumption that most of the renewable capacity will be newly built in a distant future year. Our focus is on understanding the impact of distributed generation, so we select 2030 as to account for expected renewable Power flows for AC and DC transmission lines connecting the nodes are modeled using a linearised optimal power flow (LOPF) formulation that captures some of the physical characteristics of the power transmission network by including Kirchhoff's current and voltage law constraints (as described in SI). AC flows are linearised using DC linearisation, assuming that voltage angles differences across branches are small, and that branch resistances are negligible compared to reactance, which means that power losses at the transmission level are neglected. 35,36,37 The energy balance constraint ensures that at every time-step, node and sector the inelastic demand is met.
The connections between HV and LV buses representing distribution grids in every node are modeled with controllable power flow using a transport model, and these connections could include a constant efficiency to represent power losses. Using the transport model, we ignore congestion in the distribution grid. This assumption arguably favours utility technologies as they have higher energy generation and cause congestion more frequently.
In every node, utility-scale technologies and transmission are connected to the HV bus, while demand and distributed generation technologies are connected to the LV bus (see Figure 1).
The grid connection cost for utility technologies is assume to be zero, another assumption which would enhance distributed generation profitability if implemented.
The first two scenarios, A and B, represent the electricity sector. In this case the electricity demand also includes the heating demand that today is provided by electric appliances. This leads to a total of 504 GW potential for distributed solar in Europe that could produce almost 550 TWh/a, a number close to results from other detailed analysis. 39, 40 Total utility-solar potential and maximum generation is 10.5 GW and 11.7 PWh, respectively.
Assumptions for both utility and distributed PV potential are conservative compared to other research conducted in this area. 41 Figure 2.a and 2.b show the regional electricity demand and the potential distributed PV capacity, respectively; while Figure 2.c shows the correlation between the two parameters. As distributed PV capacity is calculated based on population, most areas in Figure 2.c are in the diagonal of the color plot. Many areas have high distributed PV potential, but it might still only cover a small percentage of demand, especially if the area has high industrial electricity demand. Figure 2.d shows the percentage of electricity demand that could be provided by distributed solar in each region if the estimated potential are fully utilized.

Results and discussion
3.1. Trends in system costs and capacity Total system costs for the three scenarios, with and without distributed generation, are shown in Figure 3. For all scenarios, distributed generation reduces the total system cost.
For scenario A, with no power distribution losses and investment costs for the distribution grid of 500 €/kW, the overall system configuration and costs remains roughly the same whether distributed generation is included in the system or not. Scenario B assumes 10% distribution power losses and cost of 1000 €/kW for the distribution grid, showing overall system costs higher than scenario A due to additional generation required to compensate the distribution grid's losses. For scenario B, total system costs decrease by 1.44%, corresponding to 4.1 billion euros per annum, when optimization includes distributed PV generation and home batteries. In scenario A, the system prioritizes utility solar due to the minimal costs associated with transferring energy to the demand bus. Therefore, the absence of distributed PV in scenario A does not affect costs noticeably. However, when faced with a 10% power loss and higher costs for energy distribution, the system makes the decision to utilize technologies directly connected to the LV bus. Therefore, the low cost and no power loss assumptions for power transfer, used by default in many models, hinder the selection of distributed generation in the optimal solution.
For the sector-coupled scenario C, where 10% power losses and 1000 €/kW for the distribution grid are assumed, the cost reduction reaches 14.1 billion euros per annum, equal to a 1.9% reduction. The distributed PV potential is fully utilized in scenario C, so an additional scenario D with 6-times distributed PV potential, equal to 3 TW, is also modeled. The total cost savings for scenario D from distributed PV reach 3.7%, by installing 2.1 TW of distributed PV. This could represent a future scenario in which distributed PV is particularly favored by policy and the dual use of infrastructure extends not only to residential buildings, but also to industrial, commercial, and public buildings, parking lots, ground mounted systems in urban environment, etc. 41, 42 The total costs of technologies using gas for heat production is increased in scenarios C and D when distributed solar is included. This is mainly caused by an increase in gas boilers which will be further discussed later in the paper. It should be noted that the costs for electric vehicles in scenarios C and D are not included. Higher capacities of distributed solar and home batteries in the system means lower capacities of utility solar, utility batteries, and distribution grid, as shown in Figure 4. Other major technologies like wind energy experience no significant difference without distributed generation, and their changes in capacity are below 5%. The effects of distributed generation are much more visible in scenarios B and C. For scenario A, there is respectively a 0.7%, 10.5%, and 5.1% reduction in solar utility, utility batteries, and distribution grid capacity when system is optimized with distributed generation. The small solar utility capacity reduction is almost equal to added capacity of distributed solar, which is installed primarily in southern Europe near nodes where solar utility is already installed at maximum capacity.
The utility battery power capacity reduction is replaced by 1.5 times the capacity added as home batteries. This merely indicates that using home batteries to reduce the demand peak in distribution grid is cost efficient.
The three capacities experience a significant reduction for scenario B, being equal to 26.4%, 33.8%, and 13.5% for solar utility, utility batteries, and distribution grid, respectively. Again, reduced capacity of utility solar and utility batteries is almost equal to the added capacity of distributed solar and home batteries. For the sector-coupled scenario, the changes are more significant if we assume a higher potential distributed PV, being equal to 48.8%, 40.3%, and 25.5% for solar utility, utility batteries, and distribution grid, respectively.
While distributed solar capacity is only 1.6% of the maximum potential for scenario A, it shows a staggering increase to 60.9% for the scenario B, in which 307 GW of distributed PV are installed, and 99.9% for scenario C, in which 504 GW of distributed PV is installed.
Increasing the potential in scenario D leads to 2170 GW of distributed PV installation, meaning more than half of the solar generation is installed in distributed form. This scenario might seem extreme in terms of the very high installed capacity of distributed solar, but it shows that moving towards a fully distributed system would still be cost efficient. A sensitivity analysis for this scenario is included in SI ( Figure S29) assuming lower costs and power losses for the distribution grid, indicating the share of distributed PV still remains significant.
Distributed generation leads to lower capacities of the distribution grid if distributed storage is available. For scenarios A and B, distribution grid capacity is reduced by 5% and 13.5%, respectively. The greater reduction percentage in scenario B is attributed to its more expensive grid, which amplifies the need for cost-saving measures. Power capacity of home batteries for scenarios A and B is 5.1% and 14.1% of the low-voltage (LV) peak demand, respectively. The average discharge time, which is the energy to power ratio for batteries, is about 6 hours for all scenarios. As previously discussed in Victora et al. 43

Regional and temporal patterns for distributed generation
Having seen the overall benefits of distributed generation for the system, we can now look at where distributed generation is more prevalent and what effects it induces. Figure   5.a and 5.b show the share of solar utility and distributed solar generation on the total annual energy generation in each European country, and each node, for scenario B. We can recognize that Southern countries have more solar, both in distributed and utility form, compared to the Northern regions. The distributed solar capacity is however more sensitive to the available solar resource since it is more expensive than utility solar and needs higher radiation levels to become cost-efficient.
Energy generation mix in places with a high share of distributed generation shows a visible reduction in distribution grid usage during summer. Figure 5.c shows the energy mix and demand of Spain in the winter and summer weeks for the scenario B. Only at times when all electricity demand is covered by utility generation, total demand (black line) equals the LV demand (red line). The summer week shows a stable pattern of utility generation from different technologies. As already observed in similar studies, 23, 25 the LV demand becomes flattened as distributed solar and home batteries are added to the system. The flat shape is due to a shift towards more distributed generation which is more cost-effective, and the system attempting to minimize distribution grid capacity costs while maximizing the usage of that installed capacity. During the winter week, most of the demand is met through technologies connected to the HV bus. Although the overall contribution of distributed generation is lowered in winter, home batteries play a big role in reducing distribution load as they store energy throughout the day and release it at the end of the day when demand is ramping up and solar production is decreasing.
The decrease in HV to LV energy transfer is the main factor differentiating systems with and without distributed technologies. In the following we analyse this effect. There is both an overall peak reduction in LV demand during the year, and a daily reduction happening during daytime. Figure 6 shows the energy transfer through the HV-LV connection representing distribution grid for an example region in Spain. In this region, marked in Figure   5.b, distributed solar share of the annual generation is 18.9%. The top four figures compare the yearly and average daily energy transmission from HV to LV and vice-versa. Without distributed generation, the entire electricity demand is being met by generation at the HV buses, so the demand coincides perfectly with the HV to LV energy flow. When distributed generation is included, the HV to LV energy transmission is greatly reduced, especially during summer, indicating a good amount of self-consumption. In some rare cases during the summer there is even some energy being transferred from LV buses to HV buses, shown in blue, which is energy from distributed solar that could be transmitted to other nodes or stored in utility storage. The daily pattern of energy flowing through the distribution grid also shows how the average daytime distribution peak load is reduced nearly 60% in the middle of the day, showing the characteristic 'duck' curve. 45, 46 There is even reduction at night-time, which is most likely due to self-consumption from home batteries.
For the example region in Spain, there is at least a 20% reduction in distribution grid load during 50% of the year. Figure 6.c compares the duration curve of the energy flow through distribution grid from in the example region of Spain with and without distributed generation. The overall curve has shifted downwards, which is the peak reduction that was mentioned, and the shape takes a sharper turn downwards at the right side, which shows the more drastic peak reductions that are happening during the day in summer months.
The curve also has negative values for scenario B with distributed generation, which is the energy being transferred from LV to HV buses. Additional duration curves for different node groups are included in the SI ( Figure S19).
As previously mentioned, one of the advantages of distributed generation is the possibility to increase energy self-sufficiency via self-consumption of solar energy. Energy selfsufficiency is defined as the ability of a country or region to fulfil its own energy needs.
Metropolitans nodes could specially benefit from this, as they have large populations with highly concentrated demand, but lack suitable land for installation of utility scale wind and solar plants, leading to a complete reliance on imports from neighbouring nodes. To evaluate how distributed solar could increase the self-sufficiency, Figure 7 shows the nodal electricity annual balance for scenario B. The green areas are net exporters generating an The right figure, when distributed generation is available, shows a consistent conversion of colors towards white for southern Europe due to higher distributed solar potential. There is also a visible shift observable for the Paris and Madrid nodes as they reduce electricity imports, but such an observation is not discernible for the London node.
Together with the presence of distributed technologies, the other factor highly impacting on regions self-sufficiency is the expansion of transmission capacity among the nodes.
The Gini diagrams in the subplot show how electricity balances change when the system has higher transmission expansion allowance. In the reference case, transmission capacity through HV lines can only be expanded by 10% of current volume. Increasing transmission allowance for scenario B leads to an overall cheaper system and lower capacity installation for all technologies except for wind (refer to SI, figure S16). Local generation and the expansion of transmission cause opposite effects. Strong local generation reduces the need for transmission grid expansion, while a strong expansion of the transmission grid allows for greater centralised power generation at locations with good renewable resource and reduces distributed generation. The effect of moving away from local generation in presence of a bigger transmission grid is a higher overall unbalance rate for the system. A look at the Gini diagrams clearly shows a further deviation of the electricity balance from the diagonal line for expansion of transmission up to 50% of the base network, and for 'no-limit' expansion that allows the system to optimise transmission capacity without limit. However, the system cost savings from distributed generation and storage remain constant, varying by less than 0.05%, for 50% and no-limit transmission expansion allowance scenarios. This means the contribution of distributed solar for the power sector is robust for different transmission expansion limits.

Role of distributed storage
Since solar generation is inherently intermittent, a question can be raised as to how much distributed generation and distributed storage rely on each other. Figure 8.a shows the total energy generation from distributed solar and discharging of home batteries for scenario B during the highest-demand weeks of summer and winter. It is noticeable that home batteries play a significant role in winter, as for example they discharge energy equivalent to 77% of the distributed solar energy generation in this particular week with very high demand.

Impact on heating technologies mix
Widespread electrification across all sectors is required for decarbonisation of energy systems, and there is an expected growth in distributed technologies such as heat pumps  However, their expansion is limited by the CO 2 constraint, thus making solar thermal competitive. In scenario D, the large solar rooftop capacity provides cheap electricity at the LV bus during the day, which during peak heat demand events can be transformed into heat even using low-efficiency resistive heaters connected to district heating systems, preventing the selection of solar thermal in the optimal solution. The observed reduction in installed capacity of heat pumps in scenario D, despite their role in balancing distributed PV generation, may seem contradictory. However, Figure 9.c, illustrating the yearly energy generation from heat pumps, clearly demonstrates that heat pump generation experiences greater fluctuations during summer months when distributed solar is incorporated into the technology mix. Both scenarios C and D have lower heat price for consumers when distributed solar is included in the system, as shown in Figure 9.c for scenario D.

Comparison with relevant literature
Although some of the quantitative results from this study strongly depend on modeling assumptions (refer to SI, figure S4), it is possible to do a general comparison of these results with other similar studies. Child et. al 26 results show close to 1650 GW of installed solar capacity for the power sector scenario, which is fully decarbonized by 2050. This is comparable to 1250 GW solar from scenario B with 95% decarbonization goal. However,   figure S2).

Conclusions
In this study, we model a highly renewable European energy system represented by 181 interconnected nodes in order to analyze how distributed solar PV affects the operation and total costs of the system. The modeling is done for a full year with 2-hourly time steps to capture both the daily and seasonal changes in demand and production.
The results show that the presence of distributed PV and distributed storage reduces total system cost. Assuming 1000 EUR/kW and 10% power losses in distribution grids, total system cost reduces by 1.4% when only the power sector is included and between 1.9 and 3.7% for the sector-coupled scenario. Local energy production by distributed PV at low-voltage reduces the need to extend power distribution infrastructure to transfer energy from utility technologies at high-voltage levels, and increases energy self-sufficiency for many regions, especially in southern Europe. The entire assumed distributed PV potential, equal to 504 GW, is installed for the sector-coupled scenario. If we assume a higher potential based on installing distributed PV also on industrial, commercial, and public buildings, parking lots, and ground mounted systems in urban environment, 2170 GW of distributed PV is installed, which is more than half of the total PV capacity. The presence of heat pumps and battery electric vehicles on the distribution grid level within the system helps eliminate the need for home batteries.
To conclude, distributed PV, although being more expensive than utility PV, help decreasing total system cost for the energy system. This cost reduction is mainly driven by a diminished requirement for distribution capacity and allows for increased adoption of electric vehicles and electrification of domestic heating. Accurate modeling of distribution power losses and costs significantly influences the achieved cost reduction. Therefore, it is important to separately model distributed and utility PV when examining future energy scenarios. Given the substantial potential of distributed PV, models that trade off computational feasibility with the modelling of distributed resources should be further developed.

Acknowledgments
P.R. and M.V. partially funded by the AURORA project supported from the European Union's Horizon 2020 research and innovation programme under grant agreement No.
101036418. Figure 1 of this study has been designed using images made by Iconjam (utility battery and power to heat icons) and freepik (all other icons) from flaticon.com.

Declaration of interests
The authors declare no competing interests.     Each time snapshot t is weighted by the time-step w t , and the sum of time-steps is one year.

Author contributions
A set of constraints are also added to the optimization problem. One of the constraints is that demand is inelastic and must therefore be met completely at each time-step. Other constraints represent different physical and societal limitations such as the maximum renewable potential in every node, maximum transmission expansion, available renewable and non-renewable resources, maximum storage discharge and charge dispatch, and maximum carbon emissions. The objective function and all the constraints are linear, which leads to a linear programme (LP). The power flow in the network goes through two main elements: transmission network, and distribution grid.
Transmission network is comprised of High Voltage Alternating Current (HVAC) lines connecting high-voltage (HV) buses together, as shown in the simplified example in Figure S1. Distribution grid is represented as a single bidirectional connections between each HV bus to its corresponding low-voltage (LV) bus in the same node. The simplest way to model power flow is to use the transport model, also known as network flow model. In this case we ignore all physical features of the power transmission such as line resistance and impedance, and only enforce 'conservation of power'. This is done through the nodal power balance constraint that is modelled with Kirchhoff's Current Law (KCL), as shown Eq.
(2). The KCL constraint ensures that the total inflow power at each bus is equal to the total outflow power plus consumed power. S2) where p i is the active power injected or consumed at node i, and K is the incidence matrix of the network graph which summarizes all connections between other nodes and node i as: not connected (0), connected with start at i (+1), and connected with end at i (-1). The power flowing through every line p l,t is limited by the capacity of the line P l as shown in Eq.
(3), a capacity which is co-optimized if transmission expansion is allowed, as shown in Eq.(4).
|p l,t | ≤p l P l ∀l, t The inclusion ofp l as an extra per-unit security margin on the line capacity serves to provide a buffer to account for potential failures of individual circuits (as per the N-1 criterion) and reactive power flows.
where the sum of transmission capacities P l multiplied by the lengths l l is bounded by a transmission where Θ i and Θ j are voltage angles at nodes i and j, and x l is the line reactance. In the model, KVL is imposed by means of the cycle matrix where C lc contains information on which line l is an element of a closed loop c. 1 l C lc P l x l = 0 ∀c ∈ C Although LOPF improves upon the transport model by including reactance and voltage angles into the model, it also assumes negligible resistance, so power flow in the transmission network in our model is effectively lossless.
Node HV-1 Node HV-2 Node LV-1 Node LV-2 ≈ ≈ AC/DC transmission lines Connection representing Distribution grid line capacity P l,12 line losses 0% capacity P l,22 losses ≈ " ! capacity P l,11 losses ≈ " ! Figure S1: Schematic of connections between two high-voltage and low-voltage nodes in the network. Transmission lines are modeled using LOPF equations and line capacity P l is optimized assuming zero resistive losses. Distribution grid connections are modeled using the Transport model and capacity P l is optimized assuming a constant efficiency of η D .
Modeling the network with LOPF is significantly more demanding computationally than using the transport model. To minimise computational complexity, only the transmission network, meaning all AC and DC HV transmission lines between HV buses, are modelled with LOPF. The assumptions behind LOPF are also more reasonable when looking at transmission lines. The distribution grid is modelled as a single connections between the HV bus and LV bus for each node with the transport model, so the only constraint that applies to it is the KCL constraint. To represent power flow losses in the distribution network, a constant efficiency is assumed for all distribution connections, which could be 100% or 90% (10% power losses) as mentioned in the text.

S2. Distribution grid modeling
Some small-scale studies consider several levels for the grid with a high-high voltage level for transmission network and lower levels (high, medium, low) for distribution grid. 5 In our model we consider only one HV level and one LV level per node. Another approach to modelling the distribution grid is to use 2 unidirectional connections instead of one bidirectional connection. 6 This was tested for the scenario B under different transmission and distribution grid assumptions, as shown in Figure S2. The results showed no significant difference for system capacity mix. This is due to the fact that reverse flows in the distribution grid are very low and the system does not consider it cost-efficient to install any capacity for this direction. Hence, we follow a simple approach using one bidirectional connection. A number of studies including grid reinforcement costs are shown in Table S1. Some of these studies represent grid costs as €/m for distribution lines, or as €/kWh for the amount of energy transfer through the distribution grid. To convert these costs to the unit €/kW, the following is assumed for the European distribution grid : 300 million customers, 10 millions km of power lines, 2800 annual TWh demand 7 and 542 GW peak hourly demand 8 Let us assume that we have a cost of 1 €/km for distribution grid. We can multiply this by the number 10 million (km), which would result in 10 million €as the total cost of the distribution grids in Europe. We can then divide this number by the European energy system peak load, which is 542 GW, and the resulting number could be considered the cost of the distribution grid in €/kW.
This methodology is rather crude, so only the studies where the numbers fall within an established criterion are presented here. S3. Sensitivity of system capacity mix to spatial resolution  S7. Energy generation mix for all scenarios for Italy, Germany, and the whole system when the transmission network allowance goes from 10% of the current network capacity to 50%, and to 'no-limit' expansion optimised by the model. Energy generation figures both show that wind generation is increasing for higher transmission network capacity, compensating for the reduction in solar energy. Due to easy transportation of energy from locations with high wind potential, although installed wind capacity decreases for optimal transmission allowances, wind energy generation continues to increase. The transmission network capacity is equal to 1.7 times the original transmission network for 'no-limit' expansion. is allowed to expand more. Figure S18: Changes in the installed capacity and total energy transmission through the transmission network for different distribution grid costs and losses. The transmission network is allowed to expand without limit in all cases.
The figures show that 1) assumptions on distribution cost have no impact on transmission grid optimal capacity and total transmitted energy, and 2) assumption on distribution losses has a small impact as more energy needs to be transmitted to make up for distribution loss. Figure S19: Duration curve for energy transfer in the distribution grid for entire system, Germany, and Spain. As expected, the LV demand peak reduction is highest for Spain, which has a higher installed capacity of distributed solar. Figure S20: Comparison of electricity price for scenario B with and without distributed technologies for different nodes. When distributed generation and storage are available, the electricity price has a lower variation. The low electricity prices in midday (known as duck curve) can be seen for all nodes and happens on both the LV buses and the HV buses. (1) 6 hours, which is the average time solar power is available, (2) 12 hours, which shows the daily cycle of demand during day and night, and (3) 90 hours. The half-day, daily, and 3-day cycle can still be seen in the LV to HV (lower right) figure. Note: using a 1 year time series limits our ability to see the seasonal peak. Bottom figures show Fourier power spectra of time series for b) battery charger, battery discharger, and battery store hourly fill levels; c) pumped hydro storage (PHS) charger, PHS discharger, and PHS store hourly fill levels; d) battery electric vehicle (BEV) charger, vehicle to grid (V2G), and electric vehicle store hourly fill levels; and e) thermal storage charger, thermal storage discharger, and thermal store hourly fill levels.     S13. Sensitivity analysis for sector-coupled scenario Figure S27: Sensitivity of installed distributed solar to distribution grid cost and distribution grid losses when default distributed PV potential (504 GW) is assumed. There is only a 8.6% reduction in the installed capacity of distributed solar. This shows that 500 GW of distributed solar is still cost-efficient for the system with lower grid costs and no grid losses. Figure S28: Changes in heat generation mix for scenario C when distribution grid cost is 500 €/kW and power losses are 0%. As mentioned in the paper, solar thermal is not selected in this case due to the fact that combined heat and power plants are more cost-efficient.

S12. Role of distributed storage in the system
Figure S29: Comparison of system costs for sector-coupled scenario with high distributed PV potential (3000 GW) with and without distributed technologies where distribution grid losses are 7% and distribution grid cost is 500 €/KW. Cost savings (2.1%) are less significant compared to scenario D (3.7% savings) where assumptions for the distribution grid are 10% losses and 1000 €/KW costs. However, the system still installs 1900 GW of distributed PV, which is 43% of the total installed solar capacity equal to 4400 GW. This shows that even with more conservative assumptions regarding distribution grid, distributed solar is still profitable for the system.

S14. Cost assumptions
Costs for all technologies and the source for each data is available at Github repository of PyPSA