Real-Time Incident Detection and Capacity Estimation Using Loop Detector Data

Given the fact that the existing literature lacks the real-time estimation of road capacity and incident location using data from inductance loop detectors, a data-driven framework is proposed in this study for real-time incident detection, as well as road capacity and incident location estimation. The proposed algorithm for incident detection is developed based on the variation in traﬃc ﬂow parameters acquired from inductance loop detectors. Threshold values of speed and occupancy are determined for incident detection based on the PeMS database. The detection of the incident is followed by the real-time road capacity and incident location estimation using a Cell Transmission Model (CTM) based approach. The data of several incidents were downloaded from PeMS and used for the development of the proposed framework presented in this study. Results show that the developed framework detects the incident and estimates the reduced capacity accurately. The location of the incident is estimated with an overall accuracy of 92.5%. The performance of the proposed framework can be further improved by incorporating the eﬀect of the on-ramps, oﬀ-ramps, and high-occupancy lanes, as well as by modeling each lane separately.


Introduction
An incident is among the most unfavorable events that significantly affect the roadway capacity and decrease the reliability of the system. e impact of disruption due to incident could be minimized by implementing real-time intervention strategies. e effectiveness of the intervention measures depends on accurate real-time information about the location, duration, and impact of the incident. e main problem caused by the incident is not the lack of capacity but the temporary reduction of capacity due to the incident [1]. Golob et al. [2] found a strong relationship between the likelihood of incidents and traffic conditions. Sun and Li [3] investigated the relationship between incidents and different traffic conditions. Mattsson and Jenelius [4] calculated the increment in the travel time of links when certain links in the network are closed. Goldberg [5] found that, with an increase in capacity utilization, the redundancy of the system decreases, making the system more vulnerable.
Among traffic flow parameters, the capacity of the road section is directly affected by the incident, which then affects the other parameters such as speed, delay, and occupancy. e capacity of the road is not a fixed value. It varies with the change in traffic conditions, road environment, and weather conditions. Estimating the capacity round the clock is a cumbersome task. e capacity estimation becomes more critical when an incident occurs, as a significant part of the delay faced by drivers is due to the incident [6,7]. Ahmed and Hawas [8] introduced a threshold-based approach for incident detection and validated the model through simulation data. Sheu [9] used traffic flow and occupancy data of I-880 freeway in Oakland, California, for real-time incident detection using discrete-time, nonlinear, stochastic system modeling. Rossi and Gastaldi [10] used fuzzy logic for incident detection from loop detector data. Zhang and He [11] and Gu and Qian [12] developed a deep learning approach for detecting the incident through social media. Xiao [13] proposed a model based on ensemble learning for incident detection. Kinoshita and Takasu [14] formulated a simple model for incident detection from probe car data. Oh [15] conducted statistical analyses and identified traffic conditions that lead to traffic incident likelihood. Chen et al. [16] determined factors which contribute to increasing the likelihood of incidents on I-25. Wang and Papageorgiou [17] estimated the real-time traffic state using the loop detector and predicted the traffic state by a second-order traffic flow model. Ngoduy [18] developed a technique for estimating the real-time traffic state for a section of freeway using a particle filtering algorithm. CTM-EKF (Cell Transmission Model-Extended Kalman Filter-) based technique has been applied for real-time traffic state estimation for traffic network disrupted with an incident [19][20][21].
Real-time capacity estimation is beneficial when there is a significant reduction in capacity due to events such as incidents. Chen et al. [22] proposed a zero-inflated negative binomial (ZINB) model for incident risk information, which can be beneficial for traffic management. Traffic incident is a random event, and reduced capacity can be modeled as a random variable [23]. Hadi and Sinha [24] used multiple pieces of software and estimated the incident capacity at different trials. Knoop and Hoogendoorn [6] collected data from a helicopter and estimated incident capacity through microsimulation. e reduced capacity due to the incident creates congestion for the upstream traffic. If the information is not disseminated to the drivers at the upstream of the incident location, then congestion will prevail, and longer queues will be formed. e increased upstream occupancy is associated with more severe incidents [25]. Smith and Qin [23] analyzed a large dataset of traffic flow and incident data and found a 63% reduction in capacity when one lane of traffic was blocked, while 77% reduction was observed when two of three lanes were blocked. Almotahari and Yazici [26] used PeMS database for estimation of delay caused by reduced capacity after the incident. Bertini and Myton [27] identified bottlenecks on the freeways in California using PeMS database. e estimation of the location of an incident enables the traffic control system to divert the flow to an alternate route to reduce congestion on the affected road. In the literature, the offline estimation of the incident location has been performed using incident datasets. One or multiple locations were identified, which were vulnerable to the incident. ese locations are called blackspots or hotspots, having a high probability of an incident. Blackspot analysis requires spatial and temporal data for determining the precise location [28][29][30][31]. e location of an incident can be identified by kernel density and K-means clustering in GIS to estimate the locations with a high probability of an incident [32][33][34][35]. e location of the incident in the existing literature is mostly estimated offline, and a real-time incident location estimation framework is lacking. e impact of capacity reduction due to incidents can be minimized by implementing real-time optimal intervention strategies.
e change in information of traffic flow parameters due to disruption events can be used to prompt the request for initiating the intervention. e information about capacity variation helps traffic management system to manage the traffic optimally and disseminate correct information to drivers. Intelligent Transportation System (ITS) based applications for real-time dynamic traffic assignments such as ATIS (Advanced Traveller Information Systems) and ATCS (Adaptive Traffic Control Systems) can be made more accurate and useful using reliable information about the impact, time, and location of the incident. e accuracy of the traffic state estimation depends on the location of the incident with respect to the sensor [36]. e time of road-crash is also essential to divert the traffic to alternative routes. Diversion of traffic is implemented until the capacity of the road is restored to its normal value. e suboptimal diversion strategy may lead to increased congestion on the road network and intensify the impact of the incident [37]. e review of the literature indicates that a significant amount of research has been done in the domain of capacity estimation. Previous studies, along with other strategies, considered the capacity as a dynamic parameter. However, an explicit framework for real-time road capacity and incident location estimation using loop detector data does not exist in the available literature.
is study develops a framework for incident detection, capacity estimation, and estimation of incident location based on data of traffic flow parameters obtained from loop detectors. e proposed framework is based on the open-source data of the California State Department of Transportation (PeMS). Incident data, along with traffic flow data, are analyzed to develop the proposed framework. e change in traffic flow parameters and congestion developed upstream after the incident will be used to detect the incident and estimation of the incident location, respectively.

Model Development
Real-time estimation algorithms need to collect, process, and update the data to the system in a very short interval of time, which can be achieved by minimizing the number of variables and developing computationally efficient algorithms. e macroscopic traffic flow parameters provide essential information that is enough for the estimation of the traffic state. Loop detectors measure macroscopic traffic data of flow, speed, and occupancy in real-time at fixed time intervals. ese loop detectors are embedded in the pavement and provide continuous temporal information for that point. e spatial information between the detectors can be captured by using traffic flow models such as the Cell Transmission Model (CTM) with measurements acquired from the sensors. e traffic flow parameters measured at the loop detectors are affected by the incident due to the reduction of capacity. e variation of traffic flow parameters due to the incident can be used for incident detection, estimation of capacity, and estimating the location of the incident in a road section between two consecutive loop detectors. However, variation in the traffic flow parameters recorded at the sensor could be due to the factors other than the incident such as the daily variation, weekly variation, or variation due to the weather impact. erefore, an appropriate incident detection model is needed to detect false alarms and improve the efficiency of the incident detection process. In this study, the proposed algorithm continuously evaluates the information acquired from sensors to detect the incident. e detection of incident triggers the algorithm for capacity and the location of the incident estimation. e incident is detected when variation in traffic flow parameters like speed and occupancy exceeds predefined threshold limits. e threshold limits are established by performing a comparative analysis of post-incident data with the data during normal traffic conditions. If the difference of speed △U k and the difference in occupancy △O k at current time k with the weekly average are higher than the threshold limits α and β, respectively, then there might be a possibility of an incident. is is verified by further comparing the current speed and occupancy values with the average values of these parameters for the past 15 minutes (k: 15 min). e incident is detected when the difference of speed and occupancy with previous three-time intervals △U k , △O k also exceeds the threshold limits c and δ, respectively. Figure1 describes the overall framework for this research, and the list of variables with their symbols is shown in Figure 2.
Various components of the overall research framework are described in the following subsections.

Incident Detection.
e PeMS database contains detailed information on incidents, including spatiotemporal information like time, date, day, location, and duration. Moreover, it also contains the type of incident and incident severity. e incident causes congestion at the upstream sensor when traffic demand is higher, and the impact of the Journal of Advanced Transportation accident is also significant to cause congestion. e incidents occurring when traffic demand is low, or when the impact of the accident is significantly low to cause any congestion, are not included in the scope of this study. Furthermore, modeling such incidents is not significant in devising realtime traffic control and incident management strategies. erefore, in this study, only those incidents are selected, which resulted in oversaturated flow conditions as the proposed framework relies on the sensor information.
e data of numerous accidents were downloaded, out of which nine incident scenarios are analyzed. Traffic data are collected from the upstream sensor of incident location reported in the incident report of the PeMS database. For incident detection, the data of four weeks before the incident date were collected to determine the average weekly values of occupancy and speed. Figure 3 shows the change in speed recorded at the upstream sensor of the incident location and compares it with the average weekly speed, which is estimated by taking the average of speeds observed on the same day for the past four weeks. e speed of vehicles significantly reduced after the incident, and the comparison of speed with the weekly average shows an evident trend that can be used to detect the incident. However, the detection of the incident cannot rely only on one criterion. erefore, the comparison of occupancy with the weekly average was also included in the incident detection model. Figure 4 shows the change in occupancy measured at the upstream sensor during the incident.
e occupancy at the upstream sensor was significantly increased after the incident, which is used as one of the criteria for incident detection.
e time of the incident from PeMS data of the selected freeway sections is shown in Table 1, along with measured speed and occupancy after the incident. e data provided in PeMS database aggregate speed and occupancy for 5-minute intervals. Due to the 5-minute aggregation, the effect of the incident on speed and occupancy is diluted, and, in some cases, it takes 1-2 intervals to show the impact of the incident on the upstream sensor data. is lag can also be attributed to the time taken in the propagation of traffic congestion towards the upstream sensor after the incident.
e proposed incident detection model detects the incident based on the difference in four parameters. ese four parameters are based on the difference in current speed and occupancy with their corresponding weekly average and the average of the previous 15 minutes (three intervals). e threshold values of these parameters can be derived based on the data presented in Table 2. e higher threshold values of these parameters will reduce false detection. However, there could be a possibility of missing the accident with too high threshold values. Similarly, the lower threshold values will ensure the maximum possibility of incident detection and could also result in some false detections. e optimum threshold values were estimated by modeling all the incident locations using the four abovementioned parameters by changing their values from 10% to 90% with an interval of 10%. e maximum difference in parameter values that detected all the incidents was selected as the threshold value for that parameter. Table 3 shows the number of incidents detected with different values of the parameters and highlights the cells corresponding to the threshold values.
Based on Table 3, the threshold values of the parameters are taken as follows: (1)

Estimation of Road Capacity and Incident Location.
e proposed algorithm for estimation of road capacity and incident location uses the Cell Transmission Model (CTM) [38], which divides a road segment into   Journal of Advanced Transportation homogenous cells of equal lengths. In equation (2), the CTM updates traffic occupancy n i for each future timestep k+1 and all the cells in a road network. y i is the outflow from cell i.
In equation (3), Q i is the capacity flow, and N i is the maximum possible occupancy of a cell. e CTM uses a triangular or other piecewise linear forms of the fundamental diagram, as shown in Figure 5 [39]. e traffic flow from the upstream sensor of the incident location is taken as a demand for CTM. is component of the framework, shown in Figure 1, is activated after the incident detection algorithm has detected the incident. A CTM-based approach models the incident scenario by splitting the section of the road into cells of equal lengths. Each cell C n between two sensors is modeled as the candidate cell.
e algorithm utilizes calibrated CTM parameters for PeMS traffic data. Dervisoglu and Gomes [40] calibrated the fundamental diagram for PeMS database at 12 different sections of freeways. Table 4 shows the calibrated traffic flow parameters that were used as input to the CTM.      Journal of Advanced Transportation A number of scenarios are developed and simulated using calibrated CTM. e possibility of an incident occurring in each cell and its impact on each lane is modeled. e total number of scenarios is equal to the product of the number of cells and the number of lanes. Each scenario is simulated with the demand from the upstream sensor and the resulting simulated occupancy O s for each scenario is compared with the actual occupancy O k . e scenario that yields the least difference in the occupancy is selected to provide the estimated location and capacity of the incident cell.

Incident Detection Using PeMS Data.
e open-source data of the Department of Transportation California (PeMS) was used for the application of the model in a real environment. e incident details mentioned in Table 1 were collected from the incident log of the PeMS database. e framework proposed in Figure 1 is applied to capture the selected incidents listed in Table 1. e results of incident detections are shown in Table 5, which compares the incident time reported by PeMS data with the time of incident detected by the algorithm. e average difference in the reported incident time and the incident time detected by the algorithm is 9 minutes. e least difference of 1 minute was observed for the incident that occurred at I105-E. e highest difference of about 27 minutes was observed for the incident reported at I80-E on January 15, 2020, at 18 : 58 hrs. e incident reported on SR24-E was detected 10 minutes before its reported time. is shows the discrepancy in the incident reporting time, which must have been recorded with some error. e change in traffic flow parameters at the selected sensor of SR24-E indicates the occurrence of the incident before the reported time, which could be due to the inaccurate field report of the incident. e observed difference in the reported incident time and the incident detection time for the selected incidents can be attributed to the following factors:

Capacity Estimation.
When an incident is detected in the system, the component of the framework for capacity estimation is activated. e methodology of the capacity estimation algorithm is discussed in Section 2.2. Figure 6 shows the results of the capacity estimation of all nine incidents. e capacity profile is compared with the speed data to highlight the variation in traffic conditions with the change in capacity. Figure 6 illustrates the estimated capacity profiles at the selected freeway sections. e estimated capacity profile is compared with the speed profile to highlight the performance of the proposed incident algorithm. Table 6 shows the estimated capacity as a function of the available number of lanes for all the incidents selected in this study. In PeMS data, the number of lanes affected due to the incident is not included in the incident report. erefore, the capacity flow or the number of affected lanes due to the incident is not known. e accuracy of estimated capacity in the absence of actual value of reduced capacity cannot be measured. However, the performance of the proposed algorithm can be observed in Figure 6, which shows that the estimated capacity changes with the change in traffic conditions measured at the sensor.

Incident Location Estimation.
is study estimates the location of the incident in real time as well. e location and capacity during the incident are estimated simultaneously, using the framework described in Figure 1. e scenario, for which the difference between simulated occupancy and measured occupancy is the least, is selected as the outcome for estimated capacity and location. Figures 7-9 show the comparison of actual occupancy with the simulated occupancy.
In Figure 7, the increase in occupancy is observed at 5 : 55 PM at the selected sensor of freeway SR94-W after the incident at its downstream. According to the incident report, the incident occurred at 5 : 42 PM, and the lag in occupancy increase is due to the time required for queue propagation to the upstream senor. e actual occupancy is restored to normal condition in the next interval at 6 : 00 PM, while the simulated occupancy restored to normal conditions with a lag of one time interval (5 minutes). e incident occurred at 576 m from the sensor. e algorithm estimated the location of the incident in the second cell. e second cell starts at 300 m and ends at 600 m. us, the proposed algorithm accurately estimated the location of this incident. Figure 8 illustrates the occupancy profile of the freeway I105-E when an incident is detected in the second cell. e occupancy increases after the incident at 18 : 35. According to the incident details mentioned in Table 1, the incident was reported at 18 : 34. e increased occupancy at the sensor was observed at 18 : 35. e simulated occupancy shows a similar trend to that of the actual occupancy, which indicates that the second cell is the incident cell. Furthermore, the actual location of the incident is also estimated accurately in the second cell, which is 320 m away from the upstream sensor.
e occupancy profile of freeway I105-W is shown in Figure 9. e increase in occupancy can be seen in two places. e increased occupancy at 10 : 50 hrs was found to be a daily variation. e second peak in the occupancy profile is due to the incident because the reduction in speed is also observed at the same time in Figure 3. e time of the incident mentioned in Table 1 also verifies the increase in   occupancy. e incident occurred at 480 m from the upstream sensor, which corresponds to the second cell. e estimated location of the incident is also the second cell, which shows the accurate performance of the proposed algorithm. Table 7 shows the estimated locations of all nine incidents. Locations of six out of nine incidents were estimated accurately with an overall accuracy of 92.5% e sections of the freeways affected with the incident are shown in Figure 10. In each section, the distance between the upstream and downstream sensors was divided into cells of equal length of 300 m. e shaded cell represents the estimated incident cell, in which the yellow strip indicates  the location of the upstream sensor, while the red strip shows the location of the downstream sensor. e pin location icon in red color shows the actual location of the incident from the PeMS data.

Application of Framework in a Simulated Environment.
e outcomes of the model implementation on field data are shown in previous sections, showing the acceptable performance of the proposed algorithm. However, there is a slight deviation when the model outputs are compared with the field data. ere are two main reasons for this error in the incident detection and capacity estimation: (i) ere are off-ramps and on-ramps between the selected sensors. e propagation of the impact of the incident on capacity and other traffic flow parameters to the upstream sensor can be significantly affected if there is an on-ramp or off-ramp between the two sensors. For example, if there is an off-ramp between the incident location and the upstream sensor, then the vehicles exiting the road section could dilute the impact of the incident on the upstream sensor and may cause some error in the estimation. e proposed model could yield more accurate results if there are no on-ramps or offramps between the sensors. is deficiency may also be improved by integrating the measurements obtained from the on-ramp and off-ramp sensors in the incident detection and estimation algorithm.
(ii) e inherent systematic error in measuring the traffic flow and error in recording the details of the incident are another factor that makes it difficult to measure the accuracy of the proposed framework. For example, due to the error in the incident reporting time, it becomes difficult to estimate the accuracy of the incident detection algorithm.
Due to the factors mentioned above, the proposed framework was applied to a simulated environment. In the simulated scenario, all the information about an incident, such as incident occurring time, location, duration, and capacity reduction, is known. e proposed framework was applied to a 5 km long road section, having 4 lanes, as shown in Figure 11. e section is a mid-block section with no on-ramp and off-ramp. It is divided into 10 cells of equal lengths of 500 m. e free-flow speed is taken at 60 km/hr. ere are loop detectors at the beginning and the end of the road segment. e sensors provide measurements at 30-second intervals. e incident occurred in cell 2 at 750 m from the upstream detector for 10 minutes from time-step 30 to 50, which decreased the capacity of the road section to 2 lanes from 4 lanes. e incident detection algorithm requires weekly average values of measured speed and occupancy at the same time interval. For this purpose, synthetic measurements were generated by assuming traffic demand around 7000 veh/hr with a slight variation on each day. e outcomes of the model application are shown in Figure 12, which shows that the proposed algorithm accurately detected the incident and estimated the reduced capacity.
e incident occurred at the 30th time-step, which was detected by the algorithm at time-step 33, showing a lag of 1.5 minutes. e incident was cleared at the 50th time-step, which was estimated at time-step 52. Figure 12 shows the variation in capacity profile. Similarly, the proposed algorithm accurately estimated the reduced capacity due to the incident. Furthermore, the estimated location of the incident was also estimated accurately at cell 2.

Conclusions and Recommendations
is study proposed a framework that utilizes the measurements obtained from the inductance loop detector for incident detection, estimation of reduced capacity, and estimation of the location of the incident as well. e proposed model is developed using the sensor data available from PeMS and could be applied in real time without any modifications. e proposed algorithm was able to accurately detect the incident and estimate the reduced capacity of the road section and the location of the incident. e location of the incident is estimated with an overall accuracy of 92.5%. e following conclusions are drawn from this study: e proposed algorithm requires the measurements of macroscopic parameters such as flow, speed, and occupancy. e utilization of macroscopic traffic flow parameters and limited macroscopic data makes the proposed algorithm computationally more efficient, which makes it more suitable for real-time applications. e proposed algorithm is applicable when the effect of the incident is observed at the sensor located upstream of the incident location. e minor incidents, when traffic demand is low and no congestion is caused due to the incident, cannot be detected by the algorithm. However, the incidents not causing a significant impact on traffic conditions do not need real-time traffic control and incident management measures, which are otherwise needed. e incident is detected when both speed and occupancy exceed the threshold limits. Incidents from PeMS database were identified to develop the threshold limits for speed and occupancy. e threshold limits are based on the average values of speed and occupancy from the recorded observations. e distance between the incident location and the upstream sensor affects the accuracy of the incident detection algorithm.
e time lag of detection may increase with the increase in the distance between the incident location and the sensor, as the queue built-up and spillback time increase with this distance. e traffic condition may also affect this time lag. It was observed from the data that the incident reporting time and duration of the incidents reported in PeMS database do not match with the observed data.
is deviation also affects the estimation of the accuracy of the proposed algorithm. e incident detection and capacity estimation algorithm was applied to the nine selected incidents to evaluate its performance. e location of the incident was estimated with an average accuracy of 92.5%. e average difference between incident reporting and detection time was 9.8 minutes, which is less than two time intervals, as the PeMS data are reported at 5-minute intervals. e accuracy of the number of affected lanes cannot be determined as the PeMS data do not provide this information in the incident report. e accuracy of the incident detection of the proposed algorithm can be further improved when the traffic flow parameters are provided with higher resolution. e aggregation of the data over 5-minute interval dilutes the impact of the incident, especially during the interval when the incident occurred. In reality, the inductance loop detectors provide measurements at 30-second interval. e use of measurements at 30-second interval is expected to improve the estimation accuracy. e proposed framework was also applied to a simulated controlled environment. e model detected the incident and estimated the capacity and location of the incident accurately. e information of capacity variation is beneficial for the estimation of traffic state. e accurate detection of the incident and capacity estimation are crucial in real-time traffic and incident management. e proposed algorithm enables the traffic controller to devise a strategy that effectively manages congestion and improves network performance during the incident. Effective incident management reduces the time spent by drivers in congestion, which may result in less anxiety and stress, thus contributing to improving the road safety of commuters. e performance of the proposed framework may be improved by using CTM-based estimation techniques such as CTM-KF (Kalman Filter) or CTM-EKF (Extended Kalman Filter). Furthermore, data from other available sources (Bluetooth, Wi-Fi, GSM, and GPS-based sensors) could be integrated to develop improved algorithms. e autonomous and connected vehicles could provide more useful and accurate information for incident detection and capacity estimation. With a reasonable penetration of autonomous and connected vehicles, the real-time information from these vehicles could be fused with sensor data to develop more efficient algorithms.
Data Availability e data used in this research are publicly available and can be downloaded from the PeMS website (http://pems.dot.ca. gov/).

Conflicts of Interest
e authors declare that there are no conflicts of interest.

Authors' Contributions
Yongjun Shen was responsible for funding acquisition, resources, supervision, and writing review and editing; Syed Muzammil Abbas provided the software; Afzal Ahmed performed validation; Syed Muzammil Abbas and Afzal Ahmed contributed in the methodology and writing original draft.