claytonbakerjr

  • *
  • 31
  • Pepe Le Pew
Want to learn
« on: January 12, 2016, 03:55:42 pm »
Ok I want to learn more about the following topics.
I have searched the web and only really found bits and pieces
and honestly I am having a mind block and I know there has to be
some info out there that will "click" when I read it.
1: CC3D and it's settings...more so Banks 1 2 and 3 and the
settings involved to dial in quads.
2: PIDS I pretty much have a general idea as to how they work
but I need to understand how to apply them (key point 1)
I fly in the basic mode (Attitude) but when people talk to me in RATE and ACRO
I get all confused...sorry I do :(
I want to get out of Attitude and into more aggressive flying.
I know I am not ready for this Rattitude mode? but I want to be some where in the middle.
I need to get this lingo down, RATE...ACRO...I know ACRO is the ability to do flips and such
but in the same breath I have people stating they do RATE and flips...
Can you see my confusion?
I have been flying FPV for well over a year in Attitude mode and I feel I
am doing very well, but I see so many of my group members doing stuff
I cannot and when I question them they simply say RATE or ACRO and never go
into any more details. It's like no one wants to share....
I am hoping the lot of you can help me get off of this crutch.
As per PIDS most everything I fly "seems" to fly well, no oscillations no crazy
wobbling, but then again I am in attitude and this may change once
I flip the switch.
Then there is Cruise Control....
So much to learn.
So can you at least point me in a good direction to learn all of this to
a point to where I can apply it and get out of Attitude mode?
I will read and I am not lazy  :-[
Thank you very much

Re: Want to learn
« Reply #1 on: January 12, 2016, 04:45:11 pm »
Settings, PIDs bank 123
There are a bunch of settings,  :)
There are multiple banks because people like their ride to be smooth when shooting video and like a race car when racing and doing stunts, and because different modes need different PIDs.

There is a wikipedia article on PIDs you should probably read to learn more.  I started to write a simplification, but that didn't work...
https://en.wikipedia.org/wiki/PID_controller

As a flight mode, "Rate mode" means that the aircraft roll (flip) rate is proportional to the stick position.  Stick at 0 (centered) and the roll rate is zero.  You may have 360 (one flip per second) programmed to be your max roll rate.  If that is true then half stick commands the aircraft to roll at 180 degrees per second, and full stick commands 360 degrees per second.

In Rate mode, P (Proportional) basically means if you move the roll stick 5%, you have commanded say 18 degrees per second (18 is the actual value if your max roll rate is 360 and stick is 5%) of roll and you get an e.g. 7% (I picked a number out of the air) difference in thrust on left vs right motors until the roll speed accelerates up to 18 degrees per second.  If you double P in the PID settings and move the stick 5% it still wants 18 degrees per second, but you get 14% motor difference.  This is a bit of a simplification.  The P multiplier value (as set in your PIDs) is actually multiplied by the error in the roll rate.  If the quad isn't rolling at all, and the stick position is calling for 18 degrees per second, the error (difference in desired and actual roll rate) is 18 (degrees per second).  Too much P and it oscillates because it overshoots the 18 degrees per second roll rate and forces it back hard the other way (repeat).  You want P as high as possible without oscillation.  If your PID controller has only a non-zero P term (I and D being zero) then the motor difference is
(DesiredRollRate - ActualRollRate) x P
Positive roll rate is defined to be right and negative is left.  If desired roll rate is 300 degrees per second left and Actual is 250 left and the P set up in your PID settings is .003 (the actual default value) then you get a ((-300) - (-250)) x .003 = -0.15 (15%) difference which is -7.5 % left and +7.5% right which acts to speed up your left roll.  Note that the sign is important; if ActualRollRate is 350 (too fast) then the difference is +50 and you get +0.15 which is +7.5% left and -7.5% right which slows down your left roll. 

If there is no drag in e.g. the roll axis, P will get you to the exact desired roll rate, but if there is drag (imagine that your quad had big flat cardboard wings so that the wings cause a lot of drag when doing roll flips) it takes a constant amount of difference between left and right motors to keep pushing to keep it rolling at the desired speed.  That constant non-zero difference in motors had to have come from the error being a constant non-zero, so there is some non-zero fixed value for error and thus it never gets to the desired speed.  A P-only cruise control on your car would use zero gas pedal when the speed was correct and thus must be slower than desired if the cruise control is pressing the gas pedal at all.

In Rate mode, for I (Integral), imagine your quad with the big flat cardboard wings.  With a properly tuned P, it will get close to the desired roll rate.  The PID 'I' says "if it isn't getting there, I will try harder and harder until it does get there".  Like P, if you have too much I, it will oscillate.  Like P, you want as much I as possible without oscillation.  The motor change is the integral of the error (that is, the error times the length of time the error has been there).  If P only gets it up to 250 degrees per second, but the stick position is asking for 300, the error is 50.  250 is where it will stay if you only have P.  If the PID I value is say .01 and the error is constantly 50, I will contribute 0.5% throttle difference the first second, 1.0 the second second, 1.5 the third, until it gets what it wants.  You can see that the I term will get it from 250 all the way to 300.  This sounds slow.  It isn't.  The I term adds up quickly, it gets its job done in small fractions of a second.

Understanding D is perhaps less important.  D (Derivative) acts to reduce oscillation.  The derivative of something is just the rate of change of something, so the derivative of your car's position, if after an hour it has travelled 60 miles, is the rate (speed) 60mph.  On another note, if you accelerate from 0 to 60 in one half hour, your acceleration (the derivative of your speed) is 120 miles per hour per hour (not a typo). The derivative of roll rate error (300-250=50 from above) is roll acceleration error.  If the roll rate error is -40, then 10, then 60, the change of the "roll rate error" (roll rate error acceleration) is 50 degress per second per second.  For our quads, in Rate mode, D causes a change in motor output that is related to the rate of change of the roll rate error.  That's not that difficult to think about.  D might say the roll rate error is not increasing so it shouldn't do anything, or the roll rate error is increasing 100 degrees per second each second (e.g. 145 at first, then 245 the next second, then 345...), so I will damp that with -23; or the roll rate error is increasing 200 degrees per second each second (18, 218, 418), so I will damp that with -46.  You can use a little higher P if you use some D.

ATtitude mode means that your stick controls the aircraft aTtitude, basically the bank angle.  You release the stick, the stick goes back to the middle, the aircraft goes back to level.

Rate mode means that your stick controls the aircraft roll rate.  Release the stick and it stops rolling, even if it happens to be upside down, it stops rolling.

Acro plus is like very fast rolling rate mode but with expo so that the center of the stick is insensitive but at full stick the roll rate is insane.

RaTtitude is ATtitude around center stick.  You release the stick and it automatically levels out, but unlike ATtitude, when you give full stick, it will flip, so it is ideal for learning flips.  Don't be afraid of it.  Just never go over 1/2 stick unless you want stunts, because higher stick angles are very sensitive.  75% is upside down and 80 to 100% is flipping.  You will never be able to find that 75% spot.  It is too close to 80.

CruiseControl is the beginners helper and friend.  When you bank fairly hard, you need to add power or you loose aLtitude.  CruiseControl adds just the right amount of power automatically.  There are reasons why it isn't perfect, but it takes a lot of fiddling off the beginner's throttle stick.  CruiseControl also automatically cuts motor power when inverted, so it is also very helpful for learning flips.
« Last Edit: January 12, 2016, 09:08:13 pm by TheOtherCliff »

claytonbakerjr

  • *
  • 31
  • Pepe Le Pew
Re: Want to learn
« Reply #2 on: January 12, 2016, 07:18:24 pm »
Thanks Cliff I will review all of this later from home. I am sure I will have more questions. :) Can you direct me to the WIKI article you referenced in the beginning? I may be staring at it but not sure...  :/