Shop OBEX P1 Docs P2 Docs Learn Events
Dealing with noisy IMU data — Parallax Forums

Dealing with noisy IMU data

tosjduenfstosjduenfs Posts: 37
edited 2015-03-25 10:29 in Accessories
Hello,

I've been working on a balancing robot using the prop and the AltImu10 v3 from pololu. I've got everything together so far and I've started tuning the PID loop but I'm running into some issues with sensor noise due to the vibration of my stepper motors. The gyro L3GD20H and accel LSM303D both have configurable high pass filters but not low pass filters. I think what I actually need to use is a low pass filter.

When experimenting with the high pass filters there are several modes that I can use. There is normal mode where I'm guessing it simply applies the filter with the cutoff frequency that I select and there is also "Reference signal for filtering" mode that I have no idea what it does. I'm not sure If I should use either of these.

At this point my plan is to outsource the sensor data collection to a new cog, crank up the data rates on both sensors and take multisample averages or maybe a rolling average. If anyone has any other ideas for helping smooth out my data please let me know.

Mike

Comments

  • JasonDorieJasonDorie Posts: 1,930
    edited 2015-03-24 08:25
    Any filter will add a bit of lag, so typically you boost the sample rate to compensate for it. It's also common to filter the accelerometer data more than the gyro data, since an accelerometer is much more susceptible to noise than a gyro. High-pass filters are generally only useful for gyro data when you're trying to filter out a DC offset (drift). If you have a complementary filter running, you're already doing that. Low-pass filters reduce noise.

    Mechanical damping is also worth looking into. A number of high-end flight controllers mount the sensors in a block of epoxy filled with weight, then mount that to foam or rubber, because it absorbs a lot of vibration and shock. Anything you can do to reduce the vibration mechanically will make it easier on the code.
  • Mark_TMark_T Posts: 1,981
    edited 2015-03-25 10:29
    The gyro output is immediately integrated into the orientation quaternion.
    Integration is automatically low-pass.

    What you need to insure is that you don't alias excess noise into your gyro signal by using
    too high an analog bandwidth before sampling. This means careful use of a low pass filter (a
    simple first-order RC would be appropriate) to limit higher frequency noise above the
    Nyquist limit.

    In general sample the gyro at the max rate and update the quaternion at that rate, you've
    grabbed as much useful information as you can from it. With a digital gyro that's all
    you can do as an analog anti-aliasing filter isn't an option (unless it has an internal
    configurable filter).

    Accelerometer data doesn't have to be as aggressively sampled as its applying a drift
    correction.

    Always turn off high pass filtering for IMU applications, drift is cancelled automatically
    by the control loop, filtering will lose information.
Sign In or Register to comment.