Servers by jDrones

Tuning Yaw on Microcopters

@Leonardthall and I discussed this yesterday. I think microcopters have similar issues on yaw to very large copters with efficient props - they need extra tuning to get a crisp response. Here is the Leonard method with my tweaks thrown in:

  • Autotune on Yaw (very important to do this first)
  • Increase ACRO_YAW_P - I set this to 10 and it gave me good response on a 4" but not so good on a 3"
  • Increase ATC_RAT_YAW_D until you get yaw oscillation, then reduce it to 50% of that value. For my 3" this was quite high - 0.0035
  • Increase ATC_RAT_YAW_P until you get yaw oscillation, then reduce it to 50% of that value.

Sorted

2 Likes

Thanks!
And yes, I have come up with surprisingly high yaw values on my copters. And added D term.
So, did you then add filtD? If so, what value?

I also found higher yaw filters reduced the issues I was having… what did you end up with for the filters? Autotune likes to put filtE down to about 4 for me, but I had less occasional oscillations after increasing it.

@Leonardthall always encouraged me not to increase the filter from autotune values, so interesting if it helps. What sort of value are you using?

I have my test copter plugged in now… about to fly.
This one has filtD at 50, filtE at 15, and filtT at 20.
All completely random.

But, after auttune, filtE was at about 4, and filtT was something low… Maybe 5? It also set my P and I pretty low, at about .15. And that oscillated. The first thing I did was only to increase the filters, filtE to 15, and filtT to 20, and the oscillations were gone on the gound, But I had other issues in the air… it would just slowly start yawing around at times. Then increasing P and I, and adding D term took care of that.
That’s basically where I am now. So now, I’m going to try using your method above. Maybe I’ll lower filtE first.

I think that filtE maybe the only one that really matters. Because in yaw the effect is instantaneous from the motor bells whereas on pitch and roll you are dealing with props and air

1 Like

A quick summary of what I suggested Andy. Most aircraft do not require this additional step. It does mean that yaw occupies more control bandwidth and that can impact the performance of some aircraft so only do this if you really need to.

To push Yaw to the next level:
keep filtE generated from autotune
Do a manual tune on D like you would for roll or pitch
Do a manual tune on P like you would for roll or pitch
Set I = 0.1*P

For detailed descriptions of manual tuning look at the tuning process page in the wiki.

2 Likes

Multicopter yaw is a little weird and worth looking at separate from pitch and roll. The default yaw rate d gain in ardupilot is 0, not because the target yaw angle is not magically overshot but because the change in rotational momentum of the motors and propellers act as that input. Here is the derivative input to yaw with no propellers.

1 Like

Yes, that is why I designed the yaw controller with the single pole filter on the pid error term rather than then D term. The frequency of the filter controls the magnitude of the mechanical D term caused by the rotational inertia of the motor bells and props.

Autotune treats the filter setting in exactly the same way as the D term on roll and pitch.

Now that I have seperated the error filter and the D term filter it makes it possible to treat the result of autotune as linearisation of the actuators and then manually add D term in the same way you would roll and pitch.

I have found that this approach has improved the yaw performance on some agile aircraft and improves the response on large aircraft. As I have said though. This is not needed for most aircraft.

2 Likes

How about mechanically have motor thrust angle? Will it help?
Thank you.

1 Like

Yes, offsetting the angle to enhance yaw equally on each arm will help yaw and move the tuninging methodology a little way towards a standard roll and pitch tune.

2 Likes
Servers by jDrones