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)
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
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

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

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
qax | quadcopter acceleration X read from sensor MPU-6050 |
qry | quadcopter eotation Y read from sensor MPU-6050 |
ra | roll computed |
ara | roll computed (secong method - very nearly to ra !) |
ra2 | rollcorrected with acceleration (ra + qax * deltatime) |
fra | final 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
Commentaires
Enregistrer un commentaire