Tuesday, May 5, 2015

Who?, What? and Why?

Who?  The Aircraft Autopilot

This Kalman Filter Code has been written optimized for a Bird-of-Time Sailplane and intended for use in tandem with an Artificial Neural Network (ANN) by a Non-Linear Modeled Predictive Controller (NMPC) Autopilot developed by Dr. Gonzalo Garcia at the University of Kansas, School of Engineering in the department of Aerospace.

The aircraft uses Pulse Width Modulation (PWM) to communicate between the processor and the servo motors. There are four controllable signals in the aircraft: Throttle, Elevator, Aileron and Rudder. These four output signal decisions autonomously keep the aircraft in continuous flight intent on achieving the next goal.  These goals are pre-defined waypoints.  Waypoints are basically 3-dimensional locations based on Latitude, Longitude and Altitude coordinates.



What?  The System Inputs

For the system to make any decisions, it must have input from an inertial measurement unit (IMU) onboard the aircraft, air speed from a pitot tube, and previously commanded values .  In this system we use an Arduino Mega 2560 to do the input sampling and pass the values via serial port to the main processing system.
Why?  System Identification

The NMPC Controller lives on this Tegra TK1. This is where the output controller commands are calculated and generated based off of the filtering of the input measurements to determine precise space and time (System Identification), and a parallel ANN learned decisive output.

This introduction leads us into detailed breakdown of the complex System Identification portion of this system.



System Identification with State Estimation

The original system was written in Matlab/Simulink and has proved to be particularly difficult to work with in terms of backwards compatibility and automatic code generation space constraints for embedded systems.  The desire to rebuild this system in Haskell is to explore if the end product can run in more efficient compiled form with improved mathematical accuracy without some of the timing constraints that are imposed in the Simulink system.

Here is a quick video that scrolls through the code:


Module Map - Haskell Code Breakdown


No comments:

Post a Comment