Why does the yaw stabilizer do this?

Post here to get support
Post Reply
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Why does the yaw stabilizer do this?

Post 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
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Why does the yaw stabilizer do this?

Post 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.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Why does the yaw stabilizer do this?

Post 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
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
Post Reply