A Python-based gait analysis system built with Raspberry Pi 4B and LSM6DS3 IMU sensors.
This project enables real-time gait event detection, temporal-spatial parameter extraction, and automated report generation, designed to assist physiotherapists and healthcare professionals in monitoring patient rehabilitation.
-
IMU Data Collection
- Collects accelerometer & gyroscope data from multiple LSM6DS3 sensors via Qwiic multiplexer.
- Controlled wirelessly using a Qwiic button (no HDMI needed).
-
Data Processing
- Filtering, bias correction, smoothing of raw signals.
- Removal of static/non-gait periods.
-
Event Detection
- Detects Initial Contact (IC) & Final Contact (FC).
- Uses peak-grouping strategy for accuracy.
-
Parameter Extraction
- Step time, stride time
- Stance time, swing time
- Step length, stride length
- Walking speed, cadence
-
Force Estimation
- Calculates heel-strike impact force per step.
- Configurable based on patient’s mass.
-
Automated Report Generation
- PDF/PNG reports with:
- Acceleration & gyroscope time-series plots
- Event detection visualization
- Stride-wise speed & cadence trends
- Violin plots & summary tables
- PDF/PNG reports with:
-
Hardware
- Raspberry Pi 4B
- Qwiic Hat & Qwiic Multiplexer
- IMU Sensors (LSM6DS3)
- Qwiic Button
-
Software
- Python (NumPy, SciPy, Pandas, Matplotlib, ReportLab)
- pigpio (for I²C communication)
- OpenSim (optional for biomechanical modeling)
- Connect LSM6DS3 sensors to the Qwiic Multiplexer (e.g., channels 1, 2, 3).
- Attach the Qwiic Button to channel 0 (start/stop trigger).
- Connect the multiplexer to the Qwiic Hat on Raspberry Pi 4B.
- Ensure
pigpiodservice is running for I²C communication.
- Step Length (m):
0.712 ± 0.008 - Walking Speed (m/s):
0.414 ± 0.056 - Cadence (steps/min):
55.3 ± 21
Reports include:
✅ Time-series graphs of accelerometer & gyroscope data
✅ Event detection visualization
✅ Stride-wise gait parameter plots
✅ PDF summary tables for clinical use
- Clinical gait assessment
- Rehabilitation monitoring
- Sports biomechanics
- Research in human movement
Chinmay Mhatre
- 🎓 B.Tech IT, K.J. Somaiya College of Engineering (2021–2025)
- 🔬 Project Lead, Gait Analysis System
- 📧 Email: [chinmaymhatre02003@gmail.com]