Introducing the Quadrotor Flying Robot Roy Brewer Organizer Philadelphia Robotics Meetup Group August 13, 2009
What is a Quadrotor? A vehicle having 4 rotors (propellers) at each end of a square cross Typically remote controlled; can be autonomous or semiautonomous Home built, research, and professional versions exist Typically built using r/c components, electric motors, microprocessors, servos, sensors, batteries 2
What is a Quadrotor Used For? Fun radio controlled toy Aerial Photography / Video Surveillance Robotics and/or Control Systems Research 3
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 Altitude Controlling Roll/Pitch Controlling Yaw 4
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! 5
University Research STARMAC Stanford MIT http://hybrid.eecs.berkeley.edu/index.php?section=37 http://vertol.mit.edu/index.html EPFL http://asl.epfl.ch/research/projects/vtolindoorflying/indoorfly ing.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! 6
My contribution: Skills / Knowledge 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 7
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 8
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 9
Software Project Status Math / Simulation Model Needs some work drag models, etc. Good enough to begin code prototyping Code Hardware About to prototype control ideas 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 10
Math Model / Scicos Simulation 11
Custom Controller Card http://sites.google.com/site/pushpakquadrotor * 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 decoding. * 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. (Analog outputs). o LIS302DL breakout board connector, (I2C interface). * Battery voltage monitoring. * 3inx3in Dimensions with 4 mountings holes. 12
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
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 R/C Joystick Or Laptop Software Velocity Command + - PID/ Other Feedback Attitude Command + - PID/ Other Feedback Rotor Mixing Quadrotor Comp. Filters Sensors 14
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. 15
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 16
Complementary Filter Design - 1 1 Gyro (deg/s) + 2*k + + 1 2 Accel (deg) + - k*k 1/s 1/s SCICOS Model 17
Complementary Filter Design - 2 2.5 Attitude (deg) & Rate (deg/s) 2.0 1.5 1.0 0.5 0.0 Gyro Accel Fil ter T rue Angle -0.5-1.0-1.5 37.0 37.5 38.0 38.5 39.0 39.5 40.0 40.5 41.0 T im e (sec) 18
The Bigger Picture 19
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 20