## 2 Materials and Methods
### Battery Modelling Using Equivalent Circuit Model  
The equivalent circuit model (ECM) is a widely used approach to simulate the electrical behaviour of lithium-ion batteries. The ECM abstracts the complex internal electrochemical processes of the battery into simpler electrical components, such as resistors, capacitors, and voltage sources. Among the various ECM configurations, the 2-loop model, also known as the 2 RC model, is particularly effective in capturing the dynamic behaviour of lithium-ion batteries under different operating conditions. The structure of the 2 RC model is depicted in Figure 2.  
To identify the model parameters more easily, the equations of the 2 RC model can be written in discrete form as follows:  
\[U_{cell,i}(t)=U_{OCV}(t)-R_{int}I_{cell,i}(t)-U_{1,j}(t)-U_{2,i}(t) \tag{5}\]  
\[U_{1,i+1}(t+1)=e^{\frac{-\Delta t}{R_{1}C_{1}}}U_{1,j}(t)+\left(1-e^{\frac{ \Delta t}{R_{1}C_{1}}}\right)R_{1}I_{i}(t) \tag{6}\]  
\[U_{2,i+1}(t+1)=e^{\frac{-\Delta t}{R_{2}C_{2}}}U_{2,i}(t)+\left(1-e^{\frac{ \Delta t}{R_{2}C_{2}}}\right)R_{2}I_{i}(t) \tag{7}\]  
In these equations (Equations (5)-(7)), \(U_{cell}\) is the terminal voltage, \(U_{OCV}\) is the open circuit voltage, \(I_{cell,j}\) is the battery current, and \(R_{int}\) is the internal ohmic resistance. U\({}_{1}\) and \(U_{2}\) are the voltages of the two RC networks, with the subscript \(i\) indicating the discrete time index for the time step. \(\Delta t\), \(R_{1}C_{1}\) and \(R_{2}C_{2}\) are the time constants of those RC networks. This ECM allows for the simulation of the terminal voltage using only the battery current. Figure 2: Schematic of the second-order (2 RC) equivalent circuit model. The State of Charge (SoC) of battery is used to define the remaining capacity of the lithium-ion battery and is expressed between 0% and 100% by the following equation:  
\[SoC=SoC_{initial}+\int\frac{I_{cell}}{Q_{max}}dt\ SOC(t) \tag{8}\]  
where \(SoC_{initial}\) is the initial \(SoC\) of the battery cell; \(Q_{max}\) is the maximum cell charge value. Accurate parameter identification is crucial for the reliability of the 2-loop equivalent circuit model. In the equivalent circuit network model, the input parameter of the model is current \(I_{cell}(t)\), while battery terminal voltage is the output parameter time step \(t\). The parameters \(R_{int}\) R\({}_{1}\), R\({}_{2}\), C\({}_{1}\) and C\({}_{2}\) are typically obtained through experimental techniques such as Electrochemical Impedance Spectroscopy (EIS) and Hybrid Pulse Power Characterization (HPPC). The \(U_{OCV}(t)\) parameter is determined as a function of SoC and the battery temperature. SOC-OCV curve is calculated based on test results obtained at different temperatures such as \(-10\)\({}^{\circ}\)C, \(25\)\({}^{\circ}\)C, and \(40\)\({}^{\circ}\)C.  
The battery equivalent circuit model in (5)-(7) must be expressed in an explicit state-space form to estimate the SoC value using extended Kalman Filter (KF). \[ \begin{split} x(k+1)=A_{sys}x(k)+B_{sys}u(k)\\ z(k)=C_{sys}x(k)+D_{sys}u(k)\end{split}  \tag{9}\]  
where \(z(k)e\mathbb{R}^{m}\) and \(u(k)e\mathbb{R}^{p}\) are output and input of the system, respectively. The system input is \(u(k)=I_{cell}(k)\), and output is \(z(k)=U_{cell}(k)\). \(x(k+1)e\mathbb{R}^{n}\) is the state vector at time \((k+1)\); the state variables in this study are \(x= \begin{bmatrix}SoC&V_{1}&V_{2}\end{bmatrix} .A_{sys}e\mathbb{R}^{nkm}\), \(B_{sys}e\mathbb{R}^{nexp}\), \(C_{sys}e\mathbb{R}^{nnm}\) and \(D_{sys}e\mathbb{R}^{nexp}\) are system matrices and expressed in the following form. \[ \begin{split} A_{sys}&=\left[\begin{array}{cc}1&0&0\\ 0&e^{\frac{\Delta t}{R_{1}C_{1}}}&0\\ 0&0&e^{\frac{-\Delta t}{R_{2}C_{2}}}\end{array}\right],\quad B_{sys}&=\left[ \begin{array}{c}\frac{-I_{cell}\Delta t}{Q_{max}}\\ \left(1-e^{\frac{\Delta t}{R_{1}C_{1}}}\right)R_{1}\\ \left(1-e^{\frac{\Delta t}{R_{2}C_{2}}}\right)R_{2}\end{array}\right]\end{split}  \tag{10}\]  
\[