PEALSE HELP ME with suddenly twitch in stabilize mode

Hello guys!
I realy really need help with this issue, It’s been a very long time. It’s just suddenly start twitch in the sky, and most time It will recover. During the six months I and done everything I can do. reduce the vibration, replace the propellers, compass, ESC, motors and frame.
Hardware:
FC: pixhawk 2.4.6
ESC: hobbywing skywalker 40A
Motor: Emax 2212 980KV
Propeller: DJI 9450
Frame: S380
Compass: HMC5883 + QMC5883
Here is my crash log
I will stop trying until this problem has been solved.

Can you describe the behaviour you were seeing, before it crashed, a bit more?

From your log I can see that your EKF doesn’t look too happy and your gps is glitching. Are you flying near buildings or tall structures?

I also note that you are using the internal compass on your flight controller. Is your flight controller mounted near motors, Esc’s, or high current wires? That could cause compass interference and upset the EKF.

Hi matt
My English is not very good, I’ll try my best to disscribe it.
It’s always happened in stabilize mode, It’s more like the copter can’t level itself, start shaking, then the vehicle start spinning, everything became very hard to control, Most time It will recover, But this time it too close to the ground, So It crashed.
I have 2 external compass(a QMC5883L and a HMC5883L), But I do enable the interal compass, should I disable it?
My Flight controller is at least 2.5 inches away from any other electronic compents.
It’s should be fine
This is my FC pic

I check the log again, The vibration looks just fine, but the compass data looks not very good. I hope you guys can help check it

From your log it doesn’t appear that your quad was in stabilise in the lead up to the crash. It looks as though you are in position hold:

From your picture it doesn’t look as though your internal compass is near any sources of interference, so that isn’t the problem.

Looking through the log a couple of things that I have observed:

  1. Your motor channel outputs don’t appear balanced. Is your centre of gravity near the centre of the quad? Have you calibrated your ESCs? This isn’t the cause of the cause of your crash, just an observation.

  2. Your rates in pitch and yaw look to be well tuned, so I don’t think it is that. Yaw has some room for improvement. But this isn’t the cause of the crash.

  3. I think the most likely candidate for the crash is that your PSC_VELXY_P value is set too high. These plots show your target velocity and actual velocity in X and then Y:


There are some bad oscillations here. I would suggest halving your PSC_VELXY_P and PSC_VELXY_D. Do a short flight in position hold or loiter and re-do the above plots. If the oscillations are still there reduce those values again.

If at some point you find that you have lowered those values too much and your quad starts struggling to maintain a good position in latitude and longitude then consider gradually increasing the P term first, then the D term. Again, checking the logs to make sure you don’t go into oscillation.

When tuning position hold or loiter I would always recommend doing take off and landing in stabilise, and switching into the pos_hold/loiter when you have plenty of height to recover if things go wrong.

I hope that helps,

Matt

1 Like

Thanks for providing this analysis. I haven’t looked at the log myself but normally users don’t need to tune the position controller… if it’s a tuning problem then normally it’s an issue with the rate controllers…

Thank you to provide a such detailed analysis,Matt
It’s little bit hard to me to analysis the log.I’ll try your way to test and analysis again, hope I can solve this problem

Yes, I agree. The position controller rarely needs tuning and it looks as though the values in XY are set to defaults. So it should just work. However in this case, looking at the rates in the log they look pretty dialled in, which had me a bit stumped.

@XinChengGe It looks as though you have autotuned with AUTOTUNE_AGGR set to 0.1. It might be worth lowering this value to 0.05 and re-tune each axis. It might be that your rate P terms in roll and pitch are close to the stability limit and given the right conditions it might start the oscillation off. If you do decide to do this then I recommend manually reducing the rate P and D terms by 25% (in the parameter list) before doing the autotune, as the process struggles to tune for a lower aggression setting if it has already been tuned for a higher aggression setting. It is another thing to consider anyway.

OK, I’ll check the all the things that you said, I’m still little bit confuse about all the parameters, I will read the docs, and try to understand how to tune the parameters and test it again, I’ll give you guys feedback. when I finish the test.
thanks a lot
xincheng