Analysis of bus ride comfort using smartphone sensor data

Passenger comfort is an important indicator that is often used to measure the quality of public transport services. It may also be a crucial factor in the passenger’s choice of transport mode. The typical method of assessing passenger comfort is through a passenger interview survey which can be tedious. This study aims to investigate the relationship between bus ride comfort based on ride smoothness and the vehicle’s motion detected by the smartphone sensors. An experiment was carried out on a bus fixed route within the University campus where comfort levels were rated on a 3-point scale and recorded at 5-second intervals. The kinematic motion characteristics obtained includes tri-axial linear accelerations, tri-axial rotational velocities, tri-axial inclinations and the latitude and longitude position of the vehicle and the updated speed. The data acquired were statistically analyzed using the Classification & Regression Tree method to correlate ride comfort with the best set of kinematic data. The results indicated that these kinematic changes captured in the smartphone can reflect the passenger ride comfort with an accuracy of about 90%. The work demonstrates that it is possible to make use of larger and readily available kinematic data to assess passenger comfort. This understanding also suggests the possibility of measuring driver behavior and performance.


Introduction
Passenger comfort is an important index that can be used to measure the quality of public transport services and a crucial factor in the passenger's choice of transport mode [Olio, Ibeas and Cecin (2011); Eboli and Mazzulla (2010)]. In Singapore, it has been reported that improvements in public transport ride comfort is one important consideration in attracting bus-choice riders as well as to retain bus-captive riders [PTC (2017)]. Despite well-paved and well-maintained roads, buses still make numerous sudden braking, acceleration or turns throughout the journey, during which passengers are susceptible to jerk and sway discomforts with occasional serious injuries [The Straits Times (2018)]. Conventionally, the quality of bus rides was evaluated through manual surveying a randomly selected sample of passengers who reflected their experiences across a rating scale of intolerable to excellent ride [SAE (2000)]. This is a laborious and costly method and could only provide feedback periodically. This study attempts to assess ride comfort experienced by passengers with the use of motion sensors in modern Smartphones.

Related works
Over the last decade, mobile phones have transformed from simple cell devices to powerful sensing, communication and computing devices [Klausner (2013)]. Smart phone devices are now widely used, and they are changing our daily life [Cui, Zhang and Cai et al. (2018)]. Such smartphone devices have also been used to obtain transportation data of taxi, such as Uber Sun et al. [Sun and McIntosh (2018)]. An average smartphone today is equipped with several sensors ranging from accelerometer, gyroscope, and Global Positioning System (GPS), among others that are capable of split-second high sampling rates of data acquisition. Its computing capabilities coupled with its proliferation-expected to reach 70% of earth's population by 2020 [Williams (2015)]-makes it a ubiquitous device that has high potential to facilitate the rapid and large-scale deployment in Intelligent Transport Systems [Engelbrecht, Booysen and Rooyen et al (2015)]. Förstberg [Förstberg (2000)] have previously classified variables of a vehicle environment that influence the user's comfort. They included dynamic variables (such as motions), ambient variables (such as temperature, pressure, air quality, ventilation and noise), spatial variables (such as workspace, legroom, seat shape) as well as human factors (like age and gender). Other studies have also shown that bus-operating factors such as in-vehicle time [Vovsha (2014)], passenger load [Kumar, Basu and Maitra (2004)], effects of road infrastructure [Bodini (2013)] have significant impacts on the levels of comfort experienced. Smartphones have been employed to measure dynamic factors that affect comfort in public transportation [Castellanos, Susin and Fruett (2011)]. The tri-axial accelerometers, GPS, and temperature sensors were used alongside a comfort index based on measuring the RMS value of the weighted acceleration, where sources of comfort's disturbances were detected geographically through the Threshold detection algorithm. Lin et al. [Lin, Chen and Chen et al. (2010)] adopted an average-ride comfort methodology to assess comfort. Participatory phones were used to acquire data using GPS and tri-axial accelerometers, where a ride data is computed in a server and coordinated with the transportation database in order to identify ride comfort thus enabling a comparison of comfort values of different vehicles. The perceived value determined by service quality positively affects overall satisfaction, involvement, and behavioral intentions [Lin and Chen (2011)]. With comfort being one of the key factor in the provision of high bus service quality, and also a significant influencer of passenger satisfaction with bus transits [Eboli and Mazzulla (2007); Eboli and Mazzulla (2009)], passenger perception is a fundamental prerequisite for the improvement of bus comfort. The findings of such surveys were shown to help bus operators and authorities design better measures to improve bus comfort level.

Proposed methodology 3.1 Experimental route
The experiment was carried out within National University of Singapore Kent Ridge Campus on the Internal Shuttle Bus service D1, for the journey segment between Information Technology (16189) to Central Library (16181) as shown in Fig. 1

Smartphone sensor data acquisition
The smartphone was placed on a flat surface in the bus, secured on top of an anti-slip mat. Fig. 2 shows an illustration of tri-axial accelerometer and gyroscope sensor coordinates of a smartphone. The positive y-axis of the phone was set in the longitudinal axis of the vehicle. The smartphone was set to capture data when the bus reaches the first bus stop (16189), with the following sensors activated: Linear Accelerometer (ax, ay, az), Gyroscope (wx, wy, wz), Inclinometer (Pitch, Roll, Azimuth) and GPS location (latitude, longitude). The recording was terminated at the last bus stop (16181) when the bus has come to a complete stop. A total of 10 runs were made.

Perception of ride comfort
Throughout the journey, the level of comfort experienced by the experimenter was captured on an iPad programmed to receive the input at 5-second intervals. The level of discomfort experienced was noted on a 3-point scale as shown in Tab. 1.

Level of Discomfort Explanations of the Ride Discomfort level
1 Changes in bus motion does not produce conscious discomfort. Ride is smooth.
2 Changes in bus motion is noticeable but causes no annoyance or requiring physical adjustments 3 Changes in bus motion causes annoyance and physical support is needed to maintain balance.

Data cleaning and preprocessing
Before the time-series data were analyzed, data cleaning and preprocessing was performed, and this includes: Error Compensation, Data Concatenating and Ordering, and Removal of Statistical Insignificant Variables.

Reducing drift in Inertia Navigation Systems (INS)
The acceleration data from the accelerometer and gyroscope should be hovering near zero when the bus is identified to have stopped at a bus stop, over the extended durations in which the longitude and latitude position remains unchanged. During this instant, the acceleration values of the preceding section from the bus stop were proportionately adjusted and the acceleration values were reset for the subsequent section to the next bus stop.

Position correction in absolute positioning system
To acquire the absolute position of the vehicle and the corresponding speed, the Kalman filter, commonly used to estimate true distance travelled obtained by the GPS sensor during sampling intervals, is applied. The moving average has also been shown to produce results close to those using the Kalman filter [Eliasson (2014)]. The central moving average was used in this experiment. Based on the average values of latitude and longitude obtained, the distance travelled and hence the corrected speed was computed and used in analysis.

Data concatenating and ordering
Data obtained from the various smartphone sensors were averaged in 5-second intervals to match the corresponding Ride Comfort score captured. Data from each 5-second intervals were concatenated into a single data set for analysis. Ride Comfort score was reformatted as an Ordered factor variable, to model the increasing level of discomfort.

Removal of statistical insignificant variables
Correlation amongst the variables present in the data was examined to account for multicollinearity problems. In prediction ride comfort, there was relatively high correlation of wz with other variables and hence removed from further analysis. As expected, geographical location (latitude and longitude) were not motion characteristics and prove not to influence ride comfort. After the data cleaning, there were 1208 observations with 9 independent variables as shown in Fig. 3, along with the summary statistics of the variables of the final model.

Model development and results of data analysis
A regression tree was performed on the data set. The fully-grown tree had a total of 32 splits, where it was then pruned based on the optimal complexity parameter in order to avoid overfitting. This resulted in a pruned tree with 26 splits as shown in Fig. 4. Terminal nodes are highlighted in red, yellow and green to illustrate cases where majority of the ride comfort levels 3, 2 and 1 respectively. Based on the model and the Gini importance index, the variables identified to be important in providing meaningful splits for the Classification and Regression Tree (CART) as shown in Tab. 2. The model had an accuracy of 90.9% with the following confusion matrix as shown in Tab. 3.

Discussions
The 26 splits can be identified from the tree where a "yes" to the condition is split to the left and a "no" to the condition is split to the right. Results suggest that for 16% of the observed data falls under the combination , , and where there is a 99% chance of comfort level 3 experienced. For 8% of the observed data where , , and coincide, the chances of inducing an uncomfortable ride with comfort level 3 is 92%. Figure 4: Prune CART decision tree with 26 splits All these mean that while speed influences the ride comfort significantly, cases with low speed accompanied with changes in lateral direction causes greater discomfort. Sharper turns that are accompanied by changes in elevation, possibly caused by humps also cause discomfort, while at the same time, smoother ride with more sudden turns increase would increase ride discomfort. For 26% of the observed data, there is a 95% chance passengers experiencing ride comfort level 1 when , , and . For 9% of the observed data, ride expectations are met with 91% chance of comfort level 3 experienced through the combination of , , and .
The results indicate that higher speed does not necessarily compromise on ride comfort. Riding over humps when the pitch is kept within a range of ±2° is also acceptable. The changes in lateral direction, even with a near right-angle turn but with low longitudinal acceleration may not increase ride discomfort.

Conclusion
This study shows that kinematic data captured from sensors in a smartphone can be used to reflect a passenger's ride comfort with high degree of accuracy. Sharp turns that are accompanied by changes in elevation, or sudden albeit smoother turns are the two biggest causes of passenger discomfort in a ride. This provides possibilities of measuring driver behavior and performance, where drivers could be tested relatively easily whether they are providing comfortable rides for passengers.