Ageing and Efficiency Aware Battery Dispatch for Arbitrage Markets Using Mixed Integer Linear Programming †

To achieve maximum profit by dispatching a battery storage system in an arbitrage operation, multiple factors must be considered. While revenue from the application is determined by the time variability of the electricity cost, the profit will be lowered by costs resulting from energy efficiency losses, as well as by battery degradation. In this paper, an optimal dispatch strategy is proposed for storage systems trading on energy arbitrage markets. The dispatch is based on a computationally-efficient implementation of a mixed-integer linear programming method, with a cost function that includes variable-energy conversion losses and a cycle-induced battery capacity fade. The parametrisation of these non-linear functions is backed by in-house laboratory tests. A detailed analysis of the proposed methods is given through case studies of different cost-inclusion scenarios, as well as battery investment-cost scenarios. An evaluation with a sample intraday market data set, collected throughout 2017 in Germany, offers a potential monthly revenue of up to 8762 EUR/MWhcap installed capacity, without accounting for the costs attributed to energy losses and battery degradation. While this is slightly above the revenue attainable in a reference application—namely, primary frequency regulation for the same sample month (7716 EUR/MWhcap installed capacity)—the situation changes if costs are considered: The optimisation reveals that losses in battery ageing and efficiency reduce the attainable profit by up to 36% for the most profitable arbitrage use case considered herein. The findings underline the significance of considering both ageing and efficiency in battery system dispatch optimisation.


Introduction
An increasing number of investors are considering the installation and marketing of utility-scale battery energy storage systems (BESSs). Among others, grid ancillary services, such as the provision of a primary control reserve (PCR), are a major application of interest [1]. In this use case, revenue is typically linked to the provision of power (EUR/MW), and storage operation is closely linked to the external frequency signal. With increasing numbers of utility-scale BESSs installed and operating in control reserve markets, the attainable profits are declining, and storage system operators aim for alternative revenue streams. The operation of storage systems for energy arbitrage, where revenue is created through charging/discharging at variable electricity prices (EUR/MWh), has been discussed in various contributions; however, it has received less attention after the recent liberalisation of the European Union wholesale market [2][3][4]. Whilst pumped-hydro electric power plants are well-suited to monetise the diurnal fluctuations in electricity cost and have generated large revenues, the peak and off-peak patterns significantly changed as renewable energy sources (RESs) became widespread, and the price variability is often recorded on shorter timescales, rendering this application increasingly attractive for fast-reacting storage systems, such as lithium-ion batteries (LIBs) [5,6].
In the UK, the first large-scale commercial use of grid-connected batteries was to deliver an enhanced frequency response [7,8]. However, due to the limited amount of storage needed for fast frequency response and the subsequent decrease in the price of such services, attention has shifted towards multi-service portfolios and/or other applications, such as energy arbitrage, both in Europe [9,10] and in the United States [11]. In fact, a BESS is well-suited for multiple applications, in sequential or even time-parallel operation, and to improve revenues through "value stacking", making it a hotly debated topic at present [12,13]. In order to ensure the best project internal rate of return, an optimal BESS application portfolio management strategy may require the operation of the storage system in different applications, but should also consider the risk and costs associated with swapping of applications. However, an adequate cost analysis, including the battery dispatch, is generally not provided in the literature.
In this contribution, we will demonstrate how to optimise battery operation while considering the most relevant cost factors: battery ageing and energy losses in the system. We demonstrate the optimised storage dispatch in an exclusive arbitrage operation, but the methodology can be easily adapted for storage operation in time-parallel or sequential operation modes, as well as for other single-use applications. The economic viability of the arbitrage operation depends on the electricity price differences over time, as well as on the marginal cost of the system operation. The marginal costs can be defined as the additional costs occurring specifically due to the battery charging and discharging [14], such as energy losses and cycle-induced battery degradation during operation. In contrast, energy consumption for auxiliary components and calendar ageing effects can be considered as non-marginal, as these will be influenced only negligibly by the dispatch profile. The same holds for fixed costs (i.e. real estate, housing, air condition, wiring, and so on), which are independent of the dispatch, and are consequently excluded from this analysis. We implemented all relevant cost and revenue functions for BESS operation in an arbitrage market scenario in a mixed integer linear programming (MILP) framework, which allows us to derive the maximum profit attainable and best operational behaviour for the storage system. We, then, compared these values to the profit attainable through operation of a technically-equivalent storage system in frequency control reserve markets.

Literature Review
A detailed multi-technology analysis of storage viability for electricity arbitrage was undertaken by Bradbury et al. [15]. Although their linear programming (LP) optimisation-based approach revealed unfavourable conditions for batteries in general in 2014, the work clearly underlined the significance of efficiency losses and ageing-induced costs, in the context of arbitrage profitability. A more detailed analysis of the optimal control of battery storage dispatch, with consideration of storage loss and degradation, was conducted by Koller et al. The authors considered battery degradation by an explicit piecewise affine (PWA) cost function for optimal control of a BESS [16].
Various other studies have attempted to add a more detailed degradation model to the economic analysis. Stroe et al. [17] included an empirical nonlinear degradation model in a case study for a BESS, providing primary frequency response, although no optimisation was conducted. Swierczynski et al. [18] also analysed the profitability of frequency response using a BESS. A less realistic, but simpler, degradation model was used in their work. Sun et al. [19] optimised distributed batteries for balancing the grid while including a strictly-increasing convex degradation cost, but the universal power-law type degradation model was not suitable to describe the capacity fade of a particular LIB. Sarker et al.,in [20], used a MILP method, including a basic degradation model to analyse the effect of trading electricity at different power levels, but a lack of data underlying the degradation and efficiency models meant that they could not quantify the effects. Xu et al. [21] also targeted electricity trading, but using a rain-flow counting method to account for degradation. While the proposed algorithm may mimic the cycle-induced degradation of a battery to a certain extent, it did not take into account inverter and peripheral component-induced losses. Also, this work did not provide any data. Goebel et al. [22] calculated model-based dispatch strategies for a lithium-ion BESS, applied to pay-as-bid secondary reserve markets. Perez et al. [23] extended the application side by accounting for stacking applications: they analysed the effect of degradation for a battery which could be used for energy arbitrage, various balancing services, and localised peak shaving. They found that, although accounting for degradation decreases the revenue due to lower battery utilisation, the corresponding increase in lifetime more than compensated for this short-term loss. Others have used more complex battery performance and degradation models to obtain a more accurate lifetime prediction. Due to the non-linearities in these electrochemical models, a large computational effort is necessary and most studies limited their analyses to short duration (few days) use cases, instead of economic optimisation. Patsios et al. [24] analysed various control methods for a single day of usage of a battery in a peak shaving application and found that the losses could be decreased by 43% or the degradation could be halved, depending on the control method used. Lee et al. [25] studied a stand-alone photovoltaic microgrid while Weisshar et al. [26] looked at microgrids. Both reported that the electrochemical battery models increased the accuracy of the battery behaviour. Unfortunately, both studies lacked a quantitative economic analysis. Reniers et al. compared battery models of increasing complexity [27]. Their work shows that a more physically realistic modelling of battery degradation may strongly alter the battery dispatch and allow for increased BESS profitability.
Efficiency losses in containerised utility-scale storage systems have been studied in detail by Schimpe et al. [28][29][30], and a first demonstration, applied to the arbitrage operation, was given by the authors in a recent contribution [14]. While the work in [14] provided a framework for the techno-economic assessment of marginal cost, in this contribution we extend the existing literature by linking the cost functions of battery ageing and storage system efficiency losses with a state-of-the-art MILP framework. In this work, this framework is applied to assess the potential revenue of batteries in an arbitrage market scenario. Attainable revenue is compared to a reference case BESS application, using the same battery parameters. Although its tractability is not guaranteed, using an appropriate formulation of MILP can constitute a promising approach in solving complex optimisation problems, due to its gradually-increasing computational efficiency [31][32][33][34].
Cheng and Powell proposed an approximate dynamic programming method, considering the stochasticity and fast-changing dynamics required for frequency regulation. They could reduce the computation time to several seconds [35]. However, they assumed a constant round-trip system efficiency. In [36], a stochastic optimisation algorithm leveraging a MILP formulation for the day-ahead bidding market was proposed and compared to a traditional LP. They used binary variables to express acceptance or rejection of their bid, and it was shown that MILP was superior to LP, in terms of cumulative revenue. However, they also assumed a constant loss in charging and discharging; therefore, they did not employ any detailed loss curves for battery and power converters. It has been shown, by Nikolakakis et al., that using such a fixed system efficiency caused overestimation of profits [37]. However, their main focus was limited to a compressed-air energy storage module for the power exchange for arbitrage. In this work, the parameters for the battery and storage models are based on a state-of-the-art lithium-iron-phosphate (LFP) commercial battery cell, specifically designed for stationary applications, and a commercially available power inverter, coupling battery systems to the low voltage alternating current (AC) grid. A discussion on the economic impact of cycle-ageing induced battery ageing, as well as the profit reduction caused by dissipation losses, is conducted and a cost-optimised operation of the BESS in an arbitrage application is provided. We also compare the revenues attainable with arbitrage to the revenue and profit attainable by operation of the storage system in a reference PCR application.

Structure of This Work
Section 2 gives an overview of the technical parameters for the battery storage and the inverter system. The marginal costs for the battery storage system are linked to the state-of-the-art commercial cell. The subsequent section, Section 3, provides details on the MILP optimisation procedure used to conduct the battery revenue optimisation. Section 4 then provides a detailed discussion of the dispatch optimisation algorithm, applied to test and real market data values. The concluding section, Section 5, summarises the main findings of this work and outlines directions for future research.

Techno-Economic Framework for Battery Storage Dispatch
This section provides a framework for the profit calculations conducted in the subsequent sections. Both the application-specific revenue, as well as battery investment costs, are considered. A formulation for the marginal cost of battery operation, resulting from dissipation losses and battery ageing, is introduced, which is used to investigate the optimal dispatch for arbitrage in the subsequent section. Finally, a simulation framework to analyse battery behaviour, when delivering frequency response for PCR provision, is introduced.

System Layout and Framework for Profitability Analysis
A number of factors should be considered, when the profitability of BESSs is to be compared across different applications. As motivated in a previous contribution [1], the profitability of a storage system, measured in terms of return on investment (ROI), can be estimated as: where all cash-flow is to be taken as discounted values and R APL represents the net present value of the revenue attainable in a storage application, C OPEX is usage induced cost, and C ageing is a cost factor added to account for degradation. C inv refers to the initial investment cost of the system. A more comprehensive and quantitative discussion of cost factors and formulation of value discounting can be found in [38]. In this article, we focus on the profit in the use state of the battery only (J total ) and, thus, the overall cost-revenue function can be formulated as: where C OPEX dissipation is the superposition of battery related dissipation cost C OPEX dissipation,bat and power electronics related dissipation cost C OPEX dissipation,pe . As indicated in the Equations (2) and (3), all contributing factors for the cost and revenue calculations depend on the AC power dispatch of the storage system P AC . A schematic of the system layout, along with the factors considered for revenue calculations, is provided in Figure 1. The flows of power to (charge, "+") and from (discharge, "−") in the battery (P +/− b ) are coupled to the grid power (P +/− AC ) through a bidirectional inverter. Distinct applications can be served by the system, determining the AC power flow. As the initial investment costs are not considered in this work, peripheral components of the storage system, such as the energy management system (EMS) and thermal management system (TMS), are greyed out and not considered further in this work.

Battery Model and Storage System Parameters
For the storage system, we choose a commercially-available battery storage system in conjunction with an industrial-scale inverter. The Sony/muRata LIB Fortelion cell with LFP cathode has been designed particularly for stationary applications [39]. A brief summary of its main parameters is given in Table A1, and a more detailed description of the cell characteristics and its ageing behaviour can be found in [40,41]. As per [42], battery ageing can be written as a composition of two different degradation factors, cycle and calendar ageing. For marginal cost optimisation, calendar ageing is omitted.
In this study, we rely on data fits to in-house laboratory measurements for cycle ageing determination [14,40]. The model is based on single-cell measurements and scaled to mimic the behaviour of the full-sized storage system. We anticipate a constant battery cell temperature of 25 • C and neglect the state of charge (SOC) dependence of the open circuit voltage. These simplifications may be justified for LFP cells, due to the minimal voltage variation of the cell within the operation limits of 10-95% SOC and a limitation of battery charge/discharge power (C-rates ≤ 1), as used in this study and explained further in the following section. At room temperature and with battery currents within cell specifications, the cycle ageing is mostly determined by the energy throughput and is independent of battery SOC. In the following, we use a formulation of full equivalent cycle (FEC) based on an incremental change of SOC: where P b denotes the power charged to or discharged and E nom the nominal energy of the battery. As such, one unit of FEC denotes one full charge and discharge of the battery. A change in FEC may be calculated using the power-to-energy ratio (PER) or, alternatively, by a "pseudo C-rate" C r , as the battery voltage is assumed constant. Despite investment costs for the battery system not being considered directly in the optimisation, these costs will influence the degradation costs, as apparent in Equation (5).
In this equation, ∆SOH represents the normalised state of health (SOH) losses. We assume a battery end of life (EOL) of 80%, which corresponds to k EOL = 0.8, in accordance with the literature [14]. For the base case, a battery retail cost of P base bat = 500 EUR/kWh cap was chosen, being approximately 20% below recent single-unit pricing information (excluding VAT) [43]. Nevertheless, as battery prices are declining rapidly, a potential future scenario with halved cost (P future bat = 250 EUR/kWh cap ) is also considered [44].
A bidirectional Siemens Sinamics S120 inverter with rated power of 36 kW, which connects to the low voltage 400 VAC grid, was used to link the storage unit to the main grid. A full parametrisation of the inverter, based on measurements taken at DC voltages of 600-750 VDC and at 0% to 100% of the nominal power for both charge and discharge, was conducted in [14]. We use the corresponding look-up tables as a function of voltage, relative power, and power flow direction for the subsequent calculations.

Market Data and Battery Cost Analysis
Publicly-available energy market data, recorded in Germany, was used to conduct the optimisation. Energy prices were obtained at the European Energy Exchange through market clearing of aggregated supply and demand curves. While intraday market (IDM) prices are set on a quarter-hour basis continuously throughout the day and subject to strong variations, day ahead market (DAM) prices are set on an hourly basis and are attained by previous day auctioning. The course of a typical pricing signal is visualised in Figure 2, and a more detailed version is also given in the Appendix A, in Figure A1. For the IDM, an average cost of 34.68 EUR/MWh was recorded for the year 2017, used also as an input parameter for the estimation of PCR operational costs.

Reference Scenario Operation
In order to relate profits attainable for BESS operation in arbitrage markets to an alternative mode of operation, we simulated the operation of a technically-equivalent storage system (with the same battery and inverter technology but an adapted PER) in the PCR operation mode. In contrast to the aforementioned arbitrage operation, PCR prices are archived on a weekly basis through pay-as-bid auctioning. This binds a storage system (as a winning tender) to operation following the grid frequency signal, with few degrees of freedom [46]. The battery storage evaluation tool SimSES (Open Source version available for download at www.simSES.org) is used for this purpose [1]. The tool allows for time-series modelling of battery storage systems in different application scenarios, with detailed modelling of battery ageing, as well as dissipation losses, occurring in the battery and the inverter.
In order to meet European regulatory constraints and to allow for continuous PCR operation it is mandatory to set appropriate PER and SOC limits. A PER of 0.8, is applied (i.e., backing up a power provision of 1 MW with 1.25 MWh storage size). Furthermore, the SOC limitations required 30 min of continuous maximum power provision, and an operation strategy incorporating all degrees of freedom for SOC stabilisation was used in line with the previous work [46]. Using these parameters, SimSES provides a time-series evaluation (as in Figure A4) of the storage system operation, along with an economic evaluation. Table 1 provides a short summary of average prices attained for a weekly-tendered PCR power provision for the years 2015-2017, based on publicly available market data [47,48]. As directly apparent from the simple data analysis conducted, the profitability of this use case declines and a battery operation in alternative applications (e.g., arbitrage marketing) could be analysed by a storage system owner.

Marginal Cost for Battery Operation
Based on the results of the previous work, we consider dissipation losses and ageing losses of the aforementioned storage system [14]. Dissipation losses may occur from the battery cells, as well as from the AC power converter system. Based on laboratory experiments, a current-dependent ageing formulation was derived, which describes the capacity fade of the battery cells. Figures 3a,b depict the dissipation and ageing losses for the system with respect to the AC power. A conversion to the C-rate for charging or discharging was also calculated, taking the losses of the power electronics into account. The energy conversion losses in the battery were calculated using an equivalent circuit model, featuring an open circuit voltage and a single resistance using Ohm's law, as is given in Equation (6).
The parameters were implemented for the aforementioned commercial battery cell, with values as provided in [14,40] (muRata/Sony Fortelion LFP cell, R CH = 46.66 mΩ, R DCH = 50.29 mΩ, U OCV = 3.30 V), and I b being the battery current. In contrast to PCR time-series evaluations, a PER of 1:1 was used for the arbitrage modelling, resulting in a 36 kWh battery configuration with a nominal pack voltage of 665.6 VDC. The battery ageing model was described in detail, in [40]. As distinct from the original ageing model, in Figure 3b the capacity fade as a function of P AC is shown for use with variable time steps in units per hour, instead of a complete FEC. Therefore, it is multiplied with the time step, as in Equation (31). The energy conversion losses in the power electronics are based on the power-loss measurements of the previously described commercial inverter and look-up table values are taken as input for this study [14]. Round-trip efficiency values, calculated from the data, are given in Figure 4.

Optimisation Framework
MILP is a powerful tool that can be used to approximate and optimise complicated problems involving non-linear cost functions and constraints. Although the solution time is not guaranteed to be ideal, with recent advancements in solvers, the solution can be found in a reasonable amount of time for many problems [31,32,[49][50][51]. In our work, three components (namely the dissipation loss in the battery, the dissipation loss of the inverter, and cycle ageing for charging) are formulated through a PWA approximation. Modelling the battery discharge loss is straightforward, due to its linear dependence on P AC .
In order to maximise profit from buying and selling energy on the arbitrage markets, the objective function, introduced in Equation (2), may be reformulated as a minimisation problem, given by Equation (7), where P AC and J total denote net power exchange with the grid and net profit function, assuming an a priori known arbitrage price signal c en , represented by the cost of energy [EUR/kWh] over a certain prediction horizon, N h . The ageing-related cost c ag is given as cost of unit ageing [EUR/∆SOH]. ∆SOH and ∆t show the battery degradation in percent and time step in hours, respectively. As given in (7), it is worth mentioninng here that the dissipation losses C dissipation are embedded inside the formulation, given by the subsequent system dynamics. The parameters used for the optimisation can be found in Table A2.

Battery Dynamics Modelling
In this subsection, battery model equations, applied ∀k ∈ I [1:N h ] , are presented. First, the model is defined by disambiguation of the battery charging power P + b and discharging power P − b , which are limited by the maximum battery power P batmax .
where s b (k) ∈ Z 2 is a binary variable indicating the status of the battery. The battery power is linked with the AC-side power, P AC , by Equations (10)- (13).
where P + AC , and L + are the charging power and charging losses, respectively, and P − AC , L − denotes the discharging power and discharging losses on the AC side. The AC side power P +/− AC is constrained by the maximum power of the inverter P invmax , for which detailed information about loss modelling is given in Appendix A.2. Lastly, the auxiliary variables net battery power P net and absolute battery power P gross are defined by (14) and (15), respectively.
The main part of the battery dynamic model for the energy stored in the battery is given in Equations (16)-(19) [52].
Here, E bat ∈ R (N h +1) denotes the usable energy stored in the battery, which is restrained by a diminishing upper limit E max . Although, in many studies, stored energy is defined by SOC, as in [52], in this study we have leveraged the representation by using E bat to capture capacity loss effects due to ageing, as in [53]. Therefore, we defined an intermediate variable for the maximum energy that can be stored using the SOC limits SOC max and SOC min , as well as the nominal energy of the battery E nom . The variable is then decreased, in proportion with the state of health SOH, and updated by Equations (20)- (24).
As charging and discharging powers are recorded separately, C r is defined by the following equations; where C + r and C − r denote the charging and discharging C-rates, respectively, and C + rmax and C − rmax are the upper limits on the charging and discharging C-rates, respectively.

Battery Ageing Modelling
The cycle ageing of the cell used for this study can be modelled by a semi-empirical model fitted to experimental data, which was first presented in [40] and applied to marginal cost calculations in [14]. The convex fit on charging (as in Figure 3b) is approximated using PWA in Equation (31), as detailed in Appendix A.1. For discharging, a power-independent linear function of ∆FEC is obtained, as in Equation (32). The capacity fade is attributed mostly to battery internal loss mechanisms, such as lithium plating and growth of a solid electrolyte interphase layer. A more detailed discussion of these physical processes can be found in [40]. The work in [40] also provides experimentally-confirmed values for the constant coefficient a SOH , as well as the function f ag .

Results and Discussion
To explore the range of results using the optimisation approach, we differentiate between three different cases: Case 1, where all losses are neglected; Case 2, where battery energy efficiency as well as battery cycle ageing are considered; and, lastly, Case 3, where the dissipation losses of the power-electronic equipment are added into case 2.
After developing our optimisation framework using YALMIP [54] and Gurobi [55], as given in Appendix A.1, its validity was verified against a test signal with a predictable outcome (see Figure 5). The test signal (Figure 5a) begins at an initial value of 0.5 EUR/kWh and gradually diverges. While, in the ideal state (Case 1), the storage system follows price fluctuations directly; we observe a battery dispatch only after a certain threshold value when additionally battery losses and ageing (Case 2), as well as power electronics losses (Case 3), are considered. In line with the cost function formulations, the power dispatch increases, step by step, as an increasing cost burden of higher power dispatch is overcome at strong price variations. The optimiser begins dispatching the battery for energy trade only when it can cover the costs of losses with the expected profit. In fact, as is apparent from Figure 5b, in the case considering all costs (Case 3), the system starts to dispatch much later than in the case where inverter losses are neglected. At larger price differences (∆p ≥ 0.1 EUR/kWh) between subsequent time steps, all cases converge to the same solution, namely charging and discharging at maximum power, limited by the C-rate and the SOC limits. As all of our cost function formulations are independent from battery SOC, the dispatch leads to an undulation around arbitrary SOC points with an increasing amplitude (see Figure 5c).  After validating the algorithm, real-world price data sets were fed to the optimiser. The method was applied to one month of real-world data obtained from the German EPEX intraday (IDM) and day-ahead (DAM) auction markets [45]. Numerical results from the data sets are compiled in Table 2, along with a comparison to an alternative revenue source; namely PCR using the same set of technical parameters for the storage system. As such, the results can be used to give a direct comparison of the profits attainable. The profit values, in Table 2, are normalised per month and one MWh cap of battery capacity. As apparent from Table 2, the arbitrage cost, revenue, and profits were widely varying, depending on the consideration of ageing and dissipation losses. Similarly, not only the costs but also the profit and, ultimately, revenue were affected, when switching between the battery cost assumptions (250 EUR/kWh or 500 EUR/kWh) for otherwise-unchanged parameter settings. In fact, the algorithm adapts its dispatch strategy to optimise the marginal cost. It is also evident that DAM profits were significantly lower, compared to IDM profits. This is attributed both to overall lower price differences in the day ahead market, as well as a lower sampling rate (15 min versus 1 h), resulting in less battery dispatch operations within the sample time. The table also reveals differences between both arbitrage markets analysed. While ageing is one of the largest contributors to cost in all the IDM operation cases under investigation, for DAM applications, the dissipation losses of both the battery and inverter infer a higher cost burden. This is attributed to an overall lower relative power during IDM operation, the typically low power electronics efficiency, and high relative losses under partial load operation. Overall efficiency and energy throughput values are also given in Table A3.
To better visualise the power distribution of the various scenarios, refer to Figure 6, as well as Figures A2 and A3. In Figure 6, the plots show a cumulative frequency distribution versus battery C-rate for the 500 EUR/kWh battery cost scenario. One can clearly see that the optimiser tends to favour maximum C-rates in the Case 1 scenario (green lines), where ageing and losses are not considered. If ageing and battery dissipation are taken into account (Case 2, red line) high C-rates are avoided, in order to keep the battery-induced ageing and dissipation loss costs at an acceptable level (as in Figure A5). This comes at the cost of a slightly reduced overall trading revenue. Looking back to Table 2, this results in a reduction from 8762 EUR/MWh cap down to 7908 EUR/MWh cap monthly revenue for IDM arbitrage between Case 1 and Case 2 (500 EUR/kWh cap ). When subtracting the costs of battery dissipation losses and degradation, this results in a monthly net profit of 6165 EUR/MWh cap . For Case 3 (blue lines), where power electronics losses (being particularly prominent at partial load conditions) are additionally taken into account, the optimiser tries to find a compromise and avoids both high C-rates and low C-rates. As a result, compared to Case 2 (red lines), in Case 3 (blue lines) the dwell time at no load conditions is significantly higher. In the IDM application, the power electronics losses comprise of an additional 5.99% loss, which is 25.04% of the total cost. In DAM, the effects are even more pronounced: power electronics losses account for an 8.15% reduction of efficiency and comprise 40.01% of the total losses. We, therefore, conclude that, for battery arbitrage market studies, dissipation losses should always be considered for a net profit calculation. For the reference PCR operation (Figure 6c), where the operation closely follows the frequency signal, we observe an overall lower impact of ageing and battery efficiency losses, which will increase with higher battery C-rates (see Figure 3). For the Case 3 scenario, however, a significant cost burden (366 EUR/MWh cap ) is associated with the power electronics losses, being prominent particularly at partial load conditions. From a system engineering viewpoint, these findings highlight the importance of lowering the dissipation losses of the power electronics and pushing for a higher cycle life of batteries, when large scale storage systems are to be used in an arbitrage operation. At the same time, the cost and revenue analysis also highlights the importance and necessity of taking ageing and efficiency losses into account when designing a profit-optimal battery dispatch strategy.
Economic results normalised to the maximum revenue are shown in Figure 7, for each scenario. When looking at the IDM and DAM bar plots, we see at first glance that, for both applications, not modelling the power conversion losses and ageing costs would cause a significant overestimation of the profits (Case 1 versus Case 3). Furthermore, the normalised bar plots illustrate which cost contributor should be tackled first, in order to achieve improved net profits for the case of considering all cost contributors (Case 3): while power electronic losses outweigh other costs for the PCR application, ageing losses are the largest cost contributor for the DAM application; at a battery cost of 500 EUR/kWh cap . Ageing becomes a less-important cost contributor for the less energy-throughput demanding DAM application. A potential decrease of battery investment cost will further reduce the impact of ageing costs to the net profit.

Conclusions and Outlook
This paper provides an optimisation framework for arbitrage battery dispatch, along with a full parametrisation relevant to a commercially available battery storage system including a LFP-type lithium-ion battery and an industry-scale inverter component. Real-world data for the arbitrage markets and the provision of PCR was used as an input, to derive the revenue and costs of the storage system operation under various conditions and constraints. To systematically describe the ageing and efficiency, a previously-derived set of non-linear functions, based on in-house experimental data, was incorporated into the system with the help of PWA approximations and an open-source toolkit. The discontinuities and nonconvexities in this PWA approximation were expressed using an MILP formulation, where a specialised algorithm was employed to reduce the number of integer and redundant real variables.
A test data set is used to validate the applicability of the algorithm. Depending on the operational costs considered (Cases 1-3), the operation of the storage system adapts and finds an ideal compromise of cost and revenue generation by arbitrage dispatch. Thereafter, the method is applied to real-world data sets and net profits are obtained for various scenarios. The quarter-hourly IDM with significant price fluctuations is more profitable for battery arbitrage, compared to a DAM operation with an hourly pricing scheme. The profit attainable for storage operation in an IDM arbitrage operation is found to be on a similar level and, in some scenarios analysed, even slightly above the revenue made in the reference PCR operation.
In order to consider the rapid decrease in the battery costs currently observed, two price scenarios are analysed. While. in the base case (500 EUR/kWh cap ), the costs associated with battery ageing reduce attainable arbitrage revenue (intraday market, Case 3) by 11.2%, their impact is slightly less pronounced in an optimistic future scenario with a halved battery cost (revenue reduction by 7.6%). In all cases considered, the sum of costs due to dissipation losses even outweighs the cost for battery cycle ageing. However, it is worth mentioning that the cycle life of the battery cell used for this study is far above average, and the results could change for a different battery cell.
The results obtained with the real-world data clearly highlight the importance of modelling efficiency losses and ageing, along with revenue maximisation, in arbitrage markets. For the data sets used herein and when taking all costs into account, an arbitrage operation is still slightly less profitable when using the storage in the reference PCR application. However, this situation might change in the near future: PCR prices might continue to fall, whereas an increasing share in variable renewable generation might induce stronger fluctuations on the wholesale electricity markets.
While it provides a versatile framework for a direct comparison of a BESS in competing applications, there are some limitations to this study. The market data is assumed to be known a priori for the entire optimisation horizon. However, in reality, forecasts will not match market results perfectly. Therefore, our results reflect only the maximum attainable profit. The accuracy of the profit estimation can be further analysed, regarding forecasting and adaptive algorithms. Only marginal costs are considered in this work. While this allows one to find the most profitable applications for a storage system, it can not provide a full profitability analysis. The fixed costs of the storage system, as well as calendar ageing, should be included to derive the return on investment and the profitability of the system over the battery lifetime. An improved battery performance model could be used, which considers the SOC and current dependence of the battery terminal voltage, leading to increased model accuracy. More advanced ageing formulations could be implemented, such as taking battery temperature and SOC dependence into account. Sophisticated models, based on physico-chemical reactions, may need to be used to capture more complex and non-linear ageing phenomena [56,57].
Although MILP-based optimisation has a drastically increased speed, compared to a simplistic brute-force approach, the formulations are still memory-consuming (one month simulation of IDM in Case 3 takes approximately 5-10 h on a Windows 10 computer with an i7-6700HQ CPU at 2.60 GHz and 16 GB 2333 MHz RAM using Gurobi 8.1 with a mixed integer programming gap of 0.05%), and we were unable to conduct simulations over a time horizon of one year. There are a couple of different methods that can be used to enhance the scalability of the simulations. Use of receding horizon (or rolling horizon)-based methods, namely model predictive control (MPC), could be a method of choice for future investigations. The MPC procedure reduces the computation time by using a small horizon and creating an artificial closed loop system [58,59]. Since the price forecast may be imprecise and/or unavailable for long time frames, one may also prefer MPC. Utilising an integrated closed loop controller might enable the system to better handle uncertainties in price signals [60]. Another approach would be using a better decomposition method to create an economic MILP formulation. As the problem can be formulated as a difference of convex PWA functions [61], it can potentially be solved more efficiently by specific methods, as discussed in [62].

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:      The power of MILP lies in its ability to model highly complex functions using piecewise affine (PWA) approximations. Therefore, the nonlinear parts in the model, the ageing and loss functions, are modelled by suitable PWAs. As shown in Figure A6, f ag is a nearly-quadratic (but not exactly) function of P + AC . Therefore, these nonlinearities must be approximated by a series of PWA functions to use the MILP approach. However, since it is a convex function, the formulation can be done without using integer variables, which reduces the computational burden substantially. A sample PWA function is given in the form of Equation (A1) and the actual function can be approximated by selecting the maximum value of the pieces, as in Equation (A2) [63].
This formulation can be converted into epigraph form, as in Equation (A3) [63]. In the epigraph form, a variable called f PWA is defined as an upper boundary for all PWA functions. When an expression involving f PWA is minimised, f PWA will be minimised until it intercepts the maximum value amongst the PWA functions. Hence, it can accurately represent a convex PWA function.
After obtaining an appropriate form for approximation, the coefficients a i and b i , and the breakpoints r i , in Equation (A1), can be found by solving a nonlinear programming problem, defined by Equation (A4) for a pre-defined N number of pieces [52]. Therefore, an open-source toolbox, developed by Alexander Szücs et al. [64][65][66], is used to determine the unknown parameters. Solutions are given in Tables A4 and A5.
Consequently, total ageing in the epigraph formulation is given by Equations (A5) and (A6).
In this formulation, ∆SOH + PWA (k) ∈ R N h constitutes the upper bound for the PWA functions at each time step k, similar to the role of f PWA in the epigraph formulation given by Equation (A3).

Appendix A.2. Battery Loss Modelling
In battery loss modelling, two loss elements are considered: Battery internal losses and power electronic losses [14]. In this study, three cases are analysed: All losses are neglected (Case 1); only battery internal losses and ageing are considered (Case 2); and battery internal losses, battery ageing, and power-electronic losses are considered (Case 3). Therefore, as illustrated in Figure A7, there exist different data-driven functions that map the input power P +/− AC to the dissipation losses L +/− bat (battery dissipation losses), L +/− PE (power electronic losses) and L +/− tot (total system losses). Loss mapping for Cases 2 and 3 is shown in Figure A7, and L +/− bat = 0 for Case 1. Therefore, according to the three different cases we study, there are four different functions f + bat , f − bat , f + tot , and f − tot (given in Figure A8) to be approximated with the method given in the previous subsection.  Compared to the PWA approximation of the ageing function, which is an increasing convex function, there are two complications for the modelling of the loss functions: 1. Some of the price values may be negative, which causes the loss function to be concave at that time step; therefore, the epigraph formulation given in Equation (A3) cannot be used. 2. Although the battery loss functions f + bat and f − bat are convex, the combined loss functions f + tot and f − tot are non-convex. Hence, they can not be written as in Equation (A3).
Due to the above problems, the representation in Equation (A3) cannot be completely relied on for selecting the appropriate part of the PWA function. Therefore, we need to expand our formulation into the mixed-integer domain to include binary variables, which can be utilised to select the correct segment of the PWA function. However, despite having the state-of-the-art MILP solvers, excessive use of integer variables may lead to an insufficient memory problem and an increased computation time. Hence, we utilise a decomposition method that will reduce the number of redundant binary and real variables. The procedure followed is produced in Figures A9 and A10.
The procedure given in Figures A9 and A10 is basically a classifier that makes rough decisions to determine if a part of the system is convex, non-convex, or concave, which are collected, respectively, in the sets E , B, and A. The algorithm assumes that the PWA approximations are mostly convex, and that there are only several pieces that violate the convexity condition. The validity of this assumption can be verified by Figure A8. Only a small portion of L +/− tot causes non-convexity. Therefore, using binary variables to represent all segments is not necessary. For this reason, the function can be split into several regions that are convex themselves and fewer binary variables that can be utilised to select amongst these regions instead of all piece-wise functions. Inside each different region, the epigraph formulation can be leveraged to select the correct piece. On the other hand, as given in Equation (7), the cost incurred by the efficiency losses is embedded in the first term, and it can be expanded into Equation (A7) by using Equations (10)- (12): For the epigraph formulation to hold, the approximated variables, shown in Equation (A7), must be minimised in the optimisation problem. However, if the multiplier c en (k) at time k is negative, the loss values in the brackets are going to be maximised by the optimisation solver. In other words, having a negative price signal at time k causes the curves shown in Figure A8 to be reversed and become concave or mostly concave. Therefore, a full-scale MILP formulation with binary variables assigned for each piece in the PWA approximation must be used. In summary, when the price signal is negative, the loss function is multiplied by a negative number and converted into a mostly concave function. In this case, the algorithm executes the complete MILP modelling at that time step. If the price signal is not negative, but the PWA approximation violates the convexity requirement at some points (e.g., the slope is not monotonically increasing), then the algorithm collects all breakpoints and the time step in the set B. Lastly, if the PWA approximation is completely convex, then the procedure given in Appendix A.1 (the previous section) is applied.
After the problem separation, the final equations to complete the system formulation are given. First, the a, b, and r coefficients and breakpoints must be defined in the system, according to the studied case (where the numerical values are presented in Table A4). Selected parameters for charge and discharge will be called a + , b + , and r + , and a − , b − , and r − , respectively. Then, by leveraging the algorithm given in Figure A9 for both charge and discharge approximations, the sets E + , B + , and A + , and E − , B − , and A − are obtained, respectively. Then, we define two group of variables for the full MILP and economic MILP models. Binary variables are shown by S, where continuous variables are given by P, with indices full and eco for full MILP and economic MILP, respectively. finally, the variables related to charging and discharging are indicated by a plus and minus sign as superscript, respectively. Therefore, the newly defined variables are given by S + f ull (k, j), S + eco (k, j) ∈ Z 2 , P + f ull (k, j), P + eco (k, j) ∈ R, S − f ull (k, j), S − eco (k, j) ∈ Z 2 , and P − f ull (k, j), P − eco (k, j) ∈ R, in respective sets of appropriate dimensions. Thereafter, we define the following constraints. For all k that the epigraph formulation can be used, the constraints are defined by Equations (A8) and (A9).