Capstone Project


Title: GRU prediction model for traffic light demand in SCOOT systems


Abstract


Traffic light wait times are lengthy and inefficient in Abu Dhabi and Dubai. Current algorithms like SCOOT do not take into account external variables such as data from adjacent traffic lights, accidents, events, and driving behaviors. The proposed solution is to analyze traffic light data from SCOOT systems using Gated Recurrent Unit, a type of Recurrent Neural Network, that outputs predictions for traffic light demand of every minute for everyday of the week. Future development to this project is to create real-time traffic control using deep learning and more accurate measurements of traffic flow such as AI cameras to detect the number of vehicles.

Problem Definition


Current traffic light control systems take into account immediate traffic demand and disregard historical data, and therefore do not offer actual improvement of traffic flow especially during rush hours and grid cities. A vehicle count prediction model using Gated Recurrent Unit will be created to accurately visualize the flow of traffic in SCOOT intersections any time of the day. The model will output a plot of the predictions on an intersection as well as the actual demand for direct comparison of the model accuracy.

Figure 1. Abu Dhabi map pinpointing locations of the dataset

Design Development


A Recurrent Neural Network inputs data in sequences and at each sequential step, a series of calculations occur that output a hidden state such that the output of each previous step is considered and optimized, but RNN suffers from vanishing/exploding gradients because of short-term memory. GRU uses update and reset gates in the unit cell to solve the vanishing gradient problem of vanilla RNN and offers more efficient and faster training. One drawback is that it offers full content without control as compared to Long Short Term Memory RNN.

Inputs:
  • detector state as a binary value (car on loop detector or not)
  • light status value as a binary value (green or red light)
  • intersection code (from Al Zahiya district)
  • time of day (in 24 hour format by seconds)
Outputs:
  • actual value of vehicle count at a given minute from training dataset
  • prediction value of vehicle count at a given minute from testing dataset
  • intersection code (retained)
  • time of day (retained)

Results & Test Data


The Department of Traffic SCOOT dataset is for 2 to 31 January 2019. As there are four to five days of every day of the week, the test data will be split accordingly and the model will be trained and tested on the same days (e.g. Sundays only) for more accurate predictions of the hour being analyzed. Any intersection can be analyzed with this model and accurately predict the traffic demand. One of the most congested intersections in Tourist Club is analyzed in Figures 4-5.

Figure 2. Traffic Light 1 [traffic light code redacted] prediction output for 60 minutes (from 11:00:00 to 11:59:59) trained on Wednesdays (2, 9, 16 Jan 2019) with 400 epochs and tested on Wednesdays (23, 30 Jan 2019)

Figure 3. Traffic Light 2 [traffic light code redacted] prediction output for 60 minutes (from 17:00:00 to 17:59:59) trained on Wednesdays (2, 9, 16 Jan 2019) with 400 epochs and tested on Wednesdays (23, 30 Jan 2019)

Discussion


The model learnt time based variations present in the data for a single hour format where it predicts for the same duration. The model performance greatly improves if it is trained on data of an entire hour, hence that is what it was trained and tested on. The plots are of actual (trained) and prediction (tested) data for 60 minutes and against the number of vehicles. It outputs a 300 epochs model in 3 minutes.

The GRU model was optimized to train on a single intersection and generates context from 30 minutes of running data, meaning a 10:30AM prediction has trained on data up to 10AM. It successfully plots predictions of all times of a day while taking into account the varying degrees of change of traffic flow throughout the hour. The model can be used to gain a deep understanding of the demand on SCOOT intersections and can be used in further applications such as traffic light control. In its current form, it provides accurate representation of vehicle count on intersections and visualizing high-demand times and can be used for traffic light optimization and understanding traffic light flow around the intersection network. The high accuracy output of the model showcased in Figures 4-5 make this model promising for real world usage, particularly at Abu Dhabi’s Department of Transport and Dubai’s Roads and Transport Authority.

Architecture improvements include using attention to give the model capabilities to learn the important characteristics when it is making predictions about a particular intersection, and that will open potential for pinpointing which adjacent intersections are causing congestion on a particular intersection. Moreover, the model could add an option to plot an entire day (24 hours) on the same plot. The model can also benefit greatly from training and testing on all sides of the intersection and to include additional parameters from raw SCOOT data that could enhance the model.

Acknowledgements


Professor Saif Eddin Jabari for his trust and support.