Giter Club home page Giter Club logo

dl-for-navigation's Introduction

Implementation of Regression Models(DRNN + SVR + KNR) Against Kalman Filters for the Calculation of Quaternions and Euler Angles

This Repo Contains 2 Main Parts:

DataSet Collection

Data Contains

1. Gyroscope Data 3DoF
2. Accelerometer Data 3DoF
3. Magnetometer Data 3DoF
4. Euler Angles Data 3DoF
5. Quaternions Data 4DoF

To collect the data, I made a small setup using a Raspberry pi and BNO055 IMU. So simple but it works wonderfully.

1. Hardware Setup

1. Raspberry pi 4
2. BNO055 9DoF IMU
3. Lithium Polymer Battery
4. Buck Converter
5. USB-C to USB-A Adapter
6. Breadboard
7. Bunch of Jumper Wires
**Note:** It should be portable, So the data collection is not constrained to a specific location and angle.

Best Data Logger in the Whole World!


2. Software Setup

Here is the code for the data collection. First, the code is written in C++. The code contains a loop with a constant frequency of 100Hz. The loop reads the IMU data for 5 minutes and writes it to a ".csv" file at each iteration.

There is a Executable file for the Code in the same folder. But in case you want to run the code, you need to install the WiringPi library from here.

There is another prerequisite for the code to run. High speed I2C (400kHz) in the used Raspberry pi 4 have to be anabled. For the purpose use the procedure described in the here.

After handling all, the code is ready to be compiled.

So, Navigate to the folder where the code is and run the following bash command:

$ g++ -o CollectorApp *.cpp -lwiringPi -lm -std=c++11

Now the executable file is ready to be run like this:

$ ./CollectorApp

There are 8 Available Files Containing Data in the "DataSet" Folder.

Note: The files having "(No Mag)" in there names, don't contain magnetometer data.


Models

For the purpose of this project, I used the following models:

  • Deep-RNN Model
  • Support-Vector-Regression Model
  • K-Neighbours-Regression Model

Seems Like the Complexity of the data is so much that the RNN Model is not able to handle it.

And it had a huge RMS of 0.5 in it's predictions and also the model stopped learning after a few epochs. Although the learning rate was adaptively adjusted.

So, I decided to use the Multi Output Support Vector Regression model. Which seemed to handle the data better. But, also the Model didn't perform well enough!

So, as a last resort, I used the K-Neighbours Regression model. Which turned out to be the finest model for this data...

And with a bit of tuning, it was able to perform the best on the data. with a mean absolute error of 0.0043 for Quaternions and 3.3 for Euler Angles.

(Note: The mean absolute error is the average of the absolute errors of the predictions)


Logs for all the models are saved in a file named "Logs.txt" in the specific folder of each model.

dl-for-navigation's People

Contributors

banaankiamanesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

modoro5064 mfkiwl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.