Aim :- Week 7 State of charge estimation
Objective :-
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?
Solution :-
1) Simulate the 3 test cases from harness dashboard of matlab example i.e. design and test lithium ion battery management algorithms and write a detailed report on the results :-
--->
Lithium Ion Battery :-
- Rising crude oil prices and worldwide awareness of environmental issues have resulted in increased development of energy storage systems. The battery is one of the most attractive energy storage systems because of its high efficiency and low pollution. There are several kinds of batteries currently being used in industry: lead-acid battery, Ni-MH battery, Ni-Cd battery, and Li-ion battery.
- A lithium-ion battery or Li-ion battery is a type of rechargeable battery in which lithium ions move from the negative electrode through an electrolyte to the positive electrode during discharge and back when charging. Li-ion batteries use an intercalated lithium compound as the material at the positive electrode and typically graphite at the negative electrode.
- Li-ion batteries have a high energy density, no memory effect (other than LFP cells) and low self-discharge. Cells can be manufactured to either prioritize energy or power density. They can however be a safety hazard since they contain flammable electrolytes and if damaged or incorrectly charged can lead to explosions and fires.
- A prototype Li-ion battery was developed by Akira Yoshino in 1985, based on earlier research by John Goodenough, M. Stanley Whittingham, Rachid Yazami and Koichi Mizushima during the 1970s–1980s, and then a commercial Li-ion battery was developed by a Sony and Asahi Kasei team led by Yoshio Nishi in 1991.
- Lithium-ion batteries are commonly used for portable electronics and electric vehicles and are growing in popularity for military and aerospace applications.
- Chemistry, performance, cost and safety characteristics vary across types of lithium-ion batteries. Handheld electronics mostly use lithium polymer batteries (with a polymer gel as electrolyte), a lithium cobalt oxide (LiCoCO2) cathode material, and a graphite anode, which together offer a high energy density.
- Lithium iron phosphate (LiFePO4), lithium manganese oxide (LiMn2O4spinel, or Li2MnO3-based lithium rich layered materials, LMR-NMC), and lithium nickel manganese cobalt oxide (LiNiMnCoO2 or NMC) may offer longer lives and may have better rate capability. Such batteries are widely used for electric tools, medical equipment, and other roles. NMC and its derivatives are widely used in electric vehicles.
- Research areas for lithium-ion batteries include extending lifetime, increasing energy density, improving safety, reducing cost, and increasing charging speed,among others. Research has been under way in the area of non-flammable electrolytes as a pathway to increased safety based on the flammability and volatility of the organic solvents used in the typical electrolyte. Strategies include aqueous lithium-ion batteries, ceramic solid electrolytes, polymer electrolytes, ionic liquids, and heavily fluorinated systems.
Battery Management System :-
- A battery management system allows users to monitor individual cells within a battery pack. As cells work together to release energy to the load, it is crucial to maintain stability throughout the whole pack.
- BMS allows for constant monitoring, gathering, and communicating information to an external interface where users can observe the status of each cell and the health of the battery pack as a whole. The BMS monitors and manages a battery pack in order to protect it from damage, prolong its life, and keep the battery operating within its safety limits. These functions are key to efficiency, reliability, and safety.
- A BMS can measure different figures such as current, voltage, temperature, and coulomb count. With these measurements the system can assess the health of the battery and readjust operations as needed to protect the pack.
- For instance, a drop in cell voltage at a given load can indicate an increase in internal resistance. This then can point toward dry-out, corrosion, plate separation, or other diagnoses.
- A sudden increase in the temperature of one cell could indicate the possibility of a thermal runaway event within the whole battery pack. The BMS could then stop the flow of energy and alert the user to a potential problem so that it can be contained before it gets out of control.
- SOC estimation is a fundamental challenge for battery use. The SOC of a battery, which is used to describe its remaining capacity, is a very important parameter for a control strategy.
- As the SOC is an important parameter, which reflects the battery performance, so accurate estimation of the SOC can not only protect battery, prevent overdischarge, and improve the battery life but also allow the application to make rational control strategies to save energy.
- In electric vehicle batteries, the SoC is used to determine the remaining range left of the car before it needs to be recharged.
- Coulomb counting can help to estimate the available capacity of a battery. This is done by measuring the amount of energy leaving and entering the battery during charge/discharge cycles. A decrease in coulomb count during a full cycle when compared to a new battery cell indicates a drop in battery capacity.
- The Specifications of BMS Are highly accurate with each block given their specific function and all the blocks are inter-related with each other for better performance. The entire model has a large number of component level and system level analysis.
- In this, we have opened the matlab example of design and test lithium ion battery management algorithms.
- Here, we have selected a Module having 6 cells for the system with each cell having 4V as their Standard cell Voltage.


- We have clicked on cell module_1TC subsystem block to see the arrangement and we found tha 6 no. of cells are connected in series and the arrangement is as under;

- Designing a BMS is a complex task that requires considering the application’s specific needs,the system context, as well as the characteristics of the adopted battery cells. From these considerations,a list of system requirements can be derived.
- This section aims to list aspects that usually need to be considered and to provide short explanations for each of them state_machine; SOC_estimation; balancing_logic block.
Driving Charateristics:- tells us the response to the different driving conditions.
Charging : Response to the EV while Charging.
Balancing : Response to the fault options.
- The SOC-Estimation is also a key important block in the BMS_ECU, which helps to tell the estimate of the battery charging condition whether cells are charging properly or not etc.
- The Balancing_Logic is repsonible for the management of the battery pack while charging so that if there is occurance of weak cell into the system then it is used to improve battery life by maximizing the capacity of a battery pack with multiple cells in series, because if weak cell is present in the battery pack then compromises with the SOC and SOH.
- Since, it has three condition, we will test sequence one by one to understand the results.
1) Test Sequence - 1 :-
In this test seqeunce 1, conditions are as under;
- For 0 - 3000 sec, driving mode is activated. Then, after completion of 3000 sec, balancing mode is activated till next 1000 sec. Thereafter, charging and balancing mode is activated for next 5000 sec. After completion of charging and balancing mode, post charge balancing mode is activated till the end of simulation.



Dashboard View :-

- All the the indicators on the dashboard such are green. So there is no errors and we check the plot for this model and it is represented below.
Result :-

Observation :-
- The above graph indicates 6 different graphs that are Cell Voltages, Pack Current, Cell Temperature, BMS States, SOC using 3 different methodologies and Cell Balance Command Signals.
- In the first graph, Cell voltages changes in value as the current is going in and out of the cell by charging and discharging it respectively. At first, we can observe that the voltage values of the cells differ in values slightly. It is because we initialized the model with a slight imbalance between the given cells.
- During driving condition i.e from 0 to 3000 seconds, the cell voltages ranges between 3.1 to 3.9 volts approximately and then balances to the nominal value of 3.7 volts for next 1000 sec. Later, cell voltages touch the 4.2-volt mark by sudden rise(Charging state) behaviour and ultimately settles down to a lower value, at the end of the simulation. At that time the cell voltage tries to converge to each other values with the balancing methodology and ends up between 4-4.2 volt range.
- The second graph shows the current rating of the battery pack which basically defines the current characteristics of all the cells as a whole. At driving mode(0-3000 sec), the pack current has the ranges from -70 Amps to 20 Amps. In this, charging current is assumed to be positive and discharge curret as negative. During charging, the pack current increases to 30 A and then stays zero at the time of standby balanced mode for the rest of the simulation, giving zero value due to zero power demands.
- The third graph is showing us the cell temperatures for all the cell voltages. When the BMS is in the driving mode(0-3000sec), the cell temperature rises from 288 K to 302 K due to the different power demands of the drive cycles. The balanced mode happens for a very short duration; it tries to converge, but the window is of very little time they can not converge.
- After that when the charging state comes, all the cell temperature rises and after a point(5550 seconds) it again starts to decrease due to the balancing effect but a decrease in pack current.
- The hottest cell(No.6) refering to light blue color line of cell temperaute graph and the coldest cell(No.1) refering to yellow color. The clear difference between the hottest cell(No.6) and coldest cell is because of the physical positions that they are placed in or maybe because of the underperforming cell. Cell No. 6 is significantly hotter the cell no 1 because it is thermally insulated on one side. The higher temperature of cell no.6 will eventually cost much faster degradation of cell 6 compared to cell 1 leading to undesirable and unevenness in cell condition. Therefore need an active thermal management system to keep thermal differences within a few degrees Celcius so that the performance of the battery pack is not compromised.
- The fourth graph gives us an idea about the BMS state which is the vehicle undergoing that are Driving, Charging and Standby mode or Balance mode. It indicates that during 0-3000 sec, the vehicle is in driving condition. Further for next 1000 sec,it is in cell balancing mode and then for next 5000 sec, the BMS will be in charging and balancing mode. Then it will undergo post charge balancing mode till the simulation end for 20000 sec.
- In the fifth graph, the SOC of three different battery cells each performed with different matter yellow corresponds to column counting, blue corresponds to UKF and orange to EKF, the initial soc is 75%, however, the simulation so estimates need to initialize it to 80% to set their capability to recover. It is apparent that columb counting never does because it has no way to realize it due to the absence of voltage information. both common filter algorithms on the other hand recover from the initial error within the first hour of simulated time. Here, EKF slightly outperforms UKF.
- During driving mode, SOC(%) of battery drops to almost 40%. Further, during charging mode, SOC value reaches to 90%.
- The sixth graph gives us the balance commands of the cells. We can see here that from the falling edge of the BMS driving mode, the balance command is initiated for all the batteries except cell no.1 which is the coldest. It is because, from this point in time, all the cell's temperature significantly increases and crosses a certain difference with the temperature of cell no.1.
2) Test Sequence - 2 :-
i) Driving Time = 0-10000 sec
- In this test sequence, driving mode is activated for (0-10000 sec) and then, the charging mode will be activated till the end of simulation.


Dashboard :-

- All the the indicators on the dashboard such are green. So there is no errors and we check the plot for this model and it is represented below.
Results :-

Observations :-
- In graph 1, the initial state the voltage of all the cells are deflecting in the same manner and dropping slightly in the range of 3 to 3.9 volt it has 4 fluctuation zones and in between each of these fluctuating zone, they are stable for while and this phase lasts for 8692 sec.
- In Graph two, current of battery pack also shows us the same behaviour as the voltages, but it has negative values most of the time whenever the higher voltage drop is required and have a -70A to 20A value like before.
- The temperature graph here is showing is all the cells temperatures were the same at the start of the simulation which is around 288 degree-kelvin. Here, temperature discrepancies are also observed between each cell. Cell no.6 is the hottest and cell no.1 is the coldest like before and the temperature difference here is 20 degrees approx. This can easily degrade the overall performance of the battery pack.
- The fourth graph shows us that the simulation is run throughout the BMS driving mode.
- The SOC of three different battery cells each performed with different matter yellow corresponds to column counting, blue corresponds to ukf and orange to ekf, the initial soc is 75%, however, the simulation so estimates need to initialize it to 80% to set their capability to recover. It is apparent that columb counting never does because it has no way to realize it due to the absence of voltage information. both common filter algorithms on the other hand recover from the initial error within the first hour of simulated time.
- The SOC for all three values is decreasing from 80% of the value and continuously decreases because the entire simulation is in driving mode. Columb counting soc value decreases at a lesser rate than the other two, where ukf shows even lesser than ekf. SOC value of UKF and EKF method drops to zero as all the available energy in the battery is drained during driving condition of vehicle as vehicle is in driving condition for 10000 sec. and hence, the simulation stopped at 8692 sec as soon as SOC value of any one method reaches zero.
- The balance command is not initiated for any of the cells for this specific simulation. That may be since for continuous driving mode this much difference or disbalance can be allowed because no overcharging will be taking place.
ii) Driving Time = 0-6000 sec


Dashboard View :-

- The Result shows that there is a fault condition in the vehicle. BMS has detected high temperature in the battery pack. The dashboard on the model dipicts the same with a red colour indication.
Results :-

Observations :-
- In graph 1, the initial state the voltage of all the cells are deflecting in the same manner and dropping slightly in the range of 3.1 to 3.9 V it has 3 fluctuation zones and in between each of these fluctuating zone, they are stable for while and this phase lasts for 6000 sec in driving mode condition.
- In Graph two, current of battery pack also shows us the same behaviour as the voltages, but it has negative values most of the time whenever the higher voltage drop is required and have a -70A to 20A value like before.
- The temperature graph here is showing is all the cells temperatures were the same at the start of the simulation which is around 288 degree-kelvin. Here, temperature discrepancies are also observed between each cell. Cell no.6 is the hottest and cell no.1 is the coldest like before and the temperature difference here is 20 degrees approx. This can easily degrade the overall performance of the battery pack.
- The fourth graph of BMS state, vehicle simulation is in driving mode for (0-6000 sec). Then, for next 1000 sec, it is in charging mode and due to charging, temperature got increased beyond operating temperature i.e. over temperature condition. Hence, it goes in fault condition state till end of the simulation. The same was displyed on the dashboard where lamp of high temperature became red.
- The SOC of three different battery cells each performed with different matter yellow corresponds to column counting, blue corresponds to ukf and orange to ekf, the initial soc is 75%, however, the simulation so estimates need to initialize it to 80% to set their capability to recover. It is apparent that columb counting never does because it has no way to realize it due to the absence of voltage information. both common filter algorithms on the other hand recover from the initial error within the first hour of simulated time.
- The SOC for all three values is decreasing from 80% of the value and continuously decreases till the simulation is in driving mode. Then, after 6000 sec, vehicle goes in charging mode and hence, SOC(%) got increased from 20 % to 50%. Columb counting SOC value decreases at a lesser rate than the other two, where UKF shows even lesser than EKF. After 7000 sec, the system goes in fault condition mode, hence the SOC(%) of battery remains constant and the system is off due to faulty condition.
- The balance command is initiated for all the cells except one coldest cell(yellow line) for this specific simulation.During 6000-7000 sec, balancing is getting done due to temperaute difference between cells as vehcile is in driving mode for almost 6000 sec. Then, after 7000 sec, the system goes in faulty condition, due to high temperature of hottest cell and cell balancing is getting done for that particular cell till end of the simulation time.
(3) Test Sequence -3 :-
- This test sequence has only one phase i.e. charging mode




Dashboard :-

This condition has only one phase and that is charging. So we can simulate this condition and can analyse the plot for charging phase and the same is as under;
Results :-

Observations :-
- From the first graph, all the cells are initiated at different voltages where cell no. 2 has the highest voltage and cell no.1 has the lowest voltage. After some time, cell number 6 quickly comes near the cell number 1 voltage value whereas there is a significant difference in the cell number 2 voltage.
- The current of battery pack is showing a higher charging current at the initiation of the simulation but as time goes the pack current decreases and becomes zero at the end. The battery pack current is initiated with 20 A and then it falls to zero current till its complete simulation time of 2000 sec and then it maintains the constant current of 0 A because it is put on charging state and it remains constant throughout the simulation as vehicle is not in driving condition where it would take the current to discharge the battery for movement of vehicle.
- The cells initiate with 287 degree-kelvin and then all the cells maintaining the straight line but with different temperatures range. the end all the cells have a different temperature) traces show the significant discrepancy between the hottest and coldest cells the reason is mainly because of symmetry in the merger layer in terms of thermal behaviour. cell no 6 is significantly hotter the cell no 1 because it is thermally insulated on one side.
- The fourth graph clearly shows that the entire simulation is based on the charging mode.
- The soc is initial soc of three different cells is at 80%. As the system is put on charging state, the soc rises to 100% for the coloumb counting method(yellow cell),UKF and EKF initially having different charging rates but after 4000 sec they having an equal state of charge of 91% and it maintains throughout the simulation. It is apparent that columb counting never does because it has no way to realize it, making it erroneous due to the absence of voltage information. Both common filter algorithms on the other hand recover from the initial error. EKF and UKF slightly outperforming than coulomb counting.
- The balance commands of the cells, we can see from the sixth graph. The command for cell no.1 is never initiated because it is coldest but for the other cells, it is initiated from the beginning. When after 16000 seconds the voltage temperature is come close enough to each other, the balance command for all the other cells been reset to 0 value at 18000 seconds. Between this time, the command status changes rapidly from 1 to 0 by constantly monitoring the temperatures and ultimately falls to zero when the temperature difference becomes very less.
2.What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation?
---->
Coulomb Counting :-
- It is a method used for estimating the state of charge (SOC) of a battery.
- The coulomb counting method is expedient for state-of-charge (SOC) estimation of lithium-ion batteries with high charging and discharging efficiencies. The charging and discharging characteristics are investigated and reveal that the coulomb counting method is convenient and accurate for estimating the SOC of lithium-ion batteries. The Coulomb counting method measures the discharging current of a battery and integrates the discharging current over time in order to estimate SOC.
- In this method, SOC is taken at the previous time step SOC(t-1) and the amount of energy removed/added at the current time step is subtracted/added from the SOC of the previous time step SOC(t-1) to obtain the amount of energy present in the battery at the present instant.
The SOC estimation in the coulomb counting method is done using the below equation,
SOC(t)=SOC(t−1)⋅∫tt−1(It⋅ηQn)⋅dt
where,
SOCt−1=SOC at previous time step
η=efficiency
t= current time step
t-1 = previous time step
Q = Charge capacity of the battery
But there are several factors that affect the accuracy of Coulomb counting method including temperature, battery history, discharge current and cycle life.
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, K1, K2, and K0 are constant values obtained from the practice experimental data.
In the modified Coulomb counting method, SOC is calculated by the following equation:
(1)
Flowchart for Columb Counting Method

- The flowchart given in Fig above and explains the algorithm used to manage the battery monitoring by switching from a battery operating mode to another by the conditions of the transition. The estimation of the SOC of a Li-Ion battery in this method is based on monitoring both the voltage ܸVbat and the current Ibat.
- The operation mode of the battery is recognized by the direction of current through the battery system. When the battery is in open circuit mode, Ibat = 0 and compensation of self-discharge losses will be taken into account as explained in sub-section C. The information needed to carry monitoring is the measurement of the battery voltage, the current flowing through it, and the operating temperature. Coulomb counter ∆ܳQ is used to track the SOC when the battery is charged or discharged.
- The amount of charges ∆ܳQ in an operating period 'τ' is obtained by temporal integration of a measured charging/discharging current Ibat like expressed in (2)

- This variance ∆ܳQ that will be used in the following equations is negative if the battery is in discharge, positive if in charge.
(I) Charge Mode :-
- In this mode, the coulomb counter is presented by ܳQgained as expressed in (3), which represents the number of charges accumulated during 'τ'

- So the variation of the state of charge gained in this same operating period is obtained by the relation (4)

- By cumulating the previous state of charge indication and the obtained one we can have the instantaneous value of ܱܵSOC.

- Knowing the relationship indicated about (6) the value of depth of discharge DOD is updated in every charging operation to get it back every switching to discharging mode.

(II) Discharge Mode :-
- In the discharging mode the coulomb counter is presented by Qlost, which represents the amount of charges losses in the operating period 'τ' by equation (7):

- The depth of discharge variation is calculated according to (8) and used in (9) to calculate the value of DOD


- The SOC indication then is done by applying the equation (6).
(III) Self-Discharge Mode :-
- At the battery storage periods, the percentage of monthly self-discharge is converted to the amount discharged per hour; this amount is designed by the constant q(per/hour). Considering a 5% rate of self-discharge per month q(per/hour) is approximated to 0.0016 Ah. So the quantity of charges dissipated in the open circuit period ܳQoc is calculated by equation (10) representing the accumulative losses during the store hours.

- ℎ: Hour of storage
- This value will be added to the amount of charge lost ܳQlost during discharge mode and subtracted from the amount of charge accumulated ܳQgained in charge mode as expressed in relations (11) and (12). This compensation of self-discharging loss is made at each open circuit period and before switching to another operating battery’s mode.

(IV) Temperature effect :-
- The temperature variation affects considerably the state of charge of the Li-Ion battery [16]. To improve the accuracy of the battery state of charge, a temperature coefficient ߙ is introduced and multiplied by the value of the calculated SOC [17]. This coefficient varies depending on the operating temperature according to the intervals variations (13)

(V) Recalibration :-
- When the loaded voltage ܸVbat drops under a limit voltage Vlim (3V), during the discharging mode the battery is considered totally discharged. When it’s empty, the battery can no longer be used and should be recharged. So after a cycle of charge/discharge, a recalibration should be made of Qmax which represents the maximum capacity that can be released by the battery. This recalibration allows rectifying the indication of SOC by replacing ܳQrated by Qmax in relation (4). Also, we recalibrate the State-of-Health (SOH) of the battery SOH defined is a relation (14) as:

- Moreover, the battery is fully charged. Then ܱܵSOH should be updated by assigning the number of charges releasable from the battery to Qmax. The SOH indeed represents the ageing degree of the battery; in fact, it’s at 100% maximum value when the battery is new. When the battery is getting old and ܳQmax became more and more inferior than ܳQrated, SOH value drops to indicate the health degradation of the battery.
- The experimental results show that the accuracy of the modified Coulomb counting method is superior to the conventional Coulomb counting method.
Now select the BMS ECU unit and the representation is given below.

The above model is from where the SOC estimation for a Simulink model is done. The ECU do the estimation counting what is provided and preloaded to its memory.

Select the SOC estimation sub sytem from the model such as Coulomb counting, Unscented Kalman filter(UKF), Extended Kalman Filter(EKF) and it is given below.

In the SOC estimation subsystem block, we have to select Coulomb Counting method and the same is open as under;

- This system does the estimation by coulomb counting equation mentioned above.
- In coulomb counting method block, it takes two input signals such as current and temp and the current signal goes to gain block and the temp signal goes to lookup tables of battery time and current. and both the blocks are connected to the divided block and these signals are connected to the discrete-time integrator to track the charge and which finally helps to calculate the state of charge.
- This consist of integrating a current and doesn't leave the cell for that here we using a discrete-time integrator to give the track of the cell charge time the benefits of this are its simplicity and its low capitalisation cost and the drawbacks are an accumulation of the current sensor error and its inability to recover from the wrong initial condition due to lack of feedback from voltage measurements.
- Here, the coloumb counting is done with the help of the look-up table and the discrete-time integrator block.
References :-