Trouble with PosHold and final tuning

Hi Everyone. I am very frustrated as I can’t seem to find my problem or tune correctly. The airframe is a heavily modified Trex gasser and AUW is 10Kg. The FC is a CUAW V5 and hard mounted. Acro and Stab handle ok, but PosHold starts to pull to a side after a second or two. It then tries to correct for it but is very loose and seems to be purely dangerous. I have noticed that this phenomenon happens in Stab mode as well but not as pronounced, and once I start to move, the tendency dissapear. I have a 500 electric with a CUAV v3 FC on it that flies like a dream. Vibe measure 20 in Z which I also can’t seem to get rid of as well. I replaced all tail bearings and rechecked blade tracking. It is possible that my blade speed is a bit too low and will test it tomorrow. Currently, I am running a head spead of 1680 rpm on 810 blades. I have read from another post that a Vibe around 20 in Z may cause attitude problems. Might this be the case here? I attach the log and appreciate any help.

Thank you.

It seems that the log file did not upload. Here is the URL from where to download the log file.
Thanks

@bnsgeyer. Hi Bill, can you help me with the final tuning?

I replaced all the bearings (main and tail) so far, as well as dampers on the main shaft. None of these had a significant effect on the Z vibration. I finally replaced the hard mount tape for Velcro (as per an earlier discussion that Chris had) and now the vibration is down to a manageable Z value of around 13. I still don’t know what is causing the vibration in the Z axis, but I suspect that I reached the limits of the frame in terms of layout, weight and head speed.

The heli is much more stable but I either don’t understand PosHold or can’t get it tuned in. I did a few Auto mode test runs today, which seems fine, but I think I need to tune I on Pitch as there is some delay in the desired vs actual pitch rate.
I am using PosHold to disengaged Auto mode and to bring her in, which works pretty well. The only problem I seem to have is that she hunts a bit in PosHold. In Auto stopping at a WP, the heli is steady and solid.

I attach the log file as a reference.

Thank you in advance.

For your heavier helicopter where you are stopping more mass I would suggest turning up the braking flare in Pos Hold a bit. And the transition. It is currently 8 deg and 4 deg/sec transition. Maybe go to 12 deg and 6-8 deg/sec transition to full nose-up braking attitude.

Screenshot%20from%202019-05-28%2020-40-01

The other two params that will affect position holding in the wind, or “hunting” are these:

Screenshot%20from%202019-05-28%2020-41-00

Try doubling those but leave the D-gain at zero. If you get oscillation of the position controller, then turn them down a bit until it stops. Keep the I gain at half of what you set the P gain to. After you do this, try it in Loiter to make sure it doesn’t oscillate in Loiter too. Then you can set your GPS assisted mode back to Pos Hold.

That should fix it.

1 Like

@ChrisOlson. Thank you for the advice. I was tied up at work but will go out tomorrow to test and report back.

@ChrisOlson. I finally found my mistake. After weeks of testing, tuning and detuning, I was at the brink of giving up. Auto flights seemed ok, and after the Vbar changes in Acro, the craft was manageable, but something was just not right. Switching to PosHold, AltHold or Loiter, it was as if something made small but random inputs, and she would start to “hunt” for a position. I tried to tune ILMI but without success. Today, after tuning the PSC_VELXY values, I found not much improvement. Intrigued by another post, I decided to check my RC dead zone and lo and behold. Problem found.

For no apparent reason, I have set a dead zone value for the collective servos in the early stages of tuning. After changing it to 0, Pos Hold is solid and Loiter needed a bit more ILMI. She is now responding predictably. I can finally tune for optimal performance.

The next step is to find the correct parameters or application to accelerate, deaccelerate and do coordinated turns to keep the engine and collective happy in high-speed manoeuvring. I have tried QGC, Mission Planner and UgCS but I am either missing something or they are not specifically focused on helicopters. Some waypoint actions are brutal and I am still studying the behaviour of the flight plans. Acceleration changes are also a bit too quick but at last, I can now move forward.

Correct me if I’m wrong Chris Olson,
But the default RC Dead-Zone parameters for RC 1-4 are as follows:
RC1: 20
RC2: 20
RC3: 10
RC4: 15

Yes, I believe those values are correct (without looking it up in the code).

Waypoint flying with helicopters is best done with splines and don’t use regular or “fast” waypoints. If you want smoother flying on the waypoints.

If the WPNAV_NAV_ACCEL is set to actually hit waypoints fairly close at speed, the accelerations involved with stopping or slowing down are quite brutal. The controller assumes multi-rotor type response, it will jerk the nose of the heli up which for a helicopter puts it into a climb, cause it to dump off all the collective, and recoil like it hit a brick wall.

Not exactly the smoothest experience.

So, if you switch to using all spline waypoints (takes a bit of practice to learn how to lay these out), that will make the flight more suitable for a heli. Remember that splines are in 3D space so if you have one spline waypoint at maybe 70 ft altitude, set a second one at 30, set a third at 100, these are all spaced maybe a 1/4 mile apart, you will likely experience CFIT at the second waypoint. This is due to the way splines are calculated.

Personally, for my work, I cannot use the stock copter code as it’s not smooth enough. I have modified behavior in the code I fly for speed changes and allowing the autopilot to bring the heli to a stop on waypoint flights. While this works great for heli, it is not all that great for multicopters so it is not accepted into mainstream release.

I did PR part of it for a complaint with multicopters:

But I have further modifications for heli’s in this build.

I just added another change to that when I discovered a few days ago that going to throttle hold in Pos Hold dumps the collective and smashes your helicopter into the ground (thankfully I was only at 2 feet altitude) faster than you can switch flight modes to get out of it. Even if you are at 100 feet and go to throttle hold it dumps the pitch so fast that it blows all your headspeed and switching to Acro to get out of it involves nosing down 45 degrees (now at 2000 ft/min descent rate) to get enough airspeed to bring the rotor back.

So this is not great.

It’s not even really fun with a 27 lb helicopter.

At this point I don’t know the reason that was done. I intend to find out. But in the mean time it is not acceptable for me.

So I fixed that hairy ordeal.

@Chris_Khosravi. I initially thought I made the changes but after my posting learned that it was actually the default values. I have a 500 electric setup as test platform with the same RC radio (hall sensor gimbal) but with the defaults values which fly fine. However, the larger gasser is a converted Trex700 V2 nitro with the push-pull servo setup and she is not happy with a dead-zone.

As long as you don’t get any drift in any of the axes you can run the deadzone as tight as you want. Most modern RC radios are pretty tight and accurate so the defaults are probably a bit excessive for most.

@ChrisOlson. Hi Chris. Great observation with the throttle hold. I did see this behaviour on the bench but never thought about it in the air. I noticed that the transitions is very fast.

I am back using UgCS as it has the option to set an overshoot distance and speed change. It also incorporates heading and yaw behaviour which makes creating a flight plan easier and quicker. I am busy tuning WPNAV behaviour to see if I can get a smoother flight path.

I have been using Arduplane for a while and the behaviour is just short of amazing. I understand that the transition to helicopter is going to take a bit of practice, but the behaviour for some of the points are outright scary. Depending on the order of WP’s and actions the behaviour seems to be inconsistent. One, for instance, is to climb graciously to my operating height over a distance. Currently, it seems to climb to the required height in a vertical climb at the 1st WP. I also need to understand why she is skipping some points and then following another, both spline WP’s. This is especially where the violent changes occurs. I suppose this is the “fast waypoints” you refer to. I will need to study this to understand what is going on.

There is still a lot I need to learn in terms of the current flight behaviour within a survey mission, but it is exciting and I am grateful for the massive effort and development in Trad Heli the last few years.

I am working in less than ideal conditions (hot, high, dusty and obstacles) and I would like to replace my fix wing with the helicopter.

Be careful with this. Unless you fly my modified code do not go to throttle hold in flight in those altitude modes. It will not turn out good. Acro or Stabilize is no problem. My modified code won’t dump the collective and will instead gradually use it up to try to maintain altitude, then stall the rotor and fall out of the sky. But it gives sufficient time to either turn off throttle hold and bring the engine back, or switch flight modes to stabilize or acro and autorotate it. The stock code will cause it to come out of the air at the same speed and acceleration rate as a brick - and it will do it instantly.

Ok, so transitioning from Plane to Copter takes some practice, especially for heli’s. Like you say, the behavior of the Copter code is downright brutal and scary with helicopters using so-called ‘fast waypoints’ unless you fly at multi-rotor speeds. And even then helicopters react so much quicker than multi’s that it’s still quite brutal.

Splines will smooth this out for heli’s. But still not ideal.

So I guess it’s time to inform the community that @bnsgeyer has L1 Nav working with heli’s. It is now stable enough that I flew my first commercial survey flight with it yesterday. Bill wants to make a couple minor changes yet. But IMO people that have experience with Plane’s L1 Nav will have no problems setting it up. This is where it’s at for heli’s. The L1 maintains perfect speed in the turns, the speed changing in flight is ultra-smooth, it changes the heli from jerky amateur to smooth pro when flying waypoints on autopilot.

I could not find a single thing wrong with it yesterday on a 1 hr 49 minute survey flight. It performed flawless and my heli only burned 23.8cc/min on that flight - the most efficient fuel burn I’ve ever had. It’s not decelerating and accelerating all the time with L1, nor doing stop-turn-go robot dance moves on waypoints.

So hang tight. I would expect, as soon as we determine it be truly stable, that we will have a build for public test of the L1 Nav for heli. And then you’ll never look back.

Chris. Thank you for your valuable feedback. I did a few test today tuning WP behavior. It is now manageable. I am still experimenting with the WP placement but I have a clearer picture now.

In the meantime I will download and flash the modified code. I love the Pos Hold option and would like to use it extensively when transitioning between modes.

Regarding the L1 Nav. This is incredible good news. It is functioning so graceful and efficient in Arduplane that I am always amazed to see it in action. From what you are saying I can just imagine that it will be similar. Graceful, smooth and coordinated means efficiency and parts that will last so much longer. I am looking forward to the release!

You’ll love it. The TECS system from Plane didn’t apply real good to heli’s so Bill made our own speed-height controller for it. Which works excellent. I think it’s actually easier to tune than Plane. The WPNAV_ACCEL is used to control how aggressive you want it to change speeds, but it doesn’t affect how it flies waypoints like Copter Nav does. The WPNAV up and down sets how aggressive you want the climb and descent speeds to be.

Basically just leave the damping at 0.8 and tune the turning period and WPNAV_RADIUS for how you want it fly waypoints, and how much crosstrack error you get lining up on a pass after a turn.

It has other features like NAVL1_TURN_SF. I don’t remember what SF stands for so I call it the Stomp Factor on the torque pedals. Set it to 1 and it makes coordinated turns. But like yesterday I set it to 1.12 and it leads the turn on torque, converts some of the bank angle in the turn to nose down and executes an almost perfect (from my vantage point) ag turn on survey passes. It keeps the tail rotor in nice clean air with a tail high attitude in the turn using the torque lead-in. And it will do it with almost no over-run on the ends of the passes. She lines on the next pass dead on target speed, perfect every time.

I don’t recall when I’ve had quite that much fun watching a helicopter fly itself.:grinning:

Is the L1 Nav available in 4.0.4 ?

Doug,
L1 never made it into master and thus didn’t make it into 4.0. It was something I experimented with.
Leonard has a new auto mode nav controller on the horizon. So far the testing I have done shows it to be much better at holding speed thru turns and removes the leash concept. Be on the lookout for it in 4.1.

1 Like

Chris,

How is the 4.1 holding up, now a year or so later? What is needed before it’s release?