Towards Personal Virtual Trafﬁc Lights

: Trafﬁc control management at intersections, a challenging and complex ﬁeld of study, aims to strike a balance between safety and efﬁcient trafﬁc control. Nowadays, trafﬁc control at intersections is typically done by trafﬁc light systems which are not optimal and exhibit several drawbacks, such as poor efﬁciency and real-time adaptability. With the advent of Intelligent Transportation Systems (ITS), vehicles are being equipped with state-of-the-art technology, enabling cooperative decision-making which will certainly overwhelm the available trafﬁc control systems. This solution strongly penalizes users without such capabilities, namely pedestrians, cyclists, and other legacy vehicles. Therefore, in this work, a prototype based on an alternative technology to the standard vehicular communications, Bluetooth Low Energy (BLE), is presented. The proposed framework aims to integrate legacy and modern vehicular communication systems into a cohesive management system. In this framework, the movements of users at intersections are managed by a centralized controller which, through the use of networked retransmitters deployed at intersections, broadcasts alerts and virtual light signalization orders. Users receive the aforementioned information on their own smart devices, discarding the need for dedicated light signalization infrastructures. Field tests, carried out with a real-world implementation, validate the correct operation of the proposed framework.


Introduction
Transportation has always been a fundamental component of the economic and social interactions of human society-without it, the movement of people, animals, and goods from one geographical location to another would be highly constrained.From domesticated animals and wheel carts, to wheeled motor vehicles and airplanes, the means and infrastructures of transportation are in perpetual development and are having a significant impact on the economy and environment.
In the last few decades, the number and density of vehicles, especially on road traffic, has increased significantly.In 2010, the number of vehicles operating worldwide surpassed one thousand million units; this number roughly equates to a 1:6.75 ratio of vehicles to people in a global population of 6.9 billion [1].According to [2], the production and sale of automobiles reached 70 million units in 2014, a notable increase from the 50 million units sold between 2000 and 2013.A steady increase of these numbers is expected for the next few years due to the development of highly populated countries, such as India.
The massive increase in both road traffic and population is likely to lead to an increase of accidents and congestion, along with negative impacts on the economy, environment, and in the quality of people's lives.According to the World Health Organization (WHO), road traffic injuries are expected to be the leading cause of death for people aged 15-29; projections show that road traffic deaths will become the seventh main cause of death worldwide by 2030 [3].Despite being considered one of the safest roads, a report from the European Commission revealed that in 2015, nearly thirty thousand lives were lost on European roads [4].Although deaths on European roads have steadily decreased over the years, progress has slowed down, with the change in fatality figures close to zero from 2013 to 2015.When comparing the number of fatalities in high-ways, rural, and urban roads, statistics show that the majority of occurrences are in rural environments (55%), followed by urban areas (37%).Regarding the parties involved in accidents, 46% of the accounted are automobile drivers, followed up by pedestrians (21%).The latter are the most vulnerable road users; current efforts and measures have been struggling to reduce the number of victims in this group [4].
In order to increase the efficiency of road traffic and security for its users, new systems and applications are being researched.Intelligent Transportation Systems (ITS), sprouted by technological advancements in communication networks and computer science, comprise a set of these new applications and is currently under heavy debate and work by governmental organizations and scientific communities.In these systems, it is envisioned that vehicles and infrastructures deployed along roads may use wireless communications to exchange data between themselves and other users, such as pedestrians carrying smart devices (e.g., smartphones and watches).Several types of data can be exchanged, ranging from hazard alerts to geo-related data and infotainment.
Traffic control management at intersections, a challenging and complex field of study, is one of the applications targeted by Intelligent Transportation Systems (ITS).Intersections require a balance between safety and efficient traffic control-in order to reduce congestion, the number of vehicles and users passing through an intersection should be maximized without compromising the security of the involved parties.Nowadays, traffic at critical intersections is typically managed through traffic-light signalization.Albeit being able to manage traffic with significant success in terms of security to its users, this solution is not optimal and exhibits several drawbacks, such as the following: (i) Light signalization is expensive, and thus, only a small percentage of all intersections are covered; (ii) adaptability to real-time conditions, such as the number of vehicles in a given lane, is poor and leads to inefficient management of the volume of users crossing by-for example, light signalization may prioritize the crossing of an "empty" lane, while other lanes are congested with users waiting for their turn to cross.
Due to the aforementioned issues, several proposals have been presented to improve traffic management at intersections.A significant number of these solutions are based on future vehicular communication systems and do not address the integration of legacy systems-systems which are expected to coexist for a significant amount of time [5] and thus, should not be ignored.
In this work, a solution based on an alternative technology to vehicular communications, Bluetooth Low Energy (BLT), is presented.This solution discards the need for an existing light signalization infrastructure and aims to control all intersection users by displaying semaphoric information in legacy in-vehicle displays and/or smart devices.Moreover, the proposed framework aims to integrate legacy and modern vehicular communication systems into a cohesive management system.The proposed platform is based on low-cost, commercial-of-the-self hardware so that adoption and deployment in urban areas is feasible.The feasibility of the presented solution is validated by field tests carried out with a real-world implementation.
The rest of the paper is organized as follows: Section 2 presents some state-of-the-art traffic light systems and Section 3 exposes the main characteristics of these Traffic Light Systems; Sections 4 and 5 present the proposed framework and implementation, named Personal Virtual Traffic Light Systems.In Section 6, the experimental and obtained results are shown and discussed.Finally, Section 7 presents the conclusion and directions for future research.

Related Work
As previously discussed, there have been efforts in the literature to improve traffic management at intersections.The most relevant ones for this work are going to be discussed briefly in this section.
Michel et al. [6] proposed a virtual traffic-light management framework that dynamically optimizes traffic flows in road intersections without requiring any roadside infrastructure.Vehicles use standard ITS Dedicated Short-Range Communication (DSRC) to elect a leader vehicle at the intersection that acts as a coordinator, and broadcasts virtual traffic light messages to vehicles in range.These instructions are shown to drivers through in-vehicle displays.Simulation results show an increase in traffic efficiency with the proposed system.Hugo et al. [7] proposed to equip DSRC and Virtual Traffic Lights (VTL)-equipped vehicles with an exterior representation, in the form of a visible light, of their VTL rules, i.e., cross or stop.The purpose of this light is to guide the behavior of legacy car drivers, which should adjust accordingly.Simulations using traffic simulators and the network simulator NS3 show an increase in efficiency, with less trip duration times for scenarios with equipped vehicles.Nakamurakate et al. [8] developed a VTL framework for Android-based smartphones that conveys traffic light information to its users.The framework was based on a self-organized traffic control paradigm that detects and resolves conflicts at intersections.Vehicles use WiFi Direct ad-hoc communications to participate in a leader election process upon intersections.The elected leader then acts as a temporary traffic-light infrastructure and broadcasts traffic-light rules to nearby vehicles.The received information is then shown to the user through the smartphone's VTL application interface.Bazzi et al. [9] designed a VTL in which a distributed algorithm exploits Vehicle-to-Vehicle (V2V) communications, based on Institute of Electrical and Electronics Engineers (IEEE) 802.11p wireless communications, to broadcast messages that convey priorities to the vehicles approaching intersections.The algorithm has been tested in both laboratory and field trial environments.Iglesias et al. [10] proposed a driving assisting system, based on Infrastructure-to-Vehicle (I2V) communications, that collects information regarding the speed and location of vehicles in the vicinity of an intersection.Here, infrastructure retrieves information regarding the current status of traffic lighting signalization using Wi-Fi communications.The system notifies drivers of the current traffic-light state at the intersection through an in-vehicle display.It also combines all the gathered information to predict traffic-light states at the instant in which drivers would reach the intersection.
Works exploiting technologies besides standard ITS communication technologies also exist.Gheorghiu et al. [11] evaluated the use of ZigBee technologies for Vehicular-to-Infrastructure (V2I) communications.The system would be installed in emergency vehicles that, when in the vicinity of an intersection, would communicate with the traffic-light system so the latter could facilitate the crossing of the emergency vehicle.The platform was validated using a laboratory testbed.Kodire [12] proposed a similar system with ZigBee and V2I communications for crossing preemption of emergency vehicles at intersections.However, this system also relies on GPS information to increase efficiency.
The existing solutions differ from the work presented in this paper, since none exploits Bluetooth Low Energy (BLE) [13] as an alternative technology.Moreover, our work focuses on a centralized approach that combines both Legacy and ITS systems-the aforementioned works either employ distributed approaches [6][7][8][9], discard the support for legacy vehicles [10], or focus on applications oriented toward emergency vehicles [11,12].

Traffic Light Systems
In order to propose a new piece of architecture, we should first present the main characteristics of conventional traffic control systems (TCS).Typically, there are four different roles in any TCS: users, data collectors, indication providers, and controllers.A user is any actor receiving a traffic signal service, such as pedestrians, cyclists, and vehicles.Strategically positioned sensors have the role of detecting users and providing real-time information on the surrounding environment, e.g., pressure sensors and buttons for the detection of vehicles and pedestrians.In order to properly alert users on their next movements, alerting systems can either be physically deployed near intersections or presented beforehand using some sort of smart device.Finally, the controller is a decision-making agent responsible for the coordination of signaling devices.Controllers can be divided into two main groups: aware, and unaware of the surrounding environment's status.
The first group offers greater flexibility and adaptability, since they use the information provided by data collectors and other systems to conduct the decision process.In comparison, the latter solution is mostly used in zones with a significant amount of intersections, which require timely coordination to alert users of their status.
Despite being a small set of signaling devices, traffic lights are widely used due to their unobtrusive and intuitive operation.The set of colors currently being displayed by a traffic light is called a phase, and movements are referred as the users' possible actions.Conventionally, these systems are based on four different colors-users are permitted to move if the light being displayed is green, and should halt in the presence of a red light.The yellow light is presented when a status change is imminent, e.g., from green to red, and the orange color is used for temporary traffic control.Moreover, when the user has the right-of-way, he is conducting a protected movement.However, if the light is green and he has to yield to other users, the movement is called "permitted".Using these concepts, an intersection can be modeled by consistently numbering all the movements and phases available [14].One example is shown in Figure 1, where a four-way intersection is shown in detail.The model is based on the following rules: Phases scheme (adapted from [14]).
• Numbers, or in the case of pedestrians, a "P" followed by a number (Px), describe possible user movements at the intersection.These are represented in Figure 1 as gray squares;

•
In a four-way intersection, vehicles can perform twelve one-way movements, while pedestrians can perform four two-way movements;

Proposed Architecture
As discussed in Section 3, vehicles are one of the multiple actors in the complex road safety system.Despite public and private efforts, there is still a long way to go until autonomous and cooperative vehicles make the use of our current physical traffic lights obsolete.In these futuristic systems, there is an extreme disregard for the role of pedestrians, cyclists, and other non-cooperative systems-these are seen as a liability to themselves and to others.In our proposal, we follow a non-elitist approach, empowering these users with an application that can be deployed in their most-used smart device.This procedure makes our proposal unique, since these devices are seen as a significant source of distraction for both drivers and pedestrians and consequently, is a factor that may increase pedestrian fatalities [15].However, we expect to highly reduce these prejudicial outcomes by fully exploiting its capabilities so as to provide precise, useful information in a clear and attention-grabbing manner.
An overview of the proposed architecture is depicted in Figure 2. A centralized controller holds information about the status of the traffic light system.Stored information includes the past, current, and future states of the lighting system, as well as the time left until the next phase change.The controller may also be connected to other sources of information, such as road sensors, radars, cameras, etc.These inputs could be useful for enabling more precise and dynamic control of the intelligent intersection, crosswalk, or roundabout.However, in this work, the scenario will be restricted to a static scheme with pre-established phase sequences.
Typically, there is only one logical central controller, comprised of one or a limited number of synchronized nodes, responsible for the simultaneous coordination of all traffic lights in a city.Since the number of coordinating nodes is usually small, controllers fall short on delivering the information to every actor on the network.In the proposed architecture, we use relay agents, called retransmitters, to extend the communication range and improve the delivery rate of information.These retransmitters work as mediators between actors and the controller, thus receiving the information, interpreting it, and either delivering it to the controller or broadcasting it to the medium.Retransmitters are deployed in strategic positions, offering reliable connection points near sensitive spots, e.g., at low-visibility and dense traffic areas, while also ensuring that users receive the information with sufficient reaction time to complete their action.
Figure 2 presents the most common scenario where all road users are prompted beforehand with their permitted movements for the next intersection.A vehicle should be prompted to stop if pedestrians have the right-of-way.Moreover, an unaware pedestrian approaching a crossroad can be alerted through the vibration of their phone or by a sound signal emitted through their wireless headphones.

Users
In our proposal, a user is any sort of actor receiving information on the approaching intersection.Ideally, in order to improve the overall decision-making process, users are obliged to provide their own location.This is a deciding factor as it excludes the need for a vehicle and pedestrian detection.Clearly, there is a need for a precise localization mechanism, which, in the future, will certainly be provided by future 5G systems.For the present, a combination of GPS coordinates and distance to nearby devices, e.g., retransmitters and other actors, should be used.

Environment Perception
Regarding environment perception, controllers are a meeting-point for heterogeneous data sources, ranging from vehicular communications to multiple wireless sensor networks.Therefore, controllers have a global view of the environment and are able to devise intelligent management strategies.Even though there is redundancy at the controller level, mechanisms should be implemented in the case of communication loss and/or device failure.Ideally, retransmitters could also exploit their local environment perception, since they work as mediators and receive information to/from the controller.In this approach, a leader can be elected to work as a temporary controller, receiving the information of the affected retransmitters and deploying traffic-control strategies within the coverage area.However, in the presented scenario we do not address controller failures, and opt to simply notify actors of the connection failure.

Signaling
Smart devices have become workaday tools, commonly used in almost every kind of everyday situation.In fact, we believe these devices can enhance or even replace the cumbersome physical light systems which are currently available.Their capabilities are unique, since they provide direct communication with the users in the most comfortable and unobtrusive way.Thus, they are used to improve users' awareness of the surrounding environment.Different alerting mechanisms are considered-namely, the use of their display as an information provider, vibration as reminders of the distance to an intersection, or emitting sound as an alerting signal.
Despite receiving the same information from the retransmitter, drivers and pedestrians should not be alerted in the same form.In fact, there are different requirements for the alerting process.The interaction with drivers must be performed in such a way that it reduces the impact on the driving process, while clearly and intuitively presenting the status of each lane.The number of lanes is also a determining factor, since in worst-case scenarios, a pedestrian is presented with the status of two crossroads, while a vehicle can perform up to three different movements.In the case of communication loss, the smart device should display a yellow sign recommending the user to proceed with caution at the next intersection.

Traffic Control
The controller is responsible for the proper functioning of the system.Together with the information-gathering system, controllers combine historical data and exploit the rich amount of information gathered in real-time from multiple sources, e.g., pressure sensors and traffic cameras, to efficiently adapt the traffic-control strategies to the current traffic conditions.These units can also be connected to the available traffic light systems in order to orchestrate the lights in accordance to the alerts being emitted by smart devices.In our proposal, the traffic-light phases are mapped into a matrix, as shown in Table 1, and the resulting matrix passed to retransmitters for dissemination.Upon transmission, relay nodes add a retransmitter tag to allow smart devices to identify the source of the information.

Communication
There are a few requirements that come with the usage of smart devices.Firstly, the power consumption has to be low in order to reduce the battery drainage; and secondly, it has to be compatible with most mobile phones, tablets, watches, and other smart solutions.This confines us to a reduced array of communication technologies, the most suited being Bluetooth and Wi-Fi.BLE [13] is perfectly suited for low-powered applications with a need to exchange simple bits of data between devices without pairing or any manual connection steps-and thus, this was the opted choice for our platform.

Implementation
In order to evaluate the proposed system, we implemented the solution using BLE [13] as our communication technology.This technology was chosen due to the solution requirements of low power, small size, and low cost of the modules, as well as compatibility with most mobile phones, tablets, and other smart devices.Raspberry PIs [16] model B and the wiringPi library [17] were used for the development of retransmitters and the controller.Regarding the Bluetooth modules, the chip module RN4020 from the Microchip was used because of its small form factor.It had a low-energy Bluetooth (version 4.1) stack on-board, and controlled via simple American Standard Code for Information Interchange (ASCII) "ATTENTION" (AT) commands over the Universal Asynchronous Receiver-Transmitter (UART) interface [18].This module has a maximum announced range of 100 m using the chip's maximum power of `7.5 dBm, making it possible to use these modules to establish communications between personal smart devices, retransmitters, and centralized controllers within a reasonable range.
To implement a virtual traffic-light system in a four-way intersession, we started by enumerating all the possible phases, as shown in Table 1, while permitting all combinations of movements and avoiding conflicts.Temporal states are represented by the numbers one to thirteen; traffic lights for every possible movement are represented by the colored circles.A red circle represents a prohibited movement, i.e., it must stop at the intersection, while green circles are used to permit user movement.Finally, yellow circles indicate that a phase change is eminent.The numbering of possible user movements, including pedestrians, follows the numbering model from [14] depicted in Figure 1.

Controller
The controller entity is responsible for defining all the temporal states (Table 1).In this case, the phases are statically defined; therefore, the controller continuously broadcasts the same information to all retransmitters and/or users.The controller's hardware is composed of a Module RN3020 connected to a Raspberry Pi Model B [16].
Algorithm 1 depicts the process of generating and broadcasting the traffic light's states.Firstly, the states' numbers are converted to American Standard Code for Information Interchange (ASCII) strings.A 16-bit Cyclic Redundancy Check (CRC) [19] is then performed in order to prevent an accidental propagation of errors and guarantee payload data integrity.After concluding this, an array of messages is built and transmitted; each message holds a traffic-light state concatenated with its 16-bit CRC code.Finally, the controller periodically transmits, in sequence, all traffic-light states.To perform the dissemination of messages conveying traffic-light states, two distinct types of BLE communication channels may be used: (i) advertising channels, typically used for discovery, device pairing, and broadcast of data; and (ii) data channels, commonly used for general-purpose data transfers between paired devices [13].In this proposal, controllers and retransmitters relay traffic-light states by broadcasting messages in advertising channels.This approach exhibits important advantages over the use of BLE data channels in the following ways: (i) Pairing between controllers, retransmitters, and smart devices is not required, improving the overall system performance; and (ii) possible interference from nearby Bluetooth and Wi-Fi devices is reduced [20], increasing system robustness.Regarding the periodicity of transmissions, BLE supports broadcast periods from 20 ms up to 10 s.Due to the nature of the targeted application scenario, the value for the time interval between transmissions must strike a balance between: (i) energy consumption, (ii) system reactivity requirements, and (iii) reliability.For example, one can choose small intervals in order to either increase the responsiveness of the system, i.e., decrease the necessary time to detect an update to the traffic light's state, and/or to increase reliability by increasing the number of message replicas intertwined with state updates, at the cost of higher power consumption.Safety-related C-ITS applications typically require communications to be performed every 100 ms.Therefore, in this work, controllers and retransmitters were set to broadcast a single message every 80 ms.The reason for choosing 80 over 100 ms was to provide some time for the devices to process the received messages.The optimization of this value is subject to future research.
The format of the transmitted messages, including headers, is presented in Figure 3.It was decided that a 16-bit CRC, to the detriment of the BLE's four-bytes Message Integrity Check (MIC), should be applied in order to reduce the transmission time.The time it takes to transmit one message is given by Equation (1).

Retransmitter
The main focus of this work was to provide a proof of concept-therefore, a simple prototype of the retransmitter device was developed just for the relay of information.It locally stores the information provided by the controller, and has two different states: "update" and "transmit".As the names imply, in the first state, the device takes the role of an observer, listening to the data in the advertising packets sent by the controller.No connection happens between the controller and the retransmitter.Upon receiving a message from a controller, it updates the stored information.Then, the retransmitter moves on to the second state, where it adds its ID to the message and broadcasts it to the medium.Finally, it returns to the initial state once the message has been transmitted.
The BLE network stack simplifies the process of configuring the network connection of a Bluetooth device, where a Generic Access Profile (GAP) provides a set of predefined methods to simplify the configuration.Using GAP, a device can be configured as a broadcaster or an observer.The Algorithm 2 depicts how the retransmitter uses GAP to perform the update and retransmissions of controller messages; it divides the controller's traffic-light broadcast period into two equal-sized temporal slots.and the BLE retransmitter was evaluated.For each test which was run, both devices were statically positioned in specified road locations.The distance between them was varied from 0 to 140 m, and a set of different parameters were measured for each distance value, e.g., packet success rate (PSR), received signal-strength indication (RSSI), and the update time of the VTL system's status.
This first set of static measurements were carried out at Avenida Europa, Viseu, Portugal, as depicted in Figure 4. Packets were periodically transmitted during 20 s for each distance value, and the number of correctly received packets was recorded in the retransmitter device.These results for the PSR parameter are presented in Figure 5. Another important metric is the average update time of the VTL system's status at the retransmitter device.These measurements are displayed in Figure 6.At short distances, the update time value is stable and approximately equal to 50 ms.However, with the increasing distance, some packets start to be lost in the wireless medium and the system status can only be updated with the next correctly received message.As can be observed in both Figures 5 and 6, the performance of the BLE link is reasonably good (PSR above 80% and update time values below 100 ms) for distances lower than «60 m.
The second set of experiments was performed with the goal of evaluating the system's operation in a scenario which was as close to the real world as possible.In this case, a moving vehicle was approaching an intersection and receiving information from the VTL retransmitter.These experimental tests were conducted in an urban area with significant traffic flow, at Rua Quinta d'el Rei, in the city center of Viseu, Portugal (Figure 7).In this test, the distance between the centralized controller and the retransmitter was 37 m, with no problems in the communications link, which presented good PSR and small update times.The vehicle's speed, constrained by the traffic congestion at the time, averaged close to 30 km{h.Inside the vehicle, two types of communication devices were receiving the retransmitter messages: a smartphone running an Android application, and a dedicated BLE module connected to a Raspberry Pi.Both systems were operating simultaneously and collecting the results for analysis.
Figure 8 displays the obtained results for the update time in the Rapsberry Pi with respect to each successfully received message.The measurements are usually smaller than 100 ms, with only a few peaks when the number of messages lost between two consecutive well-received packets increases.Figure 9 presents the same results, but for the case of the smartphone device.In this situation, the update times are significantly higher, with an average value clearly above 100 ms.It can also be observed that the number of successfully received messages in this case is much smaller («35 packets) than with the Raspberry Pi («120 packets).This result was expected, due to the higher sensitivity of the dedicated BLE module.It is possible to conclude from the obtained results that the proposed system can be implemented in a real-world scenario using BLE technology and personal devices (e.g., smartphones).However, in order to cope with the real-time demands of a safety-critical road traffic system, the performance of the personal VTL system can be greatly improved by employing dedicated hardware, such as the utilized BLE module plus the Raspberry Pi.

Conclusions
Going beyond existing state-of-the-art architectures, in this paper we proposed new architecture for virtual traffic-light systems.The proposed architecture has unique features, since it exploits the current ubiquity of smart devices, deploying a virtual traffic-light system that is as physically close to the user as possible.Hence, users can be alerted to the current status of the nearest traffic sign in the most convenient way, e.g, by smartwatch display, phone vibration, or even a voice signal transmitted to their wireless headphones.The system was implemented using low-cost, commercial-off-the-shelf hardware and tested in real-life scenarios.
As explained previously, in this paper we focused on providing a proof of concept for the proposed system.In regard to future work, we aim to further explore the potentialities of the system.Specifically, we want to provide users with an active role, instead of passively receiving information.This step will unlock the adaptability of the overall system, allow controllers to make better-informed decisions, improve traffic management and planning, and ultimately provide a better-quality experience to users.Finally, this solution is to be integrated in the Plataforma Aberta para o desenvolvimento e experimentação de Soluções para a MObilidade (PASMO) open-living lab for cooperative ITS and smart regions being deployed in Ílhavo, Aveiro (Portugal) [21].

Figure 2 .
Figure 2. Overview of the proposed system architecture.

Figure 4 .
Figure 4. Evaluation of the BLE communications link performance between the centralized controller and the retransmitter device.

Figure 5 .
Figure 5. Packet Success Rate (PSR) as a function of the distance between the controller and the retransmitter.

Figure 6 .
Figure 6.Update time of the Virtual Traffic Light (VTL) system's status at the retransmitter.

Figure 7 .
Figure 7. Experimental tests of the VTL system at an intersection with a moving vehicle.

Figure 8 .
Figure 8. Update time of the VTL system's status in the Raspberry Pi.

Figure 9 .
Figure 9. Update time of the VTL system's status in the smartphone application.
•A traffic signal phase, Φx, represents a time period managed by a signal controller authorizing one or more movements at each intersection segment.Signal phases are depicted in Figure1as blue boxes; • Even numbers are used to reference go-through and right-turn movements.

Table 1 .
Temporal states of traffic lights.