5.1. Classification Algorithm for Vehicles and Pedestrians
One of the main challenges of this study was to differentiate between a device carried by a pedestrian and one carried in a vehicle. The fact that the distance between the sensors goes from 500 m to 1100 m must be taken into account.
In the manual measurements made to characterize these two types of transport, a Mean Hourly Intensity of 660 pedestrians and 616 vehicles was registered; that is, the number of vehicles and pedestrians was very similar. Bicycles using this itinerary were also taken into account and only 12 were detected, which is less than 1% of the total.
To determine an algorithm that would allow both types of trips to be differentiated, the travel time and the number of detections of each device within the detection field of the sensor were analyzed.
shows the distribution of the travel time of pedestrians and of vehicles. The central line corresponds to the average value and the upper line corresponds to the typical distribution of the values that are above average. The lower line corresponds to the typical distribution of the values that are below average. In this image, we can see that between 7:30 a.m. until 11:00 p.m. travel times of pedestrians and vehicles overlap; therefore, it was not possible to use travel time for this type of environment with short distances between sensors as a method for the classification of devices detected by BT sensors.
Then, the number of detections of the devices was analyzed. It was hypothesized that a pedestrian should be registered for longer and more frequent times within the detection range of the sensor. The sensors used have directional antennas of 12 dBi and therefore the detection zones cover areas that go from 200 to 300 m.
To test this hypothesis, an experiment was carried out with known devices, whose MAC address was known, making car and pedestrian routes. The number of detections recorded in each sensor for each MAC was studied and the mean value and standard deviation were calculated on a total of 96 controlled trips. The results obtained are shown in Table 1
It was also observed that the number of detections of the devices carried by pedestrians was always higher than 60. However, when the device was in a vehicle, it never exceeded 40 detections. Therefore, the number of detections of a device in the sensors was set out as the variable to be taken into account for determining the classification algorithm.
Once the results were analyzed, the criteria for classifying a trip of a motor vehicle was fixed when the number of detections registered from the MAC, in the sensors that allowed the trip to be created, was lower than the average value of detections in those sensors plus the standard deviation.
In our particular case of study, those devices that have performed a trip with a number of detections lower than 34 detections were classified as a vehicle.
In order to validate this hypothesis, we analyzed the results obtained in the classification of the entire period studied. When analyzing the filtering files, we observed that there were devices that had been registered many times. When the CoD and the value of the MAC were analyzed it was possible to know the manufacturer and type of device. Table 2
shows the results of the classification of vehicle hands-free devices.
As shown in Table 2
, these two BT devices inside a vehicle were classified as pedestrians only in 2.6% and 2.1% of over 750 trips measured by the TomTom and Parrot devices, respectively. These devices were detected for 6 days a week and for long daytime periods, which should correspond to devices inside a taxi, a bus or a delivery service.
The vehicle-pedestrian classification algorithm was also tested on 7 June 2015. On that day, a festival was held in the city of Valencia with traffic interruption throughout the historic center of Valencia from 05:00 p.m. to 10:00 p.m. Therefore, all the detections of the sensors during that period corresponded only to pedestrians.
In order to visualize the results of the detection, all the detections made of devices classified as vehicle or pedestrian have been represented in a graph [24
]. The X-axis represents the time of day and the Y-axis the travel time value in minutes. The green points in the graph correspond to trips of devices classified as vehicles that do not make any type of business. In red vehicles that do make some type of business before leaving the historic center or devices that have been classified as associated with a pedestrian.
As shown in Figure 4
and Figure 5
in the time slot of traffic interruption, the system did not report any vehicle traffic. In this period, only pedestrian movement should be detected. The festival celebrated that day corresponds to a religious festivity in which a procession takes place; the people who observe the procession occupied the whole avenue and pavements. This means that it was practically impossible for a pedestrian to travel between the sensors during the travel time set in the algorithm windows (6 to 8 min). Figure 6
shows the results with travel times up to 150 min, where in the period of traffic interruption only pedestrian trip (red points) have been detected but with high travel times.
The results verified that the filter used to classify the onboard BT devices or carried by pedestrians worked correctly, since during that time slot the historical center of Valencia registered a great volume of pedestrians who attended the celebration.
It should be noted that the system correctly classified the trips that were created once the traffic was reestablished at the end of the event.
5.3. Travel Time
Travel time is an essential parameter for our study, since it allows us to see if a vehicle has used the historical center to reduce the internal journey through the city or otherwise, if it was used for any type of business or if the driver is a resident.
In order to determine the travel time, the following algorithm has been used:
| = |
(0): Initial travel time between sensors i - j.
: Travel time associated with the free flow speed between sensors i - j.
(p): Average travel time at instant p between sensors i - j.
(p): Calculated travel time of trip k between sensors i - j at temporal instant p.
sup: Constant, in this study it takes value 2, sets the travel time value from which it is considered that the vehicle has made arrangements between the sensors (vehicle circulates two times slower than the average travel time).
inf: Constant, in this study it takes value 0.3, it sets the travel time value from which a lower value would be a non-real data (vehicle circulates three times faster than the average travel time).
β: Constant value that allows setting the value of taking into account the travel time value of the new valid trip registered. Typical values between 0.03 and 0.05
: Trips classified as valid, value of the O/D matrix in the route, in the temporal interval p.
An example of the results obtained from the classification is shown visually in Figure 5
, Figure 6
, Figure 7
and Figure 8
, where the intermediate line represents the travel time value calculated at each moment of the day. The upper and lower lines are the limits that set the travel time interval, at each moment, of vehicles that have passed through the historic center to reduce their route in the city.
Business hours in Valencia start at 10:00 a.m. until 09:00 p.m. from Monday to Saturday. On Sundays, only bars and restaurants are open. As shown in Figure 5
and Figure 6
, the results for two equivalent days are similar; the same is the case for other business days: there is a peak hour in the morning associated with the opening of shops and public administrative actions that are only carried out in the morning. The off-peak hours starts at mealtime from 01:30 p.m. until 04:00 p.m. In the afternoon, there is another peak hour but of less intensity that disappears when the shops close.
shows the results of the study on a Saturday; unlike a working day, no administrative transactions are made and service companies remain closed. Mainly shops and catering companies are open. There is a similar activity throughout the day with a peak at the closing time of shops that coincides with the beginning of the period when people move to the center to have dinner in restaurants of that zone.
shows the behavior of a public holiday where activity is mainly associated with leisure. For this reason a peak hour is detected at lunchtime. On Sunday night (Figure 10
), there is not as much activity in restaurants as on Fridays and Saturdays.
5.4. Percentages of Travel Distribution
To calculate the percentage of travel distribution, the algorithm described in the previous section has been applied to the trips of devices associated with a motor vehicle. Trips of vehicles that use the historic center to shorten their trips around the city have been labeled as passing vehicles. They refer to those trips whose travel time is between twice the average travel time value and 0.3 times the average travel time value. The rest of trips that register a travel time higher than twice the average travel time value have been considered as having a point within the historical center as origin or destination and have been labeled as non-passing vehicles. The result obtained for the entire study period is shown in Table 4
The results obtained in Table 4
show that the routes that have entry 2 as origin are mainly residential or for business, unlike those that have entry 1 as origin. The different behavior observed between the two entries to the historic center is due to the fact that the routes that use entry 2 up to points 3 and 4 require more travel time than the itineraries that have point 1 as entry or that make the itinerary using the internal ring road of Valencia; therefore, it is not commonly used to shorten the route. The internal ring road is the polygon marked in Figure 1
where sensors 2, 4 and 5 are located.
Routes 2–3 and 2–4 only had one lane integrated with pavements, with a circulation speed of 30 km/h, with a high number of pedestrians coexisting with cars. On the other hand, the itineraries with origin in point 1 had 2 lanes, segregated from pavements and with a circulation speed of 50 km/h, which means that this itinerary allowed distance and time to be cut with respect to an itinerary with similar origin and destination using the internal ring road.
The following are examples of the classification of integrated trips in periods of one hour for the itineraries of the study on 29th
May 2015. In this particular study, due to the level of traffic in the entries, it is not feasible to perform integrations in periods shorter than one hour due to the limitations of technology described in the study about the influence of the detection percentages of BT sensors in the O/D matrix [17
shows the results of the trip distribution on Friday 29th
May 2015 of route 1–3. The graph shows that the behavior of the users is very similar during the hours of heavy traffic load, from 06:00 a.m. to 11:00 p.m. This route is mainly used by vehicles with origin and destination itinerary outside the historic center. In hours of less traffic, between 02:00 a.m. and 05:00 a.m., the use of the itinerary throughout the center rises to values close to 90%.
shows the results of route 1–3 on Saturday, 30th
May 2015. In this graph we observe that the use of the center is very similar to the one obtained in the previous figure, except that between 08:00 a.m. and 10:00 a.m., the traffic distribution is more balanced.
shows the time share of trips on Friday 29th
May 2015 of route 2–3, observing that the route is mostly used for residential use or business activities. The results obtained between 02:00 a.m. and 05:00 a.m. are not significant because the number of detections is very small, less than 10 veh/h.
shows the distribution of the trips on Saturday 30th
May 2015. This route is mainly used to access the historic center; thus, the number of vehicles that use it to shorten their route is lower than 30% during the day. The peak hour observed at 06:00 a.m. is associated with few detections. However, between 00:00 a.m. and 04:00 a.m. as many detections as in the early hours of the morning have been recorded. This is because it is one of the entries to El Carmen neighborhood, zone of bars and restaurants with large gatherings on weekend nights.
As shown in Figure 15
, the traffic distribution on Friday 29th
May 2015 in route 2–4 is very similar during the hours of heavy traffic load from 08:00 a.m. to 10:00 p.m. The route is mainly used for business activities or residential traffic. Between 02:00 a.m. and 06:00 a.m. only 10% of the detections done in the rest of the day and at similar time slots, were carried out.
shows the distribution of trips on Saturday 30th
May 2015, and how there is a greater balance in the distributions during the first hours of the day. Between 00:00 a.m. and 04:00 a.m., there are as many trips as during the central hours of the day, because this is another entry to the El Carmen neighborhood, similar to the results for route 2–3.
shows the results obtained in the traffic distribution of Friday, 29th
May 2015 in route 3–4, showing balanced results during the hours with the highest traffic load, from 07:00 a.m. to 11:00 p.m. In the period between 01:00 a.m. and 06:00 a.m., very few trips were recorded.
presents the results obtained in the distribution of traffic on Saturday 30th
May 2015 in route 3–4. Similarly, on this same day in entry 2–3 and 2–4 between 00:00 a.m. and 04:00 a.m. there are as many trips as in the central hours of the day due to the access to the leisure area of El Carmen neighborhood.