How to improve stabilization algorithm

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
petaouchnok
Beginner
Posts: 1
Joined: Mon Jul 08, 2013 3:04 pm

How to improve stabilization algorithm

Post by petaouchnok »

As reported, the stabilization algorithm has sometimes difficulty to recover especially in aggressive maneuvers. The current stabilization algorithm consists of a P-only on the gyro values with a target equal to the output of a PI on the integrated Euler angles derived from quaternion and computed only every other iteration. I'm a little bit confused by such algorithm.

First, is it a consequence of processor speed limitation or is it an intentional choice to do only every other iteration for the Euler angles?

Secondly, wouldn't it be more efficient to do a full PID on the Euler angles at each iteration? Note that a D on the Euler angles is actually a P on the gyro values.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: How to improve stabilization algorithm

Post by tobias »

I'm certainly no expert on this but since the Euler angles are an output from the sensor fusion, which are based on the accelerometer and gyro, where the accelerometer is heavenly filtered, it doesn't help to increase the Euler angle stabilization update rate. The stabilization is mainly based on the gyro and the accelerometer is only there to compensate for the gyro drift and therefore is doesn't have to run that fast and processing power can be saved with a cascaded "PI- D" scheme.

I might be wrong on this but this is my understanding, and I'm also sure the stabilisation algorithm can be improved. Most of the values have found by experimentation and doing a more theoretical approach might yield a better result.
Post Reply