Skip to content

Gyro-free AHRS: theoretical limits and observability of accelerometer–magnetometer fusion

Published: 20 min read16 references

A gyro-free attitude and heading reference system (AHRS) infers attitude from gravity and the local magnetic field only. This note derives how Wahba-solver covariance depends on the angle between the two vectors, shows by observability analysis why linear acceleration cannot be separated from gravity, and collects the results in an error budget. It closes with a validation method separating static from dynamic accuracy.

Measurement models

The reference frame is local North–East–Down (NED). The attitude matrix A ∈ SO(3) maps reference-frame vectors into the body frame. An accelerometer senses specific force, not acceleration:

fb = A(an − gn) + βa + νa,    gn = [0 0 g]T(1)

with kinematic acceleration an, bias βa and noise νa; at rest the sensor reads 1 g pointing up. The magnetometer sees the local field plus sensor-fixed disturbances:

mb = Amn + db + νm,    mn = F[cos I cos D   cos I sin D   sin I]T(2)

F is total intensity, I the inclination (dip, from the horizontal, positive down) and D the declination; at the surface F spans roughly 23 000–67 000 nT [15]. Only directions matter, hence unit vectors: b1 = −fb/‖fb‖ and b2 = mb/‖mb‖ in the body, r1 = [0 0 1]T and r2 = mn/F in the reference frame. Ideally Ari = bi.

Since r1·r2 = sin I, the angle between the vectors is θ = 90° − |I| and sin θ = cos I; as I → 90° they become collinear. A single unit vector carries two independent scalars: any rotation about b1 composed with a valid A still satisfies Ar1 = b1 [3]. With gravity alone that rotation is about the vertical, so heading (yaw) is never observable from an accelerometer.

North g direction (r₁) m direction (r₂) H = F·cos I I θ weak axis θ = 90° − I, sin θ = cos I as I → 90°, g ∥ m smallest eigenvalue of the information matrix ∝ 1 − sin I
Figure 1. Reference vectors in the north–down plane (drawn to scale for I = 60°). With equal weights, rotation about the bisector carries the least information; as I grows that direction tilts towards the vertical, i.e. the heading axis.

Static solution: Wahba, TRIAD, q-method and QUEST

In 1965 Wahba posed the problem of finding the proper orthogonal matrix that minimises the weighted squared error between measured and reference unit vectors [1]. With inverse-variance weights the problem becomes a maximum-likelihood estimate [4]:

L(A) = ½ ∑i ai ‖bi − Ari‖² = ∑i ai − tr(ABT),    B = ∑i aibiriT,   ai = σi−2(3)

The second form follows from expanding the square for unit vectors and the cyclic trace property. With the SVD B = UΣVT, Aopt = U diag[1, 1, det U det V] VT. Davenport's q-method yields the same optimum as the eigenvector of the 4×4 matrix K with the largest eigenvalue; QUEST obtains that eigenvalue by Newton–Raphson iteration on the characteristic equation [2][4]. With two observations the characteristic equation becomes quadratic [4]:

λmax² = a1² + a2² + 2a1a2[(b1·b2)(r1·r2) + ‖b1×b2‖ ‖r1×r2‖](4)

Markley and Mortari report that the λmax iteration of QUEST and ESOQ can fail when accuracies differ widely: with 1 arcsecond and 1° sensors, roll errors reached 180° [4]. Accelerometer and magnetometer accuracies also differ; (4) removes the iteration.

TRIAD and the gravity anchor

TRIAD builds an orthogonal triad from each vector pair and maps one onto the other; anchored on the first vector [3]:

AT1 = b1r1T + b3r3T + (b1×b3)(r1×r3)T,    b3 = b1×b2‖b1×b2‖(5)

r3 is built the same way from the reference vectors. AT1r1 = b1 holds exactly, and the second measurement absorbs all the error; b3 is undefined for parallel vectors. Markley shows that the two-observation Wahba solution tends to AT1 as a2 → 0 and to symmetric TRIAD for equal weights [3].

Anchoring on gravity confines the magnetometer to heading. The tilt-compensated eCompass takes roll and pitch from the accelerometer and heading from the de-rotated horizontal field [5]. Valenti et al. write q = qacc ⊗ qmag; the magnetic factor rotates only about the vertical, so magnetic disturbances affect heading only [6]. Madgwick recomputes the reference field as [bx 0 bz] with the measured inclination, which compensates the vertical-plane (inclination) part of a disturbance and leaves the horizontal part in heading [7].

The price follows from (7)–(8). In the static two-vector model the magnetometer adds tilt information only about the east axis, normal to both vectors, independently of I; about north Pxx = σ1², since there the magnetic measurement is used up fixing heading, and the anchored solution has the same Pzz (derived). Madgwick, at 65–70° inclination, expects the larger vertical component to aid pitch and roll [7]; statically the gain is only east-axis, 0.10° to 0.096° with the Table 1 values. Anchoring gives it up but shields tilt from magnetic disturbances. In Markley's Sun-sensor/magnetometer scenario, symmetric estimators do worse because they let magnetometer errors corrupt the axes fixed by the accurate sensor [3].

Attitude covariance and its angle dependence

Alongside QUEST, Shuster gave the covariance of the body-frame rotation-error vector [2]; in Markley and Mortari's notation [4]:

P = [∑i ai(I3 − bibiT)]−1(6)

P is a body-frame quantity independent of attitude, so take the body momentarily aligned with NED: b1 = ez, b2 = cos I ex + sin I ez. Let σ1, σ2 be the per-axis angular noise (rad) of the gravity and magnetic directions.

Step 1. I3 − b1b1T = diag(1, 1, 0). The non-zero entries of I3 − b2b2T are (1,1) = sin²I, (2,2) = 1, (3,3) = cos²I, (1,3) = (3,1) = −sin I cos I.

Step 2. The east axis, normal to both vectors, decouples: σy² = σ1²σ2²/(σ1² + σ2²).

Step 3. The north–down block and its determinant (the σ2−4 terms cancel):

M = [ σ1−2 + σ2−2sin²I   −σ2−2sin I cos I ;   −σ2−2sin I cos I   σ2−2cos²I ],    det M = σ1−2σ2−2cos²I(7)

Step 4. Inverting:

Pxx = σ1²,    Pxz = σ1² tan I,    Pzz = σ2² + σ1² sin²Icos²I(8)

Pzz is the heading variance. σ2/cos I is magnetic direction noise over the horizontal field fraction (H/F = cos I); σ1 tan I is tilt error leaking into heading through the Pxz correlation. These match two independently derived eCompass rules: residual magnetic offset over horizontal field, and tilt error times tan I [5]. The 2×2 block has trace (σ1² + σ2²)/cos²I, so for large I the worst axis has σmax ≈ √(σ1² + σ2²)/sin θ. With equal weights the information matrix has eigenvalues 2 and 1 ± sin I, giving a condition number κ = 2/(1 − sin I) (derived).

Numerical magnitudes

Per AN4249, the MMA8451's 126 μg/√Hz gives 1.78 mg RMS at 400 Hz output rate, and the MAG3110 gives 0.25 μT RMS per axis at 10 Hz [5]. Hence σ1 ≈ 1.78 mrad = 0.10° and, for F = 50 μT, σ2 ≈ 5 mrad = 0.29°. Table 1 gives single-sample values; averaging reduces noise, not bias.

Table 1. Heading uncertainty versus inclination (σ1 = 0.10°, σ2 = 0.29°, constant F = 50 μT; derived)
I (°)H (μT)σheading (°)κ
050.00.292.0
3043.30.344.0
4535.40.426.8
6025.00.6014.9
7017.10.8833.2
808.71.75131.6
854.43.49525.6

Tilt uncertainty (σx ≈ σy ≈ 0.10°) stays flat; heading takes nearly all the degradation. The WMM defines blackout zones (horizontal intensity below 2000 nT) and caution zones (below 6000 nT): compasses cannot be trusted in the former and become increasingly unreliable in the latter [15].

0 1 2 3 4 0 30 60 90 magnetic inclination I (°) σ (°) H < 6 μT total heading uncertainty, eq. (8) tilt leakage term only, σ₁·tan I
Figure 2. Heading uncertainty under the Table 1 assumptions. The dashed curve is the share of accelerometer tilt error leaking into heading; the vertical line marks H = 6 μT for F = 50 μT.

Observability analysis

Static case: Jacobian rank

With a small body-frame error angle δθ, A = (I3 − [δθ×])Â gives bi ≈ b̂i + b̂i × δθ, so the Jacobian is Hi = [bi×]. Since [b×]T[b×] = I3 − bbT for a unit vector, the weighted HTWH is exactly the inverse of (6): the QUEST covariance is the inverse Fisher information.

H = [ [b1×] ; [b2×] ],    rank H = 3 ⇔ b1 × b2 ≠ 0(9)

With gravity alone the rank is 2, null space along b1; with two vectors it is 3, but the smallest singular value shrinks as (1 − sin I)1/2; that value, not the binary rank, is what matters.

Dynamic case: Lie derivatives and indistinguishable trajectories

Local weak observability of a nonlinear system is tested by the rank of the Jacobian of the output and its successive Lie derivatives [8]. Wang, Gamagedara and Lee show this way that body-frame angular velocity plus one inertially fixed direction leaves attitude not fully observable [9]. Without a gyroscope, angular velocity is a state. From Ȧ = −[ω×]A, fixed reference vectors give ḃi = −ω × bi.

Case 1: zero-acceleration model. State (A, ω), output h = (b1, b2), first Lie derivative Lfh = (−ω×b1, −ω×b2). The Jacobian of [h; Lfh] is block lower-triangular with H from (9) in both diagonal blocks, so the rank is 6 whenever b1 ∦ b2. Angular velocity thus comes from vector derivatives. A finite difference with interval T and direction noise σd gives

σω ≈ √2 σd/T(10)

For σd = 0.2° and T = 10 ms this is 28°/s (derived), usable only after heavy filtering, i.e. with lag. Magnis and Petit's observer avoids differentiation but assumes known inertia and torque and two constant, linearly independent reference vectors [10]: reasonable for a spacecraft, rarely for vehicles under unknown forces.

Case 2: unknown acceleration. Let Q be a constant rotation by φ about mn in the reference frame:

A′ = AQT,    a′n = Q(an − gn) + gn(11)

Because QTmn = mn, A′mn = Amn; also A′(a′n − gn) = A(an − gn), and since Q is constant the angular velocity is unchanged. The two trajectories give identical outputs at all times, so no Lie derivative separates them: rotation about the local field is unobservable. At rest the required “fake” acceleration is ‖(Q − I)gn‖ = 2g sin(φ/2) cos I ≈ gφ cos I; at I = 60°, 0.086 m/s² hides a 1° error (derived). A zero-mean Gauss–Markov acceleration model restores observability only statistically, with accuracy set by the model. Velocity or position aiding (e.g. GNSS) makes an observable.

From specific-force ambiguity to attitude error

In a gravity-anchored solution the estimated down direction is −f/‖f‖. For an = [ah 0 av]T, (1) gives −fn ∝ [−ah 0 g − av]T, hence

ε = atan ahg − av(12)

Horizontal accelerations of 0.5, 1 and 2 m/s² give tilt errors of 2.9°, 5.8° and 11.5° (derived); in free fall the direction is undefined. AN4249 derives that roll and pitch errors Δφ, Δθ give a sinusoidal heading error of amplitude

Δψmax = √((Δφ tan I)² + (Δθ tan I)²)(13)

with the small-angle approximation failing near the magnetic poles [5]. At I = 60°, 1 m/s² of horizontal acceleration yields 5.8° of tilt and up to 10° of heading error (derived). In a turn the centripetal acceleration is vω: 20 m/s at 0.1 rad/s gives 2 m/s² and 11.5° of tilt error for the whole turn. In an aircraft's coordinated turn, specific force aligns with the body vertical and the accelerometer reports level flight whatever the bank angle; averaging cannot remove this.

The common magnitude test is weak. Valenti et al. scale filter gain by em = |‖f‖ − g|/g [6]. With horizontal acceleration ‖f‖ = √(g² + ah²), so

em ≈ ½ (ah/g)² ≈ ½ ε²(14)

A 5.8° tilt error gives an em of only 0.5% (derived), at scale-factor-error and noise level: the test catches shocks, not sustained errors of a few degrees.

Gyro-free dynamic estimation

Complementary filters and EKF with a motion model

The SO(3) complementary filters of Mahony, Hamel and Pflimlin and Madgwick's gradient-descent filter take high frequencies from the gyroscope and low-frequency corrections from vector observations [11][7]. Without a gyroscope the prediction is only a process model and the filter becomes a low-pass Wahba solution. For a first-order filter with time constant τ and T ≪ τ:

σout/σin ≈ √(T/2τ),    elag = ωτ(15)

With T = 10 ms and τ = 0.5 s, noise drops tenfold but a 30°/s turn lags by 15°. A pulse of duration Δt passes at roughly (1 − e−Δt/τ): a 0.2 s pulse of 2 m/s² leaves about 3.8° instead of 11.5° (derived). Separation is by frequency alone and fails when spectra overlap. An EKF or multiplicative EKF (MEKF) changes nothing; its process noises play the role of τ. Gain adaptation on em helps with pulses but, by (14), not with sustained centripetal acceleration.

Accelerometer-array gyro-free IMUs

Angular motion can also come from spatial differences across an accelerometer array. A sensor at ρi with axis ui reads

fi = uiT[f0 + α × ρi + ω × (ω × ρi)](16)

Chen, Lee and DeBra place six single-axis accelerometers on the faces of a cube along the face diagonals; angular acceleration is a linear combination of the readings, linear acceleration also needs angular-velocity correction terms, and angular velocity comes from numerical integration [12][13]. Larger arrays also use the terms quadratic in ω; these give only |ω|, the sign comes from integration, and noise can cause sign misjudgment [14].

A bias δb in the difference of a pair with baseline L gives δα ≈ δb/L; the rate error grows as δα·t and the angle error as ½δα·t². For δb = 1 mg and L = 5 cm: 11°/s and 5.6° after 1 s, divergence by 10 s (derived). Sanjuan et al. show uncorrected position uncertainty growing as t4 to t5 depending on accelerometer type [13]. The array can be blended with the Wahba solution, but its common mode is still specific force, so (11) remains.

Error sources and error budget

Accelerometer bias. Tilt error ≈ bias/g in radians [5]; 1 mg ≈ 0.057°. AN4249 quotes an MMA8451 zero-g offset of ±20 mg before and ±30 mg after board mounting (soldering stress) and a typical ±0.15 mg/°C over −40 to 85 °C [5]. Uncalibrated, 30 mg is 1.7° of tilt; 9 mg of drift over 60 °C is 0.5° (derived).

Magnetic disturbances. Residual hard-iron error gives a heading error with one cycle per turn and an amplitude of residual offset over horizontal field; residual soft-iron error gives two cycles per turn. In AN4249's example, 3° accuracy at a 10 μT horizontal field requires a field error below 0.5 μT [5]. Per Madgwick, horizontal-plane disturbances cannot be corrected without another heading reference [7].

Reference field and synchronisation. r2 is itself an estimate: at 2025.0 the global RMS error of WMM2025 is 0.18° in inclination and 0.36° in declination, dominated by crustal-field omission [15]. An inter-sensor delay δt causes ωδt of misalignment during rotation; Madgwick flags a 10 Hz magnetometer versus 30 Hz accelerometer bandwidth for this reason [7].

Table 2. Example error budget: gravity-anchored solution, I = 60°, F = 50 μT (H = 25 μT). A: assumption, D: derived.
SourceValueTilt error (°)Heading error (°)Basis
Accelerometer residual bias after calibration2 mg0.11≤ 0.20A; (13)
Accelerometer temperature drift (0.15 mg/°C × 40 °C)6 mg0.34≤ 0.60[5]; D
Accelerometer noise, 10-sample average0.56 mg0.03≤ 0.06[5]; D
Magnetometer noise (10 Hz)0.25 μT—0.57[5]; D
Residual hard-iron error0.5 μT—1.15A; [5]
Reference model declination error (WMM2025)0.36°—0.36[15]
Inter-sensor axis misalignment1 mrad0.06≤ 0.10A; D
Static total (RSS)0.371.48D
Horizontal linear acceleration1 m/s²5.8≤ 10.1(12), (13); D
Coordinated turn (20 m/s, 0.1 rad/s)2 m/s²11.5≤ 20.0(12), (13); D

Residual hard iron dominates the static heading budget, followed by accelerometer temperature drift and magnetometer noise; accelerometer terms reach heading amplified by tan I. The dynamic terms exceed the static total by an order of magnitude; static calibration does not improve them. RSS assumes independence; systematic biases may add linearly.

Validation methodology

Precision positioners and rate tables. Used for multi-position static tests and known-rate rotation. Magnetic cleanliness is critical: motors, steel bearings and the table distort the field, so the test volume is mapped with a reference magnetometer. Madgwick's platform used an aluminium hub and carbon-fibre rods to avoid disturbing the magnetometer [7]. Rotation at an offset radius produces a known centripetal acceleration ac = ω²r: r = 0.5 m at ω = 2 rad/s gives 2 m/s², directly checking the 11.5° tilt error predicted by (12) (derived).

Optical motion capture. On an eight-camera Vicon setup, Merriaux et al. measured 0.15 mm static mean absolute error and below 2 mm dynamic error, reaching 0.3 mm dynamically with suitable marker size and sampling rate [16]. For two markers on a baseline L, σangle ≈ √2 σp/L: at L = 0.5 m this is 0.05° for 0.3 mm and 0.32° for 2 mm (derived; the source values are 3σ bounds, so this is conservative). The latter is as large as the static budget and must enter it. The optical-to-sensor rotation needs its own calibration; Madgwick gives a method [7]. At 100°/s, a 10 ms timestamp error is 1° (derived).

High-grade INS. Valid in-vehicle only if it finds heading non-magnetically (gyrocompassing or GNSS-aided alignment); otherwise the magnetic environment is a common error and the difference looks like zero.

Temperature and vibration. Bias and scale factor are mapped in a climatic chamber at thermal equilibrium. Vibration needs two tests: aliasing above Nyquist with an inadequate anti-alias filter, and mean-output shift from zero-mean vibration. Both show on a shaker when vibration is switched on and off at fixed tilt.

Error signatures. In a 360° heading sweep at constant tilt, one-cycle error comes from hard iron or tilt error, two-cycle error from soft iron; AN4249 warns that the first two can be confused [5]. To separate them, the sweep is repeated in a Helmholtz coil at fixed H and varied inclination: the hard-iron amplitude (offset/H) stays constant, the tilt-induced one scales with tan I by (13). A ferromagnetic mass or coil at a known position shows whether disturbances leak into tilt.

Common mistakes

  • Treating static accuracy as dynamic performance. Madgwick's RMS errors below 0.6° static and 0.8° dynamic were obtained with a gyroscope [7]. Without one, dynamic error follows (12); a “dynamic accuracy” without a motion profile is meaningless.
  • Relying on a ‖f‖ ≈ g check; (14) shows it is second order.
  • Picking symmetric weighting or anchoring by default. Equal weights regardless of accuracy leak magnetic error into tilt [3]; anchoring statically costs only the small east-axis gain. The real criterion is robustness to magnetic disturbances.
  • Treating an accelerometer array as the cure. (11) still holds; angle error grows as t².

Conclusion

Static heading uncertainty, √(σ2² + σ1² sin²I)/cos I, grows quickly at high inclination. With unknown acceleration, rotation about the field axis is unobservable; gravity anchoring turns it into atan(ah/g) of tilt and tan I-scaled heading error, which gyro-free filtering suppresses only with lag. Report static and defined dynamic performance separately.

References

  1. G. Wahba, “A least squares estimate of satellite attitude,” SIAM Review, vol. 7, no. 3, p. 409, 1965. https://doi.org/10.1137/1007077
  2. M. D. Shuster, S. D. Oh, “Three-axis attitude determination from vector observations,” Journal of Guidance and Control, vol. 4, no. 1, pp. 70–77, 1981. https://doi.org/10.2514/3.19717
  3. F. L. Markley, “Attitude determination using two vector measurements,” Proc. Flight Mechanics Symposium, NASA Goddard Space Flight Center, Greenbelt, MD, May 1999, NASA/CP-1999-209235, pp. 39–52. https://ntrs.nasa.gov/citations/19990052720
  4. F. L. Markley, D. Mortari, “How to estimate attitude from vector observations,” AAS 99-427, AAS/AIAA Astrodynamics Specialist Conference, Girdwood, Alaska, Aug. 1999; Advances in the Astronautical Sciences, vol. 103, part III, pp. 1979–1996, 2000. https://malcolmdshuster.com/FC_MarkleyMortari_Girdwood_1999_AAS.pdf
  5. T. Ozyagcilar, “Accuracy of angle estimation in eCompass and 3D pointer applications,” NXP (Freescale) AN4249, Rev. 1.0, 2015. https://www.nxp.com/docs/en/application-note/AN4249.pdf
  6. R. G. Valenti, I. Dryanovski, J. Xiao, “Keeping a good attitude: a quaternion-based orientation filter for IMUs and MARGs,” Sensors, vol. 15, no. 8, pp. 19302–19330, 2015. https://doi.org/10.3390/s150819302
  7. S. O. H. Madgwick, “An efficient orientation filter for inertial and inertial/magnetic sensor arrays,” technical report, 2010. https://x-io.co.uk/downloads/madgwick_internal_report.pdf
  8. R. Hermann, A. J. Krener, “Nonlinear controllability and observability,” IEEE Trans. Automatic Control, vol. 22, no. 5, pp. 728–740, 1977. https://doi.org/10.1109/TAC.1977.1101601
  9. W. Wang, K. Gamagedara, T. Lee, “On the observability of attitude with single direction measurements,” arXiv:2008.13067, 2021. https://arxiv.org/abs/2008.13067
  10. L. Magnis, N. Petit, “Angular velocity nonlinear observer from vector measurements,” Automatica, vol. 75, pp. 46–53, 2017. https://doi.org/10.1016/j.automatica.2016.09.027
  11. R. Mahony, T. Hamel, J.-M. Pflimlin, “Nonlinear complementary filters on the special orthogonal group,” IEEE Trans. Automatic Control, vol. 53, no. 5, pp. 1203–1218, 2008. https://doi.org/10.1109/TAC.2008.923738
  12. J.-H. Chen, S.-C. Lee, D. B. DeBra, “Gyroscope free strapdown inertial measurement unit by six linear accelerometers,” J. Guidance, Control, and Dynamics, vol. 17, no. 2, pp. 286–290, 1994. https://doi.org/10.2514/3.21195
  13. J. Sanjuan, A. Sinyukov, M. F. Warrayat, F. Guzman, “Gyro-free inertial navigation systems based on linear opto-mechanical accelerometers,” Sensors, vol. 23, no. 8, 4093, 2023. https://doi.org/10.3390/s23084093
  14. X. Jiang, T. Liu, J. Duan, M. Hou, “Attitude algorithm of gyroscope-free strapdown inertial navigation system using Kalman filter,” Micromachines, vol. 15, no. 3, 346, 2024. https://doi.org/10.3390/mi15030346
  15. A. Chulliat et al., “The US/UK World Magnetic Model for 2025–2030: Technical Report,” NOAA NCEI, 2025. https://doi.org/10.25923/prbc-s316
  16. P. Merriaux, Y. Dupuis, R. Boutteau, P. Vasseur, X. Savatier, “A study of Vicon system positioning performance,” Sensors, vol. 17, no. 7, 1591, 2017. https://doi.org/10.3390/s17071591

Related capability area: Embedded software and hardware development

Have a requirement in this area, or a correction to this note? Tell us about it.

Get in touch