4.2.9 Multiplicative Extended Kalman Filter (MEKF)
The Multiplicative Extended Kalman Filter (MEKF) is one of the most important estimation methods used for spacecraft attitude determination.
It is designed specifically for systems in which attitude is represented using a quaternion.
A spacecraft may maintain an attitude quaternion
\[ \mathbf q \]
together with gyroscope bias
\[ \mathbf b_g \]
and possibly other calibration or sensor-error states.
The central difficulty is that a quaternion is not an ordinary four-dimensional Euclidean vector.
It must satisfy the unit-norm constraint
\[ \boxed{ \|\mathbf q\| = 1 } \]
and represents a point on the unit hypersphere.
Therefore, directly treating the quaternion as four independent additive Kalman-filter states is not ideal.
The MEKF solves this problem by maintaining
\[ \boxed{ \text{Nominal Quaternion} + \text{Small Multiplicative Attitude Error} } \]
rather than estimating the quaternion correction additively.
Conceptually,
\[ \boxed{ \mathbf q_{\text{true}} = \delta\mathbf q \otimes \hat{\mathbf q} } \]
for one common convention, where
-
\hat{\mathbf q}is the nominal estimated quaternion, -
\delta\mathbf qis a small quaternion describing attitude error, -
\otimesdenotes quaternion multiplication.
Because the attitude error is assumed small, it can be represented by a three-dimensional vector
\[ \boxed{ \delta\boldsymbol\theta } \]
rather than four quaternion components.
Thus the MEKF combines
\[ \boxed{ \text{Global Quaternion Representation} + \text{Local 3-D Linear Error State} } \]
which is particularly well suited to spacecraft attitude estimation.
4.2.9.1 Why the MEKF Is Needed
Suppose spacecraft attitude is represented by
\[ \mathbf q = \begin{bmatrix} q_0\\ q_1\\ q_2\\ q_3 \end{bmatrix}. \]
The quaternion must always satisfy
\[ q_0^2+q_1^2+q_2^2+q_3^2=1. \]
A straightforward EKF might attempt an additive correction
\[ \boxed{ \mathbf q^+ = \mathbf q^- + \Delta\mathbf q }. \]
But after this operation,
\[ \|\mathbf q^+\| \]
is not automatically equal to one.
The quaternion must then be renormalized.
More importantly, quaternion components are not four independent physical attitude coordinates.
They contain only three rotational degrees of freedom.
Therefore
\[ \boxed{ \text{Four Quaternion Components} \neq \text{Four Independent Attitude Errors}. } \]
The MEKF avoids this redundancy by representing uncertainty using a three-dimensional local attitude error.
4.2.9.2 Quaternion Attitude Representation
A unit quaternion may be written as
\[ \boxed{ \mathbf q = \begin{bmatrix} q_0\\ \mathbf q_v \end{bmatrix} } \]
where
-
q_0is the scalar component, -
\mathbf q_vis the three-dimensional vector component.
For a rotation of angle
\[ \theta \]
about unit axis
\[ \mathbf e, \]
the quaternion can be written
\[ \boxed{ \mathbf q = \begin{bmatrix} \cos(\theta/2)\\ \mathbf e\sin(\theta/2) \end{bmatrix}. } \]
This immediately shows why attitude has only three independent degrees of freedom despite the four quaternion components.
4.2.9.3 Quaternion Constraint
The quaternion must remain on
\[ S^3 \]
such that
\[ \boxed{ \mathbf q^T\mathbf q=1. } \]
This geometric constraint makes additive covariance representations over all four quaternion elements awkward.
The MEKF instead maintains the nominal quaternion exactly on the unit hypersphere and represents uncertainty in the local tangent space.
Thus,
\[ \boxed{ \text{Quaternion} \rightarrow \text{Global Orientation} } \]
while
\[ \boxed{ \delta\boldsymbol\theta \rightarrow \text{Local Attitude Uncertainty}. } \]
4.2.9.4 Quaternion Sign Ambiguity
Another important property is
\[ \boxed{ \mathbf q \equiv -\mathbf q. } \]
Both quaternions represent the same physical orientation.
This has practical consequences when computing measurement residuals.
Suppose a star tracker provides
\[ \mathbf q_m. \]
Before computing the residual, the estimator may need to ensure that the measured quaternion has the same sign hemisphere as the estimated quaternion.
A common check is
\[ \mathbf q_m^T\hat{\mathbf q}<0. \]
If this occurs, use
\[ \boxed{ \mathbf q_m \leftarrow -\mathbf q_m. } \]
Otherwise an almost perfect attitude match could appear as a very large quaternion difference.
4.2.9.5 Central MEKF Idea
The MEKF separates attitude into
\[ \boxed{ \text{Nominal Quaternion} } \]
and
\[ \boxed{ \text{Small Attitude Error}. } \]
A common convention is
\[ \boxed{ \mathbf q_{\text{true}} = \delta\mathbf q \otimes \hat{\mathbf q}. } \]
Another convention is
\[ \boxed{ \mathbf q_{\text{true}} = \hat{\mathbf q} \otimes \delta\mathbf q. } \]
Both are valid.
However, they lead to different signs and Jacobians.
Therefore:
\[ \boxed{ \text{Choose Left or Right Multiplicative Error Once and Use It Consistently}. } \]
This is one of the most important implementation rules in MEKF design.
4.2.9.6 Small-Angle Quaternion Error
If the attitude error is small,
\[ \|\delta\boldsymbol\theta\|\ll1, \]
then
\[ \sin\left(\frac{\delta\theta}{2}\right) \approx \frac{\delta\theta}{2} \]
and
\[ \cos\left(\frac{\delta\theta}{2}\right) \approx 1. \]
Therefore the error quaternion can be approximated as
\[ \boxed{ \delta\mathbf q \approx \begin{bmatrix} 1\\ \frac12\delta\boldsymbol\theta \end{bmatrix} } \]
for a scalar-first convention.
Thus only
\[ \boxed{ \delta\boldsymbol\theta = \begin{bmatrix} \delta\theta_x\\ \delta\theta_y\\ \delta\theta_z \end{bmatrix} } \]
must be estimated by the Kalman filter.
4.2.9.7 Why Three Error States Are Better Than Four Quaternion Errors
The quaternion contains four numerical components but only three physical degrees of freedom.
If an EKF estimates four independent quaternion corrections, covariance may include uncertainty in a direction that does not correspond to a valid physical rotation.
The MEKF instead uses
\[ \boxed{ \delta\boldsymbol\theta\in\mathbb R^3 } \]
which provides a minimal local representation.
Therefore,
\[ \boxed{ \text{Nominal Quaternion} \in S^3 } \]
while
\[ \boxed{ \text{Attitude Error} \in \mathbb R^3. } \]
This division is one of the strongest conceptual advantages of the MEKF.
4.2.9.8 Typical MEKF State
A simple attitude MEKF may estimate
\[ \boxed{ \delta\mathbf x = \begin{bmatrix} \delta\boldsymbol\theta\\ \delta\mathbf b_g \end{bmatrix}. } \]
This produces a six-state Kalman filter:
\[ \boxed{ 3~\text{attitude-error states} + 3~\text{gyro-bias states} = 6~\text{states}. } \]
The nominal quantities are
\[ \boxed{ \hat{\mathbf q}, \qquad \hat{\mathbf b}_g. } \]
The error state contains
\[ \boxed{ \delta\boldsymbol\theta, \qquad \delta\mathbf b_g. } \]
4.2.9.9 Why Gyro Bias Is Included
The gyroscope measurement may be written
\[ \boxed{ \boldsymbol\omega_m = \boldsymbol\omega + \mathbf b_g + \mathbf n_g. } \]
If gyro bias is not estimated, attitude error grows approximately as
\[ \boxed{ \delta\boldsymbol\theta \sim \mathbf b_g t. } \]
Therefore even a small constant gyro bias produces increasing attitude drift.
The MEKF typically includes
\[ \boxed{ \delta\mathbf b_g } \]
so that absolute attitude measurements from sensors such as star trackers can indirectly estimate and correct gyroscope bias.
4.2.9.10 Nominal Gyro Correction
The estimated angular velocity used for quaternion propagation is
\[ \boxed{ \hat{\boldsymbol\omega} = \boldsymbol\omega_m - \hat{\mathbf b}_g. } \]
Thus the estimator removes the current bias estimate before integrating the gyro.
If the bias estimate is imperfect,
\[ \delta\mathbf b_g = \mathbf b_{g,\text{true}} - \hat{\mathbf b}_g \]
appears in the attitude-error dynamics.
4.2.9.11 Quaternion Kinematics
Quaternion attitude propagation obeys
\[ \boxed{ \dot{\mathbf q} = \frac12 \Omega(\boldsymbol\omega) \mathbf q. } \]
The exact form of
\[ \Omega(\boldsymbol\omega) \]
depends on quaternion convention.
For one common scalar-first convention,
\[ \Omega(\boldsymbol\omega) = \begin{bmatrix} 0 & -\boldsymbol\omega^T\\ \boldsymbol\omega & -[\boldsymbol\omega]_\times \end{bmatrix}. \]
Therefore,
\[ \boxed{ \dot{\hat{\mathbf q}} = \frac12 \Omega( \boldsymbol\omega_m-\hat{\mathbf b}_g ) \hat{\mathbf q}. } \]
4.2.9.12 Discrete Quaternion Propagation
For sampling interval
\[ \Delta t, \]
define incremental rotation
\[ \boxed{ \Delta\boldsymbol\theta = \hat{\boldsymbol\omega} \Delta t. } \]
An incremental quaternion may be calculated as
\[ \delta\mathbf q_\Delta = \begin{bmatrix} \cos(\|\Delta\boldsymbol\theta\|/2)\\ \frac{\Delta\boldsymbol\theta} {\|\Delta\boldsymbol\theta\|} \sin(\|\Delta\boldsymbol\theta\|/2) \end{bmatrix}. \]
Then propagate
\[ \boxed{ \hat{\mathbf q}_{k+1}^{-} = \delta\mathbf q_\Delta \otimes \hat{\mathbf q}_k^{+} } \]
for one selected convention.
The quaternion should then be normalized.
4.2.9.13 Quaternion Normalization
Numerical integration and finite precision can cause
\[ \|\hat{\mathbf q}\| \neq1. \]
Therefore,
\[ \boxed{ \hat{\mathbf q} \leftarrow \frac{ \hat{\mathbf q} }{ \|\hat{\mathbf q}\| }. } \]
This is generally done after propagation and after correction.
Normalization is not a substitute for correct multiplicative error modelling, but it protects against numerical drift.
4.2.9.14 Attitude-Error Dynamics
For a typical MEKF, the local attitude-error dynamics may be approximated as
\[ \boxed{ \delta\dot{\boldsymbol\theta} = -[\hat{\boldsymbol\omega}]_\times \delta\boldsymbol\theta - \delta\mathbf b_g - \mathbf n_g } \]
for one common convention.
The exact signs depend on
- left vs right multiplicative error,
- passive vs active rotation convention,
- body-to-inertial vs inertial-to-body quaternion,
- quaternion multiplication order.
This cannot be emphasized enough.
A formula copied from another implementation is not safe unless its conventions match your own.
4.2.9.15 Gyro-Bias Dynamics
A simple gyro bias model is constant:
\[ \boxed{ \dot{\mathbf b}_g=0. } \]
A more realistic model treats bias as random walk:
\[ \boxed{ \dot{\mathbf b}_g = \mathbf n_{bg}. } \]
Alternatively, a first-order Gauss-Markov model can be used:
\[ \boxed{ \dot{\mathbf b}_g = -\frac{1}{\tau_g} \mathbf b_g + \mathbf n_{bg}. } \]
The appropriate model should reflect expected sensor behaviour.
4.2.9.16 MEKF Error-State Dynamics
For the six-state error vector
\[ \delta\mathbf x = \begin{bmatrix} \delta\boldsymbol\theta\\ \delta\mathbf b_g \end{bmatrix}, \]
the dynamics can be written
\[ \boxed{ \delta\dot{\mathbf x} = \mathbf F \delta\mathbf x + \mathbf G\mathbf w. } \]
A representative structure is
\[ \boxed{ \mathbf F = \begin{bmatrix} -[\hat{\boldsymbol\omega}]_\times & -I\\ 0 & 0 \end{bmatrix} } \]
for a random-walk gyro-bias model and one common error convention.
Again, signs must be derived from the selected convention.
4.2.9.17 Process-Noise Vector
A typical process-noise vector may be
\[ \boxed{ \mathbf w = \begin{bmatrix} \mathbf n_g\\ \mathbf n_{bg} \end{bmatrix}. } \]
The continuous noise covariance might therefore be
\[ \boxed{ \mathbf Q_c = \begin{bmatrix} \mathbf Q_g & 0\\ 0 & \mathbf Q_{bg} \end{bmatrix}. } \]
Here,
-
\mathbf Q_g: gyro white-noise covariance, -
\mathbf Q_{bg}: gyro-bias driving-noise covariance.
4.2.9.18 Covariance Propagation
The continuous covariance equation is
\[ \boxed{ \dot{\mathbf P} = \mathbf F\mathbf P + \mathbf P\mathbf F^T + \mathbf G\mathbf Q_c\mathbf G^T. } \]
After discretization,
\[ \boxed{ \mathbf P_{k+1}^{-} = \mathbf\Phi_k \mathbf P_k^{+} \mathbf\Phi_k^T + \mathbf Q_{d,k}. } \]
Here,
\[ \boxed{ \mathbf\Phi = e^{\mathbf F\Delta t}. } \]
For small time steps,
\[ \mathbf\Phi \approx I+\mathbf F\Delta t \]
may be sufficient.
4.2.9.19 The Nominal Quaternion and the Covariance Evolve Differently
This is a central MEKF concept.
The quaternion is propagated using the full nonlinear quaternion kinematics:
\[ \boxed{ \hat{\mathbf q} \rightarrow \text{Quaternion Propagation}. } \]
The covariance is propagated using the linearized local error dynamics:
\[ \boxed{ \mathbf P \rightarrow \mathbf F \rightarrow \mathbf\Phi \rightarrow \mathbf P^-. } \]
Therefore,
\[ \boxed{ \text{Attitude Evolves Nonlinearly} \quad \text{while} \quad \text{Attitude Error Evolves Locally Linearly}. } \]
4.2.9.20 Absolute Attitude Sensors
A spacecraft can obtain attitude information from sensors such as
- star trackers,
- Sun sensors,
- Earth sensors,
- horizon sensors,
- magnetometers,
- optical navigation systems,
- relative-pose sensors.
The MEKF uses these measurements to correct gyroscope propagation.
Thus
\[ \boxed{ \text{Gyro} \rightarrow \text{High-Rate Attitude Propagation} } \]
while
\[ \boxed{ \text{Absolute Attitude Sensors} \rightarrow \text{Drift Correction}. } \]
4.2.9.21 Star Tracker Measurement
A star tracker may provide an attitude quaternion
\[ \boxed{ \mathbf q_{ST}. } \]
The estimated attitude is
\[ \hat{\mathbf q}^{-}. \]
Instead of computing ordinary subtraction
\[ \mathbf q_{ST} - \hat{\mathbf q}^{-}, \]
construct an attitude-error quaternion.
For one convention,
\[ \boxed{ \delta\mathbf q_m = \mathbf q_{ST} \otimes (\hat{\mathbf q}^{-})^{-1}. } \]
This represents the rotation required to move from the estimated attitude to the measured attitude.
4.2.9.22 Quaternion Measurement Residual
If the mismatch is small,
\[ \delta\mathbf q_m \approx \begin{bmatrix} 1\\ \frac12\mathbf y_\theta \end{bmatrix}. \]
Therefore the attitude residual is approximately
\[ \boxed{ \mathbf y_\theta \approx 2 \delta\mathbf q_{m,v} } \]
where
\[ \delta\mathbf q_{m,v} \]
is the vector part of the error quaternion.
Thus a four-component quaternion measurement becomes a three-component Kalman innovation.
4.2.9.23 Why Quaternion Subtraction Is Wrong
Two orientations are related through rotation composition, not ordinary Euclidean subtraction.
Therefore,
\[ \boxed{ \text{Attitude Residual} \neq \mathbf q_m-\hat{\mathbf q}. } \]
Instead,
\[ \boxed{ \text{Attitude Residual} = \text{Relative Rotation Between Measured and Estimated Attitudes}. } \]
This is one of the defining differences between the MEKF and a naive quaternion EKF.
4.2.9.24 Measurement Jacobian for Direct Attitude Measurement
For a direct small-angle attitude measurement,
\[ \mathbf y_\theta \approx \delta\boldsymbol\theta + \mathbf v. \]
For the state
\[ \delta\mathbf x = \begin{bmatrix} \delta\boldsymbol\theta\\ \delta\mathbf b_g \end{bmatrix}, \]
the measurement matrix may be
\[ \boxed{ \mathbf H = \begin{bmatrix} I_3 & 0 \end{bmatrix}. } \]
Thus the star tracker directly observes attitude error but not gyro bias.
Gyro bias is estimated indirectly through correlations and temporal dynamics.
4.2.9.25 Sun Sensor Measurement
A Sun sensor may measure the Sun direction in the body frame.
Suppose the inertial Sun vector is
\[ \mathbf s_I. \]
The predicted body-frame vector is
\[ \boxed{ \hat{\mathbf s}_B = C_{BI}(\hat{\mathbf q}) \mathbf s_I. } \]
The sensor provides
\[ \mathbf s_{B,m}. \]
A residual can be formed from the difference or cross product between measured and predicted unit vectors.
For small attitude error,
\[ \delta\mathbf s \approx -[\hat{\mathbf s}_B]_\times \delta\boldsymbol\theta. \]
Therefore a representative measurement Jacobian is
\[ \boxed{ \mathbf H_s = \begin{bmatrix} -[\hat{\mathbf s}_B]_\times & 0 \end{bmatrix}. } \]
The exact sign depends on convention.
4.2.9.26 Magnetometer Measurement
A magnetometer provides body-frame magnetic field
\[ \mathbf B_{B,m}. \]
A magnetic field model provides inertial/reference-frame field
\[ \mathbf B_I. \]
Predicted measurement:
\[ \boxed{ \hat{\mathbf B}_B = C_{BI}(\hat{\mathbf q}) \mathbf B_I. } \]
The residual is
\[ \boxed{ \mathbf y_B = \mathbf B_{B,m} - \hat{\mathbf B}_B. } \]
For a small attitude error, the measurement Jacobian again contains a skew-symmetric sensitivity term.
4.2.9.27 Vector Observation Model
Many attitude sensors can therefore be represented using
\[ \boxed{ \mathbf z = C(\mathbf q)\mathbf r + \mathbf v } \]
where
-
\mathbf ris a known reference vector, -
C(\mathbf q)rotates it into the sensor/body frame, -
\mathbf zis the measured vector.
This common structure covers
- Sun vector,
- magnetic field vector,
- star direction,
- landmark direction.
The MEKF then estimates attitude from vector residuals.
4.2.9.28 One Vector Does Not Fully Determine Attitude
A single vector measurement constrains only two rotational degrees of freedom.
Rotation about the measured vector itself remains unobservable instantaneously.
Therefore,
\[ \boxed{ \text{One Vector Observation} \neq \text{Full 3-D Attitude Determination}. } \]
Full attitude determination generally requires
- two non-collinear vector observations,
- temporal dynamics,
- gyroscope propagation,
- or another absolute attitude source.
4.2.9.29 Two-Vector Attitude Determination
Suppose two reference vectors are available:
\[ \mathbf r_1, \qquad \mathbf r_2. \]
Sensors provide corresponding body-frame vectors
\[ \mathbf b_1, \qquad \mathbf b_2. \]
If the vectors are sufficiently non-collinear, they constrain all three attitude degrees of freedom.
Examples include
\[ \boxed{ \text{Sun Sensor} + \text{Magnetometer} } \]
or
\[ \boxed{ \text{Star Tracker} + \text{Gyro}. } \]
4.2.9.30 Innovation
The measurement innovation remains
\[ \boxed{ \mathbf y = \mathbf z - \hat{\mathbf z}. } \]
The important point is that \hat{\mathbf z} must be calculated from the nominal quaternion using the full nonlinear measurement model.
For quaternion measurements, the innovation should be a local three-dimensional attitude difference, not component-wise quaternion subtraction.
4.2.9.31 Innovation Covariance
The innovation covariance is
\[ \boxed{ \mathbf S = \mathbf H \mathbf P^{-} \mathbf H^T + \mathbf R. } \]
It represents uncertainty in the expected measurement residual.
The matrix
\[ \mathbf R \]
must be expressed in the same residual coordinates used by the MEKF.
For example, if the innovation is a three-dimensional small-angle vector, then R should describe uncertainty in those angular-error coordinates.
4.2.9.32 Kalman Gain
The MEKF uses
\[ \boxed{ \mathbf K = \mathbf P^{-} \mathbf H^T \mathbf S^{-1}. } \]
This determines how strongly the attitude and bias errors should be corrected.
The same uncertainty-weighting principle remains:
\[ \boxed{ \text{High Sensor Confidence} \rightarrow \text{Stronger Correction} } \]
while
\[ \boxed{ \text{High Sensor Uncertainty} \rightarrow \text{Weaker Correction}. } \]
4.2.9.33 Error-State Update
The error-state correction is
\[ \boxed{ \delta\hat{\mathbf x} = \mathbf K\mathbf y. } \]
For a six-state MEKF,
\[ \delta\hat{\mathbf x} = \begin{bmatrix} \delta\hat{\boldsymbol\theta}\\ \delta\hat{\mathbf b}_g \end{bmatrix}. \]
Thus the Kalman filter estimates
\[ \boxed{ \text{Attitude Error} + \text{Gyro-Bias Error}. } \]
4.2.9.34 Multiplicative Quaternion Correction
Construct an error quaternion from
\[ \delta\hat{\boldsymbol\theta}. \]
For small angles,
\[ \boxed{ \delta\hat{\mathbf q} \approx \begin{bmatrix} 1\\ \frac12 \delta\hat{\boldsymbol\theta} \end{bmatrix}. } \]
The nominal quaternion is corrected multiplicatively.
For one convention,
\[ \boxed{ \hat{\mathbf q}^{+} = \delta\hat{\mathbf q} \otimes \hat{\mathbf q}^{-}. } \]
For the opposite convention,
\[ \boxed{ \hat{\mathbf q}^{+} = \hat{\mathbf q}^{-} \otimes \delta\hat{\mathbf q}. } \]
This multiplicative correction gives the MEKF its name.
4.2.9.35 Gyro-Bias Correction
The bias update remains additive:
\[ \boxed{ \hat{\mathbf b}_g^{+} = \hat{\mathbf b}_g^{-} + \delta\hat{\mathbf b}_g. } \]
After this update,
\[ \hat{\mathbf b}_g^{+} \]
will be used in subsequent gyro compensation:
\[ \boxed{ \hat{\boldsymbol\omega} = \boldsymbol\omega_m - \hat{\mathbf b}_g^{+}. } \]
Thus absolute attitude measurements gradually calibrate the gyro bias.
4.2.9.36 Quaternion Renormalization After Correction
After multiplicative correction,
\[ \boxed{ \hat{\mathbf q}^{+} \leftarrow \frac{ \hat{\mathbf q}^{+} }{ \|\hat{\mathbf q}^{+}\| }. } \]
Ideally, quaternion multiplication of unit quaternions already preserves norm.
However, numerical finite precision can create small deviations, so renormalization remains good practice.
4.2.9.37 Error Reset
After the attitude and bias corrections are injected,
\[ \boxed{ \delta\hat{\boldsymbol\theta} \leftarrow 0 } \]
and
\[ \boxed{ \delta\hat{\mathbf b}_g \leftarrow 0. } \]
The Kalman filter is then re-centered around the corrected nominal attitude and bias.
This keeps the local error state small.
4.2.9.38 Covariance Reset
Resetting the attitude-error state changes the local tangent coordinates.
Therefore the covariance should be transformed consistently.
Conceptually,
\[ \boxed{ \mathbf P \leftarrow \mathbf G_{\text{reset}} \mathbf P^{+} \mathbf G_{\text{reset}}^T. } \]
For sufficiently tiny attitude corrections, some simplified implementations approximate
\[ \mathbf G_{\text{reset}} \approx I. \]
However, a rigorous high-accuracy MEKF should account for the reset Jacobian.
4.2.9.39 Posterior Covariance
A standard update is
\[ \boxed{ \mathbf P^{+} = (I-KH) \mathbf P^{-}. } \]
A numerically safer alternative is the Joseph form:
\[ \boxed{ \mathbf P^{+} = (I-KH) \mathbf P^{-} (I-KH)^T + KRK^T. } \]
After this, apply the error-reset transformation as required.
4.2.9.40 Complete MEKF Algorithm
The MEKF cycle can now be summarized.
4.2.9.40.1 Read Gyro Measurement
\[ \boldsymbol\omega_m. \]
4.2.9.40.2 Remove Estimated Gyro Bias
\[ \boxed{ \hat{\boldsymbol\omega} = \boldsymbol\omega_m - \hat{\mathbf b}_g. } \]
4.2.9.40.3 Propagate Nominal Quaternion
\[ \boxed{ \hat{\mathbf q}_{k+1}^{-} = \delta\mathbf q_\Delta \otimes \hat{\mathbf q}_k^{+}. } \]
4.2.9.40.4 Propagate Bias Nominal State
For random-walk bias,
\[ \hat{\mathbf b}_{g,k+1}^{-} \approx \hat{\mathbf b}_{g,k}^{+}. \]
4.2.9.40.5 Compute Error Dynamics
\[ \boxed{ \delta\dot{\mathbf x} = F\delta\mathbf x+Gw. } \]
4.2.9.40.6 Propagate Covariance
\[ \boxed{ P^{-} = \Phi P^{+}\Phi^T+Q_d. } \]
4.2.9.40.7 Receive Attitude Measurement
For example:
\[ \mathbf q_{ST} \]
or vector observations.
4.2.9.40.8 Predict Measurement
\[ \boxed{ \hat{\mathbf z} = h( \hat{\mathbf q}^{-} ). } \]
4.2.9.40.9 Form Attitude Residual
\[ \boxed{ \mathbf y = \text{Measured Attitude} \ominus \text{Predicted Attitude}. } \]
4.2.9.40.10 Compute Measurement Jacobian
\[ \boxed{ H = \frac{\partial h} {\partial\delta\mathbf x}. } \]
4.2.9.40.11 Innovation Covariance
\[ \boxed{ S = HP^-H^T+R. } \]
4.2.9.40.12 Kalman Gain
\[ \boxed{ K = P^-H^TS^{-1}. } \]
4.2.9.40.13 Estimate Error State
\[ \boxed{ \delta\hat x = Ky. } \]
4.2.9.40.14 Inject Quaternion Correction
\[ \boxed{ \hat q^+ = \delta\hat q \otimes \hat q^-. } \]
4.2.9.40.15 Correct Gyro Bias
\[ \boxed{ \hat b_g^+ = \hat b_g^- + \delta\hat b_g. } \]
4.2.9.40.16 Normalize Quaternion
\[ \boxed{ \hat q^+ \leftarrow \frac{\hat q^+}{\|\hat q^+\|}. } \]
4.2.9.40.17 Update Covariance
Use normal or Joseph covariance update.
4.2.9.40.18 Reset Error Coordinates
\[ \boxed{ \delta\hat x \leftarrow 0. } \]
Then continue propagation.
4.2.9.41 MEKF Conceptual Flow
The complete architecture is
\[ \boxed{\text{Gyro Measurement}} \]
\[ \downarrow \]
\[ \boxed{\text{Subtract Estimated Gyro Bias}} \]
\[ \downarrow \]
\[ \boxed{\text{Propagate Nominal Quaternion}} \]
\[ \downarrow \]
\[ \boxed{\hat q^-} \]
while in parallel,
\[ \boxed{P^+} \rightarrow \boxed{F,Q} \rightarrow \boxed{P^-}. \]
Then:
\[ \boxed{\text{Star Tracker / Sun Sensor / Magnetometer}} \]
\[ \downarrow \]
\[ \boxed{\text{Predict Sensor Measurement}} \]
\[ \downarrow \]
\[ \boxed{\text{Attitude Innovation}} \]
\[ \downarrow \]
\[ \boxed{\text{Kalman Error-State Update}} \]
\[ \downarrow \]
\[ \boxed{ \delta\hat{\boldsymbol\theta}, \delta\hat{\mathbf b}_g } \]
\[ \downarrow \]
\[ \boxed{\text{Multiplicative Quaternion Correction}} \]
\[ \downarrow \]
\[ \boxed{\text{Gyro-Bias Correction}} \]
\[ \downarrow \]
\[ \boxed{\text{Reset Error State}} \]
\[ \downarrow \]
\[ \boxed{\text{Continue Gyro Propagation}}. \]
4.2.9.42 Why the Error State Stays Small
Each absolute-attitude measurement produces
\[ \delta\hat{\boldsymbol\theta}. \]
The correction is immediately injected into
\[ \hat q. \]
Then
\[ \delta\hat{\boldsymbol\theta} \]
is reset to zero.
Therefore the error state repeatedly stays near the identity rotation.
Thus
\[ \boxed{ \text{Small Multiplicative Error} \rightarrow \text{Reliable First-Order Linearisation}. } \]
This is one of the key strengths of the MEKF.
4.2.9.43 MEKF and the ESKF
The MEKF is closely related to the ESKF developed in Section 4.2.8.
The ESKF used
\[ \boxed{ x_{\text{true}} = x_{\text{nominal}} \oplus \delta x. } \]
For attitude,
\[ \boxed{ q_{\text{true}} = \delta q \otimes \hat q. } \]
Thus the MEKF can be understood as a specialized error-state filter focused on rotational geometry.
A broad navigation ESKF might estimate
\[ \delta r, \delta v, \delta\theta, \delta b_g, \delta b_a, \ldots \]
whereas a basic MEKF may contain only
\[ \boxed{ \delta\theta, \delta b_g. } \]
4.2.9.44 MEKF vs Direct Quaternion EKF
A direct quaternion EKF may use the quaternion components directly in the state covariance.
The MEKF instead separates
\[ \boxed{ \text{Nominal Quaternion} } \]
from
\[ \boxed{ \text{3-D Attitude Error}. } \]
| Feature | Direct Quaternion EKF | MEKF |
|---|---|---|
| Attitude nominal state | Quaternion | Quaternion |
| Kalman attitude-error dimension | Often 4 | 3 |
| Quaternion correction | Additive | Multiplicative |
| Unit-norm handling | Requires explicit care | Naturally respected by multiplicative update |
| Error coordinates | Redundant quaternion space | Minimal local rotation |
| Spacecraft attitude use | Possible | Usually preferred |
4.2.9.45 Left-Multiplicative vs Right-Multiplicative Error
Two common definitions are
\[ \boxed{ q_{\text{true}} = \delta q\otimes\hat q } \]
and
\[ \boxed{ q_{\text{true}} = \hat q\otimes\delta q. } \]
They correspond to expressing the attitude error in different frames.
One may represent an inertial-frame error while the other represents a body-frame error, depending on the precise convention.
This changes
- error dynamics,
- signs,
- measurement Jacobians,
- reset equations,
- injection order.
Therefore every MEKF document and software implementation should explicitly state its convention.
4.2.9.46 Active vs Passive Rotation Convention
Another source of confusion is whether
\[ C_{BI} \]
maps inertial vectors into body coordinates or vice versa.
Some texts use quaternions to rotate vectors actively.
Others use them as passive frame transformations.
This affects
\[ C(q), \]
quaternion multiplication order, and measurement equations.
A practical rule is:
\[ \boxed{ \text{Define Every Frame Transformation Explicitly Before Deriving the MEKF}. } \]
4.2.9.47 Scalar-First vs Scalar-Last Quaternions
Quaternions may be stored as
\[ \boxed{ [q_0,q_1,q_2,q_3]^T } \]
or
\[ \boxed{ [q_1,q_2,q_3,q_0]^T. } \]
These conventions produce different matrix formulas.
Therefore,
\[ \boxed{ \text{Quaternion Ordering Is Part of the Algorithm Definition}. } \]
Mixing scalar-first and scalar-last routines is a common cause of estimator failure.
4.2.9.48 Frame Consistency
Suppose gyro output is in the body frame.
The star-tracker quaternion may represent
\[ I\rightarrow B \]
or
\[ B\rightarrow I. \]
The Sun-vector model may be given in inertial coordinates.
Magnetometer output is typically body-frame.
All of these must be transformed consistently.
Thus:
\[ \boxed{ \text{Correct Mathematics} + \text{Wrong Frames} = \text{Wrong Estimator}. } \]
4.2.9.49 Star Tracker + Gyro Fusion
This is a canonical spacecraft MEKF application.
The gyro provides high-rate angular motion:
\[ \boxed{ \text{Gyro} \rightarrow \text{Fast Attitude Propagation}. } \]
The star tracker provides accurate but slower absolute attitude:
\[ \boxed{ \text{Star Tracker} \rightarrow \text{Absolute Attitude Correction}. } \]
Together,
\[ \boxed{ \text{Gyro} + \text{Star Tracker} \rightarrow \text{High-Rate Drift-Corrected Attitude Estimate}. } \]
4.2.9.50 Gyro + Sun Sensor + Magnetometer
When a star tracker is unavailable, a spacecraft may fuse
\[ \boxed{ \text{Gyroscope} + \text{Sun Sensor} + \text{Magnetometer}. } \]
The gyro provides propagation.
Sun and magnetic-field vectors provide absolute reference information.
The quality depends on geometry.
If the Sun vector and magnetic-field vector become nearly aligned,
\[ \boxed{ \text{Attitude Observability Degrades}. } \]
Thus sensor geometry changes estimator performance.
4.2.9.51 Eclipse Operation
During eclipse, the Sun sensor may become unavailable.
The MEKF can continue propagation using the gyro:
\[ \boxed{ \text{Gyro-Only Propagation}. } \]
However,
\[ P \]
should grow because attitude and bias uncertainty accumulate.
When Sun measurements return,
\[ \boxed{ \text{Measurement Reacquisition} \rightarrow \text{Attitude Correction}. } \]
The estimator should not maintain artificially constant confidence during eclipse.
4.2.9.52 Star Tracker Dropout
A star tracker may lose lock because of
- Sun exclusion,
- Earth/Moon interference,
- excessive angular rate,
- bright-object contamination,
- image-processing failure,
- poor star visibility.
During dropout,
\[ \boxed{ \text{Gyro Propagation Continues} } \]
while covariance grows.
When measurements return, residual gating should prevent a faulty reacquisition from corrupting the attitude solution.
4.2.9.53 Sensor Handover
A spacecraft might use different attitude sensors in different phases.
For example:
### Safe Mode
\[ \boxed{ \text{Sun Sensor + Magnetometer} } \]
### Nominal Fine Pointing
\[ \boxed{ \text{Star Tracker + Gyro} } \]
### RPO
\[ \boxed{ \text{Star Tracker + Relative Pose Sensors + Gyro}. } \]
The MEKF state can remain continuous while the active measurement model changes.
4.2.9.54 Relative Attitude During RPO
During rendezvous, relative attitude may be required in addition to inertial attitude.
A camera or pose-estimation system may provide
\[ \boxed{ q_{\text{rel},m}. } \]
The estimator predicts
\[ \hat q_{\text{rel}} \]
from target and chaser attitudes.
A relative attitude residual can then be formed multiplicatively.
This is useful for
- docking,
- robotic capture,
- target alignment,
- inspection,
- cooperative rendezvous.
4.2.9.55 Gyro-Bias Observability
Including
\[ \delta b_g \]
in the state does not automatically make it observable.
Bias becomes observable through its effect on attitude over time.
If the spacecraft receives accurate absolute attitude measurements, accumulated gyro-bias-induced attitude drift produces residuals that allow the filter to identify bias.
Thus
\[ \boxed{ \delta b_g \rightarrow \delta\theta \rightarrow \text{Attitude Measurement Residual}. } \]
4.2.9.56 Attitude Observability
Attitude observability depends on available reference information.
A star tracker typically provides strong three-axis attitude information.
A single Sun vector cannot instantaneously observe rotation about the Sun vector.
A single magnetometer measurement has a similar limitation.
Two non-collinear vectors improve observability.
Dynamics over time can also improve observability.
4.2.9.57 Measurement Timing
Attitude changes rapidly during slews.
If a star-tracker measurement corresponds to
\[ t-\tau \]
but is compared with
\[ \hat q(t), \]
a false residual occurs.
Therefore,
\[ \boxed{ \text{Accurate Attitude Measurement} + \text{Wrong Time} = \text{Incorrect Attitude Innovation}. } \]
Practical MEKF systems require accurate timestamps and latency handling.
4.2.9.58 Multi-Rate Sensors
A typical spacecraft may have
\[ f_{\text{gyro}} \gg f_{\text{star tracker}} \]
and perhaps
\[ f_{\text{magnetometer}} \neq f_{\text{Sun sensor}}. \]
The MEKF naturally supports this:
\[ \boxed{ \text{High-Rate Gyro Propagation} + \text{Asynchronous Absolute-Attitude Updates}. } \]
4.2.9.59 Innovation Gating
For residual
\[ y \]
and covariance
\[ S, \]
calculate
\[ \boxed{ NIS = y^TS^{-1}y. } \]
Large values may indicate
- star-tracker outlier,
- wrong vector association,
- faulty sensor,
- timing mismatch,
- poor state estimate,
- model inconsistency.
The measurement can then be rejected or downweighted.
4.2.9.60 Process Noise Q
The process covariance must represent uncertainty in attitude propagation and gyro bias.
Typical contributors include
- gyro angle random walk,
- rate noise,
- gyro-bias instability,
- bias random walk,
- scale-factor effects not explicitly estimated,
- axis misalignment,
- unmodeled angular dynamics.
A physical workflow is
\[ \boxed{ \text{Gyro Error Model} \rightarrow Q_c \rightarrow G \rightarrow Q_d. } \]
4.2.9.61 Measurement Noise R
The measurement covariance depends on the sensor and residual definition.
For a star tracker, R may describe small-angle attitude uncertainty.
For Sun sensors or magnetometers, R may describe vector measurement noise.
For vision-based relative attitude,
\[ R \]
may include pose-estimation uncertainty.
Therefore,
\[ \boxed{ R \text{ Must Represent Uncertainty in the Actual MEKF Measurement Residual}. } \]
4.2.9.62 Initial Quaternion
The initial nominal quaternion should be reasonably close to truth.
If attitude uncertainty is extremely large, the small-angle approximation may be invalid.
Thus the MEKF performs best when
\[ \boxed{ \|\delta\theta\| \text{ remains reasonably small}. } \]
Initial attitude may come from
- coarse Sun sensors,
- magnetometer-based attitude,
- TRIAD,
- QUEST,
- star tracker,
- known launch attitude,
- previous navigation solution.
4.2.9.63 Initial Covariance
The initial covariance should realistically describe uncertainty in
\[ \delta\theta \]
and
\[ \delta b_g. \]
For example,
\[ P_0 = \begin{bmatrix} P_{\theta\theta} & P_{\theta b}\\ P_{b\theta} & P_{bb} \end{bmatrix}. \]
If attitude uncertainty is underestimated, the filter may trust its initial orientation too strongly.
If gyro-bias uncertainty is underestimated, bias convergence can be unnecessarily slow.
4.2.9.64 Large Initial Attitude Error
The standard MEKF relies on a local small-angle attitude-error representation.
If the initial error is very large,
\[ \|\delta\theta\| \not\ll1, \]
the approximation
\[ \delta q \approx \begin{bmatrix} 1\\ \frac12\delta\theta \end{bmatrix} \]
is poor.
Therefore,
\[ \boxed{ \text{Very Large Initial Attitude Error} \rightarrow \text{Potential MEKF Convergence Problems}. } \]
A coarse attitude-acquisition stage may be required before enabling the fine MEKF.
4.2.9.65 MEKF During Spacecraft Slews
During a fast slew,
\[ \|\omega\| \]
may become large.
The quaternion propagation remains valid, but
- integration accuracy,
- gyro saturation,
- star-tracker availability,
- measurement latency,
- discretization,
- covariance propagation
become more important.
A sufficiently high propagation rate should be used.
4.2.9.66 Numerical Integration
A simple Euler step
\[ q_{k+1} = q_k+ \dot q_k\Delta t \]
can work for sufficiently small time steps but may produce norm drift.
More accurate approaches include
- exponential quaternion update,
- Runge-Kutta integration,
- exact constant-rate quaternion increment.
The propagation method should be consistent with required attitude accuracy.
4.2.9.67 Common MEKF Implementation Errors
Typical mistakes include:
- quaternion multiplication in the wrong order,
- using a left-error Jacobian with a right-error injection,
- wrong quaternion scalar location,
- mixing active and passive rotations,
- wrong body/inertial frame convention,
- failing to align quaternion signs before residual calculation,
- subtracting quaternions directly,
- forgetting quaternion normalization,
- incorrect skew-matrix sign,
- incorrect gyro-bias sign,
- evaluating residuals in inconsistent frames,
- using degrees internally in equations expecting radians,
-
incorrect
Qdiscretization, -
incorrect star-tracker
R, - ignoring sensor latency,
- using invalid measurements,
- failing to reset the error state,
- neglecting covariance reset.
4.2.9.68 Simulation Truth Must Remain Separate
When implementing an MEKF in simulation, truth may contain
\[ q_{\text{true}} \]
and
\[ b_{g,\text{true}}. \]
These quantities must not be used by the estimator except to generate simulated sensor outputs.
The estimator should receive
\[ \boxed{ \text{Gyro Measurements} + \text{Star Tracker / Vector Measurements} } \]
not
\[ \boxed{ \text{True Attitude}. } \]
Truth should be used only for performance evaluation.
4.2.9.69 Simulink Architecture
A clean MEKF Simulink implementation can contain separate blocks for:
\[ \boxed{\text{Gyro Preprocessing}} \]
\[ \downarrow \]
\[ \boxed{\text{Bias Compensation}} \]
\[ \downarrow \]
\[ \boxed{\text{Quaternion Propagation}} \]
while in parallel:
\[ \boxed{F,G,Q} \rightarrow \boxed{\text{Covariance Propagation}}. \]
Then:
\[ \boxed{\text{Absolute Attitude Sensor}} \]
\[ \downarrow \]
\[ \boxed{\text{Measurement Prediction}} \]
\[ \downarrow \]
\[ \boxed{\text{Attitude Residual}} \]
\[ \downarrow \]
\[ \boxed{\text{Gating}} \]
\[ \downarrow \]
\[ \boxed{H,S,K} \]
\[ \downarrow \]
\[ \boxed{ \delta\hat\theta, \delta\hat b_g } \]
\[ \downarrow \]
\[ \boxed{\text{Quaternion Injection + Bias Correction}} \]
\[ \downarrow \]
\[ \boxed{\text{Error Reset}}. \]
4.2.9.70 Verification Strategy
A good MEKF should be verified progressively.
4.2.9.70.1 Perfect-Sensor Test
Set gyro and attitude-sensor noise to zero.
Verify
\[ \hat q \rightarrow q_{\text{true}}. \]
4.2.9.70.2 Initial Attitude Error Test
Apply known initial orientation error.
Verify convergence.
4.2.9.70.3 Gyro Bias Test
Inject known gyro bias.
Verify
\[ \hat b_g \rightarrow b_{g,\text{true}}. \]
4.2.9.70.4 Gyro Noise Test
Add realistic gyro noise and verify covariance behaviour.
4.2.9.70.5 Star Tracker Noise Test
Add realistic attitude measurement uncertainty.
4.2.9.70.6 Star Tracker Dropout Test
Disable star tracker.
Verify gyro propagation and covariance growth.
4.2.9.70.7 Reacquisition Test
Restore star tracker and verify smooth convergence.
4.2.9.70.8 Quaternion Sign Test
Flip measured quaternion sign:
\[ q_m \rightarrow -q_m. \]
Verify physical residual remains unchanged.
4.2.9.70.9 Fast Slew Test
Test high angular rates.
4.2.9.70.10 Outlier Test
Inject faulty attitude measurements and verify gating.
4.2.9.70.11 Timestamp Test
Introduce measurement latency.
4.2.9.70.12 Convention Test
Verify quaternion multiplication and frame conventions using known rotations.
4.2.9.71 NIS Testing
For innovation
\[ y_k \]
and covariance
\[ S_k, \]
calculate
\[ \boxed{ NIS_k = y_k^TS_k^{-1}y_k. } \]
NIS helps assess whether the measurement residual is consistent with the uncertainty predicted by the filter.
It is useful for
- tuning,
- gating,
- fault detection,
- statistical consistency testing.
4.2.9.72 NEES Testing
When simulation truth is available, calculate a compatible local attitude error
\[ \delta\theta_{\text{true-est}} \]
and bias error
\[ \delta b_g. \]
Form
\[ \delta x. \]
Then
\[ \boxed{ NEES = \delta x^TP^{-1}\delta x. } \]
This assesses whether the estimator covariance accurately represents the actual estimation errors.
4.2.9.73 Monte Carlo Validation
Randomize
- initial attitude error,
- angular rate,
- gyro noise,
- gyro bias,
- bias drift,
- star-tracker noise,
- Sun-sensor noise,
- magnetometer noise,
- alignment errors,
- sensor dropout,
- latency,
- sensor outliers,
- spacecraft slew profiles.
Evaluate
\[ \boxed{Attitude~RMSE} \]
\[ \boxed{Bias~RMSE} \]
\[ \boxed{NIS} \]
\[ \boxed{NEES} \]
\[ \boxed{Convergence~Time} \]
\[ \boxed{Maximum~Attitude~Error} \]
\[ \boxed{Divergence~Rate}. \]
4.2.9.74 MEKF for Fine Pointing
For fine-pointing spacecraft,
\[ \boxed{ \text{Star Tracker} + \text{Precision Gyro} + \text{MEKF} } \]
can provide high-quality attitude knowledge.
The control system then uses
\[ \hat q \]
and
\[ \hat\omega \]
to drive reaction wheels or other actuators.
The complete chain becomes
\[ \boxed{ \text{Sensors} \rightarrow \text{MEKF} \rightarrow \text{Attitude Estimate} \rightarrow \text{Attitude Controller} \rightarrow \text{Reaction Wheels}. } \]
4.2.9.75 MEKF During RPO
During RPO, attitude knowledge is essential because translation commands and sensor line-of-sight vectors depend on spacecraft orientation.
An MEKF may fuse
\[ \boxed{ \text{Gyro} + \text{Star Tracker} + \text{Relative Pose Attitude} } \]
to estimate chaser orientation.
This affects
- thrust direction,
- camera pointing,
- LiDAR pointing,
- docking alignment,
- robotic capture,
- relative-frame transformations.
Thus attitude estimation is tightly connected to translational RPO navigation.
4.2.9.76 Relative Attitude and Docking
At docking or capture, relative attitude may need to satisfy
\[ \boxed{ \|\delta\boldsymbol\theta_{rel}\| < \theta_{\text{capture}}. } \]
Relative angular rate may also need to satisfy
\[ \boxed{ \|\boldsymbol\omega_{rel}\| < \omega_{\text{capture}}. } \]
The navigation system therefore needs not only relative position and velocity but also precise relative attitude.
The MEKF philosophy can be extended to such relative-attitude estimation.
4.2.9.77 Attitude Uncertainty and Capture Readiness
The navigation output should not contain only
\[ \hat q. \]
It should also provide attitude uncertainty through
\[ P_{\theta\theta}. \]
Therefore capture logic can consider not just
\[ \|\hat{\delta\theta}_{rel}\| \]
but also confidence in that estimate.
Conceptually,
\[ \boxed{ \text{Attitude Capture Readiness} = \text{Relative Attitude Estimate} + \text{Attitude Confidence}. } \]
4.2.9.78 Relationship to Attitude Controller
Suppose the controller uses attitude error
\[ q_e \]
between reference attitude and estimated attitude.
Then any navigation error propagates directly into control commands.
Thus
\[ \boxed{ \text{MEKF Error} \rightarrow \text{Control Error} \rightarrow \text{Actuator Command Error}. } \]
This is why estimator accuracy, latency, and noise should be evaluated together with closed-loop control performance.
4.2.9.79 Key Equations at a Glance
### Multiplicative Attitude Definition
\[ \boxed{ q_{\text{true}} = \delta q\otimes\hat q } \]
### Small-Angle Error Quaternion
\[ \boxed{ \delta q \approx \begin{bmatrix} 1\\ \frac12\delta\theta \end{bmatrix} } \]
### Gyro Correction
\[ \boxed{ \hat\omega = \omega_m-\hat b_g } \]
### Quaternion Propagation
\[ \boxed{ \dot{\hat q} = \frac12 \Omega(\hat\omega)\hat q } \]
### Error State
\[ \boxed{ \delta x = \begin{bmatrix} \delta\theta\\ \delta b_g \end{bmatrix} } \]
### Error Dynamics
\[ \boxed{ \delta\dot x = F\delta x+Gw } \]
### Covariance Prediction
\[ \boxed{ P^- = \Phi P^+\Phi^T+Q_d } \]
### Innovation
\[ \boxed{ y=z-h(\hat q^-) } \]
### Innovation Covariance
\[ \boxed{ S=HP^-H^T+R } \]
### Kalman Gain
\[ \boxed{ K=P^-H^TS^{-1} } \]
### Error Estimate
\[ \boxed{ \delta\hat x=Ky } \]
### Multiplicative Correction
\[ \boxed{ \hat q^+ = \delta\hat q\otimes\hat q^- } \]
### Bias Correction
\[ \boxed{ \hat b_g^+ = \hat b_g^-+\delta\hat b_g } \]
### Error Reset
\[ \boxed{ \delta\hat x\leftarrow0 } \]
4.2.9.80 MEKF in One Diagram
The complete idea can be summarized as
\[ \boxed{\text{Gyroscope}} \]
\[ \downarrow \]
\[ \boxed{\text{Bias Compensation}} \]
\[ \downarrow \]
\[ \boxed{\text{Quaternion Propagation}} \]
\[ \downarrow \]
\[ \boxed{\hat q^-} \]
while
\[ \boxed{ P^+ \rightarrow F,Q \rightarrow P^-. } \]
Then
\[ \boxed{\text{Star Tracker / Sun Sensor / Magnetometer}} \]
\[ \downarrow \]
\[ \boxed{\text{Attitude Residual}} \]
\[ \downarrow \]
\[ \boxed{\text{Estimate Small Attitude + Bias Error}} \]
\[ \downarrow \]
\[ \boxed{\text{Multiplicatively Correct Quaternion}} \]
\[ \downarrow \]
\[ \boxed{\text{Correct Gyro Bias}} \]
\[ \downarrow \]
\[ \boxed{\text{Reset Error State}} \]
\[ \downarrow \]
\[ \boxed{\text{Continue Propagation}}. \]
The MEKF philosophy is therefore
\[ \boxed{ \text{Propagate Quaternion Globally} + \text{Estimate Attitude Error Locally} + \text{Correct Multiplicatively}. } \]
4.2.9.81 Key Takeaways
The Multiplicative Extended Kalman Filter should be understood through these points:
- The MEKF is designed primarily for quaternion-based spacecraft attitude estimation.
- A quaternion has four components but only three rotational degrees of freedom.
- The quaternion must satisfy
\[ \|\mathbf q\|=1. \]
- A direct additive quaternion correction is therefore not the most natural formulation.
- The MEKF maintains a full nominal quaternion but estimates only a three-dimensional small attitude error.
- True and nominal attitude are related multiplicatively:
\[ q_{\text{true}} = \delta q\otimes\hat q. \]
- A common MEKF error state contains
\[ \delta\theta,\qquad\delta b_g. \]
- Gyro measurements provide high-rate attitude propagation.
- Gyro bias causes attitude drift and should often be estimated.
- Star trackers provide accurate absolute attitude corrections.
- Sun sensors and magnetometers provide reference-vector measurements.
- Vector-observation Jacobians map attitude error into sensor residuals.
- Quaternion measurement residuals must be obtained through relative rotation, not quaternion subtraction.
- Quaternion sign ambiguity must be handled.
- Quaternion order and frame convention must remain consistent.
- Left- and right-multiplicative error definitions must not be mixed.
- The covariance represents uncertainty in the local attitude-error state, not in four unconstrained quaternion coordinates.
- After every update, the attitude correction is injected multiplicatively.
- Gyro bias is corrected additively.
- The local error state is then reset.
- Covariance reset may require a reset Jacobian.
-
Qshould reflect gyro noise and bias dynamics. -
Rshould represent uncertainty in the actual measurement residual. - Multi-rate attitude sensors are naturally supported.
- Sensor dropout should increase attitude uncertainty.
- Measurement timing is critical during spacecraft slews.
- NIS and NEES are useful consistency tests.
- Monte Carlo analysis should include bias, noise, misalignment, dropout, timing, and initial-attitude uncertainty.
- The MEKF is particularly well suited to fine pointing, star-tracker/gyro fusion, attitude determination, RPO, docking, and robotic capture applications.
The most important concept is
\[ \boxed{ \text{MEKF} = \text{Nominal Quaternion} + \text{Small 3-D Attitude Error} + \text{Multiplicative Correction}. } \]
Or physically:
\[ \boxed{ \text{Do not add a Kalman correction directly to the quaternion; estimate the small rotation by which the quaternion is wrong and compose that rotation with the nominal attitude.} } \]
Next: 4.2.10 Unscented Kalman Filter (UKF)
The EKF, ESKF, and MEKF all rely fundamentally on local linearisation.
For example, the MEKF uses a locally linear attitude-error model
\[ \boxed{ \delta\dot x = F\delta x+Gw. } \]
This works extremely well when the uncertainty remains sufficiently local.
But for systems with stronger nonlinearities, another approach is possible.
Instead of evaluating Jacobians, choose a carefully constructed set of representative points around the current mean:
\[ \boxed{ \text{Sigma Points}. } \]
Propagate those points through the actual nonlinear function:
\[ \boxed{ \chi_i \rightarrow f(\chi_i) } \]
and reconstruct the transformed mean and covariance.
This leads to 4.2.10 Unscented Kalman Filter (UKF), where the focus should shift to sigma-point generation, the unscented transform, nonlinear state propagation, predicted mean and covariance, nonlinear measurement updates, \alpha,\beta,\kappa tuning parameters, covariance weights, spacecraft nonlinear-navigation applications, and comparison with the EKF.
4.2.10 Unscented Kalman Filter (UKF)
Sigma-point generation, the unscented transform, nonlinear state propagation, predicted mean and covariance, nonlinear measurement updates, tuning parameters, covariance weights, spacecraft nonlinear-navigation applications, and comparison with the EKF.
Continue to Unscented Kalman Filter →