Optimal Scheduling for Energy Storage Systems in Distribution Networks

: Distributed energy storage may play a key role in the operation of future low ‐ carbon power systems as they can help to facilitate the provision of the required flexibility to cope with the intermittency and volatility featured by renewable generation. Within this context, this paper addresses an optimization methodology that will allow managing distributed storage systems of different technology and characteristics in a specific distribution network, taking into account not only the technical aspects of the network and the storage systems but also the uncertainties linked to demand and renewable energy variability. The implementation of the proposed methodology will allow facilitating the integration of energy storage systems within future smart grids. This paper’s results demonstrate numerically the good performance of the developed methodology


Introduction
In the current scenario in which we are recovering from COVID-19 crisis effects, society has learnt several lessons and it is increasingly aware of the impact of global climate change, which is resulting in strategies oriented towards the development of energy systems neutral in greenhouse gas (GHG) emissions [1].The 2030 Agenda already includes as its Sustainable Development Goals (SDG7), the goal of guaranteeing access to affordable, safe, sustainable and modern energy for all [2].A roadmap to achieve this goal is to foster research and innovation to further improve technologies and reduce sustainable energy costs to transform power grids into low-carbon energy systems.However, renewable energy sources integration (such as wind or sun) can generate stability, reliability and power quality problems in the main grid [3].
Energy storage systems (ESS) can support renewable energy operations by providing voltage, smoothing out its fluctuations in output, balancing energy flow in the grid, matching supply and demand [4] and assisting distribution companies (grid operators and retailers) to supply reliable and sustainable services [5].Both the authorities [6] and research platforms [7] have recently highlighted the ESS importance as a key enabling technology.Therefore, energy storage stands out as a critical issue to unlock emission reductions through energy systems, becoming an important grantee of post-COVID incentive plans [1].Consequently, recovery measures could assist to install flexible electricity grids based on efficiency solutions, energy storage and many other clean energy technologies [8].
Despite the crucial role that distributed storage systems could play in the networks of the future, no decision-making support platforms have been developed capable of adequately scheduling their operation from the point of view of system operation.Suitable scheduling of ESS based on performance expectations is challenging and has been addressed in several studies [9][10][11].However, common management tools usually ignore aspects as relevant as the uncertainty in the operation of the system, as a consequence of the intermittent and variable nature of the distributed renewable generation [12].Some exceptions including the impact of the uncertainty associated with renewable generation sources on decision-making problems closely related to that addressed in this paper can be found in [13][14][15][16].
An important factor holding back the deployment of distributed storage is the possible degradation of battery storage capacity.The lifespan of these devices depends largely on the rate of degradation of their capacity which depends on the use made of these devices.Therefore, degradation is a key factor to take into account in the management of storage systems at any of the control levels.However, due to its complexity, this phenomenon is not usually taken into account in models intended for the scheduling and operation of these devices.This paper proposes an efficient methodology to optimize the management of distributed electrical storage in order to favour the penetration of distributed energy resources from nonmanageable renewable energy (mainly wind and photovoltaic energy) [17][18][19].A comprehensive scheduler is presented capable of planning the loading and unloading levels of these devices to cover the forecast demand, as well as define the necessary reserve levels to guarantee a safe operation of the system to face possible contingencies or unforeseen deviations in the predicted operating conditions of the distribution network.
This methodology enables the large-scale integration of storage technologies in the distribution network, being therefore useful for those areas where there are supply quality problems and may interest Distribution System Operators (DSOs) since it would allow them to make more efficient decisions in network operation.
The existing models in technical literature are either based on the use of heuristic algorithms [14,20,21] that do not guarantee the optimal solution or use a power flow approximation [22,23]; this makes the resulting model linear and it can be solved with commercial solvers but limits its application to purely radial networks.Additionally, papers based on AC flow approximations require a large number of variables and equations, which makes them computationally not cost-effective.Thus, based on the publication in [24], we propose a computationally efficient and exact methodology that allows solving both radial and meshed distribution networks with different voltage levels and of different sizes.
The purpose of this paper is presenting a novel methodology for the optimal scheduling of energy storage systems in distribution networks, which is computationally tractable for large distribution systems.Results obtained from a realistic case study demonstrate the feasibility of the solution provided by the proposed methodology as well as its good computational performance.
This paper is organized as follows: Section 2 describes the proposed methodology for the optimal operation of storage devices in medium-voltage distribution networks.In Section 3 the results obtained from applying the proposed methodology in a realistic-size case study are presented.Finally, in Section 4, conclusions are drawn.

Proposed Methodology
In this section, the proposed methodology for the optimal scheduling of energy storage systems in distribution systems is described.As sketched in Figure 1, the proposed methodology relies on the sequential solution of three modules.
In the first module, the demand and renewable generation levels for the entire scheduling horizon (e.g., 24 h of the next day) are forecasted.To that end, an effective forecasting algorithm has been developed.Similar to [25], this forecasting algorithm has been implemented under Cascaded Neuro-Evolutionary Algorithm (CNEA) forecasting model premises that are based on neural networks algorithms.The CNEA forecasting model consists of some Support Vector Machine (SVM) in cascade with an optimal chose of input models, number of neurons and evolutive training process.As this paper is focused on the decision-making process associated with the scheduling of storage devices in distribution networks, not much more detail is provided in this paper about this forecasting algorithm.On the other hand, the remaining two modules determine the operation of storage units in distribution networks.Specifically, in the second module, an optimization model which provides the best schedule of storage units in terms of active power is run.This optimal schedule is defined by minimizing the total operating cost of the distribution network throughout the scheduling horizon.Moreover, motivated by the results achieved in the work [24], the network equations implemented in the proposed optimization model rely on a DC power flow model.This simplification, as exposed in [24], may lead to suboptimal or even unfeasible solutions since the ratio of resistance to reactance (R/X) is generally high in this type of network.Notwithstanding, in the proposed approach, the results obtained from the optimization model are validated in a third module using the solution of an exact Alternating Current Optimal Power Flow (AC OPF).To carry out this AC OPF calculation, PSS ® E software has been used combined with several Python developments which allow the transfer of information between the second and the third modules.Moreover, this latter module is also used to define the optimal provision of reactive power by storage units.Therefore, in summary, the first module of the proposed algorithm aims at forecasting the next 24 h demand and generation curves, which results are used by the second module to determine the optimal active power set-points of the storage units.Finally, in the third module, results obtained from the second module are checked, and the resulting reactive set-points are determined.When an infeasible solution is found by the third module, additional equations are included in the optimization model of the second module to avoid obtaining the same infeasible result.This iteration process finishes when an optimal solution is found.It is worth mentioning that, in all simulations carried out, a single iteration has been needed for the algorithm to obtain an optimal solution.Mainly, this is because the purpose of this methodology is to schedule the operation of energy storage to cope with congestions or to maximize the use of renewable generation in distribution networks, but it is not intended to support voltage regulation in the network.

Proposed Optimization Model for the Active Power Scheduling of Storage Units
In this subsection, the mathematical formulation of the proposed optimization model is presented.As previously mentioned, this paper addresses the participation of storage units in the operation of active distribution networks with high penetration of renewable generation units, mainly those based on solar photovoltaics and wind.Thus, for expository purposes, in this paper other types of generation energy resources have not been included in the formulation.Moreover, it is assumed that the owner of the energy storage systems to be scheduled is the distribution system operator (DSO).Thus, such devices will be managed with the purpose of helping DSOs guarantee an adequate operation of the distribution network under their management, i.e., by reducing network′s congestions, avoiding exceeding the capacity limits of the substations.
The objective function of the optimization Equation ( 1) seeks to minimize the penalty cost of unserved energy while reducing the operating costs associated with the energy supplied by the external grid.The positive power imbalance refers to the increase of power loads, whilst the negative power imbalance is associated with a rise of the power generation.
The described model evaluates technical equations to restrict the model and find nearby real-life results.In order to consider the technical parameters of the distribution system and energy storage systems, the equations are described below: Using a linearized power flow model, the set of Equations ( 2)-( 4) include nodal power balance equations and network equations.Equation ( 5) ensures that the lower and upper substation limits are not surpassed.On the other hand, the set of Equations ( 6)-( 8) characterize the operation of storage units.In particular, the bounds on charging and discharging are set in Equations ( 6)-( 8), wherein the binary variables  and  are included to prevent simultaneous actions of charging and discharging (8).The volume of energy stored in period t is modelled in (9), which must comply with the energy capacity limits according to the Equation (10).Besides, as suggested in [26], to prevent a high the number of cycles performed by the energy storage systems and thus, minimize degradation issues, Equations ( 11)- (15) are included in the formulation.Finally, the binary nature of scheduling variables  and  is modelled in (16).
Since a single power substation and multiple power transformers of two and three windings are commonly encountered in medium voltage networks, two premises have been considered for the modelling of these elements in this paper: (1) substations are modelled as external grids and (2) power transformers are represented by distribution lines.
Regarding the substations located in distribution networks, they are considered as external grids where the apparent power flows from a substation to supply downstream demand in case local generation cannot supply loads.If the active power value of the substation is positive, it means power is imported from the external grid to supply the demand.Opposite to this, power is exported to the external grid in a scenario where local generation exceeds local demand.The limit of the active power of substation depends on the aggregated capacity of installed transformers in the power substation.
With regards to the two-and three-winding transformer's model, the equivalent circuit model shown in Figure 2 has been used.In that figure, variables  and  refer to the rated voltage level of the transformer's input and output, respectively;  and  refer to magnetization conductance and susceptance, respectively, which correspond to magnetization losses' resistive and reactive components.Since the value of such losses is negligible in most cases, this assumption has been also considered in this paper.Finally, the value defined as  refers to winding ratio for a two windings transformer.Hence, in the presented algorithm, the windings of the power transformers present in the distribution systems are represented as common distribution lines based on their electric parameters such as resistance (if different from null) and reactance, with the line′s rated capacity corresponding to that of the transformer.Having said that, two-winding transformers are modelled as one distribution line between the buses where it is connected, and three-winding transformers are modelled as three distribution lines for which the buses are connected.

Technical Validation Through PSS ® E Software
As aforementioned, the core of the proposed management and scheduling tool for energy storage systems can be divided into two separated modules: an optimization module for computing the active power set point and the PSS ® E (34.1, Siemens Power Technologies International, Munich, Germany) based power flow module used for computing the reactive power set point.The proposed energy storage scheduler algorithm has been developed using Python but uses PSS ® E′s powerful solver for both technically validating the solution from the optimization module and computing the reactive power set point for the energy storage systems.
In order to define loads and generation for the scheduling, a previously developed prediction algorithm has been used.
The PSS ® E load flow is carried out to determine whether the previously calculated active power set points cause any kind of technical restriction as voltage problems, overcurrent in lines or stability related issues.At the same time, a local voltage set point is used for computing the reactive power set point of each of the considered energy storage system.
In case any of these technical restrictions are not fulfilled, the optimization module recalculates the active power set points in an iterative method, assuring the optimal and feasible scenario by the end of the process.

Results
In this section, the results obtained from applying the proposed methodology to a case study based on real Spanish distribution network are discussed in detail.It is worth mentioning that, for confidential purposes, the data and the topology of the original distribution system have been exhaustively anonymized and slightly modified to generate this case study (available in Supplementary Materials).Therefore, in contrast to distribution systems customarily used in the related literature [27], this case study represents a realistic application for this kind of management algorithms.Simulations have been implemented on a Lenovo with an Intel ® Core TM i5-7500 at 3.4 GHz and 8 GB of RAM using GUROBI version 9.0.1 under Python with PICOS package and PSS ® E version 34.1.
The system under study constitutes a distribution system of 78 nodes (47 of which constitute load nodes) distributed among normalized distribution voltage levels as 132 kV, 66 kV, 33 kV, 20 kV, 12.3 kV, 11 kV and 6.6 kV through the connection of two and three winding transformers between nodes.Note that the size of this benchmark is similar to those of several real-life distribution systems.Additionally, as a salient feature over the previous works [20][21][22][23], this distribution network is characterized by having different voltage levels, which complicates the decision-making process.Initially, the real distribution network under study does not consider any energy storage units, so the presented methodology would be useless for this system, at the current state.To solve this issue, two energy storage units have been included to test the presented methodology.The technical data of these storage devices can be found in Table 1.Besides, it has been assumed that the energy stored in period 0, i.e., in the last period of the previous day, is equal to 20% of the capacity.Moreover, as it is customary in the related technical literature, the final stored energy has been forced to be between 10% and 20% of their corresponding capacity for all storage units.Finally, the cost for unserved energy has been set equal to $2000/MWh as done in [28], whereas the cost of the energy supplied by all substations has been set identical and equal to $85.3/MWh as done in [29].In order to verify the developed methodology, two generation scenarios have been chosen with a low and a high level of renewable generation.The first scenario considers a low level of renewable generation whereas the second scenario includes a high penetration of renewable generation.Through comparing these two scenarios, the management of energy storage systems should reduce congestions and electric losses in distribution lines.
For the first generation scenario, Figure 3 compares the results obtained from the proposed model, considering and disregarding Equations ( 11)-( 15), which limits the number of charging and discharging cycles.To that end, for such simulations including the impact of Equations ( 11)-( 15), the user-defined parameter, , has been set to 2. Thus, all storage units in the distribution network can only change their operation mode twice throughout the scheduling horizon.As can be seen in Figure 3, limiting the number of cycles reduces the participation of energy storage systems in the operation of a distribution network, and as a result, increases the total power imbalance.In particular, the total power imbalance obtained considering such equations increases by 8 kW with respect to that obtained by disregarding them.11)-( 15) for the first scenario.
Table 2 shows the results obtained from the third module considering the results obtained from the second module considering Equations ( 11)-( 15), i.e., the results shown in Figure 3b.As it can be seen, the storage systems only absorb or supply active power when the optimization algorithm considers it necessary but, contrarily, the energy systems always exchange reactive power as their objective is to control their local buses voltage to 1 per unit.As the battery systems are not big enough to considerably change the bus voltage, their reactive power set points are usually their upper or lower reactive power limits, depending on where in the network each energy storage system is located.In very external nodes where the voltages are low, a battery pack would supply reactive power in order to step up the local voltage.In the opposite way, in nodes where there are a lot of distributed generation, it can be supposed that the energy storage systems would absorb reactive power, as well as active, during peak generation hours in order to step down the local voltage as well as store energy for when it is needed.
Finally, Figure 4 shows the results obtained from the first module for the second scenario.As can be observed, the participation of the storage units in this scenario is practically insignificant.That is because there are no congestions in distribution network and the cost of supply energy is constant throughout the scheduling horizon.Analogously, to evaluate the impact of the supply cost profile on the scheduling of energy storage units, Figure 5b depicts the results obtained for the second scenario considering the cost of the energy supply illustrated in Figure 5a.Unlike results obtained from the original second scenario, in this subscenario, storage units carried out arbitrage actions by charging in periods with lower costs (time periods 5-7) and discharging in periods with higher costs (time periods 21 and 22).As for the computational effort, the maximum time computing required for all simulations has been of 320 s.Thus, the proposed methodology is suitable to provide a solution within a practical amount of time for a reasonably-sized distribution system.This is a mayor computational advantage over the existing works based on power flow approximations [22,23] which need a large amount of binary decision variables and equations to model network equations and over the existing works relying on heuristic techniques [14,20,21], which need several iterations to attain the solution.

Conclusions
This paper has presented a novel and efficient methodology to obtain the optimal scheduling of distributed energy storage devices for distribution networks.This methodology has been developed taking into account that, through optimal flexibility management, the total cost of operation of the distribution system is minimized.In other words, the use of renewable generation is maximized, and the methodology allows characterizing any possible anomaly that may occur in the distribution network concerning network unavailability and network stability, as well as fluctuations in the predicted levels of renewable generation and/or demand, to determine the reserve levels of the storage systems of energy.
The proposed methodology is computationally efficient and allows solving real distribution networks (both radial and meshed distribution networks with different voltage levels and different sizes).
Numerical results based on different scenarios and hypotheses have validated the proposed methodology to manage the distributed storage devices through the use of the optimal scheduling tool.

Figure 1 .
Figure 1.Flowchart of the solution methodology.

Figure 2 .
Figure 2. Equivalent circuit model of a power transformer.

Figure 4 .
Figure 4. Results obtained from the proposed methodology for the second scenario.

Figure 5 .
Figure 5. Results obtained for the second scenario considering a nonconstant cost profile.(a) Cost of the energy supply, (b) power injection and level of stored energy.

Table 2 .
Results obtained from the second module for the first scenario.
Set of indexes s of the storage units located at bus n  Set of indexes d of the loads located at bus n  Set of indexes g of the generating units located at bus n  Set of indexes b of the substation located at bus n T Set of time periods indexes t Parameters ɛ Maximum number of outer-loop iterations allowed in the proposed methodology  ,  Charging and discharging rate of storage unit s  Cost of the energy supplied by substation  Penalty cost coefficient  Forecast load of generating unit d in period t  ,  Minimum and maximum limits of stored energy of storage units s NC Number of maximum cycles allowed  ,  Maximum and minimum limits of discharging power of storage unit s  ,  Maximum and minimum limits of charging power of storage unit s Power imbalance level in bus n in period t  Level of power requested or provided to the substation b in period t  Level of discharging active power of storage unit s in period t  Level of charging active power of storage unit s in period t  Level of reactive power of storage unit s in period t  ,  Minimum and maximum limits of stored energy of storage units s NC Maximum number of cycles allowed  Power flow in branch l in period t  Phase angle at bus n in period t  ,  Binary variables that characterizes the operating modes of charging and discharging, respectively, in a storage unit s in period t, respectively  Auxiliary variable that is equal to 1 if storage unit s is scheduled to start charging or discharging in period t, being 0, otherwise  Auxiliary variable that is equal to 1 if storage unit s is scheduled to charge in period t but it is scheduled to discharge in period t, being 0, otherwise  Auxiliary variable that is equal to 1 if storage unit s is scheduled to discharge in period t but it is scheduled to charge in period t, being 0, otherwise