Yaw Spinning in Auto Mode (Large Vehicle)

Hello everyone, I’m having troubles with my large copter since I’ve update to 4.0+ version. I flew hundreds of time using 3.6.12, everything was perfect, but since i’m using 4.0+ I cant make an auto flight becouse my copter dont face the next waypoint, it keep spinning round and round without face the path. (crashed twice)

I’m here becouse I ran out of ideas, I did everything I’ve found at similar topics.

Lets start with my copter configs:
-Hexacopter using T-motor brand new motors, esc and propeller (recommended by t-motor);
-Motor: MN501-S KV240;
-ESC: 40A Air;
-Propeller: folding carbon fiber FA22.2x7.2;
-PIxhawk 2 black cube brand new;
-2 Here2 GPS blend brand new;
-RFD 900 telemetry brand new;
-LW20/C lightware lidar brand new;
-16000mAh 6S battery brand new;
-Takeoff weight: 5.5kg;

As I said, I did hundreds of flight using that same configs but in copter 3.6.12, after update to 4.0+ my problems started, I thought it was hardware problem, thats why I’ve replaced everything to brand new parts.

Its easier I tell what I didnt do, it was auto tuning. Maybe someone will say that is the problem, but remember, before I start having problem I didnt execute auto tune either, I was flying with default PID configs and never had problem, so I never wanted to do tuning until now, becouse its the only thing I havent done.

Just FYI I did:
-Accel cal;
-Compass cal;
-ESC cal;
-RC cal;
-Motor are balanced and leveled;
-Large Vehicle MagCal OK;
-Every single calibration that have in arducopter documents;

I will post my logs AND do auto tuning, but I really want some ideas to try together with tuning.
I had problem in all those logs, only in auto mode:

*More info:
-Every time I have to redo large vehicle magcal, becouse every time it isnt face the right angle, right now I put the copter facing North, but it is East, this should happen?

-I’m using External as primary compass and internal as second.

If this flew ‘hundreds of times’ it was due to luck more than tuning.

  1. VIBES: Z too high
    You can see the Z clipping happening here.

  2. Tune: You are using default PIDS.
    You need to follow the Tuning Wiki Page
    Here you will see just how far off your settings are, with ringing in roll and pitch, Roll especially threatening to get out of control.

    And there is a constant lagging of Yaw which is what your observing in flight.

  3. Thrust imbalance.
    There is considerable difference in the thrust from the CW and CCW motors.

    This could be the main cause of the ‘Yaw Spinning’ you mentioned in the title.

Hello Mike, thanks so much for you attention in my trouble.
Your insights were awsome, really gave me hope to fix and enjoy this incredible board.
Now I ask you, or even beg, for your help to solve those problem.

As I said, I will do this tuning and after that, run an autotune.
I will upload some photos of my drone, to help you understand.

  1. Vibes: i’m aware about those vibrations, becouse my drone has long landing gears to be able to carry my payload. My FC is hard mounted with foam that come with FC, perhaps I should try a vibration dumper? This can be a source of my problems?

  2. Tune: I will pay attention on this and do the tuning as this page says.

3.Trust imbalance: this is strange for me, I really dont know what to do here, perhaps esc calibration again? Check if my motors are leveled? I really have no ideas how to fix it. Both motor, esc and propeller are brand new.

Again, i beg you to help me solve those problems, if you do, I might buy you “hundreds” of beer LOL.

Anyway, thanks for your help.

*My canopy has one alluminum sheet, this cant be a problem right?

*The distance between battery and GPS is 14cm.

Level motors, twisted arms, distorted frame, etc. Every time I see this Yaw bias problem, which seems to be weekly, I always ask if the frame has round arms. Invariably they do… Arm folding mechanisms are a cause of this also.

Hello Dave, thanks for your reply.

What you think I should do in this drone? Level motors can work?

Yes. I con’t recall a case where ESC calibration was the cause.

1&3 > Vibration-Thrust imbalance:
Your frame is likely to vibrate and twist so be aware of that and build for it.
You have long arms which ARE going to twist under load and as @dkemxr pointed out folding mechanisms add a whole new level of problems, ’slop’.
Careful with the prop hold downs your using that they don’t distort your blades and carriers.
you need to dampen your FC, and there are many pages in the Wiki covering this as every builder seems to have his own preferred method.
Tidy up the wiring so nothing is ‘flapping’ about, especially against your FC.
I find the quickest and easiest way to check your motor levelling is to make sure all your prop tips line up with the motor next to it.

  1. Carefully follow the Wiki on tuning and do the settings.

The canopy should not affect anything as I am assuming you are using the compasses in the GPS units.

Never underestimate the importance of clean wiring.
As an illustration a picture of a build, few years old now.

Also, what are these brackets attached to the arms? Those are some small diameter arms anyway for this size frame and you don’t need anything else to cause turbulence.

Arm brkt

Dave, as this drone have long arms, they used to vibrate a lot, so I have to put bars in hexagon shape, to block the arms to vibrate, the bars are conected in each arm. That was the way I had to make it work, Now I know how much bad is my frame, but I have to make it work, I dont have time to build a better frame.

@dkemxr @mboland

Hello Dave and Mike, thanks a lot for your hints, it seens to work.

What I did:
-Motor alignment (perfect leveled with each other);
-Soft mounted my cube;
-Wire managment, the wires dont leads vibration to FC;
-Did some tuning but, didnt do AutoTune (https://ardupilot.org/copter/docs/tuning-process-instructions.html#pilot-s-preparation-for-first-flight Only to this headline was done);

After those tuning, I recalibrated the internal and external compass (internal 3 times), now the GPS is heading where the drone is pointed.
I just hovered in loiter for 33min and checked the vibes and yaw positioning, everything seens to be fixed.

In the link below, i’ve attached more pictures after you guys hints and the logs of the last flight:

The last question is: After checking the last logs, all params seens to be better than the first log, motor thrust difference, vibration and yaw delay are fixed, even with this results, I have to do autotune?

1 Like

Nice work Giovane! Your motor re-alignment is good and Vibe levels are much improved. The tune isn’t bad but you will most likely get a better result with Autotune. These could be better:

You could also take advantage of the Notch Filter which is a bit of work to get right but worth doing IMO on a craft like yours. You would do this before running Autotune. Some reading here and we can help you along if you want to give it try:

Dave, I want to use this filter, if you say that it would improve my drone, I Will use it.

I never read about this Imu notch filter, on a first reading, theres two types of filter, static and dynamic, what you woud suggest for me? Also, my esc dont have telemetry, so I have to use thottle based, right?

Any tips or instructions would be very helpful, I will do it today or tomorrow.

Thanks again.

Hi Giovane-You might be bale to take advantage of both the static and dynamic notch filters but some flight and analysis will be required to make that determination. The 1st step is simple. Set these parameters:
INS_LOG_BAT_MASK = 1 to collect data from the first IMU
LOG_BITMASK ‘s IMU_RAW bit must not be checked. The default value is fine
INS_LOG_BAT_OPT = 0 to capture pre-filter gyro data

Then make a hover flight in AltHold for a minute or so, land and post that flight log.

Right, with no ESC telemetry and running current Arducopter Stable you will use throttle reference. ESC telemetry RPM, or FFT using Master, is better but throttle reference works fine.

For analysis we will use the FFT feature in Mission Planner and select notch paramters based on the results.

Dave, I took a look and its not clear if I should use the FFT ACC0 or FFT GYR0 data, I know that is Gyro Noise, but its not very explicit if I should use Gyro or Accel (In FFT analisys).

Both are considered. For some modes the frequencies or their harmonics will align fairly closely.

The documentation is a little confusing, but I thing I get it.

Correct me if i’m wrong, but, those are the steps to set up notch filter:
First set:

  • INS_HNTCH_MODE = 1 (as i’m thottle based);
  • LOG_BITMASK ‘s IMU_RAW bit must not be checked;
  • INS_LOG_BAT_OPT = 0.

After those params been set, I will hover for at least 30s on altitude hold, have done that I will use FFT to see the noise peaks.

*I have a question here, after the first flight I have to set the harmonic notch configs, but I dont know I have to set MOT_HOVER_LEARN = 2 before or after the first flight. I think it has to be before, becouse I should use hover_freq and hover_thrust to set the harmonic notch, If I set it after the first flight, I might have to do the flight and collect data again, am I right?

Ok, once I have all hover data, I must set INS_HNTCH_… with those data.

After this first setup, I have to set INS_LOG_BAT_OPT = 2 and do the analisys again to check the gyro noise, if it is still high, I must raise the bandwidth and test it again.

*Another question, I have to do the Notch Frequency Scaling?

Now the difference between static and dynamic, if I have RPM sensor I should use dynamic and if I dont, I must use static, right?
In my case, my esc dont have telemetry and I dont have any rpm sensor, so I must use only static harmonic filter.

After I success in those steps, I have to check some residual noise, if I have, I can set up a static notch.


You just need to set the parameters I indicated and make a flight. It won’t matter if the notch filter is enabled or not because you are looking at pre-filter data. MOT_HOVER_LEARN should be at 2 already unless you changed it and the value is most likely already learned from previous flights.

Notch Frequency Scaling. No

No that’s not why you would choose static or dynamic. Static is for a fixed mode, like a frame mode. Dynamic is, well dynamic like motor RPM based modes. You can use both if required.

I see…

Dave, it a little confusing for me yet, I still didnt get how to set the filters after pre-filter data, how can I setup dynamic filter?

And how can I use dynamic if I dont have rpm sensor? Does the FC has an internal one?

Honestly I don’t want to re-write the Wiki post it’s comprehensive enough. I do better by example. Make the flight, post the log.

For example. Read the section in the Wiki titled “Throttle Based Setup”.

If you don’t want to use throttle referenced dynamic notch then load V4.1.0-dev and be on the cutting edge using FFT based dynamic notch. And some other goodies. But, it’s a development version not well documented yet and “things” can happen as you are the test pilot.

No problems Dave, tomorrow I will make the flight and post the log, it easier to setup right?

Thanks a lot.