2
$\begingroup$

I have a small robot (4tronix MARS Rover) and have added a MPU9250 unit which includes accelerometer (and gyro and magnetometer). I have calibrated it to determine offsets in a static situation. My hope was to measure acceleration when it starts moving and integrated that to velocity and then integrated that to displacement (since I don't have revolution counter on the wheels, yet). However, the base accelerometer data contains a lot of noise from the movement itself, even on a flat floor, and as result the acceleration seems hidden in the noise (same amplitude), especially in low power setting. Some data: sample frequency 100Hz, period measured 5 seconds, engine start after 1 second, engine stop after 4 seconds, speed approx 0.12 m/s (at 50% power), distance covered approx 0.34 m (measured with ruler), start-up and shut-down well within 0.5 second. A program I found uses butterworth filter and have a played around with some settings. At 100% power at least it recognises start-up and shut-down, but still there is noise in between which creates inaccuracy in acceleration, speed and displacement data. My question is: Is there any way to filter the data to make it more accurate? Or is the acceleration just to weak relative to the noise from the movement?

Below are graphs based on unfiltered and filtered data. This is at 100% power setting, which make the startup and shutdown somewhat recognisable.

unfiltered data

filtered data

$\endgroup$
1
  • $\begingroup$ Welcome to SE.SP! Have a read through this question and answers. The standard way to do this is with a Kalman filter. $\endgroup$
    – Peter K.
    Feb 2 at 15:41

3 Answers 3

1
$\begingroup$

I have tried the Kalman filter again but this does not seem to provide a solution.

I determined the variance in the measurements when standing still and when moving at a constant speed and I have added that variance as process noise variance in the calculation of the overall process uncertainty.

This process uncertainty is large relative to the measurement uncertainty and as result the Kalman gain remains high. Even though with a high Kalman Gain normally the process uncertainty goes down, the addition of the process noise at each step then keeps the process uncertainty still high.

The new measurements including the noise therefore remain to have a big influence.

Did I miss anything?

$\endgroup$
0
$\begingroup$

Usually these processes have an underlying AR model and the use of a Kalman filter would help.

If you are just doing off-line processing and just want a simple solution, then you can just define a low-pass filter, adjusted to your needs, and apply it to your signals. A simple mean filter can help.

$\endgroup$
0
$\begingroup$

Thanks, so far I have been concentrating on getting the acceleration values more correct with filtering, and then do cumulative trapezoidal integration to get to speed and position. When on top of that I assume that acceleration only changes in the 0.5 second period after sending a change command to the motors (and simply set it to zero anywhere else), I am getting quite close to reality.

But I will try your suggestion and try applying a Kalman filter to get to a better speed estimation. This would also be more suitable for a real-time application while driving the robot. Problem in my initial attempts is that my calculation of Kalman Gain rapidly converges to zero because I used a relative large inaccuracy in the measurement, and as result the actual measurement has little influence on the result (but this might be due to wrong implementation/understanding). I will investigate further.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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