PID tuning position hold

Post Reply
rywessel
Posts: 2
Joined: Wed Nov 28, 2012 3:27 am

PID tuning position hold

Post by rywessel »

I'm trying without much success to tune the position hold.

Using the latest dev code 1279 on a hex with a AIO pro v1.1 board and CRIUS UBLOX V2 GPS

Getting the blinking lights confirming the GPS and it is set at 5Hz and 115K.

With a stable hover and calm wind, I turn on the position hold and for about 3-4 seconds it will stay put but then it will start to wander off and then start circling the center point with a pretty fast rate often moving 10 meters+ out before it starts to course correct.

Trying all sorts of different PID settings without much success and I'm afraid I'm not sure if I'm doing it right or if it is something else. I re-read the PID tuning guide a few times and can't seem to get a baseline to start tuning from.

Also, I'm not sure what the difference is between PID settings Pos and PosR as it applies to tuning for best position hold.

Any thoughts, suggestions, ideas?

robin

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: PID tuning position hold

Post by scrat »


rywessel
Posts: 2
Joined: Wed Nov 28, 2012 3:27 am

Re: PID tuning position hold

Post by rywessel »

Thanks for the suggestion. Yes, the mag declination has been set.

How important is it to have stiff roll/pitch and level PID tuning for good position hold?

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: PID tuning position hold

Post by scrat »

Very important. And maybe you can have angle turned on with position hold.

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: PID tuning position hold

Post by cardboard »

check to make sure your heading doesn't change when throttle is applied, I had the same issue because the built in mag was so close to the bottom plate (power distribution board).

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: PID tuning position hold

Post by mopedcrosser »

Hey,

did you solve the issue ? I am having the same problem...

Best regards

Sebastian

SkyrimDragon
Posts: 36
Joined: Wed Aug 14, 2013 8:27 pm

Re: PID tuning position hold

Post by SkyrimDragon »

...................................................

Nerox
Posts: 17
Joined: Thu Jul 17, 2014 9:23 pm

Re: PID tuning position hold

Post by Nerox »

Hi.
Will just slip in here.

I am having the exact same problems.
Turning on Altitude hold, Mag, Angle and PosHold. I have put every value to the absolute minimum (Thus, P is approximately 1 for Nav and PsR and 0.1 for Pos). Turning on the described flight mode, nothing really happens - which is logical.

When I am increasing P-Values, everything seems to get worse. For instance, when I go up to 5 with P on NavR and PosR, the copter starts speeding after a couple of seconds in a random direction and simply doesn't stop. It looks to me as my GPS is defective.

GPS fix is okay, using an external mag which does not change (not even 1 degree) with full throttle.

Have flown around 5 battery packs trying to get the correct PIDs working, haven't been very successfull. If needed, I will post a video.

Nerox
Posts: 17
Joined: Thu Jul 17, 2014 9:23 pm

Re: PID tuning position hold

Post by Nerox »

Hi.
Went the extra mile and made a little video. Sorry for the lengh.

I know, my backyard seems to small to test this and its been hard to handle the EzGUI, the Camera and the quad together thus the flying doesn't seem very smooth :mrgreen:
Flying at 1:50, 3:50, 5:10, 6:35, 8:40, 11:00
Before every flight you can see the PID values I set for Pos, PosR and NavR.
https://www.youtube.com/watch?v=IzjRa6wdvJ4


Everytime you hear the copter "beep", I am changing the flight mode. But I'm also telling when I'm going to Pos Hold - which is, in fact, not Pos Hold, but "do random crap" mode.
Thank you guys for any input!

n8lbv
Posts: 62
Joined: Fri Aug 15, 2014 3:29 pm

Re: PID tuning position hold

Post by n8lbv »

It's been a few days... did you ever get it sorted?
This drives me crazy I find so many unresolved threads where people never come back and mention of they got it sorted or gave up or what.
The original poster on this never bothered to updates us on what happened.
It's incredibly rude to both the people trying to help and the everyone in the future who find these looking for answers.
People: if you post a question please go back and clean up even if you give up and move on.
Thanks.

pacoswava
Posts: 6
Joined: Thu Mar 27, 2014 3:56 am

Re: PID tuning position hold

Post by pacoswava »

I've been having the same issues. Can't seem to get this tuned. I've got everything working outside the gps functions. Would love to get this resolved. I had it pretty well tuned at one point, but sometimes it would work work, and sometimes not so much. Not sure what's changing.

nechaus
Posts: 21
Joined: Wed May 14, 2014 12:10 am

Re: PID tuning position hold

Post by nechaus »

Guys,

Your issue maybe the mag getting magnetic interference from your power cables..
I am not sayng this is your issue but its worth while keeping in mind..

I had this issue where I was getting gps lock, looked all good, but it had similar behaviour to NEROX...
PIDS certainly did change the behaviour but never could fix the issue.

if you have an onboard mag, your most likely going to need to move the board at least 20 cm away from power cables to be safe
if you have linear becs power the fc, try and twist all wires that run to the board..
Better yet, only use signal wires to the fc and use a dedicated voltage regulator to power the FC that does not run near mag chip.

Then try pid tuning again

nechaus
Posts: 21
Joined: Wed May 14, 2014 12:10 am

Re: PID tuning position hold

Post by nechaus »

while i remember, there are apps on android and probably ios to test the magnetics interference to give you a visual reference.. you can use your phone and place it near the fc and power it up and see how it responds

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: PID tuning position hold

Post by brewski »

Easiest way to check for Mag interference is to connect to MW Config, WinGUI or EZi -GUI via USB, BT or 3DR radio, hold multi from below (props on to get max current)& increase throttle watching compass. It should not deviate more than a couple of degrees. If it does then you will have issues with any function using Mag. Ext Mag is the way to go

apage2014
Posts: 1
Joined: Sat Apr 18, 2015 6:26 pm

Re: PID tuning position hold

Post by apage2014 »

I see that this post was originally created years ago but I thought I'd add my recent experience. I was having trouble getting my position hold to function correctly with many of the symptoms described here. I have the Multiwii Pro with MTK Gps unit. First, the GPS was faulty and had to be replaced by HobbyKing. The faulty GPS puck was not processing any signal and wasn't showing data on the GUI. That was obvious but when I received the new one it was acting up. It turned out that I needed to re-flash the GPS with Arduino and the re-flash with the GPS settings as set for operation. Seems stupid but it worked. Read the last entry in this post. It worked for me. viewtopic.php?f=16&t=3728&p=39057#p39057

Post Reply