Swash plate setup changing by itself Trad heli using F/W 3.4.6

ATC_RAT_PIT_D,0
ATC_RAT_PIT_FILT,20
ATC_RAT_PIT_I,0.2
ATC_RAT_PIT_ILMI,0
ATC_RAT_PIT_IMAX,0.4
ATC_RAT_PIT_P,0.027
ATC_RAT_PIT_VFF,0.1
ATC_RAT_RLL_D,0
ATC_RAT_RLL_FILT,20
ATC_RAT_RLL_I,0.2
ATC_RAT_RLL_ILMI,0
ATC_RAT_RLL_IMAX,0.4
ATC_RAT_RLL_P,0.027
ATC_RAT_RLL_VFF,0.06

Yep. Looks really good for a starting point. You should get no rapid oscillation at all with those settings. You can use either Channel 6 tuning to try raising either pitch or roll one at a time in flight. Or land and change it manually and retry. If it flies fine at .027, then raise it to .037, and so on, until you get instability. Hopefully you get up to at least .1 where you’ll get really good Loiter performance, and then will need less feedforward (VFF).

You only need to take off and hover at no more than 1/2 meter off the ground to test it. As if the heli gets unstable you can just land right away to adjust it. It will be better to find an instability there than at 2-3 meters off the ground.

If you get oscillations and instability with those numbers you need to look at your mechanical setup.

Getting to .2 on P gain would be really good, but not all mechanical setups and servos are going to make it that far. And your setup likely won’t. Looking at these values:
H_COL_MAX,1480
H_COL_MID,1360
H_COL_MIN,1230
you only have 1480-1360=120 servo travel from zero collective to maximum, which means your swash plate is moving really fast with very little servo travel. So you have a pretty high rate built into your mechanical setup. That will not let you adjust the P gains up much, and is going to require very fast and accurate servos. That is a very good setup for 3D flight where you would likely run 14 degrees of collective pitch. But for UAV going to 10 degrees of collective, I think it should be around 190-200, unless you have very slow servos.

For the autopilot to fly the helicopter is the same as for you. If you make very fast stick inputs with a properly set up heli, what happens? If you make more gentle stick inputs flying that same heli - slower and smoother - what kind of flight characteristics do you get? That is what the rate PID’s do. The more you turn them up, the faster the control inputs to the swashplate, and how responsive the heli will become. You don’t want it super sluggish or it won’t fly good. If you make it too responsive, it can cause it become unstable. It needs to be responsive enough for it to fly good in Loiter, and for you as the pilot to fly it in Stabilize or Alt Hold. But not so responsive that it becomes unstable.

Every pilot has a different preference on how the heli should “feel”. So it’s really hard to say set it to “x” and it’s going to work. It is no different than setting up expo and rate in your radio to fly without Pixhawk. It’s how YOU want it to feel and fly. And once you get that, then test it in Loiter. If it’s “drifty” and doesn’t hold position well, then you need to tune it sharper until it performs good in Loiter.

Geoff, I’m a little concerned about your description of the behavior of the swashplate:

I made a short video for you to demonstrate the correct behavior, or how it should work on the bench, in Stabilize flight mode with the pixhawk unarmed.

Hi Chris
I’ve done a video of my swash plate, but I don’t know how to put it this forum. I’ll have a go to-morrow at doing it.

Geoff

I think I got it to show. I’ve looked and I cannot see which param is causing ths problem. any idea’s please

Geoff,
The only thing I can think of is that you are maybe not in Stabilize flight mode? The only thing I can see in your settings that is not correct for an initial tune test flight is these:
IM_STAB_COL_1,250
IM_STAB_COL_2,750
IM_STAB_COL_3,800
IM_STAB_COL_4,950

The range for those is 0 (max negative collective) to 1000 (max positive collective). I think I got a good idea of what your collective curve is. So try setting those four params to this:
IM_STAB_COL_250
IM_STAB_COL_750
IM_STAB_COL_800
IM_STAB_COL_950

If you are in Stabilize flight mode on that bench test, maybe the values of those four params could be causing that. I don’t know that for sure, but they definitely need to be reset to the correct range anyway.

Hi
I have just check those settings and they are whole numbers now. The mistake I made, I found out this afternoon, was that I had entered .45 and .35 into the ATC_ROLL_P and ATC_ANG_PIT_P instead 4.5 and 3.5, and guess what, it cleared the swash plate fault. Thanks for the help, I needed it. Now waiting for the weather so I can finish setting it up

Hi Geoff,
Ok, yeah. These - I had missed that
ATC_ANG_PIT_P,0.35
ATC_ANG_RLL_P,0.45
ATC_ANG_YAW_P,0.35

That would definitely do it! Hope the next test flight goes better.

Hi Chris
I got a test flight in to-day, in the garden. Looking a lot better, but not holding a steady hover,height, up & down quite a bit. Responding to the controls, quickly. Took the P value up to 0.037, then brushed the skids on the ground , when I got some ROLL shakes, but not to bad. Can you please check my attached bin file for any faults. The garden is not very big,so I can’t give it much of a test.

2017-04-02 13-14-40.bin (4.1 MB)

Geoff

Hi Geoff,
There’s a large difference between desired roll and pitch attitude vs actual. But I think that’s maybe caused by AHRS_trim values, where the autopilot may not be mounted perfectly square, perpendicular and true to the main rotor shaft.

It looks like the heli is responding to pitch and roll commands pretty well - enough to be flyable.

I’m curious about the skid-scraping test - did the heli recover after doing that by itself, or did the roll shakes continue after getting it to “set in” by scraping a skid?

I think this is a 500 size heli, and I suspect what’s causing your sensitive stick inputs is a lot of rate built into your mechanical setup. You only have 120pwm of collective travel from H_COL_MID to H_COL_MAX. I think that would be better if you could get it to about 190-200.

What causes this having the balls too far out on the servo arms, and not having the servos centered properly. If you look at the balls on the servo arms or horns, they travel in a circular fashion, pushing or pulling on a link in linear fashion, to the swashplate. The greatest amount of linear travel on the swash link, per degree of servo shaft rotation, is with the servo arm or horn at 90 degrees to the swash link. As that goes under or above 90 degrees, there is less linear travel of the swash plate for the same servo movement.

So if you set up the servos and head geometry so zero degrees of collective is at, say, 1350pwm and the swash links are less than 90 degrees to the servo horn, and max collective is reached at 1500 pwm with the swash links at 90 degrees to the servo horn, your mechanical rate is going to increase as you increase collective pitch and make the helicopter more “sensitive” to control inputs.

Since you spend very little time in flight at zero collective pitch, having the most mechanical rate as the blades pass thru zero collective, is actually good.

This means that, ideally, you want the servos centered at 1500pwm, the horns at 90 degrees to the servo case, and 90deg (or close as possible) to the swash links. And you should have 190-200 pwm of travel from H_COL_MID to H_COL_MAX, i.e. ~1500pwm at H_COL_MID to 1700 pwm at H_COL_MAX. That will allow the rate controller in ArduCopter to be more effective at stabilizing the heli, as it can actually work the servos without the heli being so darn sensitive on the mechanical side.

If the heli is very lightweight (high power to weight ratio), it will be even more sensitive.

I’ve played with this on three different helicopters now, ranging in size from 500 to 700, and found it be true in every case, and even more critical with a DFC head. Is there any way you can get your servo travel up to 190-200 pwm from zero collective to 10 deg positive? It will really tame the heli down, and ArduPilot’s rate controller seems to like it that way. With the servos centered and the swash links at 90 degrees to the servo arms and horns at 90 degrees to the servo case, if your collective is well into positive pitch territory, it may require shortening the swash links, or installing a longer mainshaft to get the head geometry for a stable UAV heli.

Unfortunately, most of these heli’s come designed and set up for extreme 3D, and not necessarily smooth scale or UAV flight.

Here is a photo to hopefully illustrate what I am trying to say. This is a much larger and different style helicopter, but in this photo the servo is centered at 1500pwm, and all the links, arms, and bellcrank is at 90 degrees to each other with the main rotor blades at zero degrees of collective pitch. You will also notice in the photo - still some loctite in the holes - that I moved the bellcrank link balls from the 16mm servo horn location to 13mm. I did that because going to 1700pwm on the servo gave me 17.5 degrees of collective pitch in 16mm position. Moving the link balls to the 13mm position gave me 11.2 degrees of collective pitch @ 1700 pwm. And I still have 200 pwm of “headroom” to have full cyclic travel of the set “swash ring” at full positive or negative collective.

Hi Chris
I’ve decided to reset all my servo’s, moving the balls on the servo arms to get more travel, and to set the swash to mid travel with the servo in central position, or as near as I can get them. Then set up the pitch angles to see how that works out. The heli is a 450 PRO. FBL With a lot of Align parts Pixhawk and Taranis with X8R…
Looking at your picture, the servo moverment appears to be mutiplyed by about 2. Will that not reduce the servo travel?

Geoff,
My photo is of a much larger heli with a flybar. The bellcrank ratio is 1:2.2 and total swashplate travel is 30mm. That would put severe load on a long enough servo arm to move the swashplate thru its collective travel range. So a series of bellcranks on a bellcrank shaft, with push/pull links to the servo, is used in some larger heli’s.

The photo was one I had handy to show the correct geometry of your servos and linkages, with the blades at zero collective pitch. Your 450 would be a direct servo arm to swashplate connection with the swash link. But the concept of mechanical setup is the same.

Hi Chris
attached is the latest PARAM file. I started from scratch setting the swash and pitch. I could not altered the length of the servo arms as I was already on the shortest hole. (about 10mm) I’ve got the swash in MID as near to the zero pitch, before duing the final settings.
Unable to test fly yet due to the wind

.heli Redone 050417.param (10.8 KB)

Hi Geoff,
That should work. It looks like you have 165 pwm from MID to MAX. And that may be all your linkages will accommodate.

A 450 heli will probably be more responsive than larger ones by its nature. All you can do is turn up the P gains .01 at a time until you get undesirable oscillations set in, then turn it down to the last known “good” setting so that goes away, and make sure it’s stable in Stabilize mode. Just make sure to do that at low altitude maybe a 1/4 meter off the ground because if the heli goes into a rapid roll oscillation it may be uncontrollable.

Then try Loiter and see how well it performs there. If you can’t get P gains up in the .1 range you’ll have to increase the feedforward (VFF) and I gains to get it to perform decent in Loiter.

Headspeed plays a role too. The helicopter will be more responsive and “twitchy” with higher headspeed than lower. So tuning with the headspeed you intend to use for normal flight is the best thing to do.

Once everything is tuned so it flies nice I adjust the AHRS trim values:
AHRS_TRIM_X,0
AHRS_TRIM_Y,0
to get the heli to hover pretty much hands off in Stabilize in no wind. Those settings are in radians, so .017 is one degree. Positive values will make it nose up and roll right, negative values the opposite. It is possible you have a perfect installation with your autopilot perfectly level and true, but I notice they are zero. So if it tends to want to drift one way or another in Stabilize you can adjust those to make it to stay stationary in no-wind conditions. That compensates for your autopilot being mounted in the frame a few degrees off.

And then there is this setting also, which adjusts for tail rotor “side blow” that makes a helicopter drift away from the direction of tail rotor thrust.
ATC_HOVR_ROL_TRM

I do not know the correct procedure to set that. I assume that when you calibrate your accelerometer the AHRS trim values should be calculated and automatically entered in the params during that procedure. And in theory, you should have a heli that hovers perfectly except for the tail rotor side blow. And then you can adjust that parameter to get it to hold stationary. However, I’ve never done that. Mainly because my flight controller never seems to get mounted exactly perfect, nor is the accel calibration exactly perfect in coming up with the right AHRS trim values. So I adjust the AHRS trims until the heli stops drifting and leave the ATC_HOVR_ROL_TRM at the default of 300. And that seems to work fine.

I do know that adjusting the AHRS trims makes takeoff far less dramatic because the heli just lifts off pretty much straight up instead of taking off in the direction of being out of trim. After adjusting those AHRS trims this is an example of a hands-off takeoff with my 500 in Acro flight mode. I did not touch the cyclic at all until a few seconds after the heli was airborne and it takes off really nice even sitting on unlevel ground. Adjusting those also makes it less work to hover the heli because you’re not constantly fighting it to keep it in one spot in hover.

Since your AHRS trims are all zero, I thought I’d mention that.

Editing to add a WARNING:
DO NOT take off in Acro flight mode by trying to “fly” the heli on the ground before liftoff. Just like most FBL units, the Pixhawk will “store up” stick inputs on the cyclic before liftoff in Acro mode and it will cause a very interesting few first moments of flight. You could even flip your heli over if you get carried away with it and don’t catch it right away on liftoff. Just leave the cyclic alone in Acro for takeoff until the skids leave the ground, and everything will be fine. I would not try any takeoff’s in Acro until you get the heli tuned, trimmed and know it flies fine in the other flight modes.

This is not necessarily a “flaw” in the software - it is the way flying in rate mode works with a helicopter.

Hi Chris
Jusy got a test flight in. It’s a lot better. Got my P value up 0.050, shaking with higher up numbers .Not swinging about even with AHRS_Trims being set to zero.Take off a smoother, It is still a bit windy,so I did not expect it.
Log attached

2017-04-05 18-36-30.bin (4.0 MB)

Geoff

Geoff,
It looks like your oscillatory frequency is pretty high (~8 hz). I would suggest changing ATC_RAT_PIT_FILT and ATC_RAT_RLL_FILT to 4 and see if you can increase your P gain more. Hopefully you can get it closer to 0.1 but expect that the oscillations will rear their ugly head again at some higher P gain.

Bill

Bill, where are you seeing that? It looks to me like a little tuning was done on each short flight, and the last one actually looks pretty smooth to me.

Geoff’s 450 has a lot of mechanical rate built into the linkage geometry, so at .05 P gain it probably could be right on the edge of being tuned about as sharp as it will go. I would say if you’re happy with how it flies in Stabilize, try it in Loiter once and be ready to flip back to Stabilize if it starts to weave back and forth in Loiter. In Loiter it will start as a sort of gentle rocking that grows until the heli suddenly darts off to the side, and at that point be read to catch it. But as quick as most 450’s are on handling, it may be ok.

It looks like he still is using .05 of VFF. If he can’t turn that to zero and be happy with the response then the P gainis too low. IMO I doubt the P gain is high enough to provide the required damping.

Chris,
Just a follow up. It’s not that I saw anything in the log other than the instability at the higher P gain. I figured that since he was still using a moderate amount of VFF to get the response he liked then why not try to use the low pass filter to attenuate the instability and get the P gain a little higher. It is only goodness to get the p gain higher especially if there is still VFF that is being used. If Geoff feels the response is too snappy with the higher P gain then he can back off on the VFF gain. Hope that makes sense.

Yeah, I guess I found that out. Using a lot of VFF when tuning the P gain can “fool” you into thinking you really got it, and then it doesn’t perform well in Loiter.

Chris , Bill
I got a couple of test flights in, first one went faily well, adjusting the P value. Second one I got some shake’s. then on the second part, the wind caught it and the shake’s started again.Quick landing. So now the P value is 0.49.

1st flight
The first bin file is to long @4.7MB. Can I send it any other way?
2nd flight
2017-04-07 13-33-46.bin (1.4 MB)

Geoff, I was afraid you were going to report that was the case. Most 450’s are very quick and snappy handling helicopters, and your obviously is. I think you have everything right as far as the mechanical setup. You are just not going to get the levels of P gain that a larger 500 or 600 et al can get, but your 450 shouldn’t need it because the rate is built into the mechanical linkages of the head and servos.

I think you’re very, very close because you’re flying the heli and did the right thing by backing off the P gains a little when you found instability in the wind. If it was me I’d fly it some more in Stabilize and make sure you have it solid. If it is, then adjust the VFF on both pitch and roll until the helicopter is about as snappy as you would like it to be.

Then gingerly try Loiter and see what it does. Watch it very carefully in Loiter and if you see the heli starting to rock or roll back and forth, just flip back to Stabilize because it will only get worse until the helicopter suddenly darts off in an undesirable direction. Turn up the I gains until it holds in the wind in Loiter. You will not get bad oscillation with I gain and many people run I gain as high as up to .5

After you get it to hold nice in Loiter, try flying it in Loiter and Auto. If it’s really sluggish on handling on a small test mission and doesn’t seem “locked in”, turn up the VFF some more and adjust your Stabilize handling with the RC_FEEL param. The range on that is 0-100 with 0 being very sluggish, and 100 being very crisp.

Another test I like to do in Loiter is to hover the helicopter up to maybe 30-40 feet. Yank the collective all the way back and let the heli descend thru it’s own downwash at the maximum allowable descent rate you have set. When you throw some collective back in to arrest the descent that will many times cause the helicopter to be upset momentarily. If the Loiter controller can recover it and return the heli to a stable hover again, you got a pretty good tune for Loiter.

I have no experience with trying to attenuate oscillation with the low pass filter to try to get more P gain. Bill very possibly has more info on that that may be useful. I guess I would do that as a last resort if the above standard way to tune a heli still doesn’t yield the results you’d like.