Skip to content

deng-cy/cycle_opt

Repository files navigation

Code and Data for A generic battery cycling optimization framework with learned sampling and early stopping strategies

Introduction

This folder contains the code and data for following paper:

Changyu Deng, Andrew Kim, and Wei Lu. "A generic battery-cycling optimization framework with learned sampling and early stopping strategies." Patterns (2022): 100531. Website PDF

Software environment

Following softwares are used:

  • COMSOL Multiphysics 5.5
  • Matlab 2020b
  • Python 3.7
    • Optuna 2.6.0
    • Ax 0.2.4 (including BoTorch 0.6.2)

Higher versions should work fine. Lower versions may be compatible.

Folders and contained files

  • processed_data: Processed experiment dataand generated simulation data.

    • exp_dict.pkl: Experiment data file, generated by preprocess_exp_data.py.
    • sim_dict.pkl: Simulation data file, generated by generate_sim_data.py.
  • raw_data: Raw experiment data. Extracted from Fig. 5 of the paper Holistic calendar aging model parametrization concept for lifetime prediction of graphite/NMC lithium-ion cells . File names denote temperature, the number next to "x" denote state of charge (SOC).

  • result: Result files generated by main_exp.py, main_sim.py and main_sim_noprune.py (in current root folder).

    • sim_*.db: result file from main_sim.py
    • exp_*.db: result file from main_exp.py
    • sim_noprune_*.db: result file from main_sim_noprune.py
    • data.xlsx: summary of all results

Root files

  • preprocess_exp_data.py: The code to preprocess raw data. You'll get exp_dict.pkl (which is already uploaded in processed_data).

  • generate_sim_data.py: Generate simulation data. You'll get sim_dict.pkl (which is already uploaded processed_data).

  • calendar_aging_final.m: A matlab script to generate calendar_aging_final.mph.

  • comsol_api.m: A matlab script to calculate capacity, which serves as the interface bewtween python files (main_*.py) and the COMSOL file ( calendar_aging_final.mph).

  • main_exp.py: Run the fitting algorithm in the experiment case (Case 2).

  • main_sim.py: Run the fitting algorithm in the simulation case (Case 1).

  • postprocess.py: Postprocess result.

How to run

Simulation case (Case 1)

  1. Prepare with connet Python to MATLAB (which has connected to COMSOL server). You need to install MATLAB API for Python (see doc) and then run matlab.engine.shareEngine on MATLAB. Other ways are also feasible, as long as Python can be connected to MATLAB.
  2. [optional] Run generate_sim_data.py to generate sim_dict.pkl, or use the existing file.
  3. Run main_sim.py; you can add or change arguments of the script; see the file for argument meanings.
  4. Run main_bo.py and main_sim_noprune.py.
  5. [optional] Run postprocess.py.

Experiment case (Case 2)

  1. [optional] Run preprocess_exp_data.py to generate exp_dict.pkl, or use the existing file.
  2. Prepare with connet Python to MATLAB (which has connected to COMSOL server).
  3. Run main_exp.py; you can add or change arguments of the script; see the file for argument meanings.
  4. [optional] Run postprocess.py.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published