Inferring Transportation Mode using Smartphone Sensor Data

August 25, 2011

Now that The End (of The Beginning) is complete, one of the various things that it is appropriate to do is to post a bit about my dissertation, which I had fleetingly mentioned in previous cycling posts.

You can download a copy here: Inferring Transportation Mode using Smartphone Sensor Data

The inspiration and motivation behind the project was from the UROP I did last year summer. I had envisioned my Energy Meter1 application accounting for peoples’ day to day energy usage in three ways:

  1. Scanning QR codes that point to modified Atom feeds that contain cumulative energy consumption figures for regularly used “facilities”, for example, home and workplace HVAC systems. See the video below for a full description of this; I successfully prototyped it in the UROP.
  2. Scanning barcodes from consumable items (e.g. a ream of paper), using the barcode to look up the consumable in question in a crowd sourced database mapping consumable items to their embodied energy.
  3. Using GPS and accelerometer data on the smartphone to infer when the user is traveling, and what sort of vehicle (if any) they are using. This data, along with a record of their mileage for the trip (measured using the GPS) could then be used to calculate an estimate of the energy used and hence the carbon dioxide released as a result of the activity.

As with so many projects, these goals turned out (as I had suspected) to be too much for one summer, and I settled for making a good go of the QR code system.

Still keen to develop the system at the end of the summer, I decided to continue my work and develop the third metering approach. The dissertation investigates the use of sensors not tried by other research (orientation, light level, magnetic field strength and GPS satellite data) as well as the more tried and tested accelerometer data and GPS location data. Within this scope, various features (ways of analysing the raw sensor data) for classification are compared.

Part of doing this required that I construct a representative data-set for classifier training and evaluation purposes, which first of all meant creating Route Tracer, an Android application which records accelerometer, GPS location, GPS satellite light level, magnetic field strength and orientation data, along with the (user supplied) transportation mode label to the SD card. I used this to collect (with the aid of volunteers) 3000+km (100 hours/200 journeys) of data spanning eight cities in four countries.

Saying much more here would just mean repeating what I have said in the introduction and conclusion of the dissertation itself, so I’ll wrap up with two concluding paragraphs:

“The accuracy of the best resulting classifier (recall of 97.8%) is very promising and it would really be good to develop a standalone Android application for personal transportation energy metering. Better yet would be to automate the personal transportation energy metering component of the Energy Meter application I created as part of my Undergraduate Research Opportunities Program (UROP).”

“In addition to testing approaches from existing literature, I have been able to confirm my original hypotheses that magnetic field strength and GPS satellite information are useful data sources. Finally, I found that orientation sensor information is a strong data source.”

The mark I received was 81.2/100, resulting in it being one of eight dissertations to be highly commended! Better yet is the fact that the organisers of the UROP projects have set somebody working this year to develop an Android application that uses the findings of my dissertation to further the energy metering work that started all of this.


  1. This is the presentation I gave at the end of my UROP last summer, explaining Energy Meter:

You can also download the slides:

Personal Energy Meter UROP Presentation Slides (note that the email address on the cover slide has now expired, and most of the URLs seen in the examples are no longer around).