My Pixhawk Cube Orangle flips over when autotunig

HI all,

My Pixhawk Cube Orange flips over when autotuning and it’s driving my nuts (there are couple of things driving me nuts).

I’ve mounted my brand new Cube Orange in my 450 quadcopter (TBS Discovery) where I usually set two 4S batteries in parallel. The new set up flew nicely, but with some vibrations. After try it time to autotune came… and right before one of my batteries died.

So placed order of a new battery and meantime I’ve run an Autotune using only one of them. Autotune worked pretty fine, but there were no time enough to finish up because ran out of power. Very happy, everything seemed running nice.

When my new battery arrived I’ve put it in parallel in my copter and went off home to run a new Autotune session… which took few seconds before my quadcopter killed itself by flipping over… Only a propeller broken… that one was cheap.

In summary, before 1st autotune, I’ve run some ESC calibrations. 1st autotune went well during the time it lasted (many adjustments for both, roll and pitch). 2nd autotune changing nothing but newbattery and few secound of succesfull stabilice fligh.

I’m wondering whether someone could give me a hint about the issue. Plase, see attached the corresponding log file.

Many thanks!

00000020.zip (710.2 KB)

Something wound your ATC_ACCEL_R_MAX way up. Perhaps the 1st Autotune, not sure. The Pitch parameter for this is reasonable for a craft this size. Set this equal to ATC_ACCEL_P and try again after reviewing the pre-tune basics some of which you dis not set.
https://ardupilot.org/copter/docs/tuning-process-instructions.html

1 Like

i think flip over was completely normal !
your copter was not ready for autotune, in fact it was not able to recover its self from the repeated tests run by Autotune
there is a big difference between Roll,DesRoll and Pitch,DesPitch before running autotune

also some params are wrong
INS_GYRO_FILTER is 20! 20 is for 20inch prop and i don’t think you can use 20inch prop on a 450 frame!

also it seems that your last autotune was not able to find right PIDs
values of ATC_RAT_RLL_P , ATC_RAT_RLL_I , ATC_RAT_PIT_P , ATC_RAT_PIT_I are very low for a 450 quadcopter
Screenshot_3
Screenshot_2
also ATC_ACCEL_R_MAX and ATC_ACCEL_P_MAX must be close together after a successful autotune (from my experience)

they are my PIDs with F450 frame
Screenshot_4
but i don’t recommend to set them and try to fly
complete tuning process instruction again then hover your copter in AltHold mode for 1min and send your log file to find out the reason of wrong PIDs from autotune

Thanks @dkemxr,
Having a look to logs it seems ATC_ACCEL_R_MAX where set before 1st autotune, which means it should be a default value?

Somevalues befero 1st autotune:

PARM, 85599868, ATC_SLEW_YAW, 6000
PARM, 85599893, ATC_ACCEL_Y_MAX, 27000
PARM, 85599902, ATC_RATE_FF_ENAB, 1
PARM, 85599910, ATC_ACCEL_R_MAX, 171967.5
PARM, 85599919, ATC_ACCEL_P_MAX, 108903.1
PARM, 85599928, ATC_ANGLE_BOOST, 1
PARM, 85599937, ATC_ANG_RLL_P, 10.74586
PARM, 85599947, ATC_ANG_PIT_P, 9.282674
PARM, 85599957, ATC_ANG_YAW_P, 4.5
PARM, 85599968, ATC_ANG_LIM_TC, 1
PARM, 85599978, ATC_RATE_R_MAX, 0
PARM, 85599989, ATC_RATE_P_MAX, 0
PARM, 85599999, ATC_RATE_Y_MAX, 0
PARM, 85600010, ATC_INPUT_TC, 0.15
PARM, 85600021, ATC_RAT_RLL_P, 0.06055065
PARM, 85600033, ATC_RAT_RLL_I, 0.06055065
PARM, 85600044, ATC_RAT_RLL_D, 0.002047681
PARM, 85600109, ATC_RAT_RLL_FF, 0
PARM, 85600121, ATC_RAT_RLL_IMAX, 0.5
PARM, 85600133, ATC_RAT_RLL_FLTT, 20
PARM, 85600144, ATC_RAT_RLL_FLTE, 0
PARM, 85600156, ATC_RAT_RLL_FLTD, 20
PARM, 85600169, ATC_RAT_PIT_P, 0.071692
PARM, 85600183, ATC_RAT_PIT_I, 0.071692
PARM, 85600196, ATC_RAT_PIT_D, 0.002910964
PARM, 85600209, ATC_RAT_PIT_FF, 0
PARM, 85600221, ATC_RAT_PIT_IMAX, 0.5
PARM, 85600234, ATC_RAT_PIT_FLTT, 20
PARM, 85600247, ATC_RAT_PIT_FLTE, 0
PARM, 85600260, ATC_RAT_PIT_FLTD, 20
PARM, 85600274, ATC_RAT_YAW_P, 0.18
PARM, 85600288, ATC_RAT_YAW_I, 0.018
PARM, 85600302, ATC_RAT_YAW_D, 0
PARM, 85600319, ATC_RAT_YAW_FF, 0
PARM, 85600334, ATC_RAT_YAW_IMAX, 0.5
PARM, 85600348, ATC_RAT_YAW_FLTT, 20
PARM, 85600362, ATC_RAT_YAW_FLTE, 2.5
PARM, 85600376, ATC_RAT_YAW_FLTD, 0
PARM, 85600390, ATC_THR_MIX_MIN, 0.1
PARM, 85600405, ATC_THR_MIX_MAX, 0.5
PARM, 85600419, ATC_THR_MIX_MAN, 0.1

Thanks @hosein_gh,

I’ll review all these parameters. Weird thing is that 1st autotune having default values where able to run an autotune for minutes with no a crash. It crashed next time I started an autotune in the very first roll… second after initiating autotune.

You’re right, propellers are not 20", they are 6" which I know are too small for the setup, and I’m planning to replace props, motors and ESC in a future. By now the quadcopter flight very well bearing in mind the set up and it behave pretty wellm althoutgh there is room for improvement.

BTW, which tool do you use to render these graphs? I’m using mission planner and cannot analyse properly values because label sizes are huge.

Analyzing log created BEFORE 1st autotune, I’ve found these values. There were the default ones after 1s autopilot firmware installation:

ATC_RAT_PIT_P, 0.071692
ATC_RAT_PIT_I, 0.071692
ATC_RAT_RLL_P, 0.06055065
ATC_RAT_RLL_I, 0.06055065
ATC_ACCEL_R_MAX, 171967.5
ATC_ACCEL_P_MAX, 108903.1
INS_GYRO_FILTER, 20

Im using ApmPlanner
To find out the right values of 6 inch propeller follow tuning process instruction as Dave posted before

Did you used this fc on another copter ?
If it was, I recommend to do a full parameter rest
But note that after full parameter rest you must config and calibrate everything again

The copter is based on a TBS Discovery frame and I used to have on same one a Pixhaw 1. It happened exactly the same. 1st autotune with no problems… 2nd and following one flipping over on the very first roll. For thise one I’ve followed all steps suggested here and since them all disasters started: https://ardupilot.org/copter/docs/tuning-process-instructions.html

Replaced the FC for a Pixhawk Cuve Orange and have no followed these directions… 1st autotune with no problems twitching rolls and pitch for a while… but 2nd one was a nightmare.

I’m kind of new on that and don’t command properly logs interpretation yet.

20 is default for this parameter and it can work for prop sizes in the range for a 450 frame (10-13"). I know the tuning graph shows the curve ~30Hz for 10" props but there has been some speculation about that recently. I use 20Hz on a 13" prop craft.

I have never seen this value as default for Arducopter. If you install a default Stable version of Arducopter (V4.0.3) they will both be at 110000

@dkemxr
@estresao
As i found TBS Discovery frame is not completely square so difference between pids of roll and pitch should be normal


I think he needs a manual tune to run autotune
Also looking at rate values of a hover flight could help to find out noise problems, if presents.

@estresao could you please send the log of first autotune?

Yes Hosein agreed. The ATC_ACCEL_R_MAX value still seems high though.

Note: I had a Deadcat style frame like that and never liked it. Yaw was sluggish no matter what I did and in general the response was poor. I scrapped it for an more typical X. Too may compomises made just to clear the view in the front for a camera.

Exactly
And the propellers are 6"

Thanks everyone, I’m still researching based on your suggestion but not found yet a reasonable answer.

I’ve been analysing previous logs to tell when ATC_ACCEL_R_MAX changed for first time and found it was the day before to what I call the 1st autotune. Why I say that? Because the flight corresponding to the log 00000020.zip I’ve attached previously was the 1st time I’ve intended to run a autotune. Day before I was rewiring my brand new Pixhawk Cube Orange and made no a proper flight bot some short test in my terrace to tell whether everything was installed OK. It seems the day before the “1st autotune” I’ve set autotune for a little while, probably testing the radio, so I’ve found ATC_ACCEL_R_MAX was changed before.

So, despite ATC_ACCEL_R_MAX value would be high, it didn’t prevent the “1st autotune” to run successfully, so my understanding is that the issue is on some value changed during “1st autotune”.

I’m trying to tell how to upload the log corresponding to the “1st autotune” because it size exceed for a little the limit I have.

Meantime I’ve filtered out all non autotune messages from the log to see all changes made. The attached file contains all changes made by “1st autotune”.

Log18_Autotune_Filtered.txt (43.4 KB)

Please, see here the “1st autotune” log file: https://drive.google.com/file/d/1t59TZKxhWUseKW7OR3o5qnMz233fkbvI/view?usp=sharing

This file was made intermediately after 1st autotune. It was a very short flight where I swapped to different modes and let the quadcopter hover a little while. I assume during this flight the quadcopter already had the “parameters of the dead”

https://drive.google.com/file/d/1YKfoL5F054X8DXnkcD4620lffVFxvNsY/view?usp=sharing

Yet another flipping crash today.

00000024.zip is the autotune log. Previously I’ve set back all values changed since first time I’ve powered my Cube… aka very first default values, which used to allow run autotune. As you can see it crash on first twitch.

The quad flight very stable and can keep itself for ages loitering with very small changes even in a windy day as today (I know windy is not good for autotuning, but just wanted to test if it flips againg after some changes)

00000025.zip is a flight I’ve it made after autotune crash using several modes. Last flight today was hovering for long behaving very stable and able to deal with wind keeping it self steady in a point.

I’ve made ESC calibrations… several times… but still think problems could come from here… not sure, but I’m starting thinking the issue could be on ESC.

Thanks a lot to everyone

00000024.zip (619.9 KB)

00000025.zip (847.6 KB)

when you see autotune success message on log or ground station its not meaning that PID values are good it just meaning that FC was calculated a PID