GithubHelp home page GithubHelp logo

sautee / battery-state-of-charge-estimation Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 7.0 79.24 MB

Predict battery state of charge (SOC) using machine learning + Streamlit web app.

Home Page: https://soc-ml.streamlit.app/

Jupyter Notebook 99.92% PureBasic 0.07% Python 0.01%
battery-soc deep-learning machine-learning state-of-charge streamlit-webapp tensorflow

battery-state-of-charge-estimation's Introduction

Battery State of Charge Prediction

Predict battery state of charge (SOC) using machine learning. Use the Streamlit web app easily browse available models and predict SOC on cell dischrage data.

Models are built using Tensorflow and trained on LG 18650HG2 and Panasonic 18650PF Li-ion battery datasets.

Repository Contents

  • datasets/: Download datasets and load into this folder as 'LG_18650HG2' and 'Panasonic_18650PF'.
  • training/: Jupyter notebooks to analyze and train DNN, CNN, and LSTM models.
  • training/model_evals: Compare model performance.
  • pre-trained/: Pre-trained DNN, CNN, and LSTM models.
  • app/: Streamlit app that allows users to play with their own data using the pre-trained models.

Convert MAT to CSV

Use the /training/panasonic/convert_mat_to_csv.ipynb notebook to convert MAT files to CSV. Useful for the Panasonic dataset where only MAT files are available.

Usage

To get started

  • Clone this repository to your local machine.
  • Download datasets, locate them under the 'datasets' folder.
  • Convert Panasonic .mat files to .csv.
  • Run training notebooks, or use pre-trained models.
  • Navigate to app folder and run Streamlit app streamlit run soc_app.py.
  • To deploy to Streamlit Cloud visit soc-cloud-app.

Environment Setup

Using 'pip install'. Run the following command to install requirements.

pip install -r requirements.txt

Using Anaconda. Create a battery-soc environment by running the following command.

conda env create -f environment.yml

Contributors

Andrew C, Talha K, Nemesh W, Xili D -- Memorial Univserity of Newfoundland

Other Research Areas

Battery Surface Temperature Estimation - using the Panasonic 18650PF dataset used here.

M. Naguib, P. Kollmeyer and A. Emadi, "Application of Deep Neural Networks for Lithium Ion Battery Surface Temperature Estimation Under Driving and Fast Charge Conditions," IEEE Transactions on Transportation Electrification, p. 12, 2022.

Predicting Battery Remaining Useful Life - using data from TRI, NASA Prognostics, UNIBO PowerTools Dataset.

Acknowledgements

Kollmeyer, Philip; Vidal, Carlos; Naguib, Mina; Skells, Michael (2020), “LG 18650HG2 Li-ion Battery Data and Example Deep Neural Network xEV SOC Estimator Script”, Mendeley Data, V3, doi: 10.17632/cp3473x7xv.3

Kollmeyer, Phillip (2018), “Panasonic 18650PF Li-ion Battery Data”, Mendeley Data, V1, doi: 10.17632/wykht8y7tg.1

K. Wong, M. Bosello, R. Tse, C. Falcomer, C. Rossi and G. Pau, "Li-Ion Batteries State-of-Charge Estimation Using Deep LSTM at Various Battery Specifications and Discharge Cycles," in Conference on Information Technology for Social Good (GoodIT ’21), Roma, Italy, 2021, doi: 10.1145/3462203.3475878

battery-state-of-charge-estimation's People

Contributors

sautee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

battery-state-of-charge-estimation's Issues

Meaning of negative Capacity

Thanks for the amazing work. I was looking at the data and I noticed that there a lot of negative value of capacity. What is the meaning of that? Shouldn't the capacity always be positive? Thanks

Notes

  1. Scaling - predicted SOC does not scales beyond 1 and 0 (noticeable on single discharge cycles).
  2. Head Inaccuracy - predicted SOC is inaccurate at the head of a discharge cycles. This is probably because of 500 second averaging followed by removal of null rows in pre-processing which always results in the head of the cycle to be removed during training.
  3. Single vs Multi Discharge Cycles - SOC prediction shows higher MAE against single discharge cycles (see ML app results) vs multi discharge cycles (see training/model_evals).
  4. Panasonic Cycle_n Files - including these in training resulted significant overfit where validation errors increased over training epochs.
  5. Add stuff - add model save markers so they don't overwrite models in pre-trained, additional application example files under app/examples, logging.

question

Have you tried using only fixed temperature datasets as training sets and then directly generalizing them to variable temperature datasets (10-20 drift ones)

How to calculate SOC

I would like to know how you calculate SOC. I have noticed that some papers start to decay from 100%, but you generally do not decay from 100%. Can you tell me how to calculate it? Thank you very much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.