Thursday, May 29, 2014

Testing Periodic Inputs

Today, I tested the quadrotor model with a step input for the reference altitude and a square wave for the reference pitch angle. The square wave has a 0.5 duty cycle, a 30 degree amplitude, a period of 15 seconds, and a zero degree mean. I ran multiple 50-second trials and got different results. Here are my results for the pitch angle:
Pitch angle for (left) trial 3 and (right) trial 4

Pitch angle for (left) trial 1 and (right) trial 2


Sometimes it crashes (e.g., case 3 in the above plots) and sometimes it doesn't. The plots above also show that I'm not getting repetitive results, which is likely due to the fact that I'm running the controller over a network.

Here are my roll angle responses:

Roll angle responses for (left) trial 1 and (right) trial 2
Roll angle responses for (left) trial 1 and (right) trial 2
 It's clear from these plots that the responses differ. Also, the roll angle often deviates noticeably from the reference, as shown by the spikes in the above plots. I'm not totally sure what causes these. I'm not quite convinced that they are caused by the abrupt change in the reference pitch (per the square wave input), since the spikes don't occur every 15 seconds (this is especially evident for the second trial). Similar spikes also show up in the pitch angle responses.

The spikes look large, but they are actually fairly small. The y-axis in degrees. The largest spike in the above plots has a peak magnitude of approximately 1.5 degrees. I need to figure out what is causing these spikes, and how I can improve the code to mitigate their effects. 




No comments:

Post a Comment