Please could someone help analyse this Autotune/Pixhawk crash?

Was flying perfectly well on stock PID settings but wanted to see if autotune could improve things.

About 3 minutes into the tuning whilst still on the first axis it suddenly flipped over and crashed without any warning. It looked like an overly aggressive roll command caused it rather than a motor cutting out or stalling. Conditions were calm at the time.

It had completed about 90% of a previous autotune without incident but didn't have enough battery to finish, was in the air for about 15 mins without incident in autotune mode but had to land.

Sent it up again with a fresh battery, this time without any payload to help ensure sufficient flight time to complete tuning on single lipo (New C of G was accounted for by shifting lipo position) and the crash happened.

RATE_RLL_FILT_HZ and RATE_PIT_FILT_HZ were set to 10hz as recommended for larger props and battery voltage scaling of PID gains was setup..

Spec:

Pixhawk on a 900mm Y6 frame with T-Motor 4008-18 380v motors, 10000mAh 6S lipo, 15" props.

If anyone fancies looking at the log, it would be most appreciated - I've checked a few things but still unsure on the exact cause - possibly the default AUTOTUNE_AGGR parameter which I left alone as per the instructions was simply too high?

210.BIN

Views: 904

Replies to This Discussion

i dont know too much about log´s.. What do you think that "fence" error in your bin file is ? 

Attachments:

I'm not sure - I was within the geo fence that was previously setup, so not sure if it somehow thought it was hitting the geo fence, or if the error actually means something completely different. If it is geo fence related, I still don't understand the way it behaved.

when i was tuning my px hexa, i had coupple of weird crash with autotune, decided not to use it at all. Yeah, if it was hitting gf, it should not defenetly crash, tho your px was on at mode,so who know´s? i think i cant help u too much, but i will be following the thread, im curious about this issue. Hope you find a solution :)

I certainly won't be using it again - had a pretty expensive crash! 

Thanks for your help :)

Hi Ben,

I took a look at your log and it looks like yoor copter has breached the circular fence, in the image below you can see that in your log the only error that occurs it is related to the fence and ecode is 2

9: Fence

ECode 1: altitude fence breached

ECode 2: circular fence breached

ECode 3: both altitude and circular fences breached

ECode 0: vehicle is back within the fences

You should use autotune trying to get back the copter manually all the times it drifts away, once you are back more or less on the starting point release the sticks and autotune will restart the procedure from where it was. 

Regards,

Correct. Maybe it would good idea to try tuning one axis at the time.?

Hi Marco - the thing is I wasn't outside the Geo Fence. Geo Fence altitude for example was set to 120m to comply with CAA rules (and tested repeatedly earlier in the day) - you should see in the logs I was nowhere near that altitude. I was barely out of ground effect.

The same is true in both cases, so there's definitely something else going on, not to mention that it still shouldn't cause a crash if someone did hit the Geo Fence in Autotune mode!

Are those errors definitely showing as occurring before the craft hit the ground?

Mikko - it was only tuning the roll axis at this point, it does theme each in sequence, not simultaneously.

Damn. OK, the error is actually correct. I've just looked at the map view in the log viewer and estimated the distance using Google maps and it looks like it was 30m from home when the error occurred.

I thought I had changed the Circle size to 500m (again for CAA compliance) but having just checked my settings it was still set to 30m from my initial testing.

So, in a nutshell, hitting the Geo Fence in Auto Tune mode can cause a flip of death - was this already known?

Thank you for the help with the logs.



Ben said:

Hi Marco - the thing is I wasn't outside the Geo Fence. Geo Fence altitude for example was set to 120m to comply with CAA rules (and tested repeatedly earlier in the day) - you should see in the logs I was nowhere near that altitude. I was barely out of ground effect.

The same is true in both cases, so there's definitely something else going on, not to mention that it still shouldn't cause a crash if someone did hit the Geo Fence in Autotune mode!

Are those errors definitely showing as occurring before the craft hit the ground?

Mikko - it was only tuning the roll axis at this point, it does theme each in sequence, not simultaneously.

Ok, i was thinking u were on full autotuning, because u were saying that you had issues with battery lasting thru the whole proses. If i remember correctly, you should complete whole at in 8-10min, dependent of how much u must correct copters location during at. Yes, AT does them in sequence, but if u choose from param, u can do only one at the time ..like roll axis in one "session", when your roll is done,,land, power cycle and choose another axix to do..this is handy if your rig has limited flight time and battery dont last thru the whole at process. in my opinion autotununing dont work good enought, there is lot´s of threads about that... Hope u get your rig tuned without any more issues. :)

Thanks Mikko. 

You are right, next time I'll have to do each axis on a separate battery, and that will help. I'll also turn off Geo Fence and fly as close to the ground as possible in case it does have an issue and crash again. 

I would still like to know why the Geo Fence caused it to flip - the only idea I have currently is to turn down the AUTOTUNE_AGGR parameter to minimum?

maybe its worth of trying, i didn´t notice that param when i was doing my tuning. i got waaay too high pid´s after AT..

Please let us know how it went with lower value, if u deside to try that.

I still doubt that too high param was reason for your crach..but what do i know..not much :D 

AUTOTUNE_AGGR : Should be in the range of 0.05 to 0.10. Higher values will produce a more aggressive tune but sometimes results in gains that are too high. More specifically this parameter controls the threshold for D-term bounce back and P-term overshoot. This affects the tuning noise immunity (a higher value is more tolerant to flex in the frame or other disturbances that could trick the tuning algorithm). High values also leads to a tune that rejects external disturbances better. Lower values result in a tune that is more responsive to pilot input.



Ben said:

Damn. OK, the error is actually correct. I've just looked at the map view in the log viewer and estimated the distance using Google maps and it looks like it was 30m from home when the error occurred.

I thought I had changed the Circle size to 500m (again for CAA compliance) but having just checked my settings it was still set to 30m from my initial testing.

So, in a nutshell, hitting the Geo Fence in Auto Tune mode can cause a flip of death - was this already known?

Thank you for the help with the logs.

exactly Ben, this is what I was trying to tell you, according to your log your copter hit the circular fence and not the ceiling. Actually this behaviour wasn't known but peraphs you have set RTL in case of breaching the fence, in that case there is a quick change from what it was doing (autotune) to what It is required to do (RTL), this quick change might have disturbed the attitude of your copter.

It is just my thought...

Next time try to disable the fence, let it free to fly as it wants and adjust its position each time it tends to drift away, for large copter (2kg to 3kg) autotune can last up to 20 minutes so it is required large capacity, if you don't have this durability follow Mikko's advice and tune one axis at a time. 

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service