elrond

  • *
  • 11
PID Tunning basic config - inner and outer loops?
« on: April 12, 2016, 09:22:04 pm »
Hi

I'am trying to tune my grasshopper 160 (approx 250g)

In basic settings we got:
- rate stabilization (inner loop)
- attitude stabilization (outer loop)

I've observed:
- rate stabilization is reflected in advanced settings
- there is no D settings in config (probably it is auto calculated?)

I'am currently truing to have stable LOS and trying it in attitude mode - what are relations between inner and outer loop?

I'am experimenting and many attempts and in quad flipping like a fish out of the water

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PID Tunning basic config - inner and outer loops?
« Reply #1 on: April 12, 2016, 09:42:23 pm »

https://librepilot.atlassian.net/wiki/display/LPDOC/Attitude+Setup

Innerloop have PID,  P only used for outerloop.

Tune first the InnerLoop and keep P value from OuterLoop not too high (maybe reduce from default values)

elrond

  • *
  • 11
Re: PID Tunning basic config - inner and outer loops?
« Reply #2 on: April 12, 2016, 09:56:01 pm »
If i understand correctly:
- in rate mode we got only PID - inner loop (this means without auto leveling)
- in attitude mode we got outer loop - which tries to "counter act  user input (like if we move stick to some level how and how fast it will try to neutralize it if we let go the stick )
- inner loop is working on low level between fc, esc, motors to "level" their work
- outer loop tries to "correct" user inputs to achieve self leveling?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PID Tunning basic config - inner and outer loops?
« Reply #3 on: April 13, 2016, 10:22:34 am »
I don't understand your "counter act" in attitude.

In Rate the stick deviation is related to Rate desired (deg/s), full stick give the value set as "Rate mode response"

In Attitude the stick deviation is related to the bank angle you want, full stick give the "Attitude mode" value in degrees.
If you don't touch stick, you ask "0°" and the OuterLoop try to maintain this angle.

elrond

  • *
  • 11
Re: PID Tunning basic config - inner and outer loops?
« Reply #4 on: April 13, 2016, 02:57:30 pm »
by "counter act" i mean that if you leave the stick loop will try to reach "0" after some time (self level) - sorry for my bad english

 - so in attitude mode we ask for some particular angle - and it won't go more then that?
 - in rate, with stick deviation we say "how fast" it should follow the direction - so if you hold the stick it would do roll or flip ?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PID Tunning basic config - inner and outer loops?
« Reply #5 on: April 13, 2016, 03:13:17 pm »
yes, seems like that.

elrond

  • *
  • 11
Re: PID Tunning basic config - inner and outer loops?
« Reply #6 on: April 13, 2016, 03:19:21 pm »
thanks, it brought things little closer