Next Article in Journal
Finite Element Model of an Impact on a Palmar Pad from a Snowboard Wrist Protector
Previous Article in Journal
A New Method for Analysing the Effect of Environmental Wind on Real World Aerodynamic Performance in Cycling
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Prediction of Road Surface Quality during Cycling Using Smartphone Accelerometer Data †

by
Stefan Litzenberger
1,2,*,
Troels Christensen
1,2,
Otto Hofstätter
1 and
Anton Sabo
1,2
1
Institute for Biomedical, Health and Sports Engineering, University of Applied Sciences Technikum Wien, Vienna 1200, Austria
2
School of Aerospace, Mechanical and Manufacturing Engineering, RMIT University, Melbourne 3083, Australia
*
Author to whom correspondence should be addressed.
Presented at the 12th Conference of the International Sports Engineering Association, Brisbane, Queensland, Australia, 26–29 March 2018.
Proceedings 2018, 2(6), 217; https://doi.org/10.3390/proceedings2060217
Published: 22 February 2018

Abstract

:
Many cyclists use online-maps for planning their routes, however, only little information is known about the road surface of different cycling paths, farm or public roads. Cyclists prefer road surfaces fitting the type of bike they are using for a specific ride (e.g., time trial, road, MTB, cyclocross, gravel bike). Often riders upload their ride data including GPS, heart rate (HR) or power (P) on platforms like Strava or Garmin Connect. In this research we tried to evaluate whether it is possible to (1) evaluate the road surface quality using a 3D accelerometer mounted on the bicycle’s fork (f = 500 Hz) and whether (2) results of similar quality can be achieved using the accelerometer of a smartphone (f = 100 Hz) placed in the cyclist’s pocket. For data acquisition a cyclist rode on a cyclocross bicycle on three different road surfaces (cobblestones, gravel and tarmac) with three different speeds (10, 20 and 30 km/h) and three different tire pressures (3, 4 and 5 bar). Data of both measuring systems were analyzed using machine learning algorithms. Results showed that road surfaces could be predicted with more than 99% accuracy with the accelerometer and with more than 97% with the smartphone-data.

1. Introduction

The popularity of cycling has increased within the last decades, whereas the bicycle is now the first choice as a means of transportation in many countries worldwide due to its practical application, efficiency, low costs and related health benefits [1]. Along with its increasing demand, a necessity for planning and constructing safe bicycle paths has arisen. As it is a quite costly process, cyclists’ route choices have often been surveyed in order to obtain reliable data which would favor the cyclists’ needs and demands. Among the demands, comfort seems to be highly desired when choosing a path [2].
It has further been agreed that factors such as environmental, mechanical, biomechanical and physiological influences all impact the level of cycling comfort [3]. Of these, environmental factors such as traffic, lane width and geometry along with the surroundings have shown to significantly affect cyclists’ assessment of the bicycle path comfort [4]. Different road surfaces affect cyclists’ perception of comfort differently, whereas smoother surfaces are generally preferred yielding optimal comfortable features for riding and thereby requiring lower energy output. Oppositely, rougher road types that are less comfortable and harder to ride have shown to discourage certain cyclists from riding upon such surfaces [2,5,6].
Therefore, research has lately been concentrated around bicycle comfort, for which has been widely regarded as one of the most important aspects, commonly investigated through various vibration tests [1]. It has further been found that of the common types of road surfaces, tarmac exhibits the highest level of comfort, while also it decreases with increasing velocity [5]. Giubilato and Petrone [7] studied the vibration response to road surface, while they also showed that the level of comfort for different wheels varies with the road surface and speed.
However, regarding cycling as a sport the demands of athletes on road surface type and quality differ from those of commuters and leisure-time cyclists. Many athletes want to ride certain surface types (e.g., off-road, gravel-roads, tarmac) depending on the type of bike they are using. They would go for smooth tarmac if riding a time trial bicycle, for gravel roads with their gravel or cyclocross-bikes and off-road with mountain-bikes. Many of these cyclists use online route-planning for longer rides. However, most of the websites (cf. www.strava.com) use popularity of routes for planning by collecting the smartphone or GPS-device data of uploaded rides, but do not give any information on road surface type or quality. Hence adding information about road type and quality could improve individualized routing options for cyclists planning their ride.
In this research we tried to evaluate whether it is possible to (1) evaluate the road surface quality using a 3D accelerometer mounted on the bicycle’s fork and whether (2) results of similar quality can be achieved using the accelerometer of a smartphone placed in the cyclist’s pocket.

2. Materials and Methods

Figure 1 shows the measurement setup of the bicycle, where a Merida 500 cyclocross bicycle of frame size 52 cm was used (measurement setup and trials conducted are described in more detail in the work of Christensen [8]). A tri-axial capacitance accelerometer (MMA7260Q, Freescale Semiconductor, Austin, TX, USA) was securely strapped to the front fork of the bicycle (Figure 1). For data storage a data-logger (Logomatic v2, SparkFun Electronics, Boulder, CO, USA) was used with a sensitivity of 200 mV/g, acceleration range ± 6.0 g and sampling with a frequency of 500 Hz. The attached accelerometer was mounted in a tilted orientation determined to be 18.66° from vertical.
Furthermore, a Samsung Galaxy S4 mini Smartphone (Samsung, Daegu, KOR), running Android 6.0 (Google LLC, Mountain View, CA, USA), was placed in the back pocket of the test subject’s pants while conducting the test trials. The smartphone was recording data through the application Physics Toolbox Sensor Suite (Vieyra Software, Washington, DC, USA) and sampling with a frequency of 100 Hz.
All measurements were conducted the same day, where the following surfaces were tested: cobblestones, gravel, and tarmac (Figure 2). The surfaces generally showed similarity in structure and condition, where straight and flat sections of approximately 100 m were selected for testing. Each surface, three different speeds (10, 20, 30 km/h) and three tire pressures (3, 4, 5 bar) were tested resulting in nine trials per surface.
Data files from the data-logging device were exported as .txt files, while recordings from the smartphone were exported as .csv files. Data was processed in Matlab 2017b (The MathWorks Inc., Natick, MA, USA). Data were trimmed to contain the vibrational test trials only and an offset correction for all channels was conducted thus resulting in acceleration values oscillating around zero. The acceleration signals were then divided into time windows containing one or two seconds of the data acquired, respectively.
From the time windows applied, a total of 16 features for each channel (ax, ay, az and ares) was extracted resulting in a total of 64 features. These features of the acceleration signal were: mean (a-mean), maximum (a-max), minimum (a-min), mean peak distance (mean-peakdist), mean peak amplitude (mean-peaks), median frequency of the fast Fourier transformed (fft)-signal (median-fft), frequency of the maximum fft-signal power (max-fft-loc), frequency of the minimum fft-signal power (min-fft-loc), maximum fft-signal power (max-fft-pk), minimum fft-signal power (max-fft-pk), mean positive gradient (mean-grad-pos), mean negative gradient (mean-grad-neg), maximum positive gradient (max-grad-pos), minimum positive gradient (min-grad-pos), maximum negative gradient (max-grad-neg), and minimum negative gradient (min-grad-neg).
Additionally two different classification parameters were added to the feature list. Firstly 27 unique classifiers including surface, tire pressure and riding velocity, secondly only three unique classifiers consisting of the three surfaces examined.
After having prepared the data in the fashion mentioned above, machine learning algorithms (MLA) were applied onto the datasets. A classification learner routine was conducted with the two different classifiers and all features. This was done for the features extracted from both the one and two second windows for acceleration sensor as well as phone data. Firstly the 27 unique classifiers, secondly only three classifiers were applied using a total of 22 different machine learning algorithms from the categories decision tree, linear and quadratic discriminant, support vector machine (SVM) and k nearest neighbor (kNN). For validation a 5-fold cross validation was used, the algorithm showing the best prediction accuracy was chosen and confusion matrices plotted.
Furthermore the number of features was reduced and the most successful MLA was performed again to evaluate whether a result of similar accuracy could be achieved with fewer features.

3. Results

The results of the machine learning algorithms applied to the data showed distinctive differences depending on the sensor, the size of the time window and the number of classifiers used for the classification learner (Table 1).
As expected, a finer classification (i.e., using 27 unique classifiers) resulted in less accuracy of the model than using only 3 unique classifiers. Whereas for the acceleration sensor data for both number of classifiers high prediction accuracy could be reached (27 classifiers: >95%, 3 classifiers: >99%), for phone data 27 classifiers yielded accuracy less than 50%. The results for classification with only three classifiers yielded more than 97% of prediction accuracy. Furthermore, it could be noted, that window-sizes of 1 s mostly resulted in less accuracy than larger window-sizes of 2 s.
However, when closer inspecting the confusion matrix for phone data for 27 classifiers, it was observed that although many predictions were not correct they were mainly confused between different speeds and pressure settings but the surface type itself was still correctly classified (Figure 3b) which is highlighted by the red squares.
For a-sensor data only few observations were classified incorrectly (Figure 3a). Figure 4 shows the resulting confusion matrices when only 3 classifiers (cobblestones, gravel, tarmac) were used. For both sensor systems (a-sensor: Figure 4a and phone: Figure 4b) only few predictions were incorrect. It was interesting to observe, however, that a feature reduction nearly always immediately resulted in a decrease of prediction accuracy.

4. Discussion

The main purpose of this study was to determine whether road surface quality could be quantified and therefore the type of road surface identified by using algorithm parameters that are applied momentarily. We wanted to (1) evaluate the road surface quality using a 3D accelerometer and find out whether (2) results of similar quality can be achieved using the acceleration sensor of a smartphone placed in the cyclist’s pocket.
For this purpose data were collected on different surfaces, with different speeds, and tire pressures. They were analyzed ex-post using machine learning algorithms, with either 27 classifiers (3 surfaces, 3 speeds, 3 tire pressures), or three classifiers (3 surfaces). A total of 64 features for different time-windows were extracted from the data and used for classification learning. Results showed that when 27 classifiers and a time-window of one second are used it was possible to correctly identify more than 97% of the data with the acceleration sensor, but less than 50% with the phone. In case only three classifiers are used more than 97% can be correctly identified with both systems (a-sensor: 99.2%, phone: 97.7%).
It is concluded that road surface (cobblestones, gravel, tarmac) can be predicted with high accuracy when using an acceleration sensor mounted on the fork with a recording frequency of 500 Hz (up to 99.2% correctly classified) and that furthermore even different speeds and tire pressures along with surface can be classified correctly (up to 97.9%, cf. Figure 3a). Using the smartphone sensor’s data accuracy for 27 classifiers was less successful resulting only in 48.2% of correctly classified data. However, it has to be noted that the surface still could be identified correctly and mostly different riding speeds and tire pressures were confused (cf. Figure 3b), these results are also supported by the confusion matrix for 3 classifiers (Figure 4b) where a total of 97.7% could be classified correctly as being cobblestones, gravel or tarmac.
From these results it can be concluded that given the data collected and analyzed so far it is possible to identify the surface correctly with data from a smartphone worn in a cyclist’s pocket. It has to be pointed out, however, that this study has only limited explanatory power given the low number of observations. Future research should include more bicycle types (e.g., road, mountain) and different placements of the smartphone in the cyclist’s pocket (e.g., front pocket, cycling jersey’s back-pocket, backpack). Whether it will be possible to quantify different quality grades for one surface needs to be examined in further trials.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ismail, A.Y.; Nuri, N.R.M.; Ahmad, M.; Mansor, M.F.A.S.; Amirul, M.; Durian, H.T.J. Study on the road transmitted vibration of a mountain bicycle. J. Teknol. 2015, 77, 27–31. [Google Scholar] [CrossRef]
  2. Bíl, M.; Andrášik, R.; Kubeček, J. How comfortable are your cycling tracks? A new method for objective bicycle vibration measurement. Transp. Res. Part C Emerg. Technol. 2015, 56, 415–425. [Google Scholar] [CrossRef]
  3. Ayachi, F.; Dorey, J.; Guastavino, C. Identifying factors of bicycle comfort: An online survey with enthusiast cyclists. Appl. Ergon. 2015, 46, 124–136. [Google Scholar] [CrossRef] [PubMed]
  4. Li, Z.; Wang, W.; Liu, P.; Ragland, D.R. Physical environments influencing bicyclists’ perception of comfort on separated and on-street bicycle facilities. Transp. Res. Part D Transp. Environ. 2012, 17, 256–261. [Google Scholar] [CrossRef]
  5. Hölzel, C.; Höchtl, F.; Senner, V. Cycling comfort on different road surfaces. Procedia Eng. 2012, 34, 479–484. [Google Scholar] [CrossRef]
  6. Landis, B.; Vattikuti, V.; Brannick, M. Real-time human perceptions: Toward a bicycle level of service. Transp. Res. Rec. J. Transp. Res. Board 1997, 119–126. [Google Scholar] [CrossRef]
  7. Giubilato, F.; Petrone, N. A method for evaluating the vibrational response of racing bicycles wheels under road roughness excitation. In Proceedings of the Engineering of Sport 9-Conference Proceedings of the Engineering of Sport, Lowell, MA, USA, 9–13 July 2012; pp. 409–414. [Google Scholar]
  8. Christensen, T. Road Surface Quality in Cycling. Master’s Thesis, University of Applied Sciences Technikum Wien, Vienna, Austria, 2017. [Google Scholar]
Figure 1. Merida 500 cyclocross bicycle equipped with accelerometer, data logger and speedometer.
Figure 1. Merida 500 cyclocross bicycle equipped with accelerometer, data logger and speedometer.
Proceedings 02 00217 g001
Figure 2. From left to right tested road surface sections all located in Vienna, AUT: Cobblestones (48°15′31.8″ N 16°21′50.5″ E), gravel (48°15′26.0″ N 16°22′37.5″ E) and tarmac (48°15′21.1″ N 16°22′46.3″ E).
Figure 2. From left to right tested road surface sections all located in Vienna, AUT: Cobblestones (48°15′31.8″ N 16°21′50.5″ E), gravel (48°15′26.0″ N 16°22′37.5″ E) and tarmac (48°15′21.1″ N 16°22′46.3″ E).
Proceedings 02 00217 g002
Figure 3. Confusion matrices for 27 classifiers and 64 features extracted from windows of 1 second with the best performing MLA. Small squares filled green: correct prediction, red: incorrect prediction. (a) Acceleration sensor (MLA: Ensemble—boosted trees, total prediction accuracy: 97.9%); (b) phone sensor (MLA: Linear discriminant, total prediction accuracy: 45.2%), the red quadratic frames in (b) indicate the three classifiers cobblestones, gravel and tarmac. Abbreviations on the axes refer to the different datasets where cobb, grav and tarm stand for the three different surfaces and the three-digit-number for tire pressure and velocity (e.g.,: a-cobb-420 represents cobblestones, 4 bar tire pressure, and a velocity of 20 km/h).
Figure 3. Confusion matrices for 27 classifiers and 64 features extracted from windows of 1 second with the best performing MLA. Small squares filled green: correct prediction, red: incorrect prediction. (a) Acceleration sensor (MLA: Ensemble—boosted trees, total prediction accuracy: 97.9%); (b) phone sensor (MLA: Linear discriminant, total prediction accuracy: 45.2%), the red quadratic frames in (b) indicate the three classifiers cobblestones, gravel and tarmac. Abbreviations on the axes refer to the different datasets where cobb, grav and tarm stand for the three different surfaces and the three-digit-number for tire pressure and velocity (e.g.,: a-cobb-420 represents cobblestones, 4 bar tire pressure, and a velocity of 20 km/h).
Proceedings 02 00217 g003
Figure 4. Confusion matrices for three classifiers and 64 features using a window-size of 2 s and the best performing MLA. (a) a-sensor (MLA: SVM quadratic, total prediction accuracy: 99.2%); (b) phone sensor (MLA: SVM cubic, total prediction accuracy: 97.7%). Abbreviations on the axes stand for cobblestones (cobb), gravel (grav), and tarmac (tarm).
Figure 4. Confusion matrices for three classifiers and 64 features using a window-size of 2 s and the best performing MLA. (a) a-sensor (MLA: SVM quadratic, total prediction accuracy: 99.2%); (b) phone sensor (MLA: SVM cubic, total prediction accuracy: 97.7%). Abbreviations on the axes stand for cobblestones (cobb), gravel (grav), and tarmac (tarm).
Proceedings 02 00217 g004
Table 1. Classification learner results for different datasets, window-sizes (ws), unique classifiers (class) and number of features (feat). MLA is the name of the most accurate machine learning algorithm (MLA) along with its prediction accuracy in percent (acc). The datasets differ in used sensor (a-sensor and phone) and size of the time windows (WS: 1 s or 2 s).
Table 1. Classification learner results for different datasets, window-sizes (ws), unique classifiers (class) and number of features (feat). MLA is the name of the most accurate machine learning algorithm (MLA) along with its prediction accuracy in percent (acc). The datasets differ in used sensor (a-sensor and phone) and size of the time windows (WS: 1 s or 2 s).
DatasetWS (s)FeatClassMLAACC (%)
a-sensor16427Ensemble—boosted trees97.9
phone16427Linear Discriminant45.2
a-sensor26427Ensemble—boosted trees95.4
phone26427Ensemble—boosted trees48.4
a-sensor1643SVM—Quadratic99.1
SVM—Medium Gaussian99.1
phone1643Ensemble—bagged trees95.5
a-sensor2643SVM—Quadratic99.2
SVM—Cubic99.2
Ensemble—subspace discriminant99.2
Phone2643SVM—Cubic97.7
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Litzenberger, S.; Christensen, T.; Hofstätter, O.; Sabo, A. Prediction of Road Surface Quality during Cycling Using Smartphone Accelerometer Data. Proceedings 2018, 2, 217. https://doi.org/10.3390/proceedings2060217

AMA Style

Litzenberger S, Christensen T, Hofstätter O, Sabo A. Prediction of Road Surface Quality during Cycling Using Smartphone Accelerometer Data. Proceedings. 2018; 2(6):217. https://doi.org/10.3390/proceedings2060217

Chicago/Turabian Style

Litzenberger, Stefan, Troels Christensen, Otto Hofstätter, and Anton Sabo. 2018. "Prediction of Road Surface Quality during Cycling Using Smartphone Accelerometer Data" Proceedings 2, no. 6: 217. https://doi.org/10.3390/proceedings2060217

Article Metrics

Back to TopTop