Giter Site home page Giter Site logo

xhxlab / battery_soc_estimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alterwl/battery_soc_estimation

0.0 0.0 0.0 1.13 MB

Battery state of charge estimation using kalman filter in Matlab

License: GNU General Public License v3.0

MATLAB 100.00%

battery_soc_estimation's Introduction

Battery State of Charge Estimation Using Kalman Filter

简体中文

This small project comes from the simulation part of my college graduation design which aimed to estimate the state of charge(SOC) of lithium battery. I mainly finished the experiments, parameters identification and simulation of extended kalman filter(EKF). The completion unscented kalman filter(UKF) simulation needs to thank the contribution from my friend, Pengcheng Gu. And the BBDST working condition block is also benefit from the help of my senior, Cong Jiang. 😘🔋thanks angain to my warm friends.🔋❤

General Content

Li-Battery model building, parameters identification and verification, SOC estimation using extended kalman filter(EKF) through two ways:

  1. Simulinks(EKF only)
  2. Scripts(EKF&UKF)

First Try

  • The inputs of the model include current and voltage comes from battery data in HPPC(Hybrid PulsePower Characteristic) test.
  • Thevenin equivalent circuit model and extended kalman filter are included in the simulation file "EKFSim_R2016.slx", of which the structure is shown in the snapshot below.

Simulink

Structure of EKFSim_R2016.slx

  • The estimated curve has distinct divergences in the current pulse areas and it converges to the true value in the constant current discharge areas.
  • The estimated SOC and update Up(voltage of RC element in Thevenin ECM) change synchronously due to the same state vector that they are in, that can be seen in the function block 'EKF'.

States Output

Output of EKFSim_R2016.slx

  • Kalman filter update of states including SOC and Up, according to the difference between observed values and predicted values of UL(voltage on the load). The code format of this expression is as following.
X_upd = X_pre + K*(UL_obs-UL_pre);

UL curves

UL Variation

Improvement

  • After improvement, the I/O relationship between modules becomes more perspicuous, the corresponding Simulink file is named Improved_EKFSim.slx.

Improvement

Improved Structure

  • MATLAB scripts simulate discharge process of lithium-ion battery under the BBDST(Beijing Bus Dynamic Street Test) working condition and constant current working condition with observation noise, and uses EKF/UKF method to estimate SOC of the battery.
function main(Work_modes, SOC_est_init)
  • The main function requires two arguments, Work_mode: Mode of working condition 1-BBDST, 2-constant current, SOC_est_init: The initial value of estimated SOC, it's set to 1 by default. If you give just on argument, it will be given to Work_mode.
    type in command window like main()ormain(1)ormain(1,1), the result curves will appear as follows.

States estimation curve

Result Curves

battery_soc_estimation's People

Contributors

alterwl 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.