Nowadays, regular hardware such as traffic lights and simulations are getting interwoven. Engineers are interfacing hardware with various software to develop, test, and analyze future algorithms with a mixture of real hardware and virtual environments. Working with hardware and simulation together provides a wide area for development and testing.
A traffic light system was interfaced with a newly developed C# software connected with a macroscopic traffic simulator (SUMO). The software can communicate with the traffic light and can even influence the traffic lights program (e.g., freeze the actual traffic light state, switch to the flashing yellow program). The traffic light system is made of a Simatic S7-1200 PLC, which controls three individual traffic lights, two connected through Logo! PLCs. The traffic light program is uploaded through the central PLC. An interface is realized between traffic lights and the software. The unique traffic light signals are transmitted to the software, which can represent the actual signals in real-time through a GUI (Graphical User Interface). The software provides multiple settings and gives controls for the already mentioned functions. It has a function to initialize a SUMO simulation, which communicates the actual real traffic light states to the virtual traffic lights in the simulation. The simulation contains all traffic lights arranged in an intersection. Random virtual traffic is assigned to the scenario. The S7-1200 PLC has a crosswalk button to prioritize pedestrians at crosswalks. The crosswalk button is also present in the software, showing the actual state of the pedestrian cycle.
The simulation contains the crosswalks for pedestrians. Instead of generating virtual pedestrian traffic, a human-controlled pedestrian can be included in the simulation. For this purpose, a Java-based android smartphone application was developed, which can read the smartphone's sensor data. These devices are essential elements of our lives, and it is a self-evident tool for pedestrian control in the simulation. The sensor data is communicated to the application through Wifi. When the smartphone interface is initialized and the software receives sensor data, it inserts a pedestrian into the simulation. The pedestrian can be controlled by tilting the smartphone. The movement of the pedestrian is regarding the angle of the phone (the extent of the acceleration caused by the tilted sensor). Smartphone axes are aligned with the simulation's axes, so the control of the pedestrian is instinctive.
Various scenarios can be tested with such features, and it is also a fun demonstration tool, especially for future generations of engineering students.
Involving a smartphone in the simulation provides further options for developing additional functionalities. The smartphone could not only control the pedestrian's position. However, it could also control other simulation parameters like traffic flow, or it could also control the behavior of the traffic light program. Smartphone applications could be developed and tested for supporting pedestrians at crossroads (e.g., feedback if they accidentally step on the crossroad before they get the green signal by vibrating the smartphone).