Trex 450 Tail Rotor Tuning

I am looking for advice on the best method to tune a tailrotor. Thank to Chris Olson the Pitch and Roll are brilliant.
At the moment the tail is feels locked in for a few moments then starts to oscillate and settles down again the gains are below. This is on a Trex 450 with no gyro


David Ardis

David, most tail servos are very fast. With the new attitude controller in 3.4 and later I like to get rid of the feed forward and use settings like this. This is from a 500 with a Futaba 9254.

ATC_RAT_YAW_D , 0.007
ATC_RAT_YAW_I , 0.28

Basically speed up the rate PID loop by setting the low pass filter to 25Hz. Use more P gain (and usually quite a bit of D gain). If you get a very rapid oscillation of the tail you may have to reduce the D gain a bit from what I use.

Since the tail servos are so fast I shorten the linkage a little bit too for UAV use by moving the linkage ball on the servo arm in closer to the servo shaft.

With the old attitude controller in 3.2 and 3.3 it used to take some rate feedforward on the tail, and the filter was usually run at 4Hz by most people with heli’s to get them really stable with no tail twitching. It took a lot of experimenting to find out setting that filter higher and increasing the P gain seems to steady them out.

Chris thanks for these setting and look forward to trying it in the few days. Had the trex out this evening and the suggested setting for pitch and roll are working really well despite the existing tail tuning being a bit of a mess. In Loiter its doing a few circles almost like its starting to toilet bowl then it settles into a good solid loiter.

Might want to take a look at your vibes and IMU aliasing if it’s doing that in Loiter. That’s usually the cause. It should just lock into a good solid hold. Of course, the tail could something to do with that too. So I’d fix that first.

Finally got the your suggested tail setting tested and is much much better only got a brief hover before the rain came on again. Could you take a quick look at the enclosed log in particular the imu acc y.


David Ardis

2017-08-18 18-38-40.bin (959.5 KB)

You have some aliasing of the IMU’s on X and Z, Y looks good. Your vibe levels are also not that bad. But I see it logged a Bad EKF variance during runup and three seconds later decides everything is ok now. I honestly don’t know why it did that - the vibes were minimal and IMU aliasing was not bad at that point. Unless you don’t have the internal compass disabled?

I had one do that once (Bad EKF variance during runup) and it tried to do a flip on takeoff in Stabilize mode. And I had to wrestle it because it was already off the ground. Got it landed and then it thought everything was just peachy and flew fine. I actually hate when they do that.


I will check the internal compass is disabled. What do yo mean by aliasing when I look at the logs I see on the imu accy chart has bigger values that accx.

What are considered acceptable vibe values 15 is the number mention in the wiki

David Ardis

Compare the accel x, y and z values between the two IMU’s. They should be the same. We’re processing signals from the IMU’s and aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. So you get distortion or artifacts that results when the signal, reconstructed from samples, is different from the original signal.

On vibes, generally 3 is considered pretty good for x and y. Z can go up to 15. Now, that being said, I’ve flown piston helicopter that have vibes around 30. And yet I get minimal aliasing of the IMU signals. So it has to do with the frequency of the vibration as well. Helicopters can have both high (drivetrain) and low (blade lift pulses) vibrations. Generally, the higher frequency vibrations cause more issues than low freq. I’ve seen where I have perfectly acceptable vibration levels, but still significant aliasing of the IMU signals. I had one helicopter where this was a problem and it was caused by a plastic sheath on the GPS/compass cable being in contact with the Pixhawk. That cable was zip tied to the frame. It was picking up high frequency vibration from the drivetrain thru the frame and transferring it directly to the case of the Pixhawk. Trimming the plastic sheath back on that cable magically fixed it.

I tried to use this as my baseline yesterday when I went out to refine my tune, but without adding some VFF, the tail wouldn’t hold at all.

Wow. That’s a lot of P and D gain too. Do you have a really slow servo, or maybe shortened the throw of the servo horn?

When I say ‘not hold’, I meant that it would continuously rotate to the right, unless I manually countered it. A healthy dose of left yaw and it would hold steady. I experimented a bit with various P/I values, but it made little difference.
Log files are still on the heli. I’ll get them transferred later tonight. (I do it via USB, as I have a habit of misplacing my microSD cards).

P.S. That Synergy E5S of yours looks extremely smooth. Is that a stock drive train?

Did you try some rudder trim to see if that helped? Increasing P gain in hover should eventually make the tail shake. Increasing I gain in hover has little effect. You need to use the ILMI param to set the hover I gain. If you set it too high and add rudder input on the ground during runup using too much ILMI can cause a rapid snap to a new heading.

Yes. The drivetrain is stock, not modifed at all.

Colour me confused. Went re-do the tail tune and it was happy without any vff??
Still in compass variance hell. This has me stumped. I’ll calibrate the compass, everything will appear fine and then shortly after, it’ll be off.
Decided to replace the micro-UHF RX with a frsky XSR in order to eliminate UHF noise as the cause.
Initially looked like the right idea. I was able to calibrate both internal and external compass at the same time.
Did a bunch of work on the heli replacing a broken landing gear mount, fired it up again and…compass variance warning.
Might just stick it on a boom way in front and see if I can replicate it. Quite happy with the way it flies in stabilize, but obviously can’t do any auto missions, which is the main purpose of this heli!

You don’t have compass learn accidentally enabled by any chance?

It could be a faulty mag chip too. Two things I’ve done to check for a bad drifty mag chip is to disable the external and use the internal. It will be off (usually, but not too bad) and if the calibration problems go away then I highly suspect a bad chip in the external. So swap it out with another unit from another aircraft and try it. If it holds with a known good unit I order a new mag chip and replace it (they’re only about $5).

Oh, I just read this part Jakob. You’re not using both compasses, right? On helicopters it would be very rare to get two compasses to agree and you’ll get constant errors. Use only the external one.

Something is not right with this either, but it could be a drifting compass, or compasses that don’t agree. So I’d get the compass issue sorted out first before suspecting a binding linkage in the rudder or a servo problem.

I’ve tried both. Mostly just the external. Tried different GPS unit.
I’ll get a separate module. (They’re cheap anyway) and while I wait for those to arrive, I’ll stick the GPS on a short boom in front, where the wiring will not pass anything else.
It’s karma, as I was recently telling someone that getting compasses calibrated was easy.

Rudder/Yaw issue:
Pretty sure now that it was a confused accelerometer. Shortly after it complained about inconsistent accel values and required re-calibration.
In any case, as mentioned, I re-tuned it without any VFF now. :slight_smile:

Possible solution, as I have same type GPS unit: Supposedly it needs to be set to roll180 as the magchip is upside down?
My wife was working the studio and hates the compass-calibration beeping, so didn’t get to try it out. It would explain a lot!

Actually, I thought roll 180 was the normal configuration for the 3DR external GPS/compass module for Pixhawk? Other manufacturers may orient the Z-axis of the chip the other way. But if it’s a 3DR design it should be roll 180, I’m pretty sure, and the x value should increase as you roll right, etc.

Well, it certainly explains a lot…(This is a lesson I wont soon forget)

Well. It does not need to be rolled 180. However, I ran my phone compass app up next to the shaft/servo area of the heli and it gets up to 70 degree offset, some of it quite abrupt.

Moved the GPS back on the tail boom (And fixed the cracked support which should help on the vibrations) and I could not induce a Compass Variation Error on the bench, which I was able to do in it’s previous location. Still appears off by 5-8 degrees compared to my phone, but it’s a consistent variation, so I’ll take it.

There’s also a compass offset tool in the Ctrl-F menu in Mission Planner, which appears to calculate the offset based on a previous log. I might just send it up, do a bunch of circles and then use that.

Compasses are so much easier in planes :slight_smile: