Attempt to compensate linear acceleration

Post Reply
alexmos
Posts: 108
Joined: Tue Aug 09, 2011 12:12 pm

Attempt to compensate linear acceleration

Post by alexmos »

In LEVEL mode we compensate only angular difference between copter orientatin and gravity vector. But in case of wind (or turbulence) disturbances the angle does not change. So why do not count linear acceleration for stabilization? We can easly get in in getEstematedAttitude() function:

for (axis = 0; axis < 3; axis++)
linearACC[axis] = ACC_VALUE - EstG.A[axis];

I plan to write some code to test it. Any ideas - welcome.

lalalandrus
Posts: 15
Joined: Mon Sep 05, 2011 7:57 am

Re: Attempt to compensate linear acceleration

Post by lalalandrus »

These sensors have lots of drift due to noise and slow bus. Also your outerloop (level) should be changed to a pid since you are now effectively trying to control displacement making it a 2nd order system to help limit the return speed. To minimize gyration and centripetal acceleration try to put the accelerometers at the center of rotaion for the three axis.

The compensation can still be done but dont expect much. Look forward to seeing what you come up with.

alexmos
Posts: 108
Joined: Tue Aug 09, 2011 12:12 pm

Re: Attempt to compensate linear acceleration

Post by alexmos »

My attempt was completely failed. Conclusion:

1. We can get linear acceleration from Gyro+Accelerometer. But it is very noisy, because errors from two sensors doubles (unlike complimentary filter used for attitude estimation, where two sensors compensate each other). And it is not stable around zero, even if there is no acceleartion, just rotation.

2. We cannot get precize velocity. It has a huge drift due to not-stable acceleration around zero. I tryed to use different filters to remove drift, but no success.

3. We can use linear acceleration in PID controlller directly, but stabilizing effect is very small. We cannot use "I" fraction due to (2). Only "P" fraction, but in case of small disturbances linear acceleration very small. Otherwise, it is very sensible to vibrations produced by motors, and they impacts directly on PID controller.

Post Reply