## 2 Materials and Methods
### Available Energy Case  
A further criterion for guaranteeing reliability in the case of devices with finite energy content is to require always a minimum amount of available energy. The available energy DoF implements the possibility of offsetting the delivery of service of \(\mathrm{R_{offset}}\) times the regulating power, only if the available energy content approaches the minimum threshold and until the SoC is restored to \(\mathrm{SoC_{target}}\). In this time period, offsetting is admitted for every condition of frequency deviation. A requirement of wide use [10,30] is that every device may always be available to provide 15 min of continuous full activation of the qualified power, both upward and downward: this is usually referred to as 15 equivalent minutes of available energy content. There is strong convergence towards this value since it relates to the contract durations for balancing products, the scheduling time for units and the imbalance settlement period in the EU [31,32]. Other regulations adopt 30 min [29,33]. Given the steep droop curve used in this study (full activation at 37.5 MHz of absolute deviation), a 30 min threshold is adopted. This corresponds to the given BESS (E/P of 2.28 h) to the approximated SoC thresholds reported in Table 3. These thresholds take into account the effect of BESS efficiency.  
Therefore, in the case the SoC gets equal or greater than \(\mathrm{SoC_{hi}}\), the SoC restoration process is triggered and power requested to the battery (\(\mathrm{P_{req}}\)) can be increased by \(\mathrm{R_{offset}}\) multiplied by regulating power. This offset is kept until \(\mathrm{SoC_{target}}\pm\varepsilon\) (see Table 2) is approached. On the other hand, for SoC equal to or lower than \(\mathrm{SoC_{lo}}\), power can be decreased to charge the battery. In this case, the offset remains until the battery reaches \(\mathrm{SoC_{target}}\pm\varepsilon\). In the implementation of the algorithm, the activation of the offset depends on a flag variable whose role is shown in Equation (7) and whose use is described in Figure 7a.  
\[\mathrm{P_{req}} = \mathrm{P_{FCR}}+\mathrm{R_{offset}}*\mathrm{P_{nom}}\quad\text{ if }\mathrm{SoC(t)}\ \geq\ \mathrm{SoC_{target}}\wedge\mathrm{flag}=1\] \[\mathrm{P_{req}} = \mathrm{P_{FCR}}-\mathrm{R_{offset}}*\mathrm{P_{nom}}\quad\text{ if }\mathrm{SoC(t)}\ \leq\ \mathrm{SoC_{target}}\wedge\mathrm{flag}=1\quad, \tag{7}\] \[\mathrm{P_{req}} = \mathrm{P_{FCR}}\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\]  
where \(\mathrm{P_{req}}\) is the total power requested to the battery, composed by the contribution for FCR (\(\mathrm{P_{FCR}}\)) and the power for restoration, and flag is the flag variable. The resulting droop curve is shown in Figure 7b. The DoF is represented by the pink area: it can be exploited only if flag = 1.  
Figure 6: Droop curve for dead-band strategy, with the pink area showing the range of possible offsetting guaranteed by the DoF.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Threshold** & **Abbreviation** & **Value** \\ \hline Higher SoC threshold & \(\mathrm{SoC_{hi}}\) & 85\% \\ Lower SoC threshold & \(\mathrm{SoC_{lo}}\) & 20\% \\ \hline \hline \end{tabular}
\end{table}
Table 3: SoC thresholds for respecting the 30 min criterion.