Integrated optimisation of photovoltaic and battery storage systems for UK commercial buildings

(cid:1) Optimal model for selection and operation of photovoltaic and battery systems. (cid:1) Building features and attributes are considered in the analysis. (cid:1) Preferred design and operation inﬂuenced by real-time price models of electricity. (cid:1) Revenues can be derived from providing Firm Frequency Response services. (cid:1) Model provides ﬁnancial indicators to reduce real-world investment uncertainty. Decarbonising the built environment cost-effectively is a complex challenge public and private organisa- tions are facing in their effort to tackle climate change. In this context, this work presents an integrated Technology Selection and Operation (TSO) optimisation model for distributed energy systems in com- mercial buildings. The purpose of the model is to simultaneously optimise the selection, capacity and operation of photovoltaic (PV) and battery systems; serving as a decision support framework for assess- ing technology investments. A steady-state mixed-integer linear programming (MILP) approach is employed to formulate the optimisation problem. The virtue of the TSO model comes from employing granular state-of-the-art datasets such as half-hourly electricity demands and prices, irradiance levels from weather stations, and technology databases; while also considering building speciﬁc attributes. Investment revenues are obtained from reducing grid electricity costs and providing fast-frequency response (FFR) ancillary services. A case study of a distribution centre in London, UK is showcased with the goal to identify which technologies can minimise total energy costs against a conventional system setup serving as a benchmark. Results indicate the best technology conﬁguration is a combination of lithium-ion batteries and mono-crystalline silicon PVs worth a total investment of £1.72 M. Due to the available space in the facility, the preferred PV capacity is 1.76 MW, while the battery system has a 1.06 MW power capacity and a 1.56 MWh energy capacity. Although PV performance varies across sea-sons, the solution indicates almost 30% of the energy used on-site can be supplied by PVs while achieving a carbon reduction of 26%. Nonetheless, PV and battery systems seem to be a questionable investment as the proposed solution has an 8-year payback, despite a 5-year NPV savings of £300k, implying there is still a performance gap for such systems to be massively deployed across the UK. Overall, the TSO model provides valuable insights into real-world project evaluation and can help to reduce the uncertainty asso- ciated with capital-intensive projects; hence proving to be a powerful modelling framework for distributed energy technology assessments. (cid:1) 2017 The Authors. Published by Elsevier Ltd. ThisisanopenaccessarticleundertheCCBYlicense(http:// creativecommons.org/licenses/by/4.0/).


a b s t r a c t
Decarbonising the built environment cost-effectively is a complex challenge public and private organisations are facing in their effort to tackle climate change. In this context, this work presents an integrated Technology Selection and Operation (TSO) optimisation model for distributed energy systems in commercial buildings. The purpose of the model is to simultaneously optimise the selection, capacity and operation of photovoltaic (PV) and battery systems; serving as a decision support framework for assessing technology investments. A steady-state mixed-integer linear programming (MILP) approach is employed to formulate the optimisation problem. The virtue of the TSO model comes from employing granular state-of-the-art datasets such as half-hourly electricity demands and prices, irradiance levels from weather stations, and technology databases; while also considering building specific attributes. Investment revenues are obtained from reducing grid electricity costs and providing fast-frequency response (FFR) ancillary services. A case study of a distribution centre in London, UK is showcased with the goal to identify which technologies can minimise total energy costs against a conventional system setup serving as a benchmark. Results indicate the best technology configuration is a combination of lithium-ion batteries and mono-crystalline silicon PVs worth a total investment of £1.72 M. Due to the available space in the facility, the preferred PV capacity is 1.76 MW, while the battery system has a 1.06 MW power capacity and a 1.56 MWh energy capacity. Although PV performance varies across seasons, the solution indicates almost 30% of the energy used on-site can be supplied by PVs while achieving a carbon reduction of 26%. Nonetheless, PV and battery systems seem to be a questionable investment as the proposed solution has an 8-year payback, despite a 5-year NPV savings of £300k, implying there is still a performance gap for such systems to be massively deployed across the UK. Overall, the TSO model provides valuable insights into real-world project evaluation and can help to reduce the uncertainty associated with capital-intensive projects; hence proving to be a powerful modelling framework for distributed energy technology assessments.

Introduction
Growing concerns about climate change and the associated decarbonisation agenda, research for energy independence and geopolitical evolutions have led countries to rethink their energy consumption. In this context, carbon intensive organisations in the UK, such as food retailers with a complex supply chain and a large property portfolio, are investigating pathways to reduce their carbon footprint while making financially attractive investments.
Photovoltaic (PV) and battery systems are two technologies that hold great potential to positively impact energy use in buildings http [1][2][3]. Electricity produced by a photovoltaic system can be directly used on site, hence reducing the electricity imported by the business, decreasing its electricity bill and associated carbon costs. Similarly, the battery system can be used in different ways to maximise revenue streams; for example, by shifting electricity demand of the building to reduce costs or by providing grid services. Overall, such systems can be appealing to investors if the business case offers sensible returns. However, it is difficult for decision makers to assess the attractiveness of such investments, as identifying the appropriate technologies, capacities, energy yields, and operational strategies can be challenging and highly uncertain [4]. Furthermore, each building is different and there is no ''one size" that fits all solutions. Due to these factors, it is commonplace to discourage technology investments without conducting a thorough analysis. This issue suggests there is a great need to develop robust and comprehensive models assessing the impact new technologies can have on buildings with a focus on providing business certainty before making an investment.
Different simulations and optimisation models have been developed in this field of research. These solutions range vastly in complexity and scope [4], with a more detailed overview of existing work provided in the following section. Simple models in the literature assume pre-defined electricity consumption profiles, fixed energy costs or no grid-connection (e.g. isolated minigrids) and average irradiance levels, while the most complex approaches feature changing electricity demand, market-based electricity prices, and historical irradiance values using accurate time granularity. The purpose of this paper is to introduce a systems-view enduser optimisation model that quantifies the techno-economic and environmental benefits of integrating PV and battery storage systems in UK commercial buildings. The steady-state model establishes the baseline energy costs of running a building and builds an optimal financial business case by identifying the preferred technologies to install, their capacities and operating strategies. To capture the complexity of this problem a mixed-integer linear model is used to combine all the complex elements mentioned earlier. Hence, the model framework allows for any UK commercial building to be assessed if half-hourly electricity loads, location and building size are known. Furthermore, impacts of policy schemes such as the UK Carbon Reduction Commitment and Feed-in-Tariffs are also evaluated. The overall techno-economic analysis provides meaningful insights regarding system design specification and operation by identifying the optimal investment on a realistic mid-term perspective of 5 years.
This paper is structured in seven sections. The current section has provided the background and purpose of this work. The second section provides a more detailed review on previous works in this field of research. The third section provides a formulation of the problem, while the fourth section describes methodology details such as the data structure and treatment. The fifth section displays the mathematical formulation, while the sixth section showcases results from a case study. Lastly, the final section provides concluding remarks.

Literature review
The design and operation of distributed energy systems for the built environment have been reviewed by Theo et al. and Bazmi & Zahedi [4,5]. Efficient distributed energy system design is a complex task since it is influenced by a broad range of factors which include various generation technologies and fuels (e.g. PV, internal combustion engine, fuel cell, biogas, biomass, etc.), storage technologies (e.g. batteries, compressed air, capacitor storage, flywheels, etc.), building application types (e.g. industrial, commercial or residential), energy resource costs, resource availability and heat recovery approaches, load demand analysis of all energy streams, as well as various techno-economic, environmental and socio-political factors [4,6]. Although complex, sound efforts have been made to develop frameworks and engineering approaches to support optimal design of such energy systems [7].
In this context, various publications have focused on designing a broad range of distributed energy systems usually with multiobjective criteria, such as in Gao et al. [8]. Meanwhile, Cedillos et al. [6] developed a mixed-integer linear model to optimise the technology selection and operation of combined heat and power (CHP) and organic Rankine cycle (ORC) units for commercial buildings. Falke et al. [9] describe a multi-objective optimization model for the investment planning and operation management of distributed heat and electricity supply systems, using various heat and power generation units as well as storage systems and energy-saving renovation measures. However, it is worth noting that a significant portion of existing works address isolated systems, i.e. stand-alone microgrids, e.g. Huneke et al., Malheiro et al. and Li et al. [10][11][12], the last two focus on optimally sizing PV/wind/battery systems for electricity generation and storage.
Much research has been conducted on particular elements of PV and battery systems in the context of their integration with the built environment. Regarding battery management, Kalkhambkar et al. [13] cover energy loss minimization in networks through peak shaving using energy storage while Lee et al. [14] present a novel coordinated control algorithm for distributed battery energy storage with the objective of mitigating voltage and frequency deviations.
Assessing available irradiance has a great importance in PV system design. Solar irradiance is commonly measured on-site or obtained via third parties. However, other methods are available, such as the use of artificial neural networks [15], machine learning techniques [16], or several other methods [17] to predict hourly solar irradiance.
A group of works focus solely on photovoltaic battery optimisation models. Khoury et al. [18,19] are concerned with the design of a residential PV-battery backup system during grid power outages, thus addressing the issue of an intermittent primary energy source in areas where the grid is unstable. Magnor & Sauer [20] present a modular simulation model of a PV battery system integrated into a genetic algorithm framework to evaluate optimal sizing with the aim to analyse general correlations of PV battery system design rather than optimizing individual systems. Weniger et al. [21] showcase a simulation model for PV battery sizing in a residential context, using sensitivity analyses to identify appropriate system configuration and operation.
However, until now there have been no integrated models that serve to guide decision-makers in the design and operation of PV and battery systems. Consequently, the TSO model introduced in this paper stands out from others due to several features, such as: Most optimisation models dealing with PV and battery system focus on the residential sector or are off-grid systems, while the work presented in this paper addresses grid-connected commercial buildings. The TSO model employs real-life measurements of irradiance levels and electricity loads, while incorporating real-time electricity pricing data from previous work done by the authors [22,23]. The TSO model is designed to provide key financial indicators and visual performance illustrations to inform decision makers what outputs the system may provide. The modelling framework is flexible and adaptable to a wide range of buildings assessing them as a complex system entity as long as the required data is provided. Technology libraries can be easily expanded due to a systemview approach that allows to model each technology based on its performance rather than its intrinsic technical complexity. Multi-objective optimisation is possible as seen in Cedillos et al. [6].
The TSO model was developed considering the elements above and the associated methodology is described in the following sections.

Problem description
For the TSO model to offer insights into how a PV and battery system should be sized and operated, it simultaneously searches within the technology libraries for the preferred option(s), and determines how the selected system can best be operated to maximise its value. The model provides key technical and financial steady-state outputs that allow decision makers to assess the investment employing a system of systems approach; however, the following information is required before reaching a solution. Given: Commercial building parameters: o Electricity demand (actual half-hourly measurements over a year or more). o Size of the available space for photovoltaic array and battery system. o Location/address to associate the building with a Distribution Network Operator (DNO) area and therefore to identify the current and projected transmission and distribution electricity charges. o Location/address to associate the building with a nearby Meterological Office weather station in order to obtain irradiance levels. With the optimisation objective to: Minimise overall project costs over a 5-year period (i.e. 5-year NPV costs).

TSO methodology
The end-user optimisation model is data-driven, meaning that a large amount of input data is employed. This section provides details regarding the representation and treatment of the data. Fig. 1 provides an overview of the parameters required and the results provided by the model.

Building features
Features of the modelled building are used to realise the optimisation. The size of the building allows the model to assess both the area on the roof which is available for the installation of photovoltaics modules and the available space for a battery storage bank. It is worth mentioning that the roof size and its surface loading coefficient (amount of weight it can withstand before requiring reinforcement) are also considered to design the photovoltaic system. The location of the building (either postcode or GPS coordinates) enables to match the building both with its closest weather station and Distribution Network Operator, respectively allowing to retrieve the relevant irradiance levels and electricity costs.

Electricity demand
The electricity load helps to understand how the building operates and the energy needs it has, thus allowing the model to determine the optimum technologies and capacities to be installed by quantifying the possible savings associated with the system operation. The model requires half-hourly demand data for at least a 12-month period and this is averaged to obtain 24 daytypes (one typical day for each month, weekend and weekdays). This data can be obtained from physical meters installed on-site which capture the kWh consumption in 30-min intervals. Daily demand patterns can be identified from analysing such data. Fig. 2 displays the total electricity load of a food distribution centre building (that operates every day of the year) for different day-types: July week-end (WE), January week-day (WD) and a yearly-averaged day. For example, Fig. 2 shows a lower consumption during the night, which increases in the morning and is reduced later in the evening. Also, the average consumption is higher during summer months as the building requires more cooling and HVAC (Heating, Ventilation and Air-Conditioning) to keep food products well refrigerated.

Irradiance data
To calculate PV electricity production at half-hourly intervals, solar irradiance data at the relevant location is required. UK irradiance data can be obtained from the measurements made across 83 weather stations, available in the MIDAS database (Met Office Integrated Data Archive System) [24]. Hourly recordings of Global Horizontal Irradiance (GHI) can be obtained from the appropriate physical weather station closest to the building location. The GHI dataset needs to be for a one-year period and for simplification it is assumed that these irradiance levels remain the same over the years. The data set is then pre-treated to ensure data completeness, if there are any missing values, these are interpolated using weather stations in the vicinity. GHI values are discretised to the time scale of the model by assuming the energy per square meter received during an hour is delivered evenly over half-hourly periods. Fig. 3 illustrates the Global Horizontal Irradiance (GHI) for various day types obtained for the distribution centre (seen in Fig. 2) located in London during 2015.

Electricity prices
Electricity prices, both for grid import and export, are used to calculate costs and revenues associated with energy use in buildings. In the UK, each DNO has different costs for transmission and distribution services, therefore leading to distinct regional electricity prices. Electricity prices for commercial stakeholders used in this model are based on previous work published in Refs. [22,23]. Hence, the TSO model contains for all DNO regions halfhourly values for 24 day-types (weekend and weekday day-types for each calendar month) over 5 years (up to 2020). Electricity import prices encompass the price of the commodity itself, as well as other cost components for transmission and distribution, balancing costs, losses and environmental obligations, etc. Concerning energy export prices to the grid, it is assumed that only a percentage of the projected wholesale price can be obtained when the commodity is sold to the grid (e.g. 85%). The electricity prices employed also cover the years from 2020 and up to 2024; these long-term price forecasts assume a modest 1.5% annual increase; thus, allowing the end-user to delay the starting year of the investment (while still enabling the model to calculate 5-year NPVs).

Relevant policies
Regulatory policies affect the attractiveness of the investments and therefore have been incorporated in the model to perform a holistic analysis of the problem.
The UK Carbon Reduction Commitment (CRC) defines a cost on carbon emissions which the emitting organisation needs to pay for following the Polluter Pays Principle. Values incorporated into the model range from £16.10/tCO2 eq in 2016 to £17.20/tCO2 eq in 2018 [25]. After 2018, CRC is planned to be abolished and the price of carbon will then be incorporated into the Climate Change Levy (CCL). The carbon factor of UK grid electricity was determined at 0.412kgCO 2 /kWh for 2016 [26], this allows to determine the emissions associated to electricity use in buildings. A 1.5% yearly carbon factor reduction is assumed for the following years to encompass grid decarbonisation efforts: this is a much more modest projection than what DECC has established (i.e. around 9% per year [27]).
The Climate Change Levy (CCL) is an electricity and gas tax to support funding green initiatives. Agreements have been signed for the retail sector, meaning that only a percentage of the CCL  tax is to be paid by the major stakeholders of this sector [28]. Tariffs and agreement reduction values can be found in Ref. [29].
Feed-in-Tariffs (FITs) are subsidies received by owners of some low-carbon technologies located in the UK. A tariff is fixed and agreed upon at the time of the contract, where generators receive this set amount for each kWh unit of electricity generated. FIT values can be obtained from Ref. [30]. As an example, a commercial scale photovoltaic installation in 2017 obtains £0.01915 per kWh produced for the 20-year duration of the contract. This mechanism helps to insure some stability in low-carbon projects by offering a long-term source of revenues.

Photovoltaic and battery technology libraries
The range of technologies considered in this work contain four photovoltaic panel types: two wafer based (mono-and polycrystalline silicon) and two thin film technologies (CIGS and CdTe). Similarly, four battery technologies are considered: Lithium-ion, Lead-acid, Sodium-Sulfur and Vanadium Redox. These technologies are the available options for the optimisation model when evaluating the investment alternatives; hence selecting the best possible configuration to get the largest financial return.
The PV database provides technical specifications such as the efficiency, module size and weight, degradation factor, etc. Regarding the management of the PV system, it is assumed that maximum electricity yield is obtained with respect to the perceived irradiance level (i.e. perfect Maximum Power Point Tracker assumption) and that all that electricity is either consumed on-site (to supply the electricity demand or to help charge the battery) or exported to the grid. Economics such as the annualised capital expenditure, the yearly maintenance costs, inverter costs and Balance-of-System costs are considered. This photovoltaic library is derived from a large range of publications [31][32][33] and existing datasheets [34][35][36][37][38][39][40][41][42][43][44][45][46].
Similarly, the battery database presents technology-specific parameters, such as the round-trip efficiency, the maximum depth of discharged allowed, the specific energy (volumetric density), etc. Financial parameters are also considered, such as the annualised capital expenditure, the yearly maintenance and replacement costs. Due to changing electricity prices, optimal battery operation is dependent on seasonality and the location of the building. Therefore, the model establishes for each day-type how the battery system should be operated (see Section 4.7) to maximise its value [47,48]. Data used in the battery technology library was derived from Refs. [49][50][51][52][53].

Battery management
Battery systems can be managed in diverse ways, each one providing a different revenue stream. To maximise revenues associated with a behind-the-meter battery system, storage systems can stack up purposes, as a multi-purpose technology offering several services to improve its business case by opening several revenue streams simultaneously [47,48]. In this work, two possible management strategies have been considered and compared to maximise storage revenues: -Time-of-Use Bill Management (ToU BM): battery charging when grid electricity prices are lowest and discharge when electricity prices are highest, thus reducing grid electricity demand in these peak periods. -Frequency Response (FR): immediate and automatic power response to a change in grid frequency to avoid frequency spikes or dips when it deviates from 50 Hz.
For each of the day-types simulated (see Section 4.2), the model is only able to choose between ''FR" or ''FR + ToU" operation as a management strategy for the battery.
During FR + ToU days, the battery's State of Charge (SoC) is constrained to follow the behaviour depicted in Fig. 4. It shows that the battery provides FR most of the day (43 half-hourly settlement periods over 48), creating small SoC fluctuations during that period. Frequency Response can only be provided if the battery SoC is within certain limits (25-75% for power/energy ratio of 0.5, 33-66% for power/energy ratio of 0.66); thus ensuring capacity margin for both low/high frequency events. In the model, the Power/Energy ratio is constrained to be 0.66 so that the battery can discharge during 3 half-hourly settlement periods. Following this rationale for FR + ToU days, 33% of the battery SoC will be charged during the lowest electricity price periods (hours vary based on the month), and be fully charged (33% remaining) just before the three most expensive settlement periods (e.g. evening periods), during which all the energy stored will be used on site to avoid electricity purchase at peak price (ToU BM). Then, 33% SoC will be charged again to reach 33% during the night and allow the battery to provide FR for as many hours as possible. See Sections 5.7 and 5.8 for further details on equations detailing battery management.

Time
The model employs different time scale representations: halfhourly settlement periods (48 per days), day-types (24 groups of days, two for each month: week-ends and week days), years (any 5-year periods for an optimisation calculation between 2016 and 2024).

Mathematical formulation
A mixed-integer linear programming (MILP) approach was employed to represent the optimisation problem. This section summarises key equations that define the problem, using the nomenclature provided at the beginning of this paper.

Objective function
The objective function f consists in minimising the grand total cost of the 5-year net present values components (NPV), as shown in Eq. (1).
The objective function is a sum of cost components which are all calculated as 5-year NPVs: the operating cost of the building, C o , the capital costs for the photovoltaic system, C P;C , the maintenance costs for the photovoltaic system, C P;M , the earnings (i.e. negative costs) from the Feed-in-Tariff, C P;FiT , the capital costs for the battery system, C B;C , as well as the maintenance costs for the battery, C B;M , the earnings (i.e. negative costs) from Frequency Response provision, C B;FR , and lastly the costs from greenhouse gas emissions over the 5-year period, C GHG .

Energy balance
Eq. (2) states that at each point in time ðt; d; yÞ, the electricity demand, e D , must be equal to the electricity import, e i , minus the electricity export to the grid, e e , plus the production of the photovoltaics (if selected), e P , plus the discharge of the battery (if selected), e d , minus the charging of the battery (if selected), e c . e D tdy ¼ e i tdy À e e tdy þ e P tdy þ e d tdy À e c tdy ð2Þ

Operating costs
Costs of operating the building, C o , (i.e. costs of importing electricity from the grid minus value of exporting electricity back to the grid) are calculated for each time interval, summed and discounted to obtain the 5-year Net Present Value, as shown in Eq. (3).

Technology choice constraints
Binary variables, b P and b B , are used to represent the selection (1 value) or not (0 value) of technologies. Those are constrained by the maximum number of installed technologies allowed, which is 1 for PVs and 1 for batteries; these constraints are expressed in Eq. (4) and by the initial settings choice of the user, U P and U B , in Eq. (5).

Photovoltaic constraints
The number of PV modules, N, is constrained both in terms of size (Eq. (6)), and weight (Eq. (7)) in regards to the building's roof by its area, A r , and its surface loading coefficient, W r .

Photovoltaic operation and feed-in-tariffs
As stated in Eq. (8), the electricity produced at each time interval by the PV system, e P tdy , is the multiplication of the irradiance, I, the number of PV modules, N, and selected technology related parameters such as the degradation factor, d P y , the auxiliary equipment efficiency, g aux , a loss factor, g losses , and the size, A P p , and electricity efficiency, g P p , of the selected photovoltaic technology: In addition to the revenues associated with the avoidance of grid electricity purchase or even electricity export, the PV system also generates earnings (i.e. negative costs) from the Feed-in-Tariff, at a price agreed upon at the beginning of the contract, p FiT , as described in Eq. (9).
PV capital and maintenance costs are obtained from annualised and discounted values, as shown in Eqs. (10) and (11)

Battery constraints
The energy capacity of the battery system is constrained by the volume available in the building, V r , and the specific energy (volumetric density) of the selected technology, e vol;B b , as shown in Eq. (12). Eq. (13) states that the Power/Energy ratio of the battery is constrained, so that energy can be provided for three settlement periods (90 min or 1.5 h) and therefore help avoid buying grid electricity during the three most expensive half-hours of the day: For each typical day, binary vectors, b FR d and b TOU d , are used to choose the battery operation between FR (Frequency Response only) or FR + TOU (combination of Frequency Response and Time-of-Use Bill Management as shown in Fig. 4), as shown in Eq. (14).

Battery operation and frequency response
Charge and discharge periods during FR + TOU days have a predefined profile for simplification purposes and are respectively expressed in Eqs. (15) and (16). SOC c tdy and SOC d tdy parameters help ensure that the battery is operated as described in Fig. 4, taking into account an availability factor, a B b , and the Round-Trip Efficiency during discharge, Battery capital and maintenance costs are obtained from annualised and discounted values, as shown in Eqs. (18) and (19).
Replacement costs are also incorporated within C B;M to ensure that the battery system is replaced and remains operational for at least 15 years.

Emissions
The carbon factor of the grid, CFE y , is used to calculate the carbon emissions from electricity consumption and its associated costs, see Eq. (20). Emissions reductions from low carbon electricity exports are not considered. Moreover, emissions associated with gas consumption are not accounted in this work as heat demand is not affected by the installation of PV and battery systems.

Case study and results
To showcase the capabilities of the TSO model, a case-study example is presented in this section by taking a distribution centre building operated by a large UK food retail company based in London.

Business as usual
In this subsection, characteristics of the building in its business as usual (BaU) configuration are presented. BaU in this context implies the energy demands of the building are supplied by conventional means and no distributed technologies are installed. Hence, it is assumed that the electricity demand (discussed in 4.2) is entirely supplied by with electricity imported from the grid. Therefore, the carbon costs associated with electricity use are calculated considering DEFRAs (Department for Environment, Food & Rural Affairs) carbon factor of the grid electricity [26]. Figs. 2 and 3 respectively provide representations of the electricity demand and irradiance levels associated with the building. Table 1 presents a summary of key attributes of the distribution centre building which operates every day of the year.
The large size of the distribution centre combined with relatively high operating costs from electricity consumption and a southern location within the UK make this building an interesting candidate for the installation of PV and battery systems. Tables 2  and 3 present key technical and financial parameters of the PV and battery technology libraries used for the case study; the TSO model then selects the technology best fit for purpose based on the objective function and constraints set. Additional PV and battery technologies could be easily included into the TSO framework, and the existing libraries can be updated easily to reflect any prices modifications or technologies improvement that occur.

Modelled system results
The TSO model results identify the optimum design and operation pattern that lead to the highest economic value for investment by selecting the preferred battery and PV configuration. Table 4 provides a summary regarding the preferred design of the optimised system.
The battery parameters above lead to the selection of the Lithium-ion technology, benefiting from a large production worldwide leading to costs reductions and technological improvement [54]. Regarding the photovoltaic technology, the model chooses to select monocrystalline silicon, favouring higher efficiency at greater cost than polycrystalline silicon. The PV system produces on average 1.65 GWh per year while the building has energy demands of 5.59 GWh per year, hence almost 30% of energy use is source from PVs. Through avoidance of buying carbonintensive electricity from the grid, carbon emissions associated with the operation of the building are reduced by 26.4% in comparison to the business as usual scenario, as seen in Fig. 5. However, since emission credits associated with low carbon electricity export to the grid are not accounted the carbon savings in a real application should be higher. Based on Global Horizontal Irradiance (GHI) data obtained from the appropriate weather station, PV electricity production can be calculated throughout the period of interest. Fig. 6 illustrates that for each day-type, the electricity produced will peak around midday and follow the same profile as the global horizontal irradiance. Results are equally intuitive in terms of energy yields over the course of the year; higher and longer production during summer months than during winter months. It must be noted that the results are not able to reflect the intermittent nature of PV generation as the irradiance data lacks sufficient granularity to account for a sudden change in production due to cloud coverage.
A valuable output from the model is that it provides insight into how to best operate the system for each day-type simulated. Table 5 presents the battery management strategies optimised by the model. The table highlights that FR + TOU management is usually selected during days where electricity prices suffer high peaks in the evenings (see prices curves in [6,22,23]). Such days are usually week-days as this is when highest distribution and transmission charges are incurred. It is noteworthy that the battery management strategy is strongly dependent on the case-study as it depends on numerous factors such as electricity prices, building electricity requirements, and the energy yields of PV panels, etc. Henceforth, in this case study it is clear the battery systems primary role is to provide frequency response services and consequently the energy stored is not directly related to PV yields.
The energy demand and supply characterisation for two daytypes in 2016 are represented in Fig. 7. From the figure, it can be seen that for January week-days, only a small portion of the electricity is provided by the PV system due to low irradiance levels during this period. Therefore, most of the electricity demand is imported from the grid. However, due to high electricity prices occurring in the evenings, the battery is operated as a combination of Time of Use Bill management and Frequency Response (see Section 4.7); effectively shifting electricity imports to periods where grid electricity prices are less expensive and hence reducing costs. On the other hand, the energy system behaves differently during July week-ends. Due to higher irradiance levels, a significant amount of the electricity load is provided by the photovoltaic system, even leading to some energy overproduction around midday. This reduces the need for electricity import from the grid, and coupled   with lower electricity prices it weakens the battery incentive to shift electricity demand. Consequently, the battery is managed to provide frequency response all day as it is more attractive financially.

Financial results
A cash flow analysis was carried out over 15 years to calculate the Net Present Values (NPV) of the investment savings, return of investment (ROI), internal rate of return (IRR), discounted and regular payback periods. Because the period of optimisation consisted of five years, cash flows after the fifth year are assumed to follow projections identified over the first five years, such as a 2% yearly increase in operation savings. Thanks to the benefit that the PV and battery system bring, electricity costs are decreased. Fig. 8 illustrates the annual cash flows differences between BaU versus the TSO simulation results.
The reduction of the building electricity bill is not the only financial impact of a photovoltaic and battery system; this is because cash flows associated with system purchase, maintenance and other revenue streams also play a role. To calculate all financial impacts, all the cash flows have been annualised and discounted. Fig. 9 presents a breakdown of the different cash-flows that occur annually (e.g. 2017). From this figure, it is clear that many revenue streams play an important role in establishing the project viability,   such as the earnings from frequency response provision [51,52,55] and the Feed-in-Tariff incentive. Annualised costs of initial capital expenditure (i.e. Capex) and system maintenance are represented for both the photovoltaic and the battery systems as negative cash flows. Overall, system viability is obtained (positive annual balance) with a payback period of 8 years. Table 6 presents a summary of key financial indicators calculated from conducting the case study. Such information allows decision makers to make informed decisions before deciding whether or not to go ahead with an investment.
Results indicate that payback periods are relatively high in comparison to industry norms and this implies most organisations would not approve this investment as it is outside their usual hurdle rates of 2-5 years [56,57]. Nonetheless, PV and battery business cases are expected to become more attractive in the coming years as technology prices decrease and electricity prices continue to rise.

Sensitivity analysis
Several factors that are subject to uncertainty impact the results of the TSO simulation, such as the electricity grid prices, irradiance levels, policies, technology prices and specifications, etc. It is therefore necessary to assess the robustness of the model against the modification of its parameters. Taking as reference the solution from the previous case study a sensitivity analysis was performed to identify the technical and financial impacts from changing the electricity grid prices by a factor D e . Although other factors could have been tested (e.g. irradiance levels, technology costs, etc.), electricity costs were found to be the most meaningful to illustrate in this work as they are a key factor decision makers evaluate before committing to such investments ( [22]). Table 7 summarises the results and highlights that an increase in electricity price improves 5-year NPV savings by roughly 0.8% for each 1% increase in electricity costs and reducing the payback period to 7 years. Also, it is seen this change leads to the installation of larger PV capacities, although it is worth noting the battery specification does not change significantly. Similar sensitivity analysis could be performed to better comprehend how sensible these technologies perform within the UK built environment; however, an exhaustive analysis falls outside the scope of the paper.

Conclusion
A Technology Selection and Operation (TSO) optimisation model with the virtue of determining the optimal selection and operation of decentralised PV and battery energy systems in commercial buildings has been presented in this work. A strong feature of the TSO model is the comprehensive integration of multiple data sources to addresses the complex question of determining what technology is the most attractive to invest in. These data streams emphasise that robust data-driven models require a diverse and rich dataset with regards to building attributes, energy costs and policy incentives, irradiance levels, and technology technoeconomic performance. Physical, technical and financial constraints have been considered to depict real-life conditions that impact distributed energy systems design. The steady-state    mixed-integer linear programming model developed finds the most profitable configuration of PV and battery systems while also giving insights as to how such systems should operate at halfhourly intervals across different periods of the year.
The TSO model has been tested by using a case study of a food retail distribution centre in London, UK. Results indicate the most attractive technology configuration is a combination of lithiumion batteries and mono-crystalline silicon PVs worth a total initial investment cost of £1.72 M, although 78% of this cost is attributable to the PVs. Due to the available space in the facility, the preferred PV capacity is 1.76 MW, while the battery system has a 1.06 MW capacity and can store up to 1.56 MWh. Although PV performance varies across the annual period, the solution indicates almost 30% of the energy used on-site can be supplied by PVs while achieving a carbon reduction of 26%. The case study shows revenue is principally derived from avoiding expensive electricity imports in the evening and by providing fast frequency response services to the grid; giving a financial payback of 8 years with an IRR of 12% and 5-year NPV savings of £300 k. A sensitivity analysis on how susceptible the business case is to perturbation of the parameters indicates that an augmentation of electricity price has a positive impact on the business case by improving 5-year NPV savings by roughly 0.8% for each 1% increase in electricity costs; therefore, leading to the installation of larger PV capacities although the battery capacity does not change significantly.
Due to the diversity of the issues associated with distributed energy systems design, results from the presented case study cannot be easily generalised, and will vary depending on each project considered. Overall, results indicate that without incentives or technology cost reductions, PV and battery systems constitute a questionable investment for most organisations that set short payback periods (e.g. under 3 years), implying there is still a performance gap for such systems to be deployed massively across the UK. This finding implies that if it wasn't for the Feed-in-Tariffs (FiT) set by the UK government, much of the capacity installed thus far would have not taken place [30]. However, businesses that can withstand longer payback periods and who are keen to participate in the ancillary service market may find such projects attractive. Overall, it has been proven the TSO model can provide valuable insights into real-world project evaluation of distributed technologies. The modelling framework is flexible and adaptable in making the inclusion of more distributed technologies a possibility. A larger technology library would give the model a greater range of options to enhance the built environment (e.g. combined heat and power, absorption chillers, fuel cells, etc.). Further work in this area of research is paramount to continue making progress in the decarbonisation of buildings.