Deterministic Position Estimation Using IMU Sensor Fusion
This is a lightly adapted version of my 2018 undergraduate thesis work on inertial navigation, embedded sensing, and deterministic position estimation.
Summary
This project explored GPS-free position estimation using an inertial measurement unit (IMU).
The goal was to estimate a vehicle's position over a short driving route without relying on GPS as the primary source of location. The system used accelerometer, gyroscope, and magnetometer measurements to estimate orientation, transform body-frame acceleration into an earth-frame reference, and then integrate acceleration to estimate velocity and position.
The main challenge was drift.
Small errors in low-cost MEMS sensors accumulate quickly. Since position is obtained by integrating acceleration twice, even small sensor bias and noise can produce large position errors over time.
The project combined:
- quaternion-based orientation estimation;
- IMU sensor fusion;
- deterministic drift correction;
- stationary and constant-velocity behavior detection;
- embedded data collection with post-processing analysis.
Problem
GPS provides useful absolute position measurements, but it has limitations:
- relatively low update frequency;
- signal loss in some environments;
- multipath and environmental errors;
- noisy measurements in local movement tracking.
An IMU can operate at higher sampling rates and does not require an external signal. However, IMU-only tracking is difficult because accelerometer and gyroscope errors accumulate over time.
The core technical question was:
Can a deterministic IMU-based system estimate short-term vehicle position by combining orientation estimation with behavior-based drift correction?
System Overview
The system followed a basic inertial navigation pipeline:
[IMU Measurements]
|
v
[Low-Pass / High-Pass Filtering]
|
v
[Quaternion-Based Orientation Estimation]
|
v
[Body-to-Earth Frame Transformation]
|
v
[Acceleration Correction]
|
v
[Velocity and Position Integration]
|
v
[Estimated Vehicle Trajectory]A separate behavior detection layer was used to reduce integration drift during stationary and constant-velocity segments.
Orientation Estimation
The project used quaternions to represent orientation.
Quaternions were selected instead of Euler angles because they avoid singularities such as gimbal lock and are computationally suitable for embedded orientation estimation.
A unit quaternion represents rotation as:
q = [cos(theta / 2), ex sin(theta / 2), ey sin(theta / 2), ez sin(theta / 2)]This representation allowed the system to estimate the vehicle's orientation and transform acceleration measurements from the sensor/body frame into the earth frame.
Modified Quaternion Newton Method
The orientation estimation method was based on a modified Quaternion Newton Method.
The method used accelerometer, gyroscope, and magnetometer data to estimate orientation error and update the quaternion state. Instead of relying only on a first-order gradient-descent correction, the project explored a second-order update structure using selected Hessian information.
The purpose was to improve orientation correction while keeping the computation realistic for an embedded system.
In practical terms, this orientation estimate was necessary for one reason:
acceleration must be expressed in the correct reference frame before it can be integrated into velocity and position.
Without this step, gravity and body-frame rotation errors quickly corrupt the displacement estimate.
Drift Correction
Even with orientation correction, direct double integration of acceleration produces drift.
To reduce this, the system used deterministic behavior detection.
Constant-Velocity Detection
When a vehicle moves at constant velocity, true acceleration is close to zero. The system monitored changes in acceleration and detected segments where acceleration variation was below a threshold.
During these segments, the earth-frame acceleration was forced toward zero to prevent noise from accumulating into false velocity changes.
Stationary Detection
When the vehicle was stationary, velocity should be zero. The system used filtered acceleration magnitude to detect stop conditions.
During stationary periods, the integrated velocity was reset to zero. This reduced the effect of accumulated drift before it propagated further into position estimates.
Hardware and Data Collection
The test setup used:
- STM32 Nucleo-64 development board;
- Bosch BNO-055 9-DOF IMU;
- accelerometer, gyroscope, and magnetometer measurements;
- serial data collection;
- MATLAB-based post-processing.
The system was tested during a vehicle drive inside the ITU Maslak Campus.
The test route included:
- straight-line motion;
- constant-speed segments;
- heading changes;
- a sharp turn;
- a total test duration of approximately 160 seconds.
Results
The estimated trajectory was compared against a GPS-based reference path.
In the test run:
- maximum north-axis position error was approximately 70 meters;
- maximum east-axis position error was approximately 60 meters;
- the system was able to reconstruct the overall driving trajectory, including direction changes and a sharp turn.
These results were not accurate enough for production-grade navigation, but they showed that deterministic IMU-based correction could keep short-term drift bounded during a limited tracking window.
Limitations
This project had clear limitations.
First, the approach was deterministic and did not continuously estimate changing sensor bias states.
Second, low-cost MEMS sensors are sensitive to bias instability, noise, temperature effects, and scale-factor errors.
Third, the system was validated on a short route. Longer GPS-free tracking windows would require stronger probabilistic estimation.
A more complete system would likely need:
- Extended Kalman Filtering;
- online bias estimation;
- GPS/IMU fusion when GPS is available;
- better sensor calibration;
- repeated tests across different routes and motion profiles.
Technical Takeaway
The project showed the practical difficulty of turning raw sensor measurements into reliable position estimates.
The main lesson was that sensing systems need more than data collection. They need correction mechanisms that understand the physical state of the system.
In this case, the system used behavior assumptions — stationary state and constant velocity — to reduce drift in an otherwise open-loop inertial navigation pipeline.
The same engineering principle appears in many production systems:
raw signals are rarely enough; reliable systems need feedback, constraints, and correction layers.
Closing Note
This was an undergraduate engineering project, but it introduced several themes that became important in my later work: sensor fusion, uncertainty, feedback loops, embedded data collection, and the gap between raw model outputs and reliable system behavior.