Hi Roby,
Over the lifetime of the MatrixPilot project, I have tried several ways to account for both centrifugal and forward accelerations in computing a vertical reference from the accelerometers.
In the latest version of the implementation of acceleration compensation, accelerometer and gyro signals are used by themselves for centrifugal compensation.
However, forward acceleration compensation is computed from change in forward speed, which ultimately depends on GPS data.
Forward acceleration is estimated here:
Compensation for forward acceleration is implemented here:
Of course, this method does not work if the GPS stops working.
From time to time I have experimented with simply ignoring the forward acceleration based on the idea that the average forward acceleration over a long time window is small. If the forward acceleration is ignored, it can be shown that there is an error in attitude estimation introduced by the gyro drift compensation that is proportional to the change in forward velocity times the drift compensation feedback gains. This is because the contribution to the error depends on the time integral of the acceleration, which is change in speed.
If forward acceleration is ignored, there is a positive feedback loop through the controls, the aerodynamics and the gyro drift compensation that responds to pitch estimation error. Suppose that the plane is flying level and the error is positive. The pitch controls will cause the plane to pitch down a bit, which in turn will cause the plane to speed up a bit, which will cause further error. The amount of increase of speed depends on the aerodynamic drag. The amount of further estimation error depends on the gyro drift compensation gains.
Whether or not the error continues to grow depends on the loop gain, which can be shown to depend on the aerodynamic drag coefficient of the plane and the gyro drift compensation gains. Interestingly enough, the error will tend to grow for planes with high lift over drag ratios.
If the gyro drift compensation feedback gains are set low enough, it can be shown that estimation errors will decay for the usual values of lift over drag. However, with the present values of the gyro drift gains, pitch estimation errors could grow for planes with high lift over drag ratios.
The present values of the drift gains are legacy from the early versions of the hardware in which there was substantial gyro drift which required setting the gyro drift compensation gains high enough to manage the drift. Since then, the gyro drift has improved quite a bit, particularly in UDB5, and the gains could in principle be reduced enough to make it possible to ignore forward acceleration. However, to be on the safe side, particularly for high performance gliders, I decided to continue to include forward acceleration compensation that is dependent on GPS data.
Best regards,
Bill