# Tuning Window Size to Improve the Accuracy of Battery State-of-Charge Estimations Due to Battery Cycle Addition

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

#### Theoretical Review

## 2. Lithium-Ion Battery Modelling

## 3. Lithium-Ion Battery State Indicator

#### 3.1. SoC Estimation Algorithm

#### 3.2. Adaptive Moving-Window Size Delineation

- Initialize the mean ($\overline{{X}_{o}}$) and the covariance (${P}_{0}$) of the initial system state ${X}_{0}$$$\left\{\begin{array}{c}\overline{{X}_{0}}=\mathrm{E}\left({X}_{0}\right)\\ {P}_{0}=\mathrm{E}\left[\left({X}_{0}-{\overline{X}}_{0}\right){\left({X}_{0}-{\overline{X}}_{0}\right)}^{T}\right]\end{array}\right.$$
- Time generation for state and covariance prediction.

- ⚬
- Generate the measurement.Kalman gain matrix:$${\text{}K}_{k}={P}_{k}^{-}{C}_{k}^{T}{\left({C}_{k}{P}_{k}^{-}{C}_{k}^{T}+{R}_{k}\right)}^{-1}$$
- ⚬
- Update the covariance.$${P}_{k}=\left(I-{K}_{k}{C}_{k}\right){P}_{k}{\left(I-{K}_{k}{C}_{k}\right)}^{T}+{K}_{k}{R}_{k}{K}_{k}^{T}$$
- ⚬
- Update the state.$${K}_{k}^{+}={\widehat{X}}_{k}+{K}_{k}{e}_{k}$$$${e}_{k}={Y}_{k}-g\left({\widehat{X}}_{k},{u}_{k}\right)$$
- ⚬
- Adaptively adjust $Q$ and $R$.$${Q}_{k}={K}_{k}{H}_{k}{K}_{k}^{T}$$$${H}_{k}=\frac{1}{\mathrm{M}}{\sum}_{i=k-\mathrm{M}+1}^{k}{e}_{k}{e}_{k}^{T}$$$${R}_{k}={H}_{k}-C{P}_{k}{C}^{T}$$

## 4. Methodology, Experiments, and Parameter Identification

#### 4.1. Experiments

#### 4.2. Parameters Identification for Second-Order ECM

#### 4.3. Methodology

## 5. Result and Discussion

#### 5.1. SoC Estimation

^{−3}), while the highest is at $\mathrm{M}$1 = 1 (4 × 10

^{−1}) in cycle 1. The second-order AEKF method has the lowest RSME on $\mathrm{M}$5 at 1.5994 × 10

^{−4}and the highest RSME on $\mathrm{M}$1 at 1.6269 × 10

^{−2}. As the cycle increases, the RSME values tend to rise. As shown in cycle 500 for the first-order AEKF, the smallest RSME value is 9.7178 × 10

^{−3}, and the largest RSME value is 9 × 10

^{−1}. Meanwhile, the lowest RSME percentage for the second-order AEKF is 5.2878 × 10

^{−3}in $\mathrm{M}$5, while the highest RSME percentage is 9.1223 × 10

^{−2}in $\mathrm{M}$1.

#### 5.2. Robustness Analysis with Different Initial SoCs

## 6. Conclusions

- The first-order AEKF is more straightforward, as it does not need pre-processing for polarization resistance and capacity determination.
- The second-order AEKF improves SoC estimation compared to the first-order AEKF because it involves more data from the lookup table (LUT) for determining parameter values such as polarization resistance (${R}_{1}$ and ${R}_{2}$) and polarization capacitor (${Cp}_{1}$ and ${Cp}_{2}$) in each cycle.
- As the number of cycles increases, so does the number of model errors; this may be controlled by adjusting the window size ($\mathrm{M}$) variable. This applies to both sets of models.
- $\mathrm{M}$ will provide a quick response detection measurement and adjust the character of the estimation to the actual value.
- A variety of initial SoC values were also considered in the simulation to investigate the robustness of the first- and second-order AEKF models. The results show that the SoC estimation line accurately followed the SoC reference trajectory.

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Aung, H.; Low, K.S.; Goh, S.T. State-of-charge estimation of lithium-ion battery using square root spherical unscented Kalman filter (Sqrt-UKFST) in nanosatellite. IEEE Trans. Power Electron.
**2014**, 30, 4774–4783. [Google Scholar] [CrossRef] - Musgrave, G.; Larsen, A.; Sgobba, T. Safety Design for Space Systems; Butterworth-Heinemann: Oxford, UK, 2009. [Google Scholar]
- Wang, H.; Pourmousavi, S.A.; Soong, W.L.; Zhang, X.; Ertugrul, N. Battery and energy management system for vanadium redox flow battery: A critical review and recommendations. J. Energy Storage
**2023**, 58, 106384. [Google Scholar] [CrossRef] - Ng, M.-F.; Zhao, J.; Yan, Q.; Conduit, G.J.; Seh, Z.W. Predicting the state of charge and health of batteries using data-driven machine learning. Nat. Mach. Intell.
**2020**, 2, 161–170. [Google Scholar] [CrossRef] - Park, S.; Ahn, J.; Kang, T.; Park, S.; Kim, Y.; Cho, I.; Kim, J. Review of state-of-the-art battery state estimation technologies for battery management systems of stationary energy storage systems. J. Power Electron.
**2020**, 20, 1526–1540. [Google Scholar] [CrossRef] - Anggraeni, D.; Sudiarto, B.; Subhan, A.; Chasanah, N.; Santosa, C.E.; Suryanti, D.I.; Prabowo, G.S.; Priambodo, P.S. SoC Estimation Lithium Polymer Battery Based on Equivalent Circuit Model and Extended Kalman Filter. In Proceedings of the 2022 5th Asia Conference on Energy and Electrical Engineering (ACEEE), Kuala Lumpur, Malaysia, 8–10 July 2022; pp. 118–122. [Google Scholar]
- Xi, Z.; Dahmardeh, M.; Xia, B.; Fu, Y.; Mi, C. Learning of battery model bias for effective state of charge estimation of lithium-ion batteries. IEEE Trans. Veh. Technol.
**2019**, 68, 8613–8628. [Google Scholar] [CrossRef] - Lin, X.; Tang, Y.; Ren, J.; Wei, Y. State of charge estimation with the adaptive unscented Kalman filter based on an accurate equivalent circuit model. J. Energy Storage
**2021**, 41, 102840. [Google Scholar] [CrossRef] - Oji, T.; Zhou, Y.; Ci, S.; Kang, F.; Chen, X.; Liu, X. Data-driven methods for battery soh estimation: Survey and a critical analysis. IEEE Access
**2021**, 9, 126903–126916. [Google Scholar] [CrossRef] - Hassan, M.U.; Saha, S.; Haque, M.E.; Islam, S.; Mahmud, A.; Mendis, N. A comprehensive review of battery state of charge estimation techniques. Sustain. Energy Technol. Assess.
**2022**, 54, 102801. [Google Scholar] [CrossRef] - Nath, A.; Mehta, R.; Gupta, R.; Bahga, S.S.; Gupta, A.; Bhasin, S. Control-Oriented Physics-Based Modeling and Observer Design for State-of-Charge Estimation of Lithium-Ion Cells for High Current Applications. IEEE Trans. Control Syst. Technol.
**2022**, 30, 2466–2479. [Google Scholar] [CrossRef] - Li, X.; Huang, Z.; Tian, J.; Tian, Y. State-of-charge estimation tolerant of battery aging based on a physics-based model and an adaptive cubature Kalman filter. Energy
**2021**, 220, 119767. [Google Scholar] [CrossRef] - Adaikkappan, M.; Sathiyamoorthy, N. Modeling, state of charge estimation, and charging of lithium-ion battery in electric vehicle: A review. Int. J. Energy Res.
**2022**, 46, 2141–2165. [Google Scholar] [CrossRef] - Kazmi, S.N.A.; Ulasyar, A.; Khattak, A.; Zad, H.S. A new state of charge estimation technique of lithium-ion battery using adaptive extended Kalman filter and artificial neural network. Trans. Inst. Meas. Control
**2023**, 45, 747–760. [Google Scholar] [CrossRef] - Vidal, C.; Malysz, P.; Kollmeyer, P.; Emadi, A. Machine learning applied to electrified vehicle battery state of charge and state of health estimation: State-of-the-art. IEEE Access
**2020**, 8, 52796–52814. [Google Scholar] [CrossRef] - Xiong, R.; Cao, J.; Yu, Q.; He, H.; Sun, F. Critical review on the battery state of charge estimation methods for electric vehicles. IEEE Access
**2017**, 6, 1832–1843. [Google Scholar] [CrossRef] - Yang, S.; Zhou, S.; Zhou, X.; Lu, Y.; Liu, X.; Hua, Y.; Pan, Y.; Yan, X.; Xiao, L.; Tang, X.; et al. All-climate state-of-charge estimation and equilibrium management for lithium-ion batteries based on diffusion equivalent model. J. Energy Storage
**2022**, 52, 104700. [Google Scholar] - Naseri, F.; Schaltz, E.; Stroe, D.-I.; Gismero, A.; Farjah, E. An enhanced equivalent circuit model with real-time parameter identification for battery state-of-charge estimation. IEEE Trans. Ind. Electron.
**2021**, 69, 3743–3751. [Google Scholar] [CrossRef] - Hidalgo-Reyes, J.; Gómez-Aguilar, J.F.; Escobar-Jiménez, R.F.; Alvarado-Martínez, V.M.; López-López, M. Classical and fractional-order modeling of equivalent electrical circuits for supercapacitors and batteries, energy management strategies for hybrid systems and methods for the state of charge estimation: A state of the art review. Microelectron. J.
**2019**, 85, 109–128. [Google Scholar] [CrossRef] - Shi, H.; Wang, S.; Fernandez, C.; Yu, C.; Li, X.; Zou, C. Adaptive iterative working state prediction based on the double unscented transformation and dynamic functioning for unmanned aerial vehicle lithium-ion batteries. Meas. Control
**2020**, 53, 1760–1773. [Google Scholar] [CrossRef] - Yang, S.; Zhou, S.; Hua, Y.; Zhou, X.; Liu, X.; Pan, Y.; Ling, H.; Wu, B. A parameter adaptive method for state of charge estimation of lithium-ion batteries with an improved extended Kalman filter. Sci. Rep.
**2021**, 11, 5805. [Google Scholar] [CrossRef] - Li, K.; Zhou, F.; Chen, X.; Yang, W.; Shen, J.; Song, Z. State-of-charge estimation combination algorithm for lithium-ion batteries with Frobenius-norm-based QR decomposition modified adaptive cubature Kalman filter and H-infinity filter based on electro-thermal model. Energy
**2023**, 263, 125763. [Google Scholar] [CrossRef] - Anggraeni, D.; Sudiarto, B.; Kurniawan, F.; Priambodo, P.S. Lithium-Ion Battery Modelling and Adaptive Extended Kalman Filter Implementation for BMS Application Software Development. Int. J. Renew. Energy Res.
**2023**, 13, 412–422. [Google Scholar] - Su, L.; Zhou, G.; Hu, D.; Liu, Y.; Zhu, Y. Research on the state of charge of lithium-ion battery based on the fractional order model. Energies
**2021**, 14, 6307. [Google Scholar] [CrossRef] - Xu, Y.; Hu, B.; Wu, T.; Xiao, T. Joint estimation of state of charge and state of health of lithium-ion battery based on fractional order model. J. Power Electron.
**2022**, 22, 318–330. [Google Scholar] [CrossRef] - Zhang, Z.; Zhou, D.; Xiong, N.; Zhu, Q. Non-fragile H∞ nonlinear observer for state of charge estimation of lithium-ion battery based on a fractional-order model. Energies
**2021**, 14, 4771. [Google Scholar] [CrossRef] - Sethia, G.; Nayak, S.K.; Majhi, S. An approach to estimate lithium-ion battery state of charge based on adaptive Lyapunov super twisting observer. IEEE Trans. Circuits Syst. I Regul. Pap.
**2020**, 68, 1319–1329. [Google Scholar] [CrossRef] - Wang, W.; Wang, X.; Xiang, C.; Wei, C.; Zhao, Y. Unscented kalman filter-based battery SOC estimation and peak power prediction method for power distribution of hybrid electric vehicles. IEEE Access
**2018**, 6, 35957–35965. [Google Scholar] [CrossRef] - St-Pierre, M.; Gingras, D. Comparison between the unscented Kalman filter and the extended Kalman filter for the position estimation module of an integrated navigation information system. In Proceedings of the IEEE Intelligent Vehicles Symposium, Parma, Italy, 14–17 June 2004; pp. 831–835. [Google Scholar]
- Jin, Y.; Su, C.; Luo, S. Improved algorithm based on AEKF for state of charge estimation of lithium-ion battery. Int. J. Automot. Technol.
**2022**, 23, 1003–1011. [Google Scholar] [CrossRef] - Shi, N.; Chen, Z.; Niu, M.; He, Z.; Wang, Y.; Cui, J. State-of-charge estimation for the lithium-ion battery based on adaptive extended Kalman filter using improved parameter identification. J. Energy Storage
**2022**, 45, 103518. [Google Scholar] [CrossRef] - Duan, L.; Zhang, X.; Jiang, Z.; Gong, Q.; Wang, Y.; Ao, X. State of charge estimation of lithium-ion batteries based on second-order adaptive extended Kalman filter with correspondence analysis. Energy
**2023**, 280, 128159. [Google Scholar] [CrossRef] - Savargaonkar, M.; Oyewole, I.; Chehade, A.; Hussein, A.A. Uncorrelated Sparse Autoencoder With Long Short-Term Memory for State-of-Charge Estimations in Lithium-Ion Battery Cells. IEEE Trans. Autom. Sci. Eng.
**2022**, 1–12. [Google Scholar] [CrossRef] - Huang, C.-S. Online Parameter Identification for Lithium-Ion Batteries: An Adaptive Moving Window Size Design Methodology for Least Square Fitting. IEEE Trans. Veh. Technol.
**2023**, 72, 5824–5832. [Google Scholar] [CrossRef] - Candy, J.V. Model-Based Signal Processing; John Wiley & Sons: Hoboken, NJ, USA, 2005. [Google Scholar]
- He, Z.; Yang, Z.; Cui, X.; Li, E. A method of state-of-charge estimation for EV power lithium-ion battery using a novel adaptive extended Kalman filter. IEEE Trans. Veh. Technol.
**2020**, 69, 14618–14630. [Google Scholar] [CrossRef] - Ren, P.; Wang, S.; He, M.; Cao, W. Novel strategy based on improved Kalman filter algorithm for state of health evaluation of hybrid electric vehicles Li-ion batteries during short-and longer term operating conditions. J. Power Electron.
**2021**, 21, 1190–1199. [Google Scholar] [CrossRef] - Wang, S.; Takyi-Aninakwa, P.; Fan, Y.; Yu, C.; Jin, S.; Fernandez, C.; Stroe, D.-I. A novel feedback correction-adaptive Kalman filtering method for the whole-life-cycle state of charge and closed-circuit voltage prediction of lithium-ion batteries based on the second-order electrical equivalent circuit model. Int. J. Electr. Power Energy Syst.
**2022**, 139, 108020. [Google Scholar] [CrossRef] - Amir, S.; Gulzar, M.; Tarar, M.O.; Naqvi, I.H.; Zaffar, N.A.; Pecht, M.G. Dynamic equivalent circuit model to estimate state-of-health of lithium-ion batteries. IEEE Access
**2022**, 10, 18279–18288. [Google Scholar] [CrossRef] - Akeyo, O.M.; Rallabandi, V.; Jewell, N.; Patrick, A.; Ionel, D.M. Parameter identification for cells, modules, racks, and battery for utility-scale energy storage systems. IEEE Access
**2020**, 8, 215817–215826. [Google Scholar] [CrossRef] - Li, B.; Bei, S. Estimation algorithm research for lithium battery SOC in electric vehicles based on adaptive unscented Kalman filter. Neural Comput. Appl.
**2019**, 31, 8171–8183. [Google Scholar] [CrossRef] - Ge, C.; Zheng, Y.; Yu, Y. State of charge estimation of lithium-ion battery based on improved forgetting factor recursive least squares-extended Kalman filter joint algorithm. J. Energy Storage
**2022**, 55, 105474. [Google Scholar] [CrossRef] - Okatan, A.; Hajiyev, C.; Hajiyeva, U. Fault detection in sensor information fusion Kalman filter. AEU-Int. J. Electron. Commun.
**2009**, 63, 762–768. [Google Scholar] [CrossRef] - Devarakonda, L.; Hu, T. Effects of rest time on discharge response and equivalent circuit model for a lead-acid battery. J. Power Sour.
**2015**, 282, 19–27. [Google Scholar] [CrossRef]

**Figure 7.**The AEKF 1st- and 2nd-order ECM performance estimation result for (

**a**) 1 cycle; (

**b**) 100 cycles; (

**c**) 200 cycles; (

**d**) 300 cycles; (

**e**) 400 cycles; and (

**f**) 500 cycles.

Cycle 1 | M | RSME |
---|---|---|

1.5 | 0.25 | |

2 | 0.33 | |

5 | 0.88 |

Cycle | ${\mathit{R}}_{0}$ (mΩ) | ${\mathit{R}}_{1}$ (mΩ) | ${\mathit{C}}_{\mathit{p}1}$ (F) |
---|---|---|---|

1 | 13.57 | 0.0018 | 281.59 |

100 | 14.53 | 0.0078 | 283.98 |

200 | 14.84 | 0.0177 | 285.34 |

300 | 17.85 | 0.0179 | 285.47 |

400 | 18.86 | 0.0182 | 284.87 |

500 | 19.87 | 0.0192 | 285.51 |

Cycle | ${\mathit{R}}_{0}$ (mΩ) | ${\mathit{R}}_{1}$ (mΩ) | ${\mathit{R}}_{2}$ (mΩ) | ${\mathit{C}}_{\mathit{p}1}$ (F) | ${\mathit{C}}_{\mathit{p}2}$ (F) |
---|---|---|---|---|---|

1 | 40 | 0.00043 | 0.00095 | 4651.16 | 105.263 |

100 | 41 | 0.00031 | 0.00079 | 6451.08 | 125.313 |

200 | 44 | 0.00032 | 0.00012 | 6250.03 | 82.508 |

300 | 45 | 0.00021 | 0.00042 | 9523.81 | 532.940 |

400 | 100 | 0.00017 | 0.00034 | 9764,78 | 294.118 |

500 | 101 | 0.00071 | 0.00022 | 7582.14 | 447.328 |

**Table 4.**Outline of the SoC assessment of first-order AEKF and second-order ECM for different window sizes and levels of battery debasement.

Cycle | $\mathbf{M}$ | AEKF | ||
---|---|---|---|---|

Symbol | Number | 1st Order | 2nd Order | |

1 | M5 | 0.01 | 4.1461 × 10^{−3} | 1.5594 × 10^{−4} |

M4 | 0.1 | 4.4144 × 10^{−2} | 2.6201 × 10^{−3} | |

M3 | 0.5 | 2.1000 × 10^{−1} | 1.4653 × 10^{−2} | |

M2 | 0.8 | 3.3000 × 10^{−1} | 1.5782 × 10^{−2} | |

M1 | 1 | 4.1000 × 10^{−1} | 1.6269 × 10^{−2} | |

100 | M5 | 0.01 | 4.8718 × 10^{−3} | 3.5576 × 10^{−4} |

M4 | 0.1 | 4.8714 × 10^{−2} | 2.4692 × 10^{−3} | |

M3 | 0.5 | 2.4000 × 10^{−1} | 7.3633 × 10^{−3} | |

M2 | 0.8 | 3.9000 × 10^{−1} | 2.1370 × 10^{−2} | |

M1 | 1 | 4.9000 × 10^{−1} | 2.6655 × 10^{−2} | |

200 | M5 | 0.01 | 6.1204 × 10^{−3} | 4.4408 × 10^{−4} |

M4 | 0.1 | 6.1199 × 10^{−2} | 2.8086 × 10^{−3} | |

M3 | 0.5 | 3.1000 × 10^{−1} | 9.0148 × 10^{−3} | |

M2 | 0.8 | 4.9000 × 10^{−1} | 2.6287 × 10^{−2} | |

M1 | 1 | 6.0000 × 10^{−1} | 3.1965 × 10^{−2} | |

300 | M5 | 0.01 | 7.3740 × 10^{−3} | 5.2360 × 10^{−4} |

M4 | 0.1 | 7.3733 × 10^{−2} | 1.4435 × 10^{−2} | |

M3 | 0.5 | 3.7000 × 10^{−1} | 3.2531 × 10^{−2} | |

M2 | 0.8 | 5.9000 × 10^{−1} | 3.4133 × 10^{−2} | |

M1 | 1 | 7.4000 × 10^{−1} | 3.5105 × 10^{−2} | |

400 | M5 | 0.01 | 8.9075 × 10^{−3} | 2.3943 × 10^{−3} |

M4 | 0.1 | 8.9065 × 10^{−2} | 1.5727 × 10^{−2} | |

M3 | 0.5 | 4.5000 × 10^{−1} | 2.4705 × 10^{−2} | |

M2 | 0.8 | 7.1000 × 10^{−1} | 5.9720 × 10^{−2} | |

M1 | 1 | 8.9000 × 10^{−1} | 5.9467 × 10^{−2} | |

500 | M5 | 0.01 | 9.7178 × 10^{−3} | 5.2878 × 10^{−3} |

M4 | 0.1 | 9.7166 × 10^{−2} | 1.5698 × 10^{−2} | |

M3 | 0.5 | 4.9000 × 10^{−1} | 4.2440 × 10^{−2} | |

M2 | 0.8 | 7.2000 × 10^{−1} | 9.0396 × 10^{−2} | |

M1 | 1 | 9.0000 × 10^{−1} | 9.1223 × 10^{−2} |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Anggraeni, D.; Sudiarto, B.; Fitrianingsih, E.; Priambodo, P.S.
Tuning Window Size to Improve the Accuracy of Battery State-of-Charge Estimations Due to Battery Cycle Addition. *World Electr. Veh. J.* **2023**, *14*, 307.
https://doi.org/10.3390/wevj14110307

**AMA Style**

Anggraeni D, Sudiarto B, Fitrianingsih E, Priambodo PS.
Tuning Window Size to Improve the Accuracy of Battery State-of-Charge Estimations Due to Battery Cycle Addition. *World Electric Vehicle Journal*. 2023; 14(11):307.
https://doi.org/10.3390/wevj14110307

**Chicago/Turabian Style**

Anggraeni, Dewi, Budi Sudiarto, Ery Fitrianingsih, and Purnomo Sidi Priambodo.
2023. "Tuning Window Size to Improve the Accuracy of Battery State-of-Charge Estimations Due to Battery Cycle Addition" *World Electric Vehicle Journal* 14, no. 11: 307.
https://doi.org/10.3390/wevj14110307