Objectives The signal control with fixed phase duration can not be adjusted adaptively according to the real-time road conditions, the improvement of traffic congestion phenomenon is limited. In order to simulate the phase adaptation of traffic lights according to the real-time road conditions, reasonably configure the phase duration of traffic lights and alleviate the traffic congestion, a closed-loop system of traffic lights timing optimization and self-feedback adjustment which include vehicles flow video acquisition, flow statistics, timing calculation, timing feedback, phase regulation, flow statistics and timing optimization is constructed.
Methods Firstly, combining virtual simulation and computer vision technology, a road traffic simulation scene built on Webster algorithm is constructed to simulate vehicle starting and stopping, driving and signal lights control based on Unity3D. Secondly, the OpenCV library is used to process the traffic flow video captured by Camera Object in the scene, count the traffic flow, calculate the optimal signal cycle, and determine the traffic phase. Finally, the result of timing calculation is applicable to the simulation scene, and further timing optimization is implemented according to the real-time scene to realize the signal phase adjustment and optimization cycle.
Results Traffic flow generation is built on the number of vehicles arriving at the intersection during peak hours. Vehicles are randomly generated in each direction of intersection every minute, including 15-30 vehicles in congestion direction and 5-15 vehicles in non-congestion direction. The initial setting of intersection signal lights is the traditional fixed timing schema, in which the left turn green light is on for 20 s in the north-south direction, the yellow light is on for 3 s, the straight green light is 30 s, and the red light is on for 56 s. The straight red light is on for 56 s, the left turn green light is on for 20 s in the east-west direction, the yellow light is on for 3 s, and the straight green light is on for 30 s. The average waiting time of intersection vehicles has decreased by 17 s, and the traffic volume has increased by 190 vehicles per hour with real-time timing optimization scheme.
Conclusions Simulation experiment of traffic signal timing using Unity3D provides a very effective method for the verification of traffic signal timing algorithm. The closed-loop system of signal lights adaptive timing optimization makes up for the limitations of existing traffic lights timing optimization schemes, and achieves real-time timing optimization. Simulation results show that the closed-loop feedback of signal lamp adaptive timing optimization can greatly reduce the waiting time of vehicles and effectively alleviate traffic congestion.