Anonymous Detection of Traveler Flows Employing Bluetooth Technologies †

: Intensive usage of public transportation represents a good solution to reduce tra ﬃ c congestion. Dynamic allocation of vehicles enhances the service level and o ﬀ ers a more comfortable trip to travelers. Bluetooth (BT) has been used in some speciﬁc cases as a means of data collection regarding vehicle ﬂow. However, it has been less employed for the anonymous detection of traveler ﬂow, origin–destination, the density of travelers in public transport, etc. This paper analyzes the e ﬃ ciency of di ﬀ erent versions of BT for this type of application. Experiments were carried on for subway lines and stations, as well as in open space. Information regarding mobility dynamics represents an important factor to be considered in tra ﬃ c management to improve the e ﬃ ciency of existing systems. Conclusions and recommendations for future research are also provided.


Introduction
Bluetooth (BT) version 5.0, issued approximately six years after the development of the BT 4.0 standard, allows for enhancements in short-range communications, with the perspective for inclusion in the deployment of the Internet of Things (IoT). This technology is one of the main pillars in IoT, including the transport domain. The medium access technique is frequency hopping, and BT promises the possibilities of anonymously detecting mobile carriers with such devices, helping in building intelligent transportation systems (ITS). A more efficient method to detect traffic flows is the usage of BT technology in terms of energy consumption reduction. The approach has been successfully applied in normal vehicle traffic measurements at surface road infrastructure but is less implemented in subway transportation. The proposed method is based on anonymous detection of BT/Wi-Fi devices carried by subway travelers. The method presents its advantages, as the infrastructure does not need expensive and hard to maintain dedicated sensors. Collecting relevant information about traveler flow may help information and public transport management systems better administer vehicle fleets, and guidance to relevant destinations, etc. The drawback of the methodology is that only a fraction of the real traveler flow is measurable since not all people may carry detectable BT/Wi-Fi devices. Installing BT/Wi-Fi sensors in specific station locations or in the subway wagons, an image of travelers' origin-destination (OD) flow, based on BT/Wi-Fi MACs detection, time stamping, and location, can also be built. It may be the goal of public transport administrations to obtain large amounts of data (spatiotemporal flow of Proceedings 2020, 63, 61 2 of 10 travelers) without installing costly, physically invasive infrastructure of dedicated sensors. Moreover, for surface public transport, the development of the proposed solution is also possible with a proper installation of BT/Wi-Fi detector configurations in buses or bus stops, and a similar image of passenger movements can be determined. The collected data can be useful in the dynamic distribution of public transport vehicles on the route (traveler demand-responsive public transportation). In the context of global warming and the increase in emissions, improving the attractiveness of public transportation represents a simple solution to greener cities worldwide.

Employment of Indirect Measurement Techniques in Traffic and Traveler Detection
More recent advances in traffic and traveler detection employ indirect (anonymous) measurement techniques, which have the advantage of reduced infrastructure equipment over traditional implementations [1], such as the deployment of dedicated sensors in the field. Frequently, techniques, such as Floating Car Data (FCD) and Floating Car Observer (FCO), are employed to collect data from traffic and passenger flow. Some of these procedures use indirect detection of traffic elements (BT/Wi-Fi devices detection). The authors of [1] explained the BT technology particularities and concluded that even if two BT devices were used together for the inquiry process in a floating car data collection system, 1.919 s are needed for the complete inquiry in the worst case, which is 1.27 s (inquiry scan idle time) + 0.64 s (maximum back off time). This means that any BT device which is not in the cloaked mode can be identified, if in range. The authors of [2] also stated that for the detection of a mobile-carried BT device, two BT sensors are needed at both ends of the road segment. Since all travel time data collection methods do sampling on the travel time of individual travelers, it is important to determine the minimum appropriate sample size to have accurate traveler flow information. Some studies conclude that the minimum percentage of sampling rate should be about 5%. Another problem that will be addressed in this paper is the influence of the technology over measurement accuracy (e.g., BT version 5 over BT versions 4.x).
In paper [3], the authors compared BT versions and concluded that BT5 seems to offer significant performance improvements compared to the previous versions of BT in terms of speed, range, and broadcasting capacity. The authors of [4] evaluated BT and Wi-Fi technologies for scanning in road transportation. They noted that the usage of mobile-equipped BT devices was increasing with the improved availability of these and recommend employing Bluetooth Media Access Control Scanners (BMS) for traffic data collection. The authors also mention some disadvantages, e.g., the possibility of multiple detections of the same device in the range of a single detector (positive false) and the lower chance of detection for fast-moving BT nodes (negative false). In [5], Juan José Vinagre Díaz et al. performed a detailed analysis of the capabilities of Bluetooth technology for travel time estimation. For pedestrian detection at public transportation terminals, N. Shlayan et al. [6] looked for stochastic models specific to pedestrian movements within the experiments of traveler detection employing an in-house combined BT/Wi-Fi data collection methodology and system. They also proposed using anonymous and encrypted BT and Wi-Fi data obtained from the users of a pedestrian network to make real-time decisions. Other authors [7] explored technology-merging techniques to improve vehicle detection. The authors of [7] used BT detection and inductive loop sensors to improve data accuracy, and F. Mannering and D. Bullock [8] performed an analysis of freeway travel time variability using Bluetooth detection.
The authors of [9] tested the effect of the BT connection interval on the throughput and compared power efficiency relating to throughput for various BLE (Bluetooth Low Energy) versions and different transactions. They found that lowering channel interference (CI) will increase throughput for reads and writes, which is not the case for notifications and writes without response. Another finding was that energy consumption reduces with each newer BLE version.

Expected Improvements in BT 5.0 over BT 4.x and Threats of BT Communications
As specified by standards, BT 5.0 technology delivers better communication quality and experience, compared with its older versions. BT 5.0 continues the Low Energy version of BT 4.x, with speeds around 2 Mbps, communication distances up to 300 m, in the ISM band (industrial, scientific, and medical radio band) of 2.4-2.485 GHz. Version 5.0 also requires less energy than previous versions, thus increasing the battery usage of mobile devices, and the message capacity is around 255 bytes. Bluetooth 5.0 hardware is fully backward compatible with Bluetooth 4.2. Concerning the security of communication, BT 5.0 suffers from disadvantages specific to radio communications, including waves absorption, multiple reflections, multiple path propagation, interference, etc. However, as in many communication networks, one should not forget the potential for hacking the network, which may include bluejacking, bluebugging, bluesnarfing, bluesniping, or car whisperer, a technique for car handsfree devices attack. Considering the above, it was considered useful to test the capabilities of the two BT versions in real life, in similar conditions, with the target for future usage in transport and travel information systems, public transport management systems, and traveler on route guidance. With the expected increase in BT usage in the near future, this form of collecting information regarding traveler and passenger flow might be a promising technology for reducing sensor network complexity, energy consumption, and influence on the environment.

Concept of the System
The proposed solution tries to improve the public transport attractiveness by better satisfying the traveler demand, i.e., by dynamically allocating subway trains according to the transport demand. It may also help in determining the actual density of travelers per vehicle, line, or period of the day. Another benefit of anonymously collecting the presence and origin-destination information of travelers is that the information systems may also include route guidance in subway stations, better distribution of travelers in wagons of subways for reducing agglomeration and delay in stations, etc. The proposed configuration of the system architecture for a generic subway station is presented in Figure 1.

Expected Improvements in BT 5.0 over BT 4.x and Threats of BT Communications
As specified by standards, BT 5.0 technology delivers better communication quality and experience, compared with its older versions. BT 5.0 continues the Low Energy version of BT 4.x, with speeds around 2 Mbps, communication distances up to 300 m, in the ISM band (industrial, scientific, and medical radio band) of 2.4-2.485 GHz. Version 5.0 also requires less energy than previous versions, thus increasing the battery usage of mobile devices, and the message capacity is around 255 bytes. Bluetooth 5.0 hardware is fully backward compatible with Bluetooth 4.2.
Concerning the security of communication, BT 5.0 suffers from disadvantages specific to radio communications, including waves absorption, multiple reflections, multiple path propagation, interference, etc. However, as in many communication networks, one should not forget the potential for hacking the network, which may include bluejacking, bluebugging, bluesnarfing, bluesniping, or car whisperer, a technique for car handsfree devices attack. Considering the above, it was considered useful to test the capabilities of the two BT versions in real life, in similar conditions, with the target for future usage in transport and travel information systems, public transport management systems, and traveler on route guidance. With the expected increase in BT usage in the near future, this form of collecting information regarding traveler and passenger flow might be a promising technology for reducing sensor network complexity, energy consumption, and influence on the environment.

Concept of the System
The proposed solution tries to improve the public transport attractiveness by better satisfying the traveler demand, i.e., by dynamically allocating subway trains according to the transport demand. It may also help in determining the actual density of travelers per vehicle, line, or period of the day. Another benefit of anonymously collecting the presence and origin-destination information of travelers is that the information systems may also include route guidance in subway stations, better distribution of travelers in wagons of subways for reducing agglomeration and delay in stations, etc. The proposed configuration of the system architecture for a generic subway station is presented in Figure 1. In the previous schematic, specific Access Points (APs) are employed to detect nearby mobile BT devices. With respect to the received signal strength indicator (RSSI), the local application may In the previous schematic, specific Access Points (APs) are employed to detect nearby mobile BT devices. With respect to the received signal strength indicator (RSSI), the local application may detect the identity, position, and direction of travel of the nodes. The same setup can be installed in trains, indicating the estimated degree of passenger congestion and using the information to dispatch travelers to stations towards less agglomerated wagons, especially in rush hours. Due to the known position of APs, the travelers could also get location information and routing information to different destinations, other lines, and platforms, etc. However, there are some issues that must be considered when dealing with BT signal processing. Generally, the Bluetooth signal reception is shaped by the characteristics of the transmitter, receiver, and propagation medium. The propagation channel's effects are related to path loss due to the propagation medium and any obstacles on the propagation path. In subway stations, the effect of the walls and the platforms manifests in some way as a waveguide, but there are other obstacles, such as pillars, persons, etc., that obstruct the direct propagation of signals and create reflections and multiple propagation paths. In such cases, propagation may strongly depend on reflections, diffractions, penetration, or even scattering effects on the path. If there is a direct path between the transmitter (Master unit) and the receiver (Slave), then a free space loss model can be applied (for example, in a subway station where the two recipients are in direct sight): in which P FS L is the path loss for free space, S c a scaling factor, f the frequency of signal, d the distance between the two recipients, Path loss is usually represented by the path loss exponent, with a value ranging from 2 to 4 (2 for the free space propagation conditions and 4 for loss propagation conditions), reaching even values of 4 to 6 for extremely difficult propagation conditions. In subways, the tunnels usually act like a waveguide, and the value 2 is recommendable for estimating the path loss (only for linear sections), while in stations or in curved sections of tunnels, the loss exponent might reach values of 3 to 5.
Usually, in these conditions, the path loss is given by: in which P L is the path loss [dB], n is the path loss exponent, d is the distance between the transmitter and the receiver [m], and C is a constant to express the local environment losses. A similar formula, derived from the Friis Transmission formula has the following expression: where P L represents the path loss [dB], d is the distance between the radio recipients in meters, and λ the wavelength [m]. For more difficult environment configurations, a more appropriate model is Egli's, which predicts the total path loss for a point-to-point connection, usually suitable for cellular-type communications: where G T is the gain of the transmitter antenna, G R is the gain of the receiver antenna, h T , h R are the heights of the transmitting, respectively receiving antennas, d is the distance between the two recipients, and f is the frequency [10].

Test Bed
The tests were performed in two different locations: In the first part of the tests, an outside environment was chosen in an open space to comparatively determine the performances of the two technologies in similar field of view (FOV) conditions. The location selected did have a direct view between the transmitter and the receiver, but it was also surrounded by trees-which caused additional signal power losses. The equipment employed was composed of two Samsung mobile phones (A5 2016 and S8), a Motorola One Vision, and a Nokia 8. Bluescan software was used for determining RSSI levels. A specific jpg file with 1.5 MB was also set for transmission between the master terminal and the slave, counting the total transmission time.

Open Field Tests
The distance between the master unit and the slave was divided into steps of 10 m each, and measurements were performed for every step. To eliminate variations in signal level, sets of three measurements were performed for each distance slot. The results were considered for the average RSSI value at every distance slot. The first part of the experimental tests is presented in the diagrams below.
As shown in Figures 2 and 3, the signal strength decreased non-linearly with the distance from the transmitter, having a more abrupt near-field variation (usually the first 10-20 m), then maintaining a relatively constant (small decrease) on longer distances. However, here the advantages of the BT 5.0 technology became obvious, as the connection between the two devices could be maintained on considerably longer distances compared with BT4.x (almost twice the distance). Still, the BT 5.0 showed more variability in signal strength over the distance. For determining the latency of the connection in the two types of Bluetooth technologies, a specific jpg file with the length of 1.5 MB was sent from the master station to the slave, and the transmission time until completion was measured. The average data speed can be then computed by: where Q represents the amount of data transmitted and t the duration of the transmission.
Proceedings 2020, 63, 61 5 of 9 location selected did have a direct view between the transmitter and the receiver, but it was also surrounded by trees-which caused additional signal power losses. The equipment employed was composed of two Samsung mobile phones (A5 2016 and S8), a Motorola One Vision, and a Nokia 8. Bluescan software was used for determining RSSI levels. A specific jpg file with 1.5 MB was also set for transmission between the master terminal and the slave, counting the total transmission time.

Open Field Tests
The distance between the master unit and the slave was divided into steps of 10 m each, and measurements were performed for every step. To eliminate variations in signal level, sets of three measurements were performed for each distance slot. The results were considered for the average RSSI value at every distance slot. The first part of the experimental tests is presented in the diagrams below.
As shown in Figures 2 and 3, the signal strength decreased non-linearly with the distance from the transmitter, having a more abrupt near-field variation (usually the first 10-20 m), then maintaining a relatively constant (small decrease) on longer distances. However, here the advantages of the BT 5.0 technology became obvious, as the connection between the two devices could be maintained on considerably longer distances compared with BT4.x (almost twice the distance). Still, the BT 5.0 showed more variability in signal strength over the distance. For determining the latency of the connection in the two types of Bluetooth technologies, a specific jpg file with the length of 1.5 MB was sent from the master station to the slave, and the transmission time until completion was measured. The average data speed can be then computed by: where Q represents the amount of data transmitted and t the duration of the transmission.    The results for BT5.0 technology are presented in Figure 4a and those for BT 4.x in Figure 4b. There was a more significant drop in speed for BT 4.x once the distance to the transmitter increased, which gave the BT 5.0 the advantage of a higher data rate at longer distances, reaching around 170 m from the transmitter. In addition, as in diagrams shown in Figure 5a,b, the variation of the file transmission time was less for the Bluetooth 5 than for its previous version. As the tests showed, it appeared that BT 4.0 experienced a more abrupt drop in speed over the first 40 m, then the slope was relatively constant for the next 40 m. Instead, the BT 5.0 showed better stability in data rate on much larger distances, passing over 100 m from the transmitter. The results for BT5.0 technology are presented in Figure 4a and those for BT 4.x in Figure 4b. There was a more significant drop in speed for BT 4.x once the distance to the transmitter increased, which gave the BT 5.0 the advantage of a higher data rate at longer distances, reaching around 170 m from the transmitter. In addition, as in diagrams shown in Figure 5a, b, the variation of the file transmission time was less for the Bluetooth 5 than for its previous version. As the tests showed, it appeared that BT 4.0 experienced a more abrupt drop in speed over the first 40 m, then the slope was relatively constant for the next 40 m. Instead, the BT 5.0 showed better stability in data rate on much larger distances, passing over 100 m from the transmitter. While there were, probably, some inherent specificities due to the test conditions, it appears from the open field measurements that the BT5.0 technology is capable of longer connections and is more reliable (Figure 6a), and it is able to deliver higher data rates than BT4.x. As it can be observed from Figure 6b, in the tests performed, on distances that exceed 80 m, the transmission duration The results for BT5.0 technology are presented in Figure 4a and those for BT 4.x in Figure 4b. There was a more significant drop in speed for BT 4.x once the distance to the transmitter increased, which gave the BT 5.0 the advantage of a higher data rate at longer distances, reaching around 170 m from the transmitter. In addition, as in diagrams shown in Figure 5a, b, the variation of the file transmission time was less for the Bluetooth 5 than for its previous version. As the tests showed, it appeared that BT 4.0 experienced a more abrupt drop in speed over the first 40 m, then the slope was relatively constant for the next 40 m. Instead, the BT 5.0 showed better stability in data rate on much larger distances, passing over 100 m from the transmitter. While there were, probably, some inherent specificities due to the test conditions, it appears from the open field measurements that the BT5.0 technology is capable of longer connections and is more reliable (Figure 6a), and it is able to deliver higher data rates than BT4.x. As it can be observed from Figure 6b, in the tests performed, on distances that exceed 80 m, the transmission duration varies very much, a fact which creates more instability of the data link. Due to its backward While there were, probably, some inherent specificities due to the test conditions, it appears from the open field measurements that the BT5.0 technology is capable of longer connections and is more reliable (Figure 6a), and it is able to deliver higher data rates than BT4.x. As it can be observed from Figure 6b, in the tests performed, on distances that exceed 80 m, the transmission duration varies very much, a fact which creates more instability of the data link. Due to its backward compatibility, this technology is recommendable for detecting nearby discoverable devices and for processing origin-destination information of the BT nodes.

Tests Performed in the Subway Station
For consistency, the same tests have been carried on in the subway station "Politehnica" from the M1 line in Bucharest. The test conditions changed accordingly: This station has lateral pillars, and it has a rectangular shape. The length of the platforms in this station is 145 m, and it has two lateral rows of pillars, separated 12 m from each other. The tests performed indoors were affected by the configuration of the environment and by the sporadic presence of people on platforms or trains that arrived at the station. The set of employed equipment and software was the same as in the previous batch of outdoor tests. Results are presented in the following diagrams.
It appeared for tests performed in indoor conditions, the two versions of Bluetooth behaved in a comparable manner, in what concerns the attenuation of signals. The maximum length reached for a reliable communication was 60 m, even longer for BT4.x (Figure 7a, b). For the latency tests, the same jpg file was employed in both conditions. The results are presented in Figure 8a

Tests Performed in the Subway Station
For consistency, the same tests have been carried on in the subway station "Politehnica" from the M1 line in Bucharest. The test conditions changed accordingly: This station has lateral pillars, and it has a rectangular shape. The length of the platforms in this station is 145 m, and it has two lateral rows of pillars, separated 12 m from each other. The tests performed indoors were affected by the configuration of the environment and by the sporadic presence of people on platforms or trains that arrived at the station. The set of employed equipment and software was the same as in the previous batch of outdoor tests. Results are presented in the following diagrams.
It appeared for tests performed in indoor conditions, the two versions of Bluetooth behaved in a comparable manner, in what concerns the attenuation of signals. The maximum length reached for a reliable communication was 60 m, even longer for BT4.x (Figure 7a,b). For the latency tests, the same jpg file was employed in both conditions. The results are presented in Figure 8a

Tests Performed in the Subway Station
For consistency, the same tests have been carried on in the subway station "Politehnica" from the M1 line in Bucharest. The test conditions changed accordingly: This station has lateral pillars, and it has a rectangular shape. The length of the platforms in this station is 145 m, and it has two lateral rows of pillars, separated 12 m from each other. The tests performed indoors were affected by the configuration of the environment and by the sporadic presence of people on platforms or trains that arrived at the station. The set of employed equipment and software was the same as in the previous batch of outdoor tests. Results are presented in the following diagrams.
It appeared for tests performed in indoor conditions, the two versions of Bluetooth behaved in a comparable manner, in what concerns the attenuation of signals. The maximum length reached for a reliable communication was 60 m, even longer for BT4.x (Figure 7a, b). For the latency tests, the same jpg file was employed in both conditions. The results are presented in Figure 8a, b.
Bluetooth 5.0 kept decent values for transmitting the fixed-length message for approximately the same distances as the Bluetooth 4.x version, which even reached longer distances between the communicating devices while in difficult conditions (the transmission duration reached a whooping value of 205 ms for a 1.5 MB file).  For Figure 9, after a distance of 80 m to the transmitter, the reliability of the link drops significantly; however, messages could still be transmitted up to 120 m, with sporadic interruptions, depending on the presence of trains at the station and the number of travelers on platforms.   For Figure 9, after a distance of 80 m to the transmitter, the reliability of the link drops significantly; however, messages could still be transmitted up to 120 m, with sporadic interruptions, depending on the presence of trains at the station and the number of travelers on platforms. For Figure 9, after a distance of 80 m to the transmitter, the reliability of the link drops significantly; however, messages could still be transmitted up to 120 m, with sporadic interruptions, depending on the presence of trains at the station and the number of travelers on platforms.

Conclusions
For both Bluetooth technologies, the indoor environment created different conditions for the propagation of radio signals. It was even possible, in certain cases, for the propagation at longer distances, to create a sort of a "waveguide" effect, and the reception areas were separated into two zones: the so-called "near field" where the RSSI levels dropped on an exponential trend according to the open field path loss model, and a second, much longer zone, where RSSI levels had a variable, but constant within some limits, levels for longer distances, called "far field propagation". For wide indoor areas, the Bluetooth 5.0 was more consistent in propagation distances and latency. Therefore, was more suitable for the detection of discoverable devices than Bluetooth 4.x. However, due to backward compatibility, the BT5.0 is also capable of detecting and communicating with BT4.x devices. In this case, considering the architecture of the proposed system, presented in Figure 1, it is recommendable that the Access Points should be provided with BT5.0 version for achieving better detection results.