In4073 Project Resources 2011 - 2012

This page contains essential information to build the embedded control system of the AeroVinci quad-rotor aerial vehicle (QR), which constitutes the lab project of the TUD course in4073 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.


Assignment


Hardware

Quad-Rotor Aerial Vehicle

The QRs we use are from AeroVinci, a brand new startup from the TU Delft Aerospace Department. Before starting with the QR be sure to first read the safety guidelines.

Trenz Electronic TE0300-01BMLP FPGA Board

This is the FPGA board that is on-board the AeroVinci QR (i.e., used when the QR is operated in TE0300 mode, also see the QR Operation Manual on this site). The version we use is the 1600K gates Spartan 3E that runs on 100 MHz (TE0300-BMLP).
The X32 package (part of the in4073 distribution, also available on this site) contains a port to the TE0300 (see X32 section on this page).

Digilent NEXYS2 FPGA Board

This is the FPGA board that is off-board the AeroVinci QR (i.e., used when the QR is operated in NEXYS mode, also see the QR Operation Manual on this site). Althought currently we prefer to operate in TE0300 mode, the stand-alone NEXYS board offers a convenient X32 experimentation platform when the QR is not available. The Spartan-3E FPGA we use is the 1200K gates version which has more room to accomodate the X32 plus peripherals than the standard 500K issue.
The X32 package (part of the in4073 distribution, also available on this site) contains a port to the NEXYS (see X32 section on this page).

Joystick

Some joystick links.

RS232 Communication

A couple of links on RS232 communication to help you understand the RS232 link between FPGA and PC (and the RS232-like serial link between FPGA and the QR).

Software

X32 Soft Core

The X32 is an experimental 32 bit FPGA soft core developed at our Embedded Software Lab. It demonstrates the idea that (1) for many embedded applications, processor design need not be a 9-figure project and (2) that it can be done by anyone who knows how to write a byte code interpreter in VHDL. We simply took LCC (a well-known ANSI C compiler) and wrote a VHDL interpreter for its intermediate byte code.
As all the software is free, we have a complete free embedded solution that runs on any FPGA that carries more than some 250k gates (which is about any FPGA nowadays). You are free to use the software outside of the course as long as you give proper credit to the authors and our Embedded Software Lab. Note, however, that this free software is provided AS IS without any warranty whatsoever. The above demo programs are targeted towards the NEXYS board, which is the board you can use off-line to get a feel for the X32 and experiment with it. Note, that the TE0300 lab distribution's x32.h file is targeted at the TE0300 board, which is slightly different (no SSD, additional buttons, switches). Consequently, the x32.h file you will use for the QR is slightly different too. The x32.h file to be used when compiling for the NEXYS board can be downloaded here.

For those of you who want to experiment with an RTOS: We have ported the TICS (free) and Uc/OS (licenced) real-time kernels to the X32 (NEXYS).

Last, but not least, as a final X32 programming example, qrtest.c is a utility that tests all the QR's functionalities (RS232, wireless, LEDs, button, engines, sensors).

VHDL

As mentioned earlier, the X32 is implemented in VHDL. To get a taste of VHDL here are a bunch of tutorials and text books (not the traditional Logic Design books that focus on logic design plus a bit VHDL, but the books that really do a good job on VHDL). If you really want to learn the trade buy one of the text books. If you want to play with the (free!) ISE, download the WebPACK (available for Windows 2000, XP, and ome Linux flavors, see link below).

QR Control & Simulation Software

Simple QR sim (developed at our lab) to demonstrate quad rotor vehicle mechanics and control.

Signal Processing Software

The sensor signals are contaminated with noise, especially from the vibrating QR fuselage 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. The next link shows a log of phi (blue), p (green) as obtained from the y-axis accelerometer and x-axis gyro, respectively. The approximately 8 seconds sensor log (format: time, ax, ay, az, p, q, r, ae0, ae1, ae2, ae3) is obtained while the QR was in flight and finally touched down (x-axis displays X32 time in microseconds). Since the scale is dominated by the phi noise, we integrated p to show the "real" phi (red).
The following link shows a log of phi (blue), p (green) after applying a low-pass Butterworth filter with 10Hz cut-off frequency. For designing the filters see the following links:

Kalman Filtering

From the above it will be clear that the accelerometers hardly provide any useful information, even after extensive filtering. The gyro's, on the other hand, tend to drift, which limits their utility as single source for QR 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:

Miscellaneous

Example IMU Systems

Some links on IMU and autopilot systems. We used part of the QR simulator of the helicopter Autopilot project as the basis for our lab simulator software.

Interesting Links

Just a couple of links that might interest you.
Arjan J.C. van Gemund