|Aug 01, 2010, 03:16 PM|
Joined Jan 2009
Quadrotor Physics and Control Theory
This is a build log with a slight difference. Like many who have attempted to design and build their own semi-scratch built quadrotor, I am pretty much a complete noob when it comes to R/C (haven't owned any R/C except for those Radio Shack style cars when I was a kid), electronics (haven't touched a soldering iron in years), or general airframe construction (I don't own any power tools, unless you count an electric toothbrush) - to say nothing of quadrotors.
But, I am an experienced rotorcraft fly-by-wire control design engineer. I'm talking about the kind of vehicle you can get in yourself and fly (or at least you could if you were an qualified Marine or Air Force pilot). I also know a thing or two about programming (although I'm by no means an expert). In between the typical build log fare, I plan to post a few mini tutorials on quadrotor dynamics and control, and even some control theory in general. So, while you're laughing at my rookie mistakes (or better yet, helping to prevent me from making them), I'll be letting you in on some of the higher level theory that doesn't seem to make much of an appearance around RCG. Hopefully we'll all learn something along the way. One of the motivations for this project is to experiment with advanced control law concepts, besides the standard PID loops that all the other hobby quads seem to employ. I plan to release the code I develop as open source. I'm also working on a model of the quad in Scicos Scilab (a free MATLAB Simulink clone) primarily for use in design purposes. But, with some work, the model could become a full graphics quad simulation tool.
One of the more difficult things for me was trying to decide which components to buy. I knew I wanted a more manageable, medium sized quad due to personal storage space issues (about a foot motor to motor distance). I didn't care too much about aerial photography. I wanted something that was fairly maneuverable. Due to my lack of tools and skills, I was willing to spend more money to let others do some of the building for me.
Then inspiration struck - I realized that the aggressively maneuvering quads in everyone's favorite YouTube video were about the same size as the quad I was trying to build. So I've set out to copy the Ascending Technologies X-3D BL, as detailed here: http://www.rcgroups.com/forums/showthread.php?t=950768 and here http://www.societyofrobots.com/robot...d_at_1_Khz.pdf.
Of course, I could just buy the X-3D or its individual components, but they want way too many dollars (or should I say Deutchmarks? No, I guess I should say Euros). So here's what I've come up with thus far:
I currently own these:
Custom "Pushpak" ATMega644P-based board, with on board gyros & accelerometers, XBee telemetry, and 4th order antialiasing filters - $276
(price includes Xbee for the groundstation. Sensors and other parts mostly from Sparkfun). Designed by my friend Brij.
AVRISP mkII - $34
NoVa custom balsa carbon composite frame, motor to motor cross distance is 12.625": $150 + $20 for customizations. These guys have been very helpful and patient with all my noobie questions.
Motors (including 1 spare) from Hobby King
5x #KDA20-50S Hacker Style Brushless Outrunner 20-50S, Kv 1088, max current 8amp = $72.10
ESCs (including 1 spare) from Hobby King
5x TURNIGY Plush 12amp (2A BEC) = $47.35
ESC Programming Card from Hobby King
1x TURNIGY BESC Programming Card = $6.95
Propellers: (including 1 spare of each orientation) from AeroQuad store
3 x APC 8x3.8 Slow Flyer Pusher Propeller (LP08038SFP) = $12.00
3 x APC 8x3.8 Slow Flyer Propeller (LP08038SF) = $9.00
Battery Charger from Hobby King
1x Turnigy Accucel-6 50W 6A Balancer/Charger w/ accessories = $22.99
1x 12V 5A 110/240V 50/60Hz Power Supply = $8.95
R/C Radio & receiver:
Turnigy 9X 9Ch Transmitter w/ Module & 8ch Receiver (Mode 2) (v2 Firmware) - $59.99
Optical Flow Sensor:
Centeye - $0.00 (donated by manufacturer. I will find out the retail cost)
ZIPPY Flightmax 2200mAh 3S1P 25C (x2) - $25.98
Lithium Polymer Charge Pack 18x22cm Sack - $1.85
These parts I still need to determine and buy:
Wiring and connectors and such;
Total thus far: $749 (and counting)
I will post some links to other helpful RCG threads as well as external links of interest.
The custom control board discussion, with links to its own dedicated home page with schematics, data, and code repository:
Custom NoVa airframe:
Aeroquad, an Arduino based quad with its own forum and store and a lot of helpful people and resources:
An ARM based quad with custom hardware, software, store, and forum with many very smart folks:
Blogs and forums for all kinds of UAV and R/C flying vehicles, including quads. They sell and support at least two custom controller boards
Daniel Mellinger, who brought us aggressive maneuvers with quadrotor helicopters and other videos:
More Advanced Control System Links
Control System fundamentals, courtesy of my old prof:
In fact, you can peruse his other notes and tutorials here:
Here are some tutorials in MATLAB (which is a very common control design software tool). You don't need MATLAB to learn from these:
Here's a wiki for an entire class in controls - inculding a free textbook
I also plan to link interesting posts to this first post to provide a table of contents of sorts for the thread.
Quad Safety: \http://www.rcgroups.com/forums/showp...81&postcount=2 (8/2/2010)
What makes quadrotors so cool? http://www.rcgroups.com/forums/showp...4&postcount=14 (8/8/2010)
Turnigy 9X 9Ch Transmitter info: http://www.rcgroups.com/forums/showp...4&postcount=57
Visit to U Penn GRASP lab to see aggressive quadrotors http://www.rcgroups.com/forums/showp...8&postcount=68
Quadrotor Physics 101 http://www.rcgroups.com/forums/showp...5&postcount=69
Quadrotor Dynamics 102: Simple Rotations http://www.rcgroups.com/forums/showp...9&postcount=75
Quadrotor Dynamics 103: Applying the Principles to the Quadrotor http://www.rcgroups.com/forums/showp...5&postcount=81
Quadrotor Dynamics 104 - Putting our ideas into motion. http://www.rcgroups.com/forums/showp...0&postcount=99
Control Theory 100 – A Disclaimer http://www.rcgroups.com/forums/showp...&postcount=100
Control Theory 101 – The Joy of Feedback http://www.rcgroups.com/forums/showp...&postcount=129
Modeling 101 - Simple Angular Dynamics http://www.rcgroups.com/forums/showp...&postcount=177
Modeling 102 - A Little Rate Feedback http://www.rcgroups.com/forums/showp...&postcount=186
Control Theory Basics - what is PID?
Why do we need sensors and how should we use them?
Estimators - complementary filters and Kalman filters
Advanced control Theory - beyond PID
|Aug 02, 2010, 11:07 PM|
Joined Jan 2009
RC Groups is filled with posts describing quadrotor injuries, some with (bloody) pictures to match. Its important to remember that these things are not toys. Weighing in from half a kilogram (about the size of my quad) to several kilos, these things can do some damage - to say nothing of the four whirring (and quite sharp) blades. If you're developing your own code - as I am - the consequences of bugs are worse than just a blue screen of death. Even if you are a perfect programmer and an excellent airframe builder, parts can still fail on you.
Here are some safety tips:
- Be to sure to maintain a comfotable distance between the quad and items you'd prefer to remain undamaged: appendages, eyes, spouses, pets, furniture, etc.
- Join the Academy of Model Aeronautics (AMA http://www.modelaircraft.org/). They provide insurance coverage for R/C, among other services
- Build a Ducted Rotor: not only will it protect you and other valuable items from the blades (and protect the blades from the environment). but, if properly designed, can provide additional lift and perhaps reduce the tendency for rotor flapping. (my first build won't have shrouds, but I hope future ones might).
- Tether the quad. I plan to use fishing line. Be careful here - if you anchor to the side of your quad, then if the line goes taut it will tend to turn the quad, which may cause it to make a nice long arc intro the ground (Wile E Coyote style) if you're not quick enough on the throttle.
- Eye protection - always wear safety glasses
- Hand arm body protection - chain mail would do nicely, or at least gloves and long sleeves.
- Kill switch - have a switch in somewhere far from the props that kills power from the battery to the motors
As I think of other safety items, I'll post them here.
|Aug 02, 2010, 11:18 PM|
Best of luck with the thread. I hope to contribute and learn some things as well. In particular, I look forward to advanced control theory.
I know a fair amount of quads use Kalman or FIR filters, PID, PD or other similar control loops. I'm interested in what else is out there and it sounds like you suggest there may be better.
|Aug 02, 2010, 11:36 PM|
Joined Jan 2009
First batch of Hobby King parts has arrived
Well, that didn't take too long, I suppose - about a week. I have the motors, ESCs, programming card, and a lipo battery charger. Although I was aware of the dimensions when I ordered them, it is hard to believe how small the motors and ESCs actually are.
I guess I have some soldering ahead of me
|Aug 02, 2010, 11:43 PM|
Joined Jan 2009
Just try typing "quadrotor" into Google Scholar and see what you get.
There is a lot of advanced control and estimation ideas out there - as for whether its better or not, well let me put it this way: The aggressive quadrotor maneuvering YouTube videos were all performed using PID controls (OK, they used many thousands of dollars of worth of motion capture camera equipment, but there was still humble PID under the hood).
In any event, it should be fun to experiment.
|Aug 03, 2010, 08:21 AM|
United States, TX, San Antonio
Joined Feb 2007
Best of luck with your build!
If you like to flip and zoom quads around for fun you might be interested in the agressive flying KK video just posted by Warthox:
Quadrocopter and Tricopter Mega Link Index
|Aug 03, 2010, 08:52 AM|
This video is ABSOLUTELY Unreal. Wow!!!!
|Aug 03, 2010, 11:24 AM|
Nice. I really need to strap a camera and on try this for fun.
|Aug 03, 2010, 12:21 PM|
Joined Jan 2009
|Aug 04, 2010, 10:39 AM|
Joined Jan 2009
I went ahead and ordered the Turnigy 9X 9Ch Transmitter w/ Module & 8ch Receiver (Mode 2) (v2 Firmware). The item is on backorder at Hobby King (after getting emails on 2 separate occasions that said they were back in stock, only to have them sell out in a matter of hours before I had a chance to order one).
I suppose I have about a week to cancel the order, in case anyone wants to talk me out of buying one.
|Aug 04, 2010, 10:44 AM|
|Aug 04, 2010, 11:44 PM|
Joined Jan 2009
Propellers have arrived
Hmmm, this doesn't look quite as plug & play as I'd hoped. Does anyone have any good ideas as to the best way to attach APC 8x3.8 SloFly props to a A20-50S Hacker clone motor? I was hoping I wouldn't have to do major surgery to the motor or the prop, but it looks like I might have to after all.
I don't think I want the rubber-band "prop saver" mount, So I'll either have to go with the pedestal type mount (and possibly reverse the shaft and cut it down) or buy a collet adapter. I think I may need a metric insert for the props - the included ones don't quite fit the pedestal.
|Aug 08, 2010, 09:45 PM|
Joined Jan 2009
What makes Quadrotors so interesting?
I'm pretty sure that anyone with reasonable hand-eye coordination and dexterity with a joystick can fly a (properly designed) quadrotor. As rcgroups and other web sites have proven, you don't have to be an Aeronautical Engineer or even a controls guy to design a quad. Yet, every year dozens of new research papers and videos are published on this craft. How can this be? It turns out quadrotors have several interesting properties.
1) Quads are mechanically simple. A quad is basically just a cross with a motorized propeller at the end of each of the 4 arms. No swashplates, control surfaces, or servos (tricopters trade one prop for a servo, so it depends if you think a servo is more or less complicated than an extra motor. A tricopter will have thrust/yaw coupling on that rotor, so I think they're less elegant, but perhaps that's just me. Quads are more balanced, as we will discuss later.). On the other hand, even the dynamics of the Electronic Speed Controllers (ESCs), the Brushless Direct Current (BLDC) Motors, and the propellers are not that simple: http://www.rcgroups.com/forums/showthread.php?t=1006721
2) Quads are capable of hovering. You don't need a lot of space to experiment with one.
3) Quads exhibit complicated physics. They are:
3a) Underactuated. Like most flying vehicles, quads are free to move (or translate) about 3 axes (back/forth, left/right, and up/down; or longitudinal, lateral, and vertical; or simply X, Y,and Z) and rotate around 3 axes (pitch, roll, and yaw). This means they have 6 degrees of freedom (6 DOF). However, they only have 4 controls (the speed of the 4 rotors), which can be used to directly control the three axes of rotation and one of translation (thrust or Z-axis).
3b) Coupled. In order to access the other 2 DOF, X and Y (or longitudinal and lateral), the quad must rotate. Hence the rotational and translational dynamics are coupled.
3c) Nonlinear. Just describing rotation (the "kinematics" of rotation) is more difficult than it might seem, as anyone who's attempted to grasp quaternions, direction cosine matrices (DCM), or Euler angles can attest. Actually getting them to rotate (the "dynamics" of rotation) adds yet another layer of complexity - inertia tensors, anyone?
3d) Underdamped. Like helicopters, once the quad starts to rotate, there's not a lot of aerodynamic drag or other forces to stop it. This is why quads need sensors (gyros at a minimum) to make it easy for humans to fly. Helicopters often employ a hiller bar for the same purpose: to provide sufficient rate damping.
All this complexity doesn't stop folks from wrapping some PID loops around a quad running on an 8-bit microprocessor equipped with MEMS sensors and getting decent results. I'll have more to say about quadrotor dynamics and control in upcoming posts.
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Build Log||Yet another Guillows p51 kit, rc conversion build||saucerguy||The Builders Workshop||13||Aug 25, 2010 11:28 PM|
|Discussion||Yet another EXI 500 build||McKrackin||Large Electric Helis||7||Jun 03, 2010 03:52 AM|
|Discussion||Yet another FPV Easy Star Build||Jhondra||FPV Talk||0||Jan 10, 2010 01:34 PM|
|Yet Another Zero Build Question||Runyond||Parkflyers||1||Jul 21, 2002 03:19 PM|
|Just can't build yet another Spitfire ?||ChrisP||Scale Kit/Scratch Built||0||Jun 25, 2001 05:42 AM|