RIDE VIBRATIONS: TOWARDS COMFORT-BASED BICYCLE NAVIGATION

: Providers for common navigation systems and mobile applications apply their route choice concepts for cars almost unmodiﬁed to cyclists. In contrast to motorists the latter are not signiﬁcantly inﬂuenced by the trafﬁc situation or speed limits, but notably by other factors like slopes and path’s surface type and quality. In a volunteered geographic information fashion this paper contributes a smartphone-based mobile sensing and evaluation approach for bicycle way’s roughness. It presents the complete process chain from data acquisition using the mobile app ”RideVibes” to a detailed data analysis on street segment level to ﬁnally enable a comfort sensitive route optimization and recommendation.


INTRODUCTION
Often providers of common navigation systems and corresponding mobile applications apply their route choice concepts, originally designed for car drivers, almost unmodified to cyclists. In contrast to motorists they are not significantly influenced in their route choice by the traffic situation or speed limits, but notably by comfort factors such as road surface qualities, slopes and number of necessary stops and safety aspects like separate bike lanes.
Although focusing on E-bikes, apart from that, (Dane et al., 2019) gives a good literature overview for different factors influencing cyclists route choice in general. As one of the first times in (Bovy, Bradley, 1985) a study on cyclist route choice behaviour also taking surface quality into account was conducted, if only based on hypothetical routes so far. In contrast, as an example of recent years sensor driven studies like (Broach et al., 2012) analyze several different facility attributes on cyclists route choice behaviour based on GPS data, but do not directly take the comfort or surface quality into account. As a current example (McCarthy et al., 2016) states that cyclists are not only interested in a direct or fast route, but are also quite sensitive to comfort and safety aspects. More specifically, the thesis (van Overdijk, R.P.J., 2016) claims that a good quality of bike facilities and low slopes can be worth more than 4 minutes of travel time reduction. Likewise surface quality can be found in the group of most relevant factors for comfortable routes. This conclusion is also reached by the stated preference survey in (Stinson, Bhat, 2003). After travel time and distance from motorized traffic, the surface is of highest interest for cyclists. Further, surface quality seems to be the most important aspect compared to other comfort measures like hilliness, continuity or delays from stops. Finally, it turns out to be a little more important preventing bad surfaces than prioritize good ones. All this proves the relevance of surface conditions as a aspect of comfort for a suitable navigation of cyclists.
Towards more comfort sensitive navigation applications for cyclists, an automatized sensing and evaluation process of those * Corresponding author features is needed. Such an process provides an objective evaluation and is less time-consuming, since no considerations have to be made through subjective assessment. This work focuses on the surface roughness, which certainly affects the cycling comfort. When evaluating the surface both, the covering type (e.g. asphalt, pavement, cobblestone), but more important its condition, has to be considered. It would be somehow possible collecting road classes and covering types from existing administrative (official) sources, but when it comes to their condition, an automated measurement is superior. Another advantage compared to subjective evaluations is the possible continual scale gathered from recorded measurement data.
To represent a road's roughness indices like the Dynamic Comfort Index (DCI) (Bíl et al., 2015) and the International Roughness Index (IRI) (Zang et al., 2018) have already been developed. They condense a series of high frequent and dynamic acceleration measurements into a single representative value. Thus they directly include a simple scoring of the surface's comfort. In the mentioned literature the indices have been applied on data, collected by experimental and specialized sensors mounted on a single bike or the latter on cars.
However, the indices have not been applied to the most omnipresent multi-sensor platform in our daily lives: smartphones. Typically, smartphones include a three-axis accelerometer making it possible to sense small movements as well as hard shocks. Furthermore build-in GNSS receivers enable nearly continuous outdoor localization on street level. According to (Zang et al., 2018), smartphones have proved to be good measurement devices, as they have a high correlation with the data from high-quality instruments. Measuring the road surface roughness with smartphones in a Volunteered Geographic Information fashion, has several important advantages to the previous measurement concepts. The approach of collaboration to collect data of the roads surface quality makes it possible for many different people to participate, leading to a possible large and diverse dataset. On this dataset, in contrast to single measurement routes, detailed statistical analysis like outlier detection and classification can be performed, making it possible to determine the road surface roughness more realistic and accurate.
In this paper an approach and its complete process chain to determine and evaluate the roughness of bike paths is presented. It is based on a crowd-sourced mobile sensing approach for data collection, in which the cyclists run the own developed app "RideVibes" on their smartphones. Additionally, first analyses regarding the measured data quality are performed.

APPROACH
This paper's approach can be summarized to the process chain of data acquisition by the developed "RideVibes" Android application, matching the trajectories onto a routable path network in a preprocessing step, to afterwards derive roughness indices for the visited segments, which are finally integrated into a custom cyclist routing.

Data Acquisition
In a first step a data logging application for Android smartphones, called "RideVibes", has been developed. By this all necessary sensor data can be acquire in a scalable and userfriendly way. It allows participants just using their smartphone and a bike with a holder to acquire data on their (daily) trips. Fixing the smartphone to the bike (see Figure 1) minimizes effects from the user and maximizes forces by the surface via the bike. The application records the position (via GNSS-services) including the smartphone's speed by 1 Hz. Accelerations affecting the smartphone are logged by at least 100 Hz. To exclude the influence of the phone's orientation, they are transformed in that way that the z-axis points to the sky. To this end, a rotation matrix is calculated with the help of either the magnetometer or the gyroscope of the smartphone. For maximum control of the data, the user must start and stop recording the sensor data individually for each trip. The data is logged locally on the phone and can afterwards be uploaded selectively and pseudonymously to a backend infrastructure including a database server.
Currently, there are about 1000 trips collected from 10 different users. In total approximately 5000 km have already been recorded. In Figure 2, all edges that have been visited at least once are shown in yellow to green (for more visits). It further shows that a large part of the Hannover center (Germany) is already covered. Especially in the city centre, data is available in a high density and very comprehensive.

Data Pre-processing
All data is hold and managed in a PostgreSQL 1 database system extended by PostGIS 2 for spatial capabilities. For routing tasks it is further extended by pgRouting 3 .
Besides the collected sensor data, a routable graph representation of the test area's bicycle way network is required. The route optimization discussed in section 2.4 works on a cycling network topology consisting of nodes (representing the road intersections) and edges (street segments between). The routing graph is generated for the test region from OpenStreetMap 4 (OSM) and processed by the tool osm2pgrouting 5 . It filters out the relevant bike paths, transforms them into a routable graph structure and stores them into the database.
To enable a roughness analysis for each road segment, the collected sensor data needs to be linked to the routing graph. Thus, the user's trajectories (sequences of points) have to be mapped to the graph's edges, commonly called map-matching. Especially in such relatively dense and complex graphs as bike networks, assigning points naively to their closest edge gives noisy and erroneous outputs, which influence subsequent analyses badly. For that reason the more robust method of (Newson, Krumm, 2009) is applied. In this, instead of assessing each point individually, a Hidden-Markov-Model is used to find the most probable sequence of edges. The difference of distances and angular deviations is compared between the geographic and graph space to evaluate possible matching candidates.

Comfort Factor
In general comfort can take into account several factors and their corresponding effects on the cyclist. Primarily comfort aims to provide a safe and convenient ride for the cyclist by e.g. score different traffic loads or road widths. The cyclist is exposed to fewer stress situations and is therefore more convenient. In addition, the comfort can be influenced by the roughness of the road. A rough road causes the bike to vibrate heavily, which makes it difficult for the rider to control the bike and he or she must expend more energy to ride without an accident. In our approach, we focus only on the roughness of the way's surface. The safety aspect is not the in the focus of this research.
To represent the strength of this negative effect as numerical value, the bike's acceleration in z-direction is measured. This provides information about the scale of the road's roughness.
In Figure 3 acceleration plots for three exemplary road surfaces are shown. For an edge that represents a bad road, like one of cobblestones, the acceleration's amplitude in z-direction reaches high values, while the measurements on a good road vary only slightly around zero. This can also be seen in the standard deviation of those measurements, which is an indicator of how large the deviation is from the mean. Roughness indices are used to convert the obtained raw acceleration data into an interpretable and usable value. The latter is used to determine the edge costs during the routing (section 2.4). Two well-known possibilities to calculate such an index are the Dynamic Comfort Index (DCI) and the International Roughness Index (IRI). Both are based on measurement data obtained with an accelerometer and can therefore be applied to our raw acceleration data directly.
The IRI was already introduced in 1986 by The World Bank, but is still used for evaluating road systems. IRI is based on values measured by a car, that is why the calculation is also known as quarter car model. It indicates how much a tire (representing a quarter of a car) is affected by the road profile. It is expressed as the sum of vertical displacement of all sampling intervals divided by the travel distance, where αz represents the vertical acceleration and S the travel distance.
While the vertical displacement shown in Figure 4 is determined by the accelerometer, the travel distance is obtained by the GPS sensor. The double integral of the absolute values of the z-accelerations corresponds to the displacement in z-direction. The IRI is commonly given in a unit of millimeter per meter (mm/m), which can be imagined as displacement in z-direction per meter driven (Zang et al., 2018). Thus, the higher the values for the IRI, the rougher the road is.
The second index is the DCI, which was developed in 2015 by (Bíl et al., 2015) to provide an assessment of the quality of cycle paths. The index is calculated from the inverted accelerations: where n is the number of measurements during a time interval t. In our experiment we chose t as one second, due to the position frequency. ai are the measured values of acceleration in z-direction. Since the square of the accelerations is used, negative and positive accelerations cannot cancel each other out.
Large values for the accelerations are caused by a high road roughness. A road out of cobblestone causes many vibrations ( Figure 3). Since the DCI inverts the cumulative accelerations, bad conditions lead to a DCI value close to zero. Vice versa, good conditions with less accelerations end up in a higher DCI value. A well paved road will usually have a value slightly less than one. Please note that the DCI is not a normalized measure in every case, since by definition (equation (2)) it can also be higher than one for very low accelerations values. However, for most common situations, the DCI usually has a value between zero and one.
The roughness indices are not only influenced by the surface roughness of the road, but also by the driven speed, the bike type, the tire's pressure, smartphone setting and the cyclist's weight as well as posture. Higher speed results in more energetic vibrations and thus stronger accelerations. According to (Olieman et al., 2012) the relation between speed and roughness index is approximately proportional. The bicycle type has less influence on the indices (Werner, 2018). A higher tire pressure results in increased vibrations, which has a negative effect on the comfort (Olieman et al., 2012). Obviously the smartphone setting, where and how it's placed during driving, can have a huge influence on the logged sensor data and thus we assume it to be fixed at the bike's handle bar to keep it stable.

Routing
Depending on their custom needs the users should be provided with different route options. To this end, the user can rate the importance of various criteria to get a customized route. In this work we focused on the criteria length, duration and comfort.
For finding a optimal route in the routing graph between a given start and end, the Dijkstra algorithm is used (Dijkstra, 1959). This algorithm finds the route through the graph with the least summed up costs of visited edges. Thus, to find the shortest path from A to B, the length cost c l of the edges correspond to their lengths l. c l = l (3) To find the fastest path, the time spent on the edges, which is derived from the speed value v provided by the GPS measurement, is used as cost cv.
In order to include the comfort in the custom routing, the lengths of the edges are modified based on their roughness. For this purpose, we scale the lengths of the edges based on their estimated roughness factor r, determined by one of the indices from section 2.3, which have to be normalized into a range of [0,1] first. The linear change of the lengths is chosen between 75% and 125% of the original lengths. To calculate a comfort cost cc the following equation was designed.
To meet the the users' preferences the edge cost components determined by the speed, the length and the comfort have to be combined. For this reason and to overcome the problem of having different units, the comfort and length costs, both originally given in meters, are expressed as time needed for a certain edge by applying the total average speed vavg. To adjust the different components among each other, weighting factors are introduced. w l corresponds to the ratio of importance for the length of the route, wc for the comfort and wv for the fastest route. These weights can be adapted by the user on his/her needs. Therefore, the custom edge cost ccustom is determined by the weighted sum of the cost components where w l + wc + wv = 1.
Moreover, to also consider different typical rider speed categories, i.e. slow, medium, fast riders, the speed measurements of the edges are divided into three clusters by applying the k-means algorithm. Using the speed values of each cluster a corresponding average speed per cluster vavg,cat is calculated. Those resulting average speeds represent the different rider speed categories. They are used to replace the total average speed vavg in (6) to consider the rider categories. ccustom = w l · c l vavg,cat + wc · cc vavg,cat + wv · cv (7)

EXPERIMENTS & DISCUSSION
In order to compare the different roughness indices, explained in section 2.3, a test route was recorded. The test route was chosen in a way that it includes various road qualities, such as asphalt, gravel and cobblestone. This allows to investigate whether the scores of the two roughness indices and the standard deviation itself are able to represent the different road sur-faces and how they behave for different data acquisition conditions. The length of the test track is 3.2 km and consists of 90 edges in the routing graph. The map in Figure 5 shows the distribution of the different surface types along the route. Figure 5. The test route is used to evaluate the different scores under different conditions. The colors encode the different surface types asphalt (green), stone (yellow) and cobblestone (red). Source of basemap: ESRI

Comparison of Roughness Indices
Based on Figure 6, in which red numbers represent the worst comfort in the respective calculation method and green numbers the best comfort, it can be seen that the three calculation methods behave similarly for three edges with different road qualities. The cobblestone road is rated the worst in every method, the gravel road with medium values and the asphalt road is rated the best. indicate the worst comfort compared to the others, yellow medium comfort and green colored numbers mean highest comfort.
The advantage of the IRI seems first that it also takes the driven distance into account. But taking the position's uncertainty (and thus distance) into account, can also have a negative effect. The index is not only dependent on one single measurement, but on two (GPS and acceleration) whereas the DCI is only dependent on the acceleration measurements. Furthermore, the double integral in the IRI has a high impact on the error propagation. A further advantage of the DCI is that it is normalized, which allows a direct usage for the edge's cost in the routing. Since IRI and DCI behave similar representing the surface roughness and because of the advantages mentioned before, the DCI is used as a comfort factor for the routing.

Surface Type
Furthermore, we investigated whether the evaluated scores can reliably represent the different surface types. For this purpose, we investigate each score individually by identifying trajectory segments of homogeneous score values and comparing them to the corresponding actual surface types. The actual surface types are labelled manually. To find the homogeneous trajectory segments we cluster the corresponding score values using the kmeans algorithm, where k is equal to the number of different surface types. After smoothing, to eliminate outliers, we calculate the relative overlap of the segments by comparing the actual labels to the assigned cluster labels. In this way, we obtain an average overlap of approximately 82% for all of the scores. The results and the deviations of this analysis are shown in Figure  7. There are mainly four major regions that can be identified where the ground truth labels and measurements do not match. For regions A, B and C the problem is that those streets are actually asphalted but in a bad condition and thus identified as stone ground. The condition itself is not represented in the ground truth class labels, however, it leads to worse roughness scores, and thus to a label representing the next worse surface type, i.e. stone instead of asphalt.

Bike Setting
Different conditions during data acquisition lead to different values in the scores of the roughness indices. In our research we focused on the influence of the bicycle type and tire pressure on the scores. Therefore, the test route was driven with two city bikes and two racing bikes twice with different air pressure on the tires. It was made sure that everyone drove one after the other with the same speed. Thus, the factor speed has the same influence on all types of bicycles. Here it can be seen that racing bikes have higher sensitivity to the ground and thus worse comfort ratings than city bikes. This is due to the fact that the used city bikes have better vibration damping, due to their geometry and balloon like wheels compared to the racing bikes. In addition, the racing bikes generally have a higher tire pressure which also has an impact on the indices (Olieman et al., 2012). When comparing low and high tire pressures, it can be observed that low tire pressure results in values that indicate a higher comfort. This is because a tire that is not fully inflated has (up to a certain point) a damping effect. Here it is important to note that the tire pressure is not the same when comparing city and racing bike. On a city bike, low tire pressure is around 2 bar and high tire pressure around 3 bar. On a racing bike, however, low tire pressure is 6 bar and high tire pressure is 8 bar.  Figure 8 shows the comparison between a city bike and a racing bike with higher tire pressure over the entire course of the test route. The city bikes consistently show higher DCI values, i.e. higher comfort (which supports the previous statement). Nevertheless, the calculated values also behave similar. As written in section 2.3, the bike type shouldn't have a big influence on the DCI, so the difference between the city and the racing bike probably occur because of the difference in the tire pressure which again depends on the type of tire (racing bikes usually have tires that require a higher pressure). Figure 10 shows the comparison between a city bike with low inflated and more inflated tires over the entire course of the test track. This result demonstrates that it is essential to make sure that a less inflated tire is not confused with more comfort. Because it is far more strenuous to ride a bicycle that does not have sufficient tire pressure.

CONCLUSION AND OUTLOOK
In this paper a smartphone-based mobile sensing and evaluation approach for bike path's roughness is presented. The conducted experiments on real data, collected on a test route, show that the vibrations are affected by different factors like the surface type and condition, the bike type and the tire pressure. They further prove that common smartphone sensors can be used to estim-ate the riding comfort in this different situations. The evaluated indices IRI and DCI are able to reasonably represent the situation on the street segments. Because of the advantages of the DCI over the IRI, it is used to calculate the required costs for the routing offered as a service on a website. Besides the typical shortest and fastest route the routing service also provides a custom route considering the users preferences.
Under www.ridevibes.de a fully working demo can be found. There, the routing service can already be used for the city of Hannover, Germany. In Figure 9, this web-application is shown. On the website, the user is offered various input options. So, besides the inputs for the origin and destination, different sliders are implemented to enable custom weighting of the route criteria costs. Furthermore, the rider category can be chosen (slow, medium and fast). The bike type is not taken into account in the current version. The results for the different routes can be easily compared on the integrated web map. In addition to that, some route statistics are shown.
However, the experiments and the discussion of the results also show that there are outstanding issues, which have to be addressed in following studies. First tests using the web map as a navigator for cyclists deliver realistic results that match our experience. Due to the insufficient data on some roads, the redundancy of visits is still not high enough on most minor streets (see Figure 2). Therefore, outliers tend to have too much influence. In this case, an outlier test should be performed. Additionally, clustering algorithms, like DBSCAN (Ester et al., 1996), can be used to identify outliers beforehand. Nevertheless, an outlier search can only be done if enough data with a wide variation of users and respectively bikes is available.
Further, since every driver usually drives his common routes (e.g. the way to work), there exists edges in the road network measured only by a small group of people or even a single user. Therefore, the velocity data will be (slightly) biased towards the dominant user (group) for this edges.
This affects the ride type clustering if the edge is not visited by users belonging to different categories. Acquiring more data Figure 9. The routing service is offered on the website www.ridevibes.de. Source of basemap: ESRI The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B4-2020, 2020 XXIV ISPRS Congress (2020 edition) with a wider variation of users will result in better fitted clusters for each routing calculation. In further experiments the influence of riders speed on the comfort indices should be investigated systematically. With the use of GPS and accelerometers present in most mobile devices, we have an effective and easy way to acquire data. Furthermore, the influences of different bikes and tire pressures as well as rider weights have to be considered when calculating comfort costs.
Moreover, the usability of additional features can be analyzed to extend the routing. For instance, the collected data also includes the accelerations in x-and y-direction. This data can be used to detect sudden maneuvers, e.g. in dangerous situations. This information can be used to derive a safety factor which can be included in the routing.