Week 7 State of charge estimation
First, we must download the zip file from the task's website; the link is also provided below for your convenience. This will allow us to access the Lithium Ion Battery Management algorithm.
After downloading the zip file, we must first extract it to a folder. I once again chose Battery System R2020a to be the location I want the zip file to be extracted.
Then, to access the BMS Closed Loop Harness Dashboard, we must look for the model file named Test>System>BMS ClosedLoop Harness Dashboard.
Matlab will prompt the following query after opening this file:-

I've chosen to open the project and the model. The entire project will then be loaded into Matlab in the current folder and workspace after that.

The BMS ClosedLoop Harness Dashboard model file is then opened as follows:

Block for the Model:
Test sequence Alternative (it has 3 different test condition)
Optional Manual (selection)
The state request instructions are provided by the BMS StateRequest subsystem.
Indicating lights are used to indicate any battery fault states, such as high temperature, overvoltage, charger, voltage sensor, overcurrent, low temperature, undervoltage, and inverter. A green signal means that everything is in order, the battery may be charged and discharged, and a red signal means that there is a problem.
changing the location manually using a rotating switch while the simulation is running
BMS Closed Loop: Let's take a closer look at this subsystem, which includes the BMS ECU and Plant as its two primary subsystems.

BMS ECU: The BMS ECU receives two types of input, including BMS Input, which is feedback from the Plant model, and the state request, which comes from the State Machine. This is producing BMS Output and Info, which includes the logic for cell balancing, SOC estimation, and current power limit calculation in the State Machine, as shown below.

Plant: The system in question consists of a battery pack, a precharge circuit, and a charger and/or loads. There are two configurations in the battery pack: one module (6 cells) and sixteen modules.Here, we've chosen just one module for an easy calculation and quick simulation.

Cell voltages, Pack current, Cell temperature, BMS status, and cell balancing command are all outputs in the module's scope SOC.
Task 1. Simulate each of the three test scenarios from the harness dashboard and write a thorough report on the outcomes.
We must visit the Test Sequence Vaeiant and choose each test case there one at a time in order to simulate the three test cases.
Test Case 1 :
Click OK to execute test case 1 after selecting it as indicated below in the dialogue box.

The test case we have chosen is displayed as follows in the Test sequence, which can be found in BMS StateRequest>BMS TestSequence.

Now that we have double-clicked on the Test Sequence, the test sequence will be displayed as follows so that we can see what the test conditions are.

The editor figure provides the following information regarding the test sequence:-
Driving lasts for the first 3,000 seconds.
Then, after driving, cell occur balancing for the following 1000 sec.
Following the balancing, charging and balancing last for the following 5000 sec.
Post Charge Balancing takes place every 9,000 to 20,000 seconds.
Results of Test Sequence 1:-
Simulation is ran for 20000 sec and the result are as below

The model is fault-free because all of the lamps' indications were green.

I Driving (Discharging) mode (0-3000 sec): For the first 3000 sec, all cells are in driving mode, which causes them to discharge at a rate that fluctuates between 3.1 and 3.9 V. (min and max.).
The temperature of the cell rises from 288 K to 302 K.
SOC likewise declines with the EKF approach, going from 80% to 45%.
ii) Balancing mode (3000–4000 sec): Cell balancing takes place after 3000 sec and for 1000 sec, after which the modules enter sleep mode and maintain a constant voltage of around 3.7V.
As there is no current flowing through the cells when balancing, cell temperature progressively decreases.
During this time, SOC, which is 45% for EKF method, remains constant.
iii) Charging and Balancing (4000- 9000 sec): After 4000 sec, charging takes place, increasing the cell voltage from 3.7 to almost 4.2 V in constant current mode with current of about 30 A, and then constant voltage charging begins, reducing current from 30 A to 2.6 A. Cells are charged and balanced for 9000 seconds.
The temperature of the cell begins to rise exponentially up to the area of constant current and falls as the current flow falls in the constant voltage mode.
SOC for the EKF approach also rises in this mode from 45% to 94%.
iv) Post charge balancing (9000–20000 sec): Following 9000 seconds, post cell balancing begins in standby mode.
In this state, the cell's temperature drops and it seeks to become closer to the surrounding temperature.
SOC remains steady at 94%.
b) Test case -2:-
The test case 2 is selected as shown below in the dialog box and click OK to implement it


The cell voltage varies from 3.9 V to 3.05 V, which is the cutoff voltage of the cell, and the entire cell is drained for 8692 sec.
The range of cell temperatures is 288 K to 322.5 K.
In the drive mode, SOC decreases from 80% to 0% (cell is fully drained) in less than 8692 seconds.
Here, cell balancing is not done.
ii) Charging Mode (10000–20000 sec): Before entering this mode, the battery has already been depleted.
Test Case 3:

The model is fault-free because all of the lamps' indications were green.

Because we used the charging for the full 20000 sec, the value is displayed as a line in the BMS state.
Because it already has a charging value of about 80%, the values in the SOC graph change from 80% to 100%. The value in the battery pack does not change after reaching the maximum charge condition.
The values are plotted based on the cell values in the voltages in the balancing command. By altering the values that moved outside of the range, it begins to balance and stops when it reaches the limit values.
Task- 2 What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation ?
The Coulomb counting technique calculates SOC by measuring the battery's discharge current and integrating it over time. Using the discharging current, I(t), and previously calculated SOC values, SOC(t-1), the Coulomb counting technique is used to determine the SOC(t).
The following equation is used to determine SOC:

But a number of variables, including temperature, battery history, discharge current, and cycle life, alter the Coulomb counting method's accuracy.
Adaptive Coulomb Counting Technique
A novel approach termed the modified Coulomb counting method is put forward to enhance the Coulomb counting method. The corrected current is used in the modified Coulomb counting technique to increase estimate accuracy. The function of the discharging current is the rectified current. The corrected current and battery discharge current have a quadratic connection. The following formula is used to compute adjusted current in practise using experimental data:

where the constant constants k2, k1, and k0 are derived from the practise experiment data.
The following equation is used to determine SOC in the modified Coulomb counting method:
SOC calculation for the battery model:
Open the BMS ClosedLoop>BMS ECU and choose the SOC_ Estimation block to view the coulomb counting mechanism.

Here we see that there 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 look Up table, Product and Discrete Time Integrator block



Here, a discrete-type integrator is used, and the current is divided by the capacity due to temperature change before being integrated with a gain value of -1 and a sample time of -1.
The specified saturation limits range from 1 to 0. In order to calculate the percentage of SOC, we multiply the SOC value, which ranges from 0 to 1, by 100.
Compared to the other two approaches, this Coulomb Counting approach is straightforward and computationally less intensive.
Conclusion: