This should be interesting

I think this is mostly due to the fact that we haven’t got the I gain tuned well enough that it is capturing an attitude when you displace the stick.

Bill,
in the flights last night it was definitely trying to drift back and to the right assuming a tail in orientation. When it comes to I gain, I’m assuming there’s an upper limit at which point it doesn’t help anymore? I’m at .10 I believe now, I noticed Chris was up at .38/.35 with his 500.
Just to be certain, too much I gain will give me slow oscillations in a hover correct?
Tim

A poorly tuned PID means that it is not capturing the commanded rates accurately and quickly enough. Yes the P and I gain have to be large enough so that the commanded signal is tracked tightly. The D gain is looking at the rate of change of the rate command and if you think about it like the cruise control in your car, the D gain anticipates the hills and adds gas early. The control system is more sensitive to the D gain and oscillations can start with as little as 0.001 for a D gain. It would be nice to use but typically most can’t because it invokes oscillations.

I’m still not sure about this because it will be different when ILMI is nonzero and zero. I know that it should hold attitude much better if you increase the I gain. With zero ILMI then it will probably take a lot more I gain to hold attitude as it would with a nonzero ILMI. However the drawback to a nonzero ILMI is poor air/ground transition especially if you are on uneven ground. So you may need a lot more I gain to achieve descent attitude hold if you keep ILMI zero.

Well, this is where things get confusing. I don’t retune a helicopter to carry a payload, I expect it to be more sluggish because it’s carrying a load. If that load the normal part of the helicopter, then tune for it. If the helicopter carries varying loads like mine normally do, then you can’t tune for it.

The PID loop is a proportional-integral-derrivative loop. So if there’s an error in attitude, the P gain provides the proportional, or near-term correction to get to the target. The I gain integrates the error and provides the long-term correction needed to make it hold zero error. The derrivative acts like a shock absorber. If the P tends to over-shoot the D will dampen it and prevent the over-shoot. Using some D gain tends to soften the P a bit, but some people can’t use any D gain because it causes oscialltion problems. I can and it makes the P gain more accurate in what it does.

As far as the VFF, as I stated before I fly my flybars with just VFF. The PID’s are turned completely off. While there is some disagreement on what a flybar actually does or how it works, it’s really that simple. Just turn off the rate PID loop and use VFF and turn it up until you get the control response you want, and it holds actually better in the wind than the DFC helicopter does in Loiter.

So I think the flybar does the same thing as the rate PID loop. For FBL just set the rate PID loop so it flies like a flybar in Acro and you got it. The trick is arriving at the settings to make it do that. And every helicopter is different.

When I tuned my Trex 500 I inititally went for the high P values in the rate controller and I got it up to .19. But after I flew it for awhile it just didn’t have that flybar “feel” and stability and could be pretty easily upset in flight if I started pushing the speed. So it was way over-tuned. I didn’t do any “formal” PID tuning after that point. I just kept turning down the P gain, turning up the I gain, and turning up the VFF on subsequent flights until I got it to where it feels more like a flybar helicopter. And those settings are what I posted above. Except the VFF is turned down just a tad right now for my wife to fly it, so it’s not quite so quick on response.

So I tried it on an auto flight with those settings and it flew the best its ever flown in Auto. Not as stable as my flybars. But it’s really close. Some people fly I gain up to .5 in their helicopters. My Trex 500 doesn’t need that much. And I found out I can reduce the P gain and get rid of a lot of the quirkiness and jittery characteristics it had, and lean heavier on the VFF and it’s lot smoother.

So what I ended up with in my FBL heli is first trying it the “textbook” method and got a fairly decent flying helicopter that I just wasn’t happy with. It reminded me of flying a full-blown, sharply tuned 3D heli in scale flight. It just wasn’t smooth. So then I went the trial and error method to find that flybar “feel” that I really like. And that’s what I ended up with. What’s funny is that when I first tuning that thing I had it about where I got it now and tried it on an Auto flight and it was horrible. So I went with the whole tuning adventure. Ultimately I ended up basically back where I started, except I got WAAY more VFF now than I had the first time, and that made all the difference.

I don’t know if yours will tune that way or not. But it gives you an idea of what to look for in how you want the heli to feel. Do you like the sharp 3D type tuning? Or do you like flybar? The trick for me was in finding the right settings to get the flybar with good Loiter/Auto performance.

Chris, I’m very interested in the set up that you have on your flybarless helicopter. Would you be willing to gather some data for me? I’ll have to compile a special version of code that logs the stick inputs at a higher rate. I’ll have you do a special test maneuver where you would just increasingly move the stick back-and-forth at higher and higher frequencies. we call it a frequency sweep. It would enable me to see the behavior of your helicopter with your ideal settings i’m curious to see what it looks like.

Bill, absolutely. Just PM me with the details on where to get the binary of the custom build to test it. For that test I will turn the VFF back up to where I had it before I detuned it for my wife to practice with, though. I was using 0.15 VFF on both pitch and roll for me.

Great! The fact that you’ve had it at high speed and found the high P gain to have an adverse effect on the flying qualities is interesting. I have seen this with the multicopter at work. It has a bad pitch oscillation in auto mode with winds greater than 10 kits. I haven’t had a chance to manually fly it at those speeds to see if it is the PIDs of the rate controller or the coupling of the auto controller with the PID rate controller. I’ll be in touch over the weekend with details.

Multi-rotors are kind of a different animal because they go into a such a radical frame angle to achieve any forward speed that their power requirement goes way up, and they don’t go into ETL. With the helicopter it’s when it goes into translational lift and gets really efficient is where the P gain needs to be dialed back and it needs more I-gain. It’s just like a full-size one at high speed - it takes really smooth cyclic inputs so it doesn’t do something really bad.

Chris,
I actually did a level flight performance test on a multirotor last summer. I was interested in “ETL” and seeing whether multirotors have the same shape to the power versus speed as helicopters. They actually do have that same shape. They experience the reduction in power required during transition to forward flight. I was able to calculate a bucket speed and the endurance for the aircraft. This was a Y6. I think I’ll look at this for our X8 this summer. I think the are more draggy, at least the ones I fly. So I do think overall they are less efficient than Helis.

I think im just going to go at this the un-scientific way and just start tweaking the P gain up a bit, im going to slide my packs forward a bit to adjust the cg, then add in more and more I until it feels okay.
My only question is that after i get P and I set, if i add in .001 D gain, will it go all to heck and ossicilate if its going to? Or should i add in the D before getting P and I up as high as they can go? Will there be a cumulative effect with the instability is what im asking? Should I add in the D now if im going to, then bring P and I up a little bit at a time?
Tim

Good question. I think it isn’t ok to increase the D gain after setting the P gain. Especially if you have the FILT parameter at 4. Plus you can put the D gain at 0.0005. And start there

I guess that’s what I did with mine. I just put the .001 D gain in it one day and it didn’t seem to do anything. So I left it. But I do know from tuning multi’s that can use a lot of D gain, that even if you can use even a little bit it helps it to be more accurate.

On that low pass filter param, that’s an interesting one. It slows the rate PID loop and I had to try it at 2 and 20 to get a feel for what it did. It definitely slows the response when you set it lower. So I kind of adjusted it by “feel” and not really any science behind it. My helicopter tends to be a bit touchy in the pitch axis due to the low headspeed and heavy payload with a big 10A battery under it. So I think I ended up with a bit higher setting on roll than I did pitch. And I slowed the tail way down with that FILT param.

I think what that does is set the number of times the PID loop runs, per second. So it must have an effect on the I-gain? Like if the PID loop is running slower, the integrator can’t build as fast? I don’t know.

The FILT parameter sets the low pass filter cut off frequency. Essentially the filter is removing the higher frequency inputs( both yours and the controllers) above the cut off frequency. So it will slow down your fast inputs. Especially if you set it at 2 hz. That is why I dont recommend it being set to anything lower than 4 hz.

I guess you could think of it as putting your aircraft in water and then as you lower that frequency you put it in the denser and denser liquid so it essentially slows the response down

So i should try D gain at .0005 before i bring P up if im going to use D gain? If it doesent ossicilate, then its a good thing to have D gain correct? As it can smooth out ossicilations in of itself if im understanding this correctly?
Tim

Tim, the D gain is like a shock in your car and springs are like the P gain. So you hit a bump and if you don’t have any shocks, what happens? The car bounces up and down. If the shocks are too stiff, what happens? The ride is really rough just like you got no springs.

Some people cannot use D gain at all with their helicopters because the shock absorbing, even a little bit, is too stiff and it just shakes the heli like a leaf. I would try it at .001 and not .0005. I don’t know if .0005 will even be accepted by the FC, but it might. Anyway just putting in .001 will tell you if you can use any at all. If you get immediate and rapid shaking on gentle liftoff, then set it back to zero. If you can take off and hover like 6" and it don’t shake, then leave it - it won’t hurt anything. I think it’s all going to depend on how fast your servos are, the mechanical rate, etc…

I had to smile when I read this, Bill. That is EXACTLY how it acted when I played with it. But I had to set it to the extremes to get an idea of what to expect with it.

Okay, so i have I gain at .17 on both pitch and roll, i added in some D gain, .0005 on both pitch and roll as well. Ill test fly that in a bit if the darn wind dies down. :confused: Unless everyone thinks the D gain is a really bad idea? I was thinking at least trying it before i brought P up again?
Tim

Whoops, missed the bit about .001 vs .0005. I can say it accepted the value of .0005. Dunno?

I’ve used 0.0005 before that is why I suggested it

There’s another thing that’s kind of weird with this, Tim. Since we tuning the rate controller, the P gain is actually the damper for the attitude controller. If that makes sense. So the D gain is damping the damper, again if that makes sense. If you can use it it helps prevent the rate P from over-shooting its target when it makes that short term rate correction for attitude error, and sends that rate to the attitude controller.

I think that what makes some people’s heli’s shake with D gain is the fact that it provides too stiff of damping, sort of like using really stiff damper rubbers in the head of a flybar helicopter, which will make a flybar shake like a leaf. The damper rubbers in FBL heads are way stiffer than flybar ones are because that is all done in software instead of mechancal bits.