Tuning Heavier Quadcopter - Strange behaviour in Loiter

Hello,
We are in the process of tuning a large (1m/T-motor U10II KV100/29x9.5" prop/ Alpha 60A 12S) quadcopter with an AUW of 14 KGs. For initial tuning, to achieve stable hover we followed the Tuning Process Instructions. The thrust expo was set to 0.1 and INS_Gyro and Accel filters were set to18Hz. After getting a stable hover flight, Harmonic Notch was set and Autotune Autotune was performed in calm weather with little to no wind. The AGGR was set to 0.1 and autotune for each axes was done seperately. The following gains were obtained as a result:

ATC_ACCEL_P_MAX,56413.14
ATC_ACCEL_R_MAX,61027.36
ATC_ACCEL_Y_MAX,13308.42

ATC_ANG_PIT_P,6.331952
ATC_ANG_RLL_P,7.330026
ATC_ANG_YAW_P,5.698756

ATC_RAT_PIT_D,0.001093843
ATC_RAT_PIT_FLTD,10
ATC_RAT_PIT_FLTT,10
ATC_RAT_PIT_I,0.08437172
ATC_RAT_PIT_IMAX,0.4
ATC_RAT_PIT_P,0.08437172

ATC_RAT_RLL_D,0.002024285
ATC_RAT_RLL_FLTD,10
ATC_RAT_RLL_FLTT,10
ATC_RAT_RLL_I,0.1043671
ATC_RAT_RLL_P,0.1043671

ATC_RAT_YAW_FLTE,1
ATC_RAT_YAW_FLTT,9
ATC_RAT_YAW_I 0.1120059
ATC_RAT_YAW_P 1.120059

After AutoTune, ATC_THR MIX_MAX was set to 0.9 and flight was done. It felt a bit extra sensitive to RC input which was resolved by increasing input_tc to 0.25. However, in loiter mode during horizontal movement, the copter was acting very strangely. During horizontal movement, when stick command was given the copter would initially gain speed and then brake suddenly for a brief moment and then continue forward causing an oscillatory type of behavior. From a pilot perspective, it felt like, the copter was not able to maintain its speed or angle and braked when it exceeded the set limit.
The flight log is attached below:
https://drive.google.com/file/d/1KcYZ0wma5pwHF-5Lrl_Iqf5HN5dcFGb9/view?usp=sharing

Any help in this regard would be very much appreciated
Thank you.

How did you come up with the expo value of 0.1?

You have LOIT_ANG_MAX at 8° and LOIT_SPEED at 1500 cm/s. I have never seen an ANGLE_MAX and LOIT_ANG_MAX set so low but if you want to keep it there lower the Loiter speed.

Because T-motor Alpha ESC are reportedly linearized and i have seen a lot of people recommending a thrust expo value of 0.2 or lower for these ESCs

1 Like

I also did a flight high values for Loit_Ang_Max and Angle_Max setting them at 15 degrees. Unfortunately the log of which is quite big but if you want i can upload. In both the cases the behavior was the same.

Try lowering the Loiter speed. Fly in Loiter for a extended distance at max throttle with whatever ANGLE you want. Then review the log and determine what speed is achieved. Then set it to that.

I tried that too. I set the angle to 15 degrees and set the loiter speed as low as 5 m/s but the loiter still behaves the same. Whenever stick response is given, the copter starts gaining speed till the set limit and then brake’s suddenly for a short amount of time and then reaccelerates causing an oscillatory behaviour.

15 degrees and 8 degrees seem like very small angles, what happens if you try 30 degrees?

The odd thing is desired pitch is very closely tracking actual pitch,as if the behaviour is being forced by some input rather than a controller error. But it’s not RC input causing the issue, I can see that much.

Reduce the number of constellations to help the update rate be consistent
GPS_GNSS_MODE,65

The harmonic notch filter is only working once you are well over hover thrust, try this:
INS_HNTCH_REF,0.375
and I believe you had the frequency wrong too
INS_HNTCH_FREQ=40
INS_HNTCH_BW=20
I’d probably run Autotune again if those params work out OK

For reference these are my normal Loiter params
LOIT_ACC_MAX,600
LOIT_ANG_MAX,0
LOIT_BRK_ACCEL,300
LOIT_BRK_DELAY,0.3
LOIT_BRK_JERK,300
LOIT_SPEED,1528
Speed depends on the particular aircraft and purpose, as does anglemax.
LOIT_ANG_MAX at 0 defaults to using ANGLE_MAX

2 Likes

Then I would try as Shawn has suggested or default for all (ANGLE_MAX and the Loiter parameters). and start over.

1 Like

Thank you for your valuable input.

I have tested it max till 15 degrees due to fear of flipping but I will carefully test it at 30 degrees.

Yes you are right I got the notch wrong initially but yesterday I set it at 38 with BW set to 19 and behaviour was the same. The tuned gains were a little bit lower than these but nevertheless I will try all your suggestions and post the log. Thanks

Okay thank you I will incorporate the suggestions and post the log.

A quad won’t flip simply from a Max Angle setting. I have a couple set to 80° and they don’t. Of course I’m not advocating that, the 30° default should be fine for that craft. Default used to be 45°.

Hi,
I did a flight today by incorporating the parameters suggested by @xfacta
GPS_GNSS_MODE, 65
INS_HNTCH_REF,0.375

ANGLE_MAX and LOIT_ANG_MAX increased to 25 degrees.
Loit_speed was set to 1200
LOIT_ACC_MAX,500

After this i did autotune with AGGR set 0.8 and the copter felt much better during horizontal motion. I have attached the logs. It is still a bit reactive especially during descents and at high wind but overall flight has improved significantly. What other steps can be taken to improve?

Log File

Thank you for your time.

Aggression set to default (0.1) and run Auto Tune again. It may help with Roll overshoot:

Or set the Roll P&I equal to Pitch because Pitch looks better. This can be the problem with an aggression level below default. Low Rate PID’s.

1 Like

I think if you use the U10II motor data with Motor Thrust Scaling, MOT_THST_EXPO should not be 0.1. I think.

My case is around 0.8 with U10II 12S G30" propeller, PWM range is 1100 - 1920 (T-Motor support told me).

2 Likes

Okay I ll do that and post a log if weather clears.

What ESC are you using? How is the flight at 0.8?

I do not think got to do with the ESC. we use both T-Motor Flame 60a and 80a (overkill)

I believe you have used the initial parameters to begin the setup. For 29", it suggested 0.8 to start, then you calibrate the excel sheet. Then MOT_THST_HOVER should achieve below 0.25 value from learning for analogue ESC.

The reason i am using expo 0.2 because the alpha 60a ESC are linearised andif you search thorugh the forum you will find a number of examples. Initially I started tuning with expo at 0.8 but the results were not very good.

1 Like

Hi @dkemxr, did a flight today as you suggested with aggression set to default (0.1). The gains and accels after AUTOTUNE came out a bit a higher than before. The copter flew well. I tested it in guided and Loiter modes. The attitude tracking looks much better now. Is there anything that could be done to improve it further?
One thing I observed in all logs was that the copter loses altitude of approx. 1 to 2 meters when flown at high speeds. I have set the ATC_THR_MIX_MAX at 0.8,0.9 but still it remains the same.

Log File

Thank you for your input. it is very much appreciated.