## 2 Materials and Methods
### Battery
#### 2.4.4 LFP Li-Ion Models  
In Li-ion batteries, during each time step, the capacity loss \(Q(t)\) (percentage capacity fade) can be calculated as the sum of cycle capacity fade and calendar capacity fade:  
\[Q(t)\ =Q_{cal}(t)+Q_{cyc}(t) \tag{10}\]  
Cycle capacity fade is affected by the charge cycled, which depends on the number of cycles \(N\) and \(DOD\), and it is also affected by other factors such as \(SOC\), current and ambient temperature \(T\). Calendar aging depends on the temperature, \(SOC\), and time \(t\)[38].  
Different models can calculate the cycling capacity fade. Electrochemical models are usually very complex. One of the most simplified electrochemical models is [PERSON] et al.'s Li-ion battery lifetime prediction model [37; 39], which integrates the simplified single particle model (SSPM) and reduced-order model (ROM) to predict solid electrolyte interphase growth (SEI), giving good results for moderate cycling currents; however, it includes many variables that are dependent on the specific chemistry of the battery and are difficult to estimate.  
It must be settled that each aging model is intrinsically related to each cell type and, therefore, the same aging model cannot be valid for all the Li-ion models.  
[PERSON] et al.'s Cycle Aging Model  
[PERSON] et al. [43] obtained the cycle capacity fade for commercially available 2.2 Ah cells from A123 Systems, for different C-rates and temperatures:  
\[Q_{cyc}(t)=B\cdot\exp\left[\frac{-31700+370.3\cdot Crate}{RT}\right](Ah)^{0.55} \tag{11}\]  
where \(B\) is the pre-exponential factor that depends on \(Crate\) (h\({}^{-1}\)) (current through the battery in A divided by its nominal rated capacity in Ah), \(R\) is the gas constant (8.314 J/mol-K), and \(T\) is the ambient temperature (K). \(Ah=N\cdot DOD\cdot\mathrm{C}_{N}\) is the total Ampere-hour (Ah) throughput of the battery.  
[PERSON] et al.'s Cycle Aging Model  
[PERSON] et al. [50] model was obtained after testing commercial LFP cells for different currents \(I\) (A) and temperatures \(T\) (\({}^{\circ}\)C):  
\[Q_{cyc}(t)=a\cdot e^{b\cdot I}.T^{c\cdot I^{2}+d\cdot I+e}+f \tag{12}\]  
where \(a\), \(b\), \(c\), \(d\), \(e\), and \(f\) are fit parameters.  
[PERSON] et al.'s Calendar Aging Model  
Calendar capacity fade is modelled by [PERSON] et al. [44] using an expression based on Arrhenius law, dependent on temperature, time, and \(SOC\):  
\[Q_{cal}(t)=B_{cal}(SOC)\cdot\exp\left[\frac{-E_{a\_cal}(SOC)}{RT}\right]t^{ \varepsilon_{cal}(SOC)} \tag{13}\]where \(B_{cal}(SOC)\) (Ah/s\({}^{\rm Zcal}\)) is the pre-exponential factor depending on SOC, \(E_{a_{cal}}(SOC)\) is the activation energy (Jmol\({}^{-1}\)), and \(z_{cal}(SOC)\) is a dimensionless constant (assumed to be a value of 0.5).  
[PERSON] et al.'s Calendar Aging Model Combined with [PERSON] et al.'s Calendar Model  
Cycle aging mainly occurs when the battery is charging. [PERSON] et al. [44] postulates that it only happens when the current is above a given limit \(I_{limit}\) (A), using in this case the Wang model, while when current is lower than the limit calendar aging occurs, using, in said case, Equation (13). The limit current depends on the battery capacity to tackle high charging rates.