During my time working in the Real Time and Embedded System Laboratory at UIUC, I have had the opportunity to work on a number of interesting and challenging projects. The majority of these projects involve unmanned aerial vehicle technologies. Below are descriptions of the three major projects on which I led the software development. These major projects are a Ground Station Interface for monitoring an aircraft in flight, an Autopilot for fixed-wing UAVs, and a hardware-in-the-loop emulation environment named EnvE.
My first major project began during the summer between my Junior and Senior years. My colleagues had just finished development of a flight data acquisition and logging unit which included a radio for transmitting data to operators on the ground. My task was to develop an application to receive the data stream and display it to the user in a manner that allows for easy understanding. In addition to displaying information, the application needed to be able to command the unit to start and stop logging data.
The unit was outfitted with numerous sensors including an IMU, a GPS receiver, a motor RPM counter, onboard video, ADCs to measure control surface positions, and readings of the pilot's controls. These sensor readings are displayed in an application window that is divided into quadrants. The top left quadrant displays the actuation of the control surfaces and the motor RPM. The top right quadrant displays the current location of the aircraft and its location history on an overhead map. The bottom left quadrant displays the pilot's control input. The two sticks and the many switches and sliders are positioned as they are on the controller. The bottom right quadrant has a primary flight display showing the aircraft's attitude, speed, and altitude. The onboard video feed is displayed to the right of the primary flight display. The first video on the right shows footage captured from a live demonstration of the application.
In conjunction with the development of the fixed-wing autopilot, additions have been made that support tuning control parameters, setting new targets, and displaying performance feedback. At the beginning of the second year of my MS program, I began mentoring a freshman to take the lead in future developments of the application. The most notable feature he has implemented is the ability to dynamically create layouts of different UI elements at runtime. Another undergraduate has joined to develop new UI elements in conjunction with the development of an autopilot for rotary wing aircraft.
Development of this application has heavily utilized the Qt C++ libraries and GUI platform. The application is mostly written in C++ with a few components written in C. While most of the UI elements are custom, the QFlightInstruments project provides the primary flight display and the qmpwidget project provides the embedded video player.
I began developing a custom autopilot for fixed-wing aircraft for the project for the graduate-level special topics course on cyber-physical systems during the first semester of my senior year. The results that semester had great promise as far as control was concerned. Unfortunately, the software design did not hold much promise. It was a monolithic system, which results in a single point of failure. A single error would bring down the entire autopilot. The monolithic design made software development difficult by placing rigid contsraints on the code.
I completed my undergraduate studies by writing my senior thesis on the design and implementation of a robust and flexible autopilot framework. This work focused on developing a modular design to improve flexibility and reliability. Each module has clear and distinct responsibilities. The Sensor Collector gathers data from various sensors, performs any necessary processing, and provides the data to the other modules. The Flight Planner computes a control target based on the current mission plan and state data. The Flight Controller computes the necessary actuation based on this target. The Servomotor Controller performs the commanded actuation. Finally, the Ground module is responsible for transmitting state data to the ground station and for receiving updates to control parameters and mission targets. By dividing responsibilities amongst separate modules, and thus separate processes, reliability is greatly increased. If the Flight Planner fails, the mission may suffer, but the other modules will be able to keep the aircraft in the air. My revised design included a Watchdog process that simply monitors the other modules and restarts them when they fail. The modular design also greatly increases flexibility. A simple example of this is the case of switching sensing platforms. The only change needed is to swap out the old Sensor Collector of the new one. The second video on the right shows the Autopilot following a simple circuit in emulated flight.
My work on this currently involves flight testing to improve path following, development of flight modes for gathering data for aircraft modeling, and increasing the energy awareness of the autopilot. I am also mentoring a sophomore student to implement a Flight Controller and Flight Planner for rotary-wing aircraft.
The Autopilot project is written entirely in C. It has been developed for and tested with GNU/Linux. It relies on the GNU C Library and the CBLAS library. These libraries support many platforms, so porting the Autopilot to other platforms should be very straightforward.
The most difficult and dangerous part of UAV technology development is testing. The risks in test flights include property damage and injury to people in the operating vicinity. Development steps must be taken to mitigate these risks. The most effective mitigation is testing in the lab environment. EnvE, an Environment for the Emulation of UAVs, provides a lab based, hardware-in-the-loop testing environment.
The core of EnvE is the FS One Precision RC Flight Simulator. FS One provides very accurate physics and vehicle simulation. Through the use of a slight modification to the simulator, a custom DLL can be injected. The DLL is given access to two callback functions, one to receive state data and one to submit actuation data.
I began developing EnvE in conjunction with the Autopilot as a way of safely performing tests. I modified the custom DLL to provide a serial interface to the simulator. By doing so, I was able to complete a control loop by connecting flight controller hardware to the simulator PC via the serial connection. To support low level controllers, an emulation adapter was developed. The adapter is based on the APM 2.6 platform. It simplifies the simulator interface by performing some of the necessary processing for low level controllers. The adapter is programmed as an I2C slave and provides the latest state data upon request. Using PWM input channels, the adapter periodically transmits corresponding actuation commands to the simulator.
EnvE has continually evolved since the beginning of the project. Due to its usefulness, I continue to work on improving performance, usability, and reliability while adding new features as it is the topic of my MS thesis. This project has proven to be incredibly valuable as a platform for testing research projects and as an educational tool. It has been used as a platform for student projects in courses covering embedded and cyber-physical systems. EnvE was used to emulate the Autopilot flight in the footage above.