Page 1 of 1

Why does the yaw stabilizer do this?

Posted: Sat Dec 26, 2015 3:30 am
by chad
Not sure why this is happening and curious to know why. On my CF2, when I power it on, leave it sitting on a level table, and connect to it, the yaw stabilizer seems to just keep increasing.

The graph below shows stabilizer.pitch, stabilizer.roll, and stabilizer.yaw. As you can see, pitch, and roll stay pretty close to zero the whole time but yaw... ...well yaw is a little different!

Thoughts?
Screen Shot 2015-12-25 at 10.19.20 PM.png

Re: Why does the yaw stabilizer do this?

Posted: Sat Dec 26, 2015 8:11 pm
by arnaud
This looks like the normal yaw drift.

The gyroscope we are using are MEMS gyros, they are not measuring angle but an angular rate (degrees per second). To get an angle we accumulate (add measurements) over time and so the slightest drift in the measurement will accumulate. For example if we read 0.1 instead of 0 degrees per second the measurement will increase even if the copter is not moving. We are calibrating, getting the 0, at startup but after there will be random drift like what you are observing.

Pitch and Roll are different because we have the gravity: we are using the accelerometer to calibrate the gyro over time. Yaw is around the gravity and cannot be calibrated this way (outdoor the magnetometer would be used for that purpose)

We have been talking of resetting the calibration when we detect the copter is stable on the ground, but we had problems with that at some point so we do not do it anymore. For Crazyflie that is flying at most 8 minutes the drift is acceptable anyway, the pilot will compensate.

Re: Why does the yaw stabilizer do this?

Posted: Sat Dec 26, 2015 8:15 pm
by chad
Thanks for the very clear explanation Arnaud! I'd heard of yaw drift but didn't understand it and didn't realize it would show up like this. I appreciate the info and the time it took to write it up for me!

Regards!
-Chad