Jan 28, 2013, 06:38 PM
|
|
|
United States, FL, Tampa
Joined Mar 2006
146 Posts
|
Quote:
Originally Posted by xxJaRxx
Hello,
I am part way through building a quad more or less completely from scratch. I am now at the point where I have played around with my own 'off the top of my head' approaches to stabilising the flight - most of which just seem to overcompensate so it just keeps rocking instead of levelling (I have the quad set up as a 'see-saw' at the moment with only two motors/props running and no vertical movement).
It's probably important to mention that the aim of this project is purely to get the quad to hover autonomously in the air with no external user input (so no Tx/Rx). So as simple as: I hold it in the air indoors, switch it on, let it go and hover for a minute, then grab it and switch it off. So I'm pretty sure it's crucial that I make use of an accelerometer AND a gyro - I believe a lot of FCs just use a gyro.
So now it's time to get down to business and write some PID code which I have already done (although it's only very simple code atm), but I'm not sure of how best to use the output of the PID controller.
So my question: how do regular, simple, accelerometer & gyro flight controllers use the output of their PID controllers?
(in terms of; does the value obtained get multiplied by the speed value for a particular motor? or does the speed value of the motor get incremented or decremented by the value obtained? or does the PID controller generate the next actual speed value for the motor? or something else!)
Sorry for the 'round about' way of asking the question!
If any clarification is needed please let me know.
Many thanks,
James
|
I have been playing around with the same thing... along with dozens of others in the Parallax forums. They released a quad with a Hoverfly Open FC board and many people have built their own variation on the board VERY cheaply and have been working (with varying degrees of success) with different coding to get the most out of it.
Personally I have been using the additive/subtractive approach and gotten somewhat stable hovers. My platform is a bit different though so I have other problems to work out (I am using quad EDF units... the ones commonly used in R/C Jets). One poster named JasonDorie has had a lot of success with the PID algorithms on the standard quads. You may want to look there, if nothing else to see the code and pick apart how people are doing things.
It is all open source, so reverse engineering is encouraged, and if you read through the threads there is a lot of good discussion on PID technique.
Hope it helps! You may have to hunt for the threads. Some are in the Projects section and some in the Propeller section. The Propeller is the CPU used.
--- John
|
|
|
|
|