# Design and Implementation of a Smart Traffic Signal Control System for Smart City Applications
## 3 Smart Traffic Control System  
### STSC System Architecture  
The architecture of the proposed STSC system is shown in Figure 1, and it is composed by three subsystems including an RSU, an OBU, and a cloud center. The RSU controller, connected to traffic signal control system, is the key component in STSC. It is implemented by an industrial computer designed by modularization concept where multiple external modules can be flexibly added onto the RSU by the general--purpose input/output (GPIO) interface. The supporting peripheral modules includes 802.11p V2X interface, GPS, changeable message sign (CMS), mobile communication (4G), and Wi-Fi/BT modules. In addition, the RSU has more GPIO for real-time traffic information extension, such as loop detector or video traffic analyzer (smart AVI).  
On the OBU side, it is implemented by an on-board computer which connects to several modules including 802.11p V2X interface, GPS, mobile communication (4G), and OBD-II interface. The OBD-II interface can read the vehicle's information such as oil temperature, engine speed, speed, turn signal, etc. The cloud center is designed by a cloud platform and a central database which provides management functions to all the RSUs and OBUs.  
RSU periodically broadcasts the signal plan (cycle time, green split, current phase, current countdown) and events (incident, road work warning) using an 802.11p interface, vehicles equipped with OBU can receive and react to the real-time information, such as eco-driving suggestions, path re-routing. On the other hand, emergency vehicles (ambulance, police vehicle) equipped with OBU will periodically broadcast the current status using a V2X interface, and an RSU within the signal coverage range can collect the EV messages and do instant responses.  
In order to fast and cost-effectively deploy the STSC system, our idea is that the RSU controller has to be compatible with the existed infrastructure so that there is no need to replace the traditional traffic controllers. The proposed RSU controller should easily connect to and control the legacy signal controller, regarding it as one of the peripheral devices. To achieve this goal, a modularized system software architecture is designed as shown in Figure 2, which is a five-layered hierarchical structure of the RSU controller.  
An application layer, which is the pool of the application programs, supports six smart city applications including emergency vehicle signal preemption (EVSP), transit signal priority (TSP), eco-driving by signal plan broadcasting, roadwork and accident warning, pre-time signal control, and adaptive traffic signal control (ATSC). Middle layer is the kernel of the RSU, where seven important agents are designed. Traffic data agent and traffic information generation agent are responsible for  
Figure 1: System architecture of the STSC system.  
the data processing and data fusion collected from external data sources (loop detector and smart AVI) to generate real-time traffic information for ATSC. Five message TX/RX agents are designed for dealing with message transmitting and receiving on five device channels, where buffers, queues, and priority mechanisms are designed to handle the different kind of events and messages from other agents. The operating system layer is based on Linux OS and the hardware layer is the driver layer for multiple hardware access interfaces. The external modules handle the input/output interfaces for accessing different external modules, such as CMS module, Smart AVI module, 802.11p modules.