Autonomous UAV, 2014

Updated: Jan 2, 2019

Summer of 2014 I've spent in Cambridge, on an internship in Mathworks Application Engineering team. The technical evangelists (real position title) at the time were seeking to promote use of Matlab/Simulink to hobbyists and demonstrate its rapid prototyping capacity to SMEs. Hence the idea for an autonomous UAV project was born and this is where I came into the picture.

The QuadCopter fever was going mainstream although consumer-grade products were still rare. As I was working with a UAV expert, we were brave enough to build a drone from scratch designing it for our specific application - deployment in a people-rich environment at MATLAB EXPO 2014. The two main safety measures were the foam frame and ducts, and the DC power tether that acted as a leash. The drone was spec'ed for adequate thrust to lift its heavy frame that was built from lasercut wood and hand-cut foam. Retrospectively, well...

We used the ardu-pilot for attitude control and a Raspberry pi B (v1.0) for position control and visual navigation. Raspi used MAVLINK protocol to communicate over serial to commanding desired attitude (roll, pitch, yaw, thrust). Pi hosted a wifi network to which a control-laptop was connected. The Simulink model could then be cross-compiled and deployed to the pi as well as a joystick added on the laptop side for manual control.

The navigation side of things used a pattern of landmarks for the down facing camera. These landmarks were then fitted with ellipses, their major and minor axes determined and used used as a measurement in a KF together with a faster IMU measurement. As it is obvious, this often suffered from local minima issues as the landmark pattern was repeating.

The control architecture was one of the more challenging aspects of this project and what I've learnt most of. This drone had every possible control challenge one can think of:

-Noisy system susceptible to un-modeled external disturbance (wind, ground effect, tether)

-Delay in state observation (2014 Raspi is sloooooooow and its processing images...)

-Real plant not close to ideal (i.e. center of mass is off due to DIY and tether)

- Second Order System, also attitude relationship to acceleration.

To counter this we implemented a cascaded PID system with some feed-forward terms to help counteract the delay.

In the end the project was successfully deployed in MATLAB EXPO 2014. However, many lessons were learnt here :)