Introducing the Quadrotor Introducing the Quadrotor Flying RobotFlying Robot
Roy BrewerOrganizer
Philadelphia Robotics Meetup GroupPhiladelphia Robotics Meetup Group
August 13, 2009
13 Aug 09 2R. Brewer - Philly Meetup Quadrotor
What is a Quadrotor?● A vehicle having 4 rotors
(propellers) at each end of a square cross
● Typically remote controlled; can be autonomous or semi-autonomous
● Home built, research, and professional versions exist
● Typically built using r/c components, electric motors, microprocessors, servos, sensors, batteries
13 Aug 09 3R. Brewer - Philly Meetup Quadrotor
What is a Quadrotor Used For?● Fun radio controlled “toy”● Aerial Photography / Video● Surveillance● Robotics and/or Control Systems Research
13 Aug 09 4R. Brewer - Philly Meetup Quadrotor
How Does a Quadrotor Fly?• Rotor thrust and torque proportional
to rotor speed squared• 2 sets of counter rotating blades. • Torque inherently balanced• 4 inputs allow independent
actuation of pitch, roll, yaw and thrust
Controlling Roll/PitchControlling Roll/Pitch
Controlling AltitudeControlling Altitude
Controlling YawControlling Yaw
13 Aug 09 5R. Brewer - Philly Meetup Quadrotor
How to Obtain a Quadrotor?● Buy
– http://www.asctec.de– http://www.microdrones.com– http://www.draganfly.com
● Build (existing kits & plans)– http://aeroquad.info/bin/view/Main/WebHome– http://mikrokopter.de– http://uavp.ch/moin
(Why are there so many German quads? :-)
● Comprehesive list:– http://multicopter.org/wiki/Multicopter_Table
● Design Our Own!
13 Aug 09 6R. Brewer - Philly Meetup Quadrotor
University Research● STARMAC – Stanford
– http://hybrid.eecs.berkeley.edu/index.php?section=37● MIT
– http://vertol.mit.edu/index.html● EPFL
– http://asl.epfl.ch/research/projects/VtolIndoorFlying/indoorFlying.php
● Brigham Young– http://www.ece.byu.edu/roboticvision/HelicopterPlatform/Heli
copterPlatform.html● Many more...● Many technical research papers available on-line● Task is equivalent to B.S Eng Project up to PhD Thesis!
13 Aug 09 7R. Brewer - Philly Meetup Quadrotor
Skills / KnowledgeMy contribution:● Control Theory & Algorithms (PID etc.)
I Have Some Knowledge of:● Sensors (MEMs, GPS, Compass)● Microcontrollers, Embedded Systems, & Software● DSP / Filtering
What I need to learn:● Radio Control Equipment● (Brushless) Motors & Servos● Vision processing● Airframe Design & Construction● PC / ground station programming
13 Aug 09 8R. Brewer - Philly Meetup Quadrotor
Personal Goals:● Professional Development
– UAV– Advanced Controls– Sensor Processing / Sensor Fusion
● Kalman, Complementary Filters, etc● Personal
– Microcontrollers– Embedded S/W– Electronics– Radio Control– Website / Blog / Magazine Articles
13 Aug 09 9R. Brewer - Philly Meetup Quadrotor
Project Goals:● Manual (Radio Control) Operation
– Acrobatic mode: angular rate & thrust command– Stable Mode: Translational rate command / position and
altitude hold● Semi Autonomous Operation
– Telemetry to Laptop-based ground station– Voice operation
● Fully Acrobatic● Automatic P.I.D. Gain tuning● Other
– Provide Write-ups of Quad Dynamics, Control Loops (and theory), & S/W Design
– Use Open Souce / Free S/W tools where possible
13 Aug 09 10R. Brewer - Philly Meetup Quadrotor
Project Status● Software
– Math / Simulation Model ● Needs some work – drag models, etc.● Good enough to begin code prototyping
– Code● About to prototype control ideas
● Hardware– Controller
● My friend Brijesh has designed, built and is testing a custom AVR ATMega644p based board:
– Airframe, motors, ESCs, R/C gear, propellers, etc.● Some ideas, but nothing yet purchased
13 Aug 09 12R. Brewer - Philly Meetup Quadrotor
Custom Controller Card * ATMEGA644p processor ( Same as Sanguino). * 20 MHz clock rate. * Serial port 1 : USB or Xbee link. o Arduino bootloader supported on both USB and Xbee links. * Serial port 2 : Venus GPS module from Sparkfun. * 4 Channel RC receiver input. Interrupt based de-coding. * 4 Channel Hardware PWM/Servo pulse. * Terminals to distribute power to 4 ESC's from battery. * 4 pole Butterworth Anti-aliasing filters on all sensors inputs. * Gyros o IDG500 Break out board connector (X and Y axis) + IDG500 output selectable between 100 Deg/sec or 500 Deg/sec via a jumper. o LISY300AL break out board connector (Z axis) * Accelerometer: Two options available o MMA7260 breakout board connector. (Ana-log outputs). o LIS302DL breakout board connector, (I2C in-terface). * Battery voltage monitoring. * 3inx3in Dimensions with 4 mountings holes.
● http://sites.google.com/site/pushpakquadrotor
13 Aug 09 13R. Brewer - Philly Meetup Quadrotor
Technical Challenges - Control● Airframe Dynamics Are:
– Non-linear: ● 3-D Attitude (orientation): Trig functions,
Singularities, Quaternions– Coupled:
● Translation requires attitude changes● Attitude change requires thrust change to avoid
altitude (height) change● Many control schemes are employed
– “Simple” Proportional Integral Derivative (PID)– More advanced non-linear concepts– Distributed control – split on-board and laptop
13 Aug 09 14R. Brewer - Philly Meetup Quadrotor
Control Concept● Acrobatic mode: Rate command/attitude hold; direct thrust command● Precision mode: Velocity command/position hold;rate of climb command / altitude hold ● Autonomous commands (possibly via laptop over telemetry)● Automatic or manual switching between modes
Quadrotor
SensorsComp.Filters
R/C Joystick
OrLaptop
AttitudeCommand
RotorMixing
PID/Other
Feedback
VelocityCommand
PID/Other
Feedback+ -
+-
Software
13 Aug 09 15R. Brewer - Philly Meetup Quadrotor
Technical Challenges - Sensors● Must sense position & orientation to control them● Gyroscopes
– Sense angular rates– Suffer from bias– Must be integrated to determine attitude– Usable only in a medium frequency range
● Accelerometers– Sense linear acceleration– Very noisy– Gravity must be handled carefully– Useable only in a low frequency range
● Other sensors:– GPS, Sonar, Magnetometer/Compass, Vision, etc.
13 Aug 09 16R. Brewer - Philly Meetup Quadrotor
Sensor Fusion● Complementary Filter
– Concept: utilize each sensor over the frequency range where they provide good attitude data
– Integrate and High Pass filter gyro data– Low Pass Filter accelerometer ATAN data– Tune filter based on data– Inverse of stereo woofer/tweeter network
● Kalman Filter– Contains model/observer/predictor– And corrector feedback loop with varying gain– Uses statistical parameters– Much more complicated to understand and implement
13 Aug 09 17R. Brewer - Philly Meetup Quadrotor
Complementary Filter Design - 1
1/s
1/s
+
+
+
+
-
k*k
2*k
11
22
11
Gyro (deg/s)Gyro (deg/s)
Accel (deg)Accel (deg)
SCICOS Model
13 Aug 09 18R. Brewer - Philly Meetup Quadrotor
37.0 37.5 38.0 38.5 39.0 39.5 40.0 40.5 41.0-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
2nd Order Complementary Filter
T im e (sec)
Atti
tude
(deg
) & R
ate
(deg
/s)
Gyro
Accel
Fi l ter
T rue Angle
Complementary Filter Design - 2
13 Aug 09 20R. Brewer - Philly Meetup Quadrotor
Other Links from the Meetup● DIY Drones – UAVs - http://diydrones.com● Sparkfun – Electronic Parts & tutorials - http://www.sparkfun.com● Arduino – Microprocessors simplified - http://www.arduino.cc/● AVR Freaks – lots of info for AVR microprocessors
http://www.avrfreaks.net
● Scilab/Scicos – Free Matlab clone - http://www.scilab.org; http://scicos.org; http://scicoslab.com
● Open Office – MS Office “clone” - http://www.openoffice.org● Magazines
– Nuts and Volts – general electronics - http://www.nutsvolts.com
– Servo – robotics - http://www.servomagazine.com
– Circuit Cellar – pro electronics - http://www.circellar.com
– Elektor – UK electronics -http://www.elektor.com/magazines.46742.lynkx
– Robot – robotics - http://www.botmag.com