Python version of Gregory Plett's ESCtoolbox
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

ESCtoolbox (Python version)

This is a Python version of Gregory Plett's enhanced self-correcting (ESC) battery cell model. The original code is written in Matlab which is available in the ESCtoolbox at

OCV model

The open-circuit voltage (OCV) files are located in the ocv_model/ folder where the OCV model is the file. The results and plots generated from this model should be similar to the Matlab runProcessOCV.m plots. The file contains the OCVfromSOCtemp function while the file contains model objects used by the OCV model. The file plots the experimental data from the csv files located in the ocv_data/.

Battery test data for the A123 cell is available in the ocv_data/ folder as csv files. The data files were exported from the Excel spreadsheets in the OCV_Files/A123_OCV directory of the Matlab ESCtoolbox. Plots of the battery test data are generated with the script. Change the tc variable to view plots from the other temperature tests. For example, change the tc string to N05 to create plots for the CSV files named A123_OCV_N05_S1, A123_OCV_N05_S2, A123_OCV_N05_S3, and A123_OCV_N05_S4. The figures produced from the script should be similar to the graphs shown in the A123_OCV_N05_S1, A123_OCV_N05_S2, A123_OCV_N05_S3, and A123_OCV_N05_S4 Excel spreadsheets.

See the comments in each file for more information.

DYN model

The dynamic model files are located in the dyn_model/ folder where the is the main file to run. The data from the dynamic battery tests are located in the dyn_data/ folder.

See the comments in each file for more information.


Requires Python 3.6, Matplotlib, NumPy, and Pandas. The preferred method to install Python 3 and associated packages is with the Anaconda or Miniconda distribtion available at


Clone or download the files to your local machine. Start iPython from within the ocv_model/ directory then type run to run the OCV model.