Adaptive Remaining Capacity Estimator of Lithium-Ion Battery Using Genetic Algorithm-Tuned Random Forest Regressor Under Dynamic Thermal and Operational Environments
Abstract
:1. Introduction
1.1. Background and Overview of SOC Estimation
- Temperature Sensitivity: Temperature significantly affects battery performance and SOC estimation. Many SOC estimation models struggle to adapt to varying thermal conditions. Although techniques like PFs and KF have been used to account for these variations, they remain computationally intensive, making them difficult to deploy in low-power embedded systems.
- Battery Aging: As batteries age, their capacity degrades, which impacts SOC accuracy. Most estimation techniques assume a fixed nominal capacity, leading to inaccuracies over time. Advanced algorithms, such as those incorporating adaptive filtering and deep learning, are being explored to address this issue by dynamically adjusting to aging effects.
- Real-Time Application: Many state-of-the-art SOC estimation techniques, such as Electrochemical Models and deep learning-based methods, require substantial computational resources, making their real-time application challenging. Simplified models like ECMs combined with filters (e.g., EKF, PF) provide a compromise between accuracy and computational feasibility but still have room for improvement.
- Generalization Across Different Conditions: Another significant challenge is the generalization of SOC estimation models across a variety of operating conditions, including different temperatures, loads, and driving cycles. Machine learning approaches, like RF and GA-optimized models, have shown promise in this area due to their flexibility and adaptability to different input features.
1.2. Related Works
1.3. Contributions of This Work
- This paper proposes an RF-GA-based model for accurate SOC estimation in Li-ion batteries.
- To enhance model performance, a GA was employed to optimize key RF hyperparameters, such as the number of estimators and minimum sample splits.
- The model’s performance was rigorously evaluated under varying ambient thermal conditions and different sets of input features, demonstrating its robustness in diverse operational scenarios.
- Data from the LGHG2 18650 (H-NMC) lithium-ion cell under UDDS drive cycle conditions were used to evaluate model performance across a wide ambient temperature range (−20 °C to 25 °C).
1.4. Organization of This Article
2. Proposed Framework for Remaining Capacity Estimation
2.1. Random Forest Regressor for SOC Estimation
- (a)
- Prediction Mechanism
- (b)
- Feature Importance
2.2. Genetic Algorithm for Parameter Optimization
- (i)
- Selection: Using the idea of survival of the fittest, the goal is to provide preference to individuals (offspring) with high fitness scores and allow them to pass on their genes to future generations.
- (ii)
- Crossover: This denotes interindividual mating. The selection operator chooses a pair of individuals, and crossing sites are chosen at random. Subsequently, the genes at these crossover sites are transferred, creating an entirely new person. Throughout its duration, the crossover preserves and increases the diversity of the population.
- (iii)
- Mutation: The mutation operator inserts random genes into offspring to preserve population diversity by flipping certain chromosomal bits.
- (a)
- Initialization of PopulationP = {x1, x2…, xn}
- (b)
- Selectionf(xi) = Fitness (xi)
- (c)
- Crossover (Recombination)P′ = Selection(P)
- (d)
- CrossoverTwo parents xi and xj are selected, and crossover produces offspring xnew.xnew = α·xi + (1 − α) xj
- (e)
- Mutationxi′ = xi + δ
- (f)
- Replacement
- (g)
- Termination
3. Data Acquisition, Experimental Setup, and Implementation Details
3.1. Data Collection and Cell Specifications
3.2. Drive Cycle and Testing Environment
3.3. Feature Selection for the Model
- (i)
- Test Case I: In this scenario, the input features for the model consist of sensed battery data, including voltage (V), current (I), and temperature (T).
- (ii)
- Test Case II: In this scenario, the average battery voltage (Vavg) is included alongside voltage (V), current (I), and temperature (T). Incorporating Vavg provides valuable insights into the battery’s overall performance, and this feature is inspired by battery physics.
- (iii)
- Test Case III: In this scenario, historical voltage and current states are used as inputs, incorporating the mean values of the previous ‘N’ samples, Vavg, and average current (Iavg). These averages are calculated using a window size of 450 through a simple moving average technique, reflecting the battery’s dynamic transfer function and enhancing model learning for more accurate state estimation.
3.4. Data Normalization
3.5. Data Splitting
3.6. Implementation Details
- In the first experiment, an RF regressor model estimates the SOC with three input features (voltage, current, temperature). Hyperparameters such as the number of estimators and minimum sample leaves are not tuned using the GA, and the minimum sample leaf value is kept fixed.
- In the second experiment, the GA is applied to optimize the hyperparameters of the RF model, specifically tuning the number of estimators and minimum sample split. The same input features are used, and the fixed minimum sample parameter ensures consistency. The hyperparameters that need to be optimized are listed in Table 4.
- In the third experiment, the RF regression model is applied with different sets of input features structured as test cases, without GA tuning. This experiment evaluates the impact of varying input features on SOC estimation accuracy.
3.7. Performance Metrics
4. SOC Estimation Results and Discussions
- Number of Estimators (n_estimators): The number of decision trees in the forest.
- Minimum Samples per Split (min_samples_split): The minimum number of samples required to split an internal node.
4.1. SOC Estimation Results Using an RF Regressor and a GA-Tuned RF Regressor Under Varying Ambient Thermal Conditions
- By applying the GA, these hyperparameters are systematically optimized through an evolutionary process that searches for the best possible combination. The GA iterates over generations, selecting hyperparameter sets based on fitness criteria (e.g., minimizing SOC estimation MAE), applying crossover and mutation to explore the search space, and eventually converging on the optimal values. This optimization improves the model’s ability to capture patterns in the input data (voltage, current, temperature) more effectively, leading to enhanced prediction accuracy and a significant reduction in the SOC estimation MAE.
- The SOC estimation MAE tends to decrease as the temperature of the battery cell increases because the electrochemical reactions within the cell become more consistent and stable at higher temperatures. This stability reduces fluctuations in voltage and current readings, allowing the model to estimate the SOC more accurately.
4.2. SOC Estimation Results Using the RF Regressor Under Varying Input Features
- While voltage and temperature are traditionally considered crucial for SOC estimation, the inclusion of the current and its rolling average is equally important. The current directly impacts the rate of charge and discharge, making it a fundamental factor in SOC estimation. By incorporating the rolling averages of both voltage and current, short-term spikes and fluctuations are mitigated, thereby improving the model’s stability and accuracy.
- As the number of input attributes increases in the RF model, the MAE decreases because the model can better capture patterns and relationships. More inputs offer the model a longer sequence to analyze, improving its ability to recognize long-term patterns. Additionally, with more attributes, the model becomes more adaptable to a wider range of conditions, leading to more accurate predictions, even in the presence of variations or unforeseen scenarios.
- Introducing previous samples of V and I significantly reduces MAE, RMSE, and MAX values because it allows the model to capture temporal dependencies and dynamic behavior of the battery. By including historical data, the model can better understand trends and patterns over time, such as the battery’s response to varying loads and conditions. This additional temporal context enhances the model’s predictive accuracy by smoothing out fluctuations and improving its ability to predict future states based on past behavior, leading to a more accurate and reliable SOC estimation.
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- International Energy Agency Report Predicts 2024 EV Sales Surge. Available online: https://electricautonomy.ca/automakers/2024-05-17/report-ev-sales-iea-global-ev-outlook/ (accessed on 18 September 2024).
- Beaudet, A.; Larouche, F.; Amouzegar, K.; Bouchard, P.; Zaghib, K. Key Challenges and Opportunities for Recycling Electric Vehicle Battery Materials. Sustainability 2020, 12, 5837. [Google Scholar] [CrossRef]
- Sanguesa, J.A.; Torres-Sanz, V.; Garrido, P.; Martinez, F.J.; Marquez-Barja, J.M. A Review on Electric Vehicles: Technologies and Challenges. Smart Cities 2021, 4, 372–404. [Google Scholar] [CrossRef]
- Riggs, H.; Tufail, S.; Parvez, I.; Tariq, M.; Khan, M.A.; Amir, A.; Vuda, K.V.; Sarwat, A.I. Impact, Vulnerabilities, and Mitigation Strategies for Cyber-Secure Critical Infrastructure. Sensors 2023, 23, 4060. [Google Scholar] [CrossRef] [PubMed]
- Stevenson, A.; Tariq, M.; Sarwat, A. Reduced Operational Inhomogeneities in a Reconfigurable Parallelly-Connected Battery Pack Using DQN Reinforcement Learning Technique. In Proceedings of the 2023 IEEE Transportation Electrification Conference & Expo (ITEC), Chiang Mai, Thailand, 28 November–1 December 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 1–5. [Google Scholar]
- Liu, F.; Liu, T.; Fu, Y. An Improved SoC Estimation Algorithm Based on Artificial Neural Network. In Proceedings of the 2015 8th International Symposium on Computational Intelligence and Design (ISCID), Hangzhou, China, 12–13 December 2015; Volume 2, pp. 152–155. [Google Scholar] [CrossRef]
- Khan, U.; Kirmani, S.; Rafat, Y.; Rehman, M.U.; Alam, M.S. Improved Deep Learning Based State of Charge Estimation of Lithium Ion Battery for Electrified Transportation. J. Energy Storage 2024, 91, 111877. [Google Scholar] [CrossRef]
- Chandran, V.; Patil, C.K.; Karthick, A.; Ganeshaperumal, D.; Rahim, R.; Ghosh, A. State of Charge Estimation of Lithium-Ion Battery for Electric Vehicles Using Machine Learning Algorithms. World Electr. Veh. J. 2021, 12, 38. [Google Scholar] [CrossRef]
- Chemali, E.; Kollmeyer, P.J.; Preindl, M.; Ahmed, R.; Emadi, A. Long Short-Term Memory Networks for Accurate State-of-Charge Estimation of Li-Ion Batteries. IEEE Trans. Ind. Electron. 2018, 65, 6730–6739. [Google Scholar] [CrossRef]
- Hossain Lipu, M.S.; Hannan, M.A.; Hussain, A.; Ayob, A.; Saad, M.H.M.; Muttaqi, K.M. State of Charge Estimation in Lithium-Ion Batteries: A Neural Network Optimization Approach. Electronics 2020, 9, 1546. [Google Scholar] [CrossRef]
- How, D.N.T.; Hannan, M.A.; Hossain Lipu, M.S.; Ker, P.J. State of Charge Estimation for Lithium-Ion Batteries Using Model-Based and Data-Driven Methods: A Review. IEEE Access 2019, 7, 136116–136136. [Google Scholar] [CrossRef]
- de Lima, A.B.; Salles, M.B.C.; Cardoso, J.R. State-of-Charge Estimation of a Li-Ion Battery Using Deep Forward Neural Networks. arXiv 2020, arXiv:2009.09543. [Google Scholar]
- Tian, J.; Chen, C.; Shen, W.; Sun, F.; Xiong, R. Deep Learning Framework for Lithium-Ion Battery State of Charge Estimation: Recent Advances and Future Perspectives. Energy Storage Mater. 2023, 61, 102883. [Google Scholar] [CrossRef]
- Hannan, M.A.; Lipu, M.S.H.; Hussain, A.; Ker, P.J.; Mahlia, T.M.I.; Mansor, M.; Ayob, A.; Saad, M.H.; Dong, Z.Y. Toward Enhanced State of Charge Estimation of Lithium-Ion Batteries Using Optimized Machine Learning Techniques. Sci. Rep. 2020, 10, 4687. [Google Scholar] [CrossRef] [PubMed]
- Yang, F.; Zhang, S.; Li, W.; Miao, Q. State-of-Charge Estimation of Lithium-Ion Batteries Using LSTM and UKF. Energy 2020, 201, 117664. [Google Scholar] [CrossRef]
- Yang, B.; Wang, Y.; Zhan, Y. Lithium Battery State-of-Charge Estimation Based on a Bayesian Optimization Bidirectional Long Short-Term Memory Neural Network. Energies 2022, 15, 4670. [Google Scholar] [CrossRef]
- Ren, X.; Liu, S.; Yu, X.; Dong, X. A Method for State-of-Charge Estimation of Lithium-Ion Batteries Based on PSO-LSTM. Energy 2021, 234, 121236. [Google Scholar] [CrossRef]
- Eleftheriadis, P.; Leva, S.; Ogliari, E. Bayesian Hyperparameter Optimization of Stacked Bidirectional Long Short-Term Memory Neural Network for the State of Charge Estimation. Sustain. Energy Grids Netw. 2023, 36, 101160. [Google Scholar] [CrossRef]
- El Fallah, S.; Kharbach, J.; Hammouch, Z.; Rezzouk, A.; Ouazzani Jamil, M. State of Charge Estimation of an Electric Vehicle’s Battery Using Deep Neural Networks: Simulation and Experimental Results. J. Energy Storage 2023, 62, 106904. [Google Scholar] [CrossRef]
- Yang, Y.; Zhao, L.; Yu, Q.; Liu, S.; Zhou, G.; Shen, W. State of Charge Estimation for Lithium-Ion Batteries Based on Cross-Domain Transfer Learning with Feedback Mechanism. J. Energy Storage 2023, 70, 108037. [Google Scholar] [CrossRef]
- Sulaiman, M.H.; Mustaffa, Z. State of Charge Estimation for Electric Vehicles Using Random Forest. Green Energy Intell. Transp. 2024, 3, 100177. [Google Scholar] [CrossRef]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Tufail, S.; Riggs, H.; Tariq, M.; Sarwat, A.I. Advancements and Challenges in Machine Learning: A Comprehensive Review of Models, Libraries, Applications, and Algorithms. Electronics 2023, 12, 1789. [Google Scholar] [CrossRef]
- Probst, P.; Wright, M.N.; Boulesteix, A. Hyperparameters and Tuning Strategies for Random Forest. WIREs Data Min. Knowl. Discov. 2019, 9, e1301. [Google Scholar] [CrossRef]
- Sivanandam, S.N.; Deepa, S.N. Genetic Algorithms. In Introduction to Genetic Algorithms; Springer: Berlin/Heidelberg, Germany, 2008; pp. 15–37. [Google Scholar]
- Lee, J.B.; Lee, B.C. A global optimization algorithm based on the new filled function method and the genetic algorithm. Eng. Optim. 1996, 27, 1–20. [Google Scholar] [CrossRef]
- Ting, T.O.; Man, K.L.; Lim, E.G.; Leach, M. Tuning of Kalman Filter Parameters via Genetic Algorithm for State-of-Charge Estimation in Battery Management System. Sci. World J. 2014, 2014, 1–11. [Google Scholar] [CrossRef]
- Kollmeyer, P.; Vidal, C.; Naguib, M.; Skells, M. LG 18650HG2 Li-Ion Battery Data and Example Deep Neural Network XEV SOC Estimator Script. Mendeley Data 2020. [Google Scholar] [CrossRef]
- RandomForestClassifier—Scikit-Learn 1.5.2 Documentation. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html (accessed on 28 September 2024).
Lithium-Ion Battery Used | Model Used for SOC Estimation | Vector Inputs Used | Drive Cycle Conditions | MAE (%) Over Varying Ambient Temperatures | References | |
---|---|---|---|---|---|---|
Panasonic NCR18650PF | The Fb-Ada-CNN-GRU-KF | Voltage (Ui), Current (Ii), and Temperature (Ti) | HWFET, UUDS | 0.13 at 0 °C | Under HWFET drive cycle | [20] |
0.16 at 10 °C | ||||||
0.18 at 25 °C | ||||||
0.39 at 0 °C | Under UDDS drive cycle | |||||
0.54 at 10 °C | ||||||
0.70 at 25 °C | ||||||
18650 lithium nickel manganese cobalt oxide (NMC), 18650 LiNiMnCoO2 | Bayesian–Gaussian Process-BiLSTM | Terminal Voltage (Vt), Terminal Current (It), and Surface Temperature (Tt) | LA92, UDDS, US06, Mixed1, Mixed2, Mixed7, and Mixed8 for training, Mixed4, Mixed5, and Mixed6 for testing, BJDST and the DST for training, FUDS and US06 for testing | 1.903 for McMaster dataset 1.283 for CALCE dataset | [18] | |
18650 LiCoO2 2 Ah and 48 Ah LiNiO2 | DNN | Voltage, Current, Temperature, and Corresponding SOC | NASA PCOE (charging and discharging data) | Less than 0.8% for a 5.4 Ah capacity | [19] | |
Less than 2.8% for a 48 Ah capacity battery | ||||||
A123 18650 cylindrical 18650 LiFePO4 | LSTM-UKF | Voltage (Vt), Current (It), and Temperature (Tt) | US06, DST, FUDS | 0.82 at 30 °C 0.21 at 10 °C 0.63 at 0 °C | [15] | |
Lithium-ion 18650 NCA (3 Ah), INR 18650-20R (2 Ah) | Bayesian-Optimized BiLSTM | Voltage (Vt) and Current (It) | BJDST, US06, DST, FUDS | 0.93 at a temperature range of 0 °C to 45 °C | [16] | |
Lithium-ion battery pack (60 Ah) | Random Forest Regressor | Voltage, Current, and Temperature | Real driving trips of a BMW i3 EV | 4.4321% | [21] |
Specification | Details |
---|---|
Battery Model/Chemistry | LG HG2 18650 SN62A4/Lithium Nickel Manganese Cobalt Oxide (NMC) |
Nominal Current/Open Circuit Voltage (OCV) | 3 A/3.6 V |
Nominal Capacity | 3 Ah |
Maximum Charge Voltage | 4.2 V |
Discharge Voltage (Cut-Off) | 2.5 V (End of Discharge Cycle) |
Charge/Discharge C-Rate | 1.33 C (Charge)/6.67 C (Discharge) |
Energy Density | 240 Wh/kg |
Cases | Test Inputs |
---|---|
Test Case I | Voltage (V), Current (I), Temperature (T) |
Test Case II | Voltage (V), Current (I), Temperature (T), Average Voltage (Vavg) |
Test Case III | Voltage (V), Current (I), Temperature (T), Average Voltage (Vavg), Average Current (Iavg) |
RF Hyperparameters | Values (Fixed) | Value Range (Tuned with the GA) |
---|---|---|
n_estimator | 90 | 0–100 |
min_samples_split | 10 | 0–10 |
min_samples_leaf | 5 | 5 (Fixed) |
Temperature (°C)/Error Metrics | MAE (%) (RF/GA-RF) | RMSE (%) (RF/GA-RF) | MAX (%) (RF/GA-RF) |
---|---|---|---|
−20 | 0.0174/0.0102 | 0.0313/0.0235 | 0.3297/0.3467 |
−10 | 0.0121/0.0065 | 0.0227/0.0161 | 0.2264/0.2247 |
0 | 0.0086/0.0043 | 0.0158/0.0109 | 0.1976/0.2121 |
10 | 0.0061/0.0033 | 0.0110/0.0078 | 0.1067/0.1018 |
25 | 0.0038/0.0026 | 0.0070/0.0057 | 0.0827/0.0928 |
Temperature (°C)/Error Metrics | MAE (%) Test Case (I/II/III) | RMSE (%) Test Case (I/II/III) | MAX (%) Test Case (I/II/III) |
---|---|---|---|
−20 | 1.74/0.57/0.13 | 3.13/1.48/0.42 | 32.97/35.48/08.97 |
−10 | 1.21/0.37/0.10 | 2.27/1.05/0.35 | 22.64/21.76/7.73 |
0 | 0.86/0.24/0.07 | 1.58/0.71/0.24 | 19.76/14.63/7.37 |
10 | 0.61/0.19/0.05 | 1.10/0.56/0.17 | 10.67/10.43/4.24 |
25 | 0.38/0.13/0.04 | 0.70/0.37/0.13 | 8.27/8.87/3.77 |
Temperature (°C) | Model | MAE (%) | Drive Cycle | Reference | |
---|---|---|---|---|---|
–20 | Traditional RF Model | Test Case I | 1.74 | UDDS | This Study |
Test Case II | 0.57 | ||||
Test Case III | 0.13 | ||||
–20 | PSO-LSTM [Ren et al., 2021] | 0.4307 | New European Drive Cycle (NEDC) | [17] | |
–10 | Traditional RF Model | Test Case I | 1.21 | UDDS | This Study |
Test Case II | 0.37 | ||||
Test Case III | 0.10 | ||||
0 | Traditional RF Model | Test Case I | 0.86 | UDDS | This Study |
Test Case II | 0.24 | ||||
Test Case III | 0.07 | ||||
0 | Bayesian BiLSTM [Yang et al., 2022] | 0.93 | BJDST, US06, DST, FUDS | [16] | |
0 | LSTM-UKF [Zhang et al., 2021] | 0.63 | US06, DST, FUDS | [15] | |
0 | The Fb-Ada-CNNGRU-KF | 0.13/0.39 | HWFET/UDDS | [20] | |
10 | Traditional RF Model | Test Case I | 0.61 | UDDS | This Study |
Test Case II | 0.19 | ||||
Test Case III | 0.05 | ||||
10 | LSTM-UKF [Zhang et al., 2021] | 0.21 | US06, DST, FUDS | [15] | |
10 | The Fb-Ada-CNNGRU-KF | 0.16/0.54 | HWFET/UDDS | [20] | |
25 | Traditional RF Model | Test Case I | 0.38 | UDDS | This Study |
Test Case II | 0.13 | ||||
Test Case III | 0.04 | ||||
25 | The Fb-Ada-CNNGRU-KF | 0.18/0.70 | HWFET/UDDS | [20] |
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. |
© 2024 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
Khan, U.; Tariq, M.; Sarwat, A.I. Adaptive Remaining Capacity Estimator of Lithium-Ion Battery Using Genetic Algorithm-Tuned Random Forest Regressor Under Dynamic Thermal and Operational Environments. Energies 2024, 17, 5582. https://doi.org/10.3390/en17225582
Khan U, Tariq M, Sarwat AI. Adaptive Remaining Capacity Estimator of Lithium-Ion Battery Using Genetic Algorithm-Tuned Random Forest Regressor Under Dynamic Thermal and Operational Environments. Energies. 2024; 17(22):5582. https://doi.org/10.3390/en17225582
Chicago/Turabian StyleKhan, Uzair, Mohd Tariq, and Arif I. Sarwat. 2024. "Adaptive Remaining Capacity Estimator of Lithium-Ion Battery Using Genetic Algorithm-Tuned Random Forest Regressor Under Dynamic Thermal and Operational Environments" Energies 17, no. 22: 5582. https://doi.org/10.3390/en17225582
APA StyleKhan, U., Tariq, M., & Sarwat, A. I. (2024). Adaptive Remaining Capacity Estimator of Lithium-Ion Battery Using Genetic Algorithm-Tuned Random Forest Regressor Under Dynamic Thermal and Operational Environments. Energies, 17(22), 5582. https://doi.org/10.3390/en17225582