I've been testing the effect of different cruise airspeed settings on power consumption, but in the range that I've been testing (8m/s, 9m/s and 10m/s) it has almost no effect on actual airspeed (or power consumption).
I've been flying a lap about 1.5km long, and changing the cruise airspeed each lap.
Working with the log files afterwards the average of the airspeed for each lap shows little or no relation to the cruise airspeed setting.
(Before you ask, yes I changed the setting in the Arduplane Pids screen AND clicked Write. It is recorded in the tlog file with a mavlink_param_set_t entry).
Below is a table of measurements taken from the log file. The first column is the cruise airspeed setting for each lap. The next columns are the average values for the named variable taken from the tlog file. The final column (Watts) is just current * voltage.
The only reliable effect that I've measured is alt_error. It's lower at high speed settings. Obviously the plane doesn't fly any faster, or use significantly more power to achieve that. (I've done this test three times now and I got a similar result each time.)
Do I need to change the THROTTLE_CRUISE percent value too? What does this do? Why is there a THROTTLE_CRUISE (%) and AIRSPEED_CRUISE (m/s) setting?
(I'm flying a Bormatec Maja with APM 2.5 and airspeed sensor).
Probably that table is more complicated than it needs to be.
My main point is that there is little or no correlation between the AIRSPEED_CRUISE setting (first column) and the actual airspeed (second column as recorded in the tlog file).
Anyone know the details of the differences between THROTTLE_CRUISE (%) and AIRSPEED_CRUISE (m/s).
Is this forum the right place to ask this question?
I have the same question. What's the difference?
I have the same cuestion.
Have you looked at the stall speed of the plane? It may be that the underlying APM control is not allowing the attitude to deviate towards a stall, and is therefore putting a floor on the airspeed you can achieve.
Relating more to your previous post on reducing airspeed - can you achieve the desired low speed when flying manually?
Could you therefore notice more of a separate effect of airspeed/throttle setting at higher speeds?
I am afraid this matter is significantly more complicated than it appears.
First of all I assume you are using the "airspeed throttle control" (which is the default one).
In the airspeed throttle control tries to reach target *energy* needed to sustain flight on the target altitude. It is assumed that in order to keep proper altitude there, pitch controller will force the plane to go done. Pitch controller does that in two loops: first of all it calculates the necessary nav_pitch angle that is needed in order to reach necessary airspeed. Then based on nav_pitch, another PID controller evaluates what should be the real pitch (servo movement) in order to reach the set nav_pitch.
That has some important effects:
- energy can be achieved by increasing altitude or increasing speed; This means all PIDs controllers can be happy (=in a stable situation) when plane flies too high and too slow and when pitch is not adjusting that.
- if there is not enough airspeed achieved (e.g. cruise speed is set to 50m/s and plane max is 15 m/s), nav_pitch will be set to max negative and plane will crash very fast
- airspeed has effectively top authority (even over altitude)
There are several problems possible that make airspeed control not working fine:
1. Airspeed may be not achievable by the engine at all; in fact the airspeed cruise that is set should be set so that even when pitching up it can be achieved. Remember that this has to work fine also when batteries are at 20% (not fully charged).
2. Pitch controller (translating from nav_pitch to target_pitch) may have not enough authority on control surfaces.
In your case it looks like the 2nd problem, that is there is not enough authority on the pitch controller. I recommend increasing significantly (x2) P factor for for altitude airspeed P controller. To confirm that this is this problem you could observe nav_pitch and actual pitch when being in FBW-B mode. They should more/less match.
As to your question of throttle_cruise: it is not used (to my knowledge) when on airspeed control. It is only used when on the "old" control.
Last but not least - after long time of experimentation I have switched back to the "old" altitude control mode - it is much more logical, easier to tune, stable, and has not so many gaps as the airspeed. In the 'old' altitude control you in fact set the throttle_cruise and then when you pitch up the throttle is automaticall scaled in a linear way up (e.g. when you command 50% stick-pitch up on FBW and have max pitch 20% and throttle cruise 40% and throttle max 100%, the plane will go with throttle 70%, nav_pitch 10%).
The 'old 'method has two significant disadvantages:
- under heavy wind conditions it does not support ground speed undrshoot; this means your plane can fly at 40% but effectively do not move over ground; this is no problem for fpv, but for full autonomous flight it is
- if you tune max pitch wrong (e.g. set it to 80%) the plane may stall; having said this you must be sure that under the max thrrottl you set, and under max pitch the plane will fly okay; similarly for min pitch and min throttle (e.g. on -20 pitch and 0 throttle the plane should not stall at all); this is however usually fairly easy to tune and test
I hope it helped a little.
Thanks so much for your info. You are right it is complicated. I've read your info a few times and I understand more each time.
Which is the PID that I should adjust? Do you mean ALT2PTCH_P, or ARSP2PTCH_P?
If I compare my PIDs to the DIY drones configuration values:
my ALT2PTCH_P is higher (I have .85 compared to the recommended value of .65)
my ENRGY2THR_P is lower (I had .25 compared to the recommended value of .5)
I had adjusted those both in order for the plane to achieve target altitude more by pitching up, and less through increasing the throttle.
I'll try flying at the desired low speed in manual or stabilize to verify that it can be done. I know in FBW-B it uses much lower power, but gradually loses altitude. I'm going to try putting my ALT2PTCH_P and ENRGY2THR_P back to the default as above and see if that helps it hold altitude in FBW-B.
And I'll try the same lap/speed test over a higher range, perhaps 10,12 14ms and see what happens.
ARSP2PTCH_P is used for airspeed control.
ALT2PTCH_P is used for "old" control.
If your plane gives max power but still goes down, I would bet the target airspeed is NOT reached. Keep in mind always that airspeed has effectively priority over altitude. That means if it is not reached then the plane will behave like this.
If the airspeed is reach (airspeed_error = 0) and the plane still does not want to pitch up, then you need to give more pitch authority. I think this is ARSP2PTCH_P (not ALT2PTCH_P).
It seems like you guys know airspeed control rather well. My goal is to hold a constant airspeed and currently it fluctuates about 0.2 m/s for every 10m/s of airspeed. How can I get arduplane to more accurately and concisely hold an airspeed?