Soaring/Gliding for Planes

OK, then SOAR_POLAR_LEARN is mising?

Correct, that feature isn’t merged yet. If you need that feature I can do a new set of builds including that and upload to the google drive - let me know.

Why has it been decided to eliminate this parameter? Are the default values valid for most gliders?

I would like to test it on Matek F405 wing and Omnibus F4pro.

Thanks

It’s not eliminated, it’s just that the feature it isn’t ready to merge yet, it needs more testing. It learns the values of the SOAR_POLAR_* parameters, which are specific to the glider aerodynamics. The parameter can be estimated manually though, given good test data.

ok, understood

thanks

Hi, Samuel_Tabor,
I am trying to fly my glider using the ArduSoar.
Through its set up and tuning, I found one basic question and posted it on Plane 4.0 community but have no response yet. I believe it is very fundamental and important question. Could you provide me your comment?
Question about the value of RLL2SRV_TCONST - ArduPlane / Plane 4.0 - ArduPilot Discourse

Hi Samuel,
Thank you for your kind advice.
I flew my glider but had a strange behavior. This is the flight log.
https://drive.google.com/file/d/18yVvg_EDhw23fE1fPs5dPEpF34wbAR8U/view?usp=sharing
It happened during AUTO mode when the glider was climbing with motor on. Soon after the glider passed a waypoint, it suddenly turned very tightly. The turning radius was about 3.3m and the bank angle was around 80 degrees.
It was so tight turn I changed the flight mode during the third turn and escaped from the turn. Below is the time history.


During the turn ATT.DesRoll oscillates quickly between -50deg to +40deg but ATT.Roll could not follow it.

Could you teach me why this strange behavior happend and how I can treat it?

Hi @RCnorm, Can you grant access on the log so I can take a look?

Hi Samuel,
I believe you can open the file by clicking below. https://drive.google.com/file/d/18yVvg_EDhw23fE1fPs5dPEpF34wbAR8U/view?usp=sharing

Thank you

Hi @RCnorm

It looks like your plane is weaving quite badly especially when the motor is running. I’d suggest to first try increasing NAVL1_PERIOD to smooth this out.

Hi Samuel

Thank you. I will test it later following your sugestion.

Hi Samuel,

I tested my glider with corrected parameters and succeeded the auto soaring, but there remains one question or doubt.
I set parameters as below,
NAVL1_PERIOD=25
WP_LOITER_RAD=-11
LIM_ROLL_CD=4500
TRIM_ARSPD_CM=10
You can check other parameters data by clicking below.
https://drive.google.com/file/d/1bu0B4oozFt1A1foPEiM7Xpg78L9jd-tI/view?usp=sharing

My question/doubt is loiter radius. I set it as 11m following the equation of
r=V^2/(g・tanΦ) where I set V=10 and wanted bank angle Φ=43 degrees.

Actual radius is around 25m as you can see in the following flight path data.


The dashed white rectangular has 135m×300m length.

Airspeed is just 10m/sec as I set it.

But the desired and actual roll angles were around 22 degrees.

Desired roll angle is a half of what I intended and Loiter radius is double of what I intended.
It seems as if there is confusion between radius and diameter.

How do you think this flight data?

Hi @RCnorm

It looks like the NAVL1_PERIOD is now too long to allow a turn as tight as 11m. To get a tighter circle you will need to reduce this, but previously we saw problems with weaving. Have you done an autotune on this aircraft? The roll control looks quite loose which is probably why you needed to increase NAVL1_PERIOD.

Here’s roughly a minute of roll control from your plane:

And here is an example from a tuned plane:

As you can see in your log the roll follows the demand but with quite a lot of error and overshoot. If you can improve this, you should be able to reduce NAVL1_PERIOD without the weaving coming back, and the circles will improve.

I suggest you take a step back and get LOITER mode to produce the circles that you want, and AUTO mode following waypoints precisely, before enabling soaring.

Sam

Hi Sam,
Thank you for your quick response.
Yes I am also feeling the roll response is too slow, although I have done an autotune on this glider. Below is the log of the autotune.
https://drive.google.com/file/d/1xMlehQBplpTeqlon2HNm1vTVJiVy_Ceo/view?usp=sharing

Your roll data looks very responsive. Is it a small aircraft? How long its wing span? My glider has 3.2m wing span.

I want to test it in LOITER and AUTO modes but I don’t know how to stop the motor during these flight modes. Could you teach me how to set for gliding in these mode?

Hi @RCnorm

My plane is a 2.6m ASW28 - so a little smaller than yours. However good roll tracking should be achievable on any plane with reasonable aileron authority.

Looking at your autotune log, it looks like the roll gains weren’t adjusted much. I’m not an expert in how autotune works, but I think this is because the default maximum roll rate of 75 degrees per second is much higher than your plane can achieve. Unfortunately this isn’t automatically adjusted during the autotune. This resulted in full aileron being applied during the autotune to try to achieve this high roll rate, and the gains are not adjusted when full control is being applied. I suggest reducing this parameter RLL2SRV_RMAX to 30 (degrees per second) and re-running the autotune.

BTW your autotune technique is great as you are getting full max rates demanded, it should work great once RLL2SRV_RMAX is adjusted.

Demanded and achieved roll rates:

Aileron output:

Roll controller P gain:

Sam

Hi Sam,
I am very much appreciated your kind support.
I will try Autotune once again with RLL2SRV_RMAX=30.
By the way could you teach me how to stop the motor during LOITER and AUTO mode?

Norm

Hi Norm,

No problem. In AUTO you can plan a mission with a a descending path to stop the motor. I’m not sure if LOITER support changing altitude, but GUIDED mode does and is otherwise very similar.

Hi Sam,
Why didn’t I think of this!? I will try it soon.
Thank you.

Hi Sam,
Today I re-conducted the Autotune with the parameter RLL2SRV_RMAX=40 with the AUTOTUNE_LEVEL=6.
The RMAX parameter was set slightly bigger than that of 30 you had suggested to me because I increased airlon travel a little bit.

When I downloaded the log data, I found very strange data.
The RLL2SRV_MAX value was changed automaticaly to 75 and roll tuning was done only 2 times, while pitch tuning was done more than 10 times.

At first the ArduPlane set same PID values both for roll and pitch. They were,
P=1.34 D=0.101 I=0.112

The final PID values are,
P=1.407 D=0.106 I=0.112 for roll
P=0.874 D=0.0655 I=0.112 for pitch

You can check the log data by clicking below.
https://drive.google.com/file/d/1V_g2kmVUq5VkZWMVBZztHZV3lK0RYsJt/view?usp=sharing

I conducted 2nd AUTOTUNE flight with RLL2SRV_MAX=35. This time only roll tuning was tried.
By checking the flight log I found there is no effective gain change.
https://drive.google.com/file/d/1qoJoeuhqze8YVejMnLaGLIgDFfANRB4_/view?usp=sharing

Could you give me your comment?

Norm

Hi RCNorm,

Looking a little deeper I now see that the RMAX parameter is automatically set at the start of auto tuning based on the AUTOTUNE_LEVEL parameter. This is actually described here but unfortunately the actual rates are not documented outside the code. I’ll fix that but in the meantime the appropriate level for your aircraft would be level 3 or level 4 (30 or 40 deg/s). The default setting of 6 corresponds to 75 deg/s as you have observed. If you set this parameter to 3 or 4 before your next attempt you should get better results. Sorry for the confusion, I did say I wasn’t an autotune expert :slight_smile:

In the second flight it looks like you were in FBWA rather than AUTOTUNE (except for one very brief period) so that explains lack of gain changes, however autotune would have re-set the RMAX parameter anyway just like in the first flight.