Page 1 of 1

How to improve stabilization algorithm

Posted: Mon Jul 08, 2013 3:18 pm
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.

Re: How to improve stabilization algorithm

Posted: Mon Jul 29, 2013 8:29 am
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.