Week 7 State of charge estimation
1.Simulate the 3 test cases from harness dashboard and write a detailed report on the results
2.What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation ?
1)To simulate 3 test cases from harness dashboard in the MATLAB file given below and write a detailed report on the results.
The MATLAB file,
2)To define coulomb counting by referring to the above model and explain how BMS implements coulomb counting for SOC estimation.
THEORY
A Battery Management System (BMS) is used to control the battery pack electronics , which includes electrical and digital
data. It is an embedded system ,which is a combination of hardware and software. The main functions of a BMS is to protect
batteries from operating outside its safe operating area , monitoring its state , calculating the secondary data , reporting that
data , controlling its environment , authenticating it and balancing it.
A typical flow chart of the BMS working is shown below,

A BMS inside a Electric vehicle looks like a printed circuit board as shown below,

The given MATLAB project file is used as a reference design to get started with designing BMS with MATLAB and Simulink.
This project includes Simulink models for BMS Algorithms such as:
1.State of Charge estimation using Extended Kalman Filter, Unscented Kalman Filter
2. Passive Battery Cell Balancing
3. State Machine for Pre-charging and Contactor Management
4. Fault Management - Over/Under Voltage, Over Current, Over Temperature etc.
5. Charge and Discharge Current Limit Calculations
To design and test these algorithms, project also includes files for
1. Li-ion Battery Cell Parameter Estimation
2. Battery Pack with 6 cells in series and 96 cells in series
3. Simulink Test files with test cases to test State Machine Logic
4. Linking requirements to Models
- SIMULATION OF HARNESS DASHBOARD AND RESULTS
The block diagram for this harness dashboard is as shown below,

In this block diagram we can choose 3 different test conditions.
Now let us look at the first test condition,
Test condition 1
The flow chart for this test condition is as follows,

From this flow chart we can see that the state of driving is done upto 3000 seconds and after that balancing is done till 4000 seconds , during balancing vehicle is in standby mode. After balancing next step is charging which is done till 9000 seconds. And after that post charge balancing is done till the end of the simulation.
Now let us simulate this test condition and look at the results,
The dashboard shows no error , since all LED’s are green in colour as shown below,

The scope results for the first test is shown below,

- Here we can see that the maximum temperature of the cell goes upto 317K and this peak temperature is reached when the battery SOC reaches 100% during charging. Once the SOC reached 100% we can see that the temperatures starts decreasing.
- Once the driving state is finished we can see that the SOC reached values less than 50%. Then the balancing starts during which the vehicle is in standby mode. After that we can see from 4000 seconds onwards charging starts. And by the time of 6750 seconds the SOC reaches 100%. Also the battery attains maximum voltage of 4.2V around this time.
- After charging is finished , post charge balancing begins. During this time we can see that the cell voltages starts dropping. And by the end of the simulation it reaches at values somewhere between 4.1V and 4.15V.
- The current supplied during all these states can be seen in the pack current plot. Here we can see that the maximum current is 30A and this attained when the charging starts. After some time steady state charging current state is attained and the current value starts decreasing. Finally it reaches 0A once the SOC is 100%.
Test condition 2
To change the test condition we have to click on the test sequence variant block and select the required condition as shown below,

The flow chart for this test condition is as follows,

Here we can see that the driving state is continued till 10000 seconds and after that charging begins.
Now let us simulate the second test condition and look at the results,
The dashboard shows no error , since all LED’s are green in colour as shown below,

The scope results for the second test is shown below,

- Here we can see that the simulation stopped at 8692.2 seconds , this happened because the SOC of the battery reached 0%. If the battery SOC at the beginning of the simulation was higher it could have completed the 10000 seconds driving state.
- At the starting of the simulation the we can see that the SOC was at 80% and the cell voltage level was around 3.9V.
- The highest temperature reached is 322.5K and it was reached at the end of the simulation when SOC was 0%.
- The pack current reached a maximum of 19A during the driving state.
- Since the balancing command was not given , we can see from the SOC plot that some of the cells had 10% charge still left , since the weakest cell reached 0% the simulation stopped.
Test condition 3
The flow chart for this test condition is as follows,

In this flow chart we can only see one BMS state , that is charging. So from 0 seconds till 20000 seconds only charging is done.
Now let us simulate the second test condition and look at the results,
The dashboard shows no error , since all LED’s are green in colour as shown below,

The scope results for the second test is shown below,

- Here we can see that at the beginning of the simulation battery is at 80% SOC. Now the charging starts once the simulation begins and by 1800 seconds the battery pack is fully charged and the SOC reaches 100%.
- In the cell voltages plot , we can see that the maximum voltage is reached during the charging and once the SOC is at 100% the voltage starts decreasing and attains a stable value between 4.1V and 4.15V.
- The maximum cell temperature of 292.5K is reached when the battery is fully charged and after that the temperature starts reducing.
- In the pack current plot we can see that the highest transient current reached is 30A and it starts decreasing as the charging progresses.
- STATE OF CHARGE ESTIMATION
COULOMB COUNTING
The State Of Charge (SOC) estimation is done in this model by using a method called Coulomb Counting. This particular
method measure the discharging current of a battery and integrates the discharging current over time in order to estimate
SOC.
SOC is calculated by using the following equation,
Where ,
The accuracy of Coulomb counting method depends on temperature,battery history, discharge current and life cycle.The
Coulomb counting method accumulates error over the period of time and hence it is not preferred method for simulations
taking longer duration of time. This error is caused due to the fact that the exact values of cell total capacity, current
experienced by the cell , coulombic efficiency and the amount of current drawn to power the electronic circuitry that monitors
its performance is not known.
The Coulomb counting block diagram used in this model is shown below,

Here we can see there are two inputs , one is current and the other is temperature.
The current input is connected to the gain block , whose value is as shown below,

The temperature input is connected to a lookup table containing capacity values at each temperature.
This lookup table is shown below with its values,


Now the output from the gain block is divided by the output from the lookup table block. And then it is connected to a Discrete time integrator block.
This block and its parameters are shown below,

This block will accumulate the SOC value over the time.
This how the BMS implements coulomb counting for SOC estimation.
CONCLUSION
The 3 test cases from harness dashboard in the given MATLAB file has been simulated and the results have been explained successfully.
Also the implementation of Coulomb counting by the BMS for SOC estimation has been explained.