IMU Experiments - Tilt & Dead Reckoning
Using a sense hat with integrated gyroscope and accelerometer, we wrote an algorithm to compute tilt of the sensor - similar to the tilt measure app on an iPhone.
The second part of the project involved using a Kalman filter to estimate position based on gyro and accel. Different algorithmic approaches showed different tradeoffs - either greater compounding error, or underestimation.


Description
- Used a Sense HAT with integrated accelerometer and gyroscope to calculate real-time pitch, roll, and yaw, similar to an iPhone's tilt measurement.
- Compared accelerometer- vs. gyroscope-based tilt estimation, analyzing tradeoffs in short-term accuracy vs. long-term drift.
- Fused both sensors using a weighted average approach for better tilt estimation and evaluated sensor noise using Allan deviation plots.
- Implemented 1D, 2D, and 3D Kalman filters to estimate position using raw acceleration and angular rate data.
- Introduced clamping and damping techniques to reduce integration drift and improve stability, especially for slow movements.
- Validated results using ground-truth movement tests (e.g., 6 ft linear and square trajectories), and quantified error propagation in each filtering strategy.
Learning Outcomes
1. Technical Skills & Knowledge
- Sensor fusion and Kalman filtering (1D/2D/3D implementations)
- Python-based sensor data acquisition and signal processing
- Coordinate frame transformations, Euler angle computation, and drift mitigation
- Allan deviation analysis for evaluating sensor noise
- Integrating raw IMU data to compute orientation and estimate dead-reckoning position
2. General Project/Practical Skills
- Experimental validation: Designing and analyzing tests using real-world ground truth
- Algorithm comparison: Evaluating tradeoffs across different sensor fusion approaches
- Debugging and iteration: Tuning filter parameters, handling sensor bias, and noise suppression
- Data visualization: Using plots and motion traces to analyze system performance
Documentation
Reach full documentation and demos here: https://docs.google.com/document/d/1E5fZ6nX09ltbGOVrwGjnuRKZJN6xzdibY4oq_WEFK_4/edit?usp=sharing