Coder Social home page Coder Social logo

equiv-circ-model's Introduction

Equivalent circuit model

This repository contains Python code for running an equivalent circuit model (ECM) developed for a 2013 Nissan Leaf battery cell and module. The ecm package contains source code for the equivalent circuit model while the examples folder provides scripts for running the ECM for a battery cell, module, and pack. Model parameters are determined from hybrid pulse power characterization (HPPC) and discharge tests conducted at ORNL. The battery cell and module specifications were provided by NREL.

Installation

The Anaconda or Miniconda distribution of Python 3 is recommended for this project. The ecm package requires Matplotlib, NumPy, Pandas, and SciPy.

The simplest way to install the ECM package is with pip. This can be done from within the equiv-circ-model directory:

# Install the ecm package
pip install -e .

A requirements file is provided for running the ECM in a virtual environment using pip:

# Create a new virtual environment
python -m venv env

# Activate the environment
source env/bin/activate

# Install packages needed for the ECM
pip install -r requirements.txt

# From within equiv-circ-model directory, install the ecm package
pip install -e .

# Deactivate the environment
deactivate

# Remove the environment by deleting the `env` folder

An environment yaml file is also provided for running the ECM in a conda environment:

# Create a new conda environment and install packages needed for the ECM
conda env create -f environment.yml

# Activate the environment
conda activate ecm

# From within equiv-circ-model directory, install the ecm package
pip install -e .

# Deactivate the environment
conda deactivate

# Remove the environment and its installed packages
conda env remove -n ecm

Usage

Examples of using the ecm package are provided in the examples folder. Examples are organized into subfolders for battery cell and battery module models. From within the subfolder, each script can be run from the command line such as:

# View plots of the battery cell HPPC data
cd ~/equiv-circ-model/examples/cell
python view_hppc_data.py

# Run the ECM for a battery cell and compare to HPPC battery cell data
cd ~/equiv-circ-model/examples/cell
python hppc_vt.py

Project structure

ecm - Python package containing source code for the equivalent circuit model (ECM).

examples/cell - Example scripts for running the battery cell ECM.

examples/cell-to-module - Examples of using a cell model to predict a battery module.

examples/cell-to-pack - Examples of using a cell model to predict a battery pack.

examples/data - Data files from 2013 Nissan Leaf battery cell and module tests. This data is used for developing and validating the ECM.

examples/module - Example scripts for running a battery module ECM.

examples/module-to-pack - Examples of using a module model to predict a battery pack.

Contributing

Comments, suggestions, and other feedback can be submitted on the Issues page.

License

This code is available under the MIT License - see the LICENSE file for more information.

equiv-circ-model's People

Contributors

wigging avatar

Watchers

James Cloos avatar

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.