The coulomb counting method is a simple and widely used technique for the lithium ion battery SOC estimation. It is based on the principle of conservation of charge, which means that the change in the SOC of the battery is equal to the net amount of charge that enters or leaves the battery. To use this method, you need to measure the energy input and output of the battery, and the charging efficiency of the battery.

**To measure the energy input and output of the battery, you need to monitor the voltage and current of the battery over time, and multiply them to get the power. Then, you need to integrate the power over time to get the energy.** For example, if you sample the voltage and current at one second intervals, you can calculate the energy per second as:

Energy (J) = Voltage (V) x Current (A)

Then, you can sum up the energy per second over the whole charging or discharging process to get the total energy input or output in joules.

**To calculate the charging efficiency of the battery, you need to divide the energy output by the energy input over a complete constant-current (CC) and constant-voltage (CV) charging cycle.** The charging efficiency is a ratio that reflects how much of the energy input is stored in the battery, and how much is lost as heat or other forms of energy. For example, if the energy input is 100 J and the energy output is 90 J, the charging efficiency is:

Charging Efficiency = Energy Output / Energy Input

Charging Efficiency = 90 J / 100 J

Charging Efficiency = 0.9

**To estimate the initial SOC of the battery when it is disconnected and no current is flowing, you need to use another method, such as the open circuit voltage (OCV) method.** The OCV method is based on the relationship between the voltage and the SOC of the battery, which is determined by the battery chemistry and characteristics. The OCV method assumes that the voltage of the battery is stable and equal to the OCV when there is no load or current applied to the battery. Then, you can use a lookup table or a mathematical model to find the corresponding SOC for the OCV. For example, if the OCV of the battery is 3.8 V, and the lookup table shows that the SOC is 50% for this OCV, then the initial SOC of the battery is:

Initial SOC = SOC (OCV)

Initial SOC = 50%

**However, the OCV method has some limitations, such as:**

• The OCV of the battery is not constant but changes with temperature, aging, and hysteresis effects.

• The OCV of the battery is not stable but takes some time to reach equilibrium after charging or discharging.

• The OCV of the battery is not linear but has a flat region where the voltage does not change much with the SOC, making it difficult to estimate the SOC accurately.

**Some other methods that can estimate the initial SOC of the battery in a no-load condition are:**

• The impedance method, which measures the internal resistance or impedance of the battery, and relates it to the SOC using a lookup table or a mathematical model.

• The entropy method, which measures the entropy or disorder of the battery, and relates it to the SOC using a lookup table or a mathematical model.

• The machine learning method, which uses artificial intelligence algorithms to learn the relationship between the voltage and the SOC of the battery from historical data, and predicts the SOC using the voltage as an input.