Attitude & Heading Reference (AHRS): Practical Guide
← Back to: Avionics & Mission Systems
An AHRS turns IMU and magnetometer data into reliable roll/pitch and heading by aligning reference frames, managing time alignment, and dynamically trusting or rejecting accel/mag corrections under vibration, magnetic disturbance, and temperature drift. A robust AHRS is proven by repeatable validation (pose, rate, mag, temperature) and a traceable calibration/production evidence chain—not by a single “best” sensor spec.
H2-1 · What an AHRS does (and what it is NOT)
An AHRS (Attitude & Heading Reference System) turns raw IMU + magnetometer measurements into a stable attitude solution (roll/pitch) and a usable heading output, packaged with clear reference frames, update rate, latency, and health flags. It is designed to be consumed directly by avionics software without requiring the integrator to build the full fusion and calibration stack from scratch.
This section sets the boundary so later chapters can go deep without repeating definitions or drifting into sibling topics.
What an AHRS outputs in practice
- Attitude: roll/pitch (often the most stable outputs).
- Heading: yaw/heading estimate with validity indicators (more fragile than roll/pitch).
- Representation options: quaternion (preferred), Euler angles, and sometimes a DCM.
- Operational metadata: update rate, latency, timestamps, calibration state, and health flags.
Why heading is more fragile than attitude
Roll and pitch can be anchored by gravity via the accelerometer (when motion and vibration are handled correctly). Heading, however, depends heavily on the magnetometer, which senses Earth’s field plus local interference.
- Magnetic environment: nearby currents and ferromagnetic structures bias the measured field.
- Tilt compensation: heading needs the magnetic vector projected into the horizontal plane using attitude.
- Hard-iron / soft-iron effects: offsets and ellipsoid distortion create fixed and attitude-dependent errors.
A well-engineered AHRS therefore treats magnetometer input as conditional: it is calibrated, monitored for anomalies, and down-weighted when confidence drops.
What this page is NOT about (kept out on purpose)
- Not GNSS-aided navigation: no position/velocity solution and no GNSS anti-jam processing here.
- Not star-tracker attitude: spacecraft-grade optical attitude sensing is a separate page.
- Not timing infrastructure: PTP/SyncE distribution and atomic clock disciplining are separate topics.
Mini checklist (integration-ready)
- Confirm the AHRS publishes attitude + heading plus health flags (mag valid / degraded modes).
- Prefer quaternion output for internal use; keep Euler for display/debug.
- Require a stated reference frame, update rate, and timestamp/latency behavior.
- Verify heading behavior under magnetic interference is defined (down-weight, freeze, or fall back).
H2-2 · Outputs & reference frames you must get right
Most AHRS integration failures are not noise-related—they come from mismatched coordinate frames, rotation conventions, or heading definitions. This section defines what to document so the AHRS output is interpreted exactly as intended.
Key takeaways
- State the frame (NED or ENU) and axis directions (right-handed convention) in the interface contract.
- Prefer quaternion for internal computation; provide Euler angles mainly for display and debugging.
- Define heading reference: magnetic heading vs true heading (declination handled outside AHRS unless explicitly specified).
- Include timestamp and latency so attitude/heading aligns with other sensors and control loops.
1) Reference frames: Body vs navigation (NED/ENU)
AHRS outputs represent an orientation mapping between a body frame (fixed to the airframe) and a navigation frame (often NED in aviation). A mismatch—such as consuming NED data as ENU—can mirror axes, flip signs, and produce heading that “looks plausible” but is systematically wrong.
- Body frame: commonly X forward, Y right, Z down (must be stated, not assumed).
- Navigation frame: NED (North, East, Down) is common for aircraft; ENU is common in other domains.
- Rotation direction: clarify whether the output maps Body→Nav or Nav→Body.
2) Euler vs quaternion: stable representation vs human readability
Euler angles (roll/pitch/yaw) are easy to read but can suffer from singularities and awkward interpolation. Quaternions are numerically stable and preferred for filtering, interpolation, and downstream computation.
- Recommendation: use quaternion internally; publish Euler as a convenience output.
- Contract items: quaternion order (w,x,y,z vs x,y,z,w), normalization behavior, and sign conventions.
- Sanity checks: quaternion norm ≈ 1; static leveling shows roll/pitch consistent with gravity direction.
3) Heading definition: magnetic vs true (declination is a boundary)
Many systems label yaw as “heading” without defining the reference. An AHRS typically produces magnetic heading after tilt compensation and magnetometer calibration. True heading requires applying magnetic declination, which is usually handled by a higher-level navigation database layer (mentioned here, not expanded).
- Magnetic heading: derived from the measured magnetic field; sensitive to local interference.
- True heading: magnetic heading adjusted by declination; do not assume it unless explicitly defined.
- Operational flags: heading validity should reflect magnetometer confidence (normal/degraded/frozen).
Mini checklist (hand-off to integration)
- Frame: NED or ENU? Confirm axis directions and right-handed convention.
- Rotation: Body→Nav or Nav→Body? State it next to the data interface.
- Quaternion: order and normalization contract; Euler is optional convenience.
- Heading: magnetic vs true; document declination handling (outside AHRS unless stated).
- Timing: timestamp domain and latency behavior for alignment with other measurements.
H2-3 · Sensor chain: IMU & magnetometer AFEs and ADC strategy
In an AHRS, the sensor chain is only as good as its noise floor, anti-alias filtering, and—most critically—its sampling synchronization and timestamp/latency contract. A stable attitude/heading output depends less on “more bits” and more on predictable group delay, aligned multi-axis sampling, and robust magnetometer front-end behavior under interference.
Key takeaways (engineering rules)
- Define time: specify sample timestamp, latency, and whether outputs are “measurement time” or “availability time.”
- Align channels: gyro/accel/mag must be time-aligned (or corrected) before fusion updates.
- Control aliasing: anti-alias filtering and predictable group delay matter more than headline resolution.
- Choose ADC by behavior: prioritize latency predictability, multi-channel sync, and EMI robustness over raw bit count.
1) Signal chain fundamentals: range, noise, bandwidth, anti-alias
A practical AHRS chain starts with three constraints that must be consistent across gyro, accelerometer, and magnetometer: dynamic range (avoid saturation), noise density (set short-term stability), and effective bandwidth (avoid aliasing). Anti-alias filtering must be planned as a system, because its group delay directly impacts fusion timing.
- Range: must cover peak body rates without clipping (clipping causes recovery transients).
- Noise: sets high-frequency attitude jitter; low-frequency behavior links to bias stability.
- Bandwidth: must match motion content; anti-alias prevents high-frequency vibration folding into attitude.
- Range: includes gravity plus maneuver/vibration peaks; saturation can “tilt” leveling falsely.
- Noise: maps to roll/pitch jitter in low dynamics; filtered noise becomes slow bias if poorly handled.
- Bandwidth: anti-alias is critical in vibration; folded energy looks like false low-frequency motion.
- Range: must tolerate local interference; saturation drives heading jumps and slow recovery.
- Noise: shows up directly as heading instability after tilt compensation.
- Bandwidth: should track relevant field changes without importing switching noise via aliasing.
2) AFE choices that matter: offset, 1/f noise, and stability
AHRS performance is often limited by low-frequency behavior. Front-end amplifier input offset and 1/f noise can leak into slow attitude/heading drift. Chopper/auto-zero techniques can reduce low-frequency error, but the system must still manage residual ripple and ensure filtering does not break timing consistency.
- Static slow drift → offset/1/f noise + thermal gradients + inconsistent group delay.
- Heading “jumps” near load switching → magnetometer overload or front-end recovery behavior.
- Vibration causes leveling errors → insufficient anti-alias before sampling.
- Unit-to-unit variation → layout coupling, reference noise injection, or inconsistent filtering.
3) ADC strategy: ΣΔ vs SAR (pick by timing and robustness)
For AHRS, the ADC decision is best made using system-level criteria: latency predictability, multi-channel timing alignment, and EMI susceptibility. Resolution alone rarely fixes real-world drift and heading instability.
- Strength: strong low-frequency performance and effective resolution.
- Watch: group delay and decimation latency must be predictable and matched across channels.
- Best fit: low-to-mid bandwidth signals where consistent timing is engineered into the chain.
- Strength: low and predictable latency; easier deterministic timing and channel alignment.
- Watch: anti-alias and reference noise become more visible; EMI coupling can dominate if layout is weak.
- Best fit: applications prioritizing deterministic timing and robust multi-sensor alignment.
4) Sampling rate & ODR matching: practical rules (no heavy math)
Fusion update rate must be compatible with each sensor’s output data rate (ODR). When rates mismatch without a defined resampling policy, the system exhibits phase jitter, inconsistent correction timing, and “surprising” heading/attitude behavior.
- Rule: keep fusion update at a clean divisor of the sensor ODR, or specify deterministic resampling.
- Rule: treat anti-alias + digital filtering group delay as part of the timing model.
- Rule: time-align gyro/accel/mag to a common timestamp before applying corrections.
- Rule: publish whether outputs are time-tagged at “measurement time” or “availability time.”
H2-4 · Error budget: what drives drift and heading instability
AHRS “drift” is not a single problem—it is a layered error budget. Short-term jitter is set by sensor noise and vibration/aliasing, mid-term drift is dominated by gyro bias and magnetic residuals, and thermal drift comes from bias/scale changes with temperature. A robust AHRS maps each layer to a mitigation method and a validation test, rather than relying on one headline sensor spec.
Fast diagnosis: symptom → likely driver
- Yaw/heading slowly walks → gyro bias (and bias vs temperature).
- Heading has a fixed offset → hard-iron magnetic offset (calibration missing or degraded).
- Heading error depends on attitude → soft-iron distortion or tilt-compensation mismatch.
- Vibration causes roll/pitch errors → accelerometer non-gravity + aliasing folding into low frequency.
- Sudden heading jump then slow recovery → magnetometer saturation/recovery + fusion confidence switching.
1) Gyro error drivers: bias, ARW, scale factor, misalignment
Gyros define the short-term attitude propagation. Over time, small errors integrate into measurable drift. The most important distinction is between noise-driven jitter (short-term) and bias-driven drift (mid/long-term).
- Bias: creates near-linear heading/yaw drift when external corrections are weak or down-weighted.
- ARW: maps to high-frequency attitude jitter and increases correction workload.
- Scale factor: shows up under larger rates; errors grow with maneuver intensity.
- Misalignment: cross-axis coupling; motion on one axis leaks into others.
2) Accelerometer drivers: noise + non-gravitational acceleration
Accelerometers constrain roll/pitch by observing the gravity direction—but only when the measurement is not dominated by maneuver acceleration or vibration. If fusion trusts accelerometer data during high dynamics, it can “correct” attitude in the wrong direction.
- Noise: becomes roll/pitch jitter in calm conditions.
- Non-gravity acceleration: during maneuvers, gravity cannot be isolated without a confidence mechanism.
- Vibration + aliasing: folded energy looks like low-frequency tilt, producing systematic leveling errors.
3) Magnetometer drivers: hard-iron, soft-iron, current-field interference
Heading stability is magnetometer-limited in many real installations. The magnetometer measures Earth’s field plus local bias/distortion, and any residual propagates into heading—often more strongly than other error sources.
- Hard-iron: constant offset (point cloud shifts) → fixed heading bias.
- Soft-iron: direction-dependent distortion (ellipsoid) → heading error depends on attitude.
- Current-field interference: time-varying bias near wiring/loads → heading jumps and residual spikes.
- Saturation: overload + recovery time → prolonged “untrustworthy heading” windows.
4) Engineering drift budget: layer by time constant (what to mitigate and how to prove it)
- Main drivers: sensor noise, vibration/aliasing, timing jitter.
- Typical symptoms: attitude jitter, heading jitter.
- Mitigation: anti-alias filtering, deterministic timing, vibration-aware weighting.
- Validation: static noise tests + controlled vibration profiles.
- Main drivers: gyro bias, magnetic residual drift, confidence switching behavior.
- Typical symptoms: yaw/heading walk, slow bias accumulation.
- Mitigation: bias estimation strategy, magnetometer calibration + anomaly detection.
- Validation: long static drift runs + interference step tests (load on/off).
- Main drivers: bias vs temperature, scale vs temperature, magnetic offset shift with temperature.
- Typical symptoms: drift rate changes with temperature; poor repeatability after thermal cycling.
- Mitigation: temperature calibration and compensation model + stability rules.
- Validation: thermal sweep with loop-back repeatability metrics.
H2-5 · Magnetic heading done right: tilt compensation + calibration
Reliable magnetic heading requires two non-negotiables: tilt compensation (project the 3D field onto the horizontal plane using roll/pitch) and calibration (remove hard-iron offset and soft-iron distortion so the corrected field behaves like a sphere). Heading must be gated by interference checks (norm/residual/step) with smoothing to prevent weight chattering.
Engineering checklist
- Tilt first: compute heading from the horizontal projection after roll/pitch alignment.
- Calibrate both: remove hard-iron (offset) and soft-iron (ellipsoid distortion).
- Gate magnetics: monitor mag norm + residual/innovation + step changes.
- Smooth decisions: apply hysteresis and a recovery ramp to avoid on/off flicker.
1) Tilt compensation: heading comes from the horizontal projection
A magnetometer measures a 3D field vector in the body frame. Heading is the direction of the field projected onto the horizontal plane. Without tilt compensation, roll/pitch mix vertical field components into the heading estimate, producing systematic yaw errors that grow with tilt.
- Input: corrected magnetic vector in body coordinates.
- Align: use roll/pitch (from attitude) to rotate the vector toward the navigation frame.
- Project: remove the vertical component; keep the horizontal component.
- Compute: heading from the horizontal vector direction.
2) Hard-iron vs soft-iron: offset vs distortion (engineer-friendly)
- What it looks like: the point cloud center is shifted.
- Cause: fixed magnetic bias near the sensor.
- Effect: a persistent heading bias unless removed.
- What it looks like: a sphere turns into a stretched/tilted ellipsoid.
- Cause: directional distortion from surrounding materials.
- Effect: heading error depends on orientation and quadrant.
3) Calibration workflow: sample → fit → correct → verify
“Figure-eight” motion is only a sampling technique. The engineering goal is to estimate an offset and a correction matrix that turns the raw ellipsoid into a near-sphere. Verification is done by checking that the corrected magnitude stays stable over rotation.
- Multi-attitude sampling: cover yaw plus roll/pitch to avoid a thin ring dataset.
- Ellipsoid fitting: estimate offset b and distortion A.
- Apply correction: mcorr = A · (mraw − b).
- Verify stability: |mcorr| should vary less than |mraw| across rotations.
4) When to down-weight or disable magnetic heading
Magnetic heading should be conditional. Use simple and robust detectors first, then add residual-based checks. Combine gates with smoothing and hysteresis to prevent rapid toggling that can cause visible output jitter.
- Mag norm gate: detect saturation or strong interference when |mcorr| deviates sharply.
- Residual/innovation gate: detect directional inconsistency between expected and measured field.
- Step/change gate: detect abrupt jumps (e.g., load switching) and hold off corrections briefly.
- Recovery ramp: restore weight gradually after conditions return to normal.
H2-6 · Fusion algorithms: complementary filter vs EKF (how to tune)
AHRS fusion is best understood as gyro propagation plus conditional corrections from accelerometer and magnetometer. Complementary filters tune correction strength via time constants, while EKF tuning maps sensor noise and condition indicators into measurement/process uncertainty (R/Q) or dynamic weights (wacc, wmag). Stability comes from correct gating, deterministic timing, and smooth weight transitions.
Practical tuning recipe (condition → weight / R mapping)
- Static baseline: estimate noise/variance for gyro, accel, and mag in a quiet condition.
- Vibration indicator: use accel variance or high-frequency energy to detect “non-gravity” dominance.
- Mag confidence: use mag norm + residual/innovation + step detector for interference/saturation.
- Map to weights: raise R (or lower weight) for accel under vibration; raise R (or lower weight) for mag under interference.
- Smooth and hysteresis: ramp weights and add thresholds with hysteresis to avoid chattering.
1) Complementary filter: intuitive knobs (what each knob does)
Complementary filters combine fast gyro updates with slower corrections. Tuning is essentially choosing how quickly accelerometer and magnetometer corrections pull the solution back toward gravity and magnetic references.
- Gyro trust: higher trust improves responsiveness but increases drift sensitivity.
- Accel correction strength: higher strength improves leveling at rest but can fail in maneuvers/vibration.
- Mag correction strength: higher strength improves long-term heading but can jump under interference.
2) EKF: state + measurements + condition-dependent confidence
An EKF-based AHRS models attitude and often gyro bias as states, then corrects them using accelerometer (gravity direction) and magnetometer (field direction) measurements. Tuning hinges on selecting Q/R so that measurements are trusted only when they are consistent with the current condition.
- Q (process uncertainty): increases when unmodeled dynamics or bias instability are expected.
- R (measurement uncertainty): increases when accel is contaminated by non-gravity or when mag is interfered/saturated.
- Condition indicators: vibration and mag residual gates provide the lever for dynamic R or dynamic weights.
3) Common failure modes: “over-trust” patterns and fixes
- Over-trust accel → maneuvers/vibration pull attitude away from truth → raise R or lower wacc under vibration.
- Over-trust mag → load switching/interference causes heading jumps → gate with norm/residual/step + slow recovery.
- Time misalignment → corrections applied at the wrong time → enforce timestamp alignment and group delay accounting.
- Unequal filtering delay → phase errors between channels → unify filtering or compensate the delay model.
H2-7 · Temperature drift compensation: from factory cal to in-field stability
Temperature drift control is a closed loop: characterize bias/scale/magnetic offsets versus temperature in factory calibration, apply filtered and rate-limited compensation in the field, and verify with a hot–cold sweep where attitude/heading bias shows minimal hysteresis on the return path.
1) Where temperature drift comes from (and how it shows up)
- Gyro bias vs temperature: slow yaw drift grows with time unless bias(T) is corrected before integration.
- Gyro scale factor vs temperature: dynamic rotation rates are mis-estimated, causing attitude error during maneuvers.
- Mag offset vs temperature: heading bias changes with temperature and may show a return-path mismatch (hysteresis).
- PCB thermal gradient: the measured temperature may lag the true sensor die temperature; fast temperature changes can mislead compensation.
2) Factory calibration: multi-point sampling → fit → store coefficients
Factory calibration should produce temperature-dependent coefficients that are stable and traceable. A robust approach uses a small number of well-conditioned temperature points and a conservative fit model that behaves well between points.
- Choose temperature points: cold / ambient / hot, with soak time at each point.
- Collect datasets: bias in steady state, controlled rotation for scale, magnetic samples for offset behavior.
- Fit model: piecewise linear or low-order polynomial, avoiding overfit outside the valid range.
- Store coefficients: include calibration version, valid temperature range, and coefficient set ID for traceability.
3) In-field compensation: apply models without amplifying noise
In-field compensation uses the IMU temperature sensor, but temperature is not a perfect proxy for the sensor’s sensitive structures. The key is filtered and rate-limited updates so the compensation term does not jitter under fast thermal gradients.
- Pre-process temperature: smooth temperature and limit dT/dt used by the model.
- Apply at the right place: bias(T) before integration; scale(T) on rate; mag offset(T) before tilt compensation.
- Manage states: cold start, warm-up, and steady operation can use different update rates and confidence behavior.
4) Acceptance test: temperature sweep + hysteresis loop closure
A practical acceptance test is a cold→hot→cold sweep. Compare attitude/heading bias on the way up versus the return path. A small loop indicates stable compensation; a large loop indicates thermal gradient or temperature-dependent offsets not captured by the model.
- Sweep: cold → hot → cold with soak at key points.
- Log: temperature, attitude, heading bias, and compensation terms.
- Compare: return-path bias vs outbound bias at the same temperature.
- Decide: if hysteresis is large, reduce gradient impact and revisit model or update-rate limiting.
H2-8 · Installation & vibration: making AHRS survive real airframes
Installation quality determines whether an AHRS stays stable: axis misalignment causes cross-axis attitude errors, vibration contaminates accelerometer “gravity” corrections, and local magnetic fields from current harnesses and ferrous structures can bias or jump heading. A survivable installation uses alignment discipline, vibration-aware accel gating, and a defined “mag clean zone.”
1) Mounting alignment: how misalignment becomes attitude error
Mechanical misalignment rotates the AHRS body axes away from the aircraft body frame. The result is cross-axis coupling: a pure motion about one axis appears as a mixture of roll/pitch/yaw. Small misalignment can look like a “fixed bias” in some attitudes and a “gain/coupling” issue in others.
- Symptom: single-axis rotations produce coupled responses on multiple axes.
- Root cause: a rotation between installation frame and AHRS frame (alignment matrix).
- Mitigation: careful mounting references plus software alignment compensation when a repeatable procedure exists.
2) Vibration: why accelerometers can “mistake vibration for gravity”
Accelerometers are used to constrain roll/pitch by estimating the gravity direction. Under high vibration or aggressive maneuvers, the measured acceleration includes strong non-gravity components. If fusion trusts these measurements, the filter pulls the attitude toward a false “gravity” vector, causing drift, jitter, or divergence.
- Detect: accel variance or high-frequency energy as a vibration indicator.
- Respond: reduce wacc (or increase Racc) while vibration is high.
- Recover: ramp the weight back with smoothing to avoid oscillations.
3) Magnetic environment: typical interference symptoms and placement logic
Magnetic heading can be biased by nearby current loops and ferrous structures. Interference often appears as repeatable heading errors in specific states or sudden jumps when high currents switch. A practical approach is to define a “mag clean zone” and treat magnetics as condition-dependent, not always-trustworthy.
- Current harness: switching loads can create step-like heading jumps.
- Motors/relays: state-dependent bias that repeats with equipment operation.
- Ferrous structures: quadrant-dependent errors even after calibration.
4) Wiring & return path: minimal module-level rules
- Keep return paths consistent: avoid unpredictable return loops near the sensor module.
- Secure the harness: reduce micro-motion that turns vibration into measurement artifacts.
- Do not chase complex shielding: apply simple, repeatable module-level routing and verify in the installed state.
H2-9 · Validation & production test: what proves it’s done
“Done” means an evidence chain exists: calibration outputs a traceable coefficient pack, verification proves attitude/heading stability across orientation, dynamics, magnetic disturbance and temperature sweep, and production tests can reliably screen failures using a minimal, repeatable action set plus configuration lock (ID, version, CRC).
1) Definition of Done (deliverable-grade evidence)
- Static attitude repeatability: returning to the same pose produces consistent roll/pitch (loop closure matters more than a single snapshot).
- Dynamic stability: under controlled rotation rates, integration does not diverge and returns cleanly when motion stops.
- Heading reliability: magnetic calibration improves repeatability; under magnetic disturbance, residual detection reduces mag trust (no “confident wrong heading”).
- Temperature robustness: cold→hot→cold sweep shows reduced bias and smaller hysteresis after temperature compensation.
- Traceability: coefficients + thresholds + firmware build are versioned, locked, and checksum-protected.
2) Static verification (orientation loop closure)
Use a small set of repeatable poses (level, left/right tilt, inverted). Compare roll/pitch when returning to each pose. Consistency across repeated cycles indicates bias and alignment behaviors are under control.
- Pose set: 3–6 poses that can be repeated on a simple fixture.
- Loop closure: compare “pose A first visit” vs “pose A return visit”.
- Symptoms: cross-axis coupling often indicates misalignment; slow creep indicates bias/temperature effects.
3) Rate-table / rotation verification (method, not equipment)
Controlled angular-rate tests validate gyro scaling and fusion stability. The focus is repeatability and “return-to-zero” behavior, not vendor-specific turntable models.
- Step rates: apply a small set of stable rates on each axis (including a stop condition).
- Check scaling: output rate tracks commanded rate without axis mixing.
- Check stability: during motion, attitude remains bounded; after stopping, bias does not “run away”.
4) Magnetic calibration & interference verification
Validate both “calibration improvement” and “fault containment.” Heading should become more repeatable after calibration, and magnetic disturbance should trigger residual-based de-weighting or temporary freeze behavior.
- Before/after: compare heading spread and repeatability with the same motion path.
- Residual gate: disturb the magnetic field (controlled current loop / ferrous proximity) and verify trust is reduced.
- Field safety: heading output should not “snap” while still reporting high confidence.
5) Thermal chamber sweep (temperature compensation effectiveness)
A cold→hot→cold sweep is the simplest “truth test” for temperature compensation. Compare outbound vs return-path biases at the same temperature to quantify hysteresis and gradient sensitivity.
- Soak: stabilize at key points to separate gradient effects from steady-state temperature behavior.
- Log pack: temperature, compensation terms, attitude bias, heading bias, confidence flags.
- Decision: large loop indicates model mismatch or thermal-gradient influence that must be reduced or rate-limited.
6) Production minimal test set (fast, repeatable, high yield)
Production tests should be short and decisive. The goal is to screen sensor failures, axis mix-ups, unstable fusion settings, magnetic saturation, and broken temperature compensation with minimal motion and simple fixtures.
- Self-test: sensor ID/communication, FIFO/DRDY activity, temperature reading sanity.
- Pose action: 2–3 controlled poses; verify roll/pitch loop closure and cross-axis coupling flags.
- Mag sanity: fixed-direction magnetic norm and noise screen; detect saturation/outliers.
- Config lock: write coefficient version + serial + CRC; refuse shipment on CRC mismatch.
H2-10 · BOM / IC selection checklist (criteria + example part numbers)
Selection should start from the environment (vibration, magnetic interference, temperature sweep), then map to measurable criteria (bias stability, synchronization/timestamping, mag saturation behavior, noise/PSRR). Example part numbers can accelerate sourcing, but criteria determine whether the AHRS remains stable in the installed airframe.
1) IMU (gyro + accel)
- Gyro bias stability and repeatability across temperature
- ARW / noise density vs required heading/attitude jitter
- ODR and synchronization (DRDY, FIFO, external clock options)
- Vibration sensitivity (linear acceleration coupling) and filtering options
- Operating temperature range and calibration validity range
- ADI: ADIS16470, ADIS16490, ADIS16495-1
- ST: ASM330LHH
- TDK InvenSense: ICM-42688-P
2) Magnetometer (heading sensitivity driver)
- Dynamic range and saturation recovery (current harness and ferrous proximity tolerance)
- Noise vs heading jitter, and usable sample rate
- Calibration stability (hard/soft-iron behavior repeatability)
- Temperature-dependent offset behavior and self-test support
- ST: LIS3MDL
- MEMSIC: MMC5983MA
- AKM: AK09916
- PNI (module/IC family option): RM3100
3) ADC / Interface (when external ADC is actually needed)
- Digital IMU + digital magnetometer: external ADC is usually unnecessary.
- External ADC becomes relevant when analog sensors are used, multi-channel synchronous sampling is required, or group delay alignment must be controlled tightly.
- Latency / group delay vs fusion update rate
- Synchronous sampling and timestamp alignment
- EMI susceptibility and interface robustness (SPI/I3C layout discipline)
- ADI: AD7768 (multi-channel synchronous ADC family)
- TI: ADS131M04 (multi-channel delta-sigma ADC family)
4) Fusion MCU (compute + determinism + diagnostics)
- FPU and DSP features for quaternion updates / EKF variants
- Deterministic timing (interrupt latency, DMA, timestamp capture)
- Memory integrity features (ECC where applicable) and watchdog strategy
- Startup behavior (time-to-stable outputs) and brownout handling
- Interfaces: SPI/I²C/I3C, timers, and low-jitter clocking support
- TI Hercules: TMS570LC4357
- Infineon AURIX: TC39x family
- Microchip: SAM V71
5) Power (local noise control for sensor stability)
- Low-noise rails for sensors and references; high PSRR where needed
- Switching pre-regulator + local post-LDO cleanup (keep high di/dt away from sensor rails)
- Sequencing / reset behavior (clean startup reduces false calibration and unstable early outputs)
- Module-level filtering strategy (simple and repeatable, verified in the installed harness state)
- Ultra-low-noise LDO options: TI TPS7A47 / TPS7A4700, ADI LT3042, ADI ADP150
- Front buck converter example: TI TPS62130
H2-11 · FAQs (AHRS)
These FAQs answer the most common AHRS questions without expanding into GNSS/INS. Each answer is designed to be short, practical, and testable.
1) What is the practical difference between an IMU and an AHRS?
An IMU measures motion signals (angular rate and acceleration, sometimes magnetic field) and outputs raw sensor data. An AHRS adds a reference frame and fusion: it integrates gyro data and uses gravity and magnetic field as corrections to output usable attitude and heading (Euler or quaternion), often with confidence flags and calibration handling.
Mapped: H2-1
2) Why can roll/pitch look stable while heading drifts or jumps?
Roll and pitch are strongly anchored by the gravity direction, so they can remain stable when the platform is not accelerating aggressively. Heading depends on the magnetometer plus tilt compensation, so it is vulnerable to magnetic bias, distortion, saturation, and current-generated fields. Jumps often happen when magnetic residuals cross a gate and the filter re-weights or rejects magnetometer corrections.
Mapped: H2-4, H2-5
3) How does tilt compensation affect heading accuracy?
Tilt compensation rotates the measured magnetic field into the horizontal plane using the current attitude estimate, then computes heading from that horizontal projection. This means heading inherits roll/pitch errors: if attitude is biased (due to acceleration or vibration), the projection is wrong and heading shifts. Robust AHRS implementations reduce magnetometer influence when attitude confidence is low or magnetic residuals are high.
Mapped: H2-5
4) What are hard-iron and soft-iron errors in simple terms?
Hard-iron error is a constant magnetic offset caused by nearby permanent magnetization or DC currents; it shifts the magnetometer “sphere” away from the origin. Soft-iron error is direction-dependent distortion caused by ferromagnetic materials; it stretches and skews the sphere into an ellipsoid. Calibration estimates an offset vector plus a correction transform that maps the ellipsoid back to a sphere.
Mapped: H2-5
5) When should the magnetometer be down-weighted or ignored?
Down-weight the magnetometer when its magnitude is abnormal, its direction changes abruptly, or its innovation/residual against the expected field becomes large. Also down-weight during known disturbance events such as high-current switching or proximity to ferrous structures. A practical strategy is: detect (norm/residual/step), reduce magnetometer gain or freeze heading correction temporarily, and expose a health flag so downstream users know heading confidence is reduced.
Mapped: H2-5, H2-6, H2-8
6) Complementary filter vs EKF: which is more robust in vibration?
Vibration robustness depends less on the filter name and more on how it rejects unreliable accelerometer and magnetometer updates. A complementary filter can work well if it includes vibration detection and aggressively reduces accel correction when the “gravity assumption” is violated. An EKF often makes this easier because measurement noise (R) can be adapted using residuals, but it still fails if it trusts bad measurements.
Mapped: H2-6, H2-8
7) How do you choose AHRS update rate vs sensor ODR?
Sensor ODR sets the raw sampling bandwidth and affects aliasing and delay; AHRS update rate sets how often attitude/heading is refreshed for control or display. A common approach is: keep ODR higher than the output update rate, downsample with proper filtering, and use timestamps to align gyro/accel/mag to the same time. Increasing ODR without time alignment often worsens stability rather than improving it.
Mapped: H2-3, H2-6
8) Why does vibration corrupt accelerometer-based leveling?
Accelerometers measure total specific force, not just gravity. Under vibration or maneuvering, dynamic acceleration adds energy that can dominate the gravity component, so the “gravity direction” estimate becomes biased and noisy. If the filter continues to treat accelerometer readings as a low-frequency truth source, roll/pitch correction pushes attitude in the wrong direction. The fix is to detect vibration and reduce accel correction weight or narrow its trusted bandwidth.
Mapped: H2-8
9) What temperature test best reveals residual drift after compensation?
The most revealing test is a cold→hot→cold sweep with dwell time at several temperatures, then comparing attitude/heading bias at the same temperature on the way up and on the way back down. This “loop closure” exposes hysteresis and thermal-gradient sensitivity that a single-direction sweep can hide. Logging compensation terms alongside outputs helps identify whether drift comes from model mismatch or from transient thermal gradients.
Mapped: H2-7, H2-9
10) What are the minimum factory calibration steps for volume production?
A minimum scalable set is: sensor communication/self-test, a small pose routine to validate axis orientation and roll/pitch loop closure, a magnetic sanity check to screen saturation/outliers, and writing calibration identifiers with a configuration lock (version + CRC). If multi-temperature calibration is required, coefficients should be traceable to a known process, even if only a subset of units receives full chamber characterization. The goal is fast screening, not perfect absolute accuracy.
Mapped: H2-7, H2-9
11) How to detect magnetic interference during operation without GNSS?
Magnetic interference can be detected by monitoring magnetometer norm bounds, step changes in field direction, and the innovation/residual of the magnetic measurement against the expected field after tilt compensation. Combine these with simple context cues such as high-current switching events if available. When interference is detected, reduce magnetometer weight or freeze heading correction temporarily and raise a health flag so users know heading is operating in a degraded mode.
Mapped: H2-5, H2-6, H2-8
12) What specs matter most when selecting an AHRS-grade IMU?
Prioritize gyro bias stability and repeatability across temperature, plus noise density/ARW that matches the required attitude and heading jitter. Ensure the IMU supports reliable synchronization (DRDY/FIFO/timestamping) so sensor data aligns in time. Check vibration sensitivity and usable ODR, and confirm the operating temperature range matches the intended environment. Finally, evaluate interface and power-noise requirements because supply and timing integrity strongly affect drift and stability.
Mapped: H2-10