Evaluation of the Use of a City Center through the Use of Bluetooth Sensors Network

In order to achieve the objectives of Smart Cities, public administrations need to take measures to regulate mobility, which undoubtedly requires a high level of information and sensorization. Until the implementation of the connected vehicle takes place, it is still necessary to install sensors to obtain information about mobility. Bluetooth sensors are becoming a useful tool due to the low cost of equipment and installation. The use of Bluetooth sensors in cities, with short distances between sensors, makes it necessary to propose new classification algorithms that allow the trips of pedestrians and vehicles to be differentiated. This article presents the study carried out in the city of Valencia to determine the use of motor vehicles in the historic center and propose a new classification algorithm to distinguish between an onboard Bluetooth device and the same device carried by a pedestrian when it is not possible to use the travel time for the classification due to the short distance between sensors. This causes very similar or even indistinguishable travel times for vehicles and for pedestrians. We also propose an algorithm that allows vehicles to be classified according to what type of trip is made always through the historical center of Valencia, whether it is to make a shorter itinerary through the city or to access the center for any type of business. This algorithm would enable the Origin-Destination matrix of an urban network with short distances between sensors if they are available in all entries and exits. Likewise, the results obtained have allowed to positively evaluate the algorithm defined to distinguish between trips made by a pedestrian or a vehicle in a city, using the MAC address of their mobile devices with very short distances among sensors. The results of this study show that it is possible to use Bluetooth technology, with low cost installations, to evaluate the use of the city by motor vehicles.


Introduction
The historical centers of European cities usually have a great combination of uses; touristic, commercial, leisure, financial, etc., with very different transport needs.These different mobility requirements are conditioned by the architecture and network of streets created several centuries ago, when the mobility requirements were very different.In addition, European cities are attempting to eliminate the polluting road traffic from historic centers because of the deterioration caused by pollution of historic monuments and buildings.These concepts are clearly included in the Smart City paradigm that includes aspects such as:

•
More efficient and sustainable cities.
• More efficient and sustainable transport and mobility.

•
Improvement in the environmental quality of the city.
Mobility managers in cities need tools to help them make decisions based on real data about the mobility of vehicles and people.These data are difficult to obtain, especially when we are talking about Origin-Destination (O/D) matrices within the city.
As it happens in this case study, it is important to know the percentage of vehicles that cross through the historical center to take a short cut and those who access the city center to make some type of business.
In the future, with the progressive implementation of the connected vehicle, this information will be easily obtained with the exploitation of the data that these new modes of mobility will provide.
Currently, there are several methods to obtain the O/D matrices: the most traditional one is based on the application of mathematical models to the data provided by the magnetic loops based sensors, or emulated devices, together with interviews with the users [1][2][3].This method allows an estimation of the O/D matrix.
Advances in Information and Communication Technologies (ICT) have allowed the application of new sensors to this discipline making it possible for the O/D matrix to be obtained directly.The longest standing one is based on the application of Optical Character Recognition (OCR) to traffic images of television cameras in order to identify vehicle license plates.The license plates are captured at the entry and exit of the studied network and this is how the O/D matrix [4,5] is determined.We have also used automatic toll devices based on Dedicated Short-Range Communications Systems (DSRC) to obtain the O/D matrix [6].It is necessary to emphasize that these solutions require either a great human effort in the realization of the interviews or very expensive installations due to the number and price of the necessary equipment.This has meant in practice that it is not applied as widely as it should be to make mobility decisions in cities.
However, the increasingly frequent presence of on-board equipment with Bluetooth (BT) or WIFI technology has made it possible to use this technology in order to obtain mobility data, mainly Travel Time [7,8] and O/D matrices [9,10].The advantage of this technology is its low cost, for both the sensors and the installation [11][12][13].
BT-WIFI devices have a unique Media Access Control (MAC) address.The sensor performs the detection of the BT devices continuously and for each detection, it registers the timestamp of the detection, the MAC address, the value of the Radio Signal Strength Indicator (RSSI) and the class of Device (CoD) [14].The CoD shows if a detected device corresponds to a mobile phone, freehand device, a computer, audio/video equipment, etc.
This article presents the study carried out in the city of Valencia to determine the use of motor vehicles in the historic center.
Defining the filtering algorithms has been an essential aspect of this study towards the differentiation of an onboard device and a device carried by a pedestrian.Eliminating devices detected by sensors in nearby buildings has also been an important aspect.Travel time is a basic parameter of this particular study.Travel time was used to determine if a vehicle detected by the sensors, which has generated a trip within the studied zone, stopped and made any type of business or otherwise driven through the sensorized zone stopping only due to traffic reasons (traffic-lights, congestions, etc.).In the event that a BT sensor network existed covering the most important entries and exits, travel time would be used to calculate the O/D matrix applying the same procedure mentioned in this article

Related Work
In recent years, several studies have considered the possibility of using sensors with BT or WIFI technology for the detection and monitoring of devices with this type of connectivity, mainly smartphones, headphones, multimedia BT radio in vehicles, etc.The first studies were focused on interurban environments [15,16] where only onboard vehicle devices were detected.Subsequently, the study range has been extended to urban environments where BT technology has been used for the evaluation of congestion [17], to evaluate the impact of traffic regulation and enforcement actions on travel time [18], and in recent years studies have been developed for the evaluation of BT data to obtain O/D matrices [9,19,20].Some authors have proposed the need to carry out studies to prove the validity of the O/D matrices obtained by BT-WIFI sensor data since these are partial samples of the total number of vehicles [16].Some studies have already been published aimed at determining the conditions under which this mobility parameter may be considered valid, such as those performed by Laharotte et al. [19] or Martínez et al. [21].
Alongside the research with BT and WIFI technology, the use of the mobile phone signal is being studied for the follow-up and classification of urban and peri-urban routes.In these cases, the Call Detail Records (CDR) were analyzed.The resolution of the detection is related to the distance between phone towers.In studies by Becker et al. [22] the analyzed routes had a distance between 4.8 km and 9.6 km and the study by Iqbal et al. [23] in the city of Dhaka the average distance between antennas was of 1 km.The problem with this technology is that when there is saturation of the active antenna, companies pass connections to other nearby less saturated antennas.This could mean that the conversation of a stationary user might be switching between different antennas, which would be recorded as a moving device.
There is an association between the location of the antenna where the mobile is detected and the node of the nearest road network [22][23][24].The limitations of this technology recommend that it be used for the study of mid or large size networks, but not in networks where origin and destination are in the same antenna or in adjacent antennas.
The studies carried out by Malinovskiy et al. [25] and Versichele et al. [26] have shown the feasibility of using BT sensors for pedestrian tracking in exclusively pedestrian environments.However, none of these studies have analyzed the possibility of differentiating a BT device associated with a pedestrian or a motor vehicle in urban environments with short distances between sensors.

New Contribution
This article focused on the extension of previous contributions by developing an algorithm for automatic classification of pedestrian or motor vehicle itineraries in urban environments with short distances between sensors of around 500 m to 1100 m.It also focused on the determination of the type of route, distinguishing between vehicles that use the historic center as a shortcut within the city, the residents or those who go to the historic center for any type of business (work, tourism, shopping, etc.).The results of this study show that it is possible to use BT technology, with low cost installations, to evaluate the use of the city by motor vehicles and analyze mobility in cities.

•
The sensor used [21] in this study has been developed by the University of Valencia in collaboration with the company UVAX Technology in Action.Its main features are: Two block of antennas, each block composed of two antennas (90º horizontal beam width, 30º vertical beam width).These work at 2.4 GHz and 12 dBi.
16 Gb ROM (it allows storage of up to 6 months of detections)

Definition of the Itineraries
In order to carry out the study and analyze the proposed algorithms, the main itineraries were defined in the internal routes of the historic center of Valencia and from this definition the location of the BT sensors was determined, as shown in Figure 1: • The traffic speed of the vehicles in the itineraries defined in the study was 50 km/h.The sensors were installed on traffic light poles, see Figure 2, placed at each site and fed electrically (220V) from the traffic lights controller.The sensors were not connected to a communication network, thus, the processing of the data was done off-line.The sensor used was developed by the research team of IRTIC (University Research Institute on Robotics and Information and Communication Technologies) and allowed up to 6 months of data to be stored.
The sensor is in the process of obtaining a patent which was applied for earlier in 2017.

Location of Sensors
These routes allowed the location of the sensors to be defined.As follows, the five selected locations are described and justified:

•
Location 5: Guillem de Castro -Lepanto, intermediate sensor, detects vehicles that have been registered at the entry of Conde de Trénor, but have not entered the city center, they have followed the internal ring road.These vehicles were detected by the rear lobe of the antenna.Devices that followed itinerary 2-5-4 were disregarded in the current study because they do not use the historic center.
Sensors were placed at the points indicated in Figure 1, where the studied itineraries have also been drawn.
The traffic speed of the vehicles in the itineraries defined in the study was 50 km/h.The sensors were installed on traffic light poles, see Figure 2, placed at each site and fed electrically (220 V) from the traffic lights controller.The sensors were not connected to a communication network, thus, the processing of the data was done off-line.The sensor used was developed by the research team of IRTIC (University Research Institute on Robotics and Information and Communication Technologies) and allowed up to 6 months of data to be stored.The traffic speed of the vehicles in the itineraries defined in the study was 50 km/h.The sensors were installed on traffic light poles, see Figure 2, placed at each site and fed electrically (220V) from the traffic lights controller.The sensors were not connected to a communication network, thus, the processing of the data was done off-line.The sensor used was developed by the research team of IRTIC (University Research Institute on Robotics and Information and Communication Technologies) and allowed up to 6 months of data to be stored.T

Description of the study
The study lasted 18 days, starting on Thursday, 28 May 2015 at 00:00 a.m. and ending on Sunday, 14 June 2015 at 12:00 p.m.
The procedure followed in this pilot test was as follows: 1. Establishing the location of the sensors, trying to minimize the power cabling, being careful that there would be no obstacles between the sensor and the vehicles and making sure it covered a wide area of the street to improve the detection of the devices.The sensor is in the process of obtaining a patent which was applied for earlier in 2017.

Description of the Study
The study lasted 18 days, starting on Thursday, 28 May 2015 at 00:00 a.m. and ending on Sunday, 14 June 2015 at 12:00 p.m.
The procedure followed in this pilot test was as follows: 1.
Establishing the location of the sensors, trying to minimize the power cabling, being careful that there would be no obstacles between the sensor and the vehicles and making sure it covered a wide area of the street to improve the detection of the devices.

2.
Installation and configuration of the equipment.

3.
Controlled tests with known BT devices to determine the classification algorithm for pedestrians and motor vehicles.4.
Removal of equipment and collection of sensor data.

5.
Filtering the data of each sensor and creating the detection intervals.All detections of the same device are grouped in each sensor while it remains in the detection area.The intervals created coincide with the times the device passes through the detection area.6.
Creation of trips between sensors.7.
Application of the classification algorithm for the trips to separate vehicles from pedestrians.8.
Calculation of the travel time and classification of the trips according to the criteria established in the study.Trips that do not stop on the route and use the itinerary to shorten the route through the city and trips that have as origin or destination some point of the historic center of Valencia 9.
Presentation of the results and conclusions.

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.
Figure 3 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.
8. Calculation of the travel time and classification of the trips according to the criteria established in the study.Trips that do not stop on the route and use the itinerary to shorten the route through the city and trips that have as origin or destination some point of the historic center of Valencia 9. Presentation of the results and conclusions.

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 1,100 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.
Figure 3 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 Figures 4 and 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.
was reestablished at the end of the event.

Detection rate
The detection rate obtained in location 1, La Paz -Comedias, is shown in Table 3.The study has only been carried out in this location, because only information from this point was provided of the loop detectors and of the days shown in the table.

Detection rate
The detection rate obtained in location 1, La Paz -Comedias, is shown in Table 3.The study has only been carried out in this location, because only information from this point was provided of the loop detectors and of the days shown in the table.As shown in Table 3, the detection rate of BT devices at that point is 41.01% and with a standard deviation of only 1.33.The detection percentage of BT sensors that have allowed a trip between sensors to be created amounts to 12.23 % with a standard deviation of 0.99.The results show that the sensors are very stable in detection.The difference between the total detections of the sensor (41.01%) and the data used in the creation of trips (12.23%) in relation to the data detected in the loop detectors, is explained mainly because the system was not closed; the vehicles that were detected in sensor 1 may take several routes, which do not go through sensor 3. 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.

Detection Rate
The detection rate obtained in location 1, La Paz -Comedias, is shown in Table 3.The study has only been carried out in this location, because only information from this point was provided of the loop detectors and of the days shown in the table.As shown in Table 3, the detection rate of BT devices at that point is 41.01% and with a standard deviation of only 1.33.The detection percentage of BT sensors that have allowed a trip between sensors to be created amounts to 12.23 % with a standard deviation of 0.99.The results show that the sensors are very stable in detection.The difference between the total detections of the sensor (41.01%) and the data used in the creation of trips (12.23%) in relation to the data detected in the loop detectors, is explained mainly because the system was not closed; the vehicles that were detected in sensor 1 may take several routes, which do not go through sensor 3.
In the test to evaluate the hit and failure rate with known devices, a total of 96 controlled trips were performed, for which the MAC address of the devices and the time they passed through the sensors was known.Later, the data of the BT sensors were analyzed and compared with the trips performed with the controlled devices.The test was also performed with sensors 1 and 3.The hit rate of sensor 1 was of 87.50% and sensor 3 was of 100.00%.

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: Where:
• TT l ij : Travel time associated with the free flow speed between sensors ij.

•
TT ij (p): Average travel time at instant p between sensors ij.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 Figures 5-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 Figures 5 and 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.

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: Where:   (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 TT p 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 Figures 5-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.
Figure 9 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.Figure 8 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.Figure 9 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.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.
Figure 9 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.Figure 8 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.Figure 8 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.

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 29 th and 30 th 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].

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 29 th and 30 th 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].
Figure 11 shows the results of the trip distribution on Friday 29 th 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%. Figure 11 shows the results of the trip distribution on Friday 29 th 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%. Figure 12 shows the results of route 1-3 on Saturday, 30 th 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.Figure 12 shows the results of route 1-3 on Saturday, 30 th 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.Figure 11 shows the results of the trip distribution on Friday 29 th 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%. Figure 12 shows the results of route 1-3 on Saturday, 30 th 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.Figure 13 shows the time share of trips on Friday 29 th 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.Figure 13 shows the time share of trips on Friday 29 th 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.Figure 14 shows the distribution of the trips on Saturday 30 th 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.Figure 13 shows the time share of trips on Friday 29 th 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.Figure 14 shows the distribution of the trips on Saturday 30 th 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 29 th 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.Figure 16 shows the distribution of trips on Saturday 30 th 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.As shown in Figure 15, the traffic distribution on Friday 29 th 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.Figure 14 shows the distribution of the trips on Saturday 30 th 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 29 th 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.Figure 16 shows the distribution of trips on Saturday 30 th 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. Figure 16 shows the distribution of trips on Saturday 30 th 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. Figure 17 shows the results obtained in the traffic distribution of Friday, 29 th 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.Figure 18 presents the results obtained in the distribution of traffic on Saturday 30 th 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.Figure 17 shows the results obtained in the traffic distribution of Friday, 29 th 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.Figure 18 presents the results obtained in the distribution of traffic on Saturday 30 th 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.Figure 17 shows the results obtained in the traffic distribution of Friday, 29 th 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.

Conclusions
It is necessary to emphasize the complexity of the study due to the high number of pedestrians within the sensorization zones, as many as motor vehicles, the existence of traffic lights that stop the traffic and the small distance between sensors; 500 m in route 1-3.These conditions sometimes cause travel times between pedestrians and vehicles to be very close or overlapping, making it impossible to distinguish between trips associated with a pedestrian or with a vehicle by just using travel times, unlike the proposal made in Laharotte's studies [14].For this reason, a new initial filtering algorithm has been defined for the classification of trips between pedestrian and vehicle using the number of detections of the MAC address of the device in the sensor.
Once it was clear that one transit corresponds to one vehicle, travel time was used to determine what the historic center was used for.
The results obtained have made it possible to verify that the hypothesis raised for the classification of the trip created depending on whether they were associated to a pedestrian or to a vehicle is correct.
It has also been verified that the BT sensors maintain a constant detection percentage for all the days of the study, for the point at which traffic counts data were available, with an average value of 41.01 and with a standard deviation of only 133.This has demonstrated the stability in the detection of BT sensors.
The system has also allowed the classification of the trips of motor vehicles to be obtained depending on the use of the historical center of Valencia.The results obtained have been contrasted with the technicians of the City Council of Valencia belonging to the Traffic, Transport and Infrastructures Department with whom the study were carried out, verifying that they reproduce the actual existing situation in these itineraries.
It is also important to mention the simplicity of the installation, since although it was carried out using a lifting basket, it could have been installed using a ladder without having to affect traffic.In addition, the system did not require any type of configuration during the installation of the BT sensor; it only needed to be oriented towards the traffic and connected to the power supply.The equipment has the possibility of communicating with a central server through Ethernet network or through 4G mobile telephony.
The results of the study have shown that between 60-70% of the vehicles, in itinerary 1-3-4, use the historic center as a shortcut throughout the city.
The results obtained in the study made it possible for the City Council of Valencia to take the decision of limiting the traffic speed in the historic center of Valencia to 30 km/h.This measure mainly affected route 1-3, with previous traffic speed of 50 km/h.The objective of the measure was to reduce the number of vehicles that use this itinerary to shorten the journey throughout the city and use instead the city inner ring road, itinerary 1-5-4 where a speed of 50 km/h is allowed, see Figure 1.
The study has allowed the authorities to meet several of the objectives of Smart Cities, such as reducing the use of private vehicles in the center area with the aim of reducing pollution, easing traffic and favoring walking and cycling.As a complementary measure to traffic limitation, in the years 2016 and 2017 a segregated bicycle traffic lane covering the entire internal ring road has been created and the majority of the streets in the city center have been transformed into "CycleStreets", streets where vehicles and bicycles coexist in the same conditions.

Figure 1 .
Figure 1.Map of location of sensors and itineraries.

• Location 1 :
Paz -Comedias, entry sensor, allows the detection of the vehicles that enter the historic center and follow route 1-3.• Location 2: Conde Trénor, entry sensor, allows the detection of the vehicles that enter the historic center and follow route 2-3 or 2-4.• Location 3: San Vicente between Plaza de la Reina and Plaza del Ayuntamiento, exit sensor, allows the detection of the vehicles that leave the historic center in route 1-3 or 2-3.• Location 4: Quart-Murillo, exit sensor, allows the detection of the vehicles that leave the historic center in route 2-4 or 3-4.

Figure 1 .
Figure 1.Map of location of sensors and itineraries.

Figure 3 .
Figure 3. Travel time pedestrian versus vehicles.Figure 3. Travel time pedestrian versus vehicles.

Figure 3 .
Figure 3. Travel time pedestrian versus vehicles.Figure 3. Travel time pedestrian versus vehicles.

Figure 13
Figure13shows the time share of trips on Friday 29 th 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.

Figure 17 18 Figure 16 .
Figure17shows the results obtained in the traffic distribution of Friday, 29 th 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.

Figure 18 18 Figure 16 .
Figure18presents the results obtained in the distribution of traffic on Saturday 30 th 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.

Figure 18
Figure18presents the results obtained in the distribution of traffic on Saturday 30 th 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.

Table 1 .
Results of transport mode detections.

Table 2 .
Classification of vehicle-pedestrian algorithm.
Calculated travel time of trip k between sensors ij 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 TT ij (p) taking into account the travel time value of the new valid trip registered.Typical values between 0.03 and 0.05 • s ij (p):

Table 4 .
Distribution of trips through the historic center.

Table 4 .
Distribution of trips through the historic center.