# Variables Reduction in Sequential Resource Allocation Problems
## 4 Battery Storage Control  
To illustrate our variables reduction technique, we introduce a model for battery storage installation operated within a deregulated electricity market. First, let us introduce some technical characteristics. The battery _capacity_ stands for the maximal energy stored (measured in MWh), whereas the battery power is the amount of _electrical power_ (measured in MW) the installation can provide at any moment (see [18]). The conditions under which batteries are operated affect their performance in terms of the so-called _cycle life_, which can be defined as the number of cycles completed before the effective battery capacity falls below than 60% of its nominal capacity. Therefore, the Depth of Discharge (DoD) is essential. To give the reader a quantitative understanding of this phenomena, let us consider an example of a _lithium ion_ battery. Assuming that each charge/discharge cycle causes a battery deterioration, one would assume that emptying completely a battery (which corresponds to 100% DoD) 200 times is roughly equivalent (in terms of performance decline) to 400 cycles at 50% DoD and 600 cycles at 33% DoD. However, the actual behavior is different. Usually, a lithium-type battery serves longer than 400 cycles at 50% DoD and significantly longer than 600 cycles at 33% DoD, (see [19]) In our model, we suppose that visiting deep discharge states is costly since it affects battery life. For this reason, we suggest including a user-defined function which penalizes deep discharge states accordingly. Figure 1 illustrates its dependence measured in charge cycles and dependence on depth of discharge. We include such effects into our model by a cost penalization of deep discharge states. Beyond preventing deep discharge, further operational improvements encompass avoiding that the battery is fully charged (by reducing voltage when charging) and diminishing the so-called charge/discharge _rate_, which stands for the maximal electric flow during charging/discharging. We assume that the agent attempts to optimally manage an electricity storage by sequential decisions on the amount of energy procured/purchased through the intraday market and on the  
Figure 1: Typical relationship between battery life and depth of discharge. optimal charge/discharge of batteries. Obviously, these decisions must take into account the current electricity price, market state, storage level, and all costs and technical restrictions. Consider an energy retailer facing the obligation to satisfy an unknown energy demand of its customers at times \(t=0,\ldots,T-1\), while renewable energy sources produce a random electricity amount given a certain battery storage. To manage a potential energy imbalance, appropriate forward positions are taken in advance and decisions are made to drive the battery storage. This is a typical dynamic control problem, since at any time \(t=0,\ldots,T\) an action must be chosen (encompassing a simultaneous energy trade and battery control) which immediately causes some costs but also determines a transition to the next system state (future battery level and market conditions). Clearly, one needs to optimally balance the recent costs against those incurred in the future, based on the current situation. The problems of this type are naturally formulated and solved in terms of dynamic programming. Please note that we investigate the problem of electricity storage management within an abstract context which is applicable to most of the deregulated electricity markets, possibly with minor adaptation. Namely we consider energy trading on two time scales. The longer-term trading is realized by forwards or futures or by energy delivery contracts, for instance from the day-ahead trading. In practice, these long-term positions are constantly adjusted on a short-term scale using intraday trading or balancing procedures.