Acta Scientific Computer Sciences

Research Article Volume 5 Issue 1

Real-Time Traffic Incident Detection Using Dynamic Time Warping Algorithm

Vesal Ahsani1* and Anuj Sharma2

1Post-doctoral Reasercher, Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran
2Professor, Department of Civil, Construction and Environmental Engineering, Iowa State University, Ames, IA, USA

*Corresponding Author: Vesal Ahsani, Post-doctoral Reasercher, Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran.

Received: October 16, 2022; Published: December 09, 2022


In recent years transportation system has become a crucial infrastructure for transferring people and goods from one point to another. However, its reliability can be decreased by major events such as recurring and non-recurring traffic congestion. Therefore, monitoring the performance of transportation systems play an important role in any transportation operation and planning strategy. This study utilized the historical and real-time traffic data collected through the INRIX XD monitoring platform. In this article, we used the mean of the aggregated 1-minute speed data as the microscopic indicator of interest and the 75th percentile of normal travel speed as the threshold to trigger data collection. Also, this endeavor proposes a moving window approach to detect the incident. After implementing the triggering algorithm, the DTW algorithm is applied to the data collected in each window to combine the collected time series (i.e. query) and an appropriate reference time series. Along with existing DTW concepts, this study uses a rolling window approach to collect the real-time data. This was proposed in contrast to the existing fixed-window method, which tends to collect data over a longer period of time, potentially resulting in a greater mean time to detection. Moreover, a new technique on the DTW outputs is implemented for traffic incident detection, using the area under the warping path as a measure to detect an incident. Finally, the proposed algorithm reports a sensor experiencing a congestion when at least three of their six windows have ratios greater than 77 percent and have one ratio greater than 65 percent. If such conditions are met within the first four windows, the algorithm stops collecting and analyzing data for the following two windows and reports the incident, otherwise it moves on to the last window.

Keywords: Dynamic Time Warping (DTW); Traffic Incident Detection; INRIX; Rolling Window


  1. Paniati J. “Operational Solutions to Traffic Congestion”. Federal Highway Administration Research and Technology 68.3 (2004).
  2. Ma Y. “A Real-Time Traffic Condition Assessment and Prediction Framework Using Vehicle-Infrastructure Integration (Vii) with Computational Intelligence”. Ph.D. Dissertation, Clemson University, Clemson, SC, USA. Advisor (s) Mashrur A. Chowdhury (2008).
  3. Dudek C L and Messer C J. “Incident detection on urban freeways”. Transportation Research Record. No 495, TRB, National Research Council, Washington, D.C (1974): 12-24.
  4. Sharma Anuj and Vesal Ahsani. "Assessing the Impact of Game Day Schedule and Opponents on Travel Patterns and Route Choice using Big Data Analytics" (2019).
  5. West JT. “California makes its move”. Traffic Engineering4 (1971): 12-18. Zadeh, L. A. (1988). Fuzzy logic, IEEE Computing Magazine., April, 83-93.
  6. Courage K G and Levin M. “A freeway corridor surveillance, information, and control system”. Texas Transportation Institute, Texas A&M University, College Station. Research Report. 488-8, December (1968): 349.
  7. Ahmed S A. “Stochastic processes in freeway traffic part II: incident detection algorithms”. Traffic Engineering and Control6-7 (1983): 309-310.
  8. Fambro D B and Ritch G P. “Evaluation of an algorithm for detecting urban freeway incidents during low-volume conditions”. Transportation Research Record, No 733, TRB, National Research Council, Washington, D.C (1980): 31-39.
  9. Gall A I and Hall F L. “Distinguishing between incident congestion and recurrent congestion: a proposed logic”. Transportation Research Record, No 1232, TRB, National Research Council, Washington, D.C (1989): 1-8.
  10. Hi-ri-o-tappa K., et al. “A Novel Approach of Dynamic Time Warping for Short-Term Traffic Congestion Prediction”. Transportation Research Board of the National Academies, Washington, D.C., (2011).
  11. Ahsani Vesal., et al. “Quantitative analysis of probe data characteristics: Coverage, speed bias and congestion detection precision”. Journal of Intelligent Transportation Systems2 (2019): 103-119.
  12. Sharma Anuj., et al. “Evaluation of opportunities and challenges of using INRIX data for real-time performance monitoring and historical trend assessment" (2017).
  13. Oh JS., et al. “Real-Time Estimation of Accident Likelihood for Safety Enhancement”. ASCE Journal of Transportation Engineering (2005): 358-363.
  14. Ahsani Vesal., et al. “Improving Probe-Based Congestion Performance Metrics Accuracy by Using Change Point Detection”. Journal of Big Data Analytics in Transportation1 (2020): 61-74.
  15. Ahsani Vesal. "Big data driven assessment of probe-sourced data". PhD diss., Iowa State University, (2019).
  16. Parkany E and C Xie. “A Complete Review of Incident Detection Algorithms and Their Deployment: What Works and What Doesn’t”. The New England Transportation Consortium (2005).
  17. F Yuan and RL Cheu. “Incident detection using support vector machines”. Transportation Research Part C: Emerging Technologies3/4 (2003): 309-328.
  18. Chakraborty Pranamesh., et al. “Traffic congestion detection from camera images using deep convolution neural networks”. Transportation Research Record45 (2018): 222-231.
  19. Poddar Subhadipto., et al. “Comparison of machine learning algorithms to determine traffic congestion from camera images". In Transportation Research Board 97th annual meeting, Washington, DC (2018): 7-11.
  20. CH Hsiao., et al. “Application of fuzzy logic and neural networks to automatically detect freeway traffic incidents”. Journal of Transportation Engineering 5 (1994): 753-772.
  21. R L Cheu and S G Ritchie. “Automated detection of lane-blocking freeway incidents using artificial neural networks”. Transportation Research: Part C 6 (1995): 371-388.
  22. H Dia and G Rose. “Development and evaluation of neural network freeway incident detection models using field data”. Transportation Research: Part C 5 (1997): 313-331.
  23. B Abdulhai and S G Ritchie. “Enhancing the universality and transferability of freeway incident detection using a Bayesian-based neural network”. Transportation Research: Part C 5 (1999): 261-280.
  24. SS Ishak and H Al-Deek. “Performance of automatic ANN-based incident detection on freeways”. Journal of Transportation Engineering, Part A: Systems 4 (1968): 281-290.
  25. Berndt D and Clifford J. “Using dynamic time warping to find patterns in time series”. AAAI-94 Workshop on Knowledge Discovery in Databases (KDD-94), Seattle, Washington. (1994).
  26. Hi-RI-O-Tappa K and Thajchayapong S. “Generalizability and transferability of incident detection algorithm using dynamic time warping”. 19th Intelligent Transportation Systems World Congress, ITS (2012).
  27. Hi-ri-o-tappa., et al. “Development of High Accuracy Congestion Prediction Algorithm Using Series of Camera Detectors”. 11th International Conference of ITS. Telecommunications, Saint Petersburg, Russia, (2011).
  28. Motamed M. “Developing a real-time freeway incident detection model using machine learning techniques”. University of Texas at Austin, TX, USA. Advisor: Randy Machemehl.
  29. Keogh E and Ratanamahatana C A. “Exact indexing of dynamic time warping”. Knowledge and Information Systems. (2004).


Citation: Vesal Ahsani and Anuj Sharma. “Battery and Solar Panels Temperature Compensation for Small Satellites Applications". Acta Scientific Computer Sciences 5.1 (2023): 30-39.


Copyright: © 2022 Vesal Ahsani and Anuj Sharma. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.


Acceptance rate35%
Acceptance to publication20-30 days

Indexed In

News and Events

  • Certification for Review
    Acta Scientific certifies the Editors/reviewers for their review done towards the assigned articles of the respective journals.
  • Submission Timeline for Upcoming Issue
    The last date for submission of articles for regular Issues is May 30, 2024.
  • Publication Certificate
    Authors will be issued a "Publication Certificate" as a mark of appreciation for publishing their work.
  • Best Article of the Issue
    The Editors will elect one Best Article after each issue release. The authors of this article will be provided with a certificate of "Best Article of the Issue"
  • Welcoming Article Submission
    Acta Scientific delightfully welcomes active researchers for submission of articles towards the upcoming issue of respective journals.

Contact US