Giter Site home page Giter Site logo

augustecolle / electrical-circuit-battery-model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christiansiegel/electrical-circuit-battery-model

0.0 2.0 0.0 23 KB

Battery simulator for IoT/WSN runtime estimation

License: MIT License

Python 100.00%

electrical-circuit-battery-model's Introduction

Electrical Circuit Battery Model

Discrete python implementation of the electrical circuit battery model inspired by Chen et al. 2006.

Requirements

  • Python
  • NumPy¹
  • SciPy¹
  • Matplotlib¹²

¹ For model extraction ² For plotting example results

The simulator is written in plain Python and can easily be used with PyPy for faster execution.

Download

Option 1: Simulator Only

Clone repository

git clone https://github.com/christiansiegel/electrical-circuit-battery-model.git
cd electrical-circuit-battery-model

Option 2: Simulator + Measurements

Clone repository

git clone --recursive https://github.com/christiansiegel/electrical-circuit-battery-model.git
cd electrical-circuit-battery-model

Unzip measurement data

cd measurements
unzip '*.zip'

Smooth measurement data

python3 filter.py

Files

Model Extraction

The model can be extracted from measurement data with extract.py. The resulting battery model class can be pasted in batteries.py (already done).

Simulation

The discrete simulator is implemented in simulator.py. The battery models are included from batteries.py. The different discharge loads are found in loads.py.

For specific examples on how to use the simulator see examples.

You can also use the simulator in a Jupyter notebook. For an example notebook see jupyter-examples.ipynb.

Measurement Comparison

The measurement data smoothed with filter.py can be loaded using the CSV helper class in csvhelper.py. Functions to calculate the used energy or calculate errors are found in measurement.py.

For guidance see 5-measurement-compare.py in particular.

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.