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 ?
Hint :(Download the file from the link and go to SOC estimation model-ECU block)
1.Simulate the 3 test cases from harness dashboard and write a detailed report on the results
First click on the above link and download the MATLAB file for the simulation the three test cases from harness dashboard. After downloading the file. Exatract it, then go into the file and again extract the zip file according to the version of MATLAB you are using. And then go to MATLAB and open this file, and then go to the plant and open battery.slx file as shown below

After opening file the matlab window open like this

In that open the test>system> and select and open the battery closed loop harness file.

Then model opened like below

In the above figure, we can observe the different blocks and subsystems.
Test Sequence Variant:

Test Sequence Variant block is used to choose the test case. Manual varient is used to operate manually under certain situations. The following figure shows the test sequence variant block subsystem to choose the tests. In the first case will select 1.

Rotary Switch:

This rotary switch block has three terminals which are Bal, Chrg, and Drv. This block represents the conditions of the vehicle which is used in BMS.
The Bal terminal indicates the Balancing condition of the vehicle.
Chrg terminal indicates the Charging condition of the vehicle.
Drv This terminal indicates the vehicle is in driving condition.
The above conditions are used in the manual variant simulation mode. When the simulation started the vehicle condition is changed by adjusting the rotary switch. Then we can observe the vehicle’s performance under various conditions.
In the below figure we can observe the rotary switch under various conditions.

Lamp:
The lamp block diagram shows below.

The lamp blocks which are attached to the dashboard will indicate if any fault happens. Any fault occurs lamps indicate in red colour. if no fault occurs all lamps indicate green colour.
Now coming to the BMS_State request block, it gives which test is to be perfome like if we set the case 1 then the state request will perform the first test and other 2 will be off. Under first test selection, it is shown as below.

TestSequence1: In this test sequence we can observe that different time trasitions between the modes. Here the drving mode is on for 3000sec and after that balancing condition will activate. After 1000sec charging and balancing condition will accepts. After 5000sec of this conditions post charge balancing mode will activates.

Test-1: In this case we are selecting the test sequence variant as 1. And simulating the model for 20000seconds. After the simulation, all the lamp block which are taken are glowing in green colour which indicates that there is no fault. So everything will be normal, then we can see all the changes in three modes which are Bal,Drv, and Charg. And also we can observe the SOC variations, temperature of different cells and etc

After simulation is done results are shown below
Plot-1:
In the first plot we can observe that from intial stage to 3000seconds it is in driving mode, so there is voltage fluctuations according the driving conditions. The voltage varies in between the 3.2-3.8V. The nominal voltage of each block is 3.7V. So the maximum variations are happend in between those limits. From 3000-4000seconds the vehicle is in Balancig state, in this mode the voltage of the cells settles at its nominal voltage that is at 3.7V. At the 4000sec the voltage is in increasing mode because after 4000seconds the mode will enters to charging and balancing state for 5000sec means till 9000sec, in this mode the cells gets charged. So it reaches to its full charging voltage i.e, 4.2V and next it enters to postcharge balancing mode where all the voltages get settles to around 4.1V.
Plot-2:
In the second plot, we can observe temperature variations at each cell. From 0 to 3000sec is the driving mode, and the temperature of cells starts increasing according to the drive cycle. the balancing condition is from 3000 to 4000sec the temperature of the cells decreases gradually. After that charging and balancing mode will start from 4000 to 9000sec, where the temperature again starts increasing during charging and then starts decreasing for balancing mode. After that a slight decrement in the cell temperatures as it indicates the post-charge balancing mode.
Plot-3:
In this plot, the SOC changes according to the transition of the modes. In the driving mode, the SOC (state of charge) decreases from 80% to 45%. The SOC gets settled at 45%. After that charging and balancing mode will activate, where the cells get charged so the SOC will increases to 100% and then settles at full mode in post-charge balancing condition.
Plot-4:
In this plot we can observe the total pack, initially in the driving mode we can see the changes in current value according to the drive cycle. It varies from around -70A to 10A. When the vehicle enters into balancing mode then the current of the pack settles at zero. And when charging and balancing mode activates, the pack current will starts increasing it is around 30A and then gradually start decreasing to 0A. Later on, settles at 0A as the vehicle enters into post-charge balancing mode.
Plot-5:
This plot shows the BMS state. Like in which state the BMS is operating. We can see that on the y axis, three modes are pointed which are Driving, Charging and Standby. In driving mode i.e., till 3000sec the plot is at the driving point. After that for 1000sec i.e., till 4000sec, it will be in a standby position as it is in balancing mode. Then till 9000sec, it represents charging mode. Then it will settle at the standby position which represents the post-charging balancing mode.
Plot-6:
This plot shows balancing commands. Lie when the balancing mode activates then the plot reaches 1. So according to the balancing commands, the plots will settle.
Test-2:
From the test sequence variant, we are selecting test case-2. The below figure shows the test sequence block parameters.

When the test sequence is changed to test case 2. In the BMS test sequence block, the state request is changed to two. And remain 1 and 3 are turned off.

TestSequence2: In this sequence, we can see that only two transitions. Intially driving condition will intiate for 10000sec after this duration charging mode will activates. We can also edit the duration.

After simulation the model is shown below

results are shown below

The result of test sequence-2 is shown in the above figure. In this simulation, only two modes Driving and Charging are activated and operated.
PLOT-1:
From the cell voltage plot, we can observe the voltage variation from 3.2V to 3.9V. this is the driving mode of operation. But due to the continuous driving, the voltage range is decreased.
PLOT-2:
In the second plot, we can see the temperature of the six cells. As the vehicle is in driving mode, the temperature is continuously increasing due to the high running time.
PLOT-3:
In the SOC plot, we can observe that the SOC is initially at 80% while driving the SOC starts discharging, even though there are charge and discharge conditions in the driving mode the running time is high so the SOC is reached its 0% at 8692seconds. So, it’s not even completed its driving duration also. Which we have set for 10000sec. So, all the plot stops at that time because at 0% SOC the vehicle stops then there are no other changes.
PLOT-4:
In the fourth plot, we can observe the current variations according to the drive cycle. Initially, it is varying between -70A to 15A. But with the long running time, the current value also comes to around -55A to 15A. And it ends after SOC reaches 0%.
PLOT-5:
In this plot, we can observe the BMS state of operation. Only the Driving mode is activated. So, the plot is maintaining a steady state in the graph.
PLOT-6:
In the last plot, we can see the Balcmd. Since there is no balancing mode it settles at 0 only.
Test Case -3:
For the third test case, we are choosing test sequence 3 in the test sequence variant. The test sequence block parameter is shown below

After changing the test sequence in the subsystem, the BMS state request third case is activated. And the remaining states are turned off. The below figure shows the test sequence 3 selection.

By opening the test sequence block we can observe that only the charge condition is present. So, the simulation is run in only charge mode.

After run the simulation the model like below

results are below

From the above plot, following observations has been identified. Before explaining the plots it should noted that here only 1 mode is happening that is at charging mode. This is as we set in the test sequence3.
PLOT-1:
So from the first plot we can see that, it reaches to full load voltage that is 4.2V and then a small decrease to 4.1V and maintained that value through out the simulation. As this is only charging mode there is no change in the voltage of the cell.
PLOT-2:
From the temperature plot, it can be observed that while battery is in charging condition there is a increment in the temeperature of the cells. But after the battery is full charged the temperature values are quitely settled at normal temperature.
PLOT-3:
In SOC plot we can observe that, it is charged from 80% to 100% in 2000seconds and then it maintains its constant 100% throughout the simulation.
PLOT-4:
From the pack current plot it can be say that, while battery is in charging mode there is a rise in current from 0A to 20A, but after the battery gets fully charged the pack current comes to 0A and then settled.
PLOT-5:
The mode in this case is only charging so the BMS state plot shows only the charging mode.
PLOT-6:
As there is only charging mode, the balancing mode maintains at 1. Which shows in the last plot.
2.What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation ?
SoC Estimation by Coulomb Counting is based on the measurement of the current and integration of that current over time.

The State of charge (SoC) of a battery cell is required to maintain it’s safe operation and lifetime during charge, discharge and storage. However, SoC cannot be measured directly and is estimated from other measurements and known parameters. This leads to errors in the estimated SoC and that means it is not possible to fully exploit the full capability of the cell.
Coulomb counting gives a relative change in SoC and not an absolute SoC. If you measure the current over a given time step you have a measure of the number of Ah that have left or been received by the battery.
The Coulomb counting method measures the discharging current of a battery and integrates the discharging current over time in order to estimate SOC. The coulomb counting method is done to estimate the SOC with respect to time. Which is estimated from the discharging current I(t), and previously estimated SOC values, SOC(t-1). SOC is calculated by the following equation.

where:
- SoC(t)= estimated State of Charge at time, t
- SoC(t-1)= previous State of Charge at time t-1
- I(t)= charging or discharging current at time, t
- Qn= battery cell capacity
- Δt= time step between t-1 and t
But there are several factors that affect the accuracy of the Coulomb counting method including temperature, battery history, discharge current, and life cycle. The coulomb counting method depends on the recording of the current noise only. The signal is filtered with a high pass filter with a cut-off frequency of 0.01Hz.
If you want to know the absolute SoC you need to know the starting SoC of the cell, SoC(t-1) as given in the equation. One option is to fully charge the cell to a known voltage. Charging to maximum cell voltage and SoC can be used as a reset and known point.
Modified Coulomb Counting method:
To improve the Coulomb counting method, a new technique called modified Coulomb counting method is proposed. The modified Coulomb counting method uses the corrected current to improve the accuracy of estimation.
The corrected current is the function of discharging current. There is a quadratic relationship between the corrected current and discharging current of battery. By practice of experimental data, corrected current is calculated by the following form:

where , k2, k1 and k0 are constant values obtained from the practice experimental data.
In modified Coulomb counting method, SOC is calculated by the following equation:

The experimental results show that the accuracy of the modified Coulomb counting method is superior to the conventional Coulomb counting method. The Coulomb counting method then calculates the remaining capacity simply by accumulating the charge transferred in or out of the battery.
How BMS implements coulomb counting for SOC estimation in the above model:
BMS implements coulomb couting for SOC estimation in the above, which we can observe in the BMS ECU block. This can be opened by clicking on the BMS_system. The following model will appears if we click on the model.

And then open the BMS ECU subsystem the model like below

In this above model click on the SOC_estimation subsystem then the model like below

In that SOC estimation subsystem we have several subsystems in that we click on the coulombcounting subsystem the model like below

So here we are taking the current and temperature parameters of the cells and giving to the gain block and 1-D lookup table respectively. Where the lookup table gives the capacity over the time. The capacity will vary with respect to the temperature so that is why we have taken the temperature as input to the look up table. Now these outputs from the gain block and look up table is given to the product block, where the gain is multiplied means the current with respect to gain is multiplied. And the capacity has been integrated. That output is given to the discrete time integrator block, it performs the integration operation and gives the value of SOC. As we discussed before it applying the formula here over the current and capacity.
The Coulomb counting method is associated with monitoring the input and the output current continuosly. Since capacity is the integral of current with respect to time, by measuring the input and the output current, change in capacity or capacity degradation of a battery can be measured easily. In this method, we calculated by dividing measured capacity(after discharging the battery to 0% SOC value) to its rated capacity. It is an extensively used method by researchers for its simplicity. But, the accuracy of this method is not very high. The main advantage of Coulomb counting is its simplicity, easy implimentation and low computational cost.