Menacing sway in loiter mode

Hello everyone, I’m new to copters and I’m not very good at it, but I managed to fly one from scratch :slight_smile: which is quite an achievement :slight_smile: My copter is with a pixhawk orange cube flight controller, but I’m having a problem, yesterday during the test flight in loiter mode it behaves quite unnaturally… what does this mean, I start the copter and when I let it hover from time to time it starts to wobble… in some cases slightly in others to the point that I have to land to avoid crashes… also when i move it to the side and let go of the stick to stop it can’t level and there is a hesitation in the motors and a shake of the copter. I have downloaded some logs from the tests and I am applying them if anyone can tell me where the problem may be coming from, as well as the sheet with the parameters I have set!!! I would be grateful to anyone who could help!!!

There are a lot of similar threads in this forum, have you read some of them?

Like most of those threads, you provide no description of the steps you have done so far.
If you had read some of them, you would have noticed that the answers are almost always the same:

  • notch filter
  • mandatory initial parameter tuning
  • autotuning

Providing 5 .bin files and no individual descriptions does not help either.

Please do help us out, so that we can help you better.

well first step i installed 4.2 software and followed the step by step instructions, calibrating speeds, gyroscope, inch propellers, battery, FS setup and everything described in the “getting started” manual. I have also put lidar on the bottom for elevation and lidar on the front for obstacles, everything as software works great… just the shake problem, I read a lot today and I think the problem comes from P.I.D. adjustment, I know there is an automatic adjustment but I haven’t put in this mode because I read that there is a variant for breaking the copter and I’m afraid… what do you think?

Autotune is extensively tested and used frequently.

See you have oscillations - the large deviations are to be expected, the small zig-zag patterns are bad

It is also visible in the motor outputs.

You have INS_HNTCH_MODE,4 but I think you still need to set FFT_ENABLE,1 and check those FFT params

I would try these PIDs as a starting point and follow the tuning guide until there is a good level of stability then run Autotune.
ATC_ANG_RLL_P,8.0
ATC_ANG_PIT_P,8.0
ATC_ANG_YAW_P,5.0
ATC_RAT_RLL_P,0.10
ATC_RAT_RLL_I,0.10
ATC_RAT_RLL_D,0.00625
ATC_RAT_PIT_P,0.10
ATC_RAT_PIT_I,0.10
ATC_RAT_PIT_D,0.00625
and set this:
INS_LOG_BAT_MASK,7

Launch tentatively, watching for oscillations, land immediately if you have to.
Hover for just a very short time, land and check motor temperatures.
If everything is progressing OK follow the tuning guide to improve the attitude control.
Post another .bin log here - just hover for a while and some gentle movements.

Thanks a lot for the comprehensive info, later in the day I’ll do some easy setup and try autotune after that, I’ll get a flight log down and upload for opinion, thanks again for the info!