Need help with Toilet Bowl issue on 5" props quadcopter

firmware - arducopter v4.1.0 - dev
build - omnibusf4pro, Here+ RTK GPS, 5" props quadcopter, 350 grams weight

Issue:
So i have autotuned my drone, its flying well and seems very stable, only problem i am facing now that there is rare problem of toilet bowl, i am flying multiple drones with similar build and tuning setup, though this issue happen rarely but can be observed in all the drones time to time. Even auto-analysis not able to catch magnetic interference issues/warning, i am only using external compass of RTK GPS, and i have even done compass/motor calibration using throttle, still i am stuck with this issue.

Please kindly have a look at my log and parameters of one drone where this issue repeat again recently if i am missing anything which i am not able to observe from log, its been a month now that i am still stuck with it. It’s becoming a major problem now to keep going forward with this issue as i cannot keep drones in close proximity.

Drone log and params

Please let me know if actual pictures of drone can probably help in diagnosing the issue, i will share them here.

  1. why do you use 4.1-dev instead of 4.0.4 ?
  2. According to log, your compass is too close to the power wires. Not close enough to cause flyaway or total loss of control, but definitely causing issues with compass aided modes, and can be a source of toilet bowling.
  3. I have doubts about compass/mot calibration since in the log you does not seem to use battery monitoring.

yeah, done compass/mot calibration using throttle only, you can see COMPASS_MOT params in the parameter file, i know its recommended to do this calibration with battery monitor, if it maybe the one which can solve this issue then i can try calibrating with battery monitor

No particular reason to not use any stable version, thought it will be good keeping up with the latest updates, but again if this can also relate with toilet bowl issue then i can switch to 4.0.4 as well

Well, tought that the docs is quite clear about compassmot :

CompassMot only works well if you have a battery current monitor because the magnetic interference is linear with current drawn. It is technically possible to set-up CompassMot using throttle but this is not recommended.

Without current monitor CompassMot even can have the opposite effect.

4.1 is not a latest update, but a developers work in progress version. Not flight tested, often contains epxerimental code, and/or bugs which can cause crash or flyaway. It is definitely not a “safe to fly” firmware.

Related to firmware i think master has all the updates which stable version 4.0.4 too have, and except this rare toilet bowl issue i have not seen any other kind of anomaly with master, still i am going to make all changes as you suggested, thanks, will update soon in 2 days

I’d definitely go back to 4.0.4 - there’s a lot of unnecessary stuff going on in your log.
It will help a lot if you can get current and voltage monitoring working. At least your vibrations are very low.

Tuning-wise there seems to be oscillations. I’m no small quad expert, but I’d probably back off these a bit to these values:
ATC_RAT_RLL_P,0.10
ATC_RAT_RLL_I,0.10
ATC_RAT_RLL_D,0.003
ATC_RAT_PIT_P,0.10
ATC_RAT_PIT_I,0.10
ATC_RAT_PIT_D,0.003

And make these the same:
ATC_ANG_RLL_P,8
ATC_ANG_PIT_P,8

There’s quite a bit of small-quad tuning info if you search for it, and you might be able to find better starting values for the PIDs. My recommendation: Try and tame the oscillations first.
Go through the tuning guide for manual tuning of roll and pitch.
https://ardupilot.org/copter/docs/tuning-process-instructions.html

I just want to clear why this roll & pitch oscillations happening, these oscillations are occurring cause of the way i am giving navigation commands to drone in guided mode, my copter getting navigation commands quickly, that’s why acceleration getting changed very quickly too, that’s the main reason for roll and pitch oscillations

Also i have minimised these oscillations already by changing WPNAV_ACCEL_XY from 100 to 50, there are no roll and pitch oscillations when flying in poshold, still i will not say that tuning is perfect, there’s always room for more improvement

Sorry, I see where you said

So ignore my PID suggestions. Can you do some smooth flying with RC control instead of Guided mode? Or space out the Guided commands with more distance between them.

I can fly in auto mode with space out waypoints, will post the log by today

@xfacta this is the log of the same drone in auto mode with same setup and firmware, given spaced out waypoints for this flight, with delay of 1 second at each waypoint and set speed to 1.5 m/s, kept wp_yaw_behaviour to 0

auto-mode mission log

please let me know what are the scopes of improving the tuning but overall drone is quite stable and flying smoothly, haven’t flying it much in auto mode so have never observed toilet bowling in auto mode, now working on making the changes as suggested by @Eosbandi

There’s still a lot of oscillation happening.

And I’d read through the tuning guide in relation to oscillations and these would be my suggestions as a starting point:
INS_GYRO_FILTER,70
ATC_ANG_RLL_P,12
ATC_ANG_PIT_P,8
ATC_RAT_RLL_P,0.11
ATC_RAT_RLL_I,0.11
ATC_RAT_RLL_D,0.003
ATC_RAT_PIT_P,0.15
ATC_RAT_PIT_I,0.15
ATC_RAT_PIT_D,0.005
I guess your quad has more of a rectangular shape than square.
If you can set up voltage and current monitoring and tame the oscillations then move on to the Harmonic Notch filter - it’s worth the effort.
Then finally you can run Autotune !

The tuning guide has a link in previous post above this, and use this helper spreadsheet:


or press ALT A in MissionPlanner

thanks for these valuable inputs, outer dimensions (distance between 2 motors) of my quadcopter frame is exactly 16x16cm

just wanna know if a good tune can also help in dealing better with this occasional toilet bowling issue too in my case ?

Hi Notorious7,
I realise I’ve strayed a long way from your original question. Thanks for bringing us back to the topic.
Please keep us posted about progress and provide more .bin log files if you can. Discussing these things and checking the logs helps us all.

Getting back to original question - Towlet Bowling
Usually this is caused by electrical/magnetic interference with the compass. We can see in logs that your compass readings and yaw are definitely affected by throttle.
A small quad will present difficulties getting the compass any reasonable distance away from the battery and power wiring, assuming there is a compass in an external GPS unit. I see in your logs you only have an external compass - that’s a good start.
So the original suggestions still hold: get the voltage and current monitoring working.
In addition I would:

  • recalibrate the compass -> go outside away from all sources of magnetism and interference, wait for a good 3D GPS fix and then do the compass calibration.
  • redo the compass/motor calibration

The reason I’ve been focused on tuning issues is because
a) they’ll need fixing anyway - these tuning issues burn up battery power reducing flight time
b) it makes it hard to see the toilet bowling in logs when the craft is bouncing all over the place with many small guided movements and oscillations
c) we’re waiting to see if the current monitoring and compass/motor cal fixes the toilet bowling

I also want to talk about the PIDs being different between pitch and roll. You mentioned the quad is “square” so theoretically they should be equal, or close to equal, for pitch an roll. They could be different because an Autotune was compensating for weight distribution or wind. Maybe you manually tuned and found pitch and roll needed different PIDs - that’s good work if you did.
For example the batteries we use are generally rectangular, so especially on a small quad there will be more weight spread along one axis than the other.
I really just wanted to point out that the PIDs may need to be different between pitch and roll, or may not. It is something to look out for and may need manual adjustment. If you were sure the craft was equally weighted it might be better to make the PIDs equal. Autotune can also set the PIDs more correct if there’s less wind when run it next time.

After all that, I’d highly recommend doing the Harmonic Notch filter setup and then a new Autotune.

1 Like

Really thankful for your in depth analysis, i will try to follow your protocols as strictly as possible, not sure if harmonic notch filter feature available on 1MB flash or not as i am using omnibusf4pro, and yeah batteries are rectangular and weighs 100 grams in total weight of 350 grams for drone

Now getting started with tuning process first from today, will make 2 logs today on 5" quadcopter, 1st after manual tuning and testing in althold and 2nd after autotuning and flying in althold, will post those logs by today only without using compass, gps and voltage/current monitoring for now, will keep all the modules like rtk gps on drone during whole tuning process

@xfacta @Eosbandi sorry for the delay, was involved with some other tasks

So I have autotuned my 5" quadcopter running arducopter 4.0.4, these are params i set before autotuning:
ACRO_YAW_P,3.5
ATC_THR_MIX_MAN,0.1
ATC_ACCEL_P_MAX,165300
ATC_ACCEL_R_MAX,165300
ATC_ACCEL_Y_MAX,31500
ATC_RAT_PIT_FLTD,37.5
ATC_RAT_PIT_FLTT,37.5
ATC_RAT_PIT_FLTE,0
ATC_RAT_RLL_FLTD,37.5
ATC_RAT_RLL_FLTT,37.5
ATC_RAT_RLL_FLTE,0
ATC_RAT_YAW_FLTD,0
ATC_RAT_YAW_FLTT,37.5
ATC_RAT_YAW_FLTE,2
MOT_THST_EXPO,0.55
MOT_THST_HOVER,0.2
INS_ACCEL_FILTER,20
INS_GYRO_FILTER,75
MOT_BAT_VOLT_MAX,8.4
MOT_BAT_VOLT_MIN,6.6

After autotuning in all roll,pitch and yaw axes these are some params:
ATC_ANG_PIT_P,18
ATC_ANG_RLL_P,18
ATC_ANG_YAW_P,6.686522
ATC_RAT_PIT_D,0.008305321
ATC_RAT_RLL_D,0.007172775
AUTOTUNE_MIN_D,0.001

These are the PIDs after autotuning:

After looking at autotuning guide, these values suggest that autotune has been successfully completed, what you think about the tuning on this quadcopter ?

Log and complete parameter list is attached below, this is the log of flight after finishing autotuning:
5" quad log

5" quad parameters

That must be a very good tune now - the ANG P values went to maximum, you could even lower those a bit if you like without too much disadvantage.

There still a little bit of movement in flight, but it’s only 0.2 of a degree and probably less that nearly every other aircraft:


The rest of the time pitch and roll are tracking Desired very well.

I would highly recommend doing the harmonic notch filter tuning if you can, then run another Autotune.

1 Like

Gotcha, will see if i can do harmonic notch filter tuning on 1MB flash boards, thanks for helping out

@xfacta
When running autotune multiple times on same 5" props quadcopter then after autotuning in roll and pitch, PI values for both of them have tendency to vary from 0.15 to 0.25, and i am also getting quite a variance too between their behaviours, sometimes both PI values for Roll and pitch are quite close but sometimes roll PI comes out to be 0.15 but at same time pitch PI comes out to be 0.25, and i autotune when weather is good and winds are calm, still there is quite a variance between roll and pitch PI values when autotuning multiple times, is it okay to have this much variance between PI values in roll & pitch ?

@Leonardthall always says that a 25% variation is normal. One thing to watch out for is that the tune on one axis will affect the tune on other axis, so the order you do things in will make a difference.

I think, you can solve this problem via In-Flight Compass Calibration.

  1. Set COMPASS_LEARN parameter to 3.
  2. Arm and flight in AltHold mode.
  3. Fly until you see “CompassLearn: finished” messages on your GCS.
  4. Land and Restart your copter.