Keywords

1 Introduction

Mobility and transportation are essential to the daily lives of people, spending on average more than 45 min on roads and in traffic [1]. Therefore, monitoring road conditions has received a significant amount of attention. However, since roads in urban regions are still mainly used by motorized means of traffic [2], highly automated sensor vehicles conduct pavement condition assessments. To boost non-motorized and thus emission-free means of transport, three major improvement tasks were recognized: first the motivation for non-motorized transport [3], second the increase in safety [4] and third the increase in traveling comfort [5].

While politicians and municipalities have found success in increasing motivation and safety for non-motorized means of traffic, little work has been done to evaluate the traveling comfort. In the current study, we examine the possibility of using a smartphone crowdsensing approach to monitor the conditions of cycle path surfaces capture the aspect of travel comfort of cyclists. Compared to the traditional way of collecting pavement data, assessing and monitoring road conditions by deploying the crowdsensing approach results in five major benefits. First, the quantity of participants collecting data. Second, the frequency of road conditions being monitored. Third, the almost unlimited mobility of cyclists’ use of cycle path networks, consisting of many narrow routes. Fourth, the reduction of costs for municipalities. Fifth, the crowdsensing approach promotes civic engagement, unity and identity of their participants.

2 Related Work

During the preparation of this project, few examples could be located describing the determination and classification of road surface conditions for non-motorized traffic routes utilizing mobile devices. Much more work has been done either describing the classification for routes mainly used by motorized means of traffic or utilizing specially build sensor boxes to evaluate the quality of road surfaces. Nevertheless, some elaborations on related topics have been compiled and presented below. Some previous studies have focused weather conditions and seasonal variation to evaluate cycling comfort [6]. These rather temporal influencing factors should not be the focus of this study. Instead, spatially differentiated influencing factors should be considered. A study conducted in 2008 estimates the influence of local factors like: the routing and the shape of cycleways on cycling at about 70% [7].

According to the General German Bicycle Club e.V., (ADFC) studies have shown that most people would use the bicycle more often if they were to experience cycling more positively such as road space and routes more suited to cycling [8]. The recommendations for cycling facilities in Germany (ERA) include enabling fast and direct routes, the consideration of individual user groups like racing, - and electro bikes [9].

A study carried out at the University of Maryland confirmed the assumption that commuters can be encouraged to use the bike by taking off-road journeys [10]. This study conducted an online survey of students who live within a five-mile radius of the campus. One of the biggest motivations for cycling owners was a separate bike lane, other considerations were better lighting and a good map with local bike paths. When asked what prevented students from biking, the majority responded with concerns of safety on the road and poor cycleway conditions.

Through studying the related work for determining and monitoring road surface conditions for cycling paths, two different approaches stand out. Monitoring cycling paths conditions using dedicated sensor boxes, and monitoring cycling paths using sensors built in to modern smartphones.

2.1 Classification of Road Surface Conditions Using Sensor Boxes

An approach to detect potholes using GPS and accelerometer data from dedicated hardware devices mounted in taxi cabs has already been successfully explored. A system called the Pothole Patrol gathers data from vibration and GPS sensors which then processes the data to assess the road surface conditions. The sensor devices have been deployed on seven taxis running around the Boston Metro area. Using a simple machine-learning approach, the authors could show the ability of the system to identify potholes and other severe road surface anomalies from accelerometer data. Data from thousands of kilometers of taxi drives demonstrated that over 90% contained road anomalies needing repair [11].

Another study investigates road conditions by using customized embedded devices with microphone and accelerometer sensors. Unfortunately, the study does not explain how the collected microphone data is used for monitoring road surface conditions [12].

A further study is focused on detecting bad road surface quality, such as cracks, potholes, and obstacles to prevent accidents, particularly of cyclists. Low-cost ultrasonic sensors were used to periodically measure the distance from the system to the road to estimate the road surface condition. Through experimental evaluations, the study showed that the monitoring system can detect obstacles and holes in the front area of a bicycle [13].

2.2 Classification of Road Surface Conditions Using Smartphones

Monitoring and classifying cycleway road conditions using bike-mounted smartphones has been a rising topic in the last few years. The reason for the rise is the availability and user acceptance of mobile devices, and general market penetration. Modern smartphones are equipped with many highly sensitive sensors and have a high computing capability. These factors make it possible to use these mobile devices for many mobile applications such as monitoring cycleway road conditions.

The next study discussed an embedded surface road classifier for smartphones used to track and classify routes on bikes. The authors address the problem of the quantity of accelerometer data that would have to be uploaded along with GPS tracks for server classification. Their approach is to classify cycling paths online with an embedded classifier, that has been trained off-line, which makes the data upload unnecessary. This way the accelerometer data of a bicycle-mounted smartphone is collected, labeled, and a classification model is learned, which then again is deployed on the smartphone. The results indicate the requirement of moderately fast smartphones to conduct the classification on mobile devices. However, the system was able to detect larger unevenness’, bumps and classify only short segments of tracks as satisfying. Also, the power consumption of the learning algorithm running on the smartphone is still questionable, mostly ruling out every crowdsensing approach [14].

Another study examines the suitability of smartphone sensor data for road condition determination. Two android devices with different sensors and computing capacities are evaluated in terms of data quality and data density. The approach of the study is to capture the acceleration data of a smartphone attached to a vehicle and upload the data on to a classification server for real time road classification. The results indicate a relatively high unreliability of mobile data connection. The authors suggest using a time shifted upload method instead relying on the availability of suitable mobile data connection. Furthermore, the measurement results are distorted by shock absorbers and vibration generated by the vehicle. Nevertheless, the basic use of smartphones to determine the quality of roads is confirmed [15].

A further study investigates the monitoring of motorized road and traffic conditions in cities using mobile devices. Data from location sensors, accelerometer and microphone is collected to evaluate whether and how road conditions have a negative impact on traffic management. The focus of the work is first the detection of potholes and bumps on traffic routes and second the estimation of the resulting effects such as dodging, strong braking and honking of the vehicles [4].

The context of the rapid growth of networked mobile sensors that record data in everyday life and share it via the internet is described in the next study. The term “mobile crowdsensing” is introduced and the benefits and challenges of such a development explained. Finally, the challenges and the lack of a single data infrastructure are identified [16].

2.3 Summary

Comparing both approaches to monitor cycleway road conditions using smartphones instead of sensor boxes promises to be a widely accepted approach. While sensor boxes have the ability to collect data that mobile devices cannot, such as particulate matter, temperature and humidity, the advantages of mobile devices make it an attractive platform to use for monitoring cycleway conditions. The benefits of mobile devices are listed below:

  • The ability to collect data on light incidence, curviness, decelerations, changes in altitude and the roughness of surface conditions by applying different sensors

  • High user acceptance and thus high market penetration of smartphones

  • No additional costs and power supplement for sensor infrastructure

  • High potential for participating in crowdsensing projects to enforce civic engagement

To ensure data quality using a smartphone it is necessary for the mobile devices to be completely rigid of the bike handlebars. Out of these considerations our approach is presented in the next chapter.

3 Monitoring Cycleway Conditions Using Crowdsourced Data from Mobile Devices

To implement our full-scale crowdsensing approach for monitoring road conditions of cycleways, the system must be transparent and intelligible for the user. Beyond intelligibility the user interaction with the system for the execution of a service must have a low-threshold for being executed regularly [16]. Furthermore, the execution of a service must be reliable and not perceived as an impedance. A major disruptive factor for users of mobile devices is the power consumption of an executed service, e.g. running a machine learning classification algorithm on the smartphone [14]. In most cases, energy draining applications are often viewed as more disruptive then mobile data draining applications [23, 24]. In the best case, the execution of a crowdsensing service is not even noticeable or embedded into another beneficial service.

All above listed considerations flowed into the conception of the project presented here. We are aiming to create a community portal to evaluate the comfort for bicyclists based on crowdsourced data. Generally, there are two approaches to monitor cycleway road conditions: event-based, which only detects locations with surface irregularities such as potholes; and continuous road classification. In the current work, the second approach was chosen to provide a wide overview of cycleway road conditions because this method collects continuous data through the entirety of the recording process. More specifically, we introduce a crowdsensing approach for monitoring road surface conditions of cycleways. Thereby we use the smartphone as a sensor platform and derive data from different sensors build in the most modern mobile devices.

A two-stage condition recording and evaluation procedure was developed for monitoring purposes. Furthermore, an Android data collection application called GyroTracker was designed, implemented and evaluated. In the first stage, data is collected via mounting the smartphone on the bike’s handlebar using a bicycle navigation mount. Once the app is started, the location service of the device will run in the background. Upon completion, user’s own location will be displayed on a google map. Due to the high spatial relevance of the measurement data, the data recording can only begin after the device’s location is available. Once located, users can start recording of both location and sensor data. During the bike ride, GyroTracker reads the four sensors: location, gyroscope, acceleration, and linear acceleration and stores the data into the smartphones database (Fig. 1). More details and purposes of each used sensor type is provided in Sect. 4.

Fig. 1.
figure 1

Collecting data via GyroTracker.

After the completion of a recording, the measurement-id is incremented in the background, ensuring the identification of each recording. After finalizing the recording, the data is uploaded to the classification server (Fig. 2). On the server, the data is cleaned and further processed. To ensure the assignability of sensor data with the location data, the location data must be interpolated.

Fig. 2.
figure 2

Uploading data after collection.

In the second stage, the uploaded data is classified by a machine-learning algorithm into three quality classes (Fig. 3). More information about the classification algorithms is provided in Sect. 5. After classification, the classified tracks are synchronized with the application GyroTracker to visualize the classification results (Fig. 4).

Fig. 3.
figure 3

Classification of the data on the server.

Fig. 4.
figure 4

Synchronization of the classified data.

Based on the described approach, measurements are repeatedly evaluated and changes in infrastructure become immediately visible. The conditions of bike paths are displayed on the community portal for cyclists, aiming to promote the non-motorized means of individual traffic.

4 Implementation of the GyroTracker Application

Due to many sensors, high computing power, high global market share of over 75%, relatively low cost and the easy accessibility of the programming API, Android smartphones are well suited for being used as sensor platforms. It is possible to realize first measurement results after a short time of implementation. For the determination of cycleway road quality, the crowdsensing data collection application GyroTracker was developed. To address the widest possible user group, the support level has been set to API level 17, allowing 97–98.4% of android smartphone users to use this application on their smartphone [25, 26].

4.1 Functionality

To achieve a greater chance of usage and to correspond with the guideline imposed in the concept, the data collection was embedded into a navigation layout as the beneficial service for users. Therefore, the central element of the application, is a map view of a user’s location. Google Maps was chosen as the map provider for GyroTracker, for its up-to-date maps, accuracy and the relatively simple implementation in an Android environment.

In the next step the map layout is created. The map is automatically centered on the last known location and enlarged to zoom level 15. As soon as the system has prevailing coordinates, the view is updated to the new location. This way, only the required map tiles are downloaded which reduces the mobile data consumption. Furthermore, a separate location button has been created, allowing the user to manually move the view to the current location at any time.

While recording a track, the current position of the smartphone is focused, and automatically updated to a new map section at any new location. Zooming in or out of the map is still possible during a measurement. Furthermore, all coordinate pairs are stored in an array list during the measurement. These are used to mark the path covered on the map with a polyline. The polyline is still available after completion of the measurement ride and is automatically removed from the map at the beginning of a new measurement. This allows the recorded track to be traced after the measurement is stored in the smartphone database.

4.2 Operational Sensors

During the measurement, different sensors are used. The sensor technology built into the smartphone can be divided into two categories: hardware- and software-based [17]. In the following, the individual sensors and their functions during a measurement are presented in more detail.

The location sensors locate the mobile device during the data acquisition phase (Fig. 5). Thus, in the evaluation phase, the recorded sensor data can be uniquely assigned to their coordinates. To determine the location of a smartphone, a combination of satellite-based global navigation system (GNSS) data, Wi-Fi and mobile data is used [18]. However, the methods of the recipients used to determine the location are different. While the accuracy of a Wi-Fi location is 2–3 m, the accuracy of the GNSS location is officially stated as 10 m, but usually more accurate in open terrain [19].

Fig. 5.
figure 5

Location sensors.

In accordance with Fig. 6, the hardware-based gyroscope measures the rate of rotation of the smartphone in three dimensions to capture the relative change in position [20]. Thus, potholes and other bumps in the road surface can be detected.

Fig. 6.
figure 6

Gyroscope.

The hardware-based accelerometer measures the acceleration forces in three axes including gravitational force (Fig. 7). The individual measured values are combined into a 3-dimensional vector, which indicates the direction and strength of the currently acting force [21]. The main task of this sensor is to detect uneven road surfaces such as potholes, transverse and longitudinal bumps, curbs and dropped curbs. Additionally, the measured values are used during the evaluation phase to validate the linear acceleration data.

Fig. 7.
figure 7

Acceleration.

The software-based linear accelerometer measures the instantaneous linear acceleration acting on the mobile device (Fig. 8). The peculiarity of this sensor is that the gravitational force g ≈ 9.81 m/s2 prevailing on the earth is mathematically eliminated. The measured values are recorded by the previously presented accelerometer and internally reduced to linear acceleration by using the Kalman high-pass filter [22]. The acceleration sensors behave as follows:

Fig. 8.
figure 8

Linear acceleration.

$$ acceleration\; = \;linear \, acceleration\; + \;gravity $$
(1)

During a measurement, both accelerometers are recorded to be able to validate the results against each other in the evaluation phase. However, the evaluation phase revealed different sample rates. Since the sensors used are streaming sensors, android’s sensor manager framework does not offer an opportunity to set a specific sampling rate for all three sensors, so each sensor has its own sampling rate [17]. While the gyroscope has a sampling frequency of approximately 150 Hz (six times a second), the accelerometer is 50 Hz (50 times per second) and the linear accelerometer is as low as 20 Hz (100 times per second). This challenge could be solved successfully by correlating the values using their timestamps. For this purpose, in addition to the sensor values, the associated timestamps were prompted and stored in the database. The additional saving of a timestamp ensures the subsequent assignment of the measured values with their associated geolocation.

Due to limited space on a smartphone screen, only the values of two out of the three used sensors are displayed on screen. The gyroscope and the linear accelerometer were selected as the most meaningful due to the already eliminated gravitational force. To display the most recent sensor values, text fields were created at the bottom of the screen. These text fields are overwritten each time the sensor values changed, so the most recent value of the sensor is always visible.

During the recording of a route, the sensor values with their accuracy specifications and the timestamp are written to the SQLite database. The individual measurements can be distinguished from one another on the database by the variable measurement-id.

4.3 User Interface

To increase the convenience of crowd users, the layout of GyroTracker was intentionally left uncomplicated. After opening the application, the user is situated in the main view, from which a quick start of the measurement is possible. As previously mentioned, the central element is the Google Map, which simultaneously displays a user’s current location. Above the map is the application name. Below the map, the current sensor values are displayed. While the values of the 3-dimensional gyroscope are shown on the left side, the values of the linear accelerometer are on the right side. Furthermore, the ‘My Location’ button, the button for starting the recording as well as the upload button are located on the map view.

For a better overview of which processes are currently running in the background of the application, the respective buttons are highlighted. Thus, the button to start and stop the measurements during a measurement is highlighted in red (Fig. 9a). The upload button is also highlighted in red while the data upload takes place (Fig. 9b). The same red color, used for highlighting background tasks, is used to mark the path during a measurement ride (Fig. 9c). Thus, the user encounters only two colors in the application so a learning effect of the processes can occur.

Fig. 9.
figure 9

a. Active measurement in the background. b. Active upload in the background. c. Polyline displays recorded track. (Color figure online)

5 Classification of the Collected Acceleration Data

Machine learning describes an artificial generation of knowledge from experience. Thus, an artificial system, after completion of the learning phase, can generalize the learned examples and apply them independently. In the present case, patterns and laws are recognized in the recorded training data, and these are later applied to the real measurement data. However, before being classified by a machine learning algorithm the algorithm is trained by a training data set with a distribution of 70/30.

5.1 Trainings Dataset

To create a trainings dataset to teach our classification algorithm, a definition of the perceived cycleways quality was needed. Therefore, a two-step approach was chosen. First, tracks of cycleways with different pavements and different roughness’ were recorded. Second, the cyclists and in-line skaters were questioned on site to classify the pavements into three quality classes, as they are most effected by the rough roads. In this experimental study we gained information about the actual perceptions of the bike road users. The survey took place in Karlsruhe, the city with the second largest German biking community [27]. The results of the survey indicate a flat concrete superstructure road and a smooth paved road as ideal for cyclists and in-line skaters (Fig. 10a). A conditionally suitable road is defined as a road covered with coarse asphalt with partially used tar patches, a coarse asphalt surface and rarely to regularly occurring potholes (Fig. 10b). An unsuitable cycleway is defined as an unpaved gravel road or pebble path as well as an uneven track with many transverse and longitudinal bumps (Fig. 10c). The results gained out of this experiment were used to label the recorded data in the training data set prior to the model training process.

Fig. 10.
figure 10

a. Image and corresponding graph of rotation speeds occurred cycling a cycleway with quality class 1. b. Image and corresponding graph of rotation speeds occurred cycling a cycleway with quality class 2. c. Image and corresponding graph of rotation speeds occurred cycling a cycleway with quality class 3.

In Fig. 11a, an illustration visualizes the evaluation of the x-variable from the gyroscope sensor for one representative track from each class. Figure 11b and 11 contrast the y- and z-variables of the linear accelerometer with one representative track from each class, while Table 1 shows the numerical evaluation of the measured data for one representative track from each class.

Fig. 11.
figure 11

a. Amplitude of x-variables gyroscope. b. Amplitude of y-variables linear acceleration. c. Amplitude of z-variables linear acceleration.

Table 1. Measured acceleration data of the 3 different classes.

5.2 Selection of a Suitable Classification Method

In preparation for the algorithmic classification, the data in the training dataset were labeled according to their classes and made available to the model for training. The training of the model using the trainings dataset was carried out offline using RapidMiner, an open source system for data mining. The uploaded files from the GyroTracker application were directly imported into RapidMiner and further processed. RapidMiner supports classification algorithms such as Naive Bayes, Decision Tree and Neural Net, allowing for efficient evaluation of collected sensor data. To ensure model correctness, the resulting model was validated ten times, which means that the input data are divided into ten parts in the first step. In the next step, a model is trained on nine of the ten sub-data and applied to the tenth remaining part. This process iterates ten times through the entire data set and averages the model accuracy determined for each iteration. These averaged values can be found in Table 2 for each classification algorithm.

Table 2. Forecast accuracy of the cycleway classification of four selected methods.

As Table 2 demonstrates, each classification algorithm has its advantages and disadvantages. While tracks labeled class 1 has been satisfactorily recognized only by Naive Bayes and K-Nearest Neighbors (K-NN), data labeled class 2 has been well recognized by all but Naive Bayes. Meanwhile, tracks labeled as class 3 roads have only been successfully identified by K-NN. The reason for such a high instability of the accuracies is the high instability of the sensor values. The extremely sensitive gyroscope and the accelerometer provide values in all areas. Often, the road class changes several times within one second, which only corresponds to reality in a few cases. In view of this, the validation result of the method K-Nearest Neighbor with 91.12% and a standard deviation of ±0.78% were found an acceptable value and therefore implemented as the standard classification method on our classification server.

6 Experimental Evaluation and Results

To evaluate the developed cycleway road surface classification, an experimental evaluation on and around campus of the Karlsruhe University of Applied Science was performed. Students and volunteers were asked to participate in the data collection process. Study participants could participate in two different ways. First, while commuting from home to university by mounting their smartphones on the bike’s handlebar. And second, by taking the Segway Personal Transporter (PT) for a ride. Figures 12 and 13 show participants riding a bicycle on separated cycleways as well as bike lane collecting data with the GyroTracker application.

Fig. 12.
figure 12

Participant cycling a cycleway collecting data for cycleway road classification.

Fig. 13.
figure 13

Participant cycling a bike line collecting data for cycleway road classification.

Figures 14 and 15 a, b and c show participants adjusting and riding a Segway PT on cycleways and shared paths collecting data with the GyroTracker application.

Fig. 14.
figure 14

Probands preparing data collection application for a measurement ride.

Fig. 15.
figure 15

a. proband collecting data on a two-way cycleway. b and c. two probands collecting data simultaneously.

During the evaluation, all participants were equipped with Samsung Galaxy S6 Edge with the android version 6.0.1 and 4 × 2.1 GHz processor devices. Deviating from [15], our evaluation focus is on the method used for classification of collected data, therefore the collection of measurement data by further devices was omitted.

In the short period of the experimental evaluation, a total of 21 measurements of different cycleway road qualities was carried out. The result was a dataset with over 510,000 individual measuring points. Afterwards, the twelve pavements most frequently used on cycle paths were selected and classified with our pre-trained model.

The results show that our trained model with the K-NN as the classification algorithm has stable results in all three classification classes. The accuracy of the selected classification method proves reasonable results at 90.33%. According to Table 3 only 3,308 of the 34,574 data points were detected incorrectly.

Table 3. Result of the modeling of the classification method K-Nearest Neighbor.

To increase the accuracy of the models and to find out what pattern were recognized in the dataset, the input data was varied several times during model creation. When the data collection is conducted with a bicycle, the forces acting in the direction of travel are given the highest value, while the forces acting crosswise to the direction of travel can be seen more in connection with steering and pedaling (Fig. 16a). To eliminate these influencing factors in the validation phase, the y-and z-variables of the gyroscope and the x-variable of the accelerometer were excluded from the modeling. However, with this manipulation no improvement could be achieved, on the contrary, the accuracy of the models deteriorated rapidly. The model deterioration indicates that the 3-dimensional data appears in a certain pattern, which was recognized by the model and applied while classifying the tracks. A different pattern of the data was found when a Segway PT was used collecting the data. The forces acting transverse to the direction of travel would play a more significant role because the wheels are parallel and next to each other instead of behind each other like in the case of a bike (Fig. 16b).

Fig. 16.
figure 16

a. Rotation forces on longitudinal axed bike captured by gyroscope. b. Rotation forces on cross-wise axed Segway captured by gyroscope.

The International Roughness Index (IRI) is a standard global index of road roughness [28, 29]. The results of our study show that the IRI and the vertical component of the linear acceleration values have a high correlation. Thereby the vertical component of linear acceleration is calculated as the sum of modulus of y-values and modulus of z-values of the linear acceleration data (Formula 2).

$$ \mathop \sum \nolimits \left| {y - values } \right| + \left| { z - values } \right| $$
(2)

7 Conclusion and Future Work

This paper introduces an approach for cycleway road classification using crowdsourced data derived from on bicycles mounted smartphones. The data collection and contribution to the system is done by GyroTracker, an application specially developed for the purposes of volunteers crowdsensing the road surface. The classification of the collected data is done by a machine learning algorithm in the cloud, where the data is uploaded after collection. After the data is classified the track sequences are synchronized from the cloud to the user’s smartphone.

The evaluation of the system showed that variations of speed during the measurement process have a large influence on the recorded sensor data, which has been observed in previous research [27]. This factor can be minimized by additionally considering users’ current speed in the model. Further improvement of the classification results can be achieved by filtering out data noise caused by users when pedaling and steering. In particular, pedaling can be recognized in the data by machine learning algorithm because of its periodic nature. In related works, other authors rely only on acceleration data for classifying road conditions. Our approach is using additional rotation speeds gained from the gyroscope data for recognizing such unwanted events, like pedaling. From our adoption, the bump and pothole detection can be improved by analyzing acceleration and rotation data, due to their certain regularity, depending on the used vehicle. Therefore, we introduced an approach using a combination of acceleration data and gyroscope data to improve the bump and pothole detection.

In the future, the system is going to be expanded to not only be useful for those contributing to the system but also for all interested and affected users, creating an online community portal. The benefit of such an online system could be a route planning tool, where users can adjust what kind of cycleway roughness they prefer to cycle. Finally, municipalities and cycling-friendly cities can monitor the quality of their cycleway route network for detecting damage and initiating road repair, free of cost. The saved funds can be invested in the actual implementation of the measures instead of the monitoring of the conditions.