Help required to eliminate rearward drift

I’m in the process of manually tuning my TRex 500 heli in a scale fuselage, following the ‘Traditional Helicopter - Tuning’ pages. I’ve done a couple of test hovers and have modified ATC_RAT_RLL_FF and ATC_RAT_PIT_FF and. after a couple of iterations, I’m getting desired and actual closer to each other. But my main issue at the moment is the heli is drifting backwards in both Stabilised and PosHld modes – though not so much that I can’t hold it with a little bit of forward pressure on the pitch stick. Is there a parameter I can change to get rid of this drift, or does it come down to my mechanical setup (although I think the swash is well levelled).

Attached is a link to the log file from the last flight. I’ve since modified the _FF values to try and achieve a better match of desired and actual roll and pitch. Is there anything there that might account for the rearward drift, please?

Os the c pf g at the main shaft or a little forward of this point? And is fc level calibrated correctly? Im not sure that these are your problem but just throwing general ideas that can cause rear drift in traditional heli

Hi @abenn1,
beside checking board leveling and mechanical setup you should increase ATC_RAT_PIT_ILMI (now you have it at 0.05, default value, try setting it at 0.08). Also before trying automatic modes you should perform the tuning. It would help if you set logging for PID as well.

Thanks guys. The c of g is at the main shaft. I use a larger battery than recommended for the TRex 500 to counter the extra weight of the fuselage at the rear.

I thought I was logging everything, so I’ll correct that parameter. I note that the wiki says that ATC_RAT_PIT_ILMI is for advanced users only – will it have an effect on the heli’s flight attitude?

It is integrator limiter for pitch rate controller. It limits how much rate controller can compensate for bias. If set too low rate won’t fully trim so there will be “fixed” deviation in attitude modes as pitch deviation is doing a job of “triming” rate controller, in acro it should be unable to maintain attitude on stick zero with attitude locking disabled. Too much and you will experience more noticeable windup in cases where rate can’t meet demand and that can be really bad if you don’t expect that (for example prolonged ground contact after takeoff was detected might saturate I term for rate loop as ground is preventing attitude changes :slight_smile: leading to unexpected tilting when lifting off). Ideally I limits should be fairly close to expected I value limits.

Thanks for that insight Lupus. If the c of g and swash check out okay after double-checking, I think I might increase the value 0.01 at a time, rather than going straight to 0.08.

@LupusTheCanine just a little clarification, you are referring to ATC_RAT_PIT_IMAX.
I am referring to ATC_RAT_PIT_ILMI, since he is still using the “old” intergrator approach (H_OPTIONS set to 1).

It sets a lower limiter for the integrative term build-up during ground/hovering flight phases. In other words it limits the authority of the automatic trimming to prevent too large swashplate tilts which could cause tip-overs during take-off phase. Since you are on the heli-side, you automatically become an advanced user :slight_smile:

Thank you for clarification.
Shouldn’t the drift stop after the takeoff when the limit is increased to ATC_RAT_PIT_IMAX then?
PID tuning log data definitely would be helpful.

@abenn1 have you looked at this section of the wiki
https://ardupilot.org/copter/docs/traditional-helicopter-first-flight-tests.html

In particular, look at the hover trim section of that wiki page. This should help cure your issue. If not, post again

Edit: it is important that your ILMI be large enough to hold the pitch attitude that is requested. So if the ATT.desPit and ATT.pitch are not following each other in a hover then that is the first thing to look at. Increasing ILMI to 0.08 is fine and shouldn’t pose an issue. If you are still seeing that the I term (PIDP.I) is maxing out then you may need to adjust the swashplate linkages to center the I term. I don’t know that I have put a wiki in for that particular issue. It might be easier adjusting the CG to center the I term.

1 Like

@LupusTheCanine no, with the “older”implementation of Integrative the full range of I-term is only released after the “dynamic flight” condition is met. Until there ILMI is the limit, so increasing the parameter gives more authority to the integrative term for low speed conditions (ground-takeoff-hover).

1 Like

Thanks Bill, I’ve worked through that document for my three helis. I’ve adjusted ATC_HOVR_ROL_TRIM for each of them, but what I missed this time was the bit about adjusting AHRS_TRIM_Y.

Advanced in years, but not in heli-programming and flying skills :laughing:

2 Likes

I’m still struggling :frowning_with_open_mouth:

Following last week’s tuning flight I modified ATC_RAT_PIT_FF in an effort to reduce the mismatch between desired and actual pitch, but this week the mismatch seems to be even greater.

So I’m now trying the follow the Hover Trim wiki to modify AHRS_TRIM_Y according to the amount of forward pitch input I’m having to use to keep the model level, but I can’t figure out where to find the pitch attitude required for no drift; is it the AHR2>pitch value? If so, it seems to be nowhere near as steady as I think I was holding the stick during the flight, ranging from -7.05 to +6.22 with a mean of +0.53 – presumably degrees.

Below are the log file from yesterday’s flight, and the parameter file for the setup. I would appreciate it if anyone can help me in this matter.

Hughes 500 PID added to logging bitmask and ATC_PIT_RAT_ILMI increased from 0.05 to 0.06.param (20.9 KB)

Hi @abenn1 ,
two questions:

  1. how did you perform the accelerometer calibration? the important rule is that when you do accel calibration main rotor mast must be perfectly vertical (use bubble to make sure the frame- and so the mast- are exactly flat level). This must be done putting the bubble on the frame -not “flat areas” in the fuselage for example. Best done with the frame disassembled from the fuselage. Basic idea is that you want your autopilot attitude perfectly matching the thrust vector of the rotor, at horizon level.
  2. How did you do the swashplate leveling? did you use the specific tool provided by Align (like this one https://www.amazon.com/Align-AGNH70118-H70118-Swashplate-Leveler/dp/B008IBZAP8) and did you set H_SV_MAN to 1 before doing the swashplate leveling?
    Looking at the params all your servo-trims are at default, 1500. But looking at how much integrative you have on both pitch and roll axis the trim is stilll way off, so the swashplate might still be tilted.
    Generally speaking, if the above are done correctly there is no need to “fake” the attitude (i.e. playing with AHRS_TRIM_ values) to overcome out-of-trim conditions.
    Hope this helps

@abenn1
I use this tool for leveling. Soko Heli Toolbox, PDF, Videos | Site Name

I think it is the best method. All my models flew in “Stabilize” mode right away.

Of course, the center of gravity must be correct and the hover trim must still be performed. But the latter only applies to drifting over roll. You have a problem with the pitch.

BR

Heri

Thank you Ferrosan, I’ll re-do my calibrations before I go any further with parameter adjustments.

I did my accelerometer calibration with the assembled heli sitting firmly on my level bench. It’s dawned on me now that visually it appears to have a rearward lean when it’s flat on its skids, so the main shaft possibly wasn’t vertical at that time. I’ll re-do the accelerometer ensuring that the shaft is vertical irrespective of how the model sits on its skids.

As for swashplate levelling, I don’t have a tool, I just do it by eye, lining it up against a known horizontal line in all directions. I think my eye is good, for it’s worked fine on my other two helis. I can’t remember about H_SV_MAN, though I was following the wiki so, if that’s what it instructs, that’s what I did. I’ll review it to make sure it’s at right angles to the shaft, rather than being ‘level’ when the heli’s sitting on its skids.

heri, my first two models (TRex 500 and TRex 550) both flew in ‘stabilise’ mode right away, so I think Ferrosan is probably right about this one (TRex 500 in a ‘scale’ Hughes 500 fuselage) not sitting upright when I calibrated the accelerometer.

@abenn1 if the fuselage is accurate to the real one the tail boom should be slightly canted downward:


But the main rotor is perfectly level, this of course needs to be adjusted on a scale model as all gearboxes axis are 90 deg each other on model helis.
This could possibly justify the rearward drift you are seeing.
Best to do the accel calib standalone and then fit the mechanics in the fuselage shimming here and there to make it look right.

no good man :slight_smile: , I stopped doing it by eye because autopilot is far more accurate than a 12/10 eye Lol. I would strongly recommend to get a basic tool or even better the tool @heri has suggested.

I wouldn’t recommend using the eye method. The wiki recommends the tool or using the low cost method of a magnet and nail. I have used the magnet and nail method many times with good results. There is a little back and forth as you rotate the head to look at the nail above each stationary swash link. But it works.

1 Like

After 12 years flying helis I’ve just ordered a swash leveller :laughing:

The heli will be coming out of its fuselage so I can re-do the whole mechanical setup.

2 Likes

When i was setting up rc helis more often we used to set the c of g slightly forward of the main shaft and the careful setup of the mechanical side of the swash making sure good and symmetrical geometry with servo arms pushrods etc

1 Like

My swashplate leveller arrived earlier this week, so yesterday I removed the heli from its fuselage and levelled the swash and re-calibrated the accelerometer.

The swash, as some of you predicted, was not level: Servos 1 and 2 were spot-on, but servo 3 was about 1mm or so low, which explained the rearward drift. To correct it I tried to use the method described in the wiki but, having set the H_SV_MAN parameter to 1 I found that changing the parameter SERVO3_TRIM didn’t move servo3 at all, even when I set it at 2000. So I corrected it by extending the pushrod instead; it needed about 4 turns to get it right.

Having set H_SV_MAN back to 0 and reinstalled the heli in its fuselage I managed a couple of 5-minute flights today in Stabilise mode, and the rearward drift has gone :laughing: The wind was 15mph gusting to 25mph, so any further tuning will have to wait until it calms down.