3.4.4 Uncommanded Roll/Yaw


I tried to stay away from 3.4.x for a while (had no time to troubleshoot) due to some uncommanded yaw/roll issues I started to have, which were not present on 3.3.3. Reading over the changelogs, I knew it was inevitable to upgrade.

New EFK innovations are present from 3.4.x, so I know the new algorithms are detecting something wrong (or some default parameters are not getting along with my build).

I take off in STAB, and it hovers fine for some seconds. Then I can notice it’s auto-yawing, like trying to calibrate something (small yaw corrections to either side). Some seconds later it develops a Roll tendency, like if he has already trimmed to compensate for a “stable horizon”, and drifts to a side (I need to keep the stick on the opposite side to compensate)

I land. Take off, tendency remains until I reboot the board.

  • Tried Old PIDs from 3.3.3 Auto-tune and Defaults.
  • Craft has same 3.3.3 Compass-mot values (did fresh compass-mot under 3.4.4 also)
  • Same happens with both Compasses enabled (normally I only use the external)
  • Hover Learn Disabled
  • Cleared the EEPROM with Rover, re-flashed, erased mSD, did whole initial setup with def. PIDs

Haven’t had any time to auto-tune under 3.4.4, but I’m suspecting on the following new parameters:


XJ470 (X frame or V ? Behaves the same either ways)
3DR Pixhawk board w/external M8N GPS/Compass Combo
FC mounted on Kiosho gel (check vibrations and 3.3.3 vib, all within limits)

Any help from the experts is deeply appreciated. Thanks for all your hard work and effort with this FW!

3.4.4 Log

3.3.3 Log

I had a look but cant really tell much. I can see the ~5 roll bias that you had to hold after a minute or so. The early yaw variations, I only see in the Mag2 signal.

If you were using telemetry and a ground station, I suppose the virtual horizon would have been rolled with respect to reality after you landed. Did you land and takeoff from a flat spot? One can see the roll reference is near 0 at takeoff and over -5 deg at landing.

Hopefully someone can help more than this. I don’t see much in the EKF innovations or the gryo bias’, etc.

Thanks for your input Jeff,

The 3.4.4 flight was made indoors, I usually test my builds in my living room (my wife approves). That’s why they are short flights; I always like to have “zero wind” conditions (lot of drafts though).

My floors are pretty much close to 0 degrees, that’s the weird thing, the FC gets dis-configured on air, and when I land I see on MP that the Artificial Horizon is tilted. Magnetometer calibrations were made using a level, same procedure I used with 3.3.3 and I never had this kind of hiccups.

Maybe a auto-tune is mandatory with 3.4.4 due to the nature of my frame?

I have seen the horizon reference move around indoors with more recent firmware. Even in Stab. I’m not sure how it works, but the gps velocity (or position?) disagrees with the accelerometer derived velocities, somehow that gets into the attitude control.

You can see the position innovation grew in the last half of that flight.


I will try an outdoor test with good GPS HDOP, my GPS is set to mode 0 (EK2_GPS_TYPE), which is 3Dposition/2D vel. and report results.


Tried an outdoor test and it was horrible. Was gusting a little bit and the quad wanted to crash bad. Seems like a PID issue combined with something else. The PID conversion is just not happening (tried several times from 3.3.3 to 3.4.4 and 3.5RC1, and default PIDs are loaded).

I’ve seen Randy talk about multiplying by 0.7 for tri-copters and 27% for other frames (non X) and 10% less for X (Rate), so I took my PIDs from 3.3.3, left Stab Roll and Yaw the same; reduced by 10% Rate Roll/Pitch (i.e. ATC_RAT_RLL_P, was 0.1530276, now is 0.1377248).

The “twitching” seemed to go away (need further testing), but the Bank/Roll tendency continues.

Just sitting by itself (Disarmed), on a flat surface (Accel/compass calibrations were made several times) develops some roll.

Saw some “EKF primary changed:1” error appear too. There’s certainly something that this FC is not liking.

None of these behaviors are present under 3.3.3.

2017-02-07 22-05-41.bin (961.7 KB) (quick indoor flight, first minute was wasted in AltHold)

Just made another flight, compared internal mag Vs. External. Seems that 3.4.x/3.5 doesn’t like my external MN8GPS/Compass combo. Why would 3.3.3 be more tolerant?

External Mag

Internal Mag

Clearly NKF4/NKF9/SP Say bye-bye to each other after some time using the external compass (and I suspect this is causing the roll/pitch).

Using the internal compass doesn’t develop any roll/pitch tendency with time, but it’s not safe to use that compass.

Am I over-viewing any parameter here? Does the compass need to be compatible with the later FW?


Any ideas with this? :confused:

I’ve been some months away from my build, and I’m re-picking up this troubleshooting again.

I purchased 2 M8N modules to isolate the issue, the board behaves identically.

Latest try was with 3.5RC5 is just the same. I take off leveled, and after some seconds, the quad starts to roll right until is not controllable. (stabilize)

I land it, and if I try to take off again, it tries to invert itself if there’s no roll counter-input.
Do I just forget about anything higher than 3.4.x? Go back to 3.3.3?

I’ve had a quick look at your log and found the following:

  1. The GPS speed noise GPA.SAcc is too high to pass pre-flight checks, so the EKF never uses GPS. This means it does not do correct compensation for manoeuvre accelerations that can casue the horizon to lean over time
  2. The EKF tuning parameter EK2_NOAID_M_NSE provided to tune the attitude correction when not using GPS is not being used internally. I will submit a fix for this.

In the short term you should fix your GPS so that the log of speed accuracy reported by the GPS GPA.SAcc plot is below 1.0 and preferably below 0.5. Currently it is 1.0 to 2.0.

You can also try setting EK2_MAG_CAL = 4 which will make the EKF use a different method of processing magnetometer data that also helps with roll and pitch estimation. This helps if the magnetometer data is good quality and the magnetic field is constant (not flying low over reinforced concrete floors, etc).

Thanks for your review prise,

Tests were made indoors, even under those conditions, does the GPS play an important role (Stabilize mode)? (same behavior outdoors with Satellite lock and good HDOP).

By “fixing” you mean trying different parameters or trying another physical GPS? Cause I’ve tried 3 already.

The “leaning” over time disappears if I remove the external compass/GPS (works flawlessly under AC3.3.3)

I will try EK2_MAG_CAL = 4 .

Thanks m8


Paul’s going to come up with a fix for the EK2_NOAID_M_NSE parameter and we will release that with AC3.5.0-rc6 in about a week. So once that version is ready you might want to switch over to that. Until then, I think you might as well test with AC3.5.0-rc5.

Re “fixing”, I think Paul is suggesting it would be good to fly somewhere where there’s better GPS reception. If you think you’ve already been doing that, perhaps try removing possible sources of interference. GoPros and FPV video systems can sometimes produce a lot of interference so, for now, try removing those.

By the way, it looks like you’ve got an external GPS and compass which is a good thing but if you’re using an external GPS/compass I don’t think you should need to do the motor-compass compensation so might as well turn that off (set COMPASS_MOTCT = 0). This is not likely to resolve any issues but it’s just something I noticed while looking at your parameters.

In case it’s helpful while testing, you can turn off the GPS completely by setting GPS_TYPE = 0.

Thanks for your quick reply Randy (and Priseborough), I really appreciate you looking into this.

I’m currently running AC3.5RC5, same results (Copter flies like a beauty with AC3.3.3 as stated before, anything higher will trigger the behavior).

I thought it was better for the board to have 2 working compass, so they would help on its estimations. All FPV TXs and gimbal (even telemetry, mostly), is OFF while I’m troubleshooting. I start to add load to the build step by step.

Again, this behavior is in manual mode (stabilize), I’m not using any automated/GPS assisted modes. This is being performed indoors (as I always do with my beta builds). I did a test outdoor with a whole bunch of satellites in view, I will try this again.

So to resume:

  • If I flash AC3.3.3, quad flies a perfect hover (no HW added, same payload). I flash it to AC3.4 (or higher, including AC3.5RC05), quad starts to develop roll.

  • Mag has been always been external, if I select both Compasses, I would get BAD COMPASS HEALTH, and I would have to deselect the internal PX4 Compass. (Onboard Compass Calibration would not complete)

  • If I disconnect the external compass with AC3.5RC05, there’s no roll.

Maybe my PX4 board is not compatible with higher versions?

As soon as I get home I’ll start making some tests to get you guys informed. Once again, thanks for your inputs.

I checked again and the EK2_NOAID_M_NSE parameter does get used, you can try halving and doubling it to see what effect it has when flying before GPS checks have passed.

Thanks you again for your inputs.

I’ve made several flights on my roof with no success. I made a video showing the behavior as well. (too bad the throttle quadrant is not visible, but I use MODE2 and I don’t even touch yaw) I disconnected the ext. compass, same behavior.

https://youtu.be/_9vveWjSHW4 (last part of the uploaded BIN) Loss of altitude was due to excessive batt discharge, I know, I shouldn’t let the cells drop that much. They are set now in a safe 3.7ish storage charge.

I’m starting to suspect I have a faulty board. I have just plugged the FC to my PC, and just sitting there, the ADI develops roll to the right, which is exactly the same what happens when it’s airborne.

Now, is this a HW or FW issue? Cause that didn’t happen under AC3.3.3

BIN attached.

Params tested

  • GPS_TYPE FROM 1 TO 0 (gps off)
  • EK2_NOAID_M_NSE FROM 10 TO 20 and 5

Wish I could test some more today, but I need to wake up at 4AM for an early flight =/

Thanks again!
2017-05-09 17-35-34.bin (2.5 MB)