Servers by jDrones

Tuning loiter mode


(wolke) #1

hi,

need help. my copter oscillate quickly roll and pitch in loiter mode. if windy the copter feels very inaccurate in loiter mode. it feel that everything i input from my transceiver has a long latency. in windy environment it is more easy to fly in stabilised mode than in loiter mode. i think i have to tune loiter settings. but i am a little bit confused which settings have the right effect. i will tune this in flight with ch6 options. but for loiter i found no cool description. i need no video tutorial. i have watch them all. i need a clear explanation which controller exactly what regulates. informations at copter.ardupilot.com/wiki/tuning/ do not exactly explain what is the difference between for example LOITER_KP or LOITER_RATE_KP.and so on. maybe someone can give me clarification for the following settings.

CH6_LOITER_KP 12
CH6_LOITER_KI 27

CH6_LOITER_RATE_KP 22
CH6_LOITER_RATE_KI 28
CH6_LOITER_RATE_KD 23


(Thomas J Coyle III) #2

@wolke,
If you have tlogs capturing this issue, it would be good for you to attach them to your post.
Regards,
TCIII Admin


(StefanG) #3

[color=#00BF00]Please refer to the instructions on how to use this forum, the instructions on log analysis and provide the missing information![/color]


(wolke) #4

thx,
currently i have no log files downloaded from apm. which log bitmask make sense for my issue?
at time i use the default logfile bitmask.
second, can i download logfiles via 3dr radio. because i don’t trust my usb power line. last time i connect usb into my apm ends “imo” with a blown 3.3 voltage regulator. after this action i mesure 4.9 volts on i2c bus. that why i have installed my second and LAST working apm2.6 board.


(wolke) #5

attach a log file now. my 3.3v regulator is still living:).
infos:
minutes 0 - 1 hover stabilised in low wind
minutes 1 - 3 loiter in low wind trying roll and pitch via transmitter
minutes 3 - 4 loiter in more windy environment with less input from transmitter
minutes 4 landing in loiter mode
minutes 4 - 5 starting and hovering in windy env in stabilised mode

thx
wolke

edit:
copter infos_
[ul]hexacopter x frame
15x5 " props
T-Motor MN4012 KV400
3.9 kg takeoff weight during this log file flight. with gimbal and camara mounted 5,8kg
diameter including props 1210mm[/ul]


(rmackay9) #6

Generally there’s no need to tune loiter anymore. You should be able to just stick with the defaults and it will be fine.
In loiter mode the pilot commands are not as crisp as in stabilize mode. That’s just the way it is for now and no amount of tuning will change that I’m afraid.

I’ve had a look at your logs and there are clearly some oscillations in the roll but it’s not caused by the loiter controller. I.e. the desired roll from the loiter controller is not oscillating. This means that the problem is more likely in the Rate Roll. Your current Rate Roll PIDs don’t look too bad and it’s hard for me to say whether they should be higher or lower. I’d recommend tuning the Rate Roll P with the CH6 tuning knob or give autotune a try.

I’m afraid that that Tuning wiki page is very out of date. Leonard and I have been meaning to rework it but haven’t found the time yet.


(wolke) #7

thx,
i think this information help me a lot. there is an second indicator for roll oscilation in loiter. my gimbal roll pivot also oscillate in loiter mode. video is mostly shaking around this pivot. maybe i can solve two problems at ones now.
/g
wolke


(wolke) #8

thanks a lot,
i reduce my rate roll to 0.08. after this copter feel much better in control. in both modes (stabilised, loiter). at least i also reduce this value for rate pitch. imo, it feels better than different settings for roll and pitch. oscillation is gone now. next test follow with mounted gimbal.
btw,
maybe i found a bug in apm firmware. if i enable ch6 Rate Roll/Pitch kP and i set min 0.08 and max 0.12 i have only those both valus if i rotate the knob. values < centre position are simple 0.08, values > centre position simple 0.12. ch 6 works here as an switch. i check my channel 6 in radio setup. there i see my correct movements on the rotary. so it is definitely an problem in software. maybe a problem with casting integer units to float. happens often in 8 bit environments.

will set this thread as solved.
/g
wolke

edit:
i do not find the option to set this thread as solved.


(Subodh Mishra) #9

@rmackay9, I am using external nav data for indoor navigation and at the moment I just want to hover at one point using LOITER mode. The plots shown below are for Roll and Pitch respectively and as you can see the desired Roll and Pitch are oscillatory even though I am not using the sticks at all!. Can you please tell me how this can be fixed or just point me to the correct params to tune? There is an overwhelming number of tuning knobs and I feel I am stuck in a quagmire when I start playing with them.



(rmackay9) #10

I’ve created a new discussion here.