Solar-photovoltaic-power-sharing-based design optimization of distributed energy storage systems for performance improvements

Proper energy storage system design is important for performance improvements in solar power shared building communities. Existing studies have developed various design methods for sizing the distributed batteries and shared batteries. For sizing the distributed batteries, most of the design methods are based on single building energy mismatch, but they neglect the potentials of energy sharing in reducing battery capacity, thereby easily causing battery oversizing problem. For sizing the shared batteries, the existing design methods are based on a community aggregated energy mismatch, which may avoid battery oversizing but cause another severe problem, i.e., excessive electricity losses in the sharing process caused by the long-distance power transmissions. Therefore, this study proposes a hierarchical design method of distributed batteries in solar power shared building communities, with the purpose of reducing the battery capacity and minimizing the energy loss in the sharing process. The developed design method ﬁ rst considers all the distributed batteries as a virtual ‘ shared ’ battery and searches its optimal capacity using genetic algorithm. Taking the optimized capacity as a constraint, the developed method then optimizes the capacities of the distributed batteries for minimizing the energy loss using non-linear programming. Case studies on a building community show that compared with an existing design method, the proposed design can signi ﬁ cantly reduce the battery capacity and electricity loss in the sharing process, i.e. 36.6% capacity reduction and 55% electricity loss reduction. This study integrates the considerations of aggregated energy needs, local PV power sharing, advanced community control, and battery storage sharing, which will be useful to optimize three functions (energy ef ﬁ ciency, energy


Introduction
Buildings are large energy end-users worldwide [1].In both E.U. and U.S., above 40% of total primary energy is consumed in the building sector [2].To mitigate the large carbon emissions in the building sector, increasing solar photovoltaic (PV) are installed in buildings, due to its easy scalability, installation and relatively low maintenance.The Swedish Energy Agency set a target that building installed PV systems contribute 5e10% of the total electricity generation by 2040 [3].Worldwide, the capacity of PV systems installed in the residential sector is predicted to rise to 1.8 TW by 2040 from 104 GW in 2014 [4].The installation of PV systems transforms the building's role in the urban energy systems from electricity 'consumers' to electricity 'prosumers', i.e. electricity consumers which also produce on-site electricity from renewable energy sources [5].A detailed comparison between the electricity consumers and prosumers is given in Ref. [6].When building prosumers produce more energy than their energy demand, they are called 'positive energy buildings'.And when multiple building prosumers are grouped in a building community, they can form a positive energy district (PED), which is defined by IEA as energyefficient and energy-flexible building areas with surplus renewable energy production and net zero greenhouse gas emissions [7].Solar power shared building community is the type of positive energy district in which buildings can share their surplus PV power with other buildings [8].Such energy sharing can help increase the community aggregated-level PV power self-consumption (i.e. the amount of PV power used on-site instead of exporting to the power grid) and thus reduce the grid power usage.A study conducted in Ref. [9] shows that a basic energy sharing among 21 residential buildings in Sweden, i.e. aggregate the electricity demand and supply of all the buildings, can easily improve the PV power selfconsumption by over 15%.
Many studies have been conducted to facilitate the energy sharing techniques in solar PV power shared building communities from perspectives of microgrid technology [10e12], electricity trading business models [6,13], and community designs [14] etc. Regarding the microgrid technology, some studies have recommended using DC (direct current) microgrid for PV power sharing considering the large converting losses between AC (alternating current) power and DC power, since the PV panels, battery storage, and many modern loads (e.g.pumps, compressors and servers) are often operating with DC power [12].In the EU2020 Energy Matching project, the Ferroamp developed an EnergyHub DC microgrid system for power sharing within a building community and bidirectional power flow between the DC grid and utility AC grid [10].The operating voltage of the DC microgrid is 760 V and the communication of EnergyHub is based on TCP/IP protocol.Another example is the DC microgrid developed by Chen et al. [15] with an operating voltage of 380 V and communication with the EMS based on RS-485 or ZigBee protocol.Regarding the business models, Parag and Sovacool [6] identified and proposed three promising potential prosumer markets related to prosumer grid integration (i.e.prosumers provide services to a microgrid), peer-to-peer models (i.e.prosumers interconnect directly with each other, buying and selling energy services) and prosumer community groups (i.e. a group of prosumers pools resources or forms a virtual power plant).Similarly, Zhang et al. [13] developed a four-layer hierarchical system architecture model (i.e.power grid layer, ICT layer, control layer and business layer) to identify and categorize the key elements and technologies involved in P2P energy trading.In the developed model, they simulated the bidding process in business layer using game theory.Regarding the community design, Jafari-Marandi et al. [14] proposed a homogeneity index to quantify the diversity of load/supply profiles and evaluated the energy sharing potentials under different homogeneity index with different levels of diversity.Notably, Huang et al. [16] developed a clustering-based grouping method to design building communities from a large number of buildings, which can help maximize the energy sharing potentials in each sub-community.Both these two studies conclude that a large diversity in the load/supply profiles inside a community would create more potentials in energy sharing.These energysharing-related studies can effectively improve the local balance between electricity load and supply and thus the PV power selfutilization at the community-level.However, due to the large intermittent characteristics of PV power and limited energy sharing potentials, in most cases energy sharing alone cannot completely balance the electricity load and supply in buildings.Energy storage systems, which conducts direct regulation on the electricity demand profile, is another effective tool for balancing the local electricity load and supply.
Existing studies have developed many design methods for the distributed energy storage systems (named 'individual design' in this study).For instance, Baniasadi et al. [17] developed a particle swarm optimization (PSO) algorithm-based design method to size the electrical energy storage and thermal energy storage system in a building with the purpose of reducing life-cycle cost of the PVbattery system.Considering the demand prediction uncertainty, battery degradation and maintenance, in Ref. [18] a genetic algorithm-based design optimization method was developed, which uses the energy system life-cycle costs as the fitness function and the users' performance requirements as the constraints.Considering the uncertainty, system degradation and climate change, Lu et al. [19] developed a robust design optimization method for selection of energy systems in zero energy buildings.They evaluated three scenarios: (1) Deterministic design; (2) Markov chain-based robust design without considering the aging effect; (3) Markov chain-based robust design considering the aging effect.Similarly, Bozorgavari et al. [20] developed a robust planning method of the distributed battery energy storage system from the viewpoint of distribution system operation with the goal of enhancing the power grid flexibility.They consider a set of factors including the degradation and operation costs of energy storages systems, the revenues, the technical limits of the network indexes and uncertain renewable energy sources.They model the planning problem using non-linear programming method.The abovementioned design methods size each individual battery separately based on single building's energy mismatch, while the possible energy sharing among buildings in reducing the required capacity of energy storage is neglected.Considering the possible energy sharing among different buildings, Sameti and Haghighat [21] developed a mixed-integer linear programming (MILP) optimization-based method to design the distributed energy storages of a net-zero energy district in Switzerland.Their developed method takes into account factors including the location of host buildings, type of energy storage technologies and associated size, the energy distribution network layout and the optimal operating strategy.Pareto analysis was used to identify the best integrated district energy system which minimizes both the total annualized cost and equivalent CO 2 emission while ensuring the reliable system operation to cover the demand.This study considers the surplus sharing (i.e.use one building's surplus power to meet other buildings' electricity demand), but the storage sharing (i.e.store one building's surplus power in other buildings' batteries) is not considered.
Some studies have investigated the community shared energy storage system design (named 'group design' in this study) and its performances.For instance, Parra et al. [22] designed a method to calculate the optimal community energy storage (CES) systems for end-user applications based on the levelized cost, which considers round-trip efficiency and durability.Their simulation-based case studies showed that the application of a community energy storage to 100 houses could reduce the levelized cost by 56% by shifting demand compared to a single house energy storage installation.Based on the results, they concluded that the application of a community shared energy storage could result in a good solution to facilitate the usage of distributed renewable energy generation and manage the loads.Sardi et al. [23] developed a framework for designing CES in an existing residential community system with rooftop solar PV units.Their proposed method first determines the optimal CES location, which minimizes the annual energy loss, based on Center of Gravity (COG) theory.Then, it optimizes the CES capacity that meets a user-defined annual load factor.Last, it optimizes the operational characteristics of CES to flatten the daily demand profile and improve the voltage profile.Their study results indicated that 22% of community energy storage could reduce the annual purchased energy cost from the grid by 11.1% and the annual energy loss cost by 36.9%.Dong et al. [24] developed an agentbased model for simulating the operation of household energy storage (HES) systems and CES both for PV installed residential building community.Using the developed model and operation strategy, they analyzed the performances of different types of systems from technical, economical and environment aspects.Their study results indicated that both HES and CES could significantly reduce the peak grid power imports and exports, improve the community self-consumption rate and self-sufficiency rate, and contribute to high energy saving.However, this study only considers the surplus sharing but neglects the storage sharing in the HES.As a result, the performance of the HES is not as good as the CES under the same aggregated capacity.In another study, Dong et al. [25] investigated the impacts of the heterogeneous building electricity demand on the battery performances (i.e.selfconsumption rate, self-sufficiency rate and battery degradation) using the same agent-based modelling as [24].They concluded that the change in community demand was insignificant to the overall self-consumption rate and self-sufficiency rate of the community and was unlikely to cause significant CES capacity degradation.
In the CES, there are actually two forms of energy sharing: surplus sharing (i.e.use the surplus PV power to meet the electricity needs in other buildings) and storage sharing (i.e.store or take electricity from other buildings' batteries) [26].The buildings first share their surplus PV power with other buildings with insufficient PV power production (i.e.surplus sharing).Then, the remaining surplus PV power will be stored in the shared CES (i.e.storage sharing) if the aggregated surplus power is larger than the aggregated deficiency, or the remaining power shortage will be taken from the shared CES if the aggregated deficiency is larger than the aggregated surplus power.Contributed by such energy sharing, the CES typically performs better than the conventional HES, which does not enable energy sharing or only enable very limited energy sharing (e.g.only surplus sharing enabled in Refs.[24,26]) In recent years, with the development of advanced energy storage controls for energy sharing, such as the simultaneous approaches (which optimize all the energy storage's operation simultaneously with the goal of achieving aggregated-level optimum) [27,28], bottom-up approaches (which optimize single energy storage's operation one by one in sequence until all the energy storages are optimized to achieve the aggregated-level optimum) [29,30], and top-down approaches (which first identify the community aggregated-level optimum and then coordinate single energy storage's operation to achieve the aggregated-level optimum) [31], the HES can achieve nearly the same level of energy sharing and thus the similar performances as the CES system.In fact, due to the frequent low-voltage energy exchanges with the CES system which can be located in a long distance from the buildings, there can be significant amount of electricity losses due to such longdistance power charging/discharging.The HES, on the other hand, can store most of the electricity near the buildings and thus reduce the energy losses due to long-distance power transmission.
To sum up, the existing individual design methods (e.g.Refs.[17,18]) size the distributed batteries according to single building's energy mismatch, but the potentials of energy sharing in reducing battery capacity is mostly neglected, thus easily leading to oversized systems with high initial investment and high battery storage losses.While the existing group design methods (e.g.Refs. [22e24]) size the centralized battery according to the building community's aggregated energy mismatch, which can effectively reduce the required capacity by energy sharing.However, there is large electricity losses due to the long-distance low-voltage power transmission.Moreover, these design approaches of CES are not applicable to the scenarios that buildings need to install their own batteries or there is no space for installing a CES with large size.Therefore, this study proposes a hierarchical design method for the distributed batteries in solar PV power shared building community, with the purpose of reducing the required battery capacity by applying energy sharing and minimizing the electricity loss in the energy sharing process.The developed design method first considers all the distributed batteries as a virtual 'shared' battery and searches the optimal capacity of the virtual 'shared' battery using genetic algorithm.Such optimized capacity of the virtual 'shared' battery is considered as the minimized capacity required by the whole building community to achieve the required communitylevel performance (e.g.meet a required self-consumption rate).
Based on the optimized aggregated capacity at community-level, the developed method then optimizes the capacity of the distributed batteries installed in each building using non-linear programming with the objective of minimizing the storage sharing (and thus the associated power loss due to long-distance power transmission).For validation purpose, the developed design method is compared with two existing design methods (i.e.individual design for distributed batteries and group design for centralized battery) based on a virtual building community located in Sweden.The major contributions of this study to the subject are summarized as follows.
A hierarchical design optimization method is developed to improve the cost-effectiveness of distributed battery system in solar PV power shared building community.The developed design can make use of the surplus sharing and storage sharing in the building community to keep more PV power inside the building community, thus eliminating the requirements of large-sized battery and power exports to the grid.The performances of the developed design are compared with a conventional individual design for distributed batteries (i.e. the battery is sized based on single building's power mismatch, and energy sharing is conducted after battery regulation) and a group design for centralized battery (i.e. the battery is sized based on the aggregated buildings' power mismatch, and energy sharing is conducted before and in the battery regulation) in aspects of economy and energy.The detailed energy sharing processes, including surplus sharing and storage sharing, are analyzed in a Swedish community, which can be easily replicated in other contexts.This paper is organized as follows: Section 2 describes the overall hierarchical design of distributed battery system for the solar PV power shared building community.Section 3 presents the detailed building model and energy system models.In section 4, the developed design is applied on a case building community located in Sweden, and its performance are compared with two existing designs/scenarios.The conclusions are provided in section 5.

Methodology
This section first introduces the energy sharing and battery sharing scenarios.The proposed hierarchical design of the distributed batteries in PV power shared building communities is then introduced.After that, the building and system modelling for validating the proposed design method is presented.

Basic idea of energy sharing and typical design scenarios
Existing studies have proven that energy sharing is effective in enhancing the renewable energy self-consumption rates (i.e. the percentage of renewable energy that is used onsite) at the building community level.Such enhanced self-consumption can further contribute to the reduced economic costs, improved energy efficiency, and reduced grid interactions [26].The energy sharing can be implemented by installing an energy sharing microgrid to connect the buildings within the solar PV power shared building community [12].In this study, the energy sharing within a solar powered building community is further classified into two types: surplus sharing (i.e.use the surplus PV power to meet the electricity needs in other buildings) and storage sharing (i.e.store or take electricity from other buildings' batteries).Table 1 summarizes the three scenarios of battery sizing and the energy sharing configurations, and Fig. 1 presents the operation strategies.
In Scenario 1, the capacity of the distributed battery is determined by the power mismatch (i.e.deviation between power demand and power supply) of each individual building, i.e. individual sizing.Since the battery is usually installed inside the building, the energy loss due to power transmission in battery charging/discharging is low.In Scenario 2, the capacity of the centralized battery is determined by the aggregated power mismatch of the whole building community.Since the positive-power-mismatch buildings can compensate with the negative-power-mismatch buildings (i.e.surplus sharing), the required capacity of the centralized battery can be significantly reduced at the aggregated-level.However, on the other hand, due to the increased distance between buildings and centralized battery, and the frequent low-voltage power exchanges with the centralized battery, large energy loss exists.The proposed hierarchical sizing (Scenario 3) combines the merits of both the individual sizing and group sizing, with reduced battery capacity and reduced transmission loss.

A hierarchical design of distributed batteries for a solar power shared building community
This sub-section presents the developed hierarchical design method for distributed batteries in solar power shared building community.The proposed design will combine the merits of both individual design (i.e.low energy loss due to power transmission from/to battery) and group design (i.e.reduced battery capacity due  Scenario 1 (Individual sizing for distributed batteries): Each building has its own individual battery.The surplus PV power production (as compared with electricity demand) of the building will first be stored in its own battery.After the battery is fully charged, the remaining surplus power will be sent to the building community to meet the electricity demands of other buildings with insufficient power production (i.e.surplus sharing).If there is still surplus power remaining after meeting the building community's power needs, the remaining surplus power will be sold to the power grid.On the other hand, when there is PV power deficiency, the buildings will take electricity following the sequence from (i) their own batteries, (ii) building community and (iii) the power grid.In this scenario, only surplus sharing is enabled.The buildings cannot exchange electricity with other buildings' batteries.Scenario 2 (Group sizing for centralized battery): The buildings in the community have one centralized battery.For such centralized battery scenario, the surplus power from one building will first be used to meet the power needs from buildings with insufficient PV power production (i.e.surplus sharing).After compensating the large power supply and large power needs inside the building community, the remaining surplus/insufficient power will be stored-in/taken-from the centralized battery (i.e.storage sharing).If there is still surplus/insufficient power remaining, such remaining surplus power/insufficient power will be exported-to/imported-from the power grid.Scenario 3 (Proposed hierarchical sizing for distributed batteries): Inspired by the centralized battery design and energy sharing operation logic, this study proposes the following operation scenario for distributed batteries design with both surplus sharing and storage sharing enabled.The surplus power from one building will first be used to meet the power needs from buildings with insufficient PV power production (i.e.surplus sharing).Then, the remaining surplus/insufficient electricity will be stored-in/ taken-from its own battery.Next, after its own battery being fully charged/discharged, the remaining surplus/insufficient electricity will be stored-in/taken-from other buildings' batteries in the community (i.e.storage sharing).If there is any remaining surplus/insufficient power, such remaining surplus/insufficient power will be exported-to/imported-from the power grid.to energy sharing).The hierarchical design consists of four steps, as depicted by Fig. 2. In Step 1, the PV power production and electricity demand of each individual building and is evaluated and then aggregated to obtain the power supply/demand of the whole building community.In Step 2, using the aggregated-level power supply/demand as inputs, the capacity of a virtual 'shared' battery is optimized using genetic algorithm (GA) according to the userrequired energy performance (e.g. to reach a specific selfconsumption).The optimized capacity of the virtual 'shared' battery is considered as the minimized capacity required by the whole building community to achieve the required energy performance.In Step 3, the capacity of the distributed batteries installed in each building is optimized using non-linear programming (NLP) to minimize the storage sharing (i.e.power exchanges with other batteries) and thus the associated energy loss.2).The electricity demand and PV power generation of each individual building is calculated using the models presented in Section 3.
Based on the aggregated power generation and power demand, the hourly power mismatch (E c m;i (kWh)) at the buildingcommunity-level is calculated using Eq. ( 3).
Step 2: Optimization of the virtual 'shared' battery capacity of the building community using GA In this step, the GA is used to search the optimal battery capacity (CAP c* (kWh)) that minimizes the payback period (PB) of battery while meeting the user-required PV power self-consumption rates (SC th ).In each generation (i.e.iteration), a set of design alternatives of battery capacity (CAP c ) are first generated by the GA optimizer.Then, the performances (i.e.fitness value in the GA) of each design alternative are evaluated and compared.Several optimal alternatives will be selected and used as parent generations to produce design alternatives of the child generations.The process will continue until the optimal solution does not change after several generations.In this study, minimizing the payback period is set as the fitness function as an example, see Eq. ( 4).Note that the fitness functions can be flexibly changed according to the users' needs.
J fitness ¼ minðPBÞ s:t SC !SC th (4) The PB is calculated as the by Eq. ( 5), which is calculated as the ratio of the investment of the battery and electricity cost savings contributed by battery installation.
CAP c (kWh) is the aggregated battery capacity; r (V/(kWh)) is the unit cost of the battery.Cost c;0 (V) and Cost c;1 (V) are annual electricity costs before and after installing battery, which is calculated by Eq. ( 6).
Cost c;0=1 ¼ X E c grid;i (kWh) is the building community's energy exchange with the power grid in the ith hour, which is calculated as the deviation between the energy mismatch (E c m;i , as calculated by Eq. ( 3)) and the battery charging/discharging rates (E c bat;i ), see Eq. (7).c i (V/kWh)) is the hourly electricity price.c buy (V/(kWh)) is the price of purchasing electricity from the power grid, and c sell (V/(kWh)) is the feed-in-tariff.
In this study, the battery is considered to be continuously operating.The calculation of the charging/discharging states of the virtual 'shared' battery are described as follows.
Discharging state: When the community-level power mismatch (E c m;i ) is larger than zero, the building community has insufficient PV power generation, and thus the battery is in discharging state.The battery discharging rates E c bat;i (kWh) should be smaller than both the amount of electricity stored in the battery and the battery charging limits, as shown by Eq. ( 8).
Charging state: When the community-level power mismatch (E c m;i ) is smaller than zero, the building community has surplus PV power generation, and thus the battery is in charging state.The battery charging rates E c bat;i (kWh) should be smaller than both the remaining storage capacity of the battery and the battery charging limits, as shown by Eq. ( 10).
h charge is the battery discharge efficiency.The self-consumption rate (SC), i.e. the percentage of PV power that is consumed on-site, is calculated by Eq. ( 11), in which P E c grid;i;À is the aggregated amount of electricity exported to the grid (E c grid;i with negative values).
The output of the GA search is the optimal capacity of the virtual 'shared' battery (CAP c* ) which has the minimal PB while meeting a user-required SC.The aggregation of the distributed battery capacities, to be optimized in Step 3, should be equal to CAP c* .
Step 3: Optimization of distributed battery capacity for single building using NLP In this step, the capacity of distributed batteries ([CAP 1 ;CAP 2 ;…; CAP n ] (kWh)) installed in individual buildings is optimized using NLP based on the virtual 'shared' battery capacity.The objective function of the NLP is expressed by Eq. (12), which aims at minimizing the amount of storage sharing (i.e. the required energy exchanges with other buildings' batteries).The lower limit and upper limit of the capacity are set as [0,0, …, 0] and [CAP c* , CAP c* , …, CAP c* ], representing that the capacity of individual battery should be in the range of 0 and the aggregated capacity.By minimizing the required energy exchanges with other buildings' batteries, the energy loss due to long-distance low-voltage power transmission can be significantly reduced.

E c
bat;i ¼

<
: h trans s:t E j bat;other;i (kWh) is amount of energy stored-in/taken-from other buildings' batteries, as depicted in Fig. 3. Fig. 3 displays the operation logic of battery operation and energy sharing in the proposed hierarchical design in the ith hour for each individual building.
h trans is the power transmission efficiency.For more detailed operation logic and calculation of E j bat;other;i , please refer to Fig. A1 in the Appendix.The key parameters are explained below.To make the main text concise, the detailed calculation of these parameters is presented in Fig. A2 in the Appendix.E m;i (kWh): the hourly energy mismatch (calculated as the deviation between the hourly power demand and power production).E cluster;i (kWh): the amount of surplus power sharing with other buildings in the power grid.This value is determined by the energy mismatch of each individual building E 1 m;i (kWh): the hourly energy mismatch after surplus sharing.E bat;own;i (kWh): the amount of energy stored-in/taken-from its own battery, i.e. the battery charging/discharging rates, as calculated by Eqs. ( 8 The hierarchical design will minimize the aggregated storage sharing (i.e.aggregated E bat;other;i ) and thus maximize the usage of the buildings' own batteries (i.e.aggregated E bat;own;i ).The output of the NLP is the optimized capacity of the distributed batteries [CAP 1* ; CAP 2* ; …; CAP n* ].In this study, the NLP algorithm was implemented in Matlab.Considering the convergence and computational efficiency, the 'fmincon Interior Point Algorithm' in Matlab was used as the solver.For more details of the principles, please refer to Ref. [32].The computational time was around 390 s on an Intel® Core™ i5 computer.
Step 4: Performance comparison and analysis After obtaining the optimized design of the distributed batteries, the building-community-level performances are analyzed and compared with the two existing design approaches: individual design (distributed battery) and group design (centralized battery), i.e.Scenarios 1 and 2 in Section 2.1.In the individual design, the capacity of each building's battery is designed based on its own energy mismatch.GA is used to search the optimal capacity that minimize the PB of the individual battery while achieving a userdefined SC for the individual building.In the group design, the capacity of the centralized battery is designed based on the building-community-level energy mismatch.GA is used to search the optimal capacity that minimize the PB of the centralized battery while achieving a user-defined SC for the whole building community.

Buildings and system modelling
This sub-section introduces the electricity demand modelling, PV and electrical storage system modelling.This study will consider two different battery scenarios, i.e. distributed batteries and centralized battery.

Electricity demand modelling
This study considered a virtual building cluster located in Ludvika, Dalarna region, Sweden.The district is made up of 50 independent households.The residential district is equipped with a direct current (DC) microgrid as described in Ref. [12] for energy sharing.The number of occupants was set to range between 1 and 5 to represent the various scenarios in practice.Meanwhile, some special but practical scenarios, such as working at home (which may lead to high electricity demand), have also been considered in configuring these buildings.The electricity demand of these families is generated using the LPG (LoadProfileGenerator) [33].LPG is a behavior-based tool used to simulate the energy consumption in time intervals down to 1 min.It contains various activities caused by the behavior of different family members in each household, as shown in Fig. 4. The internal functioning of LPG is described in Ref. [34].The tool performs a complete behavioral simulation of occupants in the family and uses it to generate load curves.Every occupant is part of a household along with other occupants and appliances, and every person has various needs at any time point.To meet the occupant's needs, a person can interact with different devices with the possibility of generating electric loads.To decide what to do, each person checks the expected satisfaction associated with each activity and chooses the activity that provides the best improvement.For example, if a person is tired, then he/she will sleep; and if he/she is hungry, he will prepare some food (perhaps using an electric oven), and so on.To accomplish this task, each desire has a small increase at each time-step of the simulation.The amount of increase varies between different desires (i.e.different desires have different recharge times).After the simulation, LPG generates a log file in CSV format to be imported into the energy system simulation.Note that the buildings are assumed to the district heating system, and thus the heating equipment is not considered in the electricity demand calculation.

PV system modelling
The power generation from the PV panel P PV (kW) is calculated by Eq. ( 14) [35], where t is the transmittance-absorptance product of the PV cover for solar radiation at a normal incidence angle, ranging from 0 to 1; I AM is the combined incidence angle modifier for the PV cover material, ranging from 0 to 1; I T (W=m 2 ) is the total amount of solar radiation incident on the PV collect surface; h PV is the overall efficiency of the PV array; CAP PV (m 2 ) is the PV surface area.

Electrical battery modelling
This study used simplified electrical battery models.The electricity stored in the battery is calculated using a simplified model, as expressed by Eq. ( 9).It is estimated as the aggregated hourly charging rates (as calculated by Eq. ( 8)) and discharging rates (as calculated by Eq. ( 10)) [36].

Case studies and results analysis
In the case studies, the 50 buildings with demand data modelled in Section 3.1 were used to test the performances of the proposed hierarchical design method.The weather data of Ludvika was used to model the local PV power productions.The PV system capacity was sized to achieve the zero-energy goal that its annual aggregated PV production equals the annual aggregated electricity demand.This section first presents the electricity demand/supply information of the buildings.Then, the performances of the proposed design are compared with the two existing designs.

Building electricity demand, renewable power generation and electricity mismatch
Fig. 5 displays the annual aggregated electricity demand/supply of the 50 buildings in the building community.Note the demand bars overlap with the supply bars since the PV systems are sized to produce the same amount of power as the annual power demand of each building.For most of these single-family houses, the annual aggregated electricity demand/supply is in the range of 1640e7000 kWh.Among these buildings, building number 10 has the largest electricity demand, which is about 11,660 kWh (because of more occupants).The electricity demand/supply data will be used as the inputs to test the battery system performance under different designs and operation scenarios.
Fig. 6 presents the hourly electricity demand, PV power production and energy mismatch of the 50 buildings of the community in a selected summer week.In the selected summer week, most of the hourly electricity demand of the 50 buildings are in the range of 0e4 kWh, and most of the hourly PV power production is in the range of 0e10 kWh.The hourly electricity mismatch mostly lies in the range of À8e5 kWh.In the time slot with simultaneous positive energy mismatch (i.e. the building has surplus PV power production) and negative energy mismatch (i.e. the building has insufficient PV power production), the positive energy mismatch can compensate with the negative energy mismatch and thus creates potentials for energy sharing.There are two periods in each day with large energy sharing potentials, either in the morning or in the afternoon.At night, the PV power production is close to zero for all buildings, and thus all the buildings are in short of PV power (i.e.no building with surplus PV power).While at noon, the PV power production reaches maximum for all the buildings simultaneously, and thus most of the buildings have surplus power production (i.e.no building with PV power deficiency).
Table 2 summarizes the techno-economic parameters used in this study for performance evaluation of each design.The price of buying electricity from the grid was set to be 0.16 V/(kWh).Considering the negative impacts on the grid stability and safety, the feed-in-tariff was set lower than the purchasing price (i.e.0.05 V/(kWh)) [12].Since this study does not consider the economics of individual batteries, the prices of power trading within the building community are not considered.Please note in practice, the setting of prices for power trading within the building community should provide economic incentives to the stakeholders so that they would prefer trading within the community to trading with the grid.With reference to Ref. [37], the unit price of battery was set to be 250 V/(kWh) including the cost of installation.The maximum charging/ discharging rates of each battery was assumed to be 30% of its capacity.The user-required PV power self-consumption rate was set as 60%.This value will be used as constraint threshold in the battery design.Table 2 also summarizes the parameters related to energy efficiency in each process, e.g.battery charging/discharging (i.e.roundtrip), battery storing, and power transmission loss.Due to the physical constraints, the buildings in an energy sharing community are usually located in the same location.Considering the relatively small differences in the distances between different buildings, this study used the same transmission efficiency for energy sharing among different buildings for simplicity.

Performance comparison at community(cluster)-level
Using the electricity demand and PV power production data as inputs, the three different design methods (see Table 1) have been  used to design the battery system in the building community (i.e.building-cluster).In Scenario 1, the capacity of distributed battery is sized to achieve a 60% self-consumption rate (as specified in Table 2) for each individual building with the minimized payback period (the individual design cannot set the community-level performance as the design goal).In Scenario 2, the capacity of the centralized battery is sized to achieve a 60% self-consumption rate for the whole building community with the minimized payback period.In Scenario 3, the aggregated capacity of the distributed battery is sized to achieve a 60% self-consumption rate for the whole building community with the minimized payback period.Table 3 compares the design results and economic performances of the three methods.Under the individual design and operation scenario, the aggregated capacity of the distributed batteries was 322.1 kWh.While the capacity of the centralized battery in Scenario 2 and the aggregated capacity of the distributed batteries in Scenario 3 were both 204 kWh.The aggregated battery capacities were the same in Scenarios 2&3, since the proposed design used the virtual 'shared' battery capacity (obtained from group design) as benchmark to instruct the sizing of distributed batteries.Meanwhile, since in Scenarios 2&3 the buildings can share their surplus PV power production with other buildings, the need of battery for storing the excessive PV power is reduced.The aggregated battery capacity was significantly reduced (i.e.36.6% decrease) compared with Scenario 1. Correspondingly, the initial investment of battery was significantly reduced in Scenarios 2&3 (i.e.36.6% decrease).The community-level annual cost saving of Scenario 1 was about 5.3% higher than the cost savings in Scenarios 2&3.This is because in Scenario 1 the aggregated battery capacity was much larger, which could help keep more surplus power inside the community and thus reduce the grid power imports.The payback period of the individual design was 19.5 years, while payback periods in the group design and proposed design were both 13 years (i.e.33.3% decrease).Fig. 7 presents the annual PV power self-consumption rates at the building-community-level under the three different designs   without considering the energy loss (i.e.Fig. 7(a), the valued used in the constraint check) and with energy loss considered (i.e.Fig. 7(b)).As shown in Fig. 7(a), all the three designs meet the userrequired threshold for self-consumption rate (i.e.60%).The community-level self-consumption rate is 61% in Scenario 1, slightly higher than the threshold.This is because the individual design takes the single building's self-consumption rate as the design constraint.After meeting the individual building's selfconsumption rate target, by enabling surplus sharing (as explained in Section 2.1), the self-consumption rate at the buildingcommunity-level could be further increased slightly.However, 36.6% increase in the aggregated battery capacity only leads to about 1% increase in the community-level self-consumption, which is not so economical.Fig. 7(b) displays the self-consumption rate considering the energy losses in the battery storage, battery charging/discharging process, and power transmission loss in the energy sharing process (using the efficiency parameters listed in Table 2).When the energy loss is considered, the self-consumption rate in the Scenario 1 decreases to be close to Scenarios 2&3, due to the relatively larger energy loss.Fig. 8 compares the amount of energy losses in different processes under the three scenarios.In Scenario 1, the energy losses occur in the battery charging/discharging, battery storing, and the surplus sharing process.While in Scenarios 2&3, the energy losses also occur in the storage sharing process.In all the three scenarios, the energy loss in battery storage accounts for the largest percentage (i.e.89.9%, 64.2% and 73.2%, respectively).In Scenario 1, the energy loss in battery storing is much larger than Scenarios 2&3 (about 50.1% increase).This is because the aggregated battery capacity is much larger, and thus more electricity can be stored in the battery.The energy loss due to surplus sharing in Scenario 1 is much smaller than Scenarios 2&3.This is because after the battery regulation of each single building's energy mismatch, the remaining energy mismatch of most buildings will approach zero, and thus reducing the potentials of surplus sharing.While in Scenarios 2&3, surplus sharing is implemented before the battery regulating, when there is large diversity between different buildings' energy mismatch, and thus there are more potentials of surplus sharing (and more losses due to surplus sharing as well).The energy loss due to storage sharing in Scenario 3 is smaller than the loss in Scenario 2 (about 2412 kWh decrease).This is because in the distributed battery configuration, the buildings can use their own batteries as part of the electricity storage and thus reduce the need of storage sharing.Such reduced energy loss in storage sharing contributed to a slight increase in the community-level self-consumption rates (i.e. about 0.3% as shown in Fig. 7(b)).Table 4 summarizes the design results of individual batteries under the individual design (i.e.Scenario 1) and the proposed design (i.e.Scenario 3).The sizing results are very different under the two design strategies.For some buildings, the optimal battery capacity is smaller in the proposed design, while for some buildings, the optimal battery capacity is larger.This is because in the individual design, minimizing the payback period was used as the fitness function to optimize the individual battery capacity.While in the proposed design, minimizing the power loss caused by energy sharing (see Step 3 in the proposed method) was set as the fitness function to optimize the individual battery capacity.At the building community level, the aggregated battery capacity is much smaller compared to the individual design (see Table 3).
Fig. 9 presents the aggregated electricity storage in the batteries of the building community under the three scenarios.The aggregated electricity storage is the same in Scenarios 2&3 (i.e. both with a torage capacity of 204 kWh).Due to a larger aggregated battery capacity in Scenario 1 (i.e.322 kWh), on average more electricity is stored compared with Scenarios 2&3.The batteries typically become fully charged in the period 12:00e18:00 from May to August (i.e.Day-120 to Day-240).While in the evenings of these months, the electricity stored in the battery cannot be fully consumed by the buildings, see the storage in the period 0:00e6:00 from May to August.As a result, with the cumulation of surplus PV power, there is a high state of charge during the summer period in Scenario 1. Scenarios 2&3 are slightly better than Scenario 1 in aspects of night discharging, as most of the stored electricity can be consumed.Since the storage loss is proportional to the amount of electricity storing in the battery, there is more storage loss in Scenario 1 compared with Scenarios 2&3 (see the comparison in Fig. 8).
Fig. 10 displays the hourly surplus sharing in each hour under the three scenarios.The surplus sharing is the same in Scenarios 2&3 (see the principals and explanations in Section 2.1).The surplus sharing only occurs during daytime when PV can produce power.In Scenario 1, the surplus sharing process is after the individual battery's regulating (when most of the buildings' remaining energy mismatch will approach zero).As a result, the amount of surplus sharing is very limited in Scenario 1.In Scenarios 2&3, there is large surplus sharing in the early morning (especially at 8:00 in the summer period from May to August, Day-120 to Day-240) and late afternoon.This is because in these two periods there is large possibility of simultaneous positive-energy-mismatch and negative-energy-mismatch in the buildings (as explained in Fig. 6).At night, all the buildings have positive energy mismatch (due to zero PV power production), while at noon, most of the buildings have negative energy mismatch (i.e.maximized PV power production).In Scenarios 2&3, the surplus sharing reduces the battery needs of buildings for keeping the surplus power inside the community.Due to a lack of solar irradiation in winter, the surplus sharing is very limited.Fig. 11 displays the amount of storage sharing in Scenario 2 (i.e.centralized battery design) and Scenario 3 (i.e.distributed battery design).Note that in Scenario 1 there is no storage sharing.The storage sharing in Scenario 2 is much larger than Scenario 3, since any charging/discharging of the centralized battery is considered as the storage sharing.In Scenario 3, only the part of electricity stored in other buildings' batteries is considered as storage sharing.Due to the long-distance power transmission for storage sharing, the electricity loss due to storage sharing in Scenario 2 is nearly two times the loss in Scenario 3, as highlighted in Fig. 8.The storage sharing process occurs mostly in the morning (9:00e11:00) and in the evening (18:00e24:00) in the summer period from May to August (i.e.Day-120 to Day-240).In the summer mornings, the distributed battery of each building will gradually become fully charged due to the large solar irradiance but at different speeds (because of different PV size, power demand, and storage capacity).Some batteries are fully charged more quickly than others, and thus the buildings installing these batteries can store their surplus PV power in other buildings' batteries which are not fully charged yet.While in the summer evenings, the buildings, which used up all the stored electricity in its own batteries, can take electricity from other buildings' batteries.At summer noon, as most of the batteries are already fully charged, there is not any storage sharing.Due to a lack of solar irradiation in winter, the storage sharing is also very limited.Fig. 12 presents the building-community-level hourly electricity exchanges with the power grid under the three scenarios.The community-level hourly electricity exchanges are nearly the same in Scenario 2 and Scenario 3 (with the same aggregated battery capacity and both enable full energy sharing).For all these three scenarios, there are large electricity exports to the grid in the afternoon (i.e.12:00e18:00) from May to August (i.e.Day-120 to Day-240).There are large electricity imports from the grid in the morning (i.e.7:00e10:00) and evening (i.e.19:00e23:00) in the winter period (i.e.Day-300 to Day-30 next year).In Scenario 1, due to the installation of larger sized batteries at aggregated level, the amount of electricity exported to the grid is relatively smaller than Scenarios 2&3 (e.g.see Region A in Fig. 12).The amount of electricity imported from the grid is also smaller in Scenario 1 (e.g.see Region B in Fig. 12).Such reduced grid power exchanges contributed to 5.3% more electricity cost savings in Scenario 1 compared with Scenarios 2&3 (as calculated in Table 3).

Performance comparison of a single building
Section 4.2 presents the overall performances at the building community level.This section selects one of the buildings from the community as an example and analyzes its detailed operation and electricity exchanges in a typical summer week.Fig. 13 illustrates the hourly energy exchanges of the building in a selected summer week under the three different scenarios.A negative value of energy flow indicates surplus PV power production while a positive value represents larger electricity demands.
In Scenario 1, during daytime the battery is first charged until it becomes fully charged (see the blue regions).Then, part of the remaining surplus is shared with other buildings in the building community.However, the amount of surplus sharing is very limited since most of the buildings in the community do not lack PV power.The remaining part is exported to the power grid (see the grey regions).During nighttime, since there is no surplus PV power production (as no solar irradiation), the building takes electricity from its own battery.
In Scenario 2, during daytime the building first shares part of its surplus power with the buildings in shortage of PV power (i.e.surplus sharing, see the green regions).Then, it stores part of the surplus power in the centralized battery (i.e.storage sharing, see the yellow regions).Since some of other buildings do not have surplus power and thus do not need the battery storage, this building can take use more storage capacity from the centralized battery to store its surplus power compared with Scenario 1.After the centralized battery is fully charged, the remaining surplus power is exported to the grid (see the grey regions).During nighttime, the building takes electricity from either the centralized battery or the power grid.
In Scenario 3, the battery storage of surplus PV power is further classified into storing in the building's own battery (see the blue regions) and storing in other buildings' batteries (i.e.storage sharing, see the yellow regions).The sum of the own battery storing and shared storing in Scenario 3 equals the storage in the centralized battery in Scenario 2. Under the same aggregated level battery usage, by dividing the battery into self-usage and shared-usage, the amount of storage sharing can be significantly reduced, which will help reduce the electricity losses due to the long-distance lowvoltage power transmission.
Fig. 14 shows the daily exported electricity to the grid of the building in the selected week.In some days, the amount of electricity exports to the grid is smaller in Scenarios 2&3.This is because in these days (e.g.Day-1, Day-2, Day-3, Day-6 and Day-7) the building shared most of surplus electricity with other buildings.In some days, the amount of electricity exports to the grid is smaller in Scenario 1.This is because in these days the energy sharing potentials are very limited and as a result the battery regulating will dominate the performance: the battery capacity in Scenario 1 is 10.6 kWh while 6.2 kWh in Scenario 3, and thus more electricity can be stored inside the community in Scenario 1.

Conclusions
This study has proposed a hierarchical design optimization of distributed batteries in solar power shared building community.The developed design method first considers all the distributed batteries as a virtual 'shared' battery and searches the optimal capacity of the virtual 'shared' battery using genetic algorithm.
Then, the developed method optimizes the capacity of the distributed batteries installed in each building using non-linear programming with the objective of minimizing the storage sharing (and thus the associated power loss due to long-distance power transmission).For validation, the developed design method has been compared with two existing design methods (i.e.individual design for distributed batteries and group design for centralized battery) based on a virtual building community located in Sweden.Case studies have shown that the developed design can achieve the user-required PV power self-consumption rate at building-community-level with a much smaller aggregated capacity compared with the individual design.Meanwhile, the energy loss due to storage sharing can be decreased compared with the group design.This study has also investigated the surplus sharing and storage sharing inside the building community under the Sweden context.The major findings are summarized as follows: Overview of design results: At a required community-level selfconsumption rate of 60%, the proposed design reduced the aggregated capacity of the distributed batteries by 36.6% compared with individual design (i.e.Scenario 1).The payback period was reduced by 33.3%.By taking advantage of energy sharing, the proposed design can improve the cost-effectiveness of distributed battery system in solar powered building community.Impacts of capacity on performances: With battery capacity increases, the electricity cost savings will increase as more PV power can be kept on-site.But the initial investments and electricity loss in battery storing will increase as well.Such sideeffects do not guarantee that a larger battery capacity is always good.Time when surplus sharing occurs: In the individual design, the surplus sharing occurs mostly in the summer afternoon when the majority batteries are fully charged.While in the group design and propose design, the surplus sharing occurs mostly in the early summer morning (at 8:00) and late summer afternoon.This is because in these two periods there is large possibility of simultaneous positive energy mismatch and negative energy mismatch in the buildings.In total, the amount of surplus sharing increased by 3.8 times in Scenarios 2&3 compared with Scenario 1 by simply changing the sequence of sharing.Time when storage sharing occurs: The storage sharing occurs mostly in summer mornings (9:00e11:00) and evening (18:00e24:00).In summer mornings, the distributed battery of each buildings will gradually become fully charged due to the large solar irradiance but at different speeds.Some batteries become fully charged more quickly than others, and thus the buildings installing these batteries can store their surplus PV power in other buildings' batteries which are not fully charged yet.While in the summer evenings, the buildings, which used up all the stored electricity in its own batteries, can take electricity from other buildings' batteries.Reduction of storage sharing power loss: Compared with the group design of centralized battery, the proposed design effectively reduced the amount of storage sharing, and thus the power loss due to the relatively long-distance low-voltage power transmission.The reduction in power loss reached over 55%.This study does not consider the impacts of PV investment, battery degradation and the power trading business models on the design of individual batteries.In addition, this study used fixed grid electricity price and feed-in-tariff.Different regions/countries can have different electricity price scheme and PV power feed-in policy, which will have large impacts on the electricity costs savings and thus the investment payback.Thus, future work will consider various electricity prices strategies and business models for the power trading within a PED (considering the PV investment and battery degradation) and investigate their impacts on the distributed electrical energy storage system design performance.This study proposed a deterministic design (i.e.assuming all inputs perfectly known), while the uncertainty in the building electricity demand and PV power production is not considered.Neglecting the uncertainty might lead to the designed systems not performing as expected.Future work will also investigate these uncertainties and develop more robust design methods of energy storage systems for PEDs.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Appendix
Fig. A1 presents the operation strategy of the proposed design for distributed battery system, which can maximize the energy sharing inside the building community.Fig. A1(a) shows the operation strategy for buildings with surplus PV power.When a building has surplus power, it first sends the surplus power to meet the large electricity demand in other buildings.If there is any remaining surplus power, the building will use such power to charge its own battery.After its own battery is fully charged, the remaining surplus power will be stored in other buildings' batteries.After all the batteries in the building community are fully charged, the remaining surplus power will be sent to the power grid.Fig. A1(b) shows the operation strategy for buildings with insufficient PV power production.The building will first take electricity from the buildings with surplus power production.If there is still power deficiency, the building will take power from its own battery.Until its battery is fully discharged, the building will take power from other buildings' batteries.After all the batteries in the community are fully discharged, the building will purchase power from the power grid to meet its remaining power deficiency.Step 1: Calculate hourly energy mismatch (i.e.E mis;j , deviation between demand and supply) of all the buildings in the community.
Step 2: Calculate hourly aggregated energy mismatch of the building cluster (E mis;tot ) and the amount of surplus sharing (E share ).The amount of surplus sharing is calculated as the smaller one of the aggregated surplus PV power and the aggregated power deficiency.If E mis;tot is larger than zero, it indicates all the surplus power can be kept inside the building community.The surplus power will be shared by the buildings in shortage of power according to the ratio of insufficiency.
While if E mis;tot is smaller than zero, it indicates all the PV power shortage can be met inside the community.The remaining surplus power exported to the power grid will be determined according to the ratio of sufficiency.
Step 3: Determine the Remaining Energy Mismatch 1 (REM 1) of each building (E 1 mis;j ) after sharing energy with other buildings.E 1 mis;j is calculated as the deviation of E mis;j and the amount of surplus power sharing.
Step 4: Determine operation of each building's own battery (i.e.charging/discharging rates E bat;j , stored energy E store;j , and remaining capacity E rem;j ) based on the REM1.The battery operation should follow the rules described in Section 2.2, Eqs.8e10.
Step 5: Determine the Remaining Energy Mismatch 2 (REM2) of each building (E 2 mis;j ) after battery regulating.E 2 mis;j is calculated as the deviation of E 1 mis;j and the battery charging/discharging rate E bat;j .
Step 6: Determine the amount of energy sharing with other buildings' batteries.If there is remaining surplus power (i.e.P E 2 mis;j < 0), the remaining aggregated surplus power will be stored in the batteries not fully charged according to the ratio of sufficiency.While if there is remaining power deficiency (i.e.P E 2 mis;j > 0), the remaining aggregated power deficiency will be taken from the batteries not fully discharged according to the ratio of deficiency.
Step 7: Update the battery operation and calculate the energy exchange with the grid of each building (E 3 mis;j ) after storage sharing.E 3 mis;j is calculated as the deviation of E 2 mis;j and the battery charging/discharging rate after storage sharing E 2 bat;j .

Fig. 1 .
Fig. 1.Different operation strategies and design approaches of battery system. in solar power shared building community.

Fig. 2 .
Fig.2.Basic idea of the hierarchical design of distributed batteries for solar power shared building communities.Step 1: Evaluation of the aggregated electricity demand and supply of the building community

Fig. 3 .
Fig. 3. Operation logic of battery and energy sharing in the proposed hierarchical design.

Fig. 4 .
Fig. 4. Workflow for the generation of electricity loads using LPG (every person has a set of desires which influence the choice of activities, which in turn use devices which might be associated with an electric load).

Fig. 5 .
Fig. 5. Annual aggregated electricity demand/supply of the 50 buildings in the community (Note the demand bars overlap with the supply bars since the PV systems are sized to produce the same amount of power as the annual power demand of each building).

Fig. 6 .
Fig.6.Hourly electricity demand, PV power production and power mismatch of the 50 buildings in the community in a selected summer week.

Fig. 7 .
Fig. 7. Self-consumption of the whole building community under different scenarios (a) Ideal case without considering energy loss (b) With energy loss considered.

Fig. 8 .
Fig. 8. Energy losses of the whole building community in different scenarios.

Fig. 9 .Fig. 10 .
Fig. 9. Aggregated amount of electricity stored in the building community batteries under the three scenarios (Note the aggregated energy storage is the same in Scenarios 2&3).The unit for the color bar is kWh.(For interpretation of the references to color in this figure legend, the reader is referred to the Web version of this article.)

Fig. 11 .Fig. 12 .
Fig. 11.Aggregated amount of storage sharing in the building community batteries under the two scenarios (Note the storage sharing is not enabled in Scenario 1).The unit for the color bar is kWh.(For interpretation of the references to color in this figure legend, the reader is referred to the Web version of this article.)

Fig. 13 .
Fig. 13.Hourly energy exchanges of a building in a selected summer week under the three different scenarios: (a) Individual design (b) Group design and (c) Proposed design.

Fig. 14 .
Fig. 14.Comparison of daily energy exported to the power grid of a building in the selected summer week for the three different scenarios.

Fig
Fig. A2 illustrates the calculation of battery operation and energy sharing in each hour in the proposed hierarchical design.It consists of the following seven steps.

Fig. A1 .
Fig. A1.Operation strategy for the distributed battery system with maximized energy sharing (a) Operation strategy for buildings with surplus PV power; (b) Operation strategy for buildings with insufficient power

Fig. A2 .
Fig. A2.Calculation of the battery operation and energy sharing in the proposed hierarchical design

Table 1
Three scenarios with different sizing and energy sharing configurations.Individual sizing Distributed battery system Building / Own Battery / Community / Grid Surplus sharing Scenario 2 Group sizing Centralized battery system Building / Community / Centralized battery / Grid Surplus sharing & Storage sharing Scenario 3 Hierarchical sizing Distributed battery system Building / Community / Own battery / Centralized battery / Grid Surplus sharing & Storage sharing (10)0).

Table 3
Comparison of the design results under different scenarios.

Table 4
Summary of the design results of individual batteries using different methods: Individual design (Scenario 1) and Proposed design (Scenario 3).The unit of capacity is kWh.
Unit cost of battery (V/(kWh)) 4Amount of electricity stored in the battery (kWh)Transmittance-absorptance product of the PV cover for solar radiation at a normal incidence angle c buy Price of purchasing electricity from the grid (V/(kWh)) h Efficiency t