Battery_SOC_Estimation

授权协议 GPL-3.0 License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 松越
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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.

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

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 Variation

Improvement

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

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.

Result Curves

  • SOC-Folder 所属分类:matlab例程 开发工具:matlab 文件大小:71KB 下载次数:418 上传日期:2017-05-08 14:20:56 上 传 者:梨 说明:  一个MATLAB/Simulink模型,关于电动汽车动力电池荷电状态(State of Charge,SOC)估计; 包括参数文件、模型文件两种,模型文件分别仿真了110A恒流、110A脉冲和ECE15工况; 建