You are on page 1of 6

12th IFAC Symposium on Advances in Control Education

12th IFAC Symposium on Advances in Control Education


July 7-9,
12th IFAC2019. Philadelphia,
Symposium PA, USAin Control Education
on Advances
July
12th 7-9,
IFAC2019. Philadelphia,
Symposium PA, USAinAvailable
on Advances
online at www.sciencedirect.com
July 7-9, 2019. Philadelphia, PA, USA Control Education
July 7-9, 2019. Philadelphia, PA, USA
ScienceDirect
IFAC PapersOnLine 52-9 (2019) 36–41
A
Teaching
A
Teaching System
System for
for Hands-on
Hands-on
A
Teaching
QuadcopterSystem for
Control Hands-on
A
Teaching
QuadcopterSystem for
Control Hands-on
Quadcopter Control
Quadcopter Control
Paul N. Beuchat ∗∗ Yvonne R. Stürz ∗∗ John Lygeros ∗∗
Paul N. Beuchat ∗∗ Yvonne R. Stürz ∗∗ John Lygeros ∗∗
Paul N. Beuchat ∗ Yvonne R. Stürz ∗ John Lygeros ∗
∗ Paul N.Control Beuchat YvonneETH R. Stürz John Lygeros
∗ Automatic Laboratory, Zürich, ZH 8006, Switzerland
∗ Automatic Control Laboratory, ETH Zürich, ZH 8006, Switzerland
Automatic
(e-mail: Control Laboratory, ETH Zürich,
{beuchatp,stuerzy,lygeros}@control.ee.ethz.ch). ZH 8006, Switzerland
∗ (e-mail:Control
Automatic {beuchatp,stuerzy,lygeros}@control.ee.ethz.ch).
Laboratory, ETH Zürich, ZH 8006, Switzerland
(e-mail: {beuchatp,stuerzy,lygeros}@control.ee.ethz.ch).
(e-mail: {beuchatp,stuerzy,lygeros}@control.ee.ethz.ch).
Abstract: Quadcopters,
Abstract: Quadcopters, popular popular in in consumer
consumer and and commercial
commercial applications,
applications, are are aa perfect
perfect testing
testing
Abstract:
ground
ground for
for Quadcopters,
both
both basic
basic and
andpopular
advanced
advanced in consumer
control
control and commercial
techniques.
techniques. This
This applications,
makes
makes them
them arean
an a ideal
perfect
ideal testing
platform
platform
Abstract:
ground
for offering for Quadcopters,
offering both basic and
experiment-based popular
advanced in consumer
control courses.and
control Wecommercial
techniques.
presentThis the applications,
makes
software them areana ideal
system perfect testing
platform
developed to
for
ground for experiment-based
both basic and control
advanced courses.
control We present
techniques. the
This software
makes themsystem
an developed
ideal platform to
for
teach offering
hands-onexperiment-based
quadcopter control that
control, courses.we We present
have used theoffer
to software
a system
short course developed
to groups to
teach
for hands-on
offering quadcopter control,
experiment-based control that
courses.we have used totheoffer
We present a short
software course
system to groups
developed to
teach
of 32 32 hands-on
undergraduate quadcopter
electricalcontrol, that
engineering westudents.
have used
Ourtosystem offer
system aallows
short course
students totogroups
work
of
teach undergraduate
hands-on electrical
quadcopter engineering
control, that we students.
have Our
used to offer a allows
short students
course to togroups
work
of 32 undergraduate
simultaneously,
simultaneously, each
each with electrical
with a engineering
separate
a separate quadcopter.
quadcopter. students.
The Our
software
The software system
makes allows
the
makes the hands-on students
hands-on to
class
class work
easy
easy
of 32 undergraduate
simultaneously,
to manage,
manage, each the
allowing electrical
with a separate
instructor engineering
to quadcopter.
focus on onstudents.
theThe Our system
software
pedagogic makesallows
aspects. studentsclass
the hands-on to work
easy
to
simultaneously, allowing
each thethe instructor
withinstructor
a separate to focus the pedagogic aspects.
to manage, allowing to quadcopter.
focus on theThe software
pedagogic makes the hands-on class easy
aspects.
© 2019,
to manage, IFACallowing
(International Federationto
the instructor of focus
Automaticon the Control) Hosting
pedagogic by Elsevier Ltd. All rights reserved.
aspects.
Keywords: Control
Keywords: Control education
education using using laboratory
laboratory equipment,
equipment, generalgeneral control
control laboratories,
laboratories, open open
Keywords:
educational Control
resources, education
integratingusingresearch
laboratory and equipment,
teaching, general control
interactive control laboratories,
education open
tools.
educational
Keywords:
educationalControl resources,
resources, integrating
education
integratingusingresearch
laboratory
research and teaching,
teaching, interactive
and equipment, general control
interactive control education
education tools.
controllaboratories, open
tools.
educational resources, integrating research and teaching, interactive control education tools.
1. INTRODUCTION
1. INTRODUCTION ity of
of small-scale,
small-scale, low-costlow-cost quadcopters
quadcopters makes makes thisthis possi-
possi-
ity
1. INTRODUCTION ity
ble of small-scale,
without low-costthe
endangering quadcopters
students makes
or the this possi-
equipment
Experiment-based1.classes INTRODUCTION con- ity ble without
of small-scale,endangering the students or the
the equipment
Experiment-based classes are an
are an integral
integral partpart of of con- ble without
(Giernacki
(Giernacki et al., low-cost
etendangering
al.,
quadcopters
the
2017). Finally,
2017).
students
Finally, with or
with
makes
multiple
multiple
this possi-
equipment
students
students
Experiment-based
trol engineering classes are
education for an
both integral part of con-
undergraduate and ble without
(Giernacki
working et endangering
al.,
simultaneously 2017). to the students
Finally,
achieve with
stable or the equipment
multiple
hover students
with their
trol engineering education
Experiment-based classes are for anboth undergraduate
integral part and (Giernacki
of con- working simultaneously
ettheal.,instructor
2017).to toFinally,
achieve with stablemultiple
hover with their
students
trol engineering
graduate degrees education
(Antsaklis foret both
al., undergraduate
1999). One style andof working
quadcopters, simultaneously achieve
is able tostable
create hover
a with their
collaborative
graduate
trol degrees
engineering (Antsaklis
degrees education foret al.,
et both 1999). One
undergraduate style
styleand of quadcopters,
of working the instructor is able to create a collaborative
graduate
experiment-based
experiment-based
(Antsaklis
class is
class is where
where al.,
the 1999).
the instructor
instructor
One conducts
conducts learning simultaneously
quadcopters,
learning
the instructor
environment.
environment.
to achieve
This
This
is
not
not
ableonly
only
tostable
createhover
enhances
enhances
with their
a collaborative
the
the learning
learning
graduate
the degrees and
experiment-based
experiments (Antsaklis
class is where
together et with
al.,
the 1999).
instructor
a One conducts
style of quadcopters,
moderately-sized learning the
environment.
outcomes (Prince, instructor
(Prince, 2004), This
2004), but is
notable
but also onlyto create
enhances
also contributes a collaborative
the
contributes towards learning
towards the the
the experiments and
experiment-based together
classtogether
is observes
wherewith with
the a moderately-sized outcomes
the
group
group
experiments
of (10-30)
of
and
(10-30) students
students observes theinstructor
the
a results.
results.
conducts
moderately-sized
This
This style learning
style outcomes
development environment.
(Prince,
of soft 2004), This
skills butnotalso
(Feisel only enhances
contributes
and Rosa, the learning
towards
2005). the
the experiments and together with area results.
moderately-sized development
style outcomes of soft skills but
(Prince, (Feisel and Rosa, 2005).
group
is well
is well ofsuited
(10-30)
suited for students
for experiments
experiments
observes
that
that
the
are costly
costly toThis
to perform
perform development of soft2004),
skills (Feiselalsoand contributes
Rosa, 2005).towards the
group
is well of
or require (10-30)
suited
require bulky for students
experiments
bulky equipment, observes
equipment, for that the
are
for example, results.
costly
example, control toThis style
perform
control of A range
development of software
of soft and
skillshardware
(Feisel
of aa A range of software and hardware systems exist for systems
and Rosa, exist for setting
2005). setting
or
is well suited for experiments that areclasses
costlycontrol
to perform A
up range of software
aa multi-agent and hardware
quadcopter systems
platform, but exist
they for
are setting
either
or
car require
engine.
car require bulky
engine. bulkyAnother
Another equipment,
style is for
hands-on
style is hands-on example, where
classescontrol
where each of
each a up
A multi-agent
range of software quadcopter
and hardwareplatform,
systems but they
exist are
for either
setting
or
car engine.
student, or Another
perhaps equipment,
style
a pair for
isofhands-on example,
students, classes
conductswhere the of
each
ex- a up
not a multi-agent
openly available quadcopter
or not platform,
tailored to but they
enabling aare either
dynamic
the ex- up not openly available or not tailored to enabling a dynamic
student,
car engine.
student,
periment
or Another
or
perhaps a pairisofhands-on
perhaps astyle
themselves. pair style
This
students,classes
of students,
conducts
offers aa conducts
greaterwhere ex- not
theeach
learning andaopenly
and
multi-agent
available
collaborative
collaborative
quadcopter
classroom
platform,
or not tailored
classroom environment.
environment.
butThe
to enablingtheyquadcopter
The
aare either
dynamic
quadcopter
periment
student, themselves. This style offers greater learning not
and openly available
collaborative
platform from from Lupashin or
classroom
Lupashin et not tailored
environment.
et al.
al. (2014) to enabling
(2014) has The
has been a dynamic
quadcopter
been used
used to to
potential or
periment due perhaps
themselves.
to direct
direct a This
pair of students,
style
interaction offersthea conducts
of the greater with
student the the
learningex- platform
the and collaborative classroom
potential
periment
potential
experiment,
due
due
to
themselves.
to
for direct
example,
interaction
This style of
interaction
control
of
offers
of
an the
student
a student
greater
inverted
with
learning
with
pendulum. the platform
display
display from Lupashin
impressive
impressive acrobatic
acrobaticet environment.
al.feats,
(2014)
feats, but
buthasThe quadcopter
been
remains
remains used
closed
closedto
experiment, for example, control ofof an inverted pendulum. platform from Lupashin et al.The (2014) hasremains
been platform
used to
potential
However, due
experiment,
However, thefor
the
toexample,
direct interaction
hands-on
hands-on
controlare
classes
classes are
anthe
of often
often
student
inverted
condensed
condensed
with
pendulum.into
into
the a display
a
source and
source
display
andimpressive
research
research
impressive
acrobatic
focused.
focused.
acrobatic
feats,
The
feats,
but
Crazyswarm
Crazyswarm
but remains
closed
platform
closed
experiment,
However, 3-4 the
single 3-4 hourfor example,
hands-on
session control
classes
to achieve areofsufficient
an inverted
often condensedpendulum.
throughput into of a source
from
source
and research
from Preiss
Preiss et al.
et al. (2017),
and demonstrated
research
focused.
(2017),
focused.
alsoThe
also The
Crazyswarm
research
research focused,platform
focused,
Crazyswarm
is open
is open
platform
single
However, hour
the session
hands-on to achieve
classes are sufficient
often throughput
condensed into ofa from
source Preiss
and et al. (2017), a also
swarm research
of 49 focused, is
nano-quadcopters open
single 3-4 hour session
students. Experiment-based to
Experiment-based classes achieve sufficient
classes with throughput
with quadcopters
quadcopters fall of
fall from sourcePreiss
and demonstrated (2017),aa also
et al. algorithm swarm of 49 nano-quadcopters
research focused, is open
students. source
with andcontrol
demonstrated swarm of 49 nano-quadcopters
single
students.
in
in
3-4 Experiment-based
between
between
hour
these
these
session
two
two
to achieve
styles
styles classes
because
because
sufficient
a
awith
bulky
bulky
throughput
quadcopters
flying
flying space
space
of
fall
is
is with the
source the
and control
demonstrated algorithm a
implemented
implemented
swarm of 49
on-board
on-board the
nano-quadcopters the
students.
in between
required Experiment-based
but these
the two classes
styles because
quadcopters are awith
ideal bulky
for quadcopters
flying space
gaining hands- is with
fall the control
quadcopters
quadcopters and the
and
algorithm
the off-board
off-board
implemented
software
on-board and
software centralized
centralized the
and
required
in
on between
required
but the two
butthese
experience the
quadcopters
with stylescontrol
quadcopters
basic
are ideal
because
are ideal
for gaining
a bulky
concepts flying
for gaining
hands-
space
hands-
over multiple
multiple is with the control
quadcopters
streamlined
streamlined for
algorithm
andminimizing
for the
minimizing
off-board implemented
delays.
delays.
software
This
on-board
centralized
This limits
limits the
the
easeand
the ease of
of
on experience
required but the with basic
quadcopters control
are concepts
ideal for over
gaining hands- quadcopters
streamlined
adapting the and
for the
minimizing
Crazyswarm off-board
delays.
framework software
Thisto acentralized
limits the
classroom easeandof
set-
on experience
sessions. This
This paper with basic
paper describes control
describes the concepts
the multi-agent over
multi-agent software multiple
software sys- sys- streamlined
adapting thefor Crazyswarm framework
minimizingframework delays.needs Thisto a classroom set-
sessions.
on experience
sessions.
tem and This
hands-on withcourse
paper basic we
describes control
created concepts
the multi-agent
to enableover
software sys-aa adapting
multiple
teaching ting wherethe
ting where theCrazyswarm
the off-board
off-board software
software needs to limits
to
to be the easeset-
a classroom
be distributed
distributed
of
tem and
sessions. hands-on course we created to enable teaching sys-a ting adapting the Crazyswarm
where themultiple
for allowing
allowing off-board framework
softwaretoneeds
students to a classroom
worktosimultaneously.
be distributed
simultaneously. set-
tem and This
moderate classpaper
hands-on describes
sizecourse
of the multi-agent
we created
undergraduate to enable
students software
teaching
all working for
ting multiple
where themultipleoff-board students
software toneeds
work tosimultaneously.
be distributed
moderate
tem and
moderate class
hands-on
class size
size of
course
of undergraduate
we created
undergraduate students
to enable
students all working
teaching
all working a for
The allowing
development of students
Giernacki et to
al. work
(2017) uses the same
same
simultaneously with
simultaneously with quadcopters.
quadcopters. The allowing
for development of Giernacki
multiple students etto al. work
(2017)simultaneously.
uses the
moderate
simultaneously class size
withofquadcopters.
undergraduate students all working nano-quadcopter The development
nano-quadcopter and of Giernacki
and provides et al.
provides aa simulation (2017)
simulation and uses the same
and real-world
real-world
Quadcopters are
simultaneously
Quadcopters arewithan ideal
an ideal pedagogical platform
quadcopters.
pedagogical platform for expos- The
for expos- development
nano-quadcopter
experiment of Giernacki
and
environment, provides aetsimulation
but lacks
lacks al.the
(2017) usesreal-world
and
management the same
layer
Quadcopters
ing students are
to an ideal
control pedagogical
methods. The platform
steps tofor expos-
achieve experiment
nano-quadcopter environment,
and but
provides a the
simulation management
and layer
real-world
ing students are to control methods. The steps to achieve experiment
required to environment,
run a flexible but lacks
experiment-based the management
class. layer
Quadcopters
ing
stablestudents
hover of an ideal methods.
oftoaa control
quadcopter pedagogical
requireThe platform
stepscore
several toforcompe-
achieve required
required to
expos- experiment to run
run aa flexible
environment,
flexible butexperiment-based
lacks the management
experiment-based class.
class. layer
stable
ing hover
students to quadcopter
control methods.require Theseveral
steps core
to compe-
achieve The remainder of the paper is structured as follows.
follows.
stable
tencies hover
taught of ina quadcopter
the require several
undergraduate control core compe- required
curriculum, The to run aofflexible
remainder the experiment-based
paper is structured class.
as
tencieshovertaught in the undergraduate control core curriculum,
stable
tencies
including
including
taught of in
non-linear
non-linear
a quadcopter
themodelling,
modelling,
require
undergraduate several
controlanalysis
equilibrium
equilibrium
curriculum,
analysis and The
compe-
and
Section
Section
The
remainder
222 describes
describes
remainder
of the
of the
the paper
the multi-agent
multi-agent
paper
is structured
software as
software
is structured
follows.
system
system
as
we
we
follows.
tencies
including taught in
non-linear the
linearization, continuous-time undergraduate
modelling,
continuous-time and control
equilibrium
and discrete-time curriculum,
analysis
discrete-time linear and
linear sys- Section
developed
sys- Section describes
to enable thea multi-agent
distributed, software
flexible, system
and we
easy-
developed to enablethe
2 describes a multi-agent
distributed, softwareflexible, and easy-
linearization,
including
linearization,
tem control non-linear
techniques, modelling,
continuous-time and andequilibrium
discrete-time
discrete-time analysis and developed
linear sys-
representations. to-manage to enable a for
environment distributed, flexible, system
teaching quadcopter
quadcopter andcontrol.we
easy-
tem control techniques, and discrete-time representations. to-manage
developed environment
to enable a for teaching
distributed, flexible, and control.
easy-
linearization,
tem
An experiment-based
experiment-basedcontinuous-time
control techniques,quadcopter and
and discrete-timediscrete-time
class can
can linear
representations.
combine mul- sys- to-manage
Section
mul- to-manage 3 environment
presents the for
course teaching
we quadcopter
conduct each control.
semester
An quadcopter class combine Section 3 presentsenvironment the course we conduct
forLaboratory
teaching each semester
quadcopter control.
tem
An
tiple control techniques,
experiment-based
pieces of knowledge and discrete-time
quadcopter
in a way class
that can representations.
guidescombine
students mul-to Section
at the 3 presents
the Automatic
Automatic the course
Control we conduct of ETHeach Zürich
ETH semester to
tiple pieces of knowledge in a way that guides students to at
Section
at the 3 presents
Automatic Control
the
Control Laboratory
course we
Laboratory conductof
of each
ETH Zürich
semester
Zürich to
to
An
tipleexperiment-based
pieces
reach the of
the applicationknowledge
application and quadcopter
in a
and analysis way
analysis levelsclass
that
levels ofcan
guidescombine
students
of Bloom’s
Bloom’s taxon- mul-to
taxon- at achieve
achieve the pedagogic
the pedagogic goals
goals described. Section
described.ofSection 4 closes
4 closes
reach to achieve
by the Automatic
the pedagogic Control goalsLaboratory
described. ETH Zürich
Section 4 closes to
tiple
reach
omy
omy
pieces
(Bloom
ofetknowledge
the application
(Bloom et al.,
al., and in
1956).
1956).
a way levels
analysis
Moreover,
Moreover,
that guides
interaction
interaction
students
of Bloom’s taxon-
with
with the
the by highlighting
highlighting
achieve the
extensions
extensions
pedagogic goals
and
and opportunities
opportunities
described. Section
that
that
4
our
our
closes
reach
omy
system the
(Bloom application
an et
is an and
al., 1956).
important analysis
Moreover,
part levels of Bloom’s
interaction with
of experiment-based
experiment-based taxon-
the by
control by highlighting
quadcopter testbed extensions
offers. and opportunities that our
quadcopter
highlighting testbed offers.
extensions
system
omy
system
education
is
(Bloom
is anas
important
et al., 1956).
important
it activates
part
part
the
of
Moreover, interaction
of experiment-based
students to be more
control
with the quadcopter
control
involved testbed offers. and opportunities that our
education
system
education
in the is an
the learning
as
as it
learning it activates
important
process part
activates the
the students to
to be
of experiment-based
students
(Bencomo, 2004).
more
be The control quadcopter testbed offers.
involved
moreavailabil-
involved
in
education as it process
activates (Bencomo,
the students 2004).
to be The
more availabil-
involved
in the learning process (Bencomo, 2004). The availabil-
in the learning
2405-8963 © 2019, IFAC process (Bencomo,
(International 2004).ofThe
Federation availabil-
Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
Copyright © 2019 IFAC 36
Copyright
Peer review© under
2019 IFAC 36 Control.
responsibility of International Federation of Automatic
Copyright © 2019 IFAC
10.1016/j.ifacol.2019.08.120 36
Copyright © 2019 IFAC 36
2019 IFAC ACE

June 1-3, 2016. Bratislava, Slovakia Paul N. Beuchat et al. / IFAC PapersOnLine 52-9 (2019) 36–41 37

2. SYSTEM OVERVIEW Retro-reflective


markers
This section first describes the hardware components used,
and then explains how the software we developed enables
students to work both independently and collaboratively.
Finally, the key aspects that make the classroom environ-
ment simple and robust are illustrated.
Marker
2.1 Hardware components attachment
Battery
Crazyflie 2.0 quadcopter: This quadcopter is ideal and payload Optional
for a classroom environment because it is small, robust, attachment payload
inexpensive, safe to interact with, easy to maintain, and
open-source for both the software and hardware. The Fig. 1. Crazyflie 2.0 with custom parts labeled.
Crazyflie 2.0 is designed especially for research and edu-
cation purposes, and features extensively in the literature, Computers and network: To facilitate multiple stu-
see for example: Hönig et al. (2015); Campos-Macı́as et al. dents to work simultaneously, we use a separate computer
(2017); Bucki and Mueller (2018). for each Crazyflie. This allows students to write their code
Fig. 1 shows one of the Crazyflie 2.0 quadcopters used in independently, launch and close our software at any time.
our class. The key additions we developed are the blue and It further provides them with a sense of responsibility for
red parts, 3D printed using Polylactic acid (PLA) material. their allocated Crazyflie. These computers can be either
The blue part is used to attach the retro-reflective markers laptops, desktops, or Raspberry Pi computers, with the
needed for the motion capture (Mocap) system described Ubuntu operating system installed. Additional computers
below. The two main advantages of our design are: (i) the are required for running the Mocap software and for run-
markers can be placed at a large separation, allowing easy ning the coordination layer of our software. All computers
detection even when using inexpensive Mocap systems are connected via Ethernet cables to a local area network.
with low resolution and (ii) unique arrangements of three Fig. 2 provides a schematic representation of how these
markers are easier to create, making the system more components are arranged in our classroom. The figure
robust for distinguishing Crazyflies after an occlusion. also shows a screenshot from the System Config GUI that
The markers themselves are 20mm diameter polystyrene simplifies the Teacher’s task of managing the class; details
spheres covered with retro-reflective tape. The red part provided in Sec. 2.2 and 2.3.
secures the battery on the underside of the Crazyflie, thus
lowering the center of gravity, and also allows for the easy
2.2 Software architecture
attachment of additional payload. With our additions the
Crazyflie weighs 32g, and it can still carry an additional 5g
payload. The Crazyradio PA, made by Bitcraze (2019), is Robot Operating System (ROS): This is an open-
used for sending commands from the off-board computer source meta-operating system, widely used for developing
to the Crazyflie, and for receiving the battery voltage and robotic platforms (Quigley et al., 2009), with a framework
Inertial Measurement Unit (IMU) readings. based on so-called nodes. A node is a stand-alone exe-
cutable process that interacts at runtime with other nodes
Motion capture (Mocap) system: In order to local- through a variety of message types. The key advantages of
ize multiple quadcopters simultaneously, at high frequency, ROS that we utilize for our software are:
and with respect to the same inertial coordinate system, (1) It facilitates running nodes across multiple computers,
we use a commercial Mocap system. Multiple cameras, killing and relaunching the nodes whenever necessary.
placed around the flying area, synchronously emit infra-red This allowed development of an architecture where
light and detect reflections from retro-reflective markers students can work independently.
mounted on the Crazyflies to be tracked. To distinguish (2) It provides message passing directly between these
between Crazyflies, a unique arrangement of markers is nodes and abstracts the details of the network, com-
used for each object. Our software is compatible with the munication, and lower layers that actually transfer
Mocap system produced by Vicon (Vicon, 2019), and a the data. This allowed development of a distributed
beta version of our software currently under development architecture where students can perform collaborative
supports the systems produced by Qualisys (Qualisys, control tasks with only a few additional lines of code.
2019) and OptiTrack (Optitrack, 2019). (3) It enables updating parameter values during runtime.
The key advantage offered by Mocap systems for a class- This allows students to change their controller gains
room environment is the high accuracy, Merriaux et al. mid-flight and immediately observe the influence on
(2017), as this allows the student to clearly experience how flight performance.
changes to the controller are reflected in changes of the The architecture of nodes and messages we developed
quadcopters behavior. Alternative localization technolo- makes the classroom environment flexible and easy to
gies viable for quadrotors inlcude ultra-wideband (Hamer manage for the teacher and enables students to begin
and D’Andrea, 2018) and on-board sensing. The former is directly with controller implementation. The following list
significantly less accurate than a Mocap system, while the explains the nodes of our software, and Fig. 3 shows the
latter adds significant sensor payload and computation to message connections between these nodes. In the typical
the quadcopter. classroom setting the first three nodes on the list are

37
2019 IFAC ACE
38 1-3, 2016. Bratislava, Slovakia
June Paul N. Beuchat et al. / IFAC PapersOnLine 52-9 (2019) 36–41

Screenshot of the System Config GUI


Mocap Teacher that runs on the Teacher Computer
Camera Computer

Network Mocap
Switch Computer
Student Computers

Fig. 2. Left: schematic of how the hardware components are arranged for our classroom setting. Typically four or more
Mocap cameras are required depending on the size of the flying volume. Right: screenshot of the GUI used by the
teacher to define flying zones in a “click-and-drag” fashion (the boxes numbered 1,2,3). The teacher then uses a few
GUI buttons to allocate each Crazyflie to a particular flying zone and student computer. As described in Sec. 2.3,
the flying zone is used for the safety mechanism that ensures the Crazyflie remains in its allocated zone.

launched once and run on the Teacher computer, whereas


the remaining nodes run on each Student computer (one
Mocap instance of those nodes per Crazyflie).
software • System Config GUI node: Allows the teacher to parti-
tion the flying area into zones and specify the tuples of
Teacher Computer {flying zone, Crazyflie, student}, see Fig. 2.
Mocap System System • System Config Database node: Stores the tuples of
Data Config Config {flying zone, Crazyflie, student} and updates connected
Stream GUI Database nodes when changes occur.
• Mocap Data Stream node: Retrieves the position and
orientation data of the Crazyflies from the Mocap
Default software, and publishes this for use by the other nodes.
Flying Flying Controller • Flying Agent Client node: Manages all aspects of a sin-
Agent Agent gle Crazyflie, including: retrieving Mocap data relevant
GUI Client Custom for the allocated Crazyflie, selecting which controller to
Controller use, implementing the safety mechanisms, and sending
commands to the Crazyflie via the Crazyradio.
• Default and Custom Controller nodes: These nodes run
Radio Battery Student the estimation and control computations.
Monitor Computer • Radio nodes: Each node sends commands to and re-
ceives data from a single Crazyflie using the protocol
specific to the Crazyradio PA USB dongle.
• Flying Agent GUI node: Allows the student to conduct
experiments easily and quickly by accessing all the
Crazyradio PA features of the Flying Agent Client.
Crazyflie 2.0 • Battery Monitor node: Filters the raw battery voltage
and publishes the current status for other nodes to use.
Fig. 3. Interconnection of ROS nodes in the software The ROS allows a range of programming languages to be
developed for teaching quadcopter control. The ROS used for nodes, the nodes of our software all use C++
nodes (solid colored boxes) can be run on any com- because of its run-time speed and ubiquity.
puter on the network, and the dashed boxes indicate
which computer runs these nodes for a typical class- Qt-based Graphical User Interfaces (GUI): The
room setting. The teacher interacts with the software two GUIs we developed are a key part of how our software
through the System Config GUI node, and the stu- is tailored to the classroom setting. We chose the Qt (2019)
dents interact through the Flying Agent GUI and framework because it supports the development of highly-
Custom Controller nodes. The solid lines connecting customized complex GUIs, allowing many interesting fu-
the nodes represent the main message flow defined ture possibilities to be pursued. Moreover, the Qt Creator
in our software, while the dotted lines use a protocol Interactive Development Environment (IDE) provides an
specific to the connection. For every Crazyflie there intuitive tool for creating GUIs, making it possible for new
is one instance of each node grouped in the Student developers to contribute to our software.
Computer box. Crazyradio PA and Crazyflie image
from Bitcraze (2019). Cascaded control architecture: Common practice
for quadcopter control is to use a cascaded architecture,

38
2019 IFAC ACE

June 1-3, 2016. Bratislava, Slovakia Paul N. Beuchat et al. / IFAC PapersOnLine 52-9 (2019) 36–41 39

equilibrium thrusts
feed forward
thrust adjustments plant
reference + outer
position
Σ controller body + propeller
inner thrust
and − rates Σ Σ
controller adjustments thrusts
heading reference −
gyroscope measurements
Mocap measurements

Fig. 4. Block diagram of the cascaded architecture. The inner loop (red) runs on-board the Crazyflie quadcopter (plant).
The outer loop and feed forward (blue) are implemented by the student using an off-board computer.

Safety mechanisms: If a Crazyflie leaves its allocated


flying zone or performs a high angle maneuver, then the
Flying Agent Client reverts to the Default Controller.
Although a crash may still occur in some cases, the
low inertia of the Crazyflie provides additional protection
against damage. If a low battery voltage is reached, this
either triggers landing, if it occurs during flight, or it
Fig. 5. Screenshot of the Flying Agent GUI used by prevents take-off, if it occurs while the Crazyflie is on the
students to test their controllers conveniently using ground. This protects the battery from reaching voltage
the Take off, Land, and Enable controller buttons. levels low enough to cause permanent damage.
Additionally controller parameters can be adjusted
Our software system is open source, with the latest stable
mid-flight using the Load YAML buttons.
version found at (Beuchat and Romero, 2019).
exploiting time-scale separation (Lupashin et al., 2014,
§4.2). Fig. 4 shows the two loops used by our software. The 3. HANDS-ON CONTROL COURSE
inner loop runs on-board the Crazyflie and uses propeller
thrust actions and gyroscope measurements to track body The Electrical Engineering Bachelor’s programme at ETH
rate references provided from the outer loop. The outer Zürich includes courses designed to impart practical
loop uses position and orientation measurements from the knowledge and skills, and also to encourage independent
Mocap system to track a position and heading reference experimentation. In this context, we created the course
provided by the user. For design purposes, it assumes that presented in this section, which uses the quadcopter teach-
the body rate references sent to the inner loop are tracked ing platform described in Sec. 2 to provide a hands-on
without dynamics or delay. The outer loop is run in the classroom experience for 32 undergraduate students each
Default and Custom Controller ROS nodes. semester. The class aims to help the students:
2.3 Functionality and Workflow (1) learn and understand the specific model, dynamics,
and control of quadcopters,
Teacher workflow: The teacher can just use the (2) apply system and control theory from their undergrad-
System Config GUI (shaded red in Fig. 3) to allocate the uate control courses to a real-world system, and
{flying zone, Crazyflie, student} tuples appropriate for the (3) experience the complete chain of modelling, simulat-
class. Our software allows configurations to be saved and ing, control design, implementing, and testing.
loaded, making this task even quicker. If necessary, the
Mocap system can be recalibrated without closing and 3.1 Pedagogic Aspects
relaunching our software, causing minimal interruption to
the class. The hands-on experience of applying control theory to
a real system complements the experiences from conven-
Student workflow: During class the students imple- tional lectures, where the students mainly hear, read, and
ment and test their controllers by interacting with the write. For example, students typically respond with a
Custom Controller and Flying Agent GUI nodes (shaded strong emotional jolt when a “divide by zero” error causes
blue in Fig. 3). The typical workflow for the students is: their quadcopter to shut-down and fall out of the sky. This
(1) Shut down all ROS nodes running on their computers. provides a different appreciation for the concept compared
(2) Edit the C++ code of the Custom Controller node to with forgetting the “divide by zero” case in an exercise and
make updates to their control algorithms. having marks deducted accordingly.
(3) Launch the respective ROS nodes on their computers. Experiencing the complete development cycle in one
(4) Use the Flying Agent GUI to test the flight perfor- project, i.e., the stages of modeling, simulation, controller
mance of their controllers, and change controller gains development, implementation, and testing, shows the stu-
in real-time, see Fig. 5. dents how decisions in the early stage effect the perfor-
Once the students are familiar with the normal workflow, mance later on in the experiments. Moreover, the impor-
they may start changing the parameters or code of the tance of simulation and testing in control engineering be-
Flying Agent Client node to complete more advanced comes obvious. Similar to the example above, students ex-
tasks, for example, performing a flip. perience a different emotion when seeing their quadcopter

39
2019 IFAC ACE
40 1-3, 2016. Bratislava, Slovakia
June Paul N. Beuchat et al. / IFAC PapersOnLine 52-9 (2019) 36–41

crash compared with seeing traces diverge to infinity in a pellers. By considering a multirotor vehicle we motivate
simulation environment. In addition, the fast dynamics of discussion and questions that guide the student to un-
a quadcopter is challenging and motivating, in the sense derstand why a symmetric quadcopter is well suited for
that mistakes in the controller design are observed through applying basic control techniques. The modelling details
unstable flight, and at the same time, achieving stable are found in our course script (Beuchat, 2019a).
flight is rewarding. (Session 2) Students build the equations of motion in the
Matlab/Simulink simulation environment, starting from
Productive failure can also be used as a pedagogic ele-
a template that includes a stabilizing controller. In this
ment (Kapur, 2008). The structure of the course allows
simulation session we guide the students to observe and
opportunities for students to make mistakes, and the safety
understand design choices for a quadcopter and related
mechanisms, described in Sec. 2.3, enable the students
dynamic effects. For the Crazyflie 2.0 model parameters,
to observe the outcome of such mistakes multiple times
we use those identified by Förster (2015).
without damaging the system. For example, positive feed-
back or high integrator gains in the altitude controller (Session 3) Students continue building their simulation
cause the quadcopter to accelerate towards the ceiling, and environment, first implementing the cascaded architec-
the Default Controller is activated just-in-time to avoid a ture shown in Fig. 4, and then using either a PID or
collision. This creates an appreciation for the mistakes, LQR controller for the outer loop. To achieve this, we
and allows students to experiment with the limits and guide the students to linearize the equations of motion
sensitivity of their controller design. The students thus and observe the decoupling of the states and actua-
learn from poor design choices and unforeseen errors, until tors, thus motivating a decoupled controller structure.
they are rewarded not only with a working flight controller, The students learn about time scale separation of the
but also with a deeper understanding of the system and positions and angles, motivating the cascaded control
the underlying control theory. architecture. Using the linearized model for controller
design allows students to apply the control theory stud-
Working in teams of two, and towards the end of the course ied in their undergraduate courses. Testing and tuning
collaborating with other teams, teaches the students that the controller in simulation highlights the link between
complex tasks are better solved as a team. In addition, the the controller parameters and their effect on the closed-
team work makes the class more enjoyable and efficient. loop quadcopter dynamics.
As this hands-on course is offered in parallel with the first (Session 4) This first hands-on session focuses on getting
control theory courses, it demonstrates the importance of familiar with the experimental setup, working with the
control in real-world systems and can motivate students to operating system, the coding framework, and conduct-
pursue advanced control courses in their further studies. ing flight tests with the GUI. Once the students under-
stand where the C++ file for implementing their con-
3.2 Course content troller sits within the system, they begin implementing
and testing the real-world counterpart of Session 3.
The number of participating students depends on the size (Session 5) The students continue implementing their
of the quadcopter platform. In our case, the room size, controller and we guide them to observe and explain
equipment available, and volume of the flying space en- differences between their quadcopter’s behavior in sim-
ables a productive classroom environment with up to eight ulation and experiments. For example, model mismatch
flying zones, Crazyflies, and student computers operating of the mass, center of gravity, or inertia is influenced by
simultaneously, see Fig. 6. Thus the capacity of a hands-on the retro-reflective markers shown in Fig. 1. Changing
session is 16 students who work in pairs, and we offer two the model parameters during experiments enhances un-
parallel classes per semester. derstanding of the dynamic effects of model mismatch.
The course curriculum is split over six sessions, the first (Session 6) The students are given freedom to propose
three sessions focus on modeling and control through their own ideas of a control task to perform with their
theory and simulations, and the remaining are hands-on quadcopter, and subsequently they implement, test, and
sessions where the students implement the controllers they demonstrate it to their cohort. The student pairs are
developed. A brief description of each session follows: also free to collaborate with other pairs. Examples of
control tasks performed include: trajectory tracking,
(Session 1) Is an interactive “chalk-and-talk” lecture where
flips, mimicking the trajectory of another object or
we derive and discuss the design and equations of motion
quadcopter, and formation control with multiple quad-
for multirotor vehicles with an arbitrary number of pro-
copters. Through the last two examples students dis-
cover aspects of distributed control and the required
data communication. Highlights from Session 6 can be
seen in this video (Beuchat, 2019b).

3.3 Student feedback

We have run the course in three consecutive semesters,


receiving positive and constructive feedback each time as
collected via an anonymous survey. From the instructor’s
perspective, we observed the students to be engaged with
Fig. 6. Hands-on classroom setup with 16 students working all parts of the curriculum, motivated by the hands-on
simultaneously. interaction with the quadcopter, and problem solving in a

40
2019 IFAC ACE

June 1-3, 2016. Bratislava, Slovakia Paul N. Beuchat et al. / IFAC PapersOnLine 52-9 (2019) 36–41 41

collaborative fashion. These observations were confirmed Beuchat, P.N. and Romero, A. (2019). D-FaLL-System.
by the survey results. To highlight how the hands-on URL http://doi.org/10.5905/ethz-1007-180.
course complements the material taught in other classes, Bitcraze (2019). Bitcraze AB. URL bitcraze.io.
in response to the survey statement “The course was Bloom, B., Englehart, M., Furst, E., Hill, W., and Krath-
useful for understanding the theory of the control systems wohl, D. (1956). Taxonomy of educational objectives:
1 class”, 90% of students agreed or strongly agreed. The classification of educational goals. Longmans, NY.
The following two responses were received in the general Bucki, N. and Mueller, M.W. (2018). Improved quadcopter
comments section of the survey: “I really liked the course, disturbance rejection using added angular momentum.
and I am still very surprised on how easily we could design In International Conference on Intelligent Robots and
the control for a fairly complex system with only basic Systems (IROS), 4164–4170.
control theory tools that we had learned in 4–5 weeks of Campos-Macı́as, L., Gómez-Gutiérrez, D., Aldana-López,
lecture!”; “It was a great course, one of the more useful and R., de la Guardia, R., and Parra-Vilchis, J.I. (2017). A
interesting ones that there are. Keep up the good work!”. hybrid method for online trajectory planning of mobile
robots in cluttered environments. IEEE Robotics and
4. FURTHER USES OF THE PLATFORM Automation Letters, 2(2), 935–942.
Feisel, L.D. and Rosa, A.J. (2005). The role of the labo-
The hardware and software platform can be used in all ratory in undergraduate engineering education. Journal
levels of control education. Courses can also be designed of Engineering Education, 94(1), 121–130.
for teaching advanced control concepts such as Robust Förster, J. (2015). System identification of the Crazyflie
Control, Model Predictive Control, or Distributed Con- 2.0 nano quadrocopter. BSc. thesis, ETH Zürich.
trol. Furthermore, Bachelor’s and Master’s projects can Giernacki, W., Skwierczyński, M., Witwicki, W., Wroński,
be run on the platform to combine theoretical, practical, P., and Kozierski, P. (2017). Crazyflie 2.0 quadrotor
and research considerations. The platform also serves as as a platform for research and education in robotics
a testbed where advanced control concepts can be readily and control engineering. In Methods and Models in
tested and validated. Evaluating the performance of novel Automation and Robotics (MMAR), 37–42.
control concepts and comparing it to that of existing ones Hamer, M. and D’Andrea, R. (2018). Self-calibrating
in experiments, gives important insights and is very valu- ultra-wideband network supporting multi-robot local-
able for research. The streamlined software architecture ization. IEEE Access, 6, 22292–22304.
described in Sec. 2 and 3 facilitates such research efforts. Hönig, W., Milanes, C., Scaria, L., Phan, T., Bolas, M.,
The platform has been used to implement distributed con- and Ayanian, N. (2015). Mixed reality for robotics.
trol and approximate dynamic programming algorithms, In International Conference on Intelligent Robots and
Romero et al. (2019), and is currently being used for the Systems (IROS), 5382–5387.
validation of learning-based control. Kapur, M. (2008). Productive failure. Cognition and
Demonstrations are an important part of communicating Instruction, 26(3), 379–424.
not only with other researchers, but also a general audi- Lupashin, S., Hehn, M., Mueller, M.W., Schoellig, A.P.,
ence. During lab visits, high school students, for example, Sherback, M., and D’Andrea, R. (2014). A platform for
can experience the concept of feedback control in a playful aerial robotics research and demonstration: The flying
way by changing parameters over the intuitive GUI shown machine arena. Mechatronics, 24(1), 41–54.
in Fig. 5. If the Mocap system and computers are chosen Merriaux, P., Dupuis, Y., Boutteau, R., Vasseur, P., and
accordingly the hardware platform is easy to move which, Savatier, X. (2017). A study of Vicon system positioning
together with the robust software, makes it well suited for performance. Sensors, 17(7).
demonstration purposes outside the laboratory. Optitrack (2019). NaturalPoint, Inc. DBA OptiTrack.
URL optitrack.com.
ACKNOWLEDGEMENTS Preiss, J.A., Hönig, W., Sukhatme, G.S., and Ayanian, N.
(2017). Crazyswarm: A large nano-quadcopter swarm.
The authors would like to thank Angel Romero and Yvan In International Conference on Robotics and Automa-
Bosshard for their contributions to developing the software tion (ICRA), 3299–3304.
(Sec. 2.2) and course (Sec. 3.2). Prince, M. (2004). Does active learning work? a review of
the research. Journal of Engineering Education, 93(3),
REFERENCES 223–231.
Qt (2019). The Qt Company. URL qt.io.
Antsaklis, P., Basar, T., DeCarlo, R., McClamroch, N.H., Qualisys (2019). Qualisys AB. URL qualisys.com.
Spong, M., and Yurkovich, S. (1999). Report on the Quigley, M., Gerkeyand, B.P., Conley, K., Faust, J., Foote,
NSF/CSS workshop on new directions in control engi- T., Leibs, J., Wheeler, R., and Ng, A.Y. (2009). ROS:
neering education. IEEE Control Systems Magazine, an open-source Robot Operating System. In ICRA
19(5), 53–58. Workshop on Open Source Software.
Bencomo, S. (2004). Control learning: present and future. Romero, A., Beuchat, P.N., Stürz, Y.R., Smith, R.S., and
Annual Reviews in Control, 28(1), 115 – 136. Lygeros, J. (2019). Nonlinear control of quadcopters
Beuchat, P.N. (2019a). N-rotor vehicles: modelling, con- via approximate dynamic programming. In European
trol, and estimation. ETH Zürich Research Collection. Control Conference (ECC).
doi:10.3929/ethz-b-000325583. Vicon (2019). Vicon Motion Systems Ltd. URL
Beuchat, P.N. (2019b). Quad-rotor P&S: High- vicon.com.
lights from 2018 autumn semester. URL
youtube.com/watch?v=PEg-XHSXd58.

41

You might also like