SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Aug 01, 2010, 02:16 PM
Registered User
Joined Jan 2009
461 Posts
Build Log
Quadrotor Physics and Control Theory

INTRO

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:

COMPONENTS:

I currently own these:

Controller Board:
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.
http://www.rcgroups.com/forums/showthread.php?t=1075426

AVR Programmer:
AVRISP mkII - $34
http://www.mouser.com/ProductDetail/...KN%252bCIDE%3d

Frame:
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.
http://paparazzi.enac.fr/wiki/BoozAirframes

Motors (including 1 spare) from Hobby King
5x #KDA20-50S Hacker Style Brushless Outrunner 20-50S, Kv 1088, max current 8amp = $72.10
http://www.hobbyking.com/hobbyking/s...idProduct=4699

ESCs (including 1 spare) from Hobby King
5x TURNIGY Plush 12amp (2A BEC) = $47.35
http://www.hobbyking.com/hobbyking/s...idProduct=2161

ESC Programming Card from Hobby King
1x TURNIGY BESC Programming Card = $6.95
http://www.hobbyking.com/hobbyking/s...idProduct=2169

Propellers: (including 1 spare of each orientation) from AeroQuad store
3 x APC 8x3.8 Slow Flyer Pusher Propeller (LP08038SFP) = $12.00
http://carancho.com/AeroQuad/store/i...products_id=28
3 x APC 8x3.8 Slow Flyer Propeller (LP08038SF) = $9.00
http://carancho.com/AeroQuad/store/i...products_id=27

Battery Charger from Hobby King
1x Turnigy Accucel-6 50W 6A Balancer/Charger w/ accessories = $22.99
http://www.hobbyking.com/hobbyking/s...idProduct=7028
1x 12V 5A 110/240V 50/60Hz Power Supply = $8.95
http://www.hobbyking.com/hobbyking/s...idProduct=6256

R/C Radio & receiver:
Turnigy 9X 9Ch Transmitter w/ Module & 8ch Receiver (Mode 2) (v2 Firmware) - $59.99
http://www.hobbyking.com/hobbyking/s...idProduct=8992

I am debating between the cheap but perpetually sold out Turnigy 9X 9Ch Transmitter w/ Module & 8ch Receiver (Mode 2) (v2 Firmware) and something more solid and expensive like the Spektrum DX6i. I don't plan on buying a fleet of other RC craft, so I don't think I need too many bells and whistles.

Optical Flow Sensor:
Centeye - $0.00 (donated by manufacturer. I will find out the retail cost)
http://diydrones.com/profiles/blog/s...gPost%3A177115

Battery:
ZIPPY Flightmax 2200mAh 3S1P 25C (x2) - $25.98
http://www.hobbyking.com/hobbyking/s...idProduct=7636

Lipo Bag:
Lithium Polymer Charge Pack 18x22cm Sack - $1.85
http://www.hobbyking.com/hobbyking/s...idProduct=4134


These parts I still need to determine and buy:

Lipo Alarm?:

Misc:
Wiring and connectors and such;

Total thus far: $749 (and counting)

LINKS

Useful Links
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:
http://www.rcgroups.com/forums/showthread.php?t=1075426

Custom NoVa airframe:
http://www.rcgroups.com/forums/showthread.php?t=1203460
http://paparazzi.enac.fr/wiki/BoozAirframes

Aeroquad, an Arduino based quad with its own forum and store and a lot of helpful people and resources:
http://www.rcgroups.com/forums/showthread.php?t=1066119
http://aeroquad.com/content.php

OpenQuad:
An ARM based quad with custom hardware, software, store, and forum with many very smart folks:
http://openpilot.org/

DIY Drones:
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
http://diydrones.com/

Daniel Mellinger, who brought us aggressive maneuvers with quadrotor helicopters and other videos:
http://fling.seas.upenn.edu/~dmel/wi...Main.Quadrotor

More Advanced Control System Links

Control System fundamentals, courtesy of my old prof:
http://multimechatronics.com/images/...m%20Design.pdf

In fact, you can peruse his other notes and tutorials here:
http://multimechatronics.com/mecha_notes.php
http://multimechatronics.com/tutorials.php

Here are some tutorials in MATLAB (which is a very common control design software tool). You don't need MATLAB to learn from these:
http://www.engin.umich.edu/class/ctms/

Here's a wiki for an entire class in controls - inculding a free textbook
http://www.cds.caltech.edu/~murray/amwiki/Main_Page


Thread guide
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

Planned Topics:

Quadrotor Dynamics
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


- Roy
RoyLB is offline Find More Posts by RoyLB
Last edited by RoyLB; Jul 24, 2011 at 12:23 PM. Reason: Added link to latest post
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 02, 2010, 10:07 PM
Registered User
Joined Jan 2009
461 Posts
Safety First!

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.

- Roy
RoyLB is offline Find More Posts by RoyLB
Last edited by RoyLB; Aug 09, 2010 at 07:05 AM.
Reply With Quote
Old Aug 02, 2010, 10:18 PM
multirotor/hotliner pilot
saturnine's Avatar
Chicago, IL
Joined Aug 2005
2,805 Posts
Hey Roy,

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.

Damon
saturnine is offline Find More Posts by saturnine
Reply With Quote
Old Aug 02, 2010, 10:36 PM
Registered User
Joined Jan 2009
461 Posts
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

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 02, 2010, 10:43 PM
Registered User
Joined Jan 2009
461 Posts
Quote:
Originally Posted by saturnine View Post
Hey Roy,

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.

Damon
Thanks, Damon.

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.

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 03, 2010, 07:21 AM
Tri-Quad-Hexa-Octo-copters!!
United States, TX, San Antonio
Joined Feb 2007
14,588 Posts
Hi Roy,
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:
kk quadrocopter - aggressive flying onboard (3 min 31 sec)
About as simple a build as it gets
http://www.rcgroups.com/forums/showt...9#post15691284
Cheers,
Jim
Quadrocopter and Tricopter Mega Link Index
jesolins is offline Find More Posts by jesolins
Reply With Quote
Old Aug 03, 2010, 07:52 AM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,700 Posts
Quote:
Originally Posted by jesolins View Post

This video is ABSOLUTELY Unreal. Wow!!!!
rimshotcopter is online now Find More Posts by rimshotcopter
Reply With Quote
Old Aug 03, 2010, 10:24 AM
multirotor/hotliner pilot
saturnine's Avatar
Chicago, IL
Joined Aug 2005
2,805 Posts
Nice. I really need to strap a camera and on try this for fun.

Quote:
Originally Posted by jesolins View Post
Hi Roy,
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:
http://vimeo.com/13830888 About as simple a build as it gets
http://www.rcgroups.com/forums/showt...9#post15691284
Cheers,
Jim
Quadrocopter and Tricopter Mega Link Index
saturnine is offline Find More Posts by saturnine
Reply With Quote
Old Aug 03, 2010, 11:21 AM
Registered User
Joined Jan 2009
461 Posts
Quote:
Originally Posted by jesolins View Post
Hi Roy,
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:
About as simple a build as it gets
http://www.rcgroups.com/forums/showt...9#post15691284
Cheers,
Jim
Quadrocopter and Tricopter Mega Link Index
Thanks, Jim, for both the kind thoughts and the link!

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 04, 2010, 09:39 AM
Registered User
Joined Jan 2009
461 Posts
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.

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 04, 2010, 09:44 AM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,700 Posts
Quote:
Originally Posted by RoyLB View Post
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.

- Roy
I want one of these very BAD myself. I have received a number of alerts stating they were back in stock but when I went to place my order, they were out of stock. Will have to wait for a few weeks now before attempting again, hopefully they will be in stock then or I will do as you did, just place the order and wait for my turn.
rimshotcopter is online now Find More Posts by rimshotcopter
Reply With Quote
Old Aug 04, 2010, 10:44 PM
Registered User
Joined Jan 2009
461 Posts
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.

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 06, 2010, 10:46 AM
Registered User
USA, NJ, Burlington
Joined Sep 2004
71 Posts
Subscribed

Good luck
theborg is offline Find More Posts by theborg
Reply With Quote
Old Aug 08, 2010, 08:45 PM
Registered User
Joined Jan 2009
461 Posts
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.

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Aug 10, 2010, 01:49 AM
Quad Crash Test Pilot
Mikro's Avatar
Joined Oct 2007
517 Posts
Roy, very much loking forward to reading through this thread as you continue! Thanks for all your contributions to the quadcopter community.
Mikro is offline Find More Posts by Mikro
Reply With Quote
Reply


Thread Tools

Similar Threads
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 10:28 PM
Discussion Yet another EXI 500 build McKrackin Large Electric Helis 7 Jun 03, 2010 02:52 AM
Discussion Yet another FPV Easy Star Build Jhondra FPV Talk 0 Jan 10, 2010 12:34 PM
Yet Another Zero Build Question Runyond Parkflyers 1 Jul 21, 2002 02:19 PM
Just can't build yet another Spitfire ? ChrisP Scale Kit/Scratch Built 0 Jun 25, 2001 04:42 AM