V2.2 Pos Hold tweak issue

Post Reply
Electro 2
Posts: 27
Joined: Tue Mar 19, 2013 4:05 am

V2.2 Pos Hold tweak issue

Post by Electro 2 »

All the 2.2 guys: In the native MWconfig tool's "PID-Grid", for pos-hold there are three sets of PID values shown, Pos, PosR, and NavR. Which is what ?? The aircraft exhibits a wobble-like oscillation when in pos-hold and on-station, tends to indicate "P" (loop gain) is too high. Which one do I turn down a notch ?? Otherwise, the mag hold, altitude hold, and pos hold work great, much better than 2.1 !

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: V2.2 Pos Hold tweak issue

Post by felixrising »

Although a little dated, OESBandi wrote this nice document.. it may give some insight to the various parameters. http://i2c-gps-nav.googlecode.com/files ... tation.pdf

Today I was testing and attempting to tune PH in 30kmph winds.. lets say I had to intervene a few times, and noticed that it drifted off a lot before meandering back with a bit of overshoot..

The interesting section is here:

PID controls
As many other flight characteristics, the Position hold and the RTH is controlled by PID control
loops.

Position Hold
The location error is calculated in centimeters for X (Longitude) and Y(Latitude) which is fed to
a PI controller. The first stage of the controller takes the XY position error and decides how fast
the copter should go to reach the correct location.

PI Controler - Poshold
Parameter: POSHOL_P is by default .4 or 30 cm/s for a 1m error. The desired rate maxes out at
150cm/s. This doesn't limit the pitch of the copter, The rate controller will do what it takes to
maintain this speed as it approaches the location.

Parameter: POSHOLD_I is used to overcome wind that may be pushing us away from our
target. The higher the number the faster the copter will compensate. If your number is too high
it will cause oscillations and overshoot.

PID Poshold Rate Control¶
Now that we have a desired rate, we need to change the copter pitch and roll to give us that rate
of travel.

Parameter: POSHOLD_RATE_P are the proportional response. Your copter’s optimal setting
will depend on the weight and thrust of your engines. If your copter overshoots the target, lower
this value.

Parameter: POSHOLD_RATE_I is set to 0 by default. Use this value to maintain tight control of
the speed of the copter. If the copter is not achieving the speed it needs, this term will make up
the difference by tilting the copter more or less.

Parameter: POSHOLD_RATE_D is the dampening part. If the value is too high you will see
small oscillations in pitch or roll. Once the POSHOLD_RATE_P value is dialed in, start at 0, and
increment slowly. You should see oscillations die down.

Electro 2
Posts: 27
Joined: Tue Mar 19, 2013 4:05 am

Re: V2.2 Pos Hold tweak issue

Post by Electro 2 »

Tnx, I will review this document. I have since determined it is the "Postiton Hold Rate" that needed tweaking. Lowered Proportion (Loop Gain) to 0.10, from 0.11, and Derivitave to 0.35, from 0.45. If the wind will stop, we'll see if we're in the ballpark.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: V2.2 Pos Hold tweak issue

Post by felixrising »

Looking forward to hearing how you go. I'd like to get mine really locked it but sometimes I get a bit confused which parameter I'm observing needing a tweak.. and it's really time consuming without a telemetry set-up.. the bluetooth is great, but it's range isn't more than a few meters :/

Electro 2
Posts: 27
Joined: Tue Mar 19, 2013 4:05 am

Re: V2.2 Pos Hold tweak issue

Post by Electro 2 »

Actually, one could just watch this and shag the guy's values right out of the "Comments" section and probably be good to go. This would assume your craft is similar to his. I'm guessing it's about a 500 or so, and probably about 3 lbs AUW. If you're running an DJI S800 w/a Zenmuse onboard or something huge, these numbers probably wouldn't be any good.

http://www.youtube.com/watch?v=s9HIw_902vU

rizky_p
Posts: 14
Joined: Thu Sep 06, 2012 3:57 pm

Re: V2.2 Pos Hold tweak issue

Post by rizky_p »

I managed to make GPS and Altitude Hold works here is my PID

Pos: 0.44(P), 2.5(I)
PosR: 3.0(P), 0.20(I), 0.04(D)
NavR: 1.4(P), 0.20(I), 0.080(D)

Kind of strange values compares to others.

Here is the short video. (I managed to drain a single 3S 5000mah hands off)
http://www.youtube.com/watch?v=su8ppto12v0

I haven't touch NavR Though, i leave it by default.

Regards
Rizki

Post Reply