Why lpf is not set in front of ekf2?

I find that low pass filter(lpf) is set for gyro for the angular velocity control, but it isn’t set for ekf2. As I know, ekf is mainly used for reducing white noise and lpf is used for reducing high frequency noise (mainly caused by vibration), so I think it’s necessary to set lpf for imu information in front of ekf2.


The low pass filter on the gyro rate before the angular rate controller is there to reduce high frequency noise. There is no low pass filter on the data before the EKF since we don’t want to reduce the information going into the filter.

Thanks for your answer :smile:
But is it possible for EKF to reduce high frequency noise? If EKF cannot reduce it, will the high frequency noise influence the state estimation?

High frequency noise is attenuated by the integration of the IMU data both before and after it reaches the EKF. Currently the data is downsampled to 250 Hz before the EKF and to 125 Hz inside the EKF.

Downsampling cannot attenuate high frequency noise. In fact, without lpf, downsampling will cause signal aliasing.

As I wrote above, the data is integrated before downsampling, so effectively being passed through a low pass filter.

Thank you a lot, and I would be grateful if you could show the code link where the integration and downsampling are realized, and I’d like to study the code :smile:

Gyro integration in the driver

Downsampling inside the EKF to 125 Hz

1 Like

Thanks a lot, and I will study it.