# Charging Batteries: Estimating SOC using a Voltage look up table

I am charging a battery using constant current. This battery can have voltages from 2.5V to 3.6V. I have characterised the battery, as in found the voltage Vs SOC (state of charge) for the battery. There is only 1 problem. Internal resistance of batteries.

If you charge the battery up to 3.6V, you will loose some volts to the internal resistance, in my case this goes down to 3.4V. Then for some reason, when I discharge the battery to 2.5V and then begin to charge it, it immediately rises to 2.9V.

My data suggests that chagrining the battery from 2.5 to 3.6V results in 100% state of charge. ie 2.5V is 0% SOC and 3.6 SOC.

When charging, the range is 2.9-3.6V which would imply 2.9 = 0% SOC, 3.6V = 100% SOC

When discharging, the range is 2.5-3.4V which would imply 2.5V = 0% SOC, 3.4V = 100% SOC

I know that some people will suggest that you must charge the batteries using constant voltage such that you could "fully" charge the battery say after 3.6V. The problem with this is that the batteries are charged using PV cells which means I am employing an MPPT algorithm to adjust the voltage to deliver the most power to the batteries so this is not an option.

How exactly can I overcome this problem? How do I properly change the look up table to accurately estimate the SOC and account for the internal resistance?

• It seems like the best thing to do would be to charge your LFP battery the same way all other LFP chargers do it. But in theory, resistance can be compensated for if you monitor charge current and charge voltage. The voltage drop due to resistance is Icharge * resistance. However, I don't think the battery can accurately be modeled purely as a voltage source and a resistance. As you have discovered. Commented Jun 6, 2021 at 0:40
• @mkeith Thank you for your post. I am unsure what you mean by the same way all other LFP chargers do it? I have seen many projects using some kind of lithium batteries and PV charging etc, yet none of them mention this problem.
– fred
Commented Jun 6, 2021 at 0:47
• They charge to a specific voltage then stop charging. But you started out by saying you don't want to do that. Commented Jun 6, 2021 at 0:50
• I also charge to a specific voltage, it just falls to 3.4V due to the internal resistance. From my previous questions I discovered that to fully charge a battery you need to use a combination of CV and CC. The only issue is that when the battery is being charged using a PV cell, you need to regulate the voltage to do MPPT so you could get the most power out of the sun light which makes this redundant.
– fred
Commented Jun 6, 2021 at 0:53
• You have two lookup tables, for charging and discharging, always use the correct one, and take current and internal resistance into account. Even so, voltage tables are still a poor choice for accurate LFP monitoring.
– user16324
Commented Jun 6, 2021 at 10:50

The problem with this is that the batteries are charged using PV cells which means I am employing an MPPT algorithm to adjust the voltage to deliver the most power to the batteries so this is not an option.

MPPT is only useful when the load can take all the power being harvested. If the battery has already reached its maximum permitted voltage then you have no choice but to limit the voltage and let the current settle at whatever amount the battery wants to absorb.

But this isn't a problem, because by the time an LiFePO4 battery reaches 3.6 V it is already fully charged (assuming reasonable charging current).

How exactly can I overcome this problem? How do I properly change the look up table to accurately estimate the SOC and account for the internal resistance?

State of charge is primarily determined by how much current has gone into or come out of the battery. Monitoring voltage alone is a poor way to estimate SOC except at the ends when the battery is close to full charge or discharge. So you should monitor voltage to determine when the battery is fully charged or discharged, then 'count coulombs' to estimate how much charge it has in between these points. This will work accurately even though voltage varies at different charge/discharge currents etc.

If you want to estimate the time a device will run for on the charge remaining then you may need a lookup table which contains both voltage and internal resistance, especially if the device uses a switching power supply that draws more current as the voltage goes down. This can be calibrated to your battery based on previous discharge data.

• abbot, I am currently doing the current counting technique. The problem is that for the current counting technique, you need to know how much the initial SOC is. So what I am trying to do is. Use a look up table to find the initial SOC before the battery is charged/discharged and then after that SOC is calculated using current counting technique.
– fred
Commented Jun 6, 2021 at 1:42
• The current counting technique is not capable of finding the initial SOC
– fred
Commented Jun 6, 2021 at 1:45
• The coulombic efficiency of a lithium battery is very close to 100%, so if you measure charge accurately you know how much is put in and taken out. The only thing you don't know is what the state of charge was at the beginning. If you charge to 3.6V then you know the battery is full, discharge to 2.5V and you have the usable capacity. From that time on you can 'coulomb count' to keep track of what charge is in the battery. This will be more accurate that just using voltage to estimate capacity (which varies greatly depending on current and 'settling time' when current changes). Commented Jun 6, 2021 at 6:40
• As an analogy, imagine the fuel gauge in your car is sticky and unreliable (I had a car like that), but you know it gets 10km per liter. So you put in 10l and drive, noting the distance traveled. When you have done 100km you know it is close to empty so you put in another 10l. I drove my old car like that for years, and I do the same with my Leaf (which grossly overestimates range until the battery is almost flat). I know it does 6.5km/kWh, so if I put in 2kWh I know it will do the 13km round trip to work and back, and be back where it started when I get home. Commented Jun 6, 2021 at 7:05