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

File here

Hex crash 220317.param (10.8 KB)

Sorry to hear about your crash and rebuild. I’ll try to point out some things I see in your setup.

I would suggest setting this param to 0.2 for a helicopter. The default of 0.5 applies to multi-rotor aircraft and will make the collective cycle rapidly on most heli’s
ACCEL_Z_P,0.5

The following params here are mostly the defaults. For now I would suggest going to the wiki under trad heli tuning and adjust these to the suggested values for first flight attempt and tuning. It looks like the only change you have made, possibly, to the defaults is turn ATC_ANG_RLL_P from 4.5 down to 3.5. These params could’ve had something to do with your problem. The I-term and IMAX params are a bit high in the defaults so I-term could’ve built up to the max level and didn’t leak off fast enough and caused the heli to want to tip on takeoff.
ATC_ANG_PIT_P,4.5
ATC_ANG_RLL_P,3.5
ATC_ANG_YAW_P,4.5
ATC_ANGLE_BOOST,1
ATC_HOVR_ROL_TRM,300
ATC_PIRO_COMP,0
ATC_RAT_PIT_D,0.001
ATC_RAT_PIT_FILT,20
ATC_RAT_PIT_I,0.6
ATC_RAT_PIT_ILMI,0
ATC_RAT_PIT_IMAX,1
ATC_RAT_PIT_P,0.024
ATC_RAT_PIT_VFF,0.06
ATC_RAT_RLL_D,0.001
ATC_RAT_RLL_FILT,20
ATC_RAT_RLL_I,0.6
ATC_RAT_RLL_ILMI,0
ATC_RAT_RLL_IMAX,1
ATC_RAT_RLL_P,0.024
ATC_RAT_RLL_VFF,0.06
ATC_RAT_YAW_D,0.003
ATC_RAT_YAW_FILT,20
ATC_RAT_YAW_I,0.12
ATC_RAT_YAW_ILMI,0
ATC_RAT_YAW_IMAX,1
ATC_RAT_YAW_P,0.18
ATC_RAT_YAW_VFF,0.024
ATC_RATE_FF_ENAB,1
ATC_SLEW_YAW,6000

In the following params here I see the servo directions corresponds with what I see in your flash log for servo signal on RC out. This would make sense, since you said the swash tips in the proper direction with the hand roll/pitch test. So if the servos are not moving in the correct direction with your sticks, that problem is setup in the radio, and not with the ArduPilot software or configurations.

The other problem I see, and maybe you have this heli up with very little negative collective pitch, is that your servo trims vary quite a bit. And at max collective you are barely over servo center travel. At min collective you are too close to the servo limit and will likely have no cyclic control at negative collective because you will run out of servo travel.

Do your mechanical setup so that at H_COL_MID you will be as close to 1500 as possible with the servo horns at 90 deg to the swash links. If you are using different throws on the servos you will have a problem with introducing cyclic into your collective, as you advance collective pitch. The swashplate must remain level at full collective travel.

The other problem is that the params that are bold faced below are reversed. If this is a normal head with the elevator servo in the rear, then servo #1 is the left front servo at -60 deg. Servo #2 is the right front at +60 degrees. And servo #3 is at 180 deg. This is different from the way your heli setup manual, or radio setup might be for a helicopter
H_COL_MAX,1520
H_COL_MID,1310
H_COL_MIN,1150
H_SV1_DZ,0
H_SV1_MAX,2000
H_SV1_MIN,1000
H_SV1_POS,60
H_SV1_REV,-1
H_SV1_TRIM,1250
H_SV2_DZ,0
H_SV2_MAX,2000
H_SV2_MIN,1000
H_SV2_POS,-60
H_SV2_REV,1
H_SV2_TRIM,1450
H_SV3_DZ,0
H_SV3_MAX,2000
H_SV3_MIN,1000
H_SV3_POS,180
H_SV3_REV,-1
H_SV3_TRIM,1375
H_SV4_DZ,0
H_SV4_MAX,1900
H_SV4_MIN,1100
H_SV4_REV,1
H_SV4_TRIM,1500

Now, let’s move on to your collective curve. I don’t know how this even worked. The range for these params is 0 (max negative collective) to 1000 (max positive collective) in Stabilize flight mode. What these params do is allow you set a custom collective curve for Stabilize flight mode where you can limit the max and min collective that is available to the flight controller to make the chopper easier to fly in Stabilize. The IM_STAB_COL_2 and IM_STAB_COL_3 correspond to about 40% and 60% collective on the stick respectively, so you can flatten your collective curve for hover to make collective management easier in Stabilize.
IM_STAB_COL_1,300
IM_STAB_COL_2,500
IM_STAB_COL_3,650
IM_STAB_COL_4,900

The final thing is that I see you are using throttle mode 1:
H_RSC_MODE,1

I don’t think is a problem as long as you are not using a helicopter setup menu in your radio to send a throttle curve to the ESC. It is important to not use a heli setup in your radio because then you may get some other mixes in there that will cause your servos to do weird things when moving the sticks. With Pixhawk/Ardu you just need the same basic thing that airplanes use - Channel 1 is aileron, Channel 2 is elevator, Channel 3 is collective (throttle with an airplane), Channel 4 is rudder. And as you move your sticks for each channel one at a time, no other channel should change pwm value. If it does, then you have a mix in there that you need to get rid of.

I think your crash was the result of a combination of things - having servo #1 and #2 reversed. Having too much I gain and IMAX to start with for your first test flight. Mechanical setup with possible servo binding and/or introducing cyclic pitch with increase in collective pitch due to unequal servo throw as collective advances. And I still don’t know how you managed to control collective at all in Stabilize. Unless the code rejects invalid values there and defaults to a straight collective curve?

I would like to point out another hint with the collective curve in ArduPilot. This is an example of what I use for the Stabilize collective curve for my rather underpowered Trex 500DFC
IM_STAB_COL_1 , 300.000000
IM_STAB_COL_2 , 700.000000
IM_STAB_COL_3 , 800.000000
IM_STAB_COL_4 , 1000.000000

I think the code uses the H_COL_MID param for zero collective pitch in calculations for other things in the code, such as collective torque compensation. So I don’t like to change that to set up H_COL_MID with 5.5 degrees of collective, or what ever it takes to make your heli hover. I adjust that in the IM_STAB_COL params instead so that hover collective is mid-stick, so that when I switch to Alt Hold the chopper doesn’t suddenly shoot skyward and have to grab the collective to bring it back down.

The documentation says IM_STAB_COL2 range is 0-500. But I’ve found that I can move it up to 700 for the 40% collective stick position and get mid-stick hover in Stabilize. Then adjust IM_STAB_COL3 for how flat you want that mid-stick collective curve to be. This makes the switch to Altitude controlled flight modes smoother, without getting a big jump in collective when you switch. And it also prevents your chopper from suddenly plunging towards the planet when you switch from an Altitude controlled mode back to Stabilize for landing or something.

Hope this all helps! Again, sorry to hear about your mishap and when you change these settings I recommend to use the Full Parameter List and don’t use the Extended Tuning page, especially, for setting PID’s for a helicopter. I don’t know how well the Heli setup page works in MP, as I don’t use it. Others may have insight on that. I do know that using the Full Parameter List to make your settings will not steer you wrong by changing something you don’t want changed for helicopter setup.

Thanks Chris, for all that info. I’ll work my way through it. The setup is all changed from two years ago, when it got put on a shelf. I then took up multi motor drone…
Can I send you my params file when I get it sorted out.?

Geoff

Geoff, absolutely, no problem.

Yes, there was some changes made to the scaling of the PID’s in 3.4. I would recommend just re-tuning your handling for 3.4, as in my experiments I had the best results not trying to carry the settings forward for trad heli (with flybar in my case). Other changes just moved some of the settings to different groups where, for instance, rate controller settings have now been moved to the attitude controller ATC group, which makes it cleaner.

But the basic setup is still the same. So if you have any questions, or are not sure, please don’t hesitate to ask. It is lots more fun hearing about a successful first hover, than it is a catostrophic crash. :slight_smile:

Chris

At last the wind has dropped to-day, so got a test flight in on my lawn. Well I got up to hover, after having to drop the"D" down to 0.anything above that I got violent shaking. The hover throttle is above the 50%. My IM_STAB_COL2 is at 600 and IM_STAB_COL3 at 700. How high can I go with these settings.?
I’ve attached the BIN file

6.BIN (2.7 MB)

Geoff,
It looks like you are holding a lot of lateral stick (left I think) in the hover. Plus there is a huge disparity between the desired roll angle and the actual roll angle. which I’m not certain why that would be. The pitch axis looks pretty good. For your next flight please use LOG_BITMASK = 393214. That will give the PID info in the log.

Looking at your PID terms, you currently look like you are stabilizing mainly through the I term. This is not ideal. I think you should back off on the I term quite a bit for both pitch and roll. I don’t think they need to be more than 0.2. Also the IMAX terms should be around 0.4 Lastly if you can without getting any bad oscillations raise your P term in pitch and roll as high as you can. If you start seeing bad oscillations then back off. You would like to have the P terms around 0.2. You can then back off on the VFF term if you find that you can raise the P terms above 0.15. If you start seeing oscillations and they are above 5 hz then you can set the _FILT parameter to 4 for the affected axis (roll or pitch) and see if you can increase the P term a little more.

I pretty much agree with Bill on tuning. The higher you can get the rate P gain, the better your heli will perform in Loiter. Using D gain is optional for a heli. IF you can use a small amount, it seems to hold position better. But not all mechanical setups, servos, etc will allow it.

Different frames will handle different amounts of P gain, as I found out. So setting that to a recommended value is hard to do. But I think most frames should handle the default of 0.024 with no issues (other than being really sluggish on handling), and then tune up from there until it starts to shake, rattle and roll.

Once find how far you can go on P gain, setting I gains to about .2 should be adequate, as Bill suggests. It may take more if you can’t get your P gains up. And turn up the VFF in Stabilize until you like how the heli handles. The sharper you can make it handle in Stabilize and still feel comfortable with it, the better the Loiter controller seems to like it.

My favorite method to kind of see if I have a stable platform after tuning is to hover the heli sideways and bump or scrape a skid on the ground and see if it recovers ok. Then hover at about 4-5 feet and shake the cyclic pretty violently back and forth in both pitch and roll and see if it recovers ok.

One thing to kind of watch out for is that if you have the P gains really low (say only .04) and you intend to take off and hover to test it, make sure you look at the swash and move your sticks before flying it. If the swash barely moves, turn up the VFF so you can at least control it. The VFF doesn’t seem to cause any instability. It just makes it sharper handling and gives you more servo travel and direct-thru rate. If you get your P gains high enough, you likely won’t need VFF.

On the IM_ params, I’ve found I can use 700 and 800 for the middle for my underpowered Trex 500 and it works fine - gives me hover collective inside the “dead zone” for Alt Hold/Loiter. So I know that works. If you have use more than that your collective is going to come up really fast below mid-stick, so probably should be looking at a different setup, i.e. raising the headspeed a little. I believe thrust of the rotor varies with the square of the speed. So even a small increase in headspeed should make a difference to get that hover collective into reasonable territory.

This is kind of a strange one. I have a helicopter that flies perfect. And yet my logs show like a 3-4 degree difference between desired roll and actual. I tried re-calibrating the accelerometer. But I manually adjust my AHRS trims for X and Y to make the heli hover hands off in Stabilize with no wind. I think I introduced that disparity between desired and actual by doing that (my Pixhawk is not quite mounted in the frame perfectly perpendicular to the rotor shaft), but it doesn’t seem to affect how the heli flies at all.

So I wonder if the AHRS trim values affect that?

I’ve altered some of the params in V3.4.6 Trad Heli, unable to test due to the weather. I’ve noticed that the swash follows the stick as before, except it moves back straight away, and does not stay.even when held over.
The other point is the P value. It is quoted above as, “would like to have the P terms around 0.2.”-- " that you can raise the P terms above 0.15." ----“P gains really low (say only .04)”------"should handle the *default of 0.024 So is the decimal point in the correct place?

Heli Redone 290317.param (10.9 KB)

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)