INNER Loop and OUTER Loop
« on: December 21, 2015, 03:26:06 am »
What is inner loop? At what point does inner loop become outer loop?

What is RATE? Is the change from RATE to ATTITUDE automatic when you cross from inner loop to outer loop, or does it need to be setup to change?
« Last Edit: December 21, 2015, 03:30:32 am by RayRegan »

Re: INNER Loop and OUTER Loop
« Reply #1 on: December 21, 2015, 08:23:44 pm »
SO, I watched the Painless video and I think maybe I understand a slight bit more now.
He ( Painless Guy) says that Inner loop turns into Outer Loop above 80% stick travel. He makes it seem as though this is NOT the case if you fly in ATTITUDE mode, as he says all newbies should do at first. He explained the inner loop/outer loop thing as being for RATTITUDE. He says that RATTITUDE is attitude stabilized within the first 80% of stick travel and then switches to RATE from 81-100% stick travel. This seems logical. I have changed all my flight modes to Stabilized>Bank 1> Attitude (for pitch and roll)> AXIS LOCK( for yaw). This way if I bump the flight mode switch by accident, the aircraft will still fly the same. The stability issue I have been fighting since I first hovered is a rocking side to side on ROLL axis. It happens close to the ground, sometimes at hover, and if I don't land and drop the throttle quickly enough I get a bounce. This issue only seems to happen only on the ROLL axis. I have been changing the ATTITUDE STABILIZATION (Outer Loop) slider on the roll axis on the BASIC tab> BANK 1 to try to fix this. It is my understanding that since I am flying in ATTITUDE mode, that the 3 sliders (ROLL,PITCH,and YAW) are the only adjustments I should be using. Does this seem right?

Lo-res

  • *
  • 11
INNER Loop and OUTER Loop
« Reply #2 on: December 21, 2015, 10:02:12 pm »
To be honest I've not adjusted anything yet. I wanted to get a very clear understanding of how everything worked before I started fiddling with stuff.

Your assumption do seem correct from what I have uncovered so far though. With your hovering problem could I ask if you are doing so more than a metre/a metre and half above the ground, if not the prop wash could cause a wobble. Though this cause pitch as well as roll to be unstable. Thus P is to high on your roll.

I was watching this before which I found helpful as to what to look out for and how to correct accordingly:

 

I know it's cleanflight but skip to 1.06 mins to flight footage
« Last Edit: December 21, 2015, 10:14:21 pm by Lo-res »

Lo-res

  • *
  • 11
Re: INNER Loop and OUTER Loop
« Reply #3 on: December 21, 2015, 10:10:48 pm »
Attitude = outer loop, rate = inner. Rate mode does not use the outer loop. Attitude does use the inner loop. Rattitude turns Attitude to Rate passed the 80% threshold of the sticks. I believe that's correct.

Re: INNER Loop and OUTER Loop
« Reply #4 on: December 21, 2015, 10:30:07 pm »
So if my flight mode settings are set to ATTITUDE I still need to adjust sliders for RATE to correct the issue I am having at takeoff and hover? This would explain why I haven't seen any real difference with the changes I have made. Thanks for the tip

Lo-res

  • *
  • 11
Re: INNER Loop and OUTER Loop
« Reply #5 on: December 21, 2015, 10:50:23 pm »
No problem, let me know how you get on, learning as I go as well

Re: INNER Loop and OUTER Loop
« Reply #6 on: December 22, 2015, 12:52:42 am »
Generally speaking, beginners should start out on Attitude mode with manual throttle and use default values.  Default PIDs usually work well enough that the beginner doesn't need to worry about them.

If PIDs need tuning, the easy way is to just use OPTune or the up coming (next release) LP EasyTune.

The simplest stabilization for a quad is Rate mode.  The transmitter sticks control the quad's roll rate and where ever you let go of the stick, the roll rate goes to zero and where ever it is, that is where it stays, even if it is upside down.  This is called inner loop for later discussion.  Full stick may mean 360 degrees per second (one flip per second) and so half stick is flipping only half that fast and center stick is flipping with zero flip speed.

The next more complicated mode of interest is Attitude mode.  The transmitter sticks control the quad's attitude (bank angle).  When you let go of the sticks, the bank angle goes to zero.  The quad levels itself out if you just let go of the sticks.  This is called outer loop because the attitude loop actually takes commands from the transmitter sticks and gives commands to the rate loop (inner loop).  For instance if the sticks command the bank angle to be 45 degrees, but the current bank angle is 40 degrees, there is 5 degrees of error and it commands the inner loop to travel at say 50 degrees per second to correct the error.  If the error were 10 degrees, it would tell it to use 100 degrees per second.  What was just described is the P for proportional part of the PID for the outer (attitude) loop.

Lo-res

  • *
  • 11
Re: INNER Loop and OUTER Loop
« Reply #7 on: December 23, 2015, 12:24:48 am »
One other thing I sourced from

http://opwiki.readthedocs.org/en/latest/user_manual/first_flight.html

"You may be disconnecting and connecting power to the model several times during these first steps - you must wait at least 30 seconds before reconnecting power, otherwise the model may behave unpredictably.


Remember to keep the model still for about 10 seconds after each connection, while the gyros are calibrated."