Skip to contentSkip to conversation

5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc

DISCUSSION Pavel Machek 2 participants 3 messages Jan 7, 2019 – Mar 11, 2019

lore
Share & tools
lore
#0 lore raw

Hi!

Can we do something with that code?

First -- tables should not be necceessary. Formula for li-ion open circuit voltage is well-known, and does not really depend on the device -- only on the chemistry of battery.

state of charge = f( voltage, current, internal resistance )

(And yes, internal resistance depends on temperature and health of the battery).

Second, even if we need tables, why is it doing multiple allocations?

info->ocv_temp[index] = -EINVAL;

That's just wrong. Ocv_temp is temperature in celsius. Temperatures go below zero.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 13 lines · Pavel Machek

Hi!

Can we do something with that code?

First -- tables should not be necceessary. Formula for li-ion open circuit voltage is well-known, and does not really depend on the device -- only on the chemistry of battery.

state of charge = f( voltage, current, internal resistance )

(And yes, internal resistance depends on temperature and health of the battery).

Quoted 6 lines

Second, even if we need tables, why is it doing multiple allocations?

info->ocv_temp[index] = -EINVAL;

That's just wrong. Ocv_temp is temperature in celsius. Temperatures go below zero.

Ping? That code is just bad. Does someone care?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw

Hi Pavel,

Quoted 6 lines · Pavel Machek
Quoted 4 lines · Pavel Machek

Hi!

Can we do something with that code?

Quoted 8 lines
Quoted 8 lines

First -- tables should not be necceessary. Formula for li-ion open circuit voltage is well-known, and does not really depend on the device -- only on the chemistry of battery.

state of charge = f( voltage, current, internal resistance )

(And yes, internal resistance depends on temperature and health of the battery).

As we know, experiments had proved that the OCV had a steady relationship with the state of charge for a given chemical characteristic. So many companies' charging method will use OCV table to look up the initial capacity of the battery according to the current OCV value. That's why we introduce the OCV table.

Quoted 7 lines
Quoted 7 lines

Second, even if we need tables, why is it doing multiple allocations?

info->ocv_temp[index] = -EINVAL;

That's just wrong. Ocv_temp is temperature in celsius. Temperatures go below zero.

This requirement is from Qualcomm. Since they have multiple OCV tables in different temperatures.

Quoted 2 lines

Ping? That code is just bad. Does someone care?

Sorry, I missed your previous email.
--
Baolin Wang
Best Regards