Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery: default to electrical current based load compensation #19429

Merged
merged 4 commits into from
May 23, 2022

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Mar 31, 2022

Describe problem solved by this pull request
A lot of users get to the conclusion that the default compensation based on the normalized throttle is very unprecise to not say completely wrong in most cases. The default value also often overcompensates and makes the battery look more charged than it actually is already in hover conditions. As a result batteries get deeply discharged and degrade quickly.

Describe your solution
I'm suggesting to already by default compensate using electrical current if it's available. As a default value for the internal resistance of a battery I took a conservatively low value of 5mOhm which will be correct for a good healthy battery and needs to be adjusted for an older or less efficient battery.

Test data / coverage
Based on feedback from our testing team the lower load compensation based on throttle is pretty important because the overcompensation leads to most deep-discharged battery cases. The current based compensation we know it works but it wasn't enabled by default because some users don't calibrate their current sensing and the internal resistance wasn't even accurately configurable. But to be honest I still think they get a better result if we enable a small compensation by default which then works nicely for users with proper current sensing.

As further improvement steps it would be even better to only use current sensing if it's also known to be accurate/calibrated and estimate the internal resistance of the battery (@RomanBapst had a prototype for that).

than over compensate which makes the estimate to high and breaks batteries
beause they get flown for too long.
instead of disabling the load compensation using current.
@MaEtUgR MaEtUgR self-assigned this Mar 31, 2022
@MaEtUgR MaEtUgR requested a review from RomanBapst March 31, 2022 12:36
@MaEtUgR
Copy link
Member Author

MaEtUgR commented May 23, 2022

In our testing, this works exactly like expected and I even have some follow-up suggestions for the battery estimation configuration defaults by now which we were recently testing.

@MaEtUgR MaEtUgR merged commit 62edcc7 into master May 23, 2022
@MaEtUgR MaEtUgR deleted the battery-current-load-compensation-upstream branch May 23, 2022 14:40
MaEtUgR added a commit that referenced this pull request May 23, 2022
Based on feedback that very often the battery is used down too low.
I observed this happens consistently when the cell voltage is properly
load compensated. The default load compensation before #19429 was very
inaccurate and resulted in unpredictable estimate.
After that if there is a usable current measurement and the battery is
within expected tolerances of the default internal resistance the
compensation is pretty good and 3.5V is too low for an empty compensated
cell voltage. That was seen in various logs where the compensated
cell voltage was already dropping fast after 3.6V.

In case the voltage is not load compensated the vehicle estimates the
state of charge a bit too low which is safer than to high
especially for a default configuration.
MaEtUgR added a commit that referenced this pull request May 24, 2022
Based on feedback that very often the battery is used down too low.
I observed this happens consistently when the cell voltage is properly
load compensated. The default load compensation before #19429 was very
inaccurate and resulted in unpredictable estimate.
After that if there is a usable current measurement and the battery is
within expected tolerances of the default internal resistance the
compensation is pretty good and 3.5V is too low for an empty compensated
cell voltage. That was seen in various logs where the compensated
cell voltage was already dropping fast after 3.6V.

In case the voltage is not load compensated the vehicle estimates the
state of charge a bit too low which is safer than to high
especially for a default configuration.
@hamishwillee
Copy link
Contributor

@MaEtUgR What, if any, docs are required for this>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants