## 2 Battery Aging Following Frequency Regulation Cycles
### Battery Electric Model Validation  
The battery model was tested by simulating all the performed aging cycles. The experimental current profiles of the aging tests were used as inputs for the model. Then, the output voltage of the model was compared with the experimental one. It is interesting to observe how the battery model perfectly follows the real battery voltage output for the initial tests, with an average error of 0.55%. In Figure 6, the 15 th and 16 th aging cycles are shown, and it is possible to note that in the simulation, the battery recharges take place at the same instant as in the experimental test.  
By contrast, as the number of aging cycles increases, the moment when the battery needs to be recharged differs more and more between the experimental data and the simulation. Figure 7 shows a comparison between the simulation results and the experimental measurements for the 260 th and 261 th aging cycles. The difference between the two curves is due to the fact the battery model does not take into account the aging of the battery. As it is possible to see, the model error is visibly too high and not acceptable.  
Figure 5: Battery model in the Simulink environment.  
In order to improve the model, the lost battery capacity \(Q_{loss}\) was computed by means of the approach suggested in [22] by [PERSON] et al.:  
\[Q_{loss}=Be^{(-\frac{E_{g}}{RB})}Ah^{Z} \tag{4}\]  
where:  
\(E_{a}\) is the battery activation energy [J/mol], \(R\) is the ideal gas constant [J/(mol\(\cdot\)K)] and \(\vartheta\) the temperature [K].  
The coefficients \(B\) and \(Z\) are derived by exploiting the \"fittype\" function of Matlab and using as inputs the experimental data of the aging tests.  
The result of the fitting procedure is shown in Figure 8.  
Figure 6: (a) Comparison between measurements and model results for the 15 th and 16 th aging cycles; (b) Model percentage error.  
Figure 7: Comparison between measurements and model results for the 260 th and 261 th aging cycles.  
Once the \(Q_{loss}\) computation has been implemented in the model, the battery SoC computation is updated by means of the following equation:  
\[SoC\%=\frac{(Q-Q_{loss})-\int_{t_{0}}^{t_{i}}i(t)dt}{(Q-Q_{loss})}\cdot 100 \tag{5}\]  
The simulations fit very well with the experimental measurements for all the aging tests, with an average error lower than 1%. This precision is satisfactory in order to foresee the battery electrical behaviour during the grid frequency regulation operation. By way of example, Figure 9 shows the same comparison of Figure 7 by taking into account the battery aging effects.  
It is worth noting that the implemented aging model cannot be considered as a general one for LMO cathode based batteries. Rather, it is specific for the test carried out in this particular research.  
However, the result of the above presented analysis suggests that the battery aging effects caused by frequency regulation cycles could be related to the energy amount that has to be exchanged with the grid, which is proportional to the Ah throughput. Moreover, by taking into account the experimental evidence that emerged in the measurement campaign presented in [14], the frequency of the power supplied by the battery should be limited as well in order to counter the battery aging during frequency regulation cycles.  
The basic idea behind this paper is to share the power that the storage system has to supply between batteries and a flywheel, by means of a suitable power management. Therefore, the second part of this work is the development of a precise flywheel electrical model.  
Figure 8: Comparison between the capacity interpolation function and the experimental measurements.  
Figure 9: Comparison between model results and experimental measurements once the aging effect has been taken into account in the model.