An IMU, short for inertial measurement unit, is the small chip in phones, drones, watches and VR headsets that senses how a device moves and tilts. It doesn’t report position or direction directly. It reports raw pushes and turns, and software has to turn those into something useful. Those raw readings also pile up small errors over time, so almost every real device leans on a second source of truth to stay accurate.
The Three Sensors Inside an IMU
Each sensor in an IMU covers one kind of motion. An accelerometer measures speeding up, slowing down and the constant pull of gravity along three directions. Even when a device sits perfectly still, the accelerometer feels gravity, and that tells it which way is down. A gyroscope measures how fast the device is rotating around each of its three axes.
Each has a blind spot. Accelerometers cannot sense turning around the vertical axis, like spinning a phone flat on a table.1PubMed Central. 9-DOF IMU-Based Attitude and Heading Estimation Using an Extended Kalman Filter with Bias Consideration Gravity still lines up with the axes the same way during that spin, so the numbers don’t change. Tilting is different: tilting a flat phone shifts part of gravity’s pull onto the other axes, and the split between axes gives the tilt angle. That’s why tilt and roll can come from the accelerometer, while compass heading needs help.
Many IMUs add a magnetometer, a tiny compass that senses Earth’s magnetic field, to track that heading.1PubMed Central. 9-DOF IMU-Based Attitude and Heading Estimation Using an Extended Kalman Filter with Bias Consideration A combined accelerometer, gyroscope and magnetometer is often called a 9-axis or 9-DoF IMU, three axes per sensor.2Int. Arch. Photogramm. Remote Sens. Spatial Inf. Sci.. Statistical Sensor Fusion of a 9-DoF MEMS IMU for Indoor Navigation
On a spec sheet, an axis is simply one direction. A 6-axis IMU has an accelerometer and a gyroscope, three axes each.
An IMU is also not a GPS. It measures motion relative to where it started, not where you are on a map. Because it needs nothing external, it works indoors, underground and without signal. Phones and cars pair it with GPS rather than replacing one with the other.
How Tiny Chips Feel Motion
Inside an accelerometer chip, a microscopic weight hangs on springs and shifts when the device accelerates.3Micromega Dynamics. What Is a MEMS Accelerometer and How It Works The mass sits between sets of tiny plates, and as it moves, the gap between plates changes.3Micromega Dynamics. What Is a MEMS Accelerometer and How It Works That changing gap changes the plates’ capacitance, their ability to hold electric charge.4Maker Portal. Introduction To Capacitive MEMS Accelerometers and A Case Study On An Elevator Reading circuits convert that change into an electrical signal,5Artıbilim: Adana Alparslan Türkeş Bilim ve Teknoloji Üniversitesi Fen Bilimleri Dergisi. MEMS capacitive accelerometer: A review and the chip’s electronics translate the signal into an acceleration number.3Micromega Dynamics. What Is a MEMS Accelerometer and How It Works
The capacitance change is extremely small, so the circuitry amplifies it before anything else happens. An analog-to-digital converter then turns the voltage into a whole number, which the chip reports as a raw count. Settings such as the measuring range decide how many counts correspond to one unit of acceleration.
A chip gyroscope works differently. It keeps a tiny mass vibrating back and forth constantly.6Sensors and Actuators, A: Physical. A parametrically amplified MEMS rate gyroscope When the device rotates, the Coriolis effect pushes the vibrating mass sideways, at right angles to its vibration.6Sensors and Actuators, A: Physical. A parametrically amplified MEMS rate gyroscope The size of that sideways motion reveals how fast the device is turning.7Physical Review A. Coriolis-force-induced coupling between two modes of a mechanical resonator for detection of angular velocity The sensing element is built as a mass, a spring and a damper, like a miniature shock absorber.8PubMed Central. Coriolis Vibratory MEMS Gyro Drive Axis Control with Proxy-Based Sliding Mode Controller
These sensors fit in a phone because they are carved from silicon with chip-making methods, hence the name MEMS. Their moving parts are thinner than a hair, which keeps them cheap and low-power.
Why IMU Readings Drift
Software adds up gyroscope rotation rates over time to get the device’s angle. To get position, it must add up acceleration twice, once for speed and again for distance.9arXiv. RIDI: Robust IMU Double Integration Any small error in acceleration therefore grows faster and faster in the position estimate. An IMU used alone suffers cumulative errors in position.10Mechanical Systems and Signal Processing. GNSS/IMU/LiDAR fusion for vehicle localization in urban driving environments within a consensus framework This slow build-up of error is called drift.
Several kinds of error feed drift. Every reading carries random noise, a jitter that slowly blurs speed and angle estimates over time.11PubMed Central. Precision and Error Propagation in Static MEMS-IMU Inertial Navigation: A Stochastic Time-Series Analysis Sensors also have bias, a small offset that makes them read slightly off even when still, and that offset itself wanders.12PubMed Central. A Comparison between Different Error Modeling of MEMS Applied to GPS/INS Integrated Systems Some errors behave like a random walk, slowly wandering away with no fixed pattern.13PubMed Central. Strapdown Inertial Navigation Systems for Positioning Mobile Robots—MEMS Gyroscopes Random Errors Analysis Using Allan Variance Method In a smartphone’s sensors, accelerometer noise alone builds about 0.16 to 0.2 meters per second of speed error per hour of use, even sitting still.11PubMed Central. Precision and Error Propagation in Static MEMS-IMU Inertial Navigation: A Stochastic Time-Series Analysis
Temperature adds large errors in cheap sensors. In one low-cost IMU, warming across its full temperature range shifted the gyroscope’s offset by up to 2,000 degrees per hour.14PubMed Central. Fast Thermal Calibration of Low-Grade Inertial Sensors and Inertial Measurement Units Without correction, a warming sensor can think it is turning when it isn’t. Rapid temperature changes make these errors harder to pin down than slow ones.15PubMed Central. Thermal calibration for triaxial gyroscope of MEMS-IMU based on segmented systematic method
In daily use, drift looks like a phone compass or map arrow slowly pointing the wrong way, a VR scene that gradually rotates while you hold your head still, or a game controller cursor creeping off center. Recalibrating, or waving the phone in a figure eight, often helps the compass.
Blending Sensors Into Reliable Orientation
The gyroscope is smooth and fast over short periods but drifts over longer ones. The accelerometer’s sense of gravity is jittery moment to moment yet doesn’t drift.16vanhunteradams.com. How IMU Data Works: From Sensors to Real-World Uses Blending the two is called sensor fusion. One simple method, a complementary filter, smooths out the accelerometer and keeps only quick changes from the gyroscope, getting the best of both.16vanhunteradams.com. How IMU Data Works: From Sensors to Real-World Uses The magnetometer corrects gyroscope drift in compass heading.1PubMed Central. 9-DOF IMU-Based Attitude and Heading Estimation Using an Extended Kalman Filter with Bias Consideration With all three sensors, a 9-axis IMU can track 3D orientation without long-term drift, as long as the magnetic field isn’t disturbed.2Int. Arch. Photogramm. Remote Sens. Spatial Inf. Sci.. Statistical Sensor Fusion of a 9-DoF MEMS IMU for Indoor Navigation
The filter works in a loop. At each step it takes the previous angle and advances it using the gyroscope’s turn rate. It then nudges that result a small amount toward the angle implied by the accelerometer’s gravity direction. Because the nudge is small, quick gyroscope movements dominate in the short term, while the steady accelerometer pull gradually removes drift.
The magnetometer can be fooled. Steel, magnets, speakers and electrical wiring distort the magnetic field nearby, and the compass reading then pulls heading the wrong way. Good systems detect and discount disturbed readings. Strong sudden acceleration similarly confuses the gravity reference.
Different fusion recipes trade speed for flexibility. The Madgwick filter needs only about 109 basic calculations per update and works at just 10 readings per second, so it suits small, battery-powered devices with little processing power.17N/A. An efficient orientation filter for inertial and inertial/magnetic sensor arrays The Mahony filter ran fastest in a quadcopter flight test, while the more general Kalman filter was slowest.18arXiv. Comparison of Euler Estimate using Extended Kalman Filter, Madgwick and Mahony on Quadcopter Flight Data The Kalman filter earns its cost because it can easily take in extra sources such as GPS or air pressure.18arXiv. Comparison of Euler Estimate using Extended Kalman Filter, Madgwick and Mahony on Quadcopter Flight Data Kalman filters are commonly used to combine an IMU with cameras on robots.19PubMed Central. Pose Estimation of a Mobile Robot Based on Fusion of IMU Data and Vision Data Using an Extended Kalman Filter Many devices store orientation as a set of four numbers rather than simple tilt angles, which behave badly when the device points straight up.
How Devices Keep Position From Drifting
Moments of known stillness reset the error. When an IMU is worn on the foot, each step has an instant when the foot is flat and not moving.20International Global Navigation Satellite Systems Society Symposium Proceedings. Zero velocity update with stepwise smoothing for inertial pedestrian navigation Software can reset speed to zero at that instant.20International Global Navigation Satellite Systems Society Symposium Proceedings. Zero velocity update with stepwise smoothing for inertial pedestrian navigation That keeps position errors from growing between steps.21PubMed Central. Novel Drift Reduction Methods in Foot-Mounted PDR System The catch is that correcting at every step can make the traced path look jerky.20International Global Navigation Satellite Systems Society Symposium Proceedings. Zero velocity update with stepwise smoothing for inertial pedestrian navigation
Outside references correct drift too. Cars combine IMU data with GPS and lidar map-matching to correct its growing errors.10Mechanical Systems and Signal Processing. GNSS/IMU/LiDAR fusion for vehicle localization in urban driving environments within a consensus framework Low-cost GPS, IMU and wheel sensors can also be blended for precise positioning.22Measurement: Journal of the International Measurement Confederation. Experimental 2D extended Kalman filter sensor fusion for low-cost GNSS/IMU/Odometers precise positioning system Each source covers gaps in the others, such as GPS dropping out in tunnels. Phones lean on GPS, Wi-Fi and step counting instead, and the IMU fills short gaps.
Step Counting and Walking Navigation
Counting steps sidesteps the drift problem. Instead of adding up acceleration, many devices find each step in the acceleration pattern and multiply by a stride length.23Journal of Location Based Services. Making step detection obsolete? – Stride length estimation for indoor pedestrian localization using smartphone IMUs Separating gravity from forward motion is hard, so stride length is often estimated from movement features or body measurements.23Journal of Location Based Services. Making step detection obsolete? – Stride length estimation for indoor pedestrian localization using smartphone IMUs Combining those steps with direction lets a device estimate where you are.24Proceedings of the 2024 7th International Conference on Artificial Intelligence and Pattern Recognition. Adaptive Step Frequency Detection and Stride Length Estimation for Pedestrian Dead Reckoning Based on Wearable Devices Good wearable systems detect steps over 98% accurately and estimate walking distance within about 1%.24Proceedings of the 2024 7th International Conference on Artificial Intelligence and Pattern Recognition. Adaptive Step Frequency Detection and Stride Length Estimation for Pedestrian Dead Reckoning Based on Wearable Devices A leg-worn system showed distance error around 2.6%, versus about 7.5% with an older stride formula.25PubMed Central. Accurate Stride-Length Estimation Based on LT-StrideNet for Pedestrian Dead Reckoning Using a Shank-Mounted Sensor
Each footfall produces a repeating bump in the acceleration, so walking looks like a regular rhythm of peaks. The software counts a step when a peak rises above a threshold and enough time has passed since the previous one. Thresholds and timing limits help it ignore small jostles, though a hard shake or a bumpy ride can still sometimes fool it.
That’s also why your tracker’s distance sometimes seems off. Stride length changes with speed, stairs and terrain. Pushing a stroller or cart hides arm swing from a wrist sensor. Entering your height or calibrating on a known distance can help, and so can recognizing walking versus stairs.
IMUs in VR, Drones and Motion Tracking
VR headsets rely on speed. A headset’s IMU reports orientation about 1,000 times per second with almost no delay.26LP-Research. How VR Headset Tracking Works – LP-Research Cameras supply true position and correct the IMU’s drift whenever they get a fix.26LP-Research. How VR Headset Tracking Works – LP-Research Software then predicts where your head will be when the next frame appears.26LP-Research. How VR Headset Tracking Works – LP-Research This matters because lag between moving and seeing the image is linked to VR motion sickness.27Journal of Sensor and Actuator Networks. A Study on Sensor System Latency in VR Motion Sickness
Drones use fused orientation to stay level. A drone treats the gyroscope as its main sensor and corrects its drift with the accelerometer and magnetometer.28International Journal of Electrical and Electronic Engineering & Telecommunications.. Sensor Fusion for Attitude Estimation and PID Control of Quadrotor UAV The flight controller keeps adjusting motors to hold a steady hover.28International Journal of Electrical and Electronic Engineering & Telecommunications.. Sensor Fusion for Attitude Estimation and PID Control of Quadrotor UAV
Wearable sensors track body movement outside the lab. Camera motion-capture is the accuracy standard but is mostly limited to labs.29PubMed Central. Validity and Reliability of Wearable Sensors for Joint Angle Estimation: A Systematic Review An open-source wearable system measured leg joint angles within about 4.4 degrees and arm angles within about 5.6 degrees of camera systems while walking.30IEEE Transactions on Biomedical Engineering. An open-source and wearable system for measuring 3D human motion in real-time Knowing exactly how each sensor sits on the body is a leading source of error.31PubMed Central. Challenges and advances in the use of wearable sensors for lower extremity biomechanics Tiny chips can now run small AI models that recognize walking, standing and stairs directly on the device.32arXiv. Gait Recognition Based on Tiny ML and IMU Sensors
For sport or rehab, sensors shifting on skin or clothing change the readings. Most systems ask you to stand in a set pose to calibrate. A few degrees of error is fine for spotting trends, less so for fine clinical measures.
Calibration and What Comes Next
Factory calibration fixes predictable errors. Quality IMUs are each calibrated on a temperature-controlled rotating table and then retested after aging.33IEEE Xplore. A direct approach for high-quality MEMS based IMU/INS production Calibration targets scale errors, offsets and slight misalignment between axes.34IEEE Transactions on Automatic Control. IMU Calibration and Validation in a Factory, Remote on Land and at Sea Some marine IMUs can be calibrated without precise turntables.35NAVIGATION. Improving the calibration process of inertial measurement unit for marine applications Cheap phone sensors get far less calibration, which is why they drift more.
You can calibrate your own device in small ways. Phones prompt a figure-eight motion for the compass, and you should keep them away from magnets while you do it. Hobby boards often need a still period at startup to measure offsets.
Quantum sensors are an emerging option. Researchers are building inertial sensors that measure motion using clouds of ultracold atoms.36Applied Physics Reviews. Developments for quantum inertial navigation systems employing Bose–Einstein condensates These sensors are still sensitive to placement, with even 0.4 meters of offset exceeding their measuring range.37NAVIGATION: Journal of the Institute of Navigation. Atom Strapdown: Toward Integrated Quantum Inertial Navigation Systems

