Go Down

Topic: Quadcopter stabilization algorithm (Read 20 times) previous topic - next topic


I see where I have misled you.  I am already using the KK board to control pitch and roll.  It is only $12.  KK v2.0 includes accelerometers to keep it level.  I agree with your statement.  I assert that P and I are all that is needed.  Each is only a few lines of code combined with my existing assembly code in the KK board.  The job of the KK board is to keep it stable in pitch, roll, and yaw.  It does nothing for altitude.  My code will keep the yaw from drifting using a magnetic compass.  It will keep the altitude constant when you enable it.  It will keep it in one position using GPS on top of the KK v2.0 leveling which does not take into account wind.  In the end I may decide to modify the assembly code on KK, but for now I'm going to intercept the PWM between the receiver and KK, and modify it with a few short lines of C.  One step at a time.  Let's start with the altitude.  Standby.  I'm going to rip out the important part from my testing code.  It's a work in progress.
If you fall... I'll be there for you!

Skype Brighteyes3333
(262) 696-9619


Around here (university engineering department that teaches controls) the consensus seems to be that PID is less effective than other control algorithms, but it is used because it is simpler (to implement and understand).

PID can be applied to a wide variety of systems, and is conceptually simple. What 'other control algorithms' are you thinking of? The P, I and D elements each have a distinct purpose and are each simple to understand. P alone and P+I each represents subsets of the full PID which might work OK in specific situations, but if you omit the Integral term it may not converge on zero error, and if you omit the Derivative term it is liable to suffer from oscillations.
I only provide help via the forum - please do not contact me for private consultancy.


Thank everybody for your answer.

Can you explain exactly how PID works or post some pseudo code please. Im a bit confused...


No need for pseudocode - the PID library has the real thing and you can read about it here: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/


I have searched a long time for this kind of tutorial ... thank you so much !

Go Up