Week 7 State of charge estimation
AIM:
Develop and evaluate lithium ion battery management algorithms, simulate the three test scenarios from the harness dashboard, and write a thorough report on the findings.
SIMULINK MODELS FOR BMS ALGORITHMS USED IN THE PROJECT
1. Calculate the State of Charge using the Extended Kalman Filter and Unscented Kalman Filter.
2. Balancing of battery cells that are passive.
3. State Machine for Pre-charging and Contactor Management.
4. Management of faults, such as those caused by overcurrent, overvoltage, and overtemperature.
5. The Charge and Discharge Current Limits are calculated.
6.Estimation of Li-ion Battery Cell Parameters for these approaches' design and testing.
7. A 96 and 6 series-connected cell battery pack.
8. Simulink test files for State Machine Logic that contain test scenarios
9. Linking model requirements.
COULOMB COUNTING
The Coulomb counting technique estimates SOC by measuring the battery's discharge current and integrating it over time. The is calculated using the Coulomb counting method using the discharging current,, and previously calculated SOC values. The following equation is used to determine SOC:

A novel method termed the modified Coulomb counting method is put forth to enhance the Coulomb counting method. The corrected current is used in the modified Coulomb counting technique to increase estimation accuracy.
The function of the discharging current is the rectified current. The corrected current and battery discharge current have a quadratic connection. Corrected current is estimated using practise experimental data in the following way: where, and are constant values derived from the practise experimental data.

The following equation is used to determine SOC in the modified Coulomb counting method:

According to the experimental findings, the modified Coulomb counting approach is more accurate than the traditional Coulomb counting method.
As the name suggests, this method is aimed at calculating coulombs or the quantity of electric charge, which is derived from current multiplied by the time necessary for the charge to flow. To measure the remaining capacity or SOC of a battery, you can add coulombs to the initial capacity in case of charging or take them away when you discharge the battery.
Current integration is a widespread method, but its accuracy depends on some factors. First off, you should know the correct measure of the initial SOC that serves as a reference point. You can get this by fully charging or discharging a battery. So if you want to use this technique, you need to allow for regular resetting of the battery SOC to 100% in your BMS design.
Another important condition for the accurate state-of-charge estimation with coulomb counting is the correct current measurement. You can achieve this by increasing the amplitude and time resolution of an analog-to-digital converter (ADC) in your current sensor. However, this can add to the sensor’s cost, so in most cases, BMS designers use inexpensive ADCs with 14- and 16-bit resolution and average measured data afterwards. Then, engineers process data by applying more advanced estimators, such as Kalman filtering or neural networks.
If you’re able to provide the conditions necessary for the efficient use of the current integration method, you can reach high accuracy in your SOC calculation. But this practice will not be reliable if you cannot regularly charge or discharge the battery to the full or if the current value is incorrect.
SIMULINK MODEL

BATTERY MAGANEMENT SYSTEM CLOSED LOOP
Based on the specific data the inverter provides, closed-loop communication will alert the battery if it is being overcharged or the voltage is too low. This can speed up charging times, safeguard the battery's life, and improve the efficiency of the overall system.
In addition to saving time for the installer, closed-loop communication eliminates the need to double-check the programming of intricate settings. Automatic means.
Customers will experience less stress and misunderstanding since the inverter's and battery's states of charge will match from their point of view. Homeowners can check the specifics of their solar battery storage systems thanks to the majority of inverters' smartphone apps.
Your solar energy system will be safer, smarter, more efficient, and more dependable when the battery can transmit real-time data to the inverter. The entire industry has to embrace closed-loop communication as the way of the future for solar storage.

BATTERY MAGANEMENT SYSTEM ELECTRONIC CONTROLLED UNIT

BATTERY MAGANEMENT SYSTEM PLANT

TEST SEQUENCE VARIANT - TEST CASE 1

SIMULATION RESULT-1

TEST SEQUENCE VARIANT - TEST CASE 2

SIMULATION RESULT-2

TEST SEQUENCE VARIANT - TEST CASE 3

SIMULATION RESULT-2

OPEN CIRCUIT VOLTAGE (OCV) METHOD
This method rests on the variation in the battery’s remaining capacity or SOC to the open-circuit voltage—voltage with the disconnected current load. The stronger the dependence between voltage and SOC, the higher level of measuring accuracy you can achieve. The relationship between these parameters is reflected in a look-up table as the discharge curve. Manufacturers can provide such a table in battery datasheets or you can create it yourself by experimental measurements.

Although it varies with the battery chemistry, the dependence between voltage and SOC can be quite clear and the margin of error in the OCV method can be low enough. Nevertheless, this method is rarely applied in the real world. To use it, you need to cut off the current feed completely and give your battery a rest for some time—2 or 3 hours at the very minimum and 8+ hours in the ideal case. And only after all chemical reactions subside, you can gauge the battery’s voltage.
That means the OCV technique cannot measure the SOC of a battery while in operation unless the power consumption is very low and we’re talking about microamps. When your BESS or another battery-powered system is at work, it needs a constant electric power supply, and the current load can alter during operation. After a while, you’ll have to charge the battery, and that makes the OCV method an impossible task.
The open circuit voltage technique is well suited to determine the initial SOC battery characteristic. For example, you can use it to calculate the state-of-charge after extended storage of a battery or if your system was powered off for a time. After measuring the OCV, you can find out the initial SOC from the voltage-capacity chart.
Calculating the state-of-charge with the OCV method is not a good fit for lithium-based batteries that have a rather flat discharge curve. The voltage value of Li-ion cells may not fluctuate through much of the capacity range, especially at some temperatures. That’s why we always combine the OCV technique with other measurement practices for the SOC estimation in lithium battery management systems.


thod that can help you reach high accuracy in the SOC calculation provided that you’re able to fully charge or discharge the battery and correctly measure the current.
KALMAN FILTERING
This method banks on the measurements and analysis of the battery’s input and output data, such as current, voltage, temperature, internal resistance, and other parameters. Based on this data, you can use the Kalman filtering algorithm to build an electrical model of a battery, simulate its behavior along with operating conditions, and estimate the state-of-charge.
This method consists of two major steps. For starters, you enter the input data into the model and represent the physical processes running in a battery as mathematical equations. Thus, you predict the behavior of the battery and its output data by drawing on theoretical calculations.
In the second step, you measure the actual battery parameters, such as voltage and current, and compare them with the predicted values. After that, the algorithm filters or corrects the model to reduce any possible deviations. Kalman filter can take the measurements every second throughout the entire discharge or charge cycle of a battery and predict the SOC at each iteration, every time minimizing the margin of error.
Kalman filter is one of the most high-end and precise estimators used by modern battery management systems. To apply this practice, you don’t need to know the whole history of battery charging and discharging. You can only draw on the previous iteration to calculate the current battery state. The reliability of this method directly depends on the accuracy of the electrical model, including mathematical equations and the parameters you choose for these equations.
The classic Kalman filter algorithm works for systems described by linear ordinary differential equations (ODEs). For non-linear systems, you can use an extended Kalman filter (EKF) that approximates non-linearity using the first-order partial derivatives. This is an upgraded version of the algorithm that needs hardware with a higher level of performance.
The unscented Kalman filter (UKF) and central difference Kalman filter (CDKF) are the types of a sigma-point Kalman filter (SPKF), which is another modification having higher accuracy compared to EKF. For SPKF, you solve equations for a set of points offset by sigma from the initial point. Kalman filter is one of the most precise SOC estimators used by modern battery management systems. Building an accurate battery model is key to the reliability of this method.

ALTERNATIVE SOC ESTIMATORS
There are a host of other techniques that can estimate the SOC of battery cells. Some of them have already been put into practice, the others are still in the research stage or exist as concepts. When investigating the SOC determination solutions, you can come across the following methods:
- Terminal voltage method. This method consists in measuring the terminal voltage of a battery that decreases during discharge. The SOC is calculated based on the proportional relationships between the electromotive force (EMF) of a battery, its terminal voltage, and the state-of-charge. There can be a serious error in the calculations due to a sharp drop of the terminal voltage at the end of discharge.
- Impedance method. This builds upon the measurements of a battery’s internal impedance that changes throughout charge and discharge cycles. The main challenges here are measuring impedance during the battery’s operation and obtaining correct data with allowances made for the temperature.
- Neural networks. A neural network can estimate the SOC by learning from large amounts of a battery’s input data, such as voltage, current, and temperature, and reproducing the non-linear relationships between these parameters.
- Fuzzy logic. To build a fuzzy logic model, you can use any battery data available to you even if it’s abstract and approximate. After analyzing the data, the model can determine battery characteristics, including the state-of-charge. The key requirement of both fuzzy logic and neural networks is the high performance of a microcontroller.
- Ultrasonic detection. • This technique involves calculating the SOC with the use of ultrasonic guided wave technology. Wave signals may be used to assess a battery's capacity and general status because of their sensitivity in helping to comprehend the battery's internal structure. It will take a lot of time and work to put this habit into action.
In modern battery management systems, a single SOC estimate technique is rarely applied. You may combine several approaches utilising so-called hybrid metds to enhance your computations. Coulomb counting, for instance, can more accurately evaluate accuracy than the existing integration approach alone when paired with fuzzy logic or Kalman filtering.