Loiter and rtl wobbling

hi everybody

I have a problem my quad wobbles not too much in loiter modes and rtl while it is stable in althold and stabilize modes.

it weighs 4.5 kgs, pixhawk 2.8, arducopter 4.0.7, I did the compass calibration but not the compassmot as I don’t have current monitoring.

as I reviwed the logs, it appears that everything is good. anyway, the log file talks :https://drive.google.com/file/d/1c_eGZPdoa15IQBO9BgEGWW9mqvSj4qpZ/view?usp=sharing

and the parameters file is: https://drive.google.com/file/d/1mAO4TtmussCE3Xfalnw6ToC3x4ywqfXv/view?usp=sharing

please what might be the cause? could it be trimming issue?

thx in advance

1 Like

In ArduCopter you are not supposed, and not allowed to use RC radio trims.

But you are supposed to, and must, get the CG on the geometric center of the copter. If that was the trim you were referring to, yes, do trim it.

1 Like

Attitude control and tuning is the problem.

I suspect your MOT_THST_EXPO is wrong and should be about 0.77, assuming you are not using T-Motor Flame ESC’s.

PID’s are very low, I presume from a previous Autotune or some manual tuning. Probably increase these ones for a start, only a small amount at first:
ATC_RAT_PIT_P,0.06
ATC_RAT_PIT_I,0.06
ATC_RAT_RIT_D,0.00375
ATC_RAT_RLL_P,0.06
ATC_RAT_RLL_I,0.06
ATC_RAT_RLL_D,0.00375

For safety of such a large sized quad I would set:
FENCE_ENABLE,1
FENCE_TYPE,3
You wont be able to arm and fly until there’s a valid GPS 3D fix and home can be set.

I would probably set INS_ACCEL_FILTER back to 20 and see if flight is stable enough, then set up Harmonic Notch filtering as follows:

HNOTCH phase 1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0

  • hover test in ALTHOLD for 1 minute at least, check FFT in MissionPlanner

HNOTCH phase 2
INS_HNTCH_ENABLE,1 <- set this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,{hover_thrust}
INS_HNTCH_FREQ,{peak freq from FFT}
INS_HNTCH_BW,{peak_freq / 2}
INS_HNTCH_ATT,40
INS_LOG_BAT_OPT,2

  • hover & dynamic test, check FFT results and adjust FREQ and BW

HNOTCH phase 3
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0

  • no extra logging, assumes HNOTCH is working great

If you’re not sure about the Harmonic Notch setup, then post a link to a .bin file after each phase.

Once that is set up and working OK, then run a new Autotune.

Continuing the discussion from Loiter and rtl wobbling:

hello again and first of all I thank you a lot for your time helping me.
the weight and geometric centers of gravity are conform.
I did what you have proposed dear Shawn, phase one:
ATC_RAT_PIT_P,0.06
ATC_RAT_PIT_I,0.06
ATC_RAT_RIT_D,0.00375
ATC_RAT_RLL_P,0.06
ATC_RAT_RLL_I,0.06
ATC_RAT_RLL_D,0.00375
FENCE_ENABLE,1
FENCE_TYPE,3
INS_ACCEL_FILTER = 20
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0

the copter was stable in althold but still wobbles in loiter, here is the log file for about two minutes in althold:
https://drive.google.com/file/d/1xZKJIo0leGM7-6PdPn8JVFUZxpDtgnk7/view?usp=sharing
I am awaiting your advise to move to phase 2.
best regards

OK, lets try these for the next step:

INS_HNTCH_ENABLE,1 <- set this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.1784
INS_HNTCH_FREQ,84
INS_HNTCH_BW,42
INS_HNTCH_ATT,40
INS_LOG_BAT_OPT,2

But first, there’s an issue here that we didn’t pick up before, and this will be your main problem.
MOT_SPIN_ARM,0.19
MOT_SPIN_MIN,0.2
and yet MOT_THST_HOVER is only 0.1784

This will be a big stability issue in any mode but Stabilize. The motor outputs wont be allowed to go low enough to maintain stability and hover.
You will need to lower these and check that motors spin up reliably at Arming. Use the MissionPlanner motor test to check the minimum reliable value and set that as MOT_SPIN_ARM, then add a bit like 0.03 and make that MOT_SPIN_MIN.
You should end up with something like:
MOT_SPIN_ARM,0.10
MOT_SPIN_MIN,0.13

If those SPIN values are still higher than MOT_THST_HOVER,0.178 then you will need to add some weight to bring up that hover value.

Stay focused on the best tuning outcome though, don’t just fix the MOT_SPIN values and leave everything else, follow the plan for Harmonic Notch filtering then Autotune.

I did the motor test and the throttle percentage for what the motors start to spin was 16%!
I don’t know if I understood, but when I arm my quad, it doesn’t climb and the motors spin slowly till my throttle is about half way. but there is something i sould mention to you which is I set my throttle curve in the transmitter to an exponential function which is nearly a line before and after zero. could be this what makes the hovering throttle so low?! and as I told you the copter is very stable in both stabilize and althold.

Definitely do not set any trims or expo curves in the transmitter. Undo that immediately.

If the MP motor test gives 16% for reliable start up, then set motor spin arm as 0.16 and min as 0.19 then do a new hover test. Check stabilize first and then try ALTHOLD for a while. Be prepared to go back to Stablize.
What is the new hover value?

If it’s still lower than mot spin min then you need to add some weight.

Hi again,
I did before the ESC calibration of each motor individually through an external RC receiver.
so I tried today to recalibrate my ESCs through pixhawk and the surprise was that the motors start to spin at 6% throttle which indicates unproper previous ESCs calibration and the cause of the previous high values of throttle percentage for the motors to start.
then, I set
MOT_SPIN_ARM = 0.08
MOT_SPIN_MIN = 0.12
but I kept MOT_THST_HOVER = 0.172 as before
I removed all trimming and curve functions from the transmitter and set the HNTCH parameters as you proposed to be ready for autotune.
any suggestions to follow before going into autotune will be appreciated :grinning:
thx in advance

MOT_THST_HOVER is dynamic and it gets set during flight. You can set it low for initial take off and testing, but the idea is it settles on the true value. ALTHOLD for a minute will give a correct indication.

1 Like

Hi again. we had bad weather since last time so I couldn’t try till today :man_facepalming:
here is the log file before setting the INS parameters:
https://drive.google.com/file/d/12pMaTrb-zI9hNRFLekISug-tQR5TZLZu/view?usp=sharing
and this is after:
https://drive.google.com/file/d/1nfTQupLoXFDsHxE8-YBw52JR5zC2BWDe/view?usp=sharing
and this is my parameters file:https://drive.google.com/file/d/1aulPypK6ECmyWjzpuv_wxdeDf2LGKS78/view?usp=sharing
I didn’t try autotune yet till I get your advise and I attached a picture of the quad to have an idea of the physical and geometric shape of it.