Encoders, Resolvers & IMUs — Pose & Motion Sensing
See also (Tier 3 family index): Sensor Families
1. At a glance
A robot that cannot measure where it is, how fast it is moving, or which way it is facing cannot close any meaningful control loop. Pose and motion sensing is the foundational measurement layer underneath every joint controller, every navigation stack, every safety interlock. Four quantities matter, each measured by its own family of sensors:
- Position — where the joint, wheel, or body is, in joint space (rotational/linear) or Cartesian space. Measured by encoders (incremental or absolute, optical/magnetic/inductive) and resolvers.
- Velocity — how fast it is moving. Derived either by differentiating encoder position (cheap, noisy at low speed) or measured directly by tachogenerators (legacy) or gyroscopes for rotational rate.
- Orientation — how the body is facing in 3D, an SO(3) element typically parameterised by quaternion. Estimated by fusing accelerometer + gyroscope + magnetometer in an IMU (or AHRS) — never measured directly.
- Acceleration — translational rate-of-change of velocity. Measured by accelerometers; used as a proxy for orientation against gravity at rest, as a tilt sensor, as an input to dead-reckoning, and for vibration / shock detection.
Robotics splits these into two scales:
- Joint-level sensing — one sensor per axis, rigidly coupled to a motor shaft or output flange. Encoders and resolvers dominate. Bandwidth requirement is the joint servo loop (1–10 kHz). Resolution requirement is set by output-side positioning tolerance scaled by gear ratio.
- Body-level sensing — one IMU (sometimes two for redundancy) per rigid body, plus environmental aiding (GPS, magnetometer, vision, LiDAR-SLAM). Bandwidth requirement is body dynamics (100–1000 Hz). Drift requirement is set by how long you must operate between external fixes.
First ask before applying any sensor: what is the tolerance budget at the output (end-effector, wheel hub, body frame), what is the control-loop bandwidth that must use the signal, and what is the environment (oil, dust, magnetic interference, vibration, temperature range, EMI)?
2. First principles
Optical encoders
A patterned disk (typically chrome-on-glass for high-resolution, etched-metal for industrial, or printed-on-Mylar for hobby) is illuminated by an LED and read by a photodetector array.
- Incremental encoders generate two square-wave outputs, A and B, in quadrature (90° phase offset). Counting both rising and falling edges of both channels gives 4× the line count in resolution (e.g. a 1024 cpr disk yields 4096 counts per revolution after edge decoding). Direction is determined by which channel leads. A third channel, Z or index, fires once per revolution to provide a home reference for power-up homing. The position state is relative — lost on power-down unless externally backed up.
- Absolute encoders report a unique digital word for each shaft angle, never requiring homing. The disk pattern is either parallel binary tracks (one track per bit, n tracks for 2^n positions), parallel Gray code (single-bit transitions between adjacent codes, eliminating crossing-boundary errors), or single-track / pseudo-random patterns read by a CCD/CMOS line array and decoded serially via BiSS-C, SSI, EnDat 2.2, or Hiperface DSL.
- Multi-turn absolute encoders add a mechanical gear train or magnetic-Wiegand-pulse counter that tracks revolutions across power cycles, often backed by a small lithium primary cell.
Resolution is fundamentally limited by the disk feature size (microns) and the read-head slit / detector aperture diffraction. State-of-the-art optical absolute encoders (Renishaw RESOLUTE, Heidenhain ECN/EQN series) achieve 26–32 bits over a 360° revolution at line widths of ~5–20 µm.
Magnetic encoders
A multi-pole ring magnet (or a single diametral dipole magnet on the shaft end) is read by a Hall-effect, AMR (anisotropic magnetoresistance), GMR (giant magnetoresistance), or TMR (tunneling magnetoresistance) sensor chip. The chip computes shaft angle from sin/cos field components by an internal CORDIC.
Magnetic encoders tolerate oil, dust, water mist, and reasonable vibration. They cost a fraction of comparable optical units. Resolution is typically 12–14 bits in low-cost ICs (AMS AS5048, AS5601), 16–19 bits in industrial parts (Renishaw Aksim2, RLS Orbis). Accuracy is limited by magnet eccentricity, mounting tolerance, and external magnetic interference — a steel chassis or a nearby motor stator can introduce arcminutes of error.
Inductive encoders
A patterned PCB target rotates over a stator with excitation and pickup coils. The reflected impedance varies with target position. Inductive encoders (RLS Orbis, Heidenhain LIC, AMS AS54xx) are immune to oil, magnetic fields, and stray light — well-suited to high-vibration servo applications and to robots operating near welding currents. Resolution and accuracy are comparable to high-end magnetic encoders.
Resolvers
A resolver is a small rotary transformer. The rotor carries a primary winding excited by an AC carrier (typically 5–10 kHz, 4–10 V_rms). Two stator windings are mechanically offset by 90°; their output voltages are the sine and cosine of the shaft angle multiplied by the carrier:
V_sin = K · V_ref · sin(θ) · cos(ω·t) V_cos = K · V_ref · cos(θ) · cos(ω·t)
A resolver-to-digital converter (R/D, e.g. Analog Devices AD2S1210) synchronously demodulates these against the carrier and tracks θ through a closed-loop estimator that also yields velocity. Typical R/D resolution is 10–16 bits. Resolvers are mechanically rugged (no electronics on the rotating element), tolerate temperatures up to 200 °C, and survive radiation — they remain the default in heavy industrial servos, military actuators, and aerospace.
Accelerometers
- MEMS capacitive — a silicon proof mass on flexures, with comb-finger capacitors that change with displacement. Bosch, ST, Analog Devices (ADXL family), TDK families. Range from ±2 g to ±400 g, noise densities of 25–200 µg/√Hz, bandwidth 0–4 kHz.
- Piezoelectric — a charge-mode element that responds to changes in acceleration; no DC response. Rugged and high-bandwidth (≥ 10 kHz). Used for vibration / shock monitoring, not for tilt or navigation.
- Force-balance / servo — a feedback-controlled proof mass; the current required to null the displacement is the measured acceleration. Honeywell Q-Flex QA-2000, Sundstrand QA-3000. Sub-µg noise floors, 10⁻⁴ % linearity. Expensive; used in inertial navigation and gravimetry.
Gyroscopes
A gyroscope measures angular rate, not orientation. Integration yields angle, but gyro bias and noise integrate too — drift is the dominant error.
- MEMS Coriolis — a vibrating proof mass; rotation deflects the mass perpendicularly via the Coriolis force, sensed capacitively. Bosch, ST, TDK InvenSense, ADI. Bias instability 1–20 °/hr for consumer parts, 0.1–1 °/hr for industrial-grade (ADIS16505, Honeywell HG4930), ≤ 0.05 °/hr for emerging silicon HRG variants.
- Fiber-optic gyroscope (FOG) — exploits the Sagnac effect: light traversing a fiber loop in opposite directions accumulates a phase difference proportional to the loop’s rotation rate. KVH, Fizoptika, Northrop Grumman. Bias 0.001–0.1 °/hr, drift-free over long durations, expensive.
- Ring laser gyroscope (RLG) — two counter-propagating laser modes in a sealed cavity; their beat frequency is proportional to rate. Honeywell GG1320, used in commercial aviation INS. Bias 0.001–0.01 °/hr.
- Hemispherical resonator gyroscope (HRG) — a fused-silica “wineglass” resonator whose standing-wave node pattern precesses against rotation. Northrop Grumman Scalable Space Inertial Reference Unit. Bias ≤ 0.0001 °/hr; multi-decade operating life; emerging into ground-vehicle / autonomy markets.
IMUs and AHRS
An IMU (Inertial Measurement Unit) packages a 3-axis accelerometer + 3-axis gyroscope (6-DOF) and optionally a 3-axis magnetometer (9-DOF) and barometer (10-DOF). The raw IMU outputs body-frame rates and accelerations; an AHRS (Attitude and Heading Reference System) is an IMU plus a state-estimator (typically extended Kalman filter or complementary filter) that emits roll/pitch/heading quaternion. See [[Robotics/bayesian-estimation]] for fusion math.
The strapdown mechanisation (Titterton 2004) integrates body-frame rates ω_b into a rotation matrix C_b^n (body to navigation frame), then rotates the body-frame specific force f_b into the nav frame, subtracts gravity, and integrates twice for velocity and position:
Ċ_b^n = C_b^n · [ω_b ×] v̇_n = C_b^n · f_b + g_n − (2·ω_ie + ω_en) × v_n ṗ_n = v_n
For a vehicle-class IMU (large t, large lat/lng changes), the Coriolis and transport-rate terms (last term in v̇_n) cannot be ignored. For a small robot operating in a local frame for seconds-to-minutes, they are negligible and the equations collapse to a flat-earth strapdown:
q̇ = ½ · q ⊗ [0, ω_b] v̇_n = q ⊗ f_b ⊗ q* − g_n ṗ_n = v_n
where q is the body-to-nav quaternion. Integration is typically RK4 or fourth-order Adams-Bashforth at the IMU rate.
Orientation parameterisations
Three forms are used in practice:
- Rotation matrix R ∈ SO(3), 9 numbers with 6 constraints (R^T·R = I, det = 1). No singularities; numerically forgiving; uses 9 floats and 3-cycle composition by matrix multiply. Used internally by most fusion algorithms.
- Euler angles (roll, pitch, yaw — also called Tait-Bryan ZYX or XYZ). 3 numbers, intuitive. Gimbal lock at pitch = ±90° causes singular Jacobians and unstable estimator updates. Avoid as state representation in fusion; useful only for human-readable output.
- Quaternion q = [w, x, y, z], 4 numbers with one constraint (|q| = 1). No singularities; cheap composition (4-mul, 12 add); the dominant state representation in modern AHRS / VIO. The double-cover (q and −q represent the same rotation) requires sign management when feeding into a Kalman filter; the standard fix is the error-state Kalman filter (Sola 2017) that parameterises the error as a 3-vector in the tangent space and resets after each update.
Quaternion integration of a constant body rate ω over dt:
q(t+dt) = q(t) ⊗ [cos(|ω|·dt/2), (ω/|ω|) · sin(|ω|·dt/2)]
renormalise q to unit length after each step.
Noise specifications
The standard noise-characterisation tool is the Allan variance plot (El-Sheimy 2008). The Allan deviation σ_A(τ) is the root-mean-square of the difference between adjacent τ-second averages of the sensor output:
σ_A(τ) = √( ½ · ⟨(ȳ_{k+1} − ȳ_k)²⟩ )
Plotted log-log, the curve is the superposition of several power-law slopes, each corresponding to a distinct noise mechanism. Key extracted parameters:
- Quantisation noise — slope −1 at short τ; rarely dominant unless ADC bits are too few.
- Angular Random Walk (ARW), in deg/√hr — slope −½ at short τ. White noise on the rate output, integrating into angle error that grows as σ_θ(t) = ARW · √t. A gyro at 0.1 °/√hr produces 0.1° of σ at t = 1 hr.
- Velocity Random Walk (VRW), in m/s/√hr — the equivalent for accelerometers; integrating accel white noise into velocity error.
- Bias instability σ_BI, in deg/hr (gyro) or µg (accel) — flat plateau (slope 0) at intermediate τ. The minimum point of the Allan deviation curve. Sets the practical long-term drift floor; cannot be removed by averaging because it is the slow random walk of bias itself.
- Rate Random Walk (RRW), in deg/hr/√hr — slope +½ at long τ. Slow random walk of the bias; matters at integration times above the bias-instability time constant (typically 100 s – 10 000 s for MEMS).
- Rate Ramp / drift — slope +1 at very long τ; deterministic trend (often from temperature changes during the test).
A Kalman filter modelling the IMU as “white noise + Gauss-Markov bias” should set the Q matrix entries for the bias states from σ_BI and the bias correlation time τ_BI (read off the Allan plot at the slope inflection). Setting Q too low causes bias estimation to lag temperature drift; too high causes the filter to chase short-term noise into the bias state and degrade orientation.
3. Practical math / worked examples
Worked example A — Encoder resolution sizing for a robot arm joint
Target: end-effector positional tolerance of ±0.05° at the output of a joint, driven through a 100:1 harmonic-drive reducer.
Reflected to the motor side, the angular tolerance is:
Δθ_motor = 100 · 0.05° = 5° = 0.0873 rad
Required encoder bits to resolve at least this step over a full motor revolution:
n_bits ≥ log2(360° / 5°) = log2(72) = 6.17 → 7 bits naive minimum
But this is a single-step resolution, not an accuracy budget. We need oversampling by ~10× (one decade of margin) for clean differentiation to velocity, low quantisation noise into the PID derivative term, and digital filtering:
n_bits ≥ 7 + log2(10) ≈ 10.5 → at least 11 bits
In production a 17–19 bit absolute magnetic encoder is the de-facto motor-side choice (AMS AS5048A 14 b for hobby, Renishaw Aksim2 19 b, RLS Orbis 19 b, Renesas IPS2200 absolute 14 b). The “wasted” bits buy you accurate velocity at low speed, multi-turn margin, and digital-filter headroom.
Critical correction: the 100:1 harmonic-drive gearbox itself contributes ±0.5 to ±2 arcminutes of kinematic error (CycloneDrive, Harmonic Drive SHG series datasheets), 1–5 arcminutes of backlash-equivalent torsional flex under load, and another arcminute of thermal drift. The motor-side encoder cannot see any of these. For sub-arcminute end-effector accuracy you need a dual-encoder scheme: motor-side absolute encoder for commutation and velocity, output-side absolute encoder (Renishaw RESOLUTE 26 b) for end-effector feedback and load-torque estimation.
Worked example B — IMU dead-reckoning drift
Pure inertial position estimation from an IMU integrates accelerometer bias twice. For constant bias b_a, the position error after time t is:
σ_p(t) = ½ · b_a · t²
For four IMU grades, after 60 s of free-inertial flight:
| Grade | Gyro bias | Accel bias | σ_p @ 60 s | σ_p @ 1 hr |
|---|---|---|---|---|
| Consumer MEMS (Bosch BMI088) | ~5 °/hr | 0.5 mg ≈ 4.9 mm/s² | 8.8 m | ~31 km |
| Industrial MEMS (ADI ADIS16505) | 0.5 °/hr | 50 µg ≈ 0.49 mm/s² | 0.88 m | ~3.1 km |
| Tactical (Sensonor STIM320, LN-200) | 0.3 °/hr | 50 µg | 0.88 m | ~3.1 km |
| Navigation FOG (Honeywell HG9900) | 0.003 °/hr | 25 µg ≈ 0.25 mm/s² | 0.44 m | < 1 km |
| Strategic (RLG, e.g. GG1320) | 0.001 °/hr | < 10 µg | < 0.2 m | < 100 m |
(Gyro contribution rotates the gravity vector into the integrated frame, adding a g·sin(b_g · t) ≈ g·b_g·t error to acceleration — the dominant term over seconds for low-cost IMUs.)
Conclusion: every robotics application must fuse the IMU with an external aiding source — GPS, visual-inertial odometry, wheel odometry, ZUPT (zero-velocity update during stand-still), LiDAR-SLAM, or a magnetic compass for heading. See [[Robotics/bayesian-estimation]] and [[Robotics/slam]].
Worked example B-supplement — fusing wheel odometry with a tactical IMU
Consider a 1.0 m wheelbase differential-drive AMR with 200 mm-diameter wheels each driven by a 17-bit absolute magnetic encoder on the motor (gearbox 30:1, so effective wheel resolution = 17 + log2(30) ≈ 22 b). At 1 m/s travel:
- Wheel circumference = π · 0.2 = 0.628 m → counts per metre = 2²² / 0.628 ≈ 6.68 × 10⁶ counts/m.
- Single-count linear resolution ≈ 0.15 µm. Far finer than mechanical noise; the limiting factor is wheel slip and tyre compression, not encoder counts.
- Typical wheel-odometry error in clean indoor operation: 0.5–2 % distance and 1–3 °/m heading. After 100 m, σ_position ≈ 0.5–2 m and σ_heading ≈ several tens of degrees.
Adding an ADIS16505 industrial IMU (gyro bias instability 0.8 °/hr, ARW 0.15 °/√hr):
- Heading uncertainty after 100 m at 1 m/s (100 s of integration): σ_θ = ARW · √(t/3600) = 0.15 · √(100/3600) ≈ 0.025° — three orders of magnitude better than wheel-only heading.
- Gyro bias contribution over 100 s: 0.8 °/hr · (100/3600) ≈ 0.022° — comparable to the ARW contribution.
Fusion result: position from wheel odometry (corrected for wheel slip detected by IMU vs encoder velocity disagreement), heading dominated by IMU. This is the standard “loosely coupled IMU + wheel odom” stack in ROS 2 robot_localization.
Worked example C — Resolver-to-digital conversion sizing
A military-grade brushless servo uses an LTN RE-15-1-A14 resolver with an excitation specification of 7 kHz, 7 V_rms primary, and a transformation ratio of 0.5 (3.5 V_rms peak on the sin/cos outputs). The signals are wired to an AD2S1210 R/D converter configured for 16-bit resolution.
Quantisation step: 360° / 2¹⁶ = 0.0055° ≈ 19.8 arcseconds.
Internal tracking-loop bandwidth at 16-bit resolution is ~1 kHz (datasheet table 13); velocity output is internally differentiated from the angle estimator and is available without external filtering. Maximum tracking rate at this resolution is 1000 rev/s (60 000 rpm) — far above any robotic actuator.
Hardware: the AD2S1210 generates the 7 kHz excitation directly (programmable amplitude); the resolver sin/cos returns through a passive RC anti-alias network (cutoff ~50 kHz) into the chip’s differential ADCs. Total component count: one IC, four resistors, four capacitors, one resolver cable. Compare this to a 17-bit absolute encoder + BiSS-C interface chip + RS-422 transceiver + multi-turn battery backup — the resolver wins on parts count and ruggedness, loses on cost-per-bit and digital integration.
Worked example D — Velocity from quadrature encoders
Two velocity-extraction methods are standard, with crossover ~100 rpm for a typical motor.
M-method (frequency measurement): count quadrature edges N in a fixed sample interval T_s.
ω = (2π · N) / (C · T_s) [rad/s]
where C is counts per revolution. Quantisation error of ±1 count gives Δω = 2π / (C · T_s). At C = 4096 counts/rev and T_s = 1 ms, Δω = 1.53 rad/s — usable at 100 rad/s (1000 rpm range) but useless at 1 rad/s.
T-method (period measurement): time the interval between adjacent edges with a high-frequency counter clock f_clk.
ω = 2π / (C · n_clk / f_clk) where n_clk is the counter reading
Resolution improves at low speed because n_clk grows; degrades at high speed. STM32 TIM3 with 84 MHz clock and a 4096 cpr encoder at 1 rad/s gives n_clk ≈ 84e6 / (4096/(2π)) = 128 800 → 0.0008 % resolution. At 1000 rad/s, n_clk drops to 129 and quantisation is 0.8 %.
M/T method (Ohmae 1982): hybrid — count edges and time the last edge. Used in modern servo drives. Resolution Δω ≈ ω / (n_clk) at all speeds — typically 0.001 % at 100 rpm and above.
In practice, modern absolute-encoder ICs (AS5048, ADIS) output a velocity register internally derived from the tracking loop, sparing the host MCU this arithmetic.
Worked example E — Accelerometer noise floor and tilt resolution
A Bosch BMI088 accelerometer in ±3 g range has noise density 175 µg/√Hz at the digital output. At 100 Hz bandwidth (typical for a tilt sensor):
σ_a = 175 µg · √100 = 1.75 mg
Tilt angle from horizontal accel components: θ ≈ a_x / g. Resolution at this noise level:
σ_θ = σ_a / g = 1.75 mg / 9.81 m/s² ≈ 1.75 × 10⁻³ rad ≈ 0.1° (1σ, at 100 Hz BW)
To resolve 0.01° (e.g. for surveying), reduce BW to 1 Hz: σ_θ ≈ 0.01°. But now the response time is ~1 s — useful for a stationary level but not for a moving platform. This is the noise-bandwidth-response-time triangle every IMU integrator faces.
The ADIS16505, by contrast, has 18 µg/√Hz × √100 = 180 µg = 0.01° tilt at 100 Hz BW. A 10× lower noise floor is what buys “industrial grade” — and costs 5.
4. Design heuristics
Joint position sensing
| Application | Motor side | Output side | Notes |
|---|---|---|---|
| Industrial 6-axis arm (UR, Kuka, ABB) | 17–19 b absolute magnetic (BiSS-C, EnDat 2.2) | 19–21 b absolute (RESOLUTE) on critical joints | Dual encoder enables joint torque sensing via deflection. |
| Cobot (UR, Doosan, Franka) | 17 b absolute single-turn + battery multi-turn | 17–19 b absolute | Safety-rated dual-channel cross-check for PLd Cat 3. |
| Mobile-robot wheel | 1024–4096 line incremental quadrature + index | n/a | Direct output side; reset on docking station. |
| Hobby / research arm | 12–14 b AS5048 / AS5600 magnetic | 12 b on output if any | $30 BOM per joint. |
| Open-source servo (Dynamixel-class) | 12 b magnetic | n/a | Single-turn magnetic, calibrated at factory. |
| Heavy industrial servo (machine tool) | Resolver + R/D | Optical absolute on linear axis | Resolver for survivability at 100 °C+ ambient. |
| Aerospace actuator | Dual redundant resolver | n/a | Triplex / dissimilar for DAL-A. |
Body-level orientation
| Application | Sensor class | Example | Cost |
|---|---|---|---|
| Drone (consumer) | Consumer MEMS 9-DOF + baro | Bosch BMI088 + BMM150 + BMP388 | $5–15 |
| Drone (industrial) | Tactical MEMS dual-IMU | VectorNav VN-100, Microstrain CV7-INS | $1k–5k |
| AGV / AMR | Industrial MEMS + wheel odom + LiDAR-SLAM | Xsens MTi-30, ADI ADIS16505 | $300–2k |
| Autonomous vehicle | Automotive tactical MEMS or FOG | Bosch SMI230 (production), KVH 1750 (R&D) | $1k–20k |
| Walking robot | Industrial MEMS, high-rate | ADI ADIS16470, VectorNav VN-100 | $1k–3k |
| Surface ship | FOG or HRG | Northrop Grumman LN-200, Honeywell HG9900 | $50k–500k |
| Spacecraft / launch | Navigation-grade FOG or HRG | Honeywell HG9900, NG SIRU | $100k–2M |
Magnetometer calibration
A magnetometer reading the Earth’s field (~25–65 µT depending on latitude) is corrupted by:
- Hard-iron — DC offsets from permanent magnetic materials moving with the body (rotor magnets, speakers, ferritic steel). Correct by measuring a 3-axis sphere of orientations and subtracting the centre.
- Soft-iron — distortions from ferromagnetic material that re-shapes the field. The 3D sphere becomes an ellipsoid; fit and invert the transformation.
- Local interference — concrete rebar, structural steel, large currents in nearby DC bus, motor stators. Not correctable; design the magnetometer location 20+ cm from any motor or large steel.
Indoor heading from a 9-DOF MEMS is rarely better than ±5° absolute and may exceed ±30° in steel-framed buildings.
Cable, shielding, sample-rate alignment
- Differential signalling (RS-422, BiSS-C, EnDat, RS-485) for all encoder cables; never single-ended over more than 0.5 m of motor-environment cable.
- 120 Ω termination at the receiver for all RS-422 / BiSS-C runs; mismatched termination causes reflections that look like quadrature glitches.
- Shielded twisted pair with shield grounded at one end (servo drive side, not encoder side, to avoid ground loops).
- Route encoder cables physically separate from motor phase cables — at minimum on opposite sides of a cable tray, ideally in separate conduits.
- Hardware quadrature counting on the MCU (STM32 TIM in encoder mode, RP2040 PIO, NXP eTPU); software polling is rate-limited and glitch-sensitive.
- Hardware timestamping of every sensor sample via PTP / IEEE 1588 (
[[Languages/Tier3/ros2-robotics-config]]) — software timestamps from non-real-time Linux have ms-class jitter and break Kalman filter assumptions. - Sample-rate alignment across the system: encoder 1–10 kHz, IMU 100–1000 Hz, LiDAR 10–25 Hz. Fuse in the IMU frame at the highest rate; interpolate slower sensors.
Signal conditioning for resolvers and bridge-based sensors
- Resolver excitation buffer. The R/D converter’s excitation output (typically ±10 mA, 3–7 V_rms) drives the resolver primary directly for small resolvers but needs a power buffer for industrial sizes. A complementary BJT push-pull (or a class-AB op-amp such as the OPA541 / OPA549) at the carrier frequency is standard; see
[[Engineering/op-amps]]. - Sin/cos differential receiver. The resolver secondaries are floating; ground-loop hum and common-mode pickup is universal. Use a unity-gain instrumentation amplifier (INA126, INA826) with CMRR ≥ 80 dB at 5–10 kHz, or the differential ADC inputs of the AD2S1210 directly.
- Magnetic encoder analog readout. Analog Hall ICs (Allegro A1308, Honeywell SS495A) deliver ratiometric voltage 0.5–4.5 V at 5 V supply. Pair with a 16-bit ratiometric ADC (LTC2378-16, MAX11161) referenced to the same supply for arcminute angle resolution.
- Strain-gauge torque sensor. A quarter-, half-, or full-bridge of 350 Ω foil gauges in a Wheatstone configuration delivers 1–2 mV/V at full scale. INA826 + 24-bit Σ-Δ ADC (ADS1263, AD7124) yields sub-µε resolution at 100 SPS. Calibrate temperature drift in the bridge supply rail.
- EMI on encoder cables. Frame-buffer the differential pair with a TVS array at each end (PESD0402 series), ferrite bead at the connector, and 100 nF X2Y filter capacitor at the receiver entry. PWM motor drives produce dV/dt up to 10 kV/µs at the inverter output; even a metre of unshielded encoder cable couples enough to corrupt quadrature counts without these protections.
Choosing absolute vs incremental encoders
| Constraint | Absolute | Incremental |
|---|---|---|
| Boot-up homing | Not required | Required (must sweep past index) |
| Power-loss recovery | Position preserved (with multi-turn) | Position lost |
| Cost | 2–10× incremental | Lowest |
| Wiring | Serial digital (3–5 wires) | A, B, Z (4–6 wires) |
| Safety rating | Achievable to PLd/SIL2 | Difficult; needs redundant homing |
| Update rate | 1–20 kHz (serial protocol limited) | Effectively unlimited (edge counting) |
| BLDC commutation | Yes (absolute electrical angle on boot) | Needs initial align procedure or Hall sensors |
| Linear-axis use | Tape-scale absolute available | Tape-scale incremental + reference marks |
Rule: for any new design with non-trivial BOM budget, default to absolute. The cost premium is recouped in startup time, safety-cert simplicity, and operator-error tolerance.
Choosing magnetic vs optical encoders
| Factor | Magnetic | Optical |
|---|---|---|
| Resolution ceiling | ~19 b (1.3 arcsec) | ~32 b (0.3 milliarcsec) |
| Cost at 16 b | $10–50 | $300–2000 |
| Oil / dust tolerance | Excellent | Poor (needs sealed housing) |
| Magnetic interference tolerance | Poor (steel/motors) | Excellent |
| Operating temperature | −40 to +125 °C | −20 to +85 °C (LED-limited) |
| Shock survival | 10 000 g | 100–500 g |
| Air gap sensitivity | Yes (0.5–3 mm window) | No (rigid mount required) |
| Vibration resistance | Excellent | Moderate (read-head alignment) |
For mobile robots, AGVs, and field-deployed equipment: magnetic. For metrology, machine tools, lab robots: optical. For most arms: a magnetic motor-side + (optional) optical output-side hybrid.
Bandwidth and aliasing in motion control
Servo control bandwidth is conventionally set at 1/10 of the sample rate. For a 1 kHz position servo, the sensor must be sampled at ≥ 10 kHz and have ≥ 1 kHz bandwidth. Mechanical resonances (gearbox tooth-mesh, belt natural frequency, structural modes) often fall in 50–500 Hz and will alias if the sensor sample rate is too low. Anti-alias options:
- Hardware low-pass before the ADC (RC, Butterworth Sallen-Key) with cutoff below f_s/2.
- Sigma-delta ADC with built-in decimation filter (most modern industrial ADCs).
- Oversample-and-decimate: sample at 10–100× the control rate, decimate in FIR; trades MCU MIPS for analog circuit complexity.
For an IMU, the internal LPF cutoff is configurable (BMI088: 5 Hz to 280 Hz selectable). Set it to ~1/5 the host sample rate to avoid aliasing without losing useful bandwidth.
5. Components & sourcing — real parts
Optical absolute rotary encoders
| Vendor | Part | Resolution | Interface | Notes |
|---|---|---|---|---|
| Renishaw | RESOLUTE | 26–32 b | BiSS-C, Yaskawa, FANUC | Industry-leading absolute accuracy. |
| Renishaw | Aksim2 MBA / MBD | 19 b | BiSS-C, SSI | Magnetic, lower cost, robust. |
| Heidenhain | ECN 1300 / ROC 1300 | 18–25 b | EnDat 2.2 | Servo standard since 2000s. |
| Heidenhain | LIC 4119 | 1 nm linear | EnDat 2.2 | Inductive, linear, EMI-immune. |
| RLS | RM44 / RM58 / Orbis | 14–19 b | SSI, BiSS-C, ABZ | Compact magnetic. |
| Broadcom | AEAT-9000 | 17 b | SSI, SPI | High-volume servo. |
| US Digital | E5 / E6 | up to 10 000 cpr incremental | ABZ | Hobbyist / OEM, low cost. |
Magnetic encoder ICs
| Vendor | Part | Resolution | Notes |
|---|---|---|---|
| AMS Osram | AS5047P | 14 b | PWM, SPI, ABZ output. Drone gimbals. |
| AMS Osram | AS5048A / B | 14 b | I²C, SPI. Hobby and cobot use. |
| AMS Osram | AS5600 | 12 b | I²C, $1, eval-board friendly. |
| AMS Osram | AS5311 | 12 b linear | Linear-magnetic strip, $20. |
| Allegro | A1335 / A1339 | 12 b | Stress-compensated Hall, automotive. |
| Melexis | MLX90316 / MLX90364 | 14 b | Automotive-grade. |
| iC-Haus | iC-MU / iC-PT | 13 b, 14 b | High-pole magnetic ring; up to 600 000 rpm. |
| Renesas | IPS2200 | 12 b absolute | Inductive principle in IC package. |
Resolvers and R/D converters
| Vendor | Part | Notes |
|---|---|---|
| Tamagawa | TS2620N series, SmartCoder TS5667N | Industrial servo standard in Japan. |
| LTN Servotechnik | RE-15, RE-21 | German industrial resolver. |
| Singer / Kearfott | Type II resolvers | Aerospace, MIL-PRF-21800. |
| Moog | Component-level resolvers | Military / aerospace. |
| Analog Devices | AD2S1210, AD2S1205 | 10–16 b R/D, integrated excitation. |
| Texas Instruments | PGA411-Q1 | Automotive R/D for traction motors. |
MEMS IMUs (consumer to industrial)
| Vendor | Part | Class | Gyro bias instability | Notes |
|---|---|---|---|---|
| Bosch | BMI088 | Drone / AR | 2 °/hr | Dual-core (separate gyro+accel die), low cross-axis sensitivity. |
| Bosch | BMI270 | Phone / wearable | 5 °/hr | Standard phone-class. |
| TDK InvenSense | ICM-42688-P | Drone | 2.5 °/hr | EoL replacement for MPU-9250 line. |
| TDK InvenSense | ICM-45686 | Tactical-lite | 0.6 °/hr | 2024 release; competitive with low-end ADIS. |
| ST | LSM6DSOX / LSM6DSV16X | Industrial light | 3 °/hr | Embedded ML core; cobot wrist IMUs. |
| ST | ASM330LHHX | Automotive | 2 °/hr | AEC-Q100, ADAS. |
| Analog Devices | ADIS16470 / 16475 | Industrial | 2 °/hr | Pre-calibrated, SPI. |
| Analog Devices | ADIS16505 / 16500 | Industrial / tactical | 0.8 °/hr | Aircraft, robotic platforms. |
| Analog Devices | ADIS16575 | Tactical | 0.5 °/hr | Drone gimbal, surveying. |
| Honeywell | HG1700 | Tactical | 1 °/hr | Mil-spec MEMS, ITAR. |
| Honeywell | HG4930 | Industrial tactical | 0.25 °/hr | Aviation, robotics. |
| Sensonor | STIM300 / STIM320 | Tactical | 0.3 °/hr | Norwegian aerospace MEMS. |
| Northrop Grumman | LN-200 | Tactical (FOG inside) | 1 °/hr | Military de-facto. |
Fibre-optic and ring-laser IMUs
| Vendor | Part | Class | Gyro bias | Notes |
|---|---|---|---|---|
| KVH | DSP-1750, 1775 IMU | Tactical FOG | 0.05 °/hr | Marine, ground vehicle autonomy. |
| Northrop Grumman | LR-100 | Tactical FOG | 0.01 °/hr | Aerospace. |
| Honeywell | HG9900 | Navigation RLG | 0.003 °/hr | Commercial aviation. |
| Honeywell | GG1320 | Navigation RLG | 0.001 °/hr | The 787 / A350 INS. |
| Fizoptika | VG051 | Tactical FOG | 0.5 °/hr | Russian-origin, single-axis. |
GNSS-INS combos
| Vendor | Part | Notes |
|---|---|---|
| Septentrio | AsteRx-i, mosaic-H | Surveying-grade RTK + integrated MEMS IMU. |
| NovAtel | SPAN family | Tightly-coupled GNSS-INS, geodetic-grade. |
| Xsens | MTi-680G | RTK GNSS + industrial MEMS IMU. |
| VectorNav | VN-300 | Dual-antenna GNSS + MEMS. |
| Trimble | BD992-INS | RTK + integrated INS. |
6. Reference data
Encoder resolution vs application
| Application | Typical resolution | Encoder family |
|---|---|---|
| Industrial servo motor (AC) | 17–24 b absolute | Optical / magnetic absolute, BiSS-C / EnDat |
| Robotic arm joint (industrial) | 17–19 b motor + 19–21 b output | Magnetic + optical absolute |
| Cobot joint | 17 b magnetic absolute | BiSS-C |
| Mobile-robot drive wheel | 12–14 b effective (4 096 cpr quadrature) | Incremental optical |
| Drone gimbal | 14 b magnetic | AS5047 |
| Hobby servo | 10–12 b | AS5600 / potentiometer |
| Hobby stepper | 200 step/rev open-loop ± 14 b closed | AS5048 + STM32 |
| Linear servo (machine tool) | 1–10 nm | Optical / inductive scale |
| Aerospace actuator | 14–16 b + redundancy | Dual resolver + R/D |
IMU performance grade ladder
| Class | Gyro bias | ARW | Accel bias | VRW | Example | Cost |
|---|---|---|---|---|---|---|
| Phone / wearable | 10–50 °/hr | 0.3 °/√hr | 1–5 mg | 0.5 m/s/√hr | BMI270 | $1–5 |
| Consumer drone | 5–10 °/hr | 0.2 °/√hr | 0.5 mg | 0.15 m/s/√hr | BMI088 | $5–15 |
| Industrial MEMS | 0.5–5 °/hr | 0.1 °/√hr | 50–500 µg | 0.05 m/s/√hr | ADIS16475 | $300–1k |
| Tactical MEMS | 0.1–0.5 °/hr | 0.05 °/√hr | 30–100 µg | 0.03 m/s/√hr | ADIS16505, STIM320 | $1k–5k |
| Tactical FOG | 0.01–0.1 °/hr | 0.01 °/√hr | 20–50 µg | 0.02 m/s/√hr | KVH 1750, LN-200 | $5k–30k |
| Navigation FOG/RLG | 0.001–0.01 °/hr | 0.002 °/√hr | 10–25 µg | 0.005 m/s/√hr | HG9900, GG1320 | $80k–300k |
| Strategic (HRG, marine) | < 0.001 °/hr | < 0.001 °/√hr | < 5 µg | < 0.001 m/s/√hr | NG SIRU | $500k+ |
Digital encoder interfaces
| Interface | Bits per packet | Max clock | Cable | Notes |
|---|---|---|---|---|
| ABZ quadrature | n/a (incremental) | up to ~10 MHz/edge | RS-422 differential | Universal; needs index for absolute reference. |
| SSI | 12–32 | 1–2 MHz | RS-422 | Simple, unidirectional; legacy. |
| BiSS-C | up to 64 | 10 MHz | RS-422 | Open standard; bidirectional config. |
| EnDat 2.2 | up to 50 | 16 MHz | RS-485 | Heidenhain proprietary; bidirectional, includes diagnostics. |
| Hiperface DSL | up to 39 | 9.375 MHz | Single twisted pair (over motor cable) | Sick proprietary; combines power and data. |
| FANUC, Yaskawa, Mitsubishi serial | varies | ~2.5–4 MHz | RS-485 | Vendor-locked, proprietary. |
| SPI absolute | 12–24 | 10 MHz | Short single-board | For on-board magnetic IC reads (AS5048, etc.). |
Magnetometer types
| Type | Sensitivity | Bandwidth | Range | Notes |
|---|---|---|---|---|
| Hall-effect | mT-class | DC–MHz | wide | Open-loop, cheap, low resolution; current sensing. |
| AMR (anisotropic MR) | µT-class | DC–10 MHz | ±2 mT | HMC1043, robotic compasses. |
| GMR (giant MR) | nT–µT | DC–1 MHz | ±0.5 mT | Lower noise than AMR; storage industry origin. |
| TMR (tunneling MR) | pT–nT | DC–100 kHz | ±0.1 mT | Lowest noise solid-state; emerging in compasses. |
| Fluxgate | nT | DC–1 kHz | ±0.5 mT | High-precision compasses, geophysics. |
| SQUID | fT | DC–10 kHz | sub-µT | Lab / medical (MEG); cryogenic. |
Gyroscope technology trade-offs
| Technology | Bias instability | ARW | Operating life | Cost | Notes |
|---|---|---|---|---|---|
| MEMS Coriolis (vibrating mass) | 0.05–10 °/hr | 0.005–0.5 °/√hr | > 10 yr | $1–5k | Low SWaP, sensitive to vibration. |
| FOG (interferometric fibre) | 0.001–0.5 °/hr | 0.0005–0.05 °/√hr | > 15 yr | $5k–50k | No moving parts; Sagnac phase. |
| RLG (ring laser) | 0.001–0.01 °/hr | 0.0003 °/√hr | 5–10 yr | $30k–300k | Helium leak limits lifetime. |
| HRG (hemispherical resonator) | < 0.001 °/hr | < 0.0001 °/√hr | > 20 yr | $50k–1M | Highest performance, emerging space-craft. |
| DTG (dynamically tuned, rotor) | 0.01 °/hr | 0.003 °/√hr | < 10 yr | $20k–100k | Legacy aerospace; being phased out. |
| Spinning mass (mechanical) | 0.01 °/hr | n/a | < 10 yr (bearing wear) | $5k–50k | Submarine INS; obsolete. |
Accelerometer technology trade-offs
| Technology | Noise density | Range | Bandwidth | Notes |
|---|---|---|---|---|
| MEMS capacitive | 10–200 µg/√Hz | ±2 to ±200 g | DC–4 kHz | Bosch, ST, ADI mainstream. |
| MEMS piezoresistive | 50–500 µg/√Hz | ±50 to ±10 000 g | DC–10 kHz | Impact / shock test (Endevco). |
| Piezoelectric (PE/IEPE) | 1–10 µg/√Hz | ±1 to ±500 g | 1 Hz–20 kHz | Vibration monitoring; no DC. |
| Force-balance / servo | 0.1–1 µg/√Hz | ±0.05 to ±50 g | DC–1 kHz | Gravimetry, inertial nav (Q-Flex, QA-3000). |
| Capacitive bulk (etched silicon) | 0.01–0.1 µg/√Hz | ±0.01 to ±5 g | DC–500 Hz | Seismometry, gravity gradiometry. |
| Optical / atom-interferometric | sub-µg/√Hz absolute | ±very small | < 100 Hz | Research / metrology only. |
7. Failure modes & debugging
- Encoder index miss — power-up homing requires the index pulse Z to be unambiguously detected. A noisy Z line, slow homing motion past the index, or a too-narrow Z capture window in firmware causes the controller to miss the index and report absolute position offset by exactly one revolution. Mitigation: hardware-latch the index in the quadrature timer; verify Z width spans at least one A/B count.
- Quadrature noise glitches — a single spurious A or B edge causes a count error of +4 (in one direction) and breaks the modulo-arithmetic invariants. Mitigation: hardware digital filter on input, hardware quadrature decoder (not software polling), short cable runs with proper differential termination.
- Mechanical slip on the shaft — set-screw or press-fit slips; encoder position drifts relative to mechanical position. Inspect with periodic homing-cycle checks. Loctite 263 (red, permanent) for production, 243 (blue, removable) for prototype.
- Differential-pair imbalance — one of A or B becomes single-ended due to receiver / driver damage or marginal common-mode. Quadrature decoder gives plausible counts but with intermittent direction reversal. Probe both polarities of the differential pair on an oscilloscope; they should be mirror images.
- Magnetic encoder field decay — the rotor magnet weakens with thermal cycling or after physical shock. Manifests as the AS5048’s “MAGNHIGH” / “MAGNLOW” diagnostic flag, then as an angle DC offset that drifts with temperature. Replace the magnet (typically a 6 × 2.5 mm NdFeB diametral disk).
- Magnet eccentricity — the diametral magnet is not concentric with the shaft. Manifests as a first-harmonic position-dependent error: one part of the rotation reports +2°, the opposite part −2°. Calibrate via a high-resolution reference encoder or Fourier-decompose the closed-loop position error.
- Resolver carrier coupling — the 7 kHz carrier appears on adjacent analog signals via the cable harness. Manifests as a 7 kHz spectral line in current-sense or torque-feedback signals. Mitigation: route resolver cable separately; common-mode-choke the resolver pairs at the drive entry.
- IMU bias drift over temperature — most MEMS gyro bias varies 0.1–1 °/hr per °C (BMI088 datasheet table 6.4: ±0.05 °/s typical between −40 °C and +85 °C, which is ±180 °/hr over the full range). Mitigation: thermal calibration table loaded at boot (factory or self-collected during warm-up); compensate bias as a function of die-temperature reading from the IMU itself.
- Magnetometer interference — DC and AC magnetic interference from motors, speakers, batteries, current carrying wires. Indoors, ferromagnetic environment (rebar, beams) corrupts heading by up to ±90°. Diagnose by rotating the robot in place and watching whether reported heading sweeps a clean 360° circle or a distorted ellipse. Compensate hard-iron / soft-iron, but accept that indoor magnetic heading is unreliable.
- Accelerometer vibration aliasing — accelerometer Nyquist may be below the structural vibration spectrum (motor harmonics, propeller blade-pass, gearbox tooth-mesh). Aliased noise corrupts orientation estimate. Mitigation: mechanical isolation (silicone gel, butyl mounts, viscoelastic dampers); set IMU internal low-pass filter cutoff below the lowest aliasing frequency; or sample at full IMU bandwidth and digitally filter in software.
- Sample-time jitter — Linux SCHED_OTHER scheduling can introduce ms-class jitter on user-space sensor reads; this jitter masquerades as additional sensor noise in any Kalman filter assuming fixed Δt. Mitigation: SCHED_FIFO + isolated CPU core + PREEMPT_RT kernel, or move sampling to a hardware DMA-driven path with timestamp on the sample, not on the read.
- Time sync drift — encoder, IMU, LiDAR sampled by different MCUs / hosts drift apart by µs–ms over minutes. Manifests as inconsistent state-estimator residuals on platform manoeuvres. Mitigation: PTP / IEEE 1588 across the platform (
[[Languages/Tier3/ros2-robotics-config]]), or trigger all sensors from a common hardware sync pulse. - Cold-start gyro warmup — MEMS gyros need 10–60 s to reach a stable bias point. Robots that start moving immediately after power-on will see a slow bias transient integrated into heading. Mitigation: enforce a “stand still + warm up” sequence at boot; estimate bias from accelerometer-derived gravity during the wait.
- MEMS axis misalignment — published axes of the IMU are silicon-die directions and may deviate from the package outline by ±0.5°–1° (Bosch BMI088 datasheet table 6.5). For high-accuracy applications, calibrate the misalignment as a 3×3 rotation embedded in the body-frame transform.
- Cross-axis sensitivity — a sense-axis accelerometer also responds to off-axis acceleration; typically 1–3 % cross-talk in consumer MEMS, < 0.1 % in industrial. Visible in tip-over or roll tests as orthogonal-axis residuals.
- G-sensitivity of gyros (g-bias) — MEMS gyros report a non-zero rate under sustained linear acceleration. Typical 0.01–0.1 °/s/g in consumer, < 0.001 °/s/g in industrial. Manifests during sustained turns on a road vehicle as a heading bias proportional to lateral g.
- Magnetic encoder air-gap sensitivity — the magnet-to-IC air gap (typically 0.5–3 mm) must be controlled to ±0.2 mm; outside this window the signal amplitude either saturates the sensor or drops below the noise floor. Always provide a mechanical reference surface and shim during assembly.
- Encoder ageing — optical encoder LEDs degrade in luminous output (~30 % drop over 50 000 hours); modern encoders compensate internally via servo-controlled LED current. Magnetic encoder magnets lose 1–2 % field per year at room temperature, faster at high T. Plan for end-of-life recalibration after 5–10 years in industrial duty.
Common debugging recipes
| Symptom | First check | Second check |
|---|---|---|
| Position drift between homings | Set-screw / coupling slip | Encoder cable termination |
| 1× per revolution sinusoidal error | Magnet eccentricity | Bearing radial play |
| 2× per revolution error | Disk-to-detector tilt | Bridge resistor mismatch |
| Heading drift during straight drive | Gyro bias not calibrated | Magnetometer interference |
| Quadrature glitches at speed | Differential pair signal integrity | Hardware filter on inputs |
| IMU “rotating” when stationary | Pre-warmup readings used | Thermal transient on bias |
| Loss of absolute multi-turn after power-cycle | Backup battery depleted | Wiegand count miscount |
8. Case studies
Universal Robots UR5e joint sensing
Each of the six joints in the UR5e (2018-onwards generations) uses a Renesas (formerly IDT) iC-MU150-class 19-bit single-turn magnetic absolute encoder at the motor side, paired with a battery-backed multi-turn counter for absolute homing across power cycles. The drive uses BiSS-C over a single twisted pair embedded in the joint’s combined motor/encoder/safety cable.
For the safety function (rated PLd Cat 3 under ISO 13849-1), the position is read by two independent silicon channels on the same magnet, with a cross-check at each safety-controller cycle (4 ms). A divergence of more than ±0.1° between channels triggers a Cat-2 safety stop. There is no separate output-side encoder; output deflection is inferred from the difference between commanded torque and the harmonic-drive stiffness model — used for collision detection but not for absolute end-effector positioning.
DJI Mavic 3 flight-control sensing
The Mavic 3 main flight controller integrates two redundant MEMS IMUs — a TDK ICM-42688-P and a Bosch BMI088 — sampled at 8 kHz, with internal disagreement triggering a single-IMU failover. A third Bosch BMM150 magnetometer plus a BMP388 barometer extend the state to 10-DOF; an O+ GNSS chipset adds dual-band GPS / GLONASS / Galileo / BeiDou at 10 Hz. For RTK-equipped variants, centimetre positioning fuses ground-station corrections at 1 Hz.
Each motor uses a TI DRV8323-class FET driver with hall-sensor back-EMF commutation — no rotor encoder. Position estimation in flight comes entirely from the IMU + GNSS + downward-facing time-of-flight + obstacle-avoidance vision; pure inertial drift between GNSS fixes is acceptable because the platform is air-supported and rarely operates beyond LOS or for more than a few seconds between fixes.
NASA Mars 2020 Perseverance rover
Perseverance’s primary inertial reference is the Honeywell MIMU (Miniature Inertial Measurement Unit), a navigation-grade unit derived from the same family as HG9900, with ring-laser gyros (bias < 0.01 °/hr) and quartz-flexure accelerometers (bias < 50 µg). The MIMU is mounted in the rover body and provides the attitude reference for everything from solar-array pointing to RIMFAX ground-penetrating radar geo-referencing.
Translation is dead-reckoned by wheel odometry (encoder counts on each of six independently driven wheels), corrected continuously by visual odometry running on a Xilinx Virtex-5QV FPGA companion to the RAD750 main CPU. Long-traverse accuracy is sub-meter over kilometres of drive — VO catches wheel slip on dunes that wheel odometry alone misses by metres per 100 m driven. The IMU is the bias-stable reference the VO and wheel-odometry residuals are computed against; without it, attitude drift would corrupt the VO baseline.
Boston Dynamics Spot leg-state sensing
Each of Spot’s twelve actuators (3 per leg × 4 legs) uses an integrated motor-side magnetic absolute encoder for commutation and a secondary output-side encoder downstream of the planetary reduction for torque and position feedback. Output-encoder differential between commanded and measured position is the basis of the series-elastic compliance estimate for whole-body control. The body IMU is an industrial-grade MEMS (publicly cited at the ADIS16470 class, gyro bias ~2 °/hr, 8 kHz internal rate) mounted near the centre of mass. Foot contact is inferred from a fusion of leg-force estimate (from joint torques and dynamics model), accelerometer impulse signature, and body-rate integration — the IMU is essential because direct foot-contact switches were found unreliable on rough terrain.
Tesla Autopilot inertial stack (production vehicle)
Tesla’s Autopilot HW3 / HW4 platforms use a triplex-redundant automotive MEMS IMU (Bosch SMI230 class, AEC-Q100 qualified, gyro bias ~10 °/hr) fused with dual-band GNSS, four wheel-encoders (50–100 cpr Hall sensors on each ABS ring), eight cameras, and 12 ultrasonics. The IMU provides body roll/pitch/yaw rate for the dynamic stability control loop (>100 Hz inner loop) and for vehicle-frame-to-world-frame rotation of the camera-derived motion vectors. ITAR is not a concern at this performance grade; the volume drives the BOM to under $20 per IMU.
Universal arm gravity compensation via IMU on the wrist
A common research-arm trick: glue a 9-DOF IMU to the wrist flange of an industrial arm. The accelerometer measures the gravity vector in the wrist frame at rest; comparing it to the kinematically predicted vector exposes the cumulative joint-encoder calibration error. After collecting samples at ~50 random poses, a least-squares fit recovers each joint’s offset to ~0.01° — better than the factory calibration on most arms. This is the workflow used by hand_eye_calibration and many ROS arm-bringup packages.
9. Cross-references
[[Robotics/kinematics-dh]]— forward kinematics consumes joint-angle measurements from the encoders in this note to compute end-effector pose.[[Robotics/dynamics-rigid-body]]— body-level acceleration, rate, and orientation feed the rigid-body dynamics equations.[[Robotics/motors-electric]]— encoder choice is dictated by commutation requirement (absolute for BLDC startup, incremental sufficient for brushed DC).[[Robotics/sensors-perception]]— exteroceptive sensors (LiDAR, RGB-D, ToF, radar) that work alongside the proprioceptive sensors here; vision-inertial odometry tightly couples them.[[Robotics/bayesian-estimation]]— Kalman / EKF / UKF / particle filter fusion of multi-rate, multi-sensor data from this note.[[Robotics/slam]]— SLAM front-ends ingest IMU pre-integrated factors and wheel-encoder constraints as relative-pose edges.[[Engineering/op-amps]]— analog signal conditioning for resolvers, bridges, and ratiometric magnetic encoders.[[Engineering/semiconductor-devices]]— Hall-effect physics, MOSFET / BJT comb-drive electronics behind MEMS sensors.[[Engineering/electromagnetics-engineering]]— resolver transformer theory; magnetic-field sensor principles.[[Languages/Tier3/robotics-control]]— ROS 2 / DDS / control-system description languages that consume the sensor topics.
10. Citations
- Kuipers, J. B. (1999). Quaternions and Rotation Sequences. Princeton University Press. Canonical reference for the SO(3) / quaternion algebra used by every AHRS.
- Titterton, D. H. & Weston, J. L. (2004). Strapdown Inertial Navigation Technology (2nd ed.). IET / AIAA. The standard textbook on IMU mechanisation, sensor errors, and INS algorithms.
- Groves, P. D. (2013). Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems (2nd ed.). Artech House. The reference for fusion-architecture trade-offs (loose vs tight vs ultra-tight coupling).
- El-Sheimy, N., Hou, H. & Niu, X. (2008). “Analysis and Modeling of Inertial Sensors Using Allan Variance.” IEEE Transactions on Instrumentation and Measurement, 57(1), 140–149. DOI 10.1109/TIM.2007.908635. The standard procedure for extracting ARW, bias instability, and rate random walk from an IMU.
- Farrell, J. A. (2008). Aided Navigation: GPS with High Rate Sensors. McGraw-Hill. Practical implementation of GNSS-aided INS.
- Barbour, N. & Schmidt, G. (2001). “Inertial Sensor Technology Trends.” IEEE Sensors Journal, 1(4), 332–339. Survey of MEMS / FOG / RLG technology curves.
- Bosch Sensortec (2024). BMI088 6-Axis IMU datasheet rev 1.6.
- TDK InvenSense (2024). ICM-42688-P High-Performance 6-Axis MEMS MotionTracking Device datasheet rev 2.1.
- Analog Devices (2023). ADIS16505 Precision, Miniature MEMS IMU datasheet rev B.
- Analog Devices (2017). AD2S1210 Variable Resolution, 10-Bit to 16-Bit R/D Converter datasheet rev D.
- AMS Osram (2023). AS5048A/B 14-Bit Rotary Position Sensor datasheet v2-04.
- Honeywell (2022). HG4930 MEMS Inertial Measurement Unit product brochure.
- Honeywell (2018). HG9900 Inertial Measurement Unit product brochure.
- Renishaw (2024). RESOLUTE Absolute Optical Encoder installation guide.
- Heidenhain (2024). ECN/EQN Rotary Encoders with EnDat 2.2 product catalog.
- IEEE Std 952-2020. IEEE Standard Specification Format Guide and Test Procedure for Single-Axis Interferometric Fiber Optic Gyros.
- IEEE Std 1554-2005. IEEE Recommended Practice for Inertial Sensor Test Equipment, Instrumentation, Data Acquisition, and Analysis.
- ISO 13849-1:2023. Safety of machinery — Safety-related parts of control systems. PLd Cat 3 cross-check architecture for dual-channel encoder readback.
- VectorNav Technologies (2023). VN-100 / VN-200 / VN-300 Industrial Series product specifications.
- Renesas (2024). iC-MU/iC-PT Magnetic Encoder IC datasheet rev 1.4.
- Sensonor (2023). STIM320 Tactical Grade MEMS IMU datasheet rev 23.