Motors off in the air with stabilize mode, need help?

I had a crash a week ago with my ROBO-Q copter and a pixhawk 3.2.1 firmware X type. I am using a:

1- 330kv tiger motors
2- 30A muiltirotor speed controllers
3- 3DR power module
4- 3DR compass/GPS module
5- 6s LiPo battery with 7800 mAH
6- futaba T10CAG transmitter and FS6008H receiver

So this is my first time using the pixhawk autopilot and after installing everything according to the manual and making sure everything is fine, also calibrating the Compass, RC radio and the accelerometers and tuning the PID gains for the Roll, pitch and yaw. I went to the field for a first test and went through the modes one by one (stabilize, ALT_HOLD, LOITER, RTL, AUTO). So for the first flight I tried stabilize, ALT_HOLD, LOITER modes then land it back to ground and gave me a fantastic results. Then for the second flight and when before I was going to trigger the RTL mode from the stabilize mode suddenly and without any warning, beep or something all the motors went off and the copter fell down from 20 meters altitude.

By looking through the data log, the auto analysis give me that a brown out has happened, but when graphing the voltage of the battery and the VCC for the pixhawk nothing seems unusual. My question is what caused this to happen???

Half of the copter parts are damaged and I have replaced them with new parts, but I don’t want to go for a field test before preventing this problem to happen again. Please if anyone can help me and look through the log and tell me if I need to change or configure something.

Thanks,

@Yazen Alali,
Here is an Auto Analysis of your data flash log:

Size (kb) 1674.572265625
No of lines 22782
Duration 0:01:37
Vehicletype ArduCopter
Firmware Version V3.2.1
Firmware Hash 36b405fb
Hardware Type
Free Mem 0
Skipped Lines 0

Test: Autotune = UNKNOWN - No ATUN log data
Test: Balance/Twist = GOOD -
Test: Brownout = FAIL - Truncated Log? Ends while armed at altitude 8.46m
Test: Compass = FAIL - Large compass off params (X:-56.00, Y:38.00, Z:159.00)
Large compass offset in MAG data:
Z: 159.00
mag_field interference within limits (6.81%)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = GOOD -
Test: IMU Mismatch = GOOD - (Mismatch: 0.36, WARN: 0.75, FAIL: 1.50)
Test: Parameters = GOOD -
Test: PM = FAIL - 10 slow loop lines found, max 14.90% on line 812
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = GOOD -

Regards,
TCIII Gm

Thanks for the reply, but my mission planner gives me this:

Size (kb) 1674.572265625
No of lines 22782
Duration 0:01:37
Vehicletype ArduCopter
Firmware Version V3.2.1
Firmware Hash 36b405fb
Hardware Type
Free Mem 0
Skipped Lines 0

Test: Autotune = UNKNOWN - No ATUN log data
Test: Balance/Twist = GOOD -
Test: Brownout = FAIL - Truncated Log? Ends while armed at altitude 8.46m
Test: Compass = GOOD - mag_field interference within limits (6.81%)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = GOOD -
Test: IMU Mismatch = GOOD - (Mismatch: 0.36, WARN: 0.75, FAIL: 1.50)
Test: Parameters = GOOD -
Test: PM = FAIL - 10 slow loop lines found, max 14.90% on line 812
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = GOOD -

So its telling me that nothing wrong with the compass offsets unlike your analysis. Is there a problem with my software or what??

imu inconsistency look at roll and desroll
did you forget to calibrate the gyro ?

[quote=“kafteji”]imu inconsistency look at roll and desroll
did you forget to calibrate the gyro ?[/quote]

Dear kafteji,

Thanks for the note,

Yes I did the gyro calibration and yes it seems there is imu inconsistency, but only with the roll axis nothing wrong with the pitch and yaw axes. That’s because of the wind which was in the same direction with the roll axis.
It is a steady state error and I think increasing the integral gain a little bit will solve this issue, but I don’t think this caused the brown out. So again what happened and where is the main problem which led to a crash??