4.1.3 Magnetometers
Magnetometers are vector sensors used extensively in spacecraft attitude determination and control. They measure the local magnetic-field vector at the sensor location and provide a body-frame observation that can be compared with a predicted geomagnetic-field vector obtained from an Earth magnetic-field model.
Unlike a gyroscope, which measures angular rate, or an accelerometer, which measures specific force, a magnetometer provides an absolute environmental reference vector.
For a three-axis magnetometer,
\[ \boxed{ \mathbf B_m = \begin{bmatrix} B_x\\ B_y\\ B_z \end{bmatrix} } \]
where \(B_x\), \(B_y\), and \(B_z\) are the measured magnetic-field components along the sensor axes.
A simple measurement model is
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{true}} + \mathbf b_m + \mathbf n_m } \]
where
- \(\mathbf b_m\) is magnetometer bias,
- \(\mathbf n_m\) represents measurement noise.
A more practical three-axis model includes scale-factor and alignment errors:
\[ \boxed{ \mathbf B_m = \left( \mathbf I + \mathbf S_m + \mathbf M_m \right) \mathbf B_{\text{true}} + \mathbf b_m + \mathbf n_m } \]
For spacecraft applications, an even more complete model is usually required because the magnetometer measures not only Earth's magnetic field but also magnetic fields generated by the spacecraft itself.
4.1.3.1 Role of Magnetometers in GNC
Magnetometers are primarily used as attitude-reference sensors and magnetic-control sensors.
A spacecraft can use its orbital position and time together with an Earth magnetic-field model to predict the local geomagnetic-field vector in an inertial, Earth-fixed, or orbital reference frame.
The onboard magnetometer measures the same physical magnetic field in the spacecraft body or sensor frame.
The predicted field path is
\[ \boxed{\mathbf B^I_{\text{model}}} \rightarrow \boxed{\text{Attitude Transformation}} \rightarrow \boxed{\mathbf B^B_{\text{predicted}}}. \]
The measurement path is
\[ \boxed{\text{Magnetometer}} \rightarrow \boxed{\mathbf B^B_{\text{measured}}}. \]
The difference between the predicted and measured magnetic vectors provides information about spacecraft orientation and can be processed by an attitude-determination algorithm or estimator.
Common spacecraft applications include
- coarse attitude determination,
- safe-mode attitude sensing,
- B-dot detumbling,
- magnetorquer control,
- reaction-wheel desaturation,
- attitude-filter updates,
- magnetic-environment monitoring,
- fault detection and redundancy management.
4.1.3.2 What a Magnetometer Measures
A magnetometer measures the local magnetic flux-density vector:
\[ \boxed{ \mathbf B = \begin{bmatrix} B_x\\ B_y\\ B_z \end{bmatrix} }. \]
The SI unit of magnetic flux density is the tesla:
\[ \mathrm T. \]
Because the geomagnetic field is much smaller than one tesla, spacecraft magnetometer measurements are commonly expressed in
\[ \mu\mathrm T \]
or
\[ \mathrm{nT}. \]
The conversions are
\[ 1~\mu\mathrm T = 10^{-6}\mathrm T \]
and
\[ 1~\mathrm{nT} = 10^{-9}\mathrm T. \]
Magnitude
The magnitude of the measured field is
\[ \boxed{ |\mathbf B| = \sqrt{ B_x^2+B_y^2+B_z^2 } }. \]
Direction
The corresponding unit vector is
\[ \boxed{ \hat{\mathbf B} = \frac{\mathbf B}{|\mathbf B|} }. \]
For attitude determination, the magnetic-field direction is especially useful because it provides orientation information relative to a predicted geomagnetic reference vector.
4.1.3.3 Earth's Magnetic Field as an Attitude Reference
Earth's magnetic field varies with spacecraft position and time. Therefore, the magnetic reference vector is not constant throughout the orbit.
At spacecraft position \(\mathbf r\) and time \(t\),
\[ \boxed{ \mathbf B_{\text{ref}} = \mathbf B(\mathbf r,t) }. \]
The general reference-generation chain is
\[ \boxed{(\mathbf r,t)} \rightarrow \boxed{\text{Geomagnetic Model}} \rightarrow \boxed{\mathbf B^{\text{reference}}}. \]
Magnetometer-based attitude determination therefore depends on more than the magnetometer alone. It also depends on spacecraft position, time, coordinate-frame definitions, and the fidelity of the magnetic-field model.
4.1.3.4 Geomagnetic Field Models
In realistic spacecraft simulations, Earth's magnetic field should generally be generated using a geomagnetic model rather than represented as a fixed vector.
Common approaches include the International Geomagnetic Reference Field (IGRF) and related spherical-harmonic models.
Conceptually,
\[ \boxed{ \mathbf B = \mathbf B(r,\lambda,\phi,t) } \]
where
- \(r\) is geocentric distance,
- \(\lambda\) is longitude,
- \(\phi\) is latitude,
- \(t\) represents time.
A simplified dipole model may be adequate for basic conceptual simulations, while high-fidelity attitude and control studies generally benefit from a more realistic geomagnetic representation.
4.1.3.5 Simple Magnetic Dipole Model
At introductory level, Earth may be approximated as a magnetic dipole.
For Earth magnetic dipole moment \(\mathbf m_E\),
\[ \boxed{ \mathbf B(\mathbf r) = \frac{\mu_0}{4\pi r^3} \left[ 3 (\mathbf m_E\cdot\hat{\mathbf r}) \hat{\mathbf r} - \mathbf m_E \right] }. \]
Here,
\[ \hat{\mathbf r} = \frac{\mathbf r}{|\mathbf r|} \]
and \(\mu_0\) is the permeability of free space.
The model shows the approximate distance dependence
\[ \boxed{ |\mathbf B| \propto \frac{1}{r^3} }. \]
The dipole model is valuable for teaching and preliminary simulation, although it is not a replacement for a higher-order geomagnetic model when greater fidelity is required.
4.1.3.6 Physical Operating Principles
Different magnetometer technologies measure magnetic field using different physical effects.
Hall-Effect Magnetometers
A Hall-effect sensor responds to the Lorentz force on moving charge carriers.
When electrical current flows through a conductor or semiconductor in the presence of a magnetic field, a transverse voltage develops.
Conceptually,
\[ \boxed{ V_H \propto B }. \]
Hall sensors are compact and inexpensive, but their sensitivity and stability may be insufficient for some precision spacecraft applications.
Magnetoresistive Magnetometers
Magnetoresistive sensors change their electrical resistance in response to magnetic field.
Technologies include anisotropic magnetoresistance, giant magnetoresistance, and tunnelling magnetoresistance.
Conceptually,
\[ \Delta R \propto B. \]
These sensors can provide compact, low-power, three-axis magnetic-field sensing.
Fluxgate Magnetometers
Fluxgate magnetometers are widely used for precision magnetic-field measurements.
They use a ferromagnetic core that is periodically driven into saturation. An external magnetic field changes the symmetry of the magnetic response, producing harmonic components that can be processed to estimate the external field.
Fluxgate sensors can provide high sensitivity, good low-frequency performance, and good stability, making them useful for many spacecraft applications.
4.1.3.7 Single-Axis and Three-Axis Magnetometers
A single-axis magnetometer measures the magnetic-field projection along one sensing axis.
For example,
\[ B_x. \]
A three-axis magnetometer provides
\[ \boxed{ \mathbf B_m = \begin{bmatrix} B_{mx}\\ B_{my}\\ B_{mz} \end{bmatrix} }. \]
Ideally,
\[ B_{mx}=B_x, \qquad B_{my}=B_y, \qquad B_{mz}=B_z. \]
Three-axis measurement allows the magnetic-field magnitude and direction to be reconstructed and is therefore particularly useful for spacecraft attitude determination.
4.1.3.8 Magnetometer Coordinate Frames
The geomagnetic-field model may produce the magnetic vector in an inertial or Earth-fixed frame, while the physical magnetometer measures the field in its own sensor frame.
Let
- \(I\) denote the inertial/reference frame,
- \(B\) denote the spacecraft body frame,
- \(M\) denote the magnetometer sensor frame.
The reference field transformed into the spacecraft body frame is
\[ \boxed{ \mathbf B^B = C_I^B \mathbf B^I }. \]
If the magnetometer is mounted with an orientation relative to the body,
\[ \boxed{ \mathbf B^M = C_B^M \mathbf B^B }. \]
Therefore,
\[ \boxed{ \mathbf B^M = C_B^M C_I^B \mathbf B^I }. \]
This directly connects magnetometer modelling with the Direction Cosine Matrix and attitude-transformation material developed earlier.
4.1.3.9 Ideal Magnetometer Model
For an ideal three-axis magnetometer,
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{true}} }. \]
If the geomagnetic field is predicted in the inertial frame,
\[ \mathbf B^B_{\text{true}} = C_I^B \mathbf B^I. \]
For a perfectly aligned magnetometer,
\[ \boxed{ \mathbf B_m = C_I^B \mathbf B^I }. \]
The ideal model assumes zero bias, perfect scale factor, perfect orthogonality, no spacecraft-generated magnetic field, zero noise, infinite resolution, unlimited range, and no thermal dependence.
4.1.3.10 Hard-Iron Error
Hard-iron error is one of the most important magnetometer-specific calibration effects.
It arises from approximately constant magnetic fields produced by permanently magnetized materials or persistent spacecraft magnetic sources.
The measurement model is
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{true}} + \mathbf b_h }. \]
where
\[ \mathbf b_h = \begin{bmatrix} b_{hx}\\ b_{hy}\\ b_{hz} \end{bmatrix}. \]
Hard-iron error shifts the centre of the magnetic-field measurement locus.
In an approximately uniform field, ideal measurements taken over many orientations satisfy
\[ |\mathbf B| = B_0. \]
With hard-iron bias,
\[ |\mathbf B_m-\mathbf b_h| \approx B_0. \]
Geometrically, the ideal sphere of measurements is translated away from the origin.
4.1.3.11 Soft-Iron Error
Soft-iron effects arise when nearby materials distort the external magnetic field.
Unlike hard-iron error, which primarily translates the measured-field locus, soft-iron effects distort its shape.
A simple model is
\[ \boxed{ \mathbf B_m = A_s \mathbf B_{\text{true}} }. \]
where \(A_s\) is the soft-iron distortion matrix:
\[ A_s = \begin{bmatrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{bmatrix}. \]
The matrix can represent unequal gains and cross-axis coupling.
Geometrically,
\[ \boxed{ \text{Ideal Field Locus} \rightarrow \text{Sphere} } \]
while
\[ \boxed{ \text{Soft-Iron Distortion} \rightarrow \text{Ellipsoid} }. \]
4.1.3.12 Hard-Iron + Soft-Iron Model
Hard-iron bias, soft-iron distortion, and random noise can be combined into one practical model:
\[ \boxed{ \mathbf B_m = A_s \mathbf B_{\text{true}} + \mathbf b_h + \mathbf n_m }. \]
If \(A_s\) and \(\mathbf b_h\) are known from calibration, an estimate of the undistorted field is
\[ \boxed{ \hat{\mathbf B}_{true} = A_s^{-1} \left( \mathbf B_m-\mathbf b_h \right) }. \]
This relationship forms the basis of many practical magnetometer calibration methods.
4.1.3.13 Scale-Factor Error
Each sensing axis may have a slightly incorrect sensitivity.
For one axis,
\[ \boxed{ B_m = (1+s_m) B_{\text{true}} }. \]
For three axes,
\[ S_m = \begin{bmatrix} s_x&0&0\\ 0&s_y&0\\ 0&0&s_z \end{bmatrix}. \]
Thus,
\[ \boxed{ \mathbf B_m = (I+S_m) \mathbf B_{\text{true}} }. \]
Unequal scale factors can distort both the measured field magnitude and its direction.
4.1.3.14 Axis Misalignment and Non-Orthogonality
The three physical sensing axes of a magnetometer may not be perfectly orthogonal.
A small-error matrix can be written as
\[ M_m = \begin{bmatrix} 0&m_{xy}&m_{xz}\\ m_{yx}&0&m_{yz}\\ m_{zx}&m_{zy}&0 \end{bmatrix}. \]
The measured field becomes
\[ \boxed{ \mathbf B_m = (I+M_m) \mathbf B_{\text{true}} }. \]
For the \(x\)-axis,
\[ B_{mx} = B_x + m_{xy}B_y + m_{xz}B_z. \]
Consequently, the measured magnetic-field direction can be incorrect even when the magnitude appears reasonable.
4.1.3.15 Magnetometer Bias
In addition to hard-iron effects, the sensor electronics may contribute a zero-field offset.
A generic additive bias model is
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{true}} + \mathbf b_m }. \]
The total effective bias can be considered as
\[ \mathbf b_m = \mathbf b_{\text{sensor}} + \mathbf b_{\text{hard-iron}} + \mathbf b_{\text{spacecraft}}. \]
These contributions may be difficult to separate experimentally, but they can be represented individually in simulation and error-budget studies.
4.1.3.16 White Noise and Noise Density
Magnetometer measurements contain random noise.
A simple model is
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{true}} + \mathbf n_m }. \]
Assuming zero-mean noise,
\[ E[\mathbf n_m]=0. \]
An ideal white-noise model can be represented as
\[ E \left[ \mathbf n_m(t) \mathbf n_m^T(t') \right] = Q_m \delta(t-t'). \]
Noise density may be specified in units such as
\[ \frac{\mathrm{nT}}{\sqrt{\mathrm{Hz}}}. \]
For effective bandwidth \(B_w\),
\[ \boxed{ \sigma_B \propto N_B\sqrt{B_w} }. \]
4.1.3.17 Resolution and Quantisation
Digital magnetometers have finite output resolution.
If the minimum field increment is \(\Delta B\),
\[ \boxed{ B_q = \Delta B \operatorname{round} \left( \frac{B}{\Delta B} \right) }. \]
The quantisation error is approximately bounded by
\[ -\frac{\Delta B}{2} \leq e_q \leq \frac{\Delta B}{2}. \]
For coarse attitude determination this may be small, whereas precision magnetic measurements can be more sensitive to finite resolution.
4.1.3.18 Saturation and Dynamic Range
Every magnetometer has a finite measurable field range.
Suppose
\[ -B_{\max} \leq B \leq B_{\max}. \]
The saturated output can be represented as
\[ B_m = \begin{cases} -B_{\max}, & B<-B_{\max}\\[4pt] B, & |B|\leq B_{\max}\\[4pt] +B_{\max}, & B>B_{\max}. \end{cases} \]
Saturation can result from strong external fields or from local spacecraft sources such as magnetorquers, motors, current-carrying wiring, or permanent magnets.
4.1.3.19 Temperature Effects
Magnetometer bias and sensitivity can vary with temperature.
A simple linear bias model is
\[ \boxed{ \mathbf b_m(T) = \mathbf b_0 + \mathbf k_T(T-T_0) }. \]
A higher-order model is
\[ \mathbf b_m(T) = \mathbf b_0 + \mathbf k_1(T-T_0) + \mathbf k_2(T-T_0)^2. \]
Scale factor may also depend on temperature:
\[ S_m=S_m(T). \]
Thermal characterization and compensation can therefore improve measurement stability.
4.1.3.20 Nonlinearity and Hysteresis
An ideal sensor has a linear response,
\[ B_m=KB. \]
A practical sensor may contain nonlinear terms:
\[ \boxed{ B_m = K_1B + K_2B^2 + K_3B^3 + \cdots }. \]
Magnetic materials may also exhibit hysteresis, causing the current sensor response to depend partly on previous magnetic exposure.
This effect is especially relevant when considering ferromagnetic spacecraft structures and magnetic cleanliness.
4.1.3.21 Spacecraft-Generated Magnetic Fields
A spacecraft is rarely magnetically clean.
The magnetometer may therefore measure
\[ \boxed{ \mathbf B_m = \mathbf B_{\text{Earth}} + \mathbf B_{\text{spacecraft}} + \mathbf B_{\text{sensor error}} }. \]
Spacecraft-generated fields may originate from
- current loops,
- batteries,
- power converters,
- reaction-wheel motors,
- relays,
- permanent magnets,
- magnetic structural materials,
- magnetorquers,
- wiring harnesses,
- switching electronics.
The total spacecraft field may be represented as
\[ \mathbf B_{\text{spacecraft}} = \sum_i \mathbf B_i. \]
4.1.3.22 Magnetic Dipole Field from Spacecraft Sources
A localized spacecraft magnetic source can often be approximated as a magnetic dipole.
For dipole moment \(\mathbf m_s\),
\[ \boxed{ \mathbf B_s(\mathbf r) = \frac{\mu_0}{4\pi r^3} \left[ 3 (\mathbf m_s\cdot\hat{\mathbf r}) \hat{\mathbf r} - \mathbf m_s \right] }. \]
The most important distance dependence is
\[ \boxed{ B_s \propto \frac{1}{r^3} }. \]
Therefore, even a modest increase in distance from a magnetic source can significantly reduce contamination.
This is one reason spacecraft magnetometers are sometimes placed on deployable booms.
4.1.3.23 Magnetometer Placement
Magnetometer location is a major spacecraft integration consideration.
The sensor should be placed as far as practical from strong magnetic disturbance sources while still satisfying structural, thermal, mass, volume, harness, and deployment constraints.
Possible locations include
- the spacecraft main structure,
- an external panel,
- a deployable boom.
Because dipole disturbances approximately decay as \(1/r^3\), boom mounting can substantially reduce onboard contamination.
4.1.3.24 Magnetorquer Interference
Magnetorquer interference is especially important because the actuator deliberately generates a magnetic field—the same physical quantity the magnetometer is intended to measure.
A magnetorquer generates commanded dipole moment
\[ \mathbf m_c. \]
The resulting spacecraft control torque is
\[ \boxed{ \boldsymbol{\tau} = \mathbf m_c \times \mathbf B_E }. \]
However, while energized, the torquer also produces a local magnetic field,
\[ \mathbf B_{\text{MTQ}}. \]
The magnetometer may therefore observe
\[ \boxed{ \mathbf B_m = \mathbf B_E + \mathbf B_{\text{MTQ}} + \cdots }. \]
The measurement may be unusable during active torquer operation.
4.1.3.25 Magnetorquer Blanking and Time Multiplexing
A common solution is to separate magnetic actuation and magnetic measurement in time.
Magnetorquer ON
|
v
Generate Magnetic Torque
|
v
Magnetometer Measurement Invalid
Magnetorquer OFF
|
v
Wait for Field to Settle
|
v
Take Magnetometer Measurement
The sequence can be represented as
\[ \boxed{\text{Torquer OFF}} \rightarrow \boxed{\text{Settling Time}} \rightarrow \boxed{\text{Magnetometer Sample}} \rightarrow \boxed{\text{Torquer ON}}. \]
This strategy is commonly described as magnetometer blanking, gating, or time multiplexing.
4.1.3.26 Reaction-Wheel and Electronics Interference
Magnetorquers are not the only source of magnetic contamination.
Reaction-wheel motors may generate magnetic disturbances that vary with wheel speed or motor current, while power electronics may generate switching-frequency magnetic fields.
The total disturbance may be represented as
\[ \mathbf B_{\text{disturbance}} = \mathbf B_{\text{MTQ}} + \mathbf B_{\text{RW}} + \mathbf B_{\text{power}} + \mathbf B_{\text{wiring}} + \cdots. \]
Some disturbances are approximately constant, while others vary with subsystem operating state.
4.1.3.27 Complete Three-Axis Magnetometer Model
Combining the main deterministic, stochastic, environmental, and spacecraft-generated effects gives
\[ \boxed{ \mathbf B_m = (\mathbf I+\mathbf S_m+\mathbf M_m) C_B^M C_I^B \mathbf B_E^I + \mathbf b_h + \mathbf b_m + \mathbf B_{sc} + \mathbf n_m }. \]
A more complete simulation model can be written as
\[ \boxed{ \mathbf B_m = Q \left[ \operatorname{sat} \left( A_s C_B^M C_I^B \mathbf B_E^I(\mathbf r,t) + \mathbf b_h + \mathbf b_m(T) + \mathbf B_{sc}(t) + \mathbf n_m \right) \right] }. \]
where
- \(\mathbf B_E^I(\mathbf r,t)\) is the geomagnetic reference field,
- \(C_I^B\) transforms the field into the body frame,
- \(C_B^M\) transforms the body-frame vector into the magnetometer frame,
- \(A_s\) contains scale, non-orthogonality, and soft-iron effects,
- \(\mathbf b_h\) is hard-iron bias,
- \(\mathbf b_m(T)\) is temperature-dependent sensor bias,
- \(\mathbf B_{sc}(t)\) is spacecraft-generated field,
- \(\mathbf n_m\) is random noise,
- \(Q[\cdot]\) represents quantisation,
- \(\operatorname{sat}(\cdot)\) represents saturation.
4.1.3.28 Continuous-Time Magnetometer Model
A general continuous-time magnetometer measurement can be expressed as
\[ \boxed{ \mathbf B_m(t) = h_B \left( \mathbf x(t),t \right) + \mathbf b_m(t) + \mathbf n_m(t) }. \]
For an attitude-dependent geomagnetic measurement,
\[ h_B = C_I^B(\mathbf q) \mathbf B_E^I(\mathbf r,t). \]
Therefore,
\[ \boxed{ \mathbf B_m(t) = C_I^B(\mathbf q(t)) \mathbf B_E^I(\mathbf r(t),t) + \mathbf b_m(t) + \mathbf n_m(t) }. \]
The dependence of \(C_I^B\) on attitude makes the magnetic-vector measurement nonlinear with respect to the attitude state.
4.1.3.29 Discrete-Time Magnetometer Model
At sampling instant
\[ t_k=kT_s, \]
the discrete measurement can be written as
\[ \boxed{ \mathbf B_{m,k} = C_I^B(\mathbf q_k) \mathbf B_{E,k}^{I} + \mathbf b_{m,k} + \mathbf v_{m,k} }. \]
If sensor bias is represented as a random walk,
\[ \boxed{ \mathbf b_{m,k+1} = \mathbf b_{m,k} + \mathbf w_{m,k} }. \]
This form is convenient for EKF and UKF measurement updates.
4.1.3.30 Normalized Magnetic-Vector Measurement
For attitude determination, it may be useful to use magnetic-field direction rather than absolute magnitude.
Define the normalized measurement as
\[ \hat{\mathbf B}_m = \frac{\mathbf B_m} {|\mathbf B_m|}. \]
Similarly,
\[ \hat{\mathbf B}_{ref} = \frac{\mathbf B_{ref}} {|\mathbf B_{ref}|}. \]
Attitude determination then compares
\[ \boxed{ \hat{\mathbf B}_m \leftrightarrow \hat{\mathbf B}_{ref} }. \]
Normalization can reduce sensitivity to some magnitude errors, but it does not remove directional errors produced by bias, soft-iron distortion, misalignment, or local magnetic interference.
4.1.3.31 Magnetometer Calibration Using Sphere / Ellipsoid Fitting
During calibration, the sensor or spacecraft is rotated through many orientations while the environmental field magnitude remains approximately constant.
Ideally,
\[ |\mathbf B_{\text{true}}| = B_0. \]
Ideal measurements form a sphere in three-dimensional measurement space.
Hard-iron bias shifts the sphere away from the origin, while soft-iron effects stretch and rotate the sphere into an ellipsoid.
An ellipsoid can be represented as
\[ \boxed{ (\mathbf B_m-\mathbf c)^T A (\mathbf B_m-\mathbf c) = 1 }. \]
The fitted centre \(\mathbf c\) provides information about hard-iron offset, while the matrix \(A\) contains information about scale and soft-iron distortion.
After calibration,
\[ \boxed{ \mathbf B_{cal} = K_{cal} (\mathbf B_m-\mathbf b_h) }. \]
Corrected measurements should approximately recover a sphere centred at the origin.
4.1.3.32 Pre-Flight and In-Orbit Calibration
Magnetometer calibration can be carried out before launch and refined after the spacecraft reaches orbit.
Pre-flight calibration can characterize
- sensor bias,
- scale-factor error,
- axis alignment,
- temperature dependence,
- known spacecraft magnetic sources.
In-orbit calibration can account for operating-state-dependent or configuration-dependent magnetic effects that are difficult to reproduce fully on the ground.
Calibration parameters can be represented as
\[ \mathbf p_{cal} = \{ \mathbf b_h, A_s, C_B^M, \mathbf k_T, \ldots \}. \]
The corrected measurement becomes
\[ \boxed{ \mathbf B_{\text{corrected}} = f_{cal} ( \mathbf B_{\text{raw}}, \mathbf p_{cal} ) }. \]
4.1.3.33 Example Magnetometer Measurement
Suppose the true body-frame magnetic field is
\[ \mathbf B_{\text{true}} = \begin{bmatrix} 22\\ -8\\ 35 \end{bmatrix} \mu\mathrm T. \]
Assume hard-iron bias
\[ \mathbf b_h = \begin{bmatrix} 1.5\\ -0.7\\ 0.9 \end{bmatrix} \mu\mathrm T \]
and one noise realization
\[ \mathbf n_m = \begin{bmatrix} 0.1\\ -0.1\\ 0.05 \end{bmatrix} \mu\mathrm T. \]
Ignoring soft-iron and scale-factor effects,
\[ \mathbf B_m = \mathbf B_{\text{true}} + \mathbf b_h + \mathbf n_m. \]
Therefore,
\[ \boxed{ \mathbf B_m = \begin{bmatrix} 23.6\\ -8.8\\ 35.95 \end{bmatrix} \mu\mathrm T }. \]
The measured field therefore differs from the ideal field in both magnitude and direction.
4.1.3.34 Effect of Magnetic Bias on Direction
Magnetic bias does not simply alter the field magnitude.
The true field direction is
\[ \hat{\mathbf B}_{true} = \frac{\mathbf B_{\text{true}}} {|\mathbf B_{\text{true}}|}. \]
The measured direction is
\[ \hat{\mathbf B}_m = \frac{\mathbf B_m} {|\mathbf B_m|}. \]
In general,
\[ \boxed{ \hat{\mathbf B}_m \neq \hat{\mathbf B}_{true} }. \]
Because attitude estimation uses field direction, even moderate bias can produce a significant attitude error.
4.1.3.35 Magnetometer as an Attitude Measurement
Suppose a geomagnetic model provides the reference field
\[ \mathbf B^I_{ref}. \]
The predicted body-frame field for attitude \(C_I^B\) is
\[ \boxed{ \mathbf B^B_{pred} = C_I^B \mathbf B^I_{ref} }. \]
The actual magnetometer supplies
\[ \mathbf B^B_m. \]
The measurement residual is
\[ \boxed{ \mathbf y_B = \mathbf B_m^B - \mathbf B_{pred}^B }. \]
This residual may contain attitude error, sensor calibration error, geomagnetic-model error, measurement noise, and local spacecraft magnetic disturbances.
4.1.3.36 Why One Magnetic Vector Cannot Determine Full Attitude
A single vector observation does not uniquely determine complete three-axis spacecraft attitude.
Even if the predicted and measured magnetic vectors are aligned, the spacecraft can still rotate about that vector without changing the observation.
Thus one vector leaves one rotational degree of freedom unresolved.
Conceptually,
\[ \boxed{ \text{One Reference Vector} \Rightarrow \text{Partial Instantaneous Attitude Information} }. \]
A second non-collinear reference vector can remove this ambiguity.
For example,
\[ \boxed{\text{Magnetometer}} + \boxed{\text{Sun Sensor}} \rightarrow \boxed{\text{3-Axis Attitude Determination}}. \]
4.1.3.37 Magnetometer + Sun Sensor
A common low-cost spacecraft attitude architecture combines the geomagnetic-field vector with the Sun vector.
The reference vectors are
\[ \mathbf B^I \qquad\text{and}\qquad \mathbf s^I. \]
Their body-frame measurements are
\[ \mathbf B^B \qquad\text{and}\qquad \mathbf s^B. \]
Therefore,
\[ \boxed{ \mathbf B^B = C_I^B \mathbf B^I } \]
and
\[ \boxed{ \mathbf s^B = C_I^B \mathbf s^I }. \]
If the two vectors are not collinear, they can provide sufficient geometric information for a full three-axis attitude solution.
4.1.3.38 TRIAD Connection
Given two non-collinear reference vectors
\[ \mathbf r_1,\mathbf r_2 \]
and corresponding body vectors
\[ \mathbf b_1,\mathbf b_2, \]
the TRIAD algorithm constructs orthogonal reference triads.
For the reference frame,
\[ \mathbf t_1 = \frac{\mathbf r_1}{|\mathbf r_1|} \]
\[ \mathbf t_2 = \frac{ \mathbf r_1\times\mathbf r_2 }{ |\mathbf r_1\times\mathbf r_2| } \]
\[ \mathbf t_3 = \mathbf t_1\times\mathbf t_2. \]
The same construction is performed in the body frame, and the two triads are compared to obtain the attitude DCM.
4.1.3.39 Magnetometer → EKF Attitude Update
In an Extended Kalman Filter, a magnetometer measurement model may be written as
\[ \boxed{ \mathbf z_B = C_I^B(\mathbf q) \mathbf B_E^I(\mathbf r,t) + \mathbf v_B }. \]
The predicted measurement is
\[ \hat{\mathbf z}_B = C_I^B(\hat{\mathbf q}) \mathbf B_E^I. \]
The innovation becomes
\[ \boxed{ \mathbf y_B = \mathbf z_B-\hat{\mathbf z}_B }. \]
For a small attitude error \(\delta\boldsymbol{\theta}\),
\[ \delta\mathbf B \approx \pm [\mathbf B^B\times] \delta\boldsymbol{\theta}. \]
The sign depends on the chosen attitude-error convention.
The measurement Jacobian therefore contains a block related to
\[ [\mathbf B^B\times]. \]
The EKF can then use the magnetic-vector residual to correct attitude drift from gyro propagation.
4.1.3.40 Magnetometer + Gyroscope EKF Architecture
Gyroscope
|
v
Angular Rate
|
v
Quaternion Propagation
|
v
Predicted Attitude
|
+-------------------------------+
|
Geomagnetic Model |
| |
v |
Reference Magnetic Field |
| |
v v
Predicted Body Magnetic Field Magnetometer
| |
+-----------+------------+
|
v
Innovation
|
v
EKF
|
v
Attitude Correction
The gyroscope provides high-rate attitude propagation while the magnetometer provides an environmental reference that limits long-term drift.
4.1.3.41 B-Dot Detumbling
Magnetometers are central to magnetic detumbling.
When the spacecraft rotates, the geomagnetic-field vector expressed in body coordinates changes with time:
\[ \dot{\mathbf B}^B. \]
A common B-dot control law commands a magnetic dipole approximately opposite to the measured field-rate vector:
\[ \boxed{ \mathbf m_c = -k_B \dot{\mathbf B}^B }. \]
The magnetorquer produces torque
\[ \boxed{ \boldsymbol{\tau} = \mathbf m_c \times \mathbf B }. \]
The control chain is
\[ \boxed{\text{Magnetometer}} \rightarrow \boxed{\dot{\mathbf B}} \rightarrow \boxed{\text{B-Dot Controller}} \rightarrow \boxed{\mathbf m_c} \rightarrow \boxed{\text{Magnetorquer}} \rightarrow \boxed{\text{Detumbling}}. \]
4.1.3.42 Discrete B-Dot Estimation
In a discrete implementation, the magnetic-field derivative can be approximated as
\[ \boxed{ \dot{\mathbf B}_k \approx \frac{ \mathbf B_k-\mathbf B_{k-1} }{ T_s } }. \]
Direct finite differencing amplifies measurement noise.
Practical implementations may therefore use
- low-pass filtering,
- moving averages,
- filtered differentiation,
- observer-based derivative estimation.
Magnetometer noise therefore directly influences magnetic-control performance.
4.1.3.43 Magnetometer-Based Wheel Desaturation
Magnetorquers can also be used to remove accumulated angular momentum from reaction wheels.
Let the wheel momentum be
\[ \mathbf h_w. \]
Magnetic torque is generated according to
\[ \boldsymbol{\tau}_m = \mathbf m \times \mathbf B. \]
The magnetometer provides the field vector needed to determine the magnetic dipole command.
Since
\[ \boldsymbol{\tau}_m \perp \mathbf B, \]
magnetic actuation cannot produce arbitrary instantaneous torque. The changing geomagnetic-field direction along the orbit provides additional control authority over time.
4.1.3.44 Magnetic Torque Geometry
The magnitude of magnetorquer torque is
\[ \boxed{ |\boldsymbol{\tau}| = |\mathbf m| |\mathbf B| \sin\alpha }. \]
where \(\alpha\) is the angle between the commanded magnetic dipole and the ambient magnetic-field vector.
Maximum torque occurs when
\[ \alpha=90^\circ. \]
Zero torque occurs when
\[ \mathbf m \parallel \mathbf B. \]
Thus magnetometer measurements are important not only for attitude sensing but also for determining magnetic actuator effectiveness.
4.1.3.45 Spacecraft Magnetic Cleanliness
A magnetic-cleanliness program seeks to minimize onboard magnetic fields that contaminate environmental measurements.
Important considerations include
- material selection,
- current-loop area,
- cable routing,
- grounding,
- motor location,
- magnetorquer placement,
- reaction-wheel disturbances,
- permanent magnet content,
- boom placement,
- subsystem operating states,
- calibration strategy.
A desirable condition is
\[ \boxed{ |\mathbf B_{\text{spacecraft}}| \ll |\mathbf B_{\text{environment}}| } \]
at the magnetometer location whenever accurate environmental-field measurement is required.
4.1.3.46 Bandwidth, Sampling and Latency
Magnetometers operate at finite sample rates and bandwidths.
For sample interval \(T_s\),
\[ t_k=kT_s \]
and
\[ \boxed{ f_s = \frac{1}{T_s} }. \]
A representative signal chain is
\[ \boxed{\text{Magnetic Sensor}} \rightarrow \boxed{\text{Analog Conditioning}} \rightarrow \boxed{\text{ADC}} \rightarrow \boxed{\text{Digital Filter}} \rightarrow \boxed{\text{Measurement}}. \]
Finite bandwidth affects how rapidly spacecraft motion and magnetic disturbances can be observed.
Latency is particularly relevant for B-dot control because excessive phase delay in \(\dot{\mathbf B}\) estimation can reduce control performance.
4.1.3.47 Simulink Magnetometer Model
A realistic Simulink model should reproduce the complete chain from spacecraft position and attitude to the digital measurement supplied to the estimator and controller.
Spacecraft Position + Time
|
v
Geomagnetic Field Model
|
v
Reference Magnetic Vector
|
v
Inertial / ECEF -> Body Frame
|
v
Body -> Magnetometer Frame
|
v
Soft-Iron / Scale-Factor Matrix
|
v
SUM <----- Hard-Iron Bias
^ <----- Sensor Bias
^ <----- Spacecraft Magnetic Field
^ <----- Magnetorquer Interference
^ <----- White Noise
|
v
Saturation
|
v
Quantisation
|
v
Sampling / Delay
|
v
Measured Magnetic Field
|
+----> Attitude EKF
|
+----> B-Dot Controller
Recommended Simulink Blocks
- MATLAB Function or geomagnetic-field model block,
- DCM or quaternion transformation block,
- Matrix Gain for calibration effects,
- Sum blocks for biases and disturbances,
- Random Number or Band-Limited White Noise block,
- Saturation block,
- Quantizer block,
- Zero-Order Hold,
- Discrete Delay,
- Enable / Switch logic for magnetorquer blanking,
- To Workspace blocks for logging.
4.1.3.48 Magnetorquer Blanking in Simulink
A high-fidelity spacecraft model should explicitly represent periods when the magnetometer measurement is invalid because of magnetic actuation.
For example,
\[ u_{\text{MTQ}}=1 \]
may indicate an active magnetorquer.
During that interval,
\[ valid_{\text{mag}}=0. \]
After the torquer switches off and the required settling time has elapsed,
\[ valid_{\text{mag}}=1. \]
MTQ Command
|
+---- ON ----> Magnetometer Invalid
|
+---- OFF ---> Settling Timer
|
v
Measurement Valid
The estimator can then use the validity signal to accept or reject the measurement.
4.1.3.49 Reading a Magnetometer Datasheet
A spacecraft magnetometer datasheet should be examined from both a sensing-performance and spacecraft-integration perspective.
| Specification | Meaning / GNC Relevance |
|---|---|
| Measurement range | Maximum measurable magnetic-field magnitude |
| Sensitivity | Change in output for a given change in field |
| Resolution | Smallest distinguishable field increment |
| Noise density | Random magnetic-field noise per square root bandwidth |
| Bias / zero-field offset | Output offset when the ideal field input is zero |
| Offset stability | Change in bias with time or environment |
| Scale-factor error | Sensitivity error |
| Scale-factor stability | Variation of sensitivity with time or temperature |
| Nonlinearity | Departure from linear input-output response |
| Axis orthogonality | Accuracy of three-axis geometry |
| Cross-axis sensitivity | Response to field along orthogonal axes |
| Bandwidth | Frequency range of useful measurement response |
| Sample rate | Measurement-output frequency |
| Latency | Measurement delay |
| Temperature coefficient | Bias or sensitivity variation with temperature |
| Power consumption | Spacecraft electrical resource requirement |
| Supply voltage | Electrical interface requirement |
| Mass and dimensions | Mechanical integration constraints |
| Radiation tolerance | Suitability for expected radiation environment |
| Magnetic hysteresis | History-dependent field-response behaviour |
| Interface | Digital or analogue communication interface |
| Calibration requirements | Required pre-flight and in-orbit compensation |
| Vibration qualification | Suitability for launch environment |
| Space heritage | Previous operational use in relevant missions |
It is important to distinguish
\[ \boxed{\text{Resolution}} \qquad\text{from}\qquad \boxed{\text{Accuracy}}. \]
A sensor can provide fine digital resolution while still exhibiting significant calibration error or magnetic contamination.
4.1.3.50 Fluxgate vs Magnetoresistive vs Hall Sensors
| Characteristic | Hall | Magnetoresistive | Fluxgate |
|---|---|---|---|
| Principle | Hall effect | Resistance change | Driven magnetic core |
| Size | Small | Small | Usually larger |
| Power | Low | Low | Moderate |
| Cost | Low | Low to moderate | Higher |
| Sensitivity | Moderate | Good | High |
| Bias stability | Moderate | Good, technology dependent | Very good |
| Low-frequency precision | Limited to moderate | Good | Excellent |
| Typical use | General field sensing | Compact spacecraft sensing | Precision magnetic measurements |
Technology selection depends on accuracy, mass, power, volume, thermal stability, radiation environment, mission duration, noise requirements, and spacecraft magnetic cleanliness.
4.1.3.51 Spacecraft Applications
Magnetometers support several major spacecraft functions.
- coarse three-axis attitude determination,
- safe-mode attitude sensing,
- B-dot detumbling,
- magnetorquer control,
- reaction-wheel desaturation,
- attitude EKF updates,
- geomagnetic-field monitoring,
- magnetic-cleanliness assessment,
- science measurements on selected missions,
- fault monitoring and redundancy management.
For small satellites, magnetometers are particularly attractive because they can be compact and low power while providing useful environmental attitude-reference information.
Their achievable attitude accuracy is nevertheless limited by sensor errors, field-model uncertainty, spacecraft contamination, and vector geometry.
4.1.3.52 Magnetometer Error Budget
A useful engineering decomposition of the total magnetic-vector error is
\[ \boxed{ \delta\mathbf B = \delta\mathbf B_{\text{bias}} + \delta\mathbf B_{\text{scale}} + \delta\mathbf B_{\text{misalign}} + \delta\mathbf B_{\text{soft}} + \delta\mathbf B_{\text{noise}} + \delta\mathbf B_{\text{quant}} + \delta\mathbf B_{\text{thermal}} + \delta\mathbf B_{\text{spacecraft}} + \delta\mathbf B_{\text{model}} }. \]
The last term,
\[ \delta\mathbf B_{\text{model}}, \]
is not a sensor error. It represents uncertainty in the predicted environmental field.
This distinction becomes important when assigning measurement covariance in a navigation or attitude filter.
4.1.3.53 Geomagnetic Model Error
The predicted geomagnetic field is not exact.
The true field can be written as
\[ \mathbf B_E^{true} = \mathbf B_E^{model} + \delta\mathbf B_E. \]
The measurement residual therefore becomes
\[ \mathbf y = \mathbf B_m - C_I^B \mathbf B_E^{model}. \]
This residual can contain contributions from
- magnetometer noise,
- sensor calibration error,
- spacecraft magnetic contamination,
- attitude error,
- orbital-position error,
- geomagnetic-model error.
Thus the EKF measurement covariance should represent the effective uncertainty of the complete magnetic observation rather than only the sensor's electronic noise.
4.1.3.54 Effect of Position Error on Magnetic Prediction
Because the geomagnetic field varies with spacecraft position,
\[ \mathbf B_E = \mathbf B_E(\mathbf r,t), \]
an error in spacecraft position can produce an error in the predicted reference field.
For a small position error \(\delta\mathbf r\),
\[ \boxed{ \delta\mathbf B_E \approx \frac{\partial\mathbf B_E} {\partial\mathbf r} \delta\mathbf r }. \]
Therefore, magnetic attitude determination can be coupled to navigation accuracy, especially when high attitude accuracy is required.
4.1.3.55 Magnetic-Vector Geometry and Observability
The usefulness of a magnetic-field measurement depends on its geometry.
As the spacecraft travels along its orbit, the magnetic-field direction changes. This provides varying vector geometry and can improve observability over time.
For a magnetometer and sun-sensor pair, the separation of the two reference vectors can be characterized by
\[ |\mathbf B\times\mathbf s|. \]
If
\[ |\mathbf B\times\mathbf s| \rightarrow 0, \]
the vectors become nearly collinear and the three-axis attitude solution becomes poorly conditioned.
4.1.3.56 Magnetometer Calibration Matrix
Multiple deterministic errors can be collected into a single calibration matrix.
Let
\[ \boxed{ \mathbf B_{\text{raw}} = K_m \mathbf B_{\text{true}} + \mathbf b_m }. \]
where \(K_m\) contains scale-factor, non-orthogonality, and soft-iron effects.
The calibrated field is
\[ \boxed{ \mathbf B_{\text{cal}} = K_m^{-1} \left( \mathbf B_{\text{raw}} - \mathbf b_m \right) }. \]
If sensor mounting alignment must also be corrected,
\[ \boxed{ \mathbf B^B = C_M^B K_m^{-1} \left( \mathbf B_{\text{raw}} - \mathbf b_m \right) }. \]
This calibrated body-frame vector is then supplied to the attitude estimator or magnetic-control algorithm.
4.1.3.57 Measurement Validity Logic
Not every magnetometer sample should automatically be accepted by the estimator.
A measurement validity flag can consider
- magnetorquer inactive,
- sensor health valid,
- sensor not saturated,
- field magnitude within expected limits,
- no major current-switching event,
- valid calibration coefficients,
- valid measurement timestamp.
A simple magnitude gate is
\[ B_{min} < |\mathbf B_m| < B_{max}. \]
If the condition is not satisfied,
\[ valid_B=0. \]
The filter can then reject or down-weight the measurement.
4.1.3.58 Fault Detection Using Magnetic Magnitude
The geomagnetic model predicts an approximate field magnitude
\[ B_{pred} = |\mathbf B_{pred}|. \]
The measured magnitude is
\[ B_m = |\mathbf B_m|. \]
Define the magnitude residual
\[ \boxed{ e_B = B_m-B_{pred} }. \]
If
\[ |e_B| > e_{\text{threshold}}, \]
the measurement can be flagged as suspect.
This can help identify saturation, strong local magnetic interference, sensor faults, or major calibration errors.
4.1.3.59 Magnetometer Redundancy
Spacecraft may carry redundant magnetometers or redundant measurement channels.
Two measurements can be compared using
\[ \Delta\mathbf B = \mathbf B_{m,1} - \mathbf B_{m,2}. \]
If
\[ |\Delta\mathbf B| \]
exceeds a defined threshold, fault-detection logic can identify an inconsistency.
Physical separation between redundant sensors may also allow one sensor to experience less spacecraft magnetic contamination than another.
4.1.3.60 Magnetometer → Attitude → Magnetic Control
The complete magnetometer GNC chain begins with spacecraft position and time.
\[ \boxed{\text{Spacecraft Position + Time}} \]
\[ \downarrow \]
\[ \boxed{\text{Geomagnetic Model}} \]
\[ \downarrow \]
\[ \boxed{\mathbf B_{ref}} \]
while the physical measurement path is
\[ \boxed{\text{Earth Magnetic Field}} \]
\[ \downarrow \]
\[ \boxed{\text{Spacecraft + Sensor Magnetic Disturbances}} \]
\[ \downarrow \]
\[ \boxed{\text{Magnetometer}} \]
\[ \downarrow \]
\[ \boxed{\mathbf B_m}. \]
The attitude-estimation path then becomes
\[ \boxed{ \mathbf B_m + \mathbf B_{ref} + \text{Gyroscope / Sun Sensor} } \rightarrow \boxed{\text{Attitude Determination / EKF}} \rightarrow \boxed{\hat{\mathbf q}}. \]
For magnetic control,
\[ \boxed{\mathbf B_m} \rightarrow \boxed{\text{B-Dot / Momentum Management}} \rightarrow \boxed{\mathbf m_c} \rightarrow \boxed{\text{Magnetorquer}} \rightarrow \boxed{\boldsymbol{\tau}}. \]
The magnetometer is therefore involved in both state estimation and actuator-control geometry.
4.1.3.61 Magnetometer → Sensor Fusion
Magnetometers are often combined with gyroscopes and other absolute attitude-reference sensors.
A representative architecture is
\[ \boxed{ \text{Gyroscope} + \text{Magnetometer} + \text{Sun Sensor / Star Tracker} } \rightarrow \boxed{\text{EKF / MEKF / UKF}} \rightarrow \boxed{\text{Attitude + Bias Estimate}}. \]
The gyroscope provides high-rate attitude propagation.
The magnetometer provides an absolute environmental vector that can help prevent unlimited drift in the propagated attitude solution.
Other attitude sensors provide additional reference information during periods when magnetic measurements are disturbed, blanked, noisy, or geometrically weak.
The complete sensor-estimation chain can therefore be summarized as
\[ \boxed{\text{Geomagnetic Environment}} \rightarrow \boxed{\text{Magnetometer Physics}} \rightarrow \boxed{\text{Calibration + Error Model}} \rightarrow \boxed{\mathbf B_m} \rightarrow \boxed{\text{Vector Attitude Measurement}} \rightarrow \boxed{\text{Sensor Fusion}} \rightarrow \boxed{\text{Attitude Estimate}}. \]
In parallel, the same measured magnetic vector supports magnetic control:
\[ \boxed{\mathbf B_m} \rightarrow \boxed{\text{Magnetic Control Law}} \rightarrow \boxed{\text{Magnetorquer}} \rightarrow \boxed{\text{Spacecraft Torque}}. \]