This post is again about IMU/INS and related to the previous post.
When no GPS data is present – or more genrally in IMU mode, estimated helicopter attitude (and heading) depends on measured magnetic field vector and gravity vector (through acceleration). Acceleration is assumed to be roughly equal to gravity vector, but it is not a case when any “long” term unidirectional acceleration is applied – like for example during takeoff, or acceleration from hovering to fast forward flight.
In such cases, IMU tends to slowly align to the measured acceleration vector (gravity + body acceleration). This leads to estimated attitude error which in turn affects control.
The only way to prevent this issue is to stop attitude corrections during a period when the acceleration affects measured gravity. This means to continue running attitude estimation but to stop estimation correction. This means to either stop EKF or to throw away quaternion and bias correction.
To do this acceleration has to be detected. The only problem is that measured acceleration contains high frequency signals (vibration) of huge amplitude (several Gs) even after filtration.
But this problem can be solved very easily. Integration/summation or averaging filters out the vibrations. Like below:
This calculates true velocity change -> acceleration over time period (direction of velocity/acceleration is not important). The period can be for example 1 second.
Because the estimated quaternion and bias correction can be kept in the EKF (until it is decided to be applied to the attitude estimation) it can be thrown away after every second significant acceleration has been detected. Or any more sophisticated algorithm can be introduced.