Unintentional flip after auto-takeoff at 80 m height - nothing damaged!

Hi everybody,
attached are the .bin log file and gimbal camera (siyi A8 mini) footage showing the drone has almost flipped after auto takeoff in 80 m height (the real take of height was 70 m). This happened in an auto mission with all waypoints at 70 m height except the last one.
Unfortunately at the moment of the sudden maneuver a was standing below the drone and couldn’t see the undesired roll, but clearly from the log file and the footage, copter did a 160 deg roll and lost 10 m height. Fortunately ardupilot gained full control after ekf lane switching.
my assumption is that one of the IMUs malfunctioned but I can’t find any reason for that.
The incident happens at about 0:53 in the video.

I appreciate anyone’s help finding the reason or comments.
log file
camera footage

Actually today another crash happened with the same quad in alt hold and under one meter altitude before switching to auto. the fact is that one thing is similar in both flight logs and that is the EKF lane switch which lead the later flight to crash.
the drone has been flying well in over 20 flights.
@rmackay9 I wish could help.
Is there any way to know if an IMU was semi-dead?
should I retire this pixhawk?
log file

Had a look at the log, can’t say I am an expert at debugging this kind of problem. But the EKF lane switches to the 2nd lane at the same time as a EKF_YAW_RESET event, then the roll issue starts. But it switches to lane 2, which is 100% producing faulty state estimations in your case.

The roll used by the controller (in red) follows the roll estimation produced by EKF lane 0 initially, but you can see than lane 2 produces crap data. at the moment of the lane switch, the controller think the roll is going negative fast, but that’s just because that the lane 2 is wrong. Lane 1 shows the roll is steady at that moment. But the controller compensates fast making the roll go positive fast.

So there are 2 things to clear up:

  • Why the EKF_YAW_RESET?
  • Why is your lane 2 garbage?

From your parameters, it seems you are using an external compass. Are you?

Maybe try updating the firmware? Running MagFit? The VIBE on EKF 0 and 2 are decent, but VIBE_2 not ideal. 40-60 is not good. You do not have a harmonic notch filter enabled. I suggest you proceed with the methodical tuning of your drone before flying in auto mode.

1 Like

Hi John,
first of all thank you for your time on reviewing the logs. your input was so helpful that I think I have nearly understood what was happening.

let me first wrap up the second flight crash reason. the thing is that, lane switch was so normal in that flight and it was not the reason for the crash but the result of the crash which led me to think there is a similarity between the two flights. Apparently when a drone crashes its normal to see lane switching. BTW, the reason for the second crash was faulty reversed rc2 input on pitch which we didn’t change intentionally!

About the first flight and your inputs;

As you said there is high vibration on the third IMU which is the IMU that is not vibration-isolated mechanically. We usually don’t put our cube flight controllers on special dampers (the ones with two carbon plates and blue elastics parts) and it works well for our other quads but here is the reason for the bad readings of IMU3 (XKF1[2] which is lane 3) producing “garbage” data.
so we will fix it by using dampers.

before talking about why this happened, I should say that I think there is still a bug in the lane switching that is said to be fixed in earlier versions.
Even if the bug is fixed and my case of failure is not related to that, I can say that it’s so much related to this quote in the bug link I referred to:

Among all above, my main question is that why did the lane switching happen to the worst lane (lane 3 with worst IMU measurements) despite the availability of another good lane (second IMU)?

there is a thread with another guy having the same question (with a cheap pixhawk) that got no answer!

My assumption is that the EKF lane switching mechanism was observing the three lanes and it saw so much difference between first and second lane with the third lane and for any stupid reason it decided that the third lane is telling the truth!!!

I would appreciate any clarification on my assumption cause I couldn’t find enough documentation on investigating ardupilot lane switching.
Or can you tell me what are the exact set of sensors being used for each lane (which could some how relate to the EKF affinity)? That way I can better investigate the reason for lane switching from lane one.
Or if some one could add some information on the mechanism of EKF lane switching; whether it compares the three lanes by each other faire enough? I mean, in a group of people when two of them are saying the same thing and a third person is saying some thing else, the assumption is that the latter sounds more inaccurate! Does the mechanism take this into account?

thanks in advance.

1 Like