Thursday, March 29, 2012

Quadcopter: Inertial Position Tracking Tech Update #1

  Here's a quick update to the status of the technical aspects of the Inertial Position Tracking (IPT) part of this quadcopter  project.

  The code is 99% complete for the IPT feature.  I am successfully getting data from both the accelerometer and the gyro.  I have implemented software low-pass filters on the data from both sensors to reduce high frequency noise.  When running only the IPT feature, I am currently setting my control loop to 100Hz.  I believe I could get very close to 200Hz if I wanted.  The drawback with the faster loop is that the software emulated float on the Arduino is not very precise, so there is the potential for the tiny errors in each update cycle to add up faster at the higher loop rates.  In addition, fewer accelerometer samples are gathered each cycle which may contribute to reduced accelerometer accuracy.  I will be testing both of these potential sources of error more in the near future.

  The gyro performance looks good right now in the low vibration environment know as my desk.  Sitting still with no movement results in roughly 0.1 degree of error in all three axes after 5 minutes.  Smoothly moving it by hand during another 5 minute period increases the error to roughly 1 degree per axis.  If the motor vibration doesn't hurt me too much, then I believe this should be sufficient for what I am trying to do.  Mounting this to the quadcopter frame may also help as the relatively large moment of inertia in the frame and motors will insure smooth rotational movements. Obviously, I will be testing this more.  I also have a magnetometer that I may be able to use to mitigate this even further, but that is not part of this initial stage of the project.

  The accelerometer performance is currently unknown due to a bug in my zeroing function.  This bug has been eluding me for a number of days now.  I thought I had it fixed, but it came back.  Due at least partly to not being able to zero the accelerometer, the position error builds up at an amazing rate.  After 5 minutes of sitting on the desk next me, it reports that is is sitting about 10 feet (3m) behind, above and to the side of me.  Watching the data steam in, I am concerned that even with a perfect zero, this sensor will be the item that literally prevents IPT from getting off of the ground.  Increasing the filtering effect helps, but I am not sure it will be sufficient and at some point it will be filtering out the data that I actually want to see.  Vibration will only make this worse, so that's another thing I'll be watching.  As a side note, I am not concerned about the filtering reducing my aircraft stability as I can use unfiltered data to keep the craft stable while feeding the filtered data into the IPT system.  Once I figure out my zeroing bug, I will then be in a much better position to gauge the accelerometer performance.

  That is all for now.  Let me know if you have any questions.

  Thanks for reading and please sign up on the right if you want to be automatically notified when I post more updates.