Note: This content is accessible to all versions of every browser. However, this browser does not seem to support current Web standards, preventing the display of our site's design details.

  
D-FaLL: Distributed Flying and Localisation Lab

D-FaLL: Distributed Flying And Localisation Laboratory

Quad-rotor P&S

This semester, HS 2017, is the first time we are running this P&S course and thus files link on this course site will be updated a few times over the course of the semester. Please check here occasionally for the latest script and exercise materials.

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 require 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:
  • Be able to derive the continuous-time equations of motion for a general N-rotor vehicle,
  • Be able to simulate a general N-rotor vehicle for the purpose of testing and tuning controller and estimator designs,
  • Be able to explain how flight performance is affected by changes in the parameters of the N-rotor vehicle, for example mass, centre of gravity location, propeller aerodynamics,
  • Be able to explain why a quad-rotor design allows the control architecture to be de-coupled into a collection of separate simple controllers,
  • Experienced the challenges of tuning a PID and/or LQR controller for achieving stable hover of a quad-rotor, both in simulation and on the real-world system,
  • Be able to write C++ code for implementing a PID and/or LQR controller.

Course Material

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 into particular topic covered.
The script can be downloaded here (Version 2018-Mar-06)

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 Spring 2018 Semester

This course is conducted in 6 classes on the following dates and locations:

  • Class 1, Tuesday Feb 27, 2018, 13:15-17:00, HG F 26.1
  • Class 2, Tuesday Mar 6, 2018, 13:15-17:00, E 23
  • Class 3, Tuesday Mar 13, 2018, 13:15-17:00, E 23
  • Three week break with no classes
  • Class 4, Tuesday Apr 10, 2018, 13:15-17:00, ETL D 12
  • Class 5, Tuesday Apr 17, 2018, 13:15-17:00, ETL D 12
  • Class 6, Tuesday Apr 24, 2018, 13:15-17:00, ETL D 12

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-Mar-05)

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
Simulink template: R2017b , R2016b , R2015a
(These files were uploaded on 2018-Feb-15)

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.
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 controller for the Crazyflie 2.0 quad-rotor vehicle.
Exercise Sheet (Version 2018-Mar-13)

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
Simulink template: R2017b , R2016b , R2015b

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.
Solution for Parts B and C: parameter script , LQR sythesis function , R2017b , R2016b , R2015b

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 )
	

Exercise 3

The goal of exercise 3 is to familiarise with the practical setup and then implement, and tune an LQR controller for controller.
Exercise Sheet (Version 2018-Apr-10)

Exercise 4

The goal of exercise 4 is to continue your implementation and tuning of an LQR controller for controller.
Exercise Sheet (Version 2018-Apr-17)

The following files provide a template for Simulink that will assist in tuning your outer LQR controller To use the template you should save all 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
LQR synthesis function: compute state-feedback matrix script
Simulink template: R2017b , R2016b , R2015b
(These files were uploaded on 2018-Apr-17)