In4073 Project Resources 2016 - 2017
This page contains essential information
to build the embedded control system of the Quadrupel quad-rotor drone,
which constitutes the lab project of the TUD course
Embedded Real-Time Systems.
NOTE: The following material is presented to provide
easy access to existing websites or publically available documents.
Copyright and all rights therein
are retained by authors or by other copyright holders.
All persons copying this information are expected to adhere to the
terms and constraints invoked by each author's copyright.
We are using home-brew quad-rotor drones designed and assembled by Ioannis
- Safety Guidelines
When doing the lab you are required to learn the
- Operation Manual
The Operation Manual can be found here
- LiPo Usage
How to properly use LiPo batteries can be found
- Hardware Components
- Frame: Turnigy Talon V2.0 (550mm)
- Motors: Sunnysky X2212-13 980kV
- ESC: Flycolor 20A BCHeli 204S Opto
- Sensor module: GY-86 (10 DOF)
- RF SoC: nRF51822
- wireless: Bluetooth Low Energy
- microcontroller: ARM Cortex M0 CPU with 256kB flash + 16kB RAM
Some joystick links.
A couple of links on RS232 communication to help you
understand the RS232 link between the Quadrupel drone and the PC.
Sample skeleton program illustrating how to read sensor values and
set enige speeds, as well as various other utilities.
Download for Linux.
Download for Windows (7), for experts:
manual install on Windows.
The sensor signals are contaminated with noise,
especially from the vibrating drone frame
due to the four engines and rotors, which is picked up by the sensors
(especially the accelerometers!).
In order to filter out the higher frequencies due to
the engines low-pass filters are needed.
link shows a log of
phi (blue), p (red)
as obtained from the y-axis accelerometer and
x-axis gyro, respectively.
The approximately 8 seconds sensor
(format: time, ax, ay, az, p, q, r) was obtained
while the motors were running and the drone was making a pitch and roll
movement by hand
(x-axis displays time in microseconds).
Since the scale is dominated by the phi noise,
we integrated p to show the "real" phi (red).
link shows a log of
phi (blue), p (green)
after applying a low-pass Butterworth filter with 10Hz
For designing the filters see the following links:
- IIR Digital Filter Design Applet calculates the a and b coefficients
for your IIR filter according to
b * y[n] + b * y[n-1] + ... = a * x[n] + a * x[n-1] + ...
in the form
y[n] = a * x[n] + a * x[n-1] + ...
+ (-b) * y[n-1] + (-b) * y[n-2] + ...
Of course, you can also use matlab to compute the coefficients
using the butter() command (for a Butterworth filter).
- For the diehards who insist on building filters with a higher order
than 2, here are some
2nd-order designs (biquads) as basic building block for higher-order IIRs
(floating point and fixed point implementations)
- Arjan's [Kalman] filter examples (Matlab)
- Arjan's DSP examples (C)
- Here's a paper of a control systems
student who compared a fixed-point and a floating-point implementation of
a 2nd-order Butterworth LP filter (as an alternative in4073 task assignment).
Special attention is given to the determination of the number
of bits required for sufficiently accurate fixed-point representation.
From the above it will be clear that the accelerometers
hardly provide any useful information, even after extensive
The gyro's, on the other hand, tend to drift, which limits
their utility as single source for drone stabilization.
Kalman filtering is the standard way of fusing gyro and accelerometer
data into reliable sensor data that allows for
stable vehicle attitude control.
People who want to experiment with a simple
Kalman filter in Matlab can use the following files:
Just a couple of links that might interest you.