Quad-rotor P&S Learn how to fly a drone autonomously

See our gallery for images of the flying areana where students implement their algorithms for making a quad-rotor drone fly autonomously.

Abstract

Quad-rotors are becoming more and more commonplace as technological advancements increase capabilities and reduce costs. Quad-rotor vehicles are encountered both for domestic entertainment and industrial applications, some examples are: toys for people of all ages, professional cinematography, or, inspection of industrial scale structures and processes. One reason why quad-rotors have become so pervasive is their mechanical simplicity, which lends itself to the high operational reliability. Moreover, the control and estimation techniques required to stabilise a quad-rotor around hover utilises only the control theory taught to under-graduates, while acrobatic feats and fleet manoeuvres inspire many directions in current research.

The learning objective of this course are:

This viedo shows testing of the flying arena setup prior the first course run in HS2017. The flying areana is now permanently setup in ETL D12 as seen in the gallery.




Course Material

We are still updating aspects of the course, so please check here occasionally for the latest script and exercise materials.

Course Script

The course script is intended as a stand alone script that allows the student to review all the theory we cover in class, as well as provide additional information for those students wishing to delve further particular topics.

The script can be downloaded here (Version 2018-Sep-21)

The script includes a introduction to Simulink tutorial that provides step-by-step instructions for simulating a simple pendulum system. The end point of the tutorial can be downloaded with the following links. The multiple Simulink files are identical, just saved for different versions of Matlab, choose the file that is compatible with the version of Matlab you have installed on your computer.
Parameter script: matlab parameter script
Simulink template: R2017b , R2015a
(These files were uploaded on 2018-Feb-14)



Class dates for Autumn 2018 Semester

The first class will take place on Monday Sep 24, 2018, 13:15-17:00 in ETZ G91, for ALL enrolled students.

Following that classes will occur every second week. The students will be split into two groups (A and B) and the classes for each group will occur on alternating weeks.

Thus the schedule for Group A will be:



And the schedule for Group B will be:



Exercise 1

The goal of exercise 1 is to simulate the equations of motion for an N-rotor vehicle and through this gain a deeper understanding and intution for the vehicle's behaviour.
Exercise Sheet (Version 2018-Oct-12)

The following two files provide a template for Simulink that will assist in getting started with this exercise. To use the template you should save both files locally on you computer into the same folder. The multiple Simulink files are identical, just saved for different versions of Matlab, choose the file that is compatible with the version of Matlab you have installed on your computer.
Parameter script: matlab parameter script (right-click and select "Download linked file")
Simulink template: R2017b , R2016b , R2015b
(These files were uploaded on 2018-Sep-24)

The following files provide a sample solution to each part of this exercise. All files can be saved into the same folder and will work without conflict. For the parameters script, to avoid them opening directly in your browser, right-click and select "Download linked file".
Solution for Part A: parameter script , R2017b , R2016b , R2015b
Solution for Part B: parameter script , R2017b , R2016b , R2015b
Solution for Parts C, D, and E: parameter script , R2017b , R2016b , R2015b

Exercise 2

The goal of exercise 2 is to design, implement, and tune a PID and LQR controller for the Crazyflie 2.0 quad-rotor vehicle.
Exercise Sheet (Version 2018-Oct-22)

The following two files provide a template for Simulink that are the starting point for this exercise. To use the template you should save both files locally on you computer into the same folder. The multiple Simulink files are identical, just saved for different versions of Matlab, choose the file that is compatible with the version of Matlab you have installed on your computer.
Parameter script: matlab parameter script (right-click and select "Download linked file")
Simulink template: R2017b , R2016b , R2015b
(These files were uploaded on 2018-Oct-14)


Visualisation
The following script plots a visualisation of the N-rotor vehicle design:
N-rotor vehicle visualisation script
The following script plots a visualisation of trajectory simulated by the Simulink model:
Trajectory visualisation script
To use the trajectory visualisation script, first compile and run the Simulink model, then enter either of the following commands in the Matlab Command Window:

>> traj_handles = visualise_nrotor_trajectory( simout_full_state )
>> traj_handles = visualise_nrotor_trajectory( simout_full_state , [] , nrotor_vehicle_layout_true )
			

Exercise 3

The goal of exercise 3 is to familiarise with the practical setup and then implement, and tune a PID controller for altitude and yaw.
Exercise Sheet (Version 2018-Oct-29)

Exercise 4

The goal of exercise 4 is to continue your implementation and tuning a PID controller for altitude and yaw, and then to implement an LQR controller for the x and y positions.
Exercise Sheet (Version 2018-Nov-12)