Dealing with noisy IMU data
tosjduenfs
Posts: 37
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
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
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.
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.