Li-ion batteries for peak shaving, price arbitrage, and photovoltaic self-consumption in commercial buildings: a Monte Carlo Analysis

Abstract This study investigates the benefits of introducing Li-ion batteries as energy storage unit in the commercial sector by considering a representative building with a photovoltaic system. Only the costs and revenues related to the installation and operation of the battery are considered in this study. The operational strategy of the battery consists in balancing the following processes through day-ahead forecasts for both electricity consumption and photovoltaic production: shaving a targeted peak, performing price arbitrage, and increasing photovoltaic self-consumption. By reviewing the electricity price cost for commercial buildings from several companies around the world, a general electricity price structure is defined. Afterwards, a Monte Carlo Analysis is applied for three locations with different solar irradiation levels to study the impact of climate, electricity price components, and other seven sensitive parameters on the economic viability of Li-ion batteries. The Monte Carlo Analysis shows that the most sensitive parameters for the net present value are the battery capacity, the battery price, and the component of the electricity price that relates to the peak power consumption. For Stockholm, one of the investigated locations, the corresponding Pearson correlation coefficients are −0.67, −0.66, and 0.19 for the case were no photovoltaic system is installed. For the considered battery operational strategies, the current investment and annual operation costs for the Li-ion battery always lead to negative net present values independently of the location. Battery prices lower than 250 US$/kWh start to manifest positive net present values when combining peak shaving, price arbitrage, and photovoltaic self-consumption. However, the integration of a photovoltaic system leads to a reduced economic viability of the battery by reducing the revenues generated by the battery while performing peak shaving.


Introduction
Electrochemical energy storage systems can provide several services to the grid at the generation site, as well as in the transmission and distribution, and at the end-user side. Generally, the application areas can be categorized as bulk energy services, ancillary services, transmission infrastructure services, distribution infrastructure services, and customer energy management services [1]. From a time perspective, energy storage technologies can be grouped into three main categories: bulk storage (several hours to weeks), load shifting (minutes to hours), and power quality (milliseconds to minutes) [2]. Staffell and Rustomji [3] have reviewed the available electrochemical storage technologies, reporting capital costs and roundtrip efficiencies. Among those, batteries represent a feasible technical solution for distributed energy storage applications in buildings or communities thanks to several advantages such as noiseless operation, low maintenance, high efficiency, and few installation constraints [4].
Understanding the potential of batteries and batteries' operational strategies in providing various services to the electricity grid is a major and timely scientific challenge [5,6]. Peak shaving and price arbitrage are two of the main battery operational strategies that received most of the attention so far.
The peak shaving strategy consists in shifting the load from hours of high demand to hours with lower demand [7]. For instance, Zheng et al. [8] investigated different storage technologies to perform peak shaving in residential buildings and showed that, given the expected price reduction and improved efficiency for batteries toward 2050, the use of private battery systems could eventually lead to significant profit for households. Peak shaving for non-residential buildings is also attractive. This is demonstrated, among others, in the work of Ioakimidis et al. [9], where the use of parked electricity vehicle batteries reduce the maximum peak of the electricity consumption of a university building in Spain from 3% to 20% (depending on the car park occupancy). The benefit of battery electric storage has also been investigated at the scale of the distribution network. Pimm et al. [10] showed for instance that 2 kWh of battery storage in each household allows a reduction of the peak demand of a residential area by half at the distribution network scale. They also showed that, if households are equipped with solar photovoltaic rooftop system (i.e., 3 kW per house), the same level of performance could be obtained by increasing battery storage capacity (i.e., from 2 to 4.5 kWh). In Sweden, Hansson and Lakso [11] showed that a common battery in multifamily buildings with a capacity that corresponds to 0.8-1.3 kWh/apartment could reduce the power peaks by 40%. Besides using batteries, peak shaving can also be achieved through other approaches such as demand side management (e.g., [7,12,13]).
The price arbitrage, instead, consists in storing electricity when the price is low and using stored electricity during high price periods [3,14]. Shang and Sun [15] developed a stochastic optimization model to estimate the potential profit from electricity price arbitrage of two types of plug-in hybrid electric vehicles under three scenarios, with variant electricity tariff and vehicles owners over a five-year period in the United States. However, under the considered market structure and prices, the analysis showed that the expected arbitrage profit is not enough to stimulate a larger adoption of plug-in hybrid vehicles. In a recent work, Lin et al. [16] proposed a methodology to evaluate the economic viability in terms of net present value and payback period of liquid air energy storage technology based on price arbitrage operations in the real-time electricity market in UK, finding that the arbitrage strategies significantly affected the profitability of the solution. Bradbury et al. [17] conducted a similar study in the United States to analyse the profitability of different electric energy storage systems when used for price arbitrage, and determined that only pump hydro storage, compressed air energy storage, and in some cases sodium nickel chloride batteries could be profitable. Metz and Saraiva [18], instead, investigated the potential application of battery storage to pursue price arbitrage on the 15-and the 60-min auctions in use in Germany. The authors ascertained that, considering the present price volatility and cost of the batteries, the revenues were not enough to justify the investment cost. Nevertheless, it is expected that price arbitrage could play a key role in the competitiveness of energy storage solutions in the next future. The transmission tariff has a very significant impact on the operational profitability of batteries based on arbitrage, irrespective of facility scale [19]. Yan et al. [20] performed a techno-economic analysis of energy storage for commercial buildings. The authors took into account the advantages of price arbitrage in the use of batteries to avoid cost for additional central generation capacity. The results indicated that leadacid was the most viable storage solution with the highest net present value.
Proliferation of distributed renewable energy systems, especially photovoltaic (PV), and progress in demand response technologies are increasing the volatility of the price for electricity, leading to even greater challenge and opportunities for storage assets [21]. PV selfconsumption can be increased through different approaches. Luthander et al. [22] addressed how to increase self-consumption of PV system in buildings by analysing different approaches in terms of energy storage and load management. Merei et al. [23] studied PV-storage systems for a supermarket. The study indicated that although battery helps to increase self-consumption, they were not economically favourable at the time of the study. The authors suggested that the battery cost should decrease to 200 €/kWh in order to make battery storage an attractive option in the studied case. Nyholm et al. [24] used monitored household energy consumption data from 2104 Swedish single-family dwellings, and concluded that batteries helped increase self-consumption by 20-50 %. The self-consumption rate can also be increased through the better matching between production and consumption without the implementation of energy storage solutions. Martín-Chivelet and Montero-Gómez [25] proposed a method based on the placing of PV system in different orientations and envelope's surfaces. The proposed method could reach nearly 100% self-consumption and increase the self-sufficiency at the same time. McKenna et al. [26] reported monitored data of 302 UK households with PV system and calculated an average self-consumption rate of 45%. The studied households had higher fraction of daytime electricity usage than average, leading to higher level of self-consumption than the expected standard UK household. Both in the study carried out by Martín-Chivelet and Montero-Gómez [25] and McKenna et al. [26], higher performances in terms of PV self-consumption and self-sufficiency could be achieved with energy storage systems. Similarly, Stridh [27] analysed 369 PV systems with power peak lower than 20 kW p and the self-consumption was 37% in average in 2018. Of 60 PV systems with power peak comprised between 20 and 1000 kW p , the PV self-consumption was 41% in average in 2018.
To the best of the authors' knowledge, there are few studies in literature addressing the potential of Li-ion batteries in commercial buildings integrating PV system with different electricity prices and operational strategies. For example, Mbungu et al. [28] analysed the possibility of designing dynamic behaviour for energy management for commercial building applications in South Africa when PV and battery energy storage systems are mixed. Mariaud et al. [29], instead, conducted an optimisation study to select the capacity and the operation of PV and batteries for commercial buildings in UK thus serving as a decision support tool for evaluating their investment profitability. However, none of the works presented in literature conducted a comprehensive investigation on the profitability of Li-ion batteries in commercial buildings when also a PV system is integrated with varying parameters costs.
This study is an extension of the studies conducted previously by some of the authors of the present paper [30,31] with the following contributions: • a more integrated hybrid operational strategy that includes also 24 h ahead forecasts to study the impact of forecasting accuracies on the profit generation from batteries; • a Monte Carlo Analysis considering more than ten sensitive parameters, including electricity cost components, to assess the profitability of Li-ion batteries for the use in commercial buildings; • use of different electricity profiles for different climatic zones (Johannesburg, Stockholm, and Rome) to analyse the impact of climate on the economic viability of Li-ion batteries.
Therefore, the main novelty of this study relies on the parametric investigation of the profitability of Li-ion batteries in commercial buildings, by modelling the savings from both peak shaving, price arbitrage, and PV self-consumption, when different sensitive parameters are considered. This study does not focus on classical optimization algorithms for battery energy dispatch, as performed for instance in Liu et al. [32], in Mahmoud et al. [33], and in Sichilalu and Xia [34] due to the computational time constraints to simultaneously perform Monte Carlo Analysis and a full year dispatch optimization at high temporal resolution The paper is structured as follows: after the Introduction, Section 2 provides the details of the models and summarizes the methodology by highlighting the main input data used in this study. Then, Section 3 is divided into three parts to report the main results of this study. The first two parts deal with the techno-economic analysis and sensitivity analyses of different battery operational strategies. The last part of Section 3 discusses the results of the Monte Carlo Analysis to identify the main sensitive parameters on the economic viability of Li-ion batteries.
Section 4 draws the conclusions of the work. More information concerning the input data, methodology, and models validation are provided in the Appendix.

Data
In this study, the measured hourly electricity consumption of a commercial building in Västerås (59.60 • N, 16.54 • E), about 100 km west of Stockholm, Sweden, was used as a reference building electricity consumption. The electricity profile refers to 2017. The building is connected to the district heating system for the supply of the heating and cooling demand; therefore, the seasonal signal embedded within the electricity consumption pattern stems from change in lighting throughout the year. For sensitivity analysis purposes, we have considered three locations with different solar irradiation: a) Stockholm, with 961 kWh/m 2 (annual global horizontal irradiation); b) Rome, with 1640 kWh/m 2 , and c) Johannesburg, with 2020 kWh/m 2 [35]. The same electricity consumption for appliances and lighting has been considered for Rome while with respect to Johannesburg, this electricity profile has been adjusted to take into account the different season alternation in the south hemisphere. To further generalize the electricity consumption profiles, it has been assumed that the heating and cooling demand of the building was satisfied by means of heat pumps, thus including the effects of ambient conditions (i.e., ambient temperature and solar radiation). The hourly weather data (i.e., ambient temperature, wind speed, and solar radiation (global horizontal and diffuse horizontal)) for a typical meteorological year are from Meteonorm database [36]. The electricity consumption for heating and cooling is further detailed in Section 2.3 and in the Appendix.
In order to evaluate the influence of different forecasting algorithms on the effectiveness of the battery operational strategy (see Section 3.2), we have used the available multi-year measured data at hourly resolution from a further representative commercial building located in Västerås (59.60 • N, 16.54 • E). The available data were used for training the shallow and deep neural networks for forecasting. The data concerning hourly meteorological data were retrieved in this case from the Swedish Meteorological and Hydrological Institute (SMHI) [37].

Electricity price
We have reviewed the electricity price tariffs of several cities around the world, focusing mostly on the electricity tariffs for commercial buildings. The results are summarized in the Supplementary Material. For all the cities considered, the electricity price scheme refers to commercial loads. Despite some discrepancies in the components cost included into the tariff, a generalized equation of the electricity cost could be derived: where, c 1 is a constant tariff (US$), which can be associated to a fixed yearly fee, as for the case of Stockholm (see Supplementary Material), c 2, t (US$/kWh) refers to the hourly price of the power consumption integrated in the hour t P c,t (kWh), c 3 (US$/kW/month) is a tariff for the monthly max power consumption P max,m (kW), c 4,t is the tariff at which the surplus of PV electricity is exported (P exp,t ). The product c 2,t ⋅P c,t is an element-by-element multiplication since c 2 can vary with the time as it is for the electricity spot price [38] or in the time-of-use tariff [39]. It includes charges due to generation and distribution. As regards to c 4 , the electricity exported to the grid has typically a lower economic value compared to the electricity bought from the grid (i.e., c 2 > c 4 ) [40]. For instance, the retail electricity price c 2 for a commercial company in Sweden ranges from 0.1 to 0.15 US$/kWh (1 SEK ≈ 0.1 US$) including grid charges and taxes, while the average PV electricity selling price c 4 is around 0.03 US$/kWh (the early average of 2018 was 0.458 SEK/kWh in zone SE3, which is more than two times higher than 2015 when it was 0.206 SEK/kWh) that is the Nord pool electricity trading price excluding green electricity certificates (the value has become very low in 2020 and will almost disappear if nothing changes in the laws about the certificates) or other compensations [40].

Building heat and cooling consumption
Regarding the heating and cooling demand, it is assumed to be satisfied by means of a heat pump, thus including the influence of location on the global electricity load profile (sum of the electricity for heating and cooling and the reference building electricity consumption profile). In particular, the heating/cooling demand of the building has been calculated by solving the following energy balance: where Q h&c is the heating or cooling consumption (kW), M is the thermal mass of the building (kg), c p is the specific heat capacity (kW/(kg⋅ • C)), T is the indoor temperature ( • C), t is the time step (1 min), HG the heat gains (kW), and HL the heat losses (kW) [41]. The 1-min simulation results are aggregated to hourly data to temporally match the electricity consumption profile. We have assumed to have the same building with the same characteristics in all the three considered locations. An assumption of this study is to use a proportional-integral-derivative (PID) controller to provide a better control compared to simple on/off type control and it is described by the following differential equation [42]: where u is the control signal for heating and cooling, k p is the proportional gain, k i is the integral gain, k d is the derivative gain, and e is the error signal. The tuning of the PID controller has been performed through trial-and-error method. Regarding the duration of the heating and cooling seasons, each country adopts its own regulations with the common goals of assuring the internal comfort of the users while limiting the energy consumption. In this study, the following logic has been adopted to define the heating and cooling seasons for all considered locations: the heating season is marked out by a daily average ambient temperature lower than 15 • C, while for the cooling season the daily average temperature is 25 • C. The building model is implemented in Matlab®. More details about the building model are provided in the Appendix. The total electricity consumption profiles for all the investigated locations are also provided in the Appendix.

PV systems modelling
The production of electricity from the photovoltaic system has been calculated using the I-V curve approach as in Walker [43]. The global tilted radiation has been calculated from the global and diffuse horizontal radiation using the Perez transposition model [44]. The transposition model is embedded in the open-source package OptiCE [45]. A PV system of 150 kW p has been assumed based on the load profile to avoid significant over production. Concerning the PV system orientations, the azimuth angle has been set equal to zero for all the locations. The tilt angle has been set equal to 40 • for Stockholm using the relationship latitude/optimal tilt angle as provided recently in Campana et al. [46] for Sweden. For Johannesburg and Rome, the optimal tilt angle has been calculated using the recommendation provided by Jacobson and Jadhav [47]. The degradation rate of the PV system has been assumed equal to 0.5%/year [48].

Li-ion battery modelling
The Li-ion battery has been modelled by using the improved Shepherd model as in Tremblay and Dessaint [49]. The model describes the voltage-current relationship depending on the state of charge of the battery. In particular, the charging and the discharging processes are modelled following Eqs. (4) and (5), respectively: where V is the battery voltage (V), E 0 is the battery open circuit voltage (V), K is the polarization resistance (Ω), Q is the battery capacity (Ah), it is the extracted capacity (Ah), i is the battery current (A), i* is the filtered current (A), A is the exponential zone amplitude (V), B is the exponential zone time constant inverse (Ah − 1 ), and R is the internal resistance (Ω).
The battery lifetime has been estimated by the following equation [50,51]: where, C(t) is the effective capacity degradation over time (%), C 0 is the initial effective capacity (%), a, b, and c are fitting parameters, T is the temperature (K), T r is the reference temperature (K), ΔSOC is the state of charge variation (%), and n is the number of days. The assumed fitting parameters are 0.00266, − 7280, and 930, respectively [51]. The battery temperature is calculated using a lumped thermal capacity model [52].
To prolong the battery lifetime, we assumed to operate the battery between 10% and 90% SOC [53].

Battery operational strategies
In a similar commercial building, the role of the battery is manifold: (i) increase the PV self-consumption; (ii) balance the peak shaving; and (iii) perform the price arbitrage. The PV self-consumption strategy consists in storing the surplus of electricity production from the PV system, to be used during the hours when the PV production does not cover the consumption, or the production is zero. The savings are generated by the difference in prices between the electricity bought from the grid and the sale of the PV electricity surplus.
When performing the peak shaving, the benefits generated by the battery are dual: reducing the peak power (thus reducing the cost associated to the peak power consumption), and transferring the energy consumption related to the peak power consumption later in the day, when the electricity price is lower. The price arbitrage strategy, instead, consists in charging the battery during off-peak hours, and discharging it during peak hours. The corresponding savings are due to the difference between off-peak and peak electricity prices. In commercial buildings, the peak hours typically coincide with the hours when the electricity prices are high; for this reason, performing peak shaving also implies indirectly performing price arbitrage [54]. Based on day-ahead forecasts on PV production and electricity consumption, the optimal operational strategy of the battery aims at maximizing the revenues or the savings generated by its use.
The PV electricity production and the electricity consumption are forecasted using the persistence forecasting method [55] as follows: where, P pv,f,t is the forecasted PV production integrated in the hour t (kWh), while P pv,t-24 is the measured PV production integrated in the hour t minus 24 h (kWh), P c,f,t is the forecasted power consumption integrated in the hour t (kWh), and P c,t-24*7 is the power consumption integrated in the hour t in the previous week. A further comparison with more advanced forecasting techniques, including Artificial Neural Networks (ANN) and Long Short-Term Memory (LSTM), is provided in the Results section, and complemented in the Appendix. The operational strategy can be summarized as follows: • if the forecasted day-ahead PV electricity production is lower than the forecasted day-ahead electricity consumption, the battery can be employed for peak-shaving and price arbitrage strategy. We assumed monthly peak shaving targets, P target,m = αP max,m , where α is equal to 80% of the historical monthly max power consumption. If the power consumption exceeds P target,m , power is taken from the battery to cover the difference between P target,m and the actual power consumption. Besides shaving the specified monthly peak power target, the battery provides power to the electric load during the peak hours until being fully discharged, whilst it is recharged during the night time during off-peak hours (i.e., low electricity price) • if the forecasted day-ahead PV electricity production is larger than the forecasted day ahead electricity consumption, the battery  employs a hybrid strategy that combines PV self-consumption, peakshaving, and price arbitrage.
In real applications, the set-up of the hybrid operational strategy can be carried out starting from the analysis of the annual hourly PV production and load profiles. As can be seen from Fig. 1, the PV production is likely to be higher than the consumption during the hours 09:00-16:00 for a slightly oversized PV capacity with the goal of increasing self-sufficiency. This period defines when the PV-selfconsumption strategy is performed.
A summary of the input parameters for the PV-battery system is given in Table 1. The battery capacity has been assumed fixed at 210 kWh/50 kW for all locations (a sensitivity analysis concerning the battery capacity has been performed in the Monte Carlo simulations). It corresponds to a Tesla Powerpack second generation [56]. No incentives for the installation and operation of the battery have been considered in this study. The annual maintenance rate has been assumed equal to 2% of the initial investment cost (ICC) [57]. In the calculations, the battery lifetime corresponds to the minimum value between the assumed battery lifetime and the equivalent number of cycle at depth of discharge [57]. We have assumed a tax rate of 25% on the income generated by selling electricity. This differs in different countries depending on the electricity market and tax regulations.
In this study, we have investigated only the costs and revenues related to the installation and operation of the battery to analyse the real benefits generated by it. Considering the entire system (PV + battery) can lead to inaccurate results in terms of which component contributes more to the NPV. Thus, the investment and operation costs of the PV system have been neglected. Two references cases are investigated in terms of system integration: case A without PV system and case B with PV system.

Performance evaluation
The performance of the operational strategies has been quantified using as indicator the Net Present Value (NPV). The NPV is calculated by using the following equation: where ICC is the initial investment cost (US$), CF y is the cash flow at the y-th year (US$), d is the discount rate (%), and n is the battery lifetime (yr). The cash flow considers the annual savings generated only by the installation of the battery and the salvage value as revenues, while the operation and maintenance costs due to the installation of the battery are the expenses.

Monte Carlo Analysis
To assess the NPV of the battery investment, a sensitivity analysis based on Monte Carlo Analysis (MCA) was performed to account for the uncertainty stemming from the parameters that can have significant influence on the worth of the investment. In total, ten parameters were included for the sensitivity analysis: the electricity cost components (c 1 -c 3 ) (Eq. (1)), the PV capacity, the battery capacity, the targeted peak to be shaved, the battery initial investment cost, the discount rate, tax rate, and escalation rate of the electricity price. Due to the deep uncertainty of these sensitive parameters, we have adopted a uniform distribution [60]. The number of samples for the MCA has been assumed equal to 10,000. The MCA code has been developed in Matlab® using the OptiCE framework [45]. A flowchart that summarizes the modelling chain embedded in the Monte Carlo Analysis is provided in Fig. 2. The considered parameters are listed in Table 2 with the corresponding ranges.
The values listed for c 1 -c 3 in Table 2  for Stockholm, and 9.3 US$ (1 AUD ≈ 0.65 US$) for Brisbane. c 3 equals to 15 US$/kW/month (1 ZAR ≈ 0.05 US$) for Johannesburg, or 30 US$ for Rome. c 3 is considered as the highest peak power during the month. The electricity price component c 4 is assumed equal to c 2 /2 in the calculations. As highlighted in the Supplementary Material, each country can have several electricity providers, and within the same provider different commercial load price schemes exist. The main aim of this MCA is to provide general results, rather than country-specific results.

Results
This section is dived into two main parts. The first part shows and discusses the technical results related to the battery operational strategies, and it ends with a techno-economic analysis discussing the advantages of using the hybrid operation strategy in comparison with less sophisticated operational strategies. A sensitivity analysis considering different forecasting approaches is included. This first part addresses the first novelty point on how integrated operational strategies can increase the economic viability of Li-ion batteries. The second part of this section shows and discusses the results of the Monte Carlo Analysis. This last part contains the contribution of this study on the sensitive parameters affecting the economic viability of Li-ion batteries.

Battery operational strategies
The difference between the original electric load, and the electric load after implementing the battery-driven peak shaving (PS), price arbitrage (PA), and PV self-consumption (PV-SC) strategies is shown in Fig. 3. A clear reduction of the peak power is observed, especially during the summer months. Moreover, it is easy to see the monthly trend of the targeted peak shaved. The negative values of the electric load after implementing the hybrid strategy (PS, PA, and PV-SC) refer to the PV electricity surplus, which is exported into the electric grid. A magnification of the hybrid operational strategy profile during one week of August is displayed in Fig. 4 for the cases A and B. To describe the operational strategy in a more intuitive way, we have plotted in Fig. 4 also the battery SOC profiles. From Fig. 4, case A, it can be clearly seen the targeted peak shaving during August. After shaving the peak daily power consumption, the battery is recharged during the night-time hours, following the price arbitrage strategy. The peak power consumption during the recharging process does not exceeds the peak shaving target for the month of August. In the case B, instead, if for a particular day the PV production is higher than the power consumption, the battery is not recharged the previous day (or the battery is discharged before daytime) to perform the PV-SC strategy.
On 17th August, the persistence forecasting algorithm is not able to predict accurately the power production from the PV system. This is because on 16th August the PV production is higher than the consumption. Therefore, during 17th August, the battery is performing PV selfconsumption but without any success since the actual PV production is lower than the electric load. In addition, the peak shaving and price arbitrage strategy is not well performed due to the reduced net electricity consumption after PV production. A more accurate forecasting algorithm could predict a PV production lower than the consumption on 17th August and thus perform the peak shaving and price arbitrage strategy. It might also happen the opposite case and thus the operational strategy does not predict a PV production larger than the load since the PV production of the previous day is lower. In this case, the operational strategy starts to perform peak shaving and price arbitrage but unsuccessfully because the higher PV production will prevent any targeted peak shaving.  Tax rate (%) 25 ± 50% 7 Battery price (US$/kWh) 500 ± 50% 8 Battery capacity (kWh) 210 ± 50% 9 PV capacity (kW p ) 150 ± 50% 10 Targeted peak to be shaved (% of the actual monthly peak) By means of the forecasting approach, it is easy to predict that the power production is higher than the power consumption during 16th August: for this reason, the PV self-consumption strategy is carried out. Despite it is difficult to predict well the PV production for 21st August, given the PV production of previous day, the strategy correctly performs the PV-SC strategy since most likely the previous week's electricity consumption was lower than the expected PV production.
Secondly, the hybrid strategy (PS, PA, and PV-SC) implies a heavier battery usage, as it can be seen in the SOC variation when compared to the SOC profiles for peak-shaving and price arbitrage strategies. In Fig. 4 case A b), the SOC varies between 40 and 90% (set as upper threshold of the battery SOC). It is noted that this variation is not consistent across the entire year since the targeted peak to be shaved varies from month to month. In Fig. 4 case B b), instead, the battery SOC varies from 10% (lower threshold) up to 90%.
The decrease of the monthly power peak thanks to the peak shaving strategy is shown in Fig. 5 for cases A and B. The implementation of the battery reduces significantly the monthly maximum power consumption distribution, especially during the warmest months of the year: this is due to the absence of power consumption peaks for heating. The introduction of the PV system (case B) produces itself a peak shaving effect by reducing the monthly peak power consumption, particularly when compared to the case without PV system (case A). The peak in July for case A without battery is above 100 kW, while with the case B without battery is below 90 kW. This is in agreement with what reported in Jurasz and Campana [54] on the potential of PV systems in reducing the energy costs related to peak power consumption for office buildings. The combination of the peak-shaving strategy and PV self-consumption further decreases the monthly peak power consumption. As can be seen from Fig. 5 case B, this mostly occurs during the periods January-March and July-December. During the sunniest months, there is no relevant difference between the max power peak consumption with and without the performing the peak shaving strategy since the battery mostly targets the PV self-sufficiency strategy.

Sensitivity analysis of operational strategies
To better analyse how the battery operational strategy affects the economic viability of the investment, we compare the NPV for a specific case (investment and operational costs as in Table 1 and electricity price as in Table 2) by applying four main different operational strategies (OSs) and different cases. Those cases consider different PV capacities, peak electricity prices, and forecasting algorithms, including Artificial Neural Network (ANN) and Long Short-Term Memory (LSTM). A detailed description of the OSs and cases is as follows: • conventional operational strategy for PV self-consumption without Only in this section, we have assumed a PV system capacity of 50 kW p since the maximum electricity consumption of the available multiyear measured load profile was about 30 kW (see Section 2.1). The OSs and cases are summarized in Table 3. The results are shown in Fig. 6 in terms of NPV versus OSs and cases. A more detailed description of ANN and LSTM forecasting approaches is presented in the Appendix.
As it can be seen in Fig. 6, all the investigated operational strategies and cases returns a negative NPV for the battery: this implies a nonprofitable investment, based on the input economic data from Tables 1 and 2. Price arbitrage (OS2) and the combined peak shaving and price arbitrage (OS3) for this specific case significantly increase the NPV when compared to the PV self-consumption strategy (OS1). This is mainly due to the high seasonality of solar radiation (and thus PV production) in Sweden, with potential surpluses of production concentrated during few months of the year. In comparison with the strategy PS, PA/ NO PV-SC (OS3), the introduction of a forecasting method combining peak shaving, price arbitrage, and PV self-consumption increases the NPV of the battery. The most significant improvement is achieved with the use of neural networks, ANN, and LSTM. The LSTM increases the NPV by almost 15% as compared to the persistence forecasting algorithm implemented in the OS4. Similar results were presented by Pena-Bello et al. [61] while using batteries for different applications such as PV self-consumption, demand load-shifting, demand peak shaving, and avoidance of PV curtailment.
Although LSTM outperforms the other forecasting techniques and lead to higher NPV, we decided to not take into account more advanced Table 3 Summary of the battery operational strategies and cases as in Fig. 6.  weather forecasts in the Monte Carlo Analysis, due to the lack of real measured data for the other investigated locations (see Section 2.1). Thus, the results in the next section are based on persistence method for forecasting [55] since the data have been retrieved from Meteonorm® for a typical meteorological year. Recent studies on battery energy management have focused on developing operational strategies by considering economic and technical constraints. Nevertheless, those studies did not consider the combination of multiple competing operational strategies. For instance, Liu et al. [62] investigated how the total battery charging cost varies considering both aging effect and dispatch based on the Beijing electricity price variation during the day. Forecasts were not considered, and the optimization is based on a single operational strategy (i.e., price arbitrage). Similarly, Zhou et al. [63] studied how to efficiently operate batteries considering the integration of renewables, buildings, and electric vehicles. Although the authors considered battery aging effects, the core operational strategy of the battery is based only on the net power consumption (power consumption minus renewable electricity production) and forecasts were not included.

Monte Carlo Analysis
The Pearson correlation coefficients between sensitive parameters and NPV are summarized in Table 4 for Johannesburg, Rome, and Stockholm. The most sensitive parameters, i.e., those parameters marked out by the highest Pearson correlation coefficients, are highlighted in bold in Table 4. The most sensitive parameters for cases A are the battery capacity, the battery price, and c 3 . For Stockholm, the battery capacity has a Pearson correlation coefficient of − 0.67 (inverse correlation), while the battery price and c 3 have a Pearson correlation coefficient of − 0.66 (inverse correlation) and 0.19, respectively. Similar Pearson correlation coefficients are also observed in Johannesburg and Rome. Those results are in agreement with those obtained by Nguyen et al. [64] by performing parametric analyses but considering the entire cost of the system (i.e., PV system and battery). In this work, as mentioned in Section 2.6, we have focused on the costs and revenues generated by the installation of the battery because considering the entire system (PV + battery) can lead to inaccurate results in terms of which component́s operation contributes more to the NPV. Concerning the parameters c 1 -c 3 , there is a clear dependency of the NPV on component c 3 of Eq. (1) and thus on the peak power consumption. The NPV results are obviously independent from the flat fee c 1 .
By analysing the A cases, it is clear that the location (and thus the climate) does not affect significantly the MCA results in terms of which components are the most influential on the NPV. For both cases and locations, the battery capacity and the battery price are still the most sensitive parameters. For the B cases, the PV capacity is the most sensitive parameter for Johannesburg (Pearson correlation coefficient of − 0.78) and the third most sensitive parameter for Rome (Pearson correlation coefficient of − 0.31), while c 3 is the fourth most sensitive parameter only for Rome. For Johannesburg, c 3 is the third most sensitive parameter for case A, but in case B, c 2 becomes the fourth most sensitive parameter. This shows that in the presence of a PV system c 2 becomes more influential than c 3 . For the B cases as compared to the A cases, the location and thus how the PV production shapes the electricity consumption profile become important.
Given the results in Table 4, a sensitivity analysis considering different battery specific prices and capacities is carried out for Stockholm. In this analysis, the sensitive parameters as in Table 2 are fixed and thus no MCA is performed. For the sensitivity analysis, four specific battery prices were chosen: 500 (current assumed battery pack price [58]), 250, 150, and 100 US$/kWh (plots a-d, respectively). Those specific battery prices were also assumed in previous research studies [65][66][67]. The results are depicted in Fig. 7 as a function of also the PV  system capacities. The NPV shows positive values only considering battery package from 250 US$/kWh (plot b) downward. Given the battery specific cost assumption, batteries show to be competitive only if the battery capacity is below 60 kWh and if the PV system capacity is below 100 kW. A capacity of 60 kWh with an electricity profile with peaks ranging between 200 kW in winter and 100 kW in summer means that the battery cannot shave the 20% of the maximum monthly power if the peak power last for few hours (see also Appendix for more information concerning the electric load). We can see that for a given battery capacity, the NPV significantly decreases for PV system capacities above 120 kW p . This result can be explained when considering the electricity profile that is featured by peak power consumption around 100 kW  during the sunniest months of the year. Higher PV capacities than 120 kW p lead the battery operational strategy to prioritize PV selfconsumption rather than peak shaving. Nevertheless, peak shaving leads to more revenues than PV self-consumption for Stockholm as testified also by the results summarized in Table 4 with c 3 having an higher Pearson correlation coefficient than c 2 . The results for different locations are presented in Fig. 8 assuming the same specific battery price of 500 US$/kWh (current assumed battery pack price [58]). Similar to Fig. 7, the sensitive parameters as in Table 2 are fixed and thus no MCA is performed. Due to the different electricity consumption profiles, mostly related to the contribution of heating and cooling, as well as different solar radiation and PV production, we can see that at parity of battery and PV capacities, the NPV varies according to climatic conditions. Due to the milder temperature profile of Rome during the winter season, the electricity consumption is lower. Moreover, during winter, the solar radiation in Rome is higher than in Stockholm. The combined effect of temperature and solar radiation profiles lead to a reduced capacity in peak shaving for the battery installed in Rome as compared to Stockholm. This lowers the revenues generated by the battery operation. During the summer, despite Rome has a higher electricity consumption for covering the cooling demand, the higher PV production as compared to Stockholm offsets the potentials of performing peak shaving. It must be pointed out that in the present study the commercial load is featured with peaks mostly concentrated during the sunniest hours. Thus, the use of PV reduces the daily and thus the monthly peaks of power consumption (see Fig. 5). By reducing the monthly peaks of power consumption, the PV system reduces the revenues directly generated by the battery. It is interesting to note that for Rome two optimal PV and battery capacities area exists. One is for about 90 kW p PV system and 100 kWh battery and another one is for PV and battery capacities below 40 kW p and 40 kWh, respectively. Another interesting aspect related to both location and operational strategy is the fact that higher PV capacities than 120 kW p lead to a drastic reduction of the NPV, especially for locations like Johannesburg and Rome that are marked out by high irradiation levels. A more detailed analysis revealing the contribution of price arbitrage, peak shaving, and PV self-consumption revenues is provided in Fig. 9. Stockholm is the location with the highest revenues Fig. 9. Annual revenues generated by the installation of the battery for performing price arbitrage (for Johannesburg (a), for Rome (d), and for Stockholm (g)), peak shaving (for Johannesburg (b), for Rome (e), and for Stockholm (h)), and PV self-consumption (for Johannesburg (c), for Rome (f), and for Stockholm (i)).
due to the peak shaving strategy. The revenues from the peak shaving strategy decreases by increasing the annual irradiation. Due to the highest solar irradiation, Johannesburg shows the highest revenues due to price arbitrage.
Based on the conducted MCA and on the Pearson correlation coefficients, the c 3 component of Eq. (1) resulted to be the third most sensitive parameter for most locations and cases (see Table 4). The MCA results considering c 2 -c 3 and different specific prices of the battery are depicted in Fig. 9. The figure refers to case B (150 kW p PV system and 210 kWh battery). For the sensitivity analysis, we have chosen four specific battery prices as for Fig. 7. The NPV shows positive values only considering a battery pack at a specific price equal or lower than 250 US $/kWh (the black circles in Fig. 10 highlight the border line between profitability and unprofitability (±0.1 kUS$)). Those specific prices could be achieved in a time horizon between 5 and 10 years as reported by Nykvist and Nilsson for electric vehicles battery packs [66]. The 100 US$/kWh target in 2033 and the 80 US$/kWh target in 2038 were reported by Jadum et al. [68] referring to Li-ion batteries for electric vehicles. Recently, Cole and Frazier [69] reviewed capital costs projections for utility scale Li-ion batteries and their costs for 2030 were 124, 207, and 338 US$/kWh for the best, the average, and the worst case. In 2050, the best, the average, and the worst case could be 76, 156, and 258 US $/kWh, respectively. Tsiropoulos et al. [70] reviewed the battery pack costs for different applications from residential to utility scale. The  By comparing Figs 7 and 10, it is clear that the PV capacity has an effect on the NPV of the battery as highlighted in the study carried out by Liu et al. [71] on the optimal design of PV and battery systems with heat pumps. In Fig. 7, we can see that PV battery systems can have a positive NPV at 500 US$/kWh but this is for PV system capacities below 120 kW p . In Fig. 10, instead, given the reference PV system of 150 kW p for case B, positive NPVs are achieved only for battery prices equal or lower than 250 US$/kWh.
It must be pointed out that this work has not considered potential benefits and related revenues generated by the batteries while providing grid ancillary services as investigated by Bartolucci et al. [72], or Münderlein [73], or by Kumar et al. [74], or prolonging the lifetime of key components of the grid such as transformers as analysed in Datta et al. [75]. Further analyses will consider the economic aspects associated to the monetization of these ancillary services.
A further sensitivity analysis is performed to analyse the effects of the location, and thus annual irradiation, on the NPV of battery storage systems with PV systems. This is depicted in Fig. 11 for Johannesburg, Rome, and Stockholm. The figure refers to case B (150 kW p PV system and 210 kWh battery) with assumed battery price of 250 US$/kWh. The figures show an inverse correlation of the NPV with the annual irradiation; indeed, in Johannesburg significantly lower NPVs are achieved as compared to Rome and Stockholm. This is in agreement with the results presented in Fig. 8. As highlighted in Jurasz and Campana [54], higher solar irradiation values enhance the effect of peak shaving and this significantly reduces the peak shaving performed by the battery and thus the related revenues, especially in Johannesburg and Rome. This is clearer by analysing the maximum monthly power consumption before and after the implementation of the hybrid operational strategy, which is provided in Fig. 12 for Johannesburg and Rome.    Table 4, it is clear that the introduction of the PV systems has a significant effect on the most sensitive parameters. Thus, further analysis based on MCA simulations is carried out to better understand the effect of implementing the PV system. The results of such comparison are depicted in Fig. 13, assuming a battery price of 250 US $/kWh for Rome.
As it can be seen, in the case without PV system (case A), the battery is able to generate more revenues as compared to case B also in case of lower values of the c 2 and c 3 electricity cost components and as a consequence for given electricity cost components the NPVs are higher. The distribution of the annual revenues/savings generated by the cases A and B are depicted in Fig. 14. A magnification of the revenues generated by the implementation of the battery and the related hybrid operational strategy is provided in Fig. 15 for both cases and locations. c 3 is the most sensitive parameters affecting the revenues, and thus the economic viability of the battery (see Table 4). By combining the PV system to the battery, the PV system reduces the peak and this affects the revenues in those locations featured by high solar irradiation values (see Fig. 15 (a) and (d) for Johannesburg and (b) and (e) for Rome). In particular, Johannesburg shows an important reduction for the revenues generated by peak shaving after the introduction of the PV system. These results also agree with the results presented in Fig. 6. The operational strategy 3 in Fig. 6 show a clear increase of the NPV when considering peak shaving without PV system. It is interesting to note from Fig. 15 that the introduction of the battery leads to losses in terms of sale of PV electricity (negative revenues) as compared to the case without battery. The revenues related to the sale of surplus of electricity are obviously zero in case A. It is interesting to note that the integration of the PV system does not affect the revenues related to c 3 in Stockholm. This is in agreement with the low Pearson correlation coefficients (-0.05) for the PV system capacity as sensitive parameter of the MCA as shown in Table 4.

Conclusions
This work aims at assessing through Monte Carlo Analysis the economic viability of Li-ion batteries while performing advanced operational strategy that combines peak shaving, price arbitrage, PV selfconsumption, and forecasts. The simulations performed in this study show that Li-ion battery hybrid operational strategy can significantly reduce power peaks, and lead to considerable annual savings. The accuracy of forecasting algorithms is considerably important in increasing revenues while integrating advanced operational strategies. In particular, the implementation of Long Short-Term Memory in the hybrid operational strategy brings to net present values similar to perfect forecasting. However, despite the achieved annual savings, a negative net present value for the battery is found for all the studied locations, indicating that at the current assumed battery prices (i.e., 500 US $/kWh) the proposed hybrid operational strategy does not lead to a profitable investment. Positive net present values can be achieved with optimal design of PV and battery capacities for specific battery prices below 250 US$/kWh. Further developments in battery technologies should decrease the initial and operational costs, and eventually leading to a profitable implementation of batteries in these systems. Besides the battery price, the results of the Monte Carlo Analysis show that the most sensitive parameters are the battery capacity (Pearson correlation coefficient − 0.67 for Stockholm), and the peak power consumption component of the electricity price (Pearson correlation coefficient 0.19 for Stockholm). Eventually, the results of the Monte Carlo Analysis show also that the integration of a photovoltaic system leads to a reduced economic viability of the battery by reducing the revenues/savings generated by the battery while performing peak shaving.

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.

Forecasting algorithms
The 24 h-ahead forecast for both the solar radiation and the electrical load have been performed with a two-layer feedforward network (sigmoid transfer function in the hidden layer, and linear transfer function in the output layer) as described in the following relationship [76]: where, y i is the i-th output, f is the linear transfer function, m is the number of hidden neurons, w ji and w kj are the weights, x k is the k-th input, and θ j are the biases. A further comparison was carried out by using recurrent neural network (RNN), in particular Long Short-Term Memory (LSTM) given by the following mathematical expressions [77]: where, x t are the inputs, h t-1 are the output of the LSTM, σ is the sigmoid activation function, W f , W i , W o , and W c are the weight matrices, b f , b i , b o , b c are the biases, • is the Hadamard product, f is the forget gate, i is the input gate, o is the output gate, and c t is the cell state. The predictors for the forecasts have been: hour of the day, day of the year, ambient temperature, solar altitude and azimuth angles, previous day solar radiation pattern (for the solar radiation forecast), and previous week load (for the load forecast). The results of the solar radiation forecasts using the persistence method, ANN, and LSTM are depicted in Fig. A1.

Building model
The electricity consumption for appliances, and lighting is depicted in Fig. A2. It has been measured from a commercial building in Västerås, 100 km west of Stockholm, Sweden. The commercial building contains mixed activities, such as shops, offices, warehouse, workshop, and other commercial activities.
Concerning the simulation of the building heating and cooling consumption, we have considered three heat losses: losses due to transmission (HL t ), ventilation (HL v ), and infiltration (HL i ) as described in Campana et al. [78]. The heat gains are due to the solar heat gains and internal heat gains. The solar heat gains through the windows (HG s ) have been calculated as follows [79]: where A w is the windows area (m 2 ), SHGC is the solar heat gain coefficient assumed constant (%), and I is the incident solar radiation on the building surfaces (W/m 2 ). The internal heat gains due to people and appliances are taken from Sveby [80]. Some of the characteristic parameters of the actual reference building are summarized in Table A1. The thermal energy demand for domestic hot water Q dhw (kWh) has been calculated using the approach described in Campana et al. [78]. In this  study, we assumed that the daily volume of hot water per person is equal to 30 l/day since it is a commercial building, the total number of people working in the building is equal to 30 and the cold and hot water temperatures are 10 and 55 • C, respectively. The hourly profile has been constructed using the hourly profile provided in Hendron, and Burch [81]. The thermal energy consumption has been converted into electricity consumption by assuming that the heat pump COP is related to the ambient temperature as empirically suggested by Li et al. [82]. An example of the model output is presented in Fig. A3 for Rome. The total electricity consumption profiles including, electricity consumption for heating and cooling, and domestic hot water are summarized in Fig. A4 for all the investigated locations. The building model described in Section 2.3 has been validated using the open-access data from Oak Ridge National Laboratory, Building Technologies Research and Integration Center, Campbell Creek Research House #3 [83][84][85]. The input data used for the building model validation refer to solar radiation and heat supply, and well as indoor and outdoor temperatures. The characteristic parameters of the building, such as U-value and heat recovery ratio of the ventilation system, have been estimated through data mining approach. The results of the model validation for the Campbell Creek Research House #3 in terms of measured and calculated indoor temperature are given in Fig. A5. The model predicted the indoor temperature with an error lower than 0.2 • C.

Battery model validation
The battery model has been validated with experimental data obtained from National Aeronautics and Space Administration (NASA) Open Data Portal, Li-ion Battery Ageing Dataset [86]. The data are collected on commercial 18,650 Li-ion batteries with 2 Ah nominal capacity, cycled at  Constant Current (~1C) between +4.2 V and +2.5 V, until 30% capacity loss is achieved. The parameters of the modified Shepherd version proposed in [87], K, A and B, are the empirical fitting parameters, representing the polarization resistance (Ω), the exponential zone amplitude (V), and the exponential zone time constant inverse (Ah − 1 ), respectively. The fitting was implemented in Matlab®, and the parameters K, A and B were obtained by means of least square minimization. R (Ω) is the ohmic resistance [87] assumed 0.047 Ω in the present case. In Fig. A6, a portion of the cycling (chosen randomly between 250 and 300 cycles) is displayed, together with the associated fitting with modified Sherperd. The fitting is characterized by a high correlation coefficient R 2 (99%), and a rapid computational time (10 s), as it can be seen in Fig. A6. The model displays the highest instantaneous error at end-of-discharge; however, the error is inferior to 1%, which is a good result for empirical models [87,88].