2
$\begingroup$

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

$\endgroup$
4
  • $\begingroup$ Have you tried a kalman filter? $\endgroup$
    – Paul
    Mar 16, 2015 at 1:55
  • $\begingroup$ Isnt that for sensore fusion $\endgroup$
    – Ozymandias
    Mar 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$
    – Paul
    Mar 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$
    – Ozymandias
    Mar 17, 2015 at 20:41

1 Answer 1

2
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.