License: MIT Python 3.10 PyTorch
- Description
- Key Features
- Prerequisites
- Getting Started
- Usage
- Project Structure
- Results
- Contributing
- Credits
- Acknowledgement
- Star History
Li-Ion batteries are increasingly being used due to sustainable development goals and the numerous benefits they provide compared to other battery technologies. Accurate prediction of State-of-Health (SOH) for Li-Ion batteries has become critically important, and data-driven online SOH prediction models offer an efficient approach to address this challenge.
We propose a simple yet effective machine learning framework utilizing Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) models for SOH prediction, addressing the common issues of high complexity, low interpretability, and high training costs. Our GRU-based predictions demonstrate high accuracy with an average Root Mean Squared Error (RMSE) of 0.724%.
- π Battery Health Monitoring: Advanced SOH prediction for Li-Ion batteries
- π§ Deep Learning Models: Implementation of LSTM and GRU architectures
- π High Accuracy: Achieves 0.724% RMSE with GRU model
- π Data-Driven Approach: Utilizes real battery degradation data
- π Easy to Use: Simple setup and execution with Jupyter notebooks
- π Well Documented: Comprehensive documentation and examples
Before you begin, ensure you have the following installed:
- Python 3.10 or higher
- Jupyter Notebook or JupyterLab
- Git (for cloning the repository)
- At least 4GB RAM (recommended for dataset processing)
- 500MB disk space for dataset and dependencies
This project uses the open source Oxford Battery Degradation Dataset 1 [1].
Important: These data are copyright (c) 2017, The Chancellor, Masters and Scholars of the University of Oxford, and the 'Oxford Battery Degradation Dataset 1' researchers. All rights reserved.
The dataset is made available under the Open Database License with individual contents licensed under the Database Contents License.
Steps to download:
- Visit the dataset download page
- Download the file
Oxford_Battery_Degradation_Dataset_1.mat(β οΈ 262MB file) - Place the downloaded file in the
./datasets/directory
π Note: The dataset readme file contains detailed information about the data structure and format.
Follow these steps to set up your development environment:
-
Clone the repository:
git clone https://github.com/sileneer/NRP_2022_EEE12.git cd NRP_2022_EEE12 -
Create a virtual environment:
python3.10 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Launch Jupyter Notebook:
jupyter notebook
Once you have completed the setup and downloaded the dataset:
-
Open the main notebook:
- Launch Jupyter Notebook:
jupyter notebook - Open
main_torch.ipynb
- Launch Jupyter Notebook:
-
Run the analysis:
- Execute cells sequentially to load data, train models, and generate predictions
- The notebook includes both LSTM and GRU model implementations
- Results and visualizations will be generated inline
-
Model Training:
- The notebook automatically loads the Oxford dataset
- Preprocessing steps include data normalization and sequence preparation
- Both LSTM and GRU models are trained and compared
NRP_2022_EEE12/
βββ datasets/ # Dataset directory
β βββ Readme.txt # Dataset documentation
β βββ Oxford_Battery_...mat # Main dataset (download required)
βββ literature_reviews/ # Research papers and references
βββ saved_models/ # Trained model checkpoints
βββ main_torch.ipynb # Main analysis notebook
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ LICENCE # MIT License
Our machine learning framework demonstrates excellent performance in predicting Li-Ion battery State-of-Health:
-
GRU Model Performance:
- Average RMSE: 0.724%
- High accuracy in SOH prediction
- Efficient training time
-
LSTM Model Performance:
- Competitive accuracy
- Good generalization across different battery cells
The models successfully address common challenges in battery health monitoring:
- β Low Complexity: Simple architecture easy to understand and implement
- β High Interpretability: Clear model behavior and prediction rationale
- β Low Training Cost: Efficient training process with minimal computational requirements
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
How to contribute:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project uses the following open source libraries and frameworks:
- PyTorch - Deep learning framework for model implementation
- NumPy - Numerical computing library
- Pandas - Data manipulation and analysis
- Matplotlib - Plotting and visualization
- Scikit-learn - Machine learning utilities
- SciPy - Scientific computing library
This project is licensed under the MIT License.
We extend our sincere appreciation to David Howey and Christoph Birkl for their invaluable work in collecting the Oxford_Battery_Degradation_Dataset_1 and their ongoing research contributions. Their work can be found at: https://scholar.google.co.uk/citations?hl=en&user=AZdBXIkAAAAJ&view_op=list_works&sortby=pubdate
[1] Christoph R. Birkl, "Diagnosis and Prognosis of Degradation in Lithium-Ion Batteries", PhD thesis, Department of Engineering Science, University of Oxford, 2017.