At the moment still not working well is the throttle scaling over battery voltage.
So, as the battery voltage decreases over flighttime, the throttle must increase, to keep the same thrust (and airspeed).
At the moment, if I adjust the throtte for full battery, the plane flys slower and slower over longer flighttime, even until stall. I must increase FW_THR_CRUISE when battery voltage gets lower.
I know, that using an airspeed sensor would do this better, because it simply keeps the airspeed constant by increasing the throttle.
Is there a way to solve this without airspeed sensor?
I found FW_BAT_SCALE_EN is 1 on my plane already (Def.:“Whether to scale throttle by battery power level”)
So this sound like it should do the job, but it doesn’t. Or too little.
How can I increase this functionality?
I tried to adjust up and down BAT1_V_CHARGED (4.2V) and BAT1_V_EMPTY (2.8V) but couldn’t see an improvement. I use a LiIon battery BTW, which looses more voltage than LiPo, maybe that’s why I need the stronger scaling.
Yes indeed, FW_BAT_SCALE_EN together with a good battery estimation should normally do the trick. You can find the applied scaling factor in the an uorb topic: battery_estimation.scale.
How does that field look for your tries? And how is battery_status.remaining?
thanks for your answer, I studied through my older Logfiles in the meantime, and found something interesting:
It seems the throttle scaling worked in an older Log from 2024 (Log75 attached), and just didn’t work in my newer flights anymore.
Log75:
34min Flight with a simple 1 waypoint mission, fly out and come back. That’s why the groundspeed changes a bit at halftime, that’s the turnaround at waypoint1.
Voltage dropping from ~12,0V to ~10,0V at the end.
Batt.remaining goes from 92% to 55% at the end
(Batt params were: BAT1_V_CHARGED 4.05V, BAT1_V_EMPTY 2.8V)
Batt.scale increases from 1,03 to 1,18, so that looks good!
But I don’t see the result of it, to increase the thottle.
Throttle-output:
actuator_output [3]: I expected this to be the right output (I scaled it from 1000…2000PWM down to 0…1 for this diagram)
it stays at 0,4 during all the flight.
actuator_controls [3]: this one increases over flighttime, from 0,5 to 0,55; (this parameter is in range 0…1 originaly, so no scaling added here in the diagram).
So this looks promising, but is this parameter really the throttle output?
actuator_output [2]: strangely this channel2 behaves exactly like actuator_controls [3]. Usually I would expect throttle to be ch3, and elevator ch2, but maybe in this case ch2 is throttle!?
Log 76:
In this plot you can see the decreasing airspeed over flightime, which I mentioned earlier.
But I found another interesting thing: in the Logs almost all BAT parameters are missing!
The attached diagram was created with the same plot settings as Log 75. Much less curves, because much less BAT parameters were logged. The reason might be:
At this time I changed BAT1_SOURCE from 0 to 1. I remember I had problems to display the battery-voltage in QGC at this time.
Seems to me this change was the mistake!
Also in the parameter-file, there are much less parameters. In the list below there are not more BAT parameters, only these few!
So way less than in Log75. I expect that’s the reason why also not more BAT parameters are in the logfile.
Can you confirm that actuator_controls [3] and actuator_output [2] are both throttle outputs, even if the numbering is strange?
That depends on your vehicle setup. actuator_controls [3] used to be the throttle channel if I recall correctly (that was changed some years ago), and actuator_output [2] is simply the 3rd output pin of you flight controller. Are you using PX4 v1.12.3? Please update to v1.15 or even 1.16.
Can you summarize else you need help on? It gets a bit confusing to me. If you could attach a flight log I could maybe more easily spot the issue.