Servers by jDrones

APM Ver 3.2.1 questions about Rate_FF and Imax settings

(William ) #1

Thanks in advance for all help, I am still learning but things are improving thanks to many people giving advice.
Questions APM 2.6, Ver 3.2.1 450 Helicopter, I have been tuning with rate RLL and rate PIT set low at 0.05 and using rate RLL and rate PIT FF term increasing till I get osculation, up to values now like 0.36 and flying fairly well. Is this correct procedure or should I be increasing rate P values along with rate FF values?
Should I be raising rate P values parallel to rate FF values, using both at the same time, or is it OK to just be raising rate FF value?

Someone Please explain how rate Imax is used in tuning, and how to use this Imax term value when tuning?
Thanks again

(Chris Olson) #2

I have used Leonard’s tuning method on the APM with AC3.2.1 with fabulous results. What I would recommend is first setting ATC_RATE_FF_ENAB , 1 then set the RAT_ PID’s to zero on pitch and roll and start with rate FF value at 0.15 on both pitch and roll.

Tune the tail so you’re happy with it first - maybe you already have that fairly locked in with good settings. So don’t change those if you have the tail already tuned. The helicopter will be quite easily controllable with just the FF set to 0.15 on pitch and roll while tuning the tail so it holds nice.

Now, on roll first since it’s normally more sensitive, increase the FF value by .02 or so at a time until you can either see in the logs that the rate peaks are matching desired vs actual, or by “feel” - the aircraft responds the way it should to rapid stick movements. I have yet to tune one with a FBL head where I had to increase the FF beyond 0.22 actually. With a flybar head where the linkage rate is normally lower you may have to go higher. But FBL you really shouldn’t have to use more than 0.22 unless you have really really slow servos or slow linkage rate.

When setting the rate FF, the heli should not be sluggish. It should actually be quite snappy handling if you have it set right. As an example, hovering in Stabilize, if you snap in left roll, then immediately snap in right roll the heli should follow your stick movements exactly as you input them, with no delay. If you can’t do a rapid snap left, snap right, snap left, return stick to center and have the heli do exactly that then it’s not responding the way it should to rate commands.

Whatever you end up with for roll FF, I would recommend using that same value for pitch, except reduced by maybe .02. Most people like their helicopters to be a little slower responding in pitch due to the length of the tail so they transition smooth from forward flight to hover and so on, without being jerky. If you’re flying aerobatics doing loops or on-the-deck tumbles and so on, you may want the pitch to be more responsive. But that’s not typical for UAV heli’s.

Once you have the heli responding nicely with the rate FF, now tune the PID’s. The rate PID’s provide the damping to make this thing smooth. Do roll first.

On the roll set the rate D to maybe .003. Test hover it. If it shakes rapidly side to side, reduce it to .002 and try it again. If it doesn’t shake set it to .004 and try it. At the value where you get the rapid shaking, cut that value in half and enter it as the final tuning value for rate roll D. Enter the same value for pitch and test hover the heli, and make some rapid stick movements in both pitch and roll to make sure it’s stable.

Now tune the P gain. Again, do roll first. Start at maybe .05. Test hover it. Find the value that causes a rapid side to side shaking, cut that value in half and enter it as the final rate roll P value. Enter the same value for pitch. I’ve found with most helicopters that it takes ridiculous values to actually get a shake in the pitch axis with P gain. So I’ve gone to figuring that whatever I got in roll is going to be adequate for pitch damping. Again hover the heli and test it with rapid stick movements to make sure it’s stable. It should now start to feel a little smoother and more damped on the stick movements.

Now set the I gain. Set the I to what you ended up with for FF in both pitch and roll.

The IMAX value is the maximum buildup of the I-term gain that is allowed. The I gain provides the longer-term corrections to make the heli track desired pitch, roll and yaw in forward flight when it is moving at least 5m/s for more than 2 seconds. Typical values would be 4400 - 5000 for pitch and roll, and 3000 for yaw. The only way to really tune it is to fly the helicopter on autopilot. In manual flight modes like Stabilize it’s not going to make much difference because you’re flying the heli visually and using stick movements to make it do what you want. When it’s being flown by the autopilot in Loiter or Auto, and the heli is moving, now the I-gain becomes active and provides that longer term correction to make it track the proper attitude that the autopilot wants. You have to look at the logs and graph the desired vs actual pitch, roll and yaw. If it doesn’t match properly you can try increasing the IMAX value, or increase the I gain value.

Reality is that I fly most of my helis with the IMAX value set to 44% (4400) and I-gain around .25-.35. And usually a little more on roll (by about .02) than on pitch. That makes them track really nice in high speed flight. The faster you go in cruise flight with the autopilot flying it, the more I-gain I would recommend using. The attitude actual vs desired tells what you really need to make it track. This is an example of my 626 showing roll tracking in cruise flight. You’ll see it doesn’t track exactly perfect when the heli isn’t moving. But once it gets into cruise where the full I-gain kicks in, it tracks with perfection:

(William ) #3

Thanks again Chris for all the help, I will try to apply your tuning method?
Please direct me to Leonard’s tuning method on the APM with AC3.2.1

(Chris Olson) #4

Leonard never actually published his tuning method. He told us about it and several of us have been testing it. Since I am a test pilot on the project, my job was to see if I could crash a helicopter with it so you don’t have to. I refined the procedure somewhat thru testing it. Bill plans on updating the wiki to reflect this safer and more refined method of tuning trad heli’s.

I tested it on every version of software from AC3.2.1 to 3.5rc8.


I have retuned my RJX520 with the new tuning method as Chris is laying it out in precise details in several threads. The old method as it’s written in the Wiki at the moment is not good at all. More dangerous for your aircraft.
The new way is easier and my Heli is flying better than before. I will also retune my TR700 soon too with this method.

(William ) #6

Is there a full write up guide for this tuning method Chris is speaking of?

(Chris Olson) #7

There will be as soon as Bill and I get the wording and formatting right for the wiki. Bill did a rough draft for the General section, I have do the procedure section, then we’ll review it and PR it to the wiki.