An extended Kalman filter implementation specifically tailored towards (small) fixed-wing UAVs using a quaternion-based attitude representation.
An essential part in controlling an Unmanned Air Vehicle (UAV) is having accurate and reliable state estimates available for feedback, which are then used in the governing control systems. Unfortunately, estimating these states – such as roll, pitch, and yaw angles – is no trivial task in such a dynamic environment and when using relatively inexpensive, noisy sensors.
A tried-and-tested method of state estimation of dealing with this problem is via the
use of an Extended Kalman Filter (EKF), which can also handle non-linear system
models via linearisation. The EKF is the industry-standard in most systems these
days, such as commercial aircraft and figher jets.
To circumvent problems with computationally expensive operations, numerical stability, and gimbal lock, a quaternion-based EKF is developed, as opposed to representing the aircraft’s attitude via Euler angles. The EKF in this document is
specifically tailored to a (small) UAV and common sensors aboard such a system.
A final implementation in both Matlab and C code is also given (See: https://github.com/pms67/EKF-Quaternion-Attitude-Estimation).