# What are different battery capacity algorithms used? [closed]

I need to implement an algorithm to know the capacity of a battery. I don't want to use any external gauges which are available on the market.

1. Can you suggest which algorithm(s) is/are popular?
2. Can we implement any algorithm ourselves?

## closed as too broad by Elliot Alderson, awjlogan, Finbarr, Dave Tweed♦Oct 7 '18 at 22:45

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

There is as far as I know:

• Coulomb Counting, where you integrate the current, flowing into or out of the battery.

• Voltage Measurement, where you measure the voltage of the battery

• IT - Impedance Tracking,

• CEDV - Compensated End of Discharge

Point 3 and 4 are found with TI Chips bq-something.

I know a lot of older E-Bikes use coulomb counting and OCV measurement in parallel, where CC is the primary gauging and OCV a backup verification process.

CC consists of the actual coulomb counting algorithm and a teaching algorithm, which calculates the Full Charge Capacity based upon End of Charge Voltage and End of Discharge Voltage.

Edit: Cheap chinese manufactured batteries only rely on Voltage measurement, although this method has a large margin of error, depending on the load.

• thank you alexander ,can we implement ourselves without any ic's in any microcontroller? – mani Oct 5 '18 at 9:57
• @mani CC and Voltage you can implement yourself, you only need one or more ADCs. – Alexander von Wernherr Oct 5 '18 at 9:58
• @mani For the Voltage measurement type you need the discharge curve of the battery, you can receive it from your supplier (normally) – Alexander von Wernherr Oct 5 '18 at 10:00
• which algorithm is more accurate and why ? – mani Oct 5 '18 at 12:30
• @mani Don't ask new questions as a comment, create a new question or edit the existing question. – Elliot Alderson Oct 5 '18 at 12:47