We are currently working on tuning the PID controllers. We initially attempted to use the Microchip PID library provided for the dsPIC, however debugging became difficult due to the inability to view the effects of each individual term during testing. We instead created our own PID implementation which is less efficient than the provided implementation, but is much easier to tweak and debug. We also implemented the ability to stream data from the PIC to MATLAB on a PC via a UART so that the PID data could be viewed over time.

The actual testing was done by running a wire through the UAV along one axis and fixing it in place. The UAV can therefore rotate on only one axis, allowing the PID controller for that axis to be tuned independently.