Need Help for POS HOLD Mode


I am trying to set up the position hold mode for stationary hover. The helicopter is drifting in position. When I viewed the log, the desired velocities seem not to change when the position error is increasing. I tried to tune the vel_xy and pos_xy gains, but nothing seems to kill the drift. I believe I have tuned the stability close enough for attitude command.

Below is the plots and I have attached my param file.

Thanks for the help!

HK500_10_20_2018_POST_FLIGHT.param (14.4 KB)

Not enough data to suggest any actions.

The log (.bin) would be much better.

Also try to focus on 3.6 versions.

Log is too large to upload. Will try 3.6.


I’ve updated with Copter 3.6 and here is the log file :

I tried to use some ridiculous gain in pos_xy_p and it doesn’t make any difference. I assume the delta between TPX and PX should change the value of TVX? But the TVX is always 0. Is there something wrong with my setting?

Thanks for the help!

HK500_10_21_2018_POST_FLIGHT.param (15.0 KB)


I’ve done more testing. Here is the log file:

it looks like the pos_hod is doing nothing, and I do see activities when it switched to Loiter mode.

Why is your RC3_MAX = 1006? I would think that this would be unflyable if it was for your collective (mode 2)
Are you mode 1 or 2 for your transmitter?

Also in looking at your latest param file, why did you put ATC_RAT_XXX_FILT = 5. That seems a little low unless you had some sort of oscillation you were trying to fix. Your ATC_RAT_XXX_I values all seem low. these should be in the 0.2 to 0.3 range for pitch and roll and at least above 0.1 for yaw. the ATC_RAT_XXX_I values affect the growth rate of the compensation for attitude error where the ATC_RAT_XXX_ILMI and ATC_RAT_XXX_IMAX affect the max allowable compensation output to the servos for hover and forward flight respectively.


Thanks for looking into my questions.

I am also surprised that it shows RC3_MAX = 1006 in my param. I am in mode 2. In the Mission Planner, the travel is 1000 -2001.

I’ve tried to use 10 hz filtering, but I found there was 8 Hz oscillation in rates and it’s not likely to be the vehicle dynamic. So I was experimenting more aggressive filtering. I did see the oscillation is gone and there is no adverse effect in the control response or stability. I am more conservative on the I gain. I might need to increase it, since my pitch rate is not meeting my des_rate.

Hi Oliver,
I just looked at your log and it shows RC3_MAX = 1006. How are you viewing the parameters? I use the full parameter list. It is the best way to insure the parameters are exactly how you set them. I don’t trust many other set up screens because they will restrict you to a range of values and typically the range of values don’t apply to heli’s. In particular, don’t use the heli setup page in mission planner. it is broken and could make unwanted changes to your setup.

Please use full parameter list to set RC3_MAX to the correct value. then see if that changes anything.

Hi Bill,

I’ve changed the RC3 setting to 1000-2001. I’ve tried both loiter and pos_hold mode. The position controller is only called at the loiter mode. I also attached the param file. The tuning gains in this file does not reflect the flight on this log, but you can see I fixed the RC3.



HK500_10_27_2018_POST_FLIGHT.param (15.0 KB)

Hi Oliver,
I believe I know what the issue is. Your RC1 and RC2 actual stick trim is different than the params RC1_TRIM and RC2_TRIM. Are you using the transmitter trim buttons to trim the aircraft in stabilize? If so, you need to recalibrate your radio in mission planner using the radio calibration page. The reason that Loiter and Poshold don’t work correctly is that it thinks you are making an input since your stick position when it is centered does not match the trim parameters within the deadband. Thus it will not hold position for you.
Please calibrate your radio (this is one screen I trust). I also trust the compass cal and accel cal. Anyway let me know what you find.

Thanks Bill, that seems to be the problem. I centered both trim and the POS_HOLD become active!

Just a little hint on this - I do use down elevator trim in Pos Hold if I want to make the helicopter cruise by itself on semi-autopilot so I can concentrate on running the payload without flying an actual mission. This is not documented anywhere, but it is a handy feature for some flying jobs.

It only works in Pos Hold. In Loiter it will slowly porpoise doing that. I think the reason is because of the braking feature in Loiter. In Pos Hold the helicopter is returned to manual control (except for altitude holding) with any control input. So it just accelerates and goes smoothly with only a few degrees of down elevator trim. Pos Hold does not have a “speed limit”, Loiter does. And I think that’s what causes the porpoising in Loiter.

Anyway, it works really good in Pos Hold cruising at speeds up to 30-35 m/s. Center the trim and it will come to a stop by itself very smoothly, as well.

Thanks Chris! I am still pretty new to the Arducopter and I just started to use loiter last week since my position hold didn’t work. I notices some difference in between 2 mode from the log. That’s a great tip and that seems to make the position mode more useful.

If you want really smooth braking in Pos Hold, I set the PHLD_BRAKE_ANGLE to 800 (8 degrees nose-up) and the PHLD_BRAKE_RATE to 4 (deg/sec). So when braking becomes effective it transitions smoothly to 8 deg nose up over two seconds and comes to a nice gentle stop from high speed flight with no recoil or sudden moves.

This makes the position holding less accurate if you have the helicopter moving and simply center the cyclic. But the beauty of Pos Hold is that you can do all this manually like regular flying and once you bring the helicopter to a stop in hover, simply let go of the cyclic and it stays there.

Loiter, OTOH, is not a pilot’s mode. It is very robotic feeling. Loiter might be more suited to multicopters, but experienced helicopter pilots typically are not going to like Loiter.

Yes, loiter is more like a position slew to me. I still prefer flying with position hold.

@bnsgeyer @ChrisOlson Thanks for the help from both of you. I’ve tuned to a more stable POS_HLD. Here is the video of the flight from this morning. I used AHRS_XX_TRIM to cheat the controller to get a near-stationary state and that seems to make the position control more stable without drifting. But the down side is that it only work for 1 CG. Change of battery or payload needs to do this again. I aware of there is an auto trim function, but I have not try that yet.