I'm opening this up to try and get all the discussion about yaw problems into one place so that it's not scattered. I'm working very hard to fix the yaw control because it seems to be the #1 complaint about the general flight characteristics currently. It seems like everything else related to "just flying around" is doing quite well, except for yaw.
I'd like to start by enumerating the individual problems. Please feel free to let me know if I missed any.
1) Copter "bounces" after entering a yaw command and then stopping.
2) Copter oscillates back and forth when yaw stick is centered. This is predominantly a Tricopter problem, but I'd like to know if any quad/hexa/octos have this problem. Any amount of oscillation is too much. So if you have logs to show it's oscillating 1°, I'd like to see it.
3) Yaw is too slow. Currently, yaw speed is controlled in a round-about way by Stab_Yaw_P. So to yaw faster, you increase Stab_Yaw_P, but if it's too high, it can lead to steady-state oscillation. This is obviously a problem. I think I have also just identified a situation where the yaw rate is also capped, no matter how high you turn Stab P.
4) Copter turns the wrong way if I try to turn it slowly to the left or right. This usually only happens in one direction. For helicopters, it's usually when you try turning to the right slowly, it will go left at first, until you feed it a lot of yaw stick, then it will start turning right, and then may turn right too fast. After releasing the stick, it will often turn left again before stopping. I believe this also really affects Tris, but should not affect quad/hexa/octo unless your frame is bent/motors not straight. But I'd like to hear about it if you have a problem.
5) Copter rotates when I punch up throttle. This is largely a TradHeli problem, and we already have a fix (Coll-Yaw) but I would like to know if it affects others. I would bet that it affects Tris too.
So far, I have already boiled down a lot of these problems and understand them very well. I had made a yaw fix that was in 2.6Delta, but it was pulled before release because come people didn't like the way it felt (it was a little slow and "springy", but it is VERY precise). I am working on something that will make everybody happy. Dave has a copy of that and I'm waiting for him to test it. It includes a somewhat radical change: gain scheduling. This is an attempt to make the copter STOP NOW when you release the stick. Basically, if you are yawing, and then return the stick to center, and it is yawing too fast (overshooting) it doubles the output from the yaw controller. I have no idea if it's going to work and haven't even flown it myself. Hopefully it's not too screwed up and just causes a crash, I don't like trying to code without testing myself, but that's the situation I'm in right now.
I did just check in a small change into trunk that is pretty simple, and targets a number of these problems. Hopefully this should be tested and go out in 2.6.1. Basically, there was a bit of code that constrained the output from the yaw controller excessively (I think) when the stick is in the middle. This prevented the copter from being able to stop yawing, and contributed greatly to the "bounce". I already got rid of this for TradHeli, and it helped a lot. So I've also gotten rid of it for all other Copters and that will get tested soon.
Now, problem number 3) is going to require a new parameter, where you rigidly set the yaw speed relation to full stick. I'd like to set the default to something that most people are happy with and won't even have to worry about that parameter. Can we get a consensus on how many rotations/second most people want? 1 rev/second? 2? 1/2?
Replies
I just test flew my code on a 3DR Quad. Works well, no problems yet. But yaw control is SO soft on quads!
I have a question my Y6 tends to want to yaw left when take off and during flight. I have level it and set some trim to but it just dont feel right when flying.
I used to have the xaircraft Fc on but its motor layouts is totally different on the xa all the pusher props if im not mistaken is on the bottom side.
on the APM the two front arms is pushers on the top side and on the rear side pusher is on the bottom.
Wow, nothing?
I have a new theory about problem 2). I believe this is to a large degree, being caused by imbalanced motor torque forces. A tricopter has 2 motors turning one direction, and a 3rd motor turning opposite. This is in contrast to a TradHeli, where all the rotor torque is in a single direction.
Helicopters have an issue where, when you jam the throttle up (collective pitch), there's a strong yaw created. We have already fixed this for the most part by using a feed-forward, where basically a little bit of opposite yaw is added according to how much collective pitch is being used. So the rudder servo actually moves at the same time as the collective pitch servos. It's pretty slick and works well.
I think Tris could benefit from something similar. However, they have another problem. The yaw reaction is constantly changing just due to the Tri trying to stabilize itself. Particullarly in the CCW/CCW/CW configuration, if you enter a roll command, the yaw reaction completely changes. So in addition to the problems of lag with the yaw servo, you have a problem where it can never settle down even if you're not trying to yaw it.
So what I would like to do, is may yaw compensation feedforward similar to the helis. Basically sum all 3 motors, or sum 2 and 4 and then subtract Motor 1, depending on the configuration. Multiply that by a parameter, which feeds forward into the yaw controller.
What do you guys think, is this an extra step that will be too confusing?