15 | Combine a gyroscope and accelerometer to measure angles - precisely

preview_player
Показать описание

In this video, you will learn how you a Kalman filter can combine gyroscope and accelerometer measurements from the MPU-6050 to give accurate roll and pitch angle data to the flight controller.

The purpose of this video series is to learn the basics behind a quadcopter drone and enable you to build one yourself, by dividing this challenging project in several easy-to-understand parts. You use the capable Teensy 4.0 microcontroller together with the easy-to-use Arduino language.
Рекомендации по теме
Комментарии
Автор

you can also use madgwick filter with gradient descent, it will be lighter for the microcontroller and more accurate than kalman

guruG
Автор

Great Job. I am also making a quadcopter using a complementary filter. After watching your Kalman filter video, I am thinking of incorporating your approach in my flight controller. Can't wait to see the next videos.

VinodPatel-tbii
Автор

Have you tried reading the data from the MPU6050's onboard Digital Motion Processor? Reading the DMP register data returns a quaternion.

koopdi
Автор

Thank you very much for making my project possible!😊

kdtmkz
Автор

I can't thank you enough! You are making my lifelong dream come true.

techtheguy
Автор

This incredible work to share. Thanks so much

LemonTreeNOTfree
Автор

Great Job, quick question though. In the gyro_signals function we are setting Digital Low Filter(0x1A), Sensitivity for Gyro(0x1B) and Sensitivity for Accel(0x1C) and then read the raw values and then do the Kalman Magic. As gyro_signals get called every time we want to read the sensor data it will set the Digital Low Filter(0x1A), Sensitivity for Gyro(0x1B) and Sensitivity for Accel(0x1C) which in my personal opinion is redundant. Is there a reason why we are doing this? In my view Digital Low Filter(0x1A), Sensitivity for Gyro(0x1B) and Sensitivity for Accel(0x1C) can be set as part of the setup. I may be incorrect but thats how I see it.

kazimkhan
Автор

Reading elsewhere it appears important to calibrate the sensor for temperature variation. Per the MPU-6050 spec sheet, the gyro ZRO Variation over temperature (-40C to +85C) is +/- 20 degrees per second. That is a large temperature variation, but it is also a huge error. Your thoughts? Perhaps in a quadcopter the flight duration isn't long enough to become a problem?

bryanlaplante
Автор

The STS (space shuttle) flight control computers used Kalman filtering

jointstrike
Автор

00:03 that glass building and wind mills - looks like Antwerp.

greatvedas
Автор

Did this 40 years ago with an inertial navigation platform and a RTK GPS

bussi
Автор

any vids on smoothing out accelerometer data? I have a MPU6050 mounted to a go cart to measure G's and unfortunately the measurements are so noisy, the device as is, is useless

TIA

KrisKasprzak
Автор

Thanks for a great tutorial! You really motivated me to learn more about Kalman filtering!
I would like to ask, could the code complexity be reduced (without degrading the performance) by assuming constant Kalman gain?
From what I understood, all the business with the uncertainty calculations and Kalman gain updates goes in parallel to the actual filtering and it is not affected by the accelerometer or gyroscope inputs.
Therefore, I thought that one could calculate the steady state Kalman gain offline (using the noise variances and sampling period), which would allow to remove lines 13, 14 and 15 of the code at time 5:04, leaving only the prediction and update lines 12 and 15.

RadimZedka
Автор

You earned another sub 🎉 this explained a lot. Thank you!

Pandakaniya
Автор

Thank you so much. I utilized your logic and explanations for IMU part of my Graduation Thesis Project. It helped me so much and i got an AA

Moon-DG
Автор

que buen proyecto, amigos.
la documentación es excelente!
muchas gracias por su trabajo!

leomartihart
Автор

want to balance a platform using Teensy 4.0 and Fredricks tilt sensor. Can you guide me on how to go about the interface programming?

pramodode
Автор

What you want to do is create a mathematical model of the drone. The model has the same inputs/controls/outputs as the actual drone. Then, in real time, compare the model with the drone position, attitude, speed, altitude etc. Compare the model with the actual drone to derive an error signal that is fed back to correct the model. The actual position, speed, etc of the drone is somewhere between the measured and modeled values. With the Kalman filter it is very important to accurately model the error/noise.

darrenconway
Автор

Hi! Great Video! Thanks! Can You please share with us the theoritical background of Your Kalman Filter application?

attilafazekas
Автор

isn't the MPU-6050 not appropriate for calculating yaw angles?
Or similar kalman filter method could be used for yaw too?

MetalAnimeGames