-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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 remaining inversed when compensating for load #8198
Comments
ping @davids5 |
For VTOL this would make sense if you're relying on the normalized throttle usage (https://github.com/PX4/Firmware/blob/master/src/modules/systemlib/battery.cpp#L179), but I see you have BAT_R_INTERNAL set. |
@sanderux This is still persisting, right? |
@LorenzMeier yes, it was on 4 day old master. later i dont know yet. did anything change? |
@dagar it happens with with and without r_internal |
@sanderux I'm currently revising the battery estimation here #8153. On the first glance it looks to me as if your battery estimation is always corrected using the thrust and for the factor of how much this is done you can use the parameter What you should also know is that the current estimation always adjusts the empty cell voltage for any load which results in rescaling the whole calculation. I correct the voltage measurement itself (only for the remaining capacity estimation) in my pr... If you feel like and have time you can test my pr as soon as I fixed the CI stuff and pushed the newest enhancements today. EDIT: I made my changes |
I re-checked all the math and found that it was indeed related to internal resistance that was likely wrong for this lipo. Initially i thought it was not related as it exhibited the same behavior when bat_IR was disabled. but on the bench test it did not (perhaps param didnt save in field test). Closing for now. |
@sanderux i'm be in a same situation. how does it clear? |
The battery remaining function is broken on today's master.
It increases drastically when under load (if anything it should decrease). Tested with and without setting internal resistance, both behave the same. The voltage reading does read as expected.
Log from other flight same behavior:
https://logs.px4.io/plot_app?log=7f323da0-8f75-46f1-aba9-f0a68150b691
ping @LorenzMeier @dagar
The text was updated successfully, but these errors were encountered: