Nonlinear Extended Kalman Filter
Nonlinear Extended Kalman Filter
Nonlinear Extended Kalman Filter
A linear model can be a poor fit for rotation. An extended Kalman filter uses a local approximation of the model. Check how well it holds for the motion you expect.
Goal: Track quadcopter orientation using quaternions (non-linear rotation math).
Challenge:
A Jacobian is a table of local slopes that approximates how a nonlinear model changes near the current estimate. Use a quaternion and angular velocity as the state, with gyro, accelerometer, and magnetometer inputs. Linearize with a Jacobian at each step and normalize the quaternion; normalization rescales its components to unit length so it remains a valid rotation representation. The quaternion representation avoids Euler-angle gimbal lock; it does not prevent filter divergence.
Key learning: An EKF can model nonlinear dynamics, but its local approximation and noise assumptions must be validated. It can diverge when those assumptions fail.