Plot of a rectangular walk traced by the Kalman filtered path, the orientation sensor baseline, the magnetometer and gyroscope headings, and GPS.

Indoor Positioning System.

  • Sensor Systems
  • MATLAB
  • Kalman filter
  • Sensor fusion

An indoor positioning system that tracks a walker with nothing but a phone's motion sensors. Steps become distance, a Kalman filter fuses the magnetometer and gyroscope into a heading, and together they trace the walked path more closely than the phone's GPS.

Reports

Highlights

Raw, filtered and step-counted acceleration plots, with every heel strike and toe strike marked.

Distance.

Building on the pedometer, three distance estimators were compared on walks of 8 to 37 m. A fixed step length averaged 2.5% error. An adaptive model, which scales each stride by its duration and acceleration, averaged 3.0% but was chosen for the final system because its weights could still be tuned. Integrating acceleration twice drifted to errors of more than 400%.

Heading over time from the gyroscope, the magnetometer and the orientation baseline through four turns.

Heading.

The magnetometer gives an absolute heading but is corrupted by hard- and soft-iron effects, so it was calibrated with magcal and unwrapped. The gyroscope is smooth but has to be integrated, so its heading slowly drifts. Both were tested against the phone's own orientation sensor through a sequence of 90° and 180° turns.

Heading over a long walk from the gyroscope, the magnetometer, the orientation baseline and the Kalman filter.

Fusion.

A Kalman filter fuses the two headings, with its noise weights set from each sensor's variance while stationary (R = 0.1697, Q = 6.819). Combined with the step-based distance, it traced a rectangular walk far more closely than the phone's 1 Hz GPS. Because the gyroscope was so noisy, the fused path follows the magnetometer closely; a better gyroscope would let the filter do more.