-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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
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.
@MaEtUgR What, if any, docs are required for this>? |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).