Project Poster:

Download (633kb)

PassengerSense Source Code:

Available From GitHub

Estimating Passenger Flow & Occupancy on Board Public Transport Buses Through Mobile Participatory and Opportunistic sensing.

PassengerSense is a crowd sensing Android application that I created as part of my research dissertation for MSc Computer Science (Networks & Distributed Systems.)

The aim of this study was to investigate if a relationship exists between the number of discoverable bluetooth devices on board a bus, the number of passengers connected to the buses Wi-Fi and the actual number of passengers on board a bus. PassengerSense was developed as a means of testing this relationship by detecting other devices on board the bus through bluetooth and Wi-Fi and then comparing these values to real passenger head counts conducted by volunteers.

How is this useful?

Passenger flow and occupancy data is useful in a number of different ways, for example:

  • Bus operators, such as Dublin Bus, can reduce costs and environmental impact by optimising how their bus fleet is used based on passenger flow and occupancy data.
  • Passengers can enjoy a more comfortable journey in buses that are not so crowded.
  • Bus operators can become better at scheduling buses based on demand data.
  • Planning for future public transport in cities relies upon passenger flow data over time such as the data collected by PassengerSense.

Traditional methods of collecting this type data usually involve installing hardware on the bus such as cameras that are capable of counting crowds or pressure pads at the door of the bus that can count footsteps. These solutions provide accurate data but are costly and time consuming to implement. PassengerSense is exploring alternative methods of detecting passenger flow and occupancy in real time without the need for installing hardware on the bus.

How Does it Work?

PassengerSense repeatedly scans its environment and counts the number of discoverable bluetooth devices and the number of devices connected to Wi-Fi. This data is timestamped and stored. Volunteers testing PassengerSense will occasionaly conduct a head count on the bus and input the count to the app, this is known as the "ground truth" value.

If a relationship can be established between the crowd sensing data and the ground truth then this means in the future that the app could make estimations of bus occupancy on its own without the need for a ground truth value. Meaning in the future it may be possible to tell when the bus will arrive and how full it is.

PassengerSense
PassengerSense

Privacy

PassengerSense only scans for publically available information and does not collect, store, or transmit any private data. Below is an example of the types of data PassengerSense Detects:

This is an example of the results PassengerSense generates following a scan to make estimates of the number of passengers on board the bus. You can see from the data that it is not possible to identify an individual passenger or person using the application. (The API Key is needed to send data to web service, for security I have masked it.)

This is an example of how PassengerSense counts the number of passengers connected to the buses Wi-Fi.

{"measurements":{"TotalHostsWi-Fi":7,"NewHostsWi-Fi":5},"eventDate":"2015-08-01T20:23:43.043+0000","metadata":{"PipelineName":"WIFI_PING","api-key":"xxxxxxxxxxxxxxxxx"}}

This is an example how PassengerSense detects cellular RSSI (Received Signal Strength Indication ) which can be used to determine the buses location.

{"measurements":{"rssiTo15813":-63,"rssiTo15430":-85,"rssiTo36364":-77,"rssiTo65535":-93,"rssiTo15767":-91},"eventDate":"2015-08-01T20:23:41.041+0000","metadata":{"PipelineName":"CELL","api-key":"xxxxxxxxxxxxxxxxx"}}

This is an example of how PassengerSense counts the number of Bluetooth Hosts on board the bus.

{"measurements":{"TotalHostsBluetooth":0,"NewHostsBluetooth":0},"eventDate":"2015-08-01T20:23:38.038+0000","metadata":{"PipelineName":"BLUETOOTH","api-key":"xxxxxxxxxxxxxxxxx"}}

This is an example of how PassengerSense determines the buses GPS location.

{"elevation":0,"longitude":-6.2090056,"latitude":53.304245,"eventDate":"2015-08-01T20:23:38.038+0000","metadata":{"api-key":"xxxxxxxxxxxxxxxxx","PipelineName":"LOCATION"}}

Results

I created a binary classification model and used the data collected to determine if a bus could be considered full or not based on the number of passengers connected to the Wi-Fi. Bluetooth was found to have no meaningful relationship to the number of passengers on board. While more data would be necessary to properly evaluate this solution the initial results are promising leaving room for future work. 

Here are the results from the binary classification model:

 Success ObservedFailure Observed 
Full Predicted 15 5 20
Not Full Predicted 10 92 102
  25 97 122
       
Accuracy 0.6 0.948454 0.877049

Future Work

There is potential for future work here. One of the techniques explored involved listening for Wi-Fi probing signals to determine occupancy and passenger flow. Listening to probing signals is common in public spaces for example it can be used to work out queue length for tourist attractions or in airports. While this method is much more accurate than listening for devices connected to Wi-Fi it is harder to implement on a mobile device. At the time when I was writing the thesis this was only possible to implement on certain mobile devices that were rooted, this would not be ideal for a public crowd sensing application. 

When listening for probing signals the device being monitored does not need to be connected to a network, it simply needs to have it's Wi-Fi radio enabled. Once the Wi-Fi is enabled the device will start to 'probe' for known networks, these probes make it possible to uniquely identify mobile devices for the purposes of counting. This a more accurate way to count people because as mobile data networks improve people are less likely to connect to public Wi-Fi hotspots. 

Want to Know More?

Please contact me if you have any queries.