I need some help in setting up yaw PID's. My TBS Discovery with APM2.6 has a poor yaw performance. It seems not very locked and what is most annoying it is slowly oscillating which is most visible in onboard video footage.

To get to the root of the problem I did some log analysis and found that actual_yaw is indeed tracking nav_yaw but leaves some +-3 degrees slow oscillations. Please have a look at this log screen and my current PID's. Any ideas where to start or how to systematically set up the yaw PID's?



Views: 19500


Reply to This

Replies to This Discussion

I have the same issue with my QAV. I don't run any Yaw D, but have tried Increasing the rate Yaw P up to 0.45, but I don't think it has really helped much. I still get some uncertainty on the heading, and it's ruining a lot of video.

I think I remember a while back someone saying not to run Rate Yaw D, but I'm not sure if that advice still stands (or why it was even said)

Thanks for your reply. I'll try without rate_D. Maybe some developers can share some inside view.

When tuning the yaw I would suggest keeping the Rate I term 1/10 the Rate P term to keep the overshoot after a yaw command, to an acceptable level.

Start with the Rate D set to zero. Increase Rate P on the slider between something like 0.25 and 1. If this doesn't help you can increase the Stab P term but don't go over about 8 without doing an AutoTune to see what the maximum safe value is.

Thanks Leonard. So just keep turning Rate Yaw P up till you see it oscillate, then back off a bit? Is adding some Rate Yaw D ok? What is the range of Rate Yaw D you would recommend working with?

Hi Glenn,

I haven't pushed the Yaw that high because it has always been good enough for me. My concern is that it may be very hard to tell when it starts to oscillate because the oscillations could be very fast and very small.

I will probably experiment with an autotune for yaw to see where it goes but until then I am really just guessing.

In general though follow the I to P ratio I gave you (I have experimented with that), and then use a similar approach to tuning roll and pitch. When you are doing it, listen very closely to the motors for fast oscillations though.

Thanks Leonard,

I tried increasing rate_p yesterday and it seems to work better. Still, looking at the logs, there are some oscillations remaining. However they were not visible on video. I was wondering about some of the descriptions in MP full parameter list. For rate_p it states range 0.15 to 0.25. Also some of the IMax ranges seem not to match the real and advised ranges.

In general I am not so much concerned about minor overshoots. I'd rather have a very stable, non-oscillating heading hold as oscillations will ruin all video efforts.

I'd very much appreciate yaw, althold and loiter auto tune as they seem to be less easy and intuitive in manual optimization.




Can you share your YAW PIDs please, how is it working so far?

Michael, I am having the exact same issue, with a TBS Disco Pro.

So I'm a little confused

P: 0.2
I: 0.02 (1/10th p)
D: 0


Are we saying bump up the P to say 0.3 and leave the rest as is to see if in stops it?

Can you post your latest PIDs doe yaw P/I/D/Imax

Here is what I have

This is my current PID's

Thank you very much for such a prompt reply, I hope it stops my oscillation, this has been driving me nuts.

So it sounds like the more I increase the P the less oscillation, not really sure what the I does, but with increase risk of waypoint overshoot.

here was mine :(

Once again thank you for taking the time, I'll try it out in the morning.

plz post videos after the PID change, also I think the max number for the YAW P is 0.3

Oh dang yea, I hope that wont cause it to be uncontrollable, actually 0.25 is the max, I wonder if anything over 2.5 actually does anything?  Guess Ill change it to 2.5 as I don't want to crash

Yaw axis rate controller P gain (ArduCopter:RATE_YAW_P)

Yaw axis rate controller P gain. Converts the difference between desired yaw rate and actual yaw rate into a motor speed output

  • Range: 0.150 0.250
  • Increment: 0.005

Yaw axis rate controller I gain (ArduCopter:RATE_YAW_I)

Yaw axis rate controller I gain. Corrects long-term difference in desired yaw rate vs actual yaw rate

  • Range: 0.010 0.020
  • Increment: 0.01

Yaw axis rate controller I gain maximum (ArduCopter:RATE_YAW_IMAX)

Yaw axis rate controller I gain maximum. Constrains the maximum motor output that the I gain will output

  • Range: 0 800
  • Increment: 10
  • Units: Percent*10

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service