AA241x-Intro-2015-Distribute

Introduction to AA241x
Spring Quarter 2015
W E L C O M E , O R G A N I Z AT I O N ,
AND
MISSION
LECTURE 1
MARCH 30, 2015
Juan J. Alonso, Robbie Bunge, Adrien Perkins
Department of Aeronautics & Astronautics
Stanford University
INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
4
Personnel
Instructors:
§  Prof. Juan J. Alonso, Durand 252, x3-9954, [email protected]
§  Robbie Bunge, Durand 464, [email protected]
Course Assistant (CA):
§  Adrien Perkins, Durand 453, 201-679-3680, [email protected]
§  A set of discipline “mentors” who can help with specific discipline-related
questions and piloting
5
Communications (1 of 2)
Class list. Go to lists.stanford.edu and subscribe to:
aa241x-class
Course website / wiki (want everyone to contribute!)
§  http://adl.stanford.edu/groups/aa241x
Piazza site: search for AA241X and add!
6
Communications (2 of 2)
You will be required to create and maintain a team
website that contains:
§  Team members, contact information, responsibilities
§  All technical details of your design, controls, mission
planning (it is up to you how you want to organize it…
but it must be kept current: we will check it regularly to
gauge progress)
§  Problem set solutions
§  Relevant data
§  Pictures, videos, etc. documenting work
7
Facilities
Class project areas:
§  Durand 353 (will provide combination)
§  Durand 055 (will provide combination / keys / access)
§  Durand 464: Laser cutter location
Lake Lagunita: our flight test facility!!!
Access to PRL if needed.
Foam cutter, laser cutter, vacuum bagging, basic electronics,
etc.
Spaces will be assigned to each team: keep them neat,
please!
8
Safety First!
Some of the equipment you will use requires that you
pay close attention / training to be safe:
§  If you are not sure, ask for help before you do something silly!
§  Training sessions will be held
§  When using the foam cutter and laser cutter (after you have
demonstrated proficiency) you MUST observe posted safety
precautions and there MUST be always two people in the room.
§  Machines / chargers will NOT be left unattended: fire hazard
§  This is serious: equipment privileges will be revoked if you fail to
observe all safety precautions
Safety ALWAYS comes first: use good judgment!!!!
9
Flying in Lake Lagunita
We are fortunate to have Lake Lag so close to the
Durand Building
But you must be careful to preserve this wonderful
resource for future generations of UAVers
A few rules to be observed:
§  Always fly well within the boundaries of the lake, avoiding flying
over trees and populated areas
§  Avoid walking on the lake itself: you can fetch planes, etc, but try
not to make unnecessary use of the lake itself
§  Be mindful of your footprint: trash, stepping on flora and fauna,
disturbing the birds and amphibians
§  You may encounter bird-count teams. Our airplanes can disturb
their counts. Plan on flying on another day
§  If anyone objects to your flying in Lake Lag, be polite, stop flying
and refer them to Prof. Alonso
10
Office / Lab Hours
TBD after team make-up and composition is complete
As the quarter progresses, the lecture time slot will be
occupied with one-on-one instructors / team meetings
(to be scheduled)
Open door policy for instructors and CA
Take advantage of mentors!
Seek out help/advice of UAV Club members
11
Become an AMA member…for free!
The Academy of Model Aeronautics has started a pilot
project whereby every current student can become a
member for free!
Benefits:
- Membership
- Digital copy of monthly magazine
- $2.5M liability coverage
In all of our flights, you will adhere to the AMA safety
code: under 400 ft, line of sight, < 4 lbs, always within
the bounds of Lake Lag
Last Year’s Mission
12
13
2014 Mission: Search & Rescue
Allowable area
✖
Target
✖
✖
✖
Camera Field of
View (FOV) = f(h)
Target position
estimate, R = g(h)
Estimated location
✖
2014 Mission: Scoring
1. 
2. 
3. 
Find the targets as fast as possible – “tsight”
Minimize the targets’ location error
Demonstrate reliability over multiple flights
Total Score:
Three scores may be discarded (mulligans)
nflight is incremented for every retained scoring flight achieving J>0
14 2014: Constraints
Scoring begins when the UAV crosses 50ft AGL in autopilot.
§  AGL = Above Ground Level, Lake Lag floor
Scoring ends if the Autopilot is turned off
Scoring ends when battery consumption passes 300mAh
The camera will pause snapshotting if the UAV flies above 400ft AGL, or
below 100ft AGL
15 Target Locations
Some Flight Data…Team 1
17 Some Flight Data…Team 2
18 Some Flight Data…Team 3
19 INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
21
Some Thoughts and Lessons Learned
From Last Year
Three teams far exceeded our expectations!! More than
30 flights in 3 days! You should be as successful!
Making the competition truly fair (more flights, reliability,
timing, etc) is always difficult…but we try!
Must continue to try to strike the right balance between
aircraft design, controls, and other disciplines
Teams may have been a bit too large?
22
Number of Units / Outcomes
This course is supposed to be taken for 3 units. There
is a very significant amount of work, but you will also
be working in teams of 7-8 students.
At the end of this course you should have acquired a
fundamental understanding of:
§  The process that is typically followed to design an autonomous
aircraft and its mission
§  Some basic understanding of all the component disciplines in
such a design, and an in-depth understanding of at least one of
those disciplines (that you are responsible for within your team)
§  An appreciation for the limitations of analysis / models when
compared to actual flight experiments
§  How to work in an interdisciplinary team and exercise leadership
in at least one area
INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
This Year’s Mission
24
2015 Mission: Fire Monitoring and Prevention
•  This year’s mission is inspired by UAVs that may:
§  Monitor a forest fire as it spreads
§  Extinguish a fire using an on-board load of water
•  Your objective is to analyze, design, build, and test fly
an unmanned aircraft that most successfully monitors
and extinguishes a fire
§  It is a competition!
§  Many choices to make
§  Work includes vehicle, control system, mission,
operation, construction, etc.
§  Not for the faint hearted!
2015 Mission: Fire Monitoring and Prevention
Valid fire region
Cell with active fire
Prevailing wind
Camera Field of
View (FOV) = f(h)
Extinguished cell
2015 Mission: Parameters (Near Final…)
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
FIELD_CENTER_LAT = 37.4224444°
FIELD_CENTER_LON = -122.1760917°
FIELD_RADIUS = 340 m
CELL_SIZE = 20 m
Aircraft cannot exit Lake Lagunita area (defined as a circle
of D = 340 m, centered on (LAT,LON)
Number of available “squirts” is proportional to additional
mass carried, Nsquirt / mwater = 1 “squirt” / 10 grams
Can only squirt when flying > 100 ft and < 400 ft altitude
Once a cell has been squirted it cannot catch fire again
Mission duration specified, Tmission = 10 min
Battery capacity unlimited, but must land when voltage is
lower than a pre-specified threshold
Prevailing wind direction is given
Stochastic fire propagation algorithm known
Nstart<= 2 fires can start at t = 0 sec
Fire evolves with Δt = 15 sec
2015 Mission: Scoring
•  Mission score is related to your ability to prevent the
fire from spreading, compared to allowing the fire to
propagate unattended
•  Cells burned if fire unattended, Nburn-unatt
•  Cells burned with UAV active, Nburn-UAV
•  Mission score = 100 x (1 –(Nburn-UAV / Nburn-unatt))
•  Reliability multiplier δrely = 1 + 0.1 floor (nflight/5)
•  Allowed 3 “mulligans” during official flights
2015 Mission: Competition
•  AA241x final competition will take place over multiple
days (June 1-9, 2015).
•  On 3rd or 4th day, we invite guests from AA and other
departments / institutions
•  Final reports due on June 10, 2015
•  Final class party that week
AA241x Hardware
•  Autopilot - Pixhawk
•  Running PX4 flight stack
•  32bit processor, 2MB Flash
•  3D accl, gyro, mag, baro
•  Pitot Tube (airspeed)
•  GPS
•  Wireless Telemetry
•  RC equipment
•  Servos
•  Motors
•  Transmitter / receiver
•  Batteries
•  Building Supplies (balsa, foam, etc)
•  Required
•  Laptop with any OS
AA241x Software
PX4 Firmware
•  Stanford PX4 software stack
•  Built on NuttX real time OS
•  “Module” based software
Nuttx (real time OS)
Pixhawk
Firmware
Middleware
Hardware
PX4 Firmware
High Priority
Module
Low Priority
Module
Sensor
Module
Other
Modules …
•  Your Code
•  High and Low priority modules (threads) for control law
•  Provide you with take picture and water drop functions, intermodule communication
•  QGroundControl ground station
•  Real time UAV and mission status
INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
33
Team Composition
Given enrollment and limitations in lab space /
resources, we expect 3 teams will be formed (with
approx. 7-8 students each)
Each team must gather the following expertise:
§ 
§ 
§ 
§ 
§ 
§ 
§ 
§ 
Aerodynamics / configuration design
Propellers / propulsion
Guidance, Navigation & Control
Familiarity with hardware (batteries, servos, receivers,
transmitters, soldering, accels, gyros, pressure sensors)
Software (including RTOS and thread programming)
Aircraft performance
Mission planning
Fabrication / construction
34
Team Composition (II)
Each student to fill out a form we are handing out with areas of
expertise to help balance the teams. If you have a preference
for teammates, please state that in the form. We will try to take
that into consideration.
Teams (and team names: think of a cool one!) will be introduced
during second lecture
We encourage your team to meet regularly (minimum: twice a
week for one hour), and to select a team lead.
We have found that a “Chief Engineer” in each team facilitates the
progress of your work. Consider such a position and choosing
the right person.
We do want an official POC, who can be the same as the CE
Team meetings include discussions and team working sessions
Instructors and CAs are available to participate in some of your
team meetings to facilitate and answer questions that may arise
during the course
Syllabus / Schedule /
Milestones
35
“Fly early / fly often” approach
A few lectures to ensure you have the basic knowledge
Lots of lab time
“Assignments” to make sure you learn R/C, operation of
the board, autonomous flight, before building your
own aircraft
Some guest lectures
36
Tentative Syllabus
March 30: Introduction, team make-up discussion
April 1: Teams finalized, performance estimation, hardware
handed out
April 1 or 2: Intro to Hardware Tutorial Session
April 6: Team Progress Review
April 8: Motor-propeller performance analysis & estimation
April 13: Flight dynamics, PS1 Due
April 15: Low-speed airfoil and wing analysis / design
April 20: Intro to S&C, basic PID control ideas, aircraft
stability & control (Rock)
April 22: Team Progress Review
April 27: Lab time or Team Progress Review
April 29: Optimal Path Planning (Pavone), PS2 Due
May 4: Systems Engineering (Weiss)
37
Tentative Syllabus (II)
May 6: Flight testing and basic system ID
May 11: Team Progress Review
May 13: Lab time
May 18: Team Progress Review
May 20: Lab time, PS3 Due
May 25: UAVs: an industry perspective (S. Morris)
May 27: Lab time
Jun 1-5: FLIGHT TRIALS!!!!
Jun 4: Tentative Open House day
Jun 9-10: Possible flight trials.
June 10: Final reports due
Jun 11: Grades due
June 11 or 12: Class Party
38
Some Thoughts
Very fast paced.
Team must be well organized and you MUST stick to a
weekly routine.
PS’s are VERY important: extra credit will be awarded
for completing them ahead of schedule (5% extra
credit for each day turned in early). All 3 PSs are
being handed out in case you want to move ahead.
Remember, this class is organized as a competition…
and there is a prize for the top team:
Top team gets to keep all the hardware!
39
PS Description / Outline
PS1:
§ 
§ 
§ 
§ 
§ 
Build kit R/C aircraft, build 1st iteration of your own model
Fly with autopilot (not engaged), log data, ground station
Analyze data and compare to predictions: L/D, CLmax, VLM
Initial path planning (strategy only!)
Report, no presentation.
PS2:
§  Demonstrate basic autonomous control on R/C kit aircraft,
including: straight and level flight with given heading/altitude.
§  Demonstrate basic attitude control
§  Report/plot intended vs. actual data, experiment with control
gains to try to minimize errors
§  Build 2nd aircraft prototype; ready to fly.
§  More refined mission planning / approach.
40
PS Description (II)
PS3:
§  Demonstrate waypoint navigation (at least with kit R/C
aircraft, possibly your own aircraft)
§  Waypoint navigation must demonstrate altitude
changes
§  Detailed mission planning approach, support
simulations in place.
41
Hardware Issued
Pixhawk PX4 board with telemetry
GPS, power module, speed sensor
Wiring / cables
Receiver
Batteries
Motors / propellers
Supplies in lab (foam, plywood, glues, fiberglass, epoxy, balsa, etc)
Things you need:
§  Laptop, software stack (Mac OS X, Linux, and Windows should work).
You might need to use virtual machine software to run windows under
Linux / Mac OS X.
§  Toolbox for the field.
§  Lots of energy and drive.
42
Equipment Responsibilities
Each team is responsible for returning the equipment you will be
handed out in the same condition you received it
Each team will have a budget of $250 for the quarter for anything
you need. Keep receipts to be reimbursed at the end of the
quarter
You break it, you replace it!
Please be careful, heed warnings, and wait until you have received
training to use equipment
Attenuating circumstances will be taken into consideration
INTRODUCTIONS
OBJECTIVES OF THIS
COURSE
M I S S I O N , H A R D WA R E ,
S O F T WA R E
TEAMS & REQUIREMENTS
GRADING
44
Grading
Grading a “team” course is always hard:
§  Within each team, did X do more work than Y? Was X more instrumental
to the success of, or more responsible for the failure of, than Y?
§  Among teams: did Team 1 do better than Team 5? Remember we do
have numerical scores for this part!
Grading will be a combination of:
§  Your team’s performance in “assignments”
§  Your team’s performance in project reviews
§  Your team’s performance in final competition
Grading
• 
Although the class is arranged into teams, each student will be graded
individually for his/her contributions
• 
Every problem set solution will be co-written by all team members.
Each team member that has contributed to a particular section will be
identified
• 
Final team project writeup will be co-written by all team members.
Each team member that has contributed to a particular section will be
identified
• 
Instructors will observe, throughout the quarter, the contributions of all
team members
• 
Bonus exercise: at the end of the quarter each of you will have a
chance to “grade” everyone else in your team…anonymously.
46
Some Help…
Sign up for Stanford AA’s very own UAV club for help
with flying R/C and others goodies
SUAVE: see http://uav.stanford.edu/about
Thanks a lot for your attention!
See you on Wednesday if you have the right stuff!
Questions & Answers
More details at
http://adl.stanford.edu/groups/aa241x