Uncommanded yaw

Hello All,

Today I have experienced an uncommanded yaw. I was flying with my hexa ( very stable setup, more than 100 flights ). It was very windy, i was going towards the wind, when I have decreased the speed to have a stop. the copter gave three bumps of left yaw movement.

The log shows that it wasn’t commanded, however desyaw and yaw seems to match. That’s weird. The motors wasn’t topped. If you listen to the motor sound you can clearly hear the bumps. I’m uploading the video to youtube, in meantime here is the flight log and screenshot:

It started around 26 till 30
Log: https://www.dropbox.com/s/868j66d72rdaa6k/2016-07-24%2010-33-16.zip?dl=0

Youtube video: https://youtu.be/alzd2AJzyLE

First thing I notice is that your mag field deviation is 55 percent which MP notes as a failure. If in loiter/poshold, that could cause uncommanded yaw. Have you calibrated the compass and run compassmot? Is this a new location you’ve flown and if so, are there a lot of power lines in the area?

Hello, Yes, compass calibrated ( and recalibrated yesterday as well ). A few 13.5Kv power line, however it has never happened before. Yesterday night I tested it in another area ( without power lines ) and after decelerating from 70km/h to 0 it happened again. I started to recheck the hardware and realize that two motors were with an small rotation on its axes ( by one degree ). It could be the reason. I will try again and let you know.

It is important to note that it only happens when decelerating abruptly. I flew two packs yesterday without any glitches. Don’t know if it can rule out the power lines or compass. If you see on the logfile both compass tracks very well among all flight and EKF innovations for compass are very small.

Ps. regarding mag filed error, it started happening since the upgrade to 3.4rc1, despite everything else is OK and that it has never happened before with 3.3. I’ve seen a few people reporting this very same situation, so I don’t know if the warning threshold level has changed or if it is a mistake.

Hello,

Today I could reproduce the same behavior three different times on the same flight. Today there were almost no wind , so I can rule out it. No power lines ( more than 20 meters away ) . I have fix all possible hw problems ( inclination offset , balancing etc ) that i could imagine. So i really believe that it is not an Hw problem. I have also tested the motors just to make sure that it isn’t a desync issue. Quick facts :

  1. Only happens when decelerating fast ( sometimes happens at 50Km/h but always happens at 70Km/h ).
  2. never happened before 3.4rc1
  3. Maybe ( not sure or realized before ) it started happening after my autotune on 3.4rc1 .
  4. have only made x and y autotune ( not yaw ).
  5. It always recovers by itself ( fortunately!!! )

By the log:

  1. It looks like the AP intend to do the turns by its own: desyaw and yaw track
  2. uncommanded ( ch4 in steady )
  3. The motors got a real bad time and all went crazy when it was happening
  4. vibrations and yaw tracking seems nice and reflects the video , thus not indication of a compass issue
  5. compasses track each other very well, external( original 3dr device ) looks really smooth while internal ( PX4 ) has some noise. Both are active, primary is external ( 3dr).
  6. no ekf errors ( and I don’t really remember having had any ever on this drone )

I would really be pleasant if anyone from ekf team could take a look. It could really be a bug. I can reproduce it easily.

My planned tests :

0.5 - disable internal compass

  1. redo (again) compass calibration and compassmot
  2. redo autotune
  3. get back to old pids ( 3.3 )
  4. get back to 3.3

Log: https://www.dropbox.com/s/88rmvao975xxq55/2016-07-30%2009-34-04.zip?dl=0
Video: https://youtu.be/BluPSfX_RTs Uploading… ( will take a little while )

Started at 44 - Yaw and des yaw match / motors having bad time

Yaw and desyaw vs ch4 in ( yaw )

EKF2 shows one time high innovation after the copter corrected its wildness, however it doesn’t seems to affect the yaw behavior.

Questions:

  1. Assuming anything is wrong with compass / ekf or wherever can deceive the autopilot to do something wrong, why desyaw and yaw tracks?

PS. Will continue do debug and post my findings about this flight

Hi Fernando,

You are not the only one seeing this issue, but I’m going to direct you to the answer Leonard Hall gave in the other thread: ArduCopter 3.4-rc1 Navio 2 random yaw spin
As you can see, Leonard recommends running autotune on yaw which you haven’t done. So please try that and let us know how it goes.

Thank you for your testing.

Thanks Francisco.

I haven’t. Unfortunately the weather isn’t good enough to autotune today ( maybe not tomorrow as well ) . I will try tomorrow early morning. In hope that it helps.

I wasn’t expecting the desyaw to be dragged by the copter behavior. If its the standard behavior, it could explain a lot of things.

I will post back as soon as I run autotune and the very same tests.

Another find that I’ve missed is that NKF4.SH had two peaks on the very same moment that the problem occurred.

It could show that in deceleration it went close to a big vortex ring state which the copter has managed very well.

Maybe, not the cause, but the effect.

Hi,
I suspect that this is a problem with the heading reset in the controllers in rc1. I suspect that this will be fixed in rc2.

Sorry about the inconvenience.

Thanks for your help!!!

Thanks Leonard.

I was reading issue #2507 and it states that in loiter, poshold the yaw shouldn’t be dragged by current yaw or by external forces, only in manual modes. Don’t know if what happened to me is related to this or not. If so, it could also indicate that the behaviour to not follow current yaw wasn’t applied.

Regarding autotune, I couldn’t do it today because of the wind. I will try again tomorrow. After rc2 is released I’ll test again and report back.