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

Ok, I start with Chris’s advice. Shaft is level on the gear, so that’s a good start. I take out my digital pitch gauge aaand…the offset will vary depending on rotation of the blades. Not -3 to 3, but 0.6-3. There’s clearly still work to be done on the mechanical side.
However, knowing that rain is forecast, I’m also keen on getting out to try Bills advice. It’s not ideal, as it’s gusty and swirly.
I start by lowering the FILT to 4 and immediately it seems a little more responsive. I gently push up the P, but it not showing huge improvements and short attempts to loiter are much much worse. I then increase the ILMI to 0.1, which makes taking off a little bit more of an adventure , but it allows me to push up the P further and further to 0.095/0.09 and it’s probably the best it’s been in stabilize. Again, wind conditions make it hard to judge.
Loiter it still pretty bad, but I realize that I was messing around with the loiter parameters yesterday and reset them and it improves a fair bit and the log shows it’s still chasing it’s own tail a lot, but the roll/pitch vs des.roll/pitch are much improved. Then my ground station battery started dying (I need a new one!) and I had to call it. At least it felt like a step in the right direction!
I’ll strip the head down and check that everything is straight, etc and then retry Chris’ method. Currently I have a 10 degree offset on mission planner, when the heli level :confused:

Video of last flight.


2017-04-23 13-06-23.log.param (10.8 KB)
2017-04-23 13-06-23.bin (2.4 MB)

So did you have to stop at 0.09 with the P gains or could you have pushed the P gains higher. I’m guessing you stopped because you had some oscillation that got worse with higher P gain.

So I looked at your bin file. The aircraft is still not tuned well. In loiter, you can tell that the loiter mode is coupling with the PID controller/aircraft dynamics and getting into a low frequency oscillation. This is very typical for a helicopter with low damping (not enough P gain). If you can get higher P gain without high frequency oscillations(instability) that would be the first thing to do. Then start raising the I gain to start helping the onboard controller to hold a stable hover in loiter.

Also please change your log_bitmask parameter to 393214. That is the correct value to give the PID messages which will tell me a little more about what’s going on behind the scenes with the PID controller. lastly why do you have -56 set for your arming_check parameter. What are you disabling to arm the aircraft?

No, I stopped because my ground station battery was dying and I wanted to see how it behaved in loiter before I had to call it quits.

I’ll change the bitmask and as far as I know, I’m not trying to disable anything!
Thanks for looking!

Well if you are not intentionally trying to disable an arming check then change the arming_check parameter to 1 which tells it to satisfy all of the arming checks before allowing the user to arm the aircraft. Also keep pushing the P gain up until you see instabilities or you get to a P gain of 0.2. Take it slow by only increasing 0.02 at a time. The filter should help keep it from getting too bad too quick.

Wow. Get that problem fixed and it will solve a lot of others. I’m surprised your heli even takes off in Stabilize without trying to tip itself over! You must be doing some serious flying on the ground just to keep it steady so it can lift off :slight_smile:

Seriously, if it’s that far off, I would recommend re calibrating the accel. You probably calibrated it with the Pixhawk out of the frame? So do the same thing and shim the heli up until it’s level with the mainshaft vertical, start the accel calibration and then put the heli on its various sides and see if you can get it closer. I’ve found that the first level step is the most important - the others can be a bit off and it still works. It seems the FC wants to know about what’s level primarily, and the rest is just learning what’s up and down and sideways, etc…

Hi Chris & Bill
I did another test flight in the garden, it was a bit windy, so I tried doing a Loiter about a 1ft off the ground. I altered ATC_HOVR_ROL_TRM to 350 and that stopped the left drift.
Thanks again for all the help.
attached Bin file for the test

2017-04-24 15-37-44.bin (1.6 MB)

I should probably have written that more cleanly: After trimming out the AHRS to keep the heli from drifting, there’s a 10 degree offset. When I re-level the accelerometer (1 axis) on a known level surface, the AHRS is less than a degree out, which seems about right looking at the installation of the Pixhawk. The shaft looks within 1 degree.
In any case, with the un-even pitch on the mainblades, I now suspect that it the main cause of it and I’ll fix that first. Apart from flying a MCPX, I have no real heli-experience, so there’s a lot of learning as I go along. (Similarly, my multi-rotor experience is limited to FPV racing drones, so there’s very little skills that can be transferred from there).

Yes, definitely the case. You have cyclic built into the setup with your cyclic stick centered. Which, of course, will make the heli take off in an unwanted direction.

The MCPx is a lot of fun. I got one of those and used to fly it in the house when I got bored. Got recently banned from that after crashing it into one of my wife’s hanging plants and sawing off some leaves. No more helicopter flying in the house. And you are correct. Very little of the racing drone experience will apply to helicopters.

Hi
I got a LOITER flight in my small garden with a fair wind.to-day. Can you please look at my bin file, and let me know of any improvement I can make, before I try AUTO. It’s a 450pro FBL heli
I’ve also included my Param file.

Pixhawk Heli on v3.4.6 070517.param (10.9 KB)

51.BIN (4.0 MB)

Geoff,
I haven’t had a chance to look at your log file and won’t be able to this week as I am out of town on business. When it comes to auto flights with trad heli I don’t have any experience with it. I think Chris or Rob would be the best to look at it from that perspective.
How did it look in loiter mode? Did it drift or look like it was circling (pointed in one direction but drifting in a circular path)? If it is holding a nice stable hover then that is good news.

Geoff, if your Loiter performance is acceptable, it should work good in Auto. What I like to do is set up an Auto flight that’s fairly short where you can observe the helicopter visually, and fly it at fairly low speed at first - maybe 5m/s. See how it follows the ground track and makes the corners and hits the waypoints. If the heli comes to a stop sometimes and “backtracks” because it got off the proper track, then you need to do more tuning.

Hi Chris and Bill
attached video of one of the loiter tests in the garden. Note the gusty wind on the washing towards the end
I’ve now got the ROL_P upto 0.1 the other param’s were the same as my last param file

Geoff, the visual in the video is worth more at this stage than looking at log files. That looks pretty good to me. Little GPS drift here and there, which is normal. But it holds position amazingly well, especially that close to the ground where it’s flying in circulating wind currents off it’s own downwash, mixed with a little wind.

I wouldn’t be afraid to try it on a short mission and keep your flight mode switch ready to switch to Stabilize if there is any problem. But I don’t think there will be, based on what I see there. The only thing might be that if you set the P gain too aggressive, sometimes you can run into oscillations in forward flight, wind or higher speeds that don’t show up in hover. I assume you have aggressively wiggled the cyclic back and forth in Stabilize mode to get those oscillations to show up. And if they didn’t I think you’re ready to try it in Auto.

Maybe your wife will want to learn to fly it. My wife does the same thing - catches video on the camera sometimes and she got quite interested and is now learning how to fly my Trex 500. She successfully hovered it and landed it yesterday and she was pretty happy about that :slight_smile:

I watched your video again and got to my computer with APM Planner2 in it so I could look at your log file. I see the RC inputs you were making in the pitch axis when it was flying in Loiter, and I suspected based on what I saw in the video you were doing that. There is a slight difference between desired pitch and roll and actual, and I think this has to do with the trims entered? I’m not sure about that, but my helicopters kind of show the same thing and they fly fine. I’m not sure what the trick is to get those perfectly in sync on a helicopter. Yours shows pretty much the same as mine, where they are a degree or two off, but always follow each other perfectly.

Your vibration and IMU’s look good. There is no reason it should not work pretty well in Auto, that I can see.

Chris,
The more I think about the offset between desired and actual attitudes, I think it is do to the fact that although you have an I gain value it is being leaked off so quickly that the actual attitude is never driven to the desired attitude. I’d be interested to see that if you set ILMI to some small value 0.1, that the offset goes away. I know that the aircraft gets wonky on takeoff, but I’m thinking that ILMI=0 with the wick leak rate is not allowing the PID controller to drive the atttitude error to zero.

That could very well be. It seems to me that when I fly in Auto the desired and actual come together. I’d have to pull a recent log and look at that, but I think it does. It’s only in hover where I see that, I’m pretty sure.

So, weather, wife & work finally co-operated and I got the heli out again.
In the meantime, I had:

Re-build the head, including making sure all links were straight and correct length
Replaced main blades with 470mm asymmetrical spinblades.
Realized that I was using throttle setpoint and not ESC governor mode and was running way lower head speed than I probably should have. (Was at 700, I increased it to 800 and have since redone the governor setup).

I then first off all trimmed it out with the HOVER_ROLL_TRIM. I had to add 7 degrees before it would stop drifting to the side, but it worked this time. (and a tiny amount of AHRS trim in pitch).

The combination of the above meant that it was already flying much better with the P-values at around 0.09, but I worked my way up and got to about 0.140 before oscillations started showing up when banging the sticks around. I backed it down a bit. It was clearly much snappier and was also doing a little snappy bounce when banging the sticks, so on the next pack, I experimented with increasing the I-values, but quickly ran into oscillations again.

At this time I decided that it was a good place to pause to look at the logs and read up on this thread again :). As I still had battery left, I stuck it into loiter and my, what an improvement.
It drifts around a little bit, but none of the toilet bowling I saw last time. It still has a tendency to slip when yawing, but again, much more contained.
Video here:


I take off, bang the sticks around a bit, land it, tweak the ch6 knob (I-values) and restart the motor. The wobbling is me banging the sticks about.
I flip into Loiter at around the 3:40 mark. (And yeah, I need to re-do the IM_STAB_COLx values, but will wait with that until I get the new governor store tested).

Finally I set up a small auto-mission at an almighty 0.5m/s and it flew it pretty well (although tail-in all the time?) until it hit battery fail safe and I had to take over and land it manually.

Does the logs look reasonable? Anything I should improve on?

ATC_RAT_PIT_D 0
ATC_RAT_PIT_FILT 4
ATC_RAT_PIT_I 0.2
ATC_RAT_PIT_ILMI 0
ATC_RAT_PIT_IMAX 0.4
ATC_RAT_PIT_P 0.132
ATC_RAT_PIT_VFF 0.03
ATC_RAT_RLL_D 0
ATC_RAT_RLL_FILT 4
ATC_RAT_RLL_I 0.2
ATC_RAT_RLL_ILMI 0
ATC_RAT_RLL_IMAX 0.4
ATC_RAT_RLL_P 0.132
ATC_RAT_RLL_VFF 0.025

Log: https://www.dropbox.com/s/iy7dil7gnxxy5qc/2017-05-14%2020-18-53.log?dl=0

Parameters: 2017-05-14 20-18-53.log.param (10.9 KB)

Jakob, just have my tablet here right now. When I get to my other computer that can look at your BIN log, will take a look at that.

I notice you have this set quite low?
ATC_SLEW_YAW 1000

That is going to update the yaw target very slowly, unless you set it that slow for smooth camera work or something at very slow flight speeds. Typical would be around 6000.

Edit:
Got a chance to look at your log, and I do not see the auto mission in the log. Trying to figure out why your tail would stay tail-in during the mission. You have WP_YAW_BEHAVIOR set to point to the GPS course. And it looks like the tail holds pretty good in Stabilize and Loiter. Your RC4_DZ is set to 15. That should be enough so you’re not getting inadvertent input from the radio during the mission so it affects the yaw, but sometimes it’s not.

Since on missions in Auto flight mode the yaw target is a “ghost” that leads the aircraft in a turn and the heli sort of follows that “ghost” flying ahead of it, try setting up the ATC_SLEW_YAW to 6000 first. You might have that set so low that it’s not pointing at the “ghost” aircraft.

If that doesn’t do it, maybe try bumping up RC4_DZ to 30 or 40 and try another mission and see if the yaw points to the GPS course like it should.

For auto missions the ground station telemetry log is actually better than the flash logs for replaying a mission to see what went on during the flight.

Just quickly before I go to work: Automission was a separate flight, hence not in the log:
Added it here:

It doesn’t look to me like your tail is responding all that well. I see you made some manual yaw corrections during the flight, but the actual yaw never does close in on the desired value.

This is what you are using for yaw rates. The P gain looks about right for most helicopters but I think the I gain is a bit “soft”. And you can usually run a little more D gain, which damps the P and prevents it from over-shooting. I see a lot of oscillation on the output of the RC4 to the servo which some D gain might help with, regardless of whether or not the servo is actually responding to it. And I think you can turn off the yaw VFF with the P gain where you have it.

I think your issue is mostly related to not having enough I gain for the rate yaw. Either that or you might have something binding in the tail linkage, or the servo is moving back and forth on its mount, or you got severe “slop” in the slider yokes.
ATC_RAT_YAW_D 0.001
ATC_RAT_YAW_FILT 20
ATC_RAT_YAW_I 0.1
ATC_RAT_YAW_ILMI 0
ATC_RAT_YAW_IMAX 0.25
ATC_RAT_YAW_P 0.3
ATC_RAT_YAW_VFF 0.05

No, you’re right, the tail isn’t as locked in as I would have expected and it’s next on the list. There’s some slop in the tail head itself, I’ll try to grab a video of it, as I’m not sure how much is acceptable.