INVESTIGATION OF BICYCLE TRAVEL TIME ESTIMATION USING BLUETOOTH SENSORS FOR LOW SAMPLING RATES

Filtering the data for bicycle travel time using Bluetooth sensors is crucial to the estimation of link travel times on a corridor. The current paper describes an adaptive filtering algorithm for estimating bicycle travel times using Bluetooth data, with consideration of low sampling rates. The data for bicycle travel time using Bluetooth sensors has two characteristics. First, the bicycle flow contains stable and unstable conditions. Second, the collected data have low sampling rates (less than 1%). To avoid erroneous inference, filters are introduced to “purify” multiple time series. The valid data are identified within a dynamically varying validity window with the use of a robust data-filtering procedure. The size of the validity window varies based on the number of preceding sampling intervals without a Bluetooth record. Applications of the proposed algorithm to the dataset from Genshan East Road and Moganshan Road in Hangzhou demonstrate its ability to track typical variations in bicycle travel time efficiently, while suppressing high frequency noise signals.


INTRODUCTION
Bicycles are the most popular travel means in China, which contribute to 30% to 70% of daily trips.Accurate travel time information acquisition is essential to the effective planning and management of bicycle travel conditions.Traditionally, video camera data have been used as the primary source for measuring the quality of bicycle travel time, which have been expensive and invasive to privacy.In recent years, a novel technology that uses bypassing Bluetooth devices to capture vehicle travel times has been proven to be effective [1][2][3].With the increased penetration of Bluetooth on the roadways in China, nearly 2% to 3% of bicycles in Hangzhou had active Bluetooth devices in 2010.These sensors became a viable alternative to other methods of bicycle travel time data collection [4][5][6].
Bluetooth is a short-range communications protocol developed by the Special Interests Group for interdevice communications.This protocol creates some challenges for its additional uses, which could be optimized for travel time collection based on Bluetooth MAC (Media Access Control) address matching [7].
Bluetooth sensor systems may provide time stamps at which bicycles pass successive monitoring sensors; however, the data gathered by these systems require some form of filtering to remove outlier readings.Frequently, the outlier data include bicycles making a stop or taking a detour between two locations.These bicycles experience atypical travel times; therefore, these readings should be removed from the dataset of valid readings to avoid producing erroneous travel time estimates.Filtering algorithms are often based on removing the readings with unreasonably low speeds [8][9][10][11].
However, this approach has several disadvantages.The algorithm does not handle both stable (constant mean) and unstable (varying mean) traffic conditions, especially for bicycles flow.Moreover, the algorithm cannot be applied to low levels of market penetration (less than 1%).In response to the above issues, the current research has been dedicated to the following aspects: 1. Analysis of bicycle travel time error using Bluetooth sensors and problem formulation; 2. Description of the proposed filtering algorithm for travel time estimation using Bluetooth sensors; 3. Development of a filtering algorithm that considers low sampling rates; 4. Verification and implementation of the proposed method to the data from Genshan East Road and Moganshan Road in Hangzhou.
The advantages of the proposed method are: 1.The proposed algorithms are simple and do not need a lot of computer resources for their realization; 2. The proposed algorithms can handle both stable (constant mean) and unstable (varying mean) traffic conditions, and correct abrupt changes in the means of bicycle travel times and spurious spikes; 3. Using the obtained coefficients described in the section of considering low sampling rates, the proposed algorithms can be applied to low levels of market penetration (less than 1%); 4. The proposed algorithms can be used not only for offline, but also for online data filtering.

PROBLEM FORMULATION
Obtaining travel time measurements using Bluetooth devices involves matching an observed MAC address between two locations.The difference in time between the two readings is the travel time [12].Bluetooth readers are capable of detecting MACs within a specific range; hence, the travel times obtained can be considered zone-to-zone.This is illustrated in Figure 1 where the dashed lines represent the Bluetooth detection zone.The average travel times obtained from the Bluetooth sensors can be expressed as: where , M j L BT ^h is the Bluetooth-based average travel time between nodes A and B during period L, respectively; n is the number of readings; t is the time stamp when a bicycle or Bluetooth device is detected.The Bluetooth-equipped bicycle could be detected any time within the detection zone.The timestamp, t, for the Bluetooth-based method is defined as the time of the first discovery of the Bluetooth device no matter how many times it is detected afterwards.
The authors realized that the travel time reported by the Bluetooth device will be subject to the following sources of error: spatial error, temporal error and sampling error.Spatial error is caused by the variation of detection zone radius.Temporal error is caused by multiple times detection.Sampling error is caused by other mode of transportation being detached [13].
Bluetooth MAC address-based travel times are expected to contain outliers.These outliers are usually caused by drivers who detour or stop at certain places between detector locations rather than being delayed by the bicycle stream.The existing noise removal procedure can be relatively trivial because only bicycles comprise the relatively large travel time data set.However, the Bluetooth device still contains several errors.A median offline filtering algorithm is designed to extract ground truth from the pool of Bluetooth readings.A detailed comparison between the proposed filter and an alternative method by Dion and Rakha [14] can be found in Mei et al. [15].

PROPOSED FILTERING ALGORITHM
The proposed filtering algorithm is the Moving Median Filter (MMF).A window of size L is "moving" from the beginning to the end of the time series with unit step k and the median of L values falling within the window are continuously calculated.As shown in Eq. ( 2), the technique estimates the median of L successive travel time values.A similar process is used to estimate the standard deviation in Eq. (3).
, , (3) where, M , i L is the Median of L successive travel time values, where time i is the middle point of window; Vi is the travel time of bicycles at moment i; k v is the Standard Deviation (SD) of time series in the sampling interval k; Sk v is the smoothed SD of time series that is estimated in the sampling interval k with the use of the filter; a is the smoothing factor (varying between 0 and 1, based on the number of valid readings in the current sampling interval).
The flowchart for MMF is presented in Figure 2, and a detailed description of the algorithm is introduced below.
Step 1: Select time series from database with N elements.This filter is optimal for the time series containing abrupt changes in the mean, followed by recovery.
The flowchart of the proposed MMF is presented in Figure 2.
Figures 3 (a) and (b) illustrate the application of filtering algorithm to survey data with Bluetooth sensor on Genshan East Road, and Figures 3 (c) and (d) illustrate the application on Moganshan Road.Genshan East Road and Moganshan Road are both fourlane arterials with four inside vehicle lanes and two bicycle outside lanes.The average bicycle volumes of two roads exceed 1,000 bic/h which provides good conditions for detecting bicycle data.Figures 3 (a), (b),  (c) and (d) illustrate how the search window enhances the performance of the proposed algorithm.The size of the validity window is defined by the number of standard deviations which is user-definable in the algorithm.However, the basic validity ranges encompassing two or three standard deviations are envisioned to be utilized.The use of two-standard-deviations wide search window would mean that all data points Z. Mei, D. Wang, J. Chen, W. Wang: Investigation of Bicycle Travel Time Estimation Using Bluetooth Sensors for Low Sampling Rates within a 95% lognormal confidence interval would be considered valid, and that all other points falling outside this range would be rejected from consideration when estimating average link travel times.The use of a validity window three-standard-deviations wide validity window would mean that all data points within a 99% confidence interval would be considered valid.Through using the four sets of data of two arterials, the figures illustrate the variation in the interval average travel time, as well as the lower and upper limits of the validity window, after the consideration of trends outside the basic validity range.

CONSIDERATION OF LOW SAMPLING RATES
To further improve the filtering algorithm for the consideration of low sampling rates, additional enhancements are made.Given the variable nature of traffic flow, estimating the travel times during an interval while using data collected in the previous intervals does not ensure that the resulting estimates are truly representative of the real average trip time of the interval [5,11,16].For instance, if bicycle flow is slowly increasing during a given portion of the day, the average travel time measured in consecutive intervals could be expected to increase gradually.Secondly, the assumption that the median travel time and standard deviation of the validity window would remain constant during intervals with no readings, as defined in Eqs. ( 2) and (3), could potentially result in the algorithm using outdated average travel times to determine the validity window limits.
As can be observed in Figure 4, the application of the filtering criterion defined by Eqs. ( 2) and (3) does not produce good results.The filtering criterion is unable to follow the underlying travel time increase between 6:30 and 8:30 a.m.This failure is caused by the combination of the abrupt increase in roadway travel times and no observations.Because travel times change rapidly at the onset of the period, a gap of a few minutes is sufficient in this case to raise the average link travel time beyond the validity bounds.The validity window would remain constant during intervals with no readings.Since all subsequent observations lie outside the validity window, they are considered invalid and rejected.
In this case, a period with no recorded travel time does not mean that there are no bicycles passing through the pair of Bluetooth sensors, but simply that no bicycles equipped with Bluetooth are travelling.To increase the responsiveness of the algorithm to the changes in traffic conditions and to situations with low sampling rates Eqs.( 4) and ( 5) are introduced to modify the search window limits.Eqs. ( 4) and ( 5) compute for the number of standard deviations n k v used in Eqs. ( 2) and (3) within each sampling interval k, based on the number of intervals with zero readings.
where n0 k is a user-defined parameter; m represents the minimum number of standard deviations to consider, and a sensitivity parameter bv .Eq. ( 5) provides a model that dynamically adjusts the size of the validity window based on the number of preceding sampling intervals without Bluetooth record.For any interval in which at least one reading was made in the preceding interval, the equation defines a validity window that corresponds to the minimum size specified by the user, m .If no readings were made in the previous interval, the size of the validity window is increased to m m b + v ^h.If no readings were made in the two previous intervals, the validity window is further increased A .The size of the validity window will continue to increase with each preceding interval without readings, until the maximum size of 2m is reached.4) and ( 5) on the performance of the proposed algorithm.The figure compares various algorithms, considering an arterial road segment with a relatively low travel time sampling rate by applying a version of the filtering algorithm with only Eqs. ( 2) and ( 3), with a version that also includes Eqs. ( 4) and ( 5).There is a noticeable difference in the size of the validity window used by both versions of the filtering algorithm.Identical validity window limits are used by both versions of the filtering algorithm for all sampling intervals, for which travel time readings are made in the preceding interval.Increasing differences are observed for intervals preceded by an increasing number of intervals without readings.
In Figure 5, the effect of the modified filtering algorithm is particularly apparent in the intervals between 5:00 and 8:30.Within this period, thirteen travel times were observed, which were concentrated between 24 min.and 35 min.After the detection of the first bicycle passage, the minimum and maximum search window limits for the subsequent sampling interval, 5:00 to 6:00, are set at 8.66 min.and 24.44 min., respectively, by the MMF algorithm.As time passes without any additional readings, the filtering algorithm based only on Eqs. ( 2) and (3) maintains a fixed validity window, whereas the algorithm with Eqs. ( 4) and ( 5) gradually alters the size of the validity window to 4.02 min.and 35.62 min.by the time the 5:00 to 6:00 interval is reached.This thirteen travel times concentrated between 24 min.and 35 min.were considered as valid by the modified algorithm with Eqs. ( 4) and (5).A visual analysis of the time series of the recorded travel times appears to indicate that the thirteen travel time readings should be considered according to the Video cameras observations on spot.

ALGORITHM TESTING AND VALIDATION
To evaluate the ability of the proposed filtering algorithm to follow the fluctuations in the observed travel times correctly, the algorithms defined by Eqs. ( 2) and (3), and ( 4) and ( 5) were applied to two arterial roads in Hangzhou, Genshan East Road and Moganshan Road, as shown in and (e) illustrate the application results of the proposed filtering algorithm to the travel time series described above.The results shown in each figure are those associated with the calibrated parameters producing the best results.The average confidence interval is about 99.6%.The proposed filtering algorithm is able to track all major changes in the observed travel times correctly.There may be arguments about the validity of some readings; however, these are relatively few and do not appear to affect the underlying trend significantly.In particular, the figures show that the proposed filtering algorithm could effectively respond to abrupt increases and decreases in observed travel times.The ability to track these changes is particularly apparent in the data for April 13 in  To successfully demonstrate the ability to respond to the underlying trend, Figure 7 shows, more specifi-  As a result of these very low sampling rates, the diagrams in Figure 7 of Genshan East Road in May 14, 2012 typically feature large intervals with no readings.In the diagram, there are typically no Bluetooth readings between 5:00 and 6:00.Aside from these two time points, periods of more than 30 min.without any reading is not uncommon.The presence of these large gaps greatly increases the task of the proposed filtering algorithm to identify underlying low frequency trends from the high frequency white noise, as well as to determine whether travel times observed after a large gap truly represent the existing bicycle flow conditions or should be considered invalid.

CONCLUSION
Filtering the data for bicycle travel time using Bluetooth sensors is crucial to the estimation of link travel times on a corridor.The current paper describes an adaptive filtering algorithm to estimate link travel times using Bluetooth data.The proposed algorithm overcomes a number of shortcomings in the existing algorithms by handling both stable and unstable bicycle flow conditions and functioning at different levels of market penetration (including less than 1% of the traffic volume).The proposed filtering algorithm determines the range of valid travel time readings within each sampling interval by considering the number of readings in the current and previous sampling intervals, as well as the number of consecutive readings outside the validity range.Applications of the proposed algorithm to the dataset of link travel times collected by Bluetooth sensors on Genshan East Road and Moganshan Road in Hangzhou demonstrate its ability to track the underlying roadway travel times correctly, while suppressing high frequency noise.
Despite the successful application of the proposed algorithm to the Bluetooth dataset, further tests are required to validate the findings of the current study.The use of historical data as an additional validation criterion or a means to provide travel time information during long intervals without travel time readings from Bluetooth readers should also be investigated.

Figure 1 -
Figure 1 -Segment composition ue; otherwise, enlarge L by factor of 2 and go to step 3.(Maximal and minimal limits of , M P P , m ax min i L -;) Step 6: If absolute value of v M D > of maximal deviation of current count rate from median value -Dmax .)Step 7: Increment i by 1, go to step 3.

Figure 2 -Figure 3 -
Figure 2 -Flowchart of the proposed MMF

Figure 4
Figure 4 Application of MMF filtering algorithm to survey data with Bluetooth sensor for low sampling rates

Figure 5
Figure5illustrates the effect of Eqs.(4) and (5) on the performance of the proposed algorithm.The figure compares various algorithms, considering an arterial road segment with a relatively low travel time sampling rate by applying a version of the filtering algorithm with only Eqs. (2) and (3), with a version that also includes Eqs.(4) and(5).There is a noticeable difference in the size of the validity window used by both versions of the filtering algorithm.Identical validity window limits are used by both versions of the filtering algorithm for all sampling intervals, for which travel time readings are made in the preceding interval.Increasing differences are observed for intervals preceded by an increasing number of intervals without readings.In Figure5, the effect of the modified filtering algorithm is particularly apparent in the intervals between 5:00 and 8:30.Within this period, thirteen travel times were observed, which were concentrated between 24 min.and 35 min.After the detection of the first bicycle passage, the minimum and maximum search window limits for the subsequent sampling interval, 5:00 to 6:00, are set at 8.66 min.and 24.44 min., respectively, by the MMF algorithm.As time passes without any additional readings, the filtering algorithm based only on Eqs.(2) and (3) maintains a fixed validity window, whereas the algorithm with Eqs.(4) and (5) gradually alters the size of the validity window to 4.02 min.and 35.62 min.by the time the 5:00 to 6:00 interval is reached.This thirteen travel times concentrated between 24 min.and 35 min.were considered as valid by the modified algorithm with Eqs.(4) and(5).A visual analysis of the time series of the recorded travel times appears to indicate that the thirteen travel time readings should be considered according to the Video cameras observations on spot.

Figure 6 .Figure 5 -Figure 6 -
Figure 5 -Effect of low sampling search limits on the operation of the proposed filtering algorithm Figures 7 (a) and (b), which illustrate a significant change in travel times possibly caused by the onset of congestion due to an incident or illegal parking on the road.