Indoor Test - Pitch and Roll computation

I have written my first algorithm to compute pitch and roll. So I made few tests to check it.


Pitch shows if quadcopter tilt front (pitch is positive) or tilt back (pitch is negative)
Roll shows if quadcopter tilt left (roll is positive) or tilt right (roll is negative)
Determining pitch and roll is very important to control motors and get a stable flying quadcopter. For example, if quadcopter tilt front pitch will be positive. So, to get a stable quadcopter, we will need to increase front motors speed and decrease back motors speeds

To do this, I found help on this page. It use acceleration in the computation.to correct read values from the sensor MPU-6050.

All tests were virtual test with motors OFF

For the first test, I tilted my platform in front, then I raise it to horizontal and then let it down

Here is values read and used to compute pitch



qay quadcopter acceleration Y read from sensor MPU-6050
qrx quadcopter eotation X read from sensor MPU-6050
pa pitch computed 
apa pitch computed (secong method - very nearly to pa !)
pa2 pitch corrected with acceleration (pa + qay * deltatime)
fpa final pa : 98% pa2 + 2% pa (very nearly to pa2 !)

What we see is that final pa take care of acceleration. It was what i wanted.

Now here is values read and used to compute roll



qaxquadcopter acceleration X read from sensor MPU-6050
qryquadcopter eotation Y read from sensor MPU-6050
raroll computed 
araroll computed (secong method - very nearly to ra !)
ra2rollcorrected with acceleration (ra + qax * deltatime)
frafinal ra : 98% ra2 + 2% ra (very nearly to ra2 !)

Even if roll is not significant in this test, we see again that final ra take care of acceleration. It was what i wanted too.


For my second test, I tilted my platform in front, then I raise it on the right corner to horizontal and then let it down



In this test, we have more significant values for roll and pitch


For my last test, The platform is horizontal. Then I tilted the platform on the left and then let it down



In this test, only roll is significant

Commentaires

Posts les plus consultés de ce blog

Attiny13A sleep mode

Esp-01 deep sleep mode

Install and configure OpenVPN on OSMC