Skip to content

This repository shows how to use kalman filter to reduce noise from sensor readings of MPU9250(9-axis IMU)

Notifications You must be signed in to change notification settings

Sriram510/Noise-Reduction-using-Kalman-Filter-in-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Noise-Reduction-using-Kalman-Filter-in-Arduino

Introduction to Kalman Filters:

Kalman filtering is an algorithm that provides estimates of some unknown variables given the measurements observed over time. Kalman filters have been demonstrating its usefulness in various applications. Kalman filters have relatively simple form and require small computational power. However, it is still not easy for people who are not familiar with estimation theory to understand and implement the Kalman filters. Whereas there exist some excellent literatures such as this which explains how a kalman filter works and implementing one in python addressing theory behind the Kalman filter, this chapter focuses on a more practical perspective.

Getting raw data from MPU9250

Step 1. MPU9250 was hooked up to the mircocontroller(mCU) using I2C connection i.e(SCL->SCL port of the mCU,SDA->SDA port of the mCU).

Step 2. MPU9250 library for arduino was downloaded using the Arduino IDE library manager from Hideakitai.
Step 3. Magnetic declination of the current location was changed in the library file before IMU calibration.
Step 4. IMU biases, scaling factor etc, were obtained in serial moniter using calibration.ino example file.
Step 5. Kalman Filter for Arduino library from rfetick was used to implement the filter.
Step 6. State transition and observation matrices for roll,pitch and yaw were given as arguments for state space model.
Step 7. Process noise and sensor noise covariance matrices were given to predict and update the states and give an optimal estimation of three orientations.

SENSOR NOISE: The distribution of points of uncertainty in sensor measurements or put it simply the standard deviation of the sensor meausrements.

PROCESS NOISE: It gives information about how fast proccessed information change according to changes in sensor measurements i.e the reaction time or 1/inertia so the more the inertia the more proccesed signal resist to changes in sensor measurements.

RESULTS:-

Measurements without the filter

imu_w-o_kalman

Measurements with the filter with higher process noise matrix

imu_w_kalman

Measure with filter using lower process noise matrix

imu_w_kalman2

Measure with filter using much lower process noise matrix

imu_w_kalman2

CONCLUSION:-

Implementation of kalman filter to reduce noise in the sensor readings was successfull, though sensor fusion using kalman filter was not used and the results were pretty satisfactory.

About

This repository shows how to use kalman filter to reduce noise from sensor readings of MPU9250(9-axis IMU)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published