-
Notifications
You must be signed in to change notification settings - Fork 4
Ardupilot Notes
Ardupilot has several state estimators that are selectable by the user. There used to be a complementary filter (DCM) for estimating stuff, but that is only used as a fallback in versions 3.3 and higher of ArduCopter. There are two different EKF's that can be used: EKF1 (sometimes just called EKF) and EKF2. The two filters differ in how they use multiple IMU's and what variables they estimate. Versions 3.4 and 3.5 of ArduCopter have EKF2 on by default. For a filter to be in use, it must both be running and selected to be used by the controllers.
Variables tracked:
- Orientation - quaternion (q0, q1, q2, q3)
- Velocity - m/sec (North, East, Down)
- Position - m (North, East, Down)
- Delta Angle bias - rad (X,Y,Z)
- Delta Velocity bias - m/s (Z)
- Wind Vector - m/sec (North,East)
- Earth Magnetic Field Vector - milligauss (North, East, Down)
- Body Magnetic Field Vector - milligauss (X,Y,Z)
EKF1 seems to use only a single IMU.
Estimates orientation quaternion directly (assumed based on the fact that EKF2 is advertised as not doing this).
Doesn't handle lagged measurements correctly (seems to use latest covariance instead of covariance at measurement time?).
Variables tracked:
- Attitude (Quaternions)
- Velocity (North,East,Down)
- Position (North,East,Down)
- Gyro bias offsets (X,Y,Z)
- Gyro scale factors (X,Y,Z)
- Z accel bias
- Wind Velocity (North,East)
- Earth magnetic field (North,East,Down)
- Body magnetic field (X,Y,Z)
Handles orientation nicely. It stores the orientation as a unit quaternion, but does all error calculations and updates using a rotation vector.
Also doesn't quite handle lagged measurements correctly, but uses some prediction using a complementary filter to smooth, which they claim is fast and accurate enough.
Runs a separate filter for each IMU. By default, both filters are turned on and the controllers use whichever has "the best health" (assuming this means the lowest state covariance).
Parameters for the EKF's can be found here: http://ardupilot.org/copter/docs/parameters.html
PX4 Useful Documentation: http://discuss.px4.io/t/control-loop-architecture/3114