Week 7 State of charge estimation
State of charge Estimation
Aim :
To simulate the BMS and run the various test case from hardness dashboard and write a detailed report on the results.
Objective :
- Explain about coulomb counting and how BMS implements coulomb counting for SOC.
- Rnu the simulation test the 3 cases from hardness dashboard and write a report on the results.
Theory :
SoC Estimation :
The SOC is one of the most important parameters for batteries, but its definition presents many different issues. In general, the SOC of a battery is defined as the ratio of its current capacity to the nominal capacity. The nominal capacity is given by the manufacturer and represents the maximum amount of charge that can be stored in the battery. The SOC can be defined as follows.
The various mathematical methods of estimation are classified according to methodology. The classification of these SOC estimation methods is different in the various literature.
Coulomb counting methode :
The Coulomb counting method measures the discharging current of a battery and integrates the discharging current over time in order to estimate SOC. Coulomb counting method is done to estimate the SOC(t), which is estimated from the discharging current, I(t) , and previously estimated SOC values, SOC (t-1). SOC is calculated by the following equation.

But there are several factors that affect the accuracy of coulomb counting method including temperature, battery history,discharge current and cycle life.
Lithium-ion BSM :
we have to download the zip file from the link given in the challenge of state of charge estimation. After downloading the zip file have to extract the zip file to a folder and it will give two zip files again. From that file we have to choose the Battery_system_R2020a to extact to a folder again.
To get access to the close loop BMS hardness dashboard we have to check for the following model test>system>BMS_ClosedLoop_Hardness_Dashboard model file.
After opening this file MATLAB will ask the following question:

Then we have to select to open project and model and after that the whole project will be loaded in the MATLAB in current folder and workspace.


After this the BSM_ClosedLoop_Hardness_Dashboard model file is open as..

Blocks from Model :
- Test sequence Variant (it has 3 different test condition)
- Manual variant (Selection)
- BMS_StateRequest subsystem to provide the state request commands.
- Indictaing lamps are there to show any fault state, High temp, Overvoltage, Charger, Voltage sensor, Overcurrent, low temperature, Under voltage, Inverter state of a battery. Green light tell us that all states are ok and battery is good to charge and discharge and red indication will indicate the fault state.
- Rotating switch for manual variant to change the position during simulation run time.
- BMS_Closed Loop : This subsystem contain BMS ECU and plant as two main subsystem and lets see this block in details.

BMS ECU :
The BMS ECU get have two input which are BMS_Input which is feedback from the plant model and the state request is coming from the state machine. This is generating output as BMS output and inform which have current power limits calculation in state machine, SOC estimation and cell balancing logic as shown below..

Plant :
This subsystem contain Battery pack percharge circuit and charger/loads. In the battery pack there are two configuration which are 1 module (6 cells) and 16 module (96 cells). Here we have selected 1 module for simple calculation and less simulation time.
In this scope SOC of module, cell voltage, pack current, Cell temperature, BMS state and cell balancing command are seen as output.

Simulate 3 test cases :
For simulating the three test cases we have to go to the test sequence and select there test case one by one.
Test Case 1 :
The test case 1 is selected as shown below in the dialog box and click OK to implement it.

We can see the test sequence in BMS_StateRequest>BMS_TestSequence and there we can see that the test case we have selected is as shown below.

Now to see what are the test condition we have to double click on the test sequence and the test sequence will be shown as follows.

The editor figure tell us about the test sequence and it is as following..
- Driving is done for first 3000 sec.
- Then after driving balancing of cell occurs for next 1000 sec duration.
- After the balancing charging and balancing occurs for next 5000 sec.
- Post charge balancing is occuring after 9000 sec till 20,000 sec(i.e simulation end time).
Results of Test Sequence 1:
Simulation is run for 20,000 sec and the result are as below.

The lamp indication were green for all states which means the model is fault free.

1) Driving (Discharge) mode [0 - 3000 sec] :
All the cells for the first 3000 sec are in driving mode so the discharge of all the cell occurs and its varies in the range of 3.1 to 3.9 Volts (min and max). Cell temparature increase from 288K to 302K. SOC also reduces from 80% to 45% for EKF technique.
2) Balancing mode (3000-4000 sec) :
After 3000 sec for 1000 sec ,cell balancing occur and the modules are in standby mode and they are having constant voltage near about 3.7V. Cell temperature reduces slowly as no current flow through the cells during balancing. SOC is also constant during this period i.e 45% for EKF techinque.
3) Charging and Balancing (4000-9000 sec) :
After 4000 sec the charging ocuurs and the cell voltages increased from 3.7 to nearly about 4.2 V in constant current mode with current of nearly 30A and then the constant voltage charging starts and current reduces from 30A to 2.6A charging and balancing of cells occur till 9000 sec.
Cell temperature also start to increase exponentially upto constant current region and reduces in constant voltage mode. SOC also increases from 45% to 94% in this mode for EKF technique.
4) Post charge Balancing (9000-20,000 sec) :
After 9000sec the post cell balancing starts under standby mode. Cell temperature reduces in this mode and tries to reach the ambient temperature. SOC remains constant to 94%.
Test Case 2 :
The test case 2 is selected as shown below in the dialog box and click OK to implement it.

We can see the test sequence in BMS_StateRequst>BMS_TestSequence and there we can see that the test case we have selected is as shown below.


The editor figure tell us about the test sequence and it is as follwoing.
- Driving is done for first 10,000 sec.
- Then charging is done for next 10,000 sec.
Results of the Test Sequence 2 :
Simulation is run for 20,000 sec and the results are as below.

The lamp indication were green for all states which means the model is fault free.

1) Driving mode (0-10,000 sec) :
The cell voltage varies from 3.9V to 3.05 volt which is cutoff voltage of cell and the entire cell is drained upto 8692 sec. Cell temperature varies from 288K to 322.5K. SOC reduces from 80% to 0% (cell got fully drained) in the drive mode under 8629 sec. And cell balancing is not performed here.

2) Charging Mode (10,000-20,000 sec) :
The cell got drained earlier before reaching this mode.
Test Case 3 :
The test case 3 is selected as shown below in the dialog box and click OK to implement it.

We can see the test sequence in BMS_StateRequest>BMS_TestSequence and there we can see that the test case we have selected is as shown below.


The editor figure tell us about the test sequence and it is as following. The charging is done for entire simulation period i.e 20,000 sec.
Results of Test Sequence 3 :

The lamp indication were green for all states which means the model is fault free.

1) Charging (0-20,000 sec) :
Cell voltages increases from there initial values and after 2000 sec they got constant. Pack current initially start from 0 to 30A and then start decreasing when the constant voltage mode is there to 2.5A and got full charged upto 2000sec. SOC was initially 80% and in 2000 sec it got fullly charged that is 100%. Cell temperature starts to increases initially and when battery got fully charged then decrease down to the ambient temperature.
B) SOC Estimation in Battery model :
To observe the coulomb counting method we need to open the BMS_ClosedLoop>BMS ECU and then on SOC_Estimation Block.

Here we see that are three method for calculation of SOC estimation and these are..
i) Coulomb counting
ii) Unscented Kalman filter
iii) Extended laman filter

By opening the coulomb counting method we get to see the gain ,1-D lookup table, Product and Discrete time integrator Block.

The discharge current from the battery given to a gain having a value of 1/3600 to convert Amps to Ah (Ampere Hr).

The saturation limits are given which are 1 to 0. So that we get the SOC value from 0 to 1 multiplied with 100 to get percentage of SOC. The coulomb counting methods is simple and require less computational compared to other two methods.
Conclusion :
Hence we have simulate the BMS and run the various test case from hardness dashboard. And write a detailed report on the results. And discuss about coulomb counting and how BMS implements coulomb counting for SOC.