I am using an Arduino Mega with an MPU6050. I can get gyroscopic data as well as euler angles. The problem is my gyro data keeps going back and forth between 0 and -1 despite me not moving it at all (it stays on -1 the most). What can I do to filter what I assume is noise? I am going to use the gyro data for a quadcopter PID rate controller so I cant really have it telling me I am rotating at -1 deg/sec. That would be catastrophic for the quadcopter
-
$\begingroup$ Have you tried a kalman filter? $\endgroup$– PaulMar 16, 2015 at 1:55
-
$\begingroup$ Isnt that for sensore fusion $\endgroup$– OzymandiasMar 16, 2015 at 1:57
-
$\begingroup$ Kalman filters are generally for state estimation based on noisy sensor data. Isn't that what you're trying to do? $\endgroup$– PaulMar 17, 2015 at 20:15
-
$\begingroup$ Yes. But I've been told that some noise would be OK. Also, I must just differentiate the euler angles instead since they are steady. Might try to write a kalman filter if I have enough time at the end. $\endgroup$– OzymandiasMar 17, 2015 at 20:41
1 Answer
$1^\circ/s$ does not seem to be very catastrophic. The noise seems quite low. More interesting is if your euler angles are stable and drift-free. Then you can control the pitch and roll error based on these estimates. As far as I remember the MPU6050 already does the filtering of gyros and accelerometers for you.