# Parameter Identification of Lithium Battery Model Based on Chaotic Quantum Sparrow Search Algorithm
## 2 Lithium-Ion Battery Model  
### Battery Modeling  
Compared with the integer-order model (IOM) of ECM, the fractional-order model (FOM) can simulate more electrochemical processes of the cell. Therefore, the FOM model can realistically describe the reaction process of the cell [42; 43] and give more precise predictions. To make a trade-off between accuracy and complexity, an FOM with two CPEs is constructed in this study, as shown in Figure 1.  
The structure is similar to that of the IOM, except for the use of the constant phase element. \(R_{0}\) is the ohmic internal resistance; \(U_{\infty}\) represents the open-circuit voltage (OCV); \(U_{T}\) denotes the terminal voltage; \(I\) is the operating current; the first loop formed by \(R_{1}\) and the constant phase element \(CPE_{1}\) represents the lithium-ion diffusion behavior in solid phases; the second loop formed by \(R_{2}\) and the constant phase element \(CPE_{2}\) mimics the double layer effect. \(U_{1}\) and \(U_{2}\) are the voltages of the loops. \(C_{1}\) and \(C_{2}\) are the abbreviations of \(CPE_{1}\) and \(CPE_{2}\). In order to make fractional order theory applicable to Kalman filtering, the Grunwald-Letnikov (GL) definition is employed to build the fractional-order battery model. As such, we have:  
\[{}_{\rho}D_{t}^{\theta}f(t)=\lim_{T_{s}\to 0}T_{s}^{-\theta}\sum_{i=0}^{[(t- \rho)/T_{s}]}(-1)^{i}\bigg{(} \begin{array}{c}\theta\\ i\end{array} \bigg{)}f(t-iT_{s}) \tag{1}\]  
where \({}_{\rho}D_{t}^{\theta}\) represents the fractional calculus operator, \(\theta\) is the fractional order, \(\rho\) and \(t\) stand for the upper and lower bounds of the integral and \(T_{s}\) indicates the step size. Discretizing (1), we can obtain  
\[D^{\theta}f(k)=T_{s}^{-\theta}\sum_{i=0}^{L_{m}}{(-1)^{i}\bigg{(} \begin{array} []{c}\theta\\ i\end{array} \bigg{)}f(k-i)} \tag{2}\]  
where \(L_{m}\) is a memory length. In theory, \(L_{m}\) should be the integer part of \(t/T_{s}\), including every sample point. However, the larger the value of \(L_{m}\), the greater the computational burden and the slower the computation. Therefore, we take a suitable integer for the value of \(L_{m}\) for simplicity. Based on this discrete expression and the mathematical description of the electrical behaviors of the battery using the FOM model  
\[ \begin{array}{l}D^{m}U_{1}(t)=-\frac{1}{R_{1}^{1}C_{1}}U_{1}(t)+\frac{1}{C_ {1}}I(t)\\ D^{n}U_{2}(t)=-\frac{1}{R_{2}C_{2}}U_{2}(t)+\frac{1}{C_{2}}I(t)\end{array}  \tag{3}\]  
the following equations can be obtained:  
\[ \begin{array}{l}T_{s}^{-m}\sum\limits_{i=0}^{L_{m}}{(-1)^{i}\bigg{(}\begin{array} []{c}m\\ i\end{array}\bigg{)}U_{1}(k+1-i)}=-\frac{1}{R_{1}C_{1}}U_{1}(k)+\frac{1}{C_{1 }}I(k)\\ T_{s}^{-n}\sum\limits_{i=0}^{L_{m}}{(-1)^{i}\bigg{(}\begin{array}{c}n\\ i\end{array}\bigg{)}U_{2}(k+1-i)}=-\frac{1}{R_{2}C_{2}}U_{2}(k)+\frac{1}{C_{2 }}I(k)\end{array}  \tag{4}\]  
The state of charge (SOC) is obtained by using the ampere-time integration method as:  
\[SOC(t)=SOC_{0}-\frac{\int\lambda I(t)dt}{Q_{m}} \tag{5}\]  
Figure 1: The fractional order model with two CPEs of the lithium-ion battery. where \(\lambda\) is the coulombic efficiency and \(Q_{n}\) is the nominal capacity of the battery. The terminal voltage is given by  
\[U_{b}(k)=U_{oc}(SOC)-U_{1}(k)-U_{2}(k)-R_{0}I(k) \tag{6}\]  
where \(U_{oc}(SOC)\) represents the relationship between the open-circuit voltage (OCV) and the \(SOC\), which is fitted using a polynomial function based on the experimental data, shown as:  
\[ \begin{array}{ll}U_{oc}=&-152.94\times SOC\$+595.53\times SOC\^{}7-931.73 \times SOC\^{}6+751.62\times SOC\^{}5\\ &-338.93\times SOC\^{}4+92.04\times SOC\^{}3-17.73\times SOC2+3.14\times SOC 1 +3.23\end{array}  \tag{7}\]  
Then, if we take \(U_{1}\), \(U_{2}\) and \(SOC\) as the state vector \(x\) and the battery terminal voltage as the output and current as the input, the matrix from of the state space equations can be expressed as follows:  
\[\left\{