# How can I filter Gyroscopic data?

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

• Have you tried a kalman filter?
– Paul
Mar 16 '15 at 1:55
• Isnt that for sensore fusion Mar 16 '15 at 1:57
• Kalman filters are generally for state estimation based on noisy sensor data. Isn't that what you're trying to do?
– Paul
Mar 17 '15 at 20:15
• 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. Mar 17 '15 at 20:41

$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.