Distributed battery energy storage systems operation framework for grid power levelling in the distribution networks

The integration of battery energy storage systems (BESS) in the electrical grid is acceler-ating to mitigate the challenges associated with the rapid deployment of low carbon technologies (LCTs). This work investigates the ability of BESS to provide the power networks with important ancillary services such as peak shaving and grid power levelling through two case studies conducted in collaboration with Northern Ireland's distribution network operator. A powerful approach consisting of two strategies is developed to operate the BESS powerfully to enhance the operation of the distribution network. The first strategy is day ‐ ahead scheduling that aims to dispatch the distributed BESS to smooth the grid power and mitigate voltage and lines stresses. A powerful demand forecasting algorithm is utilised to efficiently apply the day ‐ ahead scheduling. The second strategy is a real ‐ time operation to flatten the grid power which can be used separately or to adjust the results obtained from the day ‐ ahead strategy against the forecasting errors. The proposed approach was validated using real measurements and applied to an 11 kV distribution network located in Northern Ireland, UK. The BESS expected revenues from the participation in different services available in the island of Ireland are quantified and the degradation is considered.


| INTRODUCTION
The traditional manageable load curves which mainly consist of medium peaks with gradual ramps are changing due to the rapid deployment of low carbon technologies (LCTs) and distributed energy resources (DERs) into the electrical grid [1]. High penetration of variable distributed generation (DG) such as solar photovoltaic (PV) and wind power systems in addition to the huge growth in the use of electric vehicles (EV) and heat pumps significantly affect the load curve shape. This change in the load curve is a crucial technical problem for grid operators as it is difficult to be fully predicted and threatens the system's operation [2]. Different solutions can be applied to mitigate this challenge such as grid interconnections and conventional reinforcements. However, these solutions require high investment costs in addition to their limited applications and long implementation time.
On the other hand, in response to the carbon emissions reduction challenge and coping with the ongoing energy evolution and net-zero carbon targets, the UK distribution system operators (DSOs) are adopting innovative clean smart solutions. Battery energy storage systems (BESS) have been seen as a powerful option due to their ability to provide the network with many essential ancillary services [3]. In the power network, BESS can inject active and reactive power to support the network and deliver fast responsive support for system frequency [4] and voltage [5]. BESS can be used as a financially attractive alternative to avoid or defer conventional network reinforcement.
As part of low carbon network fund projects supported by the Office of Gas and Electricity Markets (Ofgem) [6] to facilitate the transition into low carbon economy, many projects have explored the integration of BESS into the electrical network. The Smarter Network Storage project was launched in 2013 by the UK Power Networks (UKPN) with a lithium-ion BESS of 10 MWh/6 MW, deployed at the Leighton Buzzard primary substation [7]. The main project objective is to replace the need to invest in an extra sub-transmission line by alleviating the peak demand and network constraints. The project demonstrated the revenues that can be achieved by using the BESS in providing commercial services such as frequency and reserve services. Scottish and Southern Electricity Networks (SSEN) deployed 3 MWh/1 MW valve-regulated lead-acid (VRLA) BESS at the Lerwick Power Station to shave the peak demand and mitigate the network thermal stresses [8]. SSEN has also launched the Orkney Energy Storage Park project to investigate the capability of third-party storage providers to benefit the distribution network with the active network management scheme [9]. The project proposed commercial contracts that incentivise storage providers to locate their units in sensitive congested areas to decrease the renewable generation curtailment and increase renewable penetration in the 33 kV Orkney network.
It is known that the BESS investment costs are high, thus their business case is difficult to justify, especially, for the sole revenue framework. Hence, BESS operators should involve the units in multiple services for revenue stacking. In Northern Ireland, BESS can participate in the integrated single electricity market (I-SEM) organised by the single electricity market (SEMO) [10]. Moreover, BESS has an essential role in the DS3 programme introduced by the transmission system operator (TSO) of Ireland and Northern Ireland (EirGrid/SONI) [11]. BESS can provide the majority of DS3 services, which accelerates their deployment and existence in the Island of Ireland. On the other hand, several flexibility schemes are introduced that allow DERs to provide flexibility services to the network through a platform like Piclo Flex in the UK [12]. Stacking BESS revenues from the participation in the available services in the Island of Ireland has been addressed in [13].
Northern Ireland Electricity Networks (NIE Networks) are expecting network challenges in the coming years due to the rapid deployment of LCTs at the low voltage level. These challenges affect the power stability, quality, and security of both the LV and MV networks. Hence, NIE Networks are investigating different conventional and innovative smart solutions to mitigate these challenges. One of these solutions is the Facilitation of Energy Storage Services (FESS) project [14]. This project will provide a framework to integrate customerowned energy storage system (ESS) to enhance the performance of Northern Ireland distribution networks. In this project, the ESSs are assumed to be owned by third-party customers/aggregators, this is due to the UK and EU regulations. According to these regulations, DSOs cannot own, manage, and operate storage units, as storage devices are classed as generation assets and require a generation licence. However, these regulations are subject to change and have some exceptions [15]. Hence, in the future, DSOs may be allowed to own storage units to cope with the energy evolution and facilitate the transition towards low carbon communities.
This paper focuses on supporting the FESS objective of identifying potential use cases for ESS in Northern Ireland by proposing operation strategies that optimally control the ESS to flatten the grid power curve and support the network against voltage violations and line overloads. The control and operation of BESS can be categorised into look-ahead and real-time approaches. The look-ahead approaches are good for longand short-term planning and can be used for operation with the aid of a robust forecasting algorithm. However, the lookahead approaches should not be used with poor forecasts unless it is combined with a real-time strategy that adjusts the BESS positions based on real-time measurements. Moreover, forecasts accuracy can be increased by adopting robust forecasting algorithms. However, in some geographical locations such as Northern Ireland, forecasting algorithms may not usually yield good predications due to high weather fluctuations, hence, a real-time strategy is essential to overcome the forecasting errors. Another issue that should be considered in the BESS control approaches is the distributed control and coordination of multiple BESS installed in the same network.
Recent studies have addressed the BESS power management using various look-ahead and real-time operation strategies to support and improve network performance. The BESS scheduling was managed for a multiobjective function using quadratic convex optimization in [16] to minimise the transformer losses, cost of energy and BESS life cycle costs. The reactive power support was investigated, and the effect of PV generation was studied. In [17], the scheduling of BESS power is optimised based on a sequential Monte Carlo method for BESS integrated wind farms. The study considered the time of use pricing schemes, BESS lifetime and wind power curtailments in controlling the BESS (dis)charging power. In [18], the bin packing algorithm is utilised to control the BESS scheduling in the distribution networks for peak shaving and load levelling. In [19], the peak shaving and energy cost minimisation have been addressed using a combination of battery and hydrogen storage units for distribution networks. The BESS active/reactive power dispatch was optimised in [20] for a multiobjective function that aims to minimise the DG curtailment and BESS operation costs. However, the previous studies did not use forecasting algorithms in their approaches and the case studies were conducted assuming perfect forecast which is imprecise as it does not consider the uncertainties associated with the demand and generation.
In [5], a real-time model predictive control is proposed to optimally dispatch the BESS active and reactive power against voltage violations besides improving the power factor and line losses. In [21], a two-stage BESS control approach is proposed to achieve peak shaving in addition to other distribution network services. The first stage is based on day-ahead forecasting, while the second stage is introduced to adjust the values obtained from the first stage based on 1-h ahead forecasts using receding horizon optimization. The load forecasting approach utilised autoregressive integrated moving average and the PV generation was forecasted using neural networks. However, this study adopted linear approximated power flow calculations which do not guarantee the accuracy of the output results.
In [22], an approach is introduced to shave the peaks and smooth distribution network power by optimally scheduling the BESS power based on day-ahead forecasting using complex-valued neural network (CVNN) and short-term forecasting (20-min ahead) using the series-parallel method. The study showed that CVNN suffers from inaccurate load forecast and the short-term forecasting using series-parallel method is much better in terms of forecasting accuracy, and hence better BESS utilization. A similar work reported in [23], where a predictive management algorithm is proposed for peak shaving and load smoothing for the islanded grids. The study developed a robust PV and load forecasting algorithm based on day-ahead forecasting using artificial feedforward neural networks in addition to integrating pattern recognition algorithm to control the BESS setpoints based on the load profile pattern. In [24], a management algorithm is proposed that utilises a heuristic rulebased approach in controlling the BESS in real-time for peak shaving in islanded microgrids. Another BESS heuristic control approach is introduced in [25] for peak shaving by dimensioning BESS parameters. Both studies utilise power threshold in controlling the BESS power for peak-shaving.
To summarise, none of the previous studies considered the coordination, operation, and control of multiple BESS in the distribution network, especially for grid power levelling. Study [19] considered two BESS in their case study. However, the coordination between BESS has not been explained nor investigated clearly in the literature, especially for the real-time approaches. In addition, most of the studies focussed only on peak shaving. Only a few studies considered the valley filling which is important in the networks with high PV penetration such as the case with duck-shaped curve in California. Furthermore, not all studies considered the forecasting uncertainties in their approaches which is very important in the look-ahead approaches. This paper complements the previous studies by addressing the grid power levelling using BESS and aims to address the research problems identified from the previous studies through the following contributions: (1) introducing a novel strategy for the BESS day-ahead scheduling that aims to flatten the grid power that considers the peak shaving and valley filling which can be used with any forecasting algorithm. In addition, the proposed strategy considers the multiple BESS coordination via optimal power flow (OPF) that accounts for the BESS and network constraints. A powerful forecasting algorithm has been utilised for the day-ahead scheduling using Gaussian process regression (GPR). This forecasting technique has been utilised as it outperformed the traditional and Bayesian neural networks in load forecasting as reported in [26], as well as outperforming autoregressive moving average (ARMA) and exponential triple smoothing (ETS) models as shown in the comparative results in this paper. (2) Introducing real-time strategy that can be used with the day-ahead scheduling strategy to adjust the BESS setpoints in real-time against forecasting uncertainties or can be used individually for grid power levelling. The multiple BESS operation is considered in the real-time strategy by coordinating the BESS according to the power losses. Additionally, the network capacity threshold was investigated by exploring the amount of increase in winter demand that may cause stresses in the future. (3) Conducting cost-benefit analysis that consider the BESS degradation to investigate the BESS profitability for different services.
The paper is organised as follows. The BESS system model is presented in Section 2. Section 3 presents the network model. Section 4 describes the demand forecasting algorithm. The day-ahead scheduling strategy is presented in Section 5. The real-time operation strategy is explained in Section 6. Section 7 shows the simulation results for the case study. BESS degradation is described in Section 8. The expected revenues are quantified in Section 9. The discussion is given in Section 10. Finally, the conclusion is in Section 11.

| BESS SYSTEM MODEL
In this work, the batteries are considered as the ESS. Different models can be used to identify the BESS operational constraints. In this paper, a detailed generic model is adopted that can be used for any type of BESS technologies considering realistic parameters which are explained as follows: (a) BESS Power Rating: The discharged power ðP dis t;b Þ or charged power ðP chr t;b Þ from the BESS b at any time-point t cannot exceed the BESS predefined rating.
(b) BESS System efficiency: The power imported (P ch t;b ) from the grid or exported (P di t;b ) to the gird by BESS b at any time is affected by input/output efficiencies of the BESS (η BESS b ) and the power conversion system (PCS) ( η PCS b ).
(c) State of Charge (SoC): SoC is the percentage measurement that indicates the available capacity still in the BESS. The SoC must be maintained within the pre-defined limits to increase the BESS lifespan.
Higher value of SoC min b is recommended to protect the BESS from excessive discharging. τ is the interval period such that τ ¼ 24 np , np is the number of points which is determined based on the data resolution (24 for hours, 48 for 30 min, and RAOUF MOHAMED ET AL. is the actual BESS capacity, and E us b is the usable capacity. (d) PCS Rating: At any time-point, the apparent power handled by the PCS should not exceed its rating.

| NETWORK MODEL
In this paper, the proposed approach is applied to an 11 kV 53-node 16.5 km suburban radial feeder ( Figure 1) located in Northern Ireland representing a typical distribution network in the UK and Europe. The network model is developed in NEPLAN software [27]. Half-hourly PMU current measurements for this network were provided by NIE Networks covering 4 months in the winter (from 1 st November 2018 to 28 th February 2019) and 4 months in the summer (from 1 st May 2017 to 31 st August 2017). An Aggregated Generation Unit (AGU) of 700 kW is located on bus 13. AGU power measurements are provided for the same periods. Two BESS are assumed to be installed at bus 26 (Sodium-Sulphur -NaS), and bus 53 (Lithium-ion) and their specifications are given in Table 1. The BESS locations and sizes were determined from a previous study aimed to place and size BESS based on the sensitive locations exposed to violations (voltage and line overloads) due to the future uptake of low carbon technologies for this network [28]. The objective of this study was to find the optimal BESS locations and sizes that solves all network violations by conducting time-series OPF using swarm-based optimization algorithms. The BESS specifications were imported from actual projects [7,8].
The control, operation and the communication of these BESS depend on the ownership and the available resources. If these units are owned by customers, their operation will depend mainly on their energy participation, contracted services, network connection agreement and associated network codes. However, in the case of violations, NIE Networks will dispatch the required capacity to flexibility providers in an agreed manner, and these resources may participate in providing their services to relieve the network constraints. In this work, it is assumed that the BESS are owned by third parties, while direct commands are sent from the DSO in case of violations.
For each BESS, an Energy Management System (EMS) is responsible for handling the converter operation and receives the actual measurements, status, and parameters of storage devices in real-time from the battery itself using an electronic device such as the Battery Management System (BMS). Additionally, the EMS receives information from other sources: grid data, market data, voltage, current and frequency measurements, DSO/aggregator commands, weather data, and other BESS status. The information feeds into the EMS from these sources depending on the selected control strategy [3]. The control strategies can be categorised as local, centralised, decentralised, and distributed control. In this paper, the centralised management is adopted as it requires less infrastructure and complexity. The centralised management aims to control the BESS through direct commands from the DSO, while it is assumed that a local controller exists to preserve the voltage within the stable limits at BESS nodes by controlling the BESS inverter output according to NIE Networks practice using the direct voltage control with slope principle [24].

| DEMAND FORECASTING ALGORITHM
In this section, a demand forecasting algorithm is introduced to apply the day-ahead scheduling strategy efficiently. Different  methods can be applied for demand forecasting, the selection of the exact method depends on the available data. For instance, the artificial neural networks require long historical data for training to produce sufficient results. In this paper, the available data are feeder demand measurements for only four consecutive months per season, thus the non-parametric Gaussian Process Regression (GPR) is adopted due to its effectiveness in providing good results using intermediate historical data and its ability to capture efficiently the model uncertainty [29,30]. The period from 1 st November 2018 to 21 st February 2019 is used for training, and the last week of February 2019 is used for forecasting in day-ahead for the winter case study. Similarly, for the summer case study, the period from 1 st May 2017 to 24 th August 2017 is used for training, and the last week of August 2017 is used for forecasting. The proposed forecasting approach achieves maximum utilization of the available data by introducing different prediction variables. These predictors can be easily identified, making the proposed approach easily applied for different forecasting applications. The complete training data consists of one response variable and five predictors. The response variable is the demand measurements, while the predictors are summarised in Table 2.

BESS
In the GPR, the covariance functions (kernels), are very important as they encode the relationship of the function to be learnt using the training data. Different kernels were tested and the best results were achieved using the rational quadratic kernel with a separate length scale per predictor [30]. To validate the forecasting results, another two methods have been used to forecast the demand. The first one is the autoregressive moving average (ARMA) model [31]. While the second method is the exponential triple smoothing (ETS) algorithm using the additive error, additive trend and additive seasonality (AAA) model [32]. These models adopt the time series analysis forecasting, their results against the proposed GPR model for the last week in February 2019 (winter) and last week of August 2017 (summer) are visualised in Figure 2. The performance of these forecasting models was assessed using three error metrics; mean absolute percentage error (MAPE), root mean squared error (RMSE), and R-squared, the results are tabulated in Table 3.
As given in Table 3 and shown in Figure 2, the GPR outperformed the other two methods. These results validate the adoption of GPR for demand forecasting and support the capability of this method to be used for prediction considering the uncertainty of the demand forecasting. Furthermore, the proposed GPR model can be modified to increase the accuracy of the forecasting results by using longer historical data for training and by adding more predictors such as the hourly temperature and type of day (e.g., public holiday).

Predicator Description
Day of the month Between 1 and 31 Day of the week 1-7

| DAY-AHEAD SCHEDULING STRATEGY
In this work, the scheduling algorithm is implemented on period-ahead basis using the forecasted grid power from the GPR model. The proposed approach is designed to enhance the operation of distribution networks by flattening the power curve. This is achieved by optimally scheduling the preassigned BESS to satisfy the formulated objective function subject to the network and BESS constraints. The proposed algorithm settles the optimal power schedule in a period-ahead basis, this period could be anything from days to years, so it could be used for both long-and short-term scheduling. For more accurate results, it should be implemented using the most recent demand and generation forecasted values. The dayahead strategy determines the optimal daily scheduling points of time and BESS power that should be injected or absorbed to flatten the grid power. Flattening the load profile could be expressed by shaving the peak demand and filling the off-peak demand. Many studies focussed on these techniques; however, they only targeted the peakiest and lowest demands which does not guarantee the optimal solution. The proposed approach shaves all the humps and fills all the valleys for better network enhancement.

| Objective function
In the optimization, different objective functions could be formulated for various goals, which can be achieved by scheduling the distributed resources as appropriate. In this paper, a powerful yet simple objective function is proposed to adjust the grid power to flatten the system power curve.
Smoothing the grid power will achieve different benefits from the utility perspective as shaving the daily peaks will lead to good minimisation in losses and energy costs as well as regulating voltage and frequency. Noteworthy, filling power valleys can achieve the same in some cases (e.g., PV overgeneration). Additionally, grid power levelling increases the network stability and power quality as well as lessening the stresses on transformers and lines. All these improvements can be achieved individually; however, the proposed objective function formulation attempts to achieve an overall network improvement by optimally smoothing the power imported from the grid. The grid power can be expressed as: ð9Þ P gr Grid power (MW).

P demand
Demand power (MW).

P losses
Line power losses (MW), m Number of DGs. P DG DG power injection at a specific hour (MW), z Number of BESS.

P Beff
Effective BESS power considering the BESS system efficiency such that P Bef f t;b ∈ fP di t;b ; P ch t;b g; +ve for consumption/charging, -ve for injection/discharging (MW).
The proposed objective function consists of three terms that tend to improve the system stability, and power quality. The terms of this function are explained as follows:

| First term (load factor)
It has been proven that minimising the system losses can be achieved by maximising the load factor (LF) for the radial distribution networks [33]. The load factor can be defined as the ratio between average demand and the maximum demand for a specific period. In this paper, LF represents the ratio between grid average power and grid maximum power and can be expressed for a certain period as: Maximising the LF leads to good minimisation in system losses and can be achieved by optimally distributing the BESS power over the scheduling period to minimise the difference between average and maximum power. The maximum value of LF is 1 which is the optimal value. 5.1.2 | Second term (minimum difference factor): This term consists of two parts that are directly linked with flattening the power curve. The first part tends to decrease the disproportion between minimum power and the average power, while the second part aims to diminish the disparity between peak power and lowest curve power (peak-valley difference) and can be expressed as:

MDF
Lessening the minimum difference factor MDF will improve the flattening results significantly. The minimum optimal value of MDF is 2. Minimising the load variance has a good impact on minimising the radial distribution network losses in addition to lessening and mitigating the voltage deviation in the network [34]. The grid power deviation (GPD) aims to minimise the power deviation of the grid power all over the day. The standard deviation formula is used for GPD instead of variance formula as it showed better results in flattening the power curve. This reason is that the variance is squared and does not represent the same units. Near zero value of GPD indicates that the power points tend to be very close to the average value and hence the power curve is flatter. The minimum value of GPD is zero, for a period that starts at t o and ends at t f can be mathematically as: GPD ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi The formulated objective function can be treated as a factor that measures the grid power flattening level which can be named and abbreviated as Power Flattening Factor (PFF) and can be mathematically written as: The proposed algorithm aims to determine the minimal PFF value that could be achieved using the available BESS power during the day. The optimum minimum value of PFF = 3 indicates a fully flattened curve. The nearer the PFF is to 3 the flatter the power curve. The proposed optimization problem is a constrained complex, and the number of variables depends on the charging/discharging time-points. Dealing with these variables to achieve an optimum value of the objective function subjected to various constraints is considerably a complicated task that requires a robust optimization solver. Another important issue was considered in selecting the appropriate optimization tool, which is the simulation time, as the proposed approach is an operational task that requires time-efficient, and accurate decisions.
The proposed algorithm adopts the European Non-linear programming solver (WORHP) [35] due to its effectiveness in providing optimal solutions in a short execution time. The WORHP adopts Sequential Quadratic Programming (SQP) and interior point method to solve the large-scale sparse problems efficiently in a less computational manner. Noteworthy, other optimization solvers have been tested such as IPOPT, FilterSD, NLOPT, NOMAD, Genetic Algorithm, and Pattern Search. However, all these methods are common in their long solving time and most failed to achieve desirable results. Conversely, the WORHP managed efficiently to obtain feasible solutions for all the simulated cases in a very short time. The objective function is treated as a single objective function without normalisation as all the subfunctions serve the same goal. The objective function can be expressed by the solution variables vector x with lower bounds (l bo ) and upper bounds (u bo ) as followings: min x PFFðxÞ s:t: This algorithm requires some inputs to conduct the scheduling determination, these inputs can be detailed as: � System data: The data related to the network; network elements, bus data, branch data (length, ampacity, resistance, and reactance), and network constraints. � DGs data: The sizes, locations, and output power of all the available DGs. � Load profile: Daily forecasted network demand power. � BESS system parameters: The data related to the BESS model; capacity, power rating, efficiency, maximum and minimum SoC, in addition to PCS rating and efficiency. � Scheduling period: These periods can be selected manually, or the algorithm will optimally set them.
The proposed algorithm is implemented in MATLAB and employs the WORHP solver in determining the optimal BESS setpoints by processing the following sequential steps: (1) The algorithm reads the required inputs and starts by determining the scheduling periods. The proposed algorithm will automatically determine these periods unless they have been modified by the network operator according to their priorities and preferences. The algorithm determines the initial scheduling periods by calculating the difference Δ t between the forecasted grid power at each point ðP gr t Þ and the forecasted daily average power ðP gr avg Þ as follows: The points that have negative values of Δ t are the initial timepoints appropriate for power consumption (BESS charging), and while the points that have positive values are the applicable timepoints for power injection (BESS discharging). Afterwards, the algorithm optimally determines the best points among these points for scheduling within the optimization routine.
(2) The algorithm initialises solution variables using WORHP representing the BESS power (dis)charging with corresponding time-points, these solutions are constrained by the upper and lower bounds: RAOUF MOHAMED ET AL.
(3) These solutions are used to determine the optimal value of P gr t using Equation.
(9) at each time-point to minimise the PFF by allocating the BESS power optimally over the day.
The BESS discharging period (T d ) is constrained by the period determined in the first step using Equation (15) such that (T d ∈{t (+Δ t )}). While the BESS charging period (T c ) is constrained by the ðT c ∈ ft ð−Δ t ÞgÞ. The algorithm determines the optimal time-points within these periods in each BESS mode to satisfy the objective. (4) The determination of P gr t requires power flow calculations to precisely determine the power flow and line losses considering the AGU, BESS and demand. Power flow calculations using Newton Raphson Method [36] are utilised in this strategy. The adopted power flow algorithm is validated for the test network using the commercial power system software NEPLAN [27]. (5) In each iteration, the algorithm conducts OPF calculations and updates the WORHP solution variables until the optimal solution is found representing minimum PFF value of the day. (6) The proposed algorithm considers all the equality and inequality operation constraints related to BESS system model described in Section 2 as well as the network limits and constraints explained in the next subsection.

| Network constraints
The optimization problem is subjected to the following equality and inequality network operation constraints.
(a) Power Balance: The total active and reactive power at any time point between the substation, DGs, and BESS must be balanced with the total demand and total losses.
(b) Node Voltage: For N nodes, the voltage at each node must not violate the predefined limits.
In the UK, the acceptable voltage limits for the 11 kV network as defined in ESQCR (No. 2665) are ±6% of the nominal voltage [37]. In this work, the voltage tolerance limits of ±5% are used as per the US standard ANSI C84.1 [38]. Many network operators do, however, prefer to specify tighter voltage limits based on their working practice to mitigate voltage variations. Thus, (c) Cables and Overhead Lines Rating: The flow of current in each branch at any time must not exceed its maximum allowable rating.
(d) Power Flow Constraints: All the other power flow constraints including bus angles, DGs power and voltage limits, and substation capacity are satisfied within the power flow routine itself.

| REAL-TIME OPERATION STRATEGY
The proposed day-ahead scheduling strategy is effective in determining the BESS scheduling set points. However, the uncertainties of the forecasting affect the resultant grid power. Hence, a real-time operation is required to overcome these uncertainties. In this paper, a heuristic strategy is proposed that controls the BESS setpoints in a real-time to flatten the grid power. This strategy utilises power thresholds to control the BESS as done previously in [24,25]. However, the coordination optimization of multiple BESS is considered by conducting online OPF to determine the multiple BESS dispatch with minimum losses. The design of the real-time strategy depends on the needs of the network. In Northern Ireland, BESS will most likely be utilised to shave the peak demand and relieve network congestions. Hence, the upper network threshold should be determined, and the charging may be implemented using fixed power during the night. However, for other networks with high PV generation, the BESS should be used to fill the mid-day valley, hence, the lower network threshold should be determined, and the charging power should be conducted during mid-day. These thresholds can be determined from the results obtained using the day-ahead scheduling. The maximum grid power after BESS scheduling is the upper threshold which represents the average grid power during curve hump, and the minimum grid power is the lower threshold which represents the average grid power during curve valley. The proposed realtime strategy can be used to adjust the BESS scheduling setpoints obtained from the day-ahead strategy or can be used individually to operate the BESS according to the pre-defined thresholds. In this paper, two case studies are simulated; the first case study focuses on the winter and the real-time strategy is being used individually to support the network against voltage and line flow violations according to the network capacity threshold. The second case study simulates the summer case with high PV penetration and the real-time strategy is being used to adjust the BESS setpoints obtained from the day-ahead strategy using upper/lower thresholds obtained from the day-ahead results.
The proposed real-time strategy flowchart is given in Figure 3. The BESS is controlled according to the season (winter/summer) and the upper/lower threshold. Generally, the proposed strategy employs the next steps: (1) The algorithm checks the grid power at each time point. If the grid power is larger than the upper threshold P gr UT or lower than the lower threshold P gr LT , the algorithm determines the difference that needed to be shaved or filled by the BESS (P grs t ) as: the BESS and network operation constraints in addition to the following constraint to enforce the BESS to shave/fill the P grs t : If this constraint cannot be satisfied, then there is no feasible solution to shave/fill fully the P grs t using the BESS, and the BESS are dispatched according to their capabilities.
(3) The objective of this optimization algorithm is to reduce the P grs t with minimum losses which is formulated as: (4) The BESS power values obtained are then sent to the EMS of each BESS for execution. For the next time step, the algorithm updates the SoC of each BESS using Equation. (5) and performs the previous steps.
The previous steps are performed completely in the summer. However, In the winter, the previous steps are performed only for the discharging, and the BESS charges using constant charging power during the low time of use tariff period for nch charging hours from (t s,c = 12:00 am) to (t e,c = 8:00 am). This is a centralised management strategy that should be implemented on the DSO processors and then the power commands are sent to be dispatched by the BESS EMS. In this way, less infrastructure is required as there is no need for specific agents at each BESS for coordination.

| Network capacity threshold
Currently, the LCTs penetration in the test network does not impose challenges on network stability. However, in the near future the increase in LCTs and demand may impose some technical issues. In this part, the network capacity headroom is investigated. From the available measurements, the winter peak demand varies between 5:00 PM to 10:00 PM with a demand of approximately 2.2 MW. According to an official report on the future of Northern Ireland networks by EA Technology [39], the residential EVs and heat-pumps peak profiles in Northern Ireland fall in the period from 5:00 PM to 11:00 PM. Power flow simulations were conducted to determine the capacity threshold due to the increase in demand caused by the LCTs future penetration scenarios.
The results show that network stability could be threatened when the peak demand reaches 4 MW without any intervention from the AGU. After this value, the network will be congested as the overhead lines (OHL) ratings will be violated for specific OHLs and the voltages will be violated below the safe limits for the remote nodes from the substation. In the case of max power injections from the AGU, the maximum allowable increase in demand is 4.3 MW as the location of the AGU is far from the remote nodes, hence these nodes suffer from voltage violations due to the high voltage drops and OHLs violations. These thresholds are determined considering the OHL carrying capacity ratings.
The OHL ratings can be adjusted using real-time thermal ratings (RTTR) which may increase the network capacity threshold considering the atmospheric conditions. However, the voltage issue will still exist. In this work, the static OHL carrying capacity ratings with 90% ampacity is considered to ensure the safe network operation and mitigate damaging the OHLs. Additionally, a node voltage tolerance of ±5% is considered as explained earlier.
The AGU power is not part of the optimization algorithm and its actual measured outputs are used for the simulations. The worst-case scenario is investigated by simulating the case of 100% increase in demand. 28 February 2019 was used to determine the upper threshold as it is the day with the highest demand amongst the selected days of the case study. Due to this increase in demand, 6 OHLs have been violated and 14 nodes suffer from high voltage drop during the peak period (from node 41 to node 53), especially at the peakiest time of 6:30 PM. For this case, and with 90% OHL ampacity, the extreme allowable demand is 3.7 MW, which is the network upper threshold (P gr UT ).

| Winter case study
For this case study the last week of February 2019 has been used. The forecasted demand was obtained using the proposed forecasting GPR model for the day-ahead scheduling. For real-time strategy, the actual demand profiles are used. All load profiles are increased by 100% to simulate worst-case scenario that could happen during the peak due to the anticipated rapid deployment of LCTs. For the real grid power curve, the average PFF is 6, the minimum voltage is 0.944 pu (node 53), and the maximum loading observed for the line that connects node 9 to 10 is 115%. The grid power results are shown in Figure 4, and the OHLs current flow before and after applying the proposed strategies are shown in Figure 5.
As shown in Figures 4 and 5, the day-ahead scheduling strategy has managed to flatten the grid power and solve all the voltage and OHL violations for the forecasted demand profiles. Additionally, when applying the BESS scheduling setpoints on the real demand, the violations were solved, and the congestion was relieved. The losses have been reduced by 11% and the PFF has been optimised by 22.5%. However, the grid power was not fully smoothed due to the forecasting uncertainties. As the accuracy of the forecast increases, the more precise the results obtained using the day-ahead scheduling become. Moreover, the day-ahead scheduling was implemented for all the days using the full BESS capacity, but according to the operator's preferences, specific capacity can be assigned for the day-ahead scheduling. However, this will mainly depend on the forecasting and its accuracy.
The proposed real-time strategy has been used in this case individually to support the network against violations. As shown in Figures 4 and 5, the real-time strategy successfully managed to solve all the violations by shaving the grid peak during the days with high demand. This strategy depends mainly on the value of the upper threshold. This threshold was set at 3.7 MW for this case study, hence the BESS charged fully on the first day and started effectively to discharge from 25 th February to 28 th February as in these days the peak demand exceeded this threshold. The two BESS were fully discharged only during the last day due to high demand. During the other days they were partially discharged. This allows for streaming other revenues from participating in several services. However, if the BESS will be used for grid power levelling only, a tighter upper threshold can be assigned. Both strategies managed to regulate the minimum voltage to 0.956 pu and the maximum line loading to 97%.

| Summer case study
The last week of August 2017 has been used for this case study. The forecasted demand was obtained from the proposed forecasting approach to be used in the day-ahead scheduling. To simulate the impact of high PV penetrations, PV capacity of 50% of network peak demand is assumed. The PV generation profile was obtained from the TSO of Northern Ireland [40]. With this penetration level, no voltage violations or line   -11 overloads have been observed. However, the system stability reduces as the mid-day grid power valley became wide and deep (duck-shaped curve). According to the forecasting, the maximum voltage is 1.036 pu, while the real maximum voltage is 1.04 pu. The simulation results are illustrated in Figure 6. As shown in Figure 6, the day-ahead strategy managed to flatten efficiently the forecasted grid power curve. The results obtained from the day-ahead strategy were applied to the real demand and the resultant grid power has been also regulated. Obviously, the grid power has not been completely smoothed, but it is sufficient as the curve valleys and humps have been flattened to a good level. For the real-time strategy, the actual demand profiles were used, and the upper/lower thresholds were obtained from the day-ahead strategy results (for each day, the maximum grid power is the upper threshold, and the minimum grid power is the lower threshold as shown in Figure 6 (a) for the first day). Clearly shown in Figure 6 (b) that the real-time strategy managed to adjust the day-ahead strategy setpoints to smooth completely the grid power curve. For both strategies, the maximum observed voltage was dropped to 1.023 pu, the losses have been reduced by 7.5% and the PFF has been improved by 80%.
The proposed strategies are implemented in a very fast manner as the average processing time for the day-ahead strategy is 6 s, and 41.6 ms for each time-point of the realtime strategy. Note that, the simulations were conducted using an i7-4510U CPU @ 2.00 GHz 8 GB RAM.

| BESS DEGRADATION
It is important to consider the lifetime of the BESS. The proposed approach preserves the BESS lifetime by using only 60% -70% of the BESS actual capacity, which has been shown to maintain the number of BESS cycles defined by the manufacturer [41]. However, to quantify the expected BESS revenues, the degradation of each BESS should be identified. To maximise the utilization of the deployed BESS it is assumed that each BESS is fully cycled daily. In addition, the battery end of life is reached when its capacity reaches 80% of the initial rated capacity in agreement with [42,43]. For the NaS battery (BESS1), the stated battery lifetime is 15 years [8]. To obtain the effective lifetime of the BESS considering the specified specification in Table 1, the NaS lifetime model in [42] is adopted. Hence, BESS2 should reach 80% of its initial capacity in 13 years ∼4745 cycles.
For the Li-ion battery (BESS2), the lifetime warranty is usually given by manufacturers as 10 years [44], the degradation model in [43] is adopted to quantify the effective lifetime of the BESS considering the operational specification in Table 1 and cell temperature of 25°C. According to this degradation model, BESS2 capacity loss should reach 20% of its initial capacity in 11 years. However, in this work, the BESS lifetime is taken as 10 years only and the BESS should be replaced after that, as due to other practical operational aspects, the BESS may degrade faster besides the degeneracy of its chemical  F I G U R E 5 Violated overhead lines (OHLs) before the intervention of the battery energy storage systems (BESS) and after the BESS intervention using the proposed strategies components due to its calendric life. For each BESS, the capacity deterioration (L) is determined using the degradation models which represents the loss in capacity from the initial capacity for each year. L is determined to be used in quantifying the loss in revenue due to the degradation.

| BESS EXPECTED REVENUES
In this section, the available services that the BESS can provide to leverage the financial returns are investigated. As mentioned previously, DSOs may incentivise third party BESS owners to locate their units in specific sensitive locations. BESS investors will expect profitable rates for the services they are providing in addition to other rates related to the availability. As the case of the Orkney Energy Storage Park project [9], SSEN constructed payment structures based on the ancillary service provided. All the structures have two major rates; the first rate is for the availability (£/MW/hour), and the second rate is for the utilization (£/MWh). These rates are associated with scalars defined based on the need of the network for each month.
In Northern Ireland, the BESS can have three possible ways for returns. The first one is by participating in the I-SEM, the second one is by participating in the DS3 services, while the third one is by receiving direct payments from the DSO for providing network flexibility. To quantify the returns and paybacks of the BESS through their lifetimes, the capital expenditures (CAPEX) and fixed operational expenditures (OPEX) should be identified. From previous projects and reports, the BESS financial specifications are approximated in Table 4 [7,42,44]. The CAPEX includes the BESS technology and all other installation components and auxiliaries, while the OPEX includes the charging, network connection, and all operation and maintenance costs.
Market data obtained from SEMOpx for one year from 1st October 2018 to 1st October 2019 [40], was used to quantify the possible revenue from participating in the day-ahead and Intraday markets of the I-SEM. While the possible payments from the BESS participation in DS3 services were quantified as an average annual payment for four important dynamic frequency response services (FFR, POR, SOR, and TOR1) from [45]. The revenue from providing network flexibility to the DSO cannot be fully identified as the payment structure has not yet been published. Hence, it's assumed that these payments can be quantified using the flexibility payments on the  Piclo Flex platform, the flexibility payments depend on the location and needed volume, hence, an average payment was determined from the UKPN competitions [12], whilst acknowledging that these payments may vary significantly in a Northern Ireland context. The BESS expected annual revenues are summarised in Table 5.
In order to determine the profitability at the end of BESS lifetime for these services, a discount rate (d r ) of 5% is considered reflecting the mid-point value of BEIS interest rates [46], and annual degradation factor (L) representing the cumulative capacity loss in each year due to degradation are considered. The BESS profitability is evaluated by determining the total savings (TS), the annual return on investment (AROI), and the net present value (NPV) at the end of BESS lifetime using the annual revenue (AR) for each scheme in Table 5. The results are given in Table 6, determined for effective lifetime LT as: From the tabulated results, the sole participation in I-SEM is not attractive for BESS due to the small returns. The participation in DS3 services is very profitable as the investment payback in less than the lifetime with positive NPV and AROI. However, the admission into these services for small resources installed on the distribution network is not guaranteed. Providing flexibility to the network may be promising for the BESS with appropriate subsidies. The required payments in Table 6 are the least annual returns to payback the BESS investment in its lifetime.
The results in Table 6 are the expected revenues from participating solely in each service. However, due to some limitations regarding the admission into DS3 services, distribution network constraints, and market volume availability, the actual revenues might be less than expected. On the other hand, stacking revenues by participating in different services has proven to maximise the profitability of the BESS deployment [13]. This can be settled after the total incentives and payments are defined by the DSO, the BESS investors can then stack revenue streams by participating in the DS3 services and the I-SEM coordinated with their contracted services with the DSO. However, in this case, the BESS may struggle to fully participate in all these services all the time due to practical limitations and overlapping of services, which may affect the total revenues.
DSOs should introduce commercial contracts that deliver cost efficiency for the general customer base while benefiting the BESS. The BESS payments should avoid or defer network conventional reinforcements as well as providing the network with the flexibility needed to accommodate more renewables and LCTs. From the previous results, for these two batteries, minimum daily payment of £252 -£284/MWh would need to be collected by BESS owners to payback the investment within batteries' lifetimes, yet further payments would need to be collected to make the investment profitable. These figures are subject to change according to the BESS CAPEX, OPEX, actual payments, and other subsidies. It is anticipated that the overall DSO payments for the distribution network services would need to be comparable to that of the power system DS3 services to make the BESS investment profitable and viable.

| DISCUSSION
It is projected that the deployment of BESS will increase widely to cope with the energy evolution by accommodating more renewables to meet the net-zero emissions target. Appropriate management of BESS is essential to maximise the economic and technical benefits. The proposed approach allows efficient utilization of the BESS for peak shaving and grid power levelling. Flattening grid power is crucial to maintain the system safe operation, especially with the large-scale integra-