• Stars
    star
    235
  • Rank 171,079 (Top 4 %)
  • Language
    MATLAB
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

In this project, I implemented a Kalman filter on IMU and GPS data recorded from high accuracy sensors.

KalmanFilter-Vehicle-GNSS-INS

project is about the determination of the trajectory of a moving platform by using a Kalman filter. For this purpose a kinematic multi sensor system (MSS) is used, which is equipped with three fiber-optic gyroscopes and three servo accelerometers. Additionally, the MSS contains an accurate RTK-GNSS. The system is adapted to a trolley, which can be pushed by a human being, however, it is also possible to adapt the system to a car or another moving vehicle. During the exercise real measurements are recorded at the Campus Poppelsdorf (University of Bonn) with the system. The goal is to determine the trajectory of the trolley via Kalman filtering in 2D by using a simplified motion model (constant accelerations, constant angular rates, motion only possible along the x-axis of the body frame) as well as the observations of the IMU (i. e. accelerations and angular rates) and the GNSS receiver (2D positions).

trolley

Task Description

Determine of the trajectory of a moving platform by using a Kalman filter combining the prediction of the system model and the measurements of GPS, the accelerometer and the gyroscope

Idea

Kalman filter is an application of Bayesian estimation technique. It obtains optimal estimates using the deterministic and stochastic properties of the system model and measurements to execute recursive state estimation. A recursive algorithm: The current estimate is updated by using the previous best estimates as inputs System model provides a prediction of the current state Measurements are used to correct the predicted state

kf

he predicted result and the measurements are combined by assigning weights to the prediction and the measurements The new estimate is the weighted mean of the predicted state and the measurements. Combination of these two independent estimates of a particular variable to get the mean value is the core of the Kalman filtering process.

Requirements of Kalman Filter

โ€ข System model linear in the previous state and the control parameters.

โ€ข Measurement model linear in current state In the case of extended Kalman Filter, the requirement on linearity on the system model and the measurement model may be relaxed. An additional requirement: Linearise the non-linear system model and/or the non-linear measurement model

kfg

Input parameters which need to be predefined:

1

Parameters which need to be predefined for the algorithm:

2

Two key steps:

  1. Prediction stage
  2. Correction stage
3

Prediction stage

4

Correction stage

5

Influence of the predefined stochastic settings

  • Kalman gain assigns the weights to the prediction and the measurements.
  • The criteria for assigning the weights is the level of precision.
  • This is achieved by comparing the noise matrices R and Q in the two steps.
  • Visualise R and Q as scalars.
  • Big R but small Q implies the prediction is not precise but the measurements are.
  • High weight on Q but small weight on R

Kalman Filter (a real-time algorithm)

  • Number of iterations: n where n is the total number of time steps we set for the inputs
  • Runtime~O(n)
  • Total runtime does not grow faster with the input size
  • The runtime of each of the later steps remains bounded
  • Its Possible for the inputs and outputs to be processed simultaneously

Extended Kalman filter

  • Relax the condition on the linearity of the motion model and the sensor model
  • Requires the application of linearisation of the non-linear models for the update of the covariance matrixes
  • The rest is similar to Kalman filter
6

PipeLine

ExtendedKF

Example: Vehicle 2D motion model

Prediction Stage:

Model does not match reality...

  • Measurements have high precisions โ€” Low variance
  • BUT inaccurate โ€” with large systematic bias
  • Kalman filter assigns weight to different stages based on their relative levels of precision
  • The output state will deviate significantly from the true state
  • Because we put a lot of weight on the wrong model

Measurement model

Types of Measurements:

  • GPS measurements of the position
  • Non-gravitational acceleration/specific force measurements with the accelerometer
  • Angular rate measurements with the gyroscope Put these in a measurement vector z

Correction Stage

Assume the true state is known, the measurement and the true state are related by

As the measurement model is linear,

Filter Tuning

Turning process adjusts a trade-off between trusting to predictions and measurements.

  • This process has to be done through adjusting measurement and system noise models R and Q.
  • In most of the cases R cold be set based on sensor specifications. ( it better to assume a bit more than values in datasheets )
  • elements of Q have to set in an stochastic form ( they should be more than one ), depending on how much you think, the system model is precis or in could be affected by misalignment respect to real measurements and error sources.

Results

Comparison INS vs StrapDown

  • The results from the strapdown integration starts to deviate from the measurements by GPS positioning very quickly.
  • The strapdown integration was unable to track the trajectory accurately when there is a sharp turn.
  • Despite some observable deviations, the computation by Kalman filter agrees with the GPS measurements very well.
  • Manages to follow the trajectory without losing its accuracy in the event of a sharp turn.

Why combine the two?

  • Predictions based on the motion model can be output at extremely small time intervals -However, the system error accumulates and the updated state loses its precision very quickly
  • Measurements does not suffer from this growth of error. However, the measurements can only be made in much larger time intervals
  • By combining the prediction of the motion model and the measurements, we can have data concerning the state at a very small time interval while limiting the growth in error

Happy?


paypal


Youtube: @practical_robotics [email protected]

More Repositories

1

AgriBot-Local-Planner

ROS Local Planner - using DWA & PID control ideas to work with move_based and navigation packages to navigate the robot through way-points to get it to its destination.
C++
81
star
2

dynamap

A framework which is capable of mapping rigid and non-rigid scenes and localize camera in the environment at the same time
C++
24
star
3

GNSS-AR

a C++ implementation of projection satellites into geo-referenced images and evaluating NLOS (Non-Line of Sight))
C++
19
star
4

feature-based-icp-on-rgb-data

A ROS compatible c++ implementation of 3D point-tpoint ICP using image features (SIFT, SURF, ORB)
C++
15
star
5

Non-Rigid-Registration-Library

An implementation of Non-rigid Solver via Least-squares and compatible with CUDA
Cuda
10
star
6

Deformation-Gaph

an implementation of Deformation Graph compatible with CUDA C++ and used in warping defamations in real-time non-rigid registration
Cuda
10
star
7

KD-tree

A CUDA Compatible KD-tree implementation along with ANN (written very simple and easily expandable)
Cuda
8
star
8

NRF24L01-ARM-32Bit-STM32-Library

in this project I've tried to use NRF2401 module for a long distance communication through Cm9.04 Robotis controller which is based on STM32f103CBT6 micro controller
C++
7
star
9

GraceGroundTrack_TLE

a simple code to generate Ground track or Grace twin satellites in matlab based on TLE file
MATLAB
6
star
10

Arduino_RosSerial_FakeLaser

In this code I have created a fake Lidar data using sacn msg and Ultrasonic sensors
C++
4
star
11

Local-Density-Outlier-Removal-Algorithm

a small Host/Device implementation of Local-Density based Outlier Removal Point-Clouds or any Classifiable data-set with distinguishable elements
C++
4
star
12

RedEdge-MMS

A multi sensor kit as development tools for RedEdge camera
C++
4
star
13

Bag-of-Visual-Words

A Host implementation of Bag of Visual Words Structure in C++
C++
4
star
14

RGBD-Registration-Library

an implenentation of Least-squares used to register RGBD scans using geometric and photometic features
Cuda
3
star
15

SphBot

A Spherical Mobile Robot with Pendulumย  drive Control
C++
3
star
16

Dual-Quaternions

a comprehensive device (CUDA) compatible implementation of Dual-Quaternions mathematic tool used in dual-quaternion skining
C++
3
star
17

rgbd-extractor

Easily extract RGB and Scaled Depth images from a ROS bag file (Images dont need any further process)
3
star
18

Unscented-Kalman-Filter-INS-MMS

MATLAB
3
star
19

EM-Power-Line-Detector

Arduino base controller- LCD Menu + C# Simple GUI
C++
2
star
20

Quaternions

a device (CUDA) compatible implementation of Quaternion mathematic mean.
C++
2
star
21

RTDebbuger

A C# based Real-time Monitoring And Controller app
C#
2
star
22

MBlockA2

ActionScript - Java - Customized version of MBlock
ActionScript
2
star
23

Dual-Quaternion-Skinning

a device (cuda) compatible implementation of Dual-Quaternion Skinning
1
star
24

RayTracing

A CUDA compatible implementation of RayTracing Technique
Cuda
1
star
25

Accelerated-Up-Down-Pyramid-Library

an accelerated implementation of pyramid up/down operator for images
Cuda
1
star
26

DynaMap-Image-Library

a Collection of libraries including Up-Down Pyramid, Bilateral Filter, Kernel Generators, Convolution operators, etc implemented in C++ CUDA based within Project DynaMap
Cuda
1
star
27

Homography

A python implementation of homography algorithm by SIFT descriptors
Python
1
star
28

igus-dryve-d1-ros

1
star