Sensitivity Analysis Based SVM Application on Automatic Incident Detection of Rural Road in China

Traditional automatic incident detection methods such as artificial neural networks, backpropagation neural network, andMarkov chains are not suitable for addressing the incident detection problem of rural roads in China which have a relatively high accident rate and a low reaction speed caused by the character of small traffic volume.This study applies the support vector machine (SVM) and parameter sensitivity analysis methods to build an accident detection algorithm in a rural road condition, based on real-time data collected in a field experiment. The sensitivity of four parameters (speed, front distance, vehicle group time interval, and free driving ratio) is analyzed, and the data sets of two parameters with a significant sensitivity are chosen to form the traffic state feature vector. The SVM and k-fold cross validation (K-CV) methods are used to build the accident detection algorithm, which shows an excellent performance in detection accuracy (98.15% of the training data set and 87.5% of the testing data set). Therefore, the problem of low incident reaction speed of rural roads in China could be solved to some extent.


Introduction
The methods of intelligent transportation systems (ITS) are widely used in traffic incident prevention and analysis to develop the traffic safety level.Some ITS solutions concentrate on vehicular networking applications.In 2017, a real-time visual assistance method was suggested based on vehicular network and smartphones, which created a network among the close-by vehicles and provided drivers with a real-time video feed from the one located just ahead [1].Moreover, some solutions concentrate on driving behaviors.In 2014, a driver-vehicle closed-loop system was built to study full vehicle dynamics cornering brake, lane change, and barrier avoidance under complicated driving situations [2].In the same year, a microscopic car-following model was also suggested using molecular dynamics to describe the relationship between longitudinal safe distance and lateral safe distance [3].
The abovementioned ITS solutions are aiming at traffic safety before an incident happens.However, in some cases, dealing with fast and automatic detection problems after an accident is more significant in reducing casualties.Automatic incident detection (AID) is widely used in ITS because of the increasing number of vehicles causing frequent traffic congestions, bottlenecks, and incidents.The AID technology is a systematic method that aims to accurately identify the incident that happened, type and effect of the traffic incident, and feedback real-time information (e.g., location, casualties, and pattern) to obtain fast treatment of victims and improve travel efficiency and safety.Some challenging issues remained to be unsolved as regards the AID technology in China's rural roads with a relatively lower traffic volume (annual average daily traffic up to 9000 pcu/D, average speed more than 48 km/h, and traffic volume lower than 60% of design capacity) [4,5].
With the popularity of AID research in recent years, many models and algorithms have been efficiently used to solve the remaining issues.The method of artificial neural networks (ANN) has been widely used in the recent decades.In 1995, Chew and Ritchie [6] first applied the ANN algorithm in expressway traffic incident automatic detection using an ANN model and showed an effective result.In 2000, Jiang and Liu [7] developed a multilayer forward ANN algorithm and built an AID model based on a backpropagation (BP) neural network.Compared to the former method, this algorithm showed a better performance.However, some shortages, such as slow learning speed and training limitation, still remained.After more than 10 years of development, Liu et al. [8] made great progress in this area and applied the improved BP-AdaBoost algorithm in traffic incident detection.In this study, the initial connection weight and the output threshold of the BP neural network are optimized, and the AdaBoost classifier is built.The Markov chain is also used to detect road incidents in the recent decade.In 2008, Sirvio and Hollmén [9] employed Markov chains and artificial neural network to predict the road traffic conditions using data related to weather conditions and road characteristics, which provided the input parameters with a larger range.As a related result, Yuan et al. [10] constructed a Markov model in 2011, which used historical and real-time data from taxies to estimate the future traffic conditions and travel times of the user's path, along with weather and driver behavior information.
The abovementioned algorithms have been proven to perform well in traffic incident detection.However, all of them should be used in the environment of urban road networks or expressways, with a steady traffic flow, a relatively higher traffic volume, and some necessary traffic management strategies.Thus, some new AID technologies are needed for problems on road sections of rural road with a relatively lower traffic volume.
In the 2000 s, machine learning methods became popular in the AID community because of their mathematic foundation and great performance proven in different fields.In 1998, Thomas [11] approved the usage of the Bayesian discriminate analysis to fuse static and dynamic sensors for AID.In 2003, Yuan and Cheu [12] first introduced the support vector machine (SVM) method into the AID field and testified its framework on simulated urban and freeway data sets.Their framework has been adapted in many later studies and was always listed as a baseline for algorithm performance comparison.Chen et al. [13] proposed an SVM ensemble algorithm to integrate the results of multiple SVM classifiers for a better performance in AID.The algorithm showed a great potential to do the combination.After the widespread of loop data, the SVM was also used to analyze probe vehicles' kinetic information (lane-change movements and turning speed measures) to recognize whether any incidents occurred in the upstream flow [14].In 2006, Zhang and Taylor [15] used the Bayesian network to store the knowledge and experience of domain experts and model the relationships between upstream and downstream traffic variables for a freeway, together with a particular designed data-preprocess module.In the same year, Zhang and Taylor [16] incorporated traffic signals into the Bayesian network for the urban arterial incident detection.More effective and prospective machine learning methods have emerged in last five years.In 2013, Wang et al. [17] developed a combination AID algorithm based on the time series method and machine learning methods, which expanded the input factors' volume and more precisely fed back the detection results.In 2014, Xiao et al. [18] approved a new AID method based on the SVM, which together systematically integrated kernel functions, and made the usage of the AID technology in low traffic volume road section a feasible method.Liu et al. [19] proposed an AID algorithm in 2014, which integrated several Bayesian classifiers, proven to obtain a better robustness.Huang et al. [20] made progress in machine learning in 2012.Accordingly, the extreme learning machine (ELM), which is a single layer feedforward neural network learning algorithm, was put to use.The nuclear matrix was used to replace the hidden layer feature mapping, and the kernel extreme learning machine was obtained.This showed a significant and better performance than the traditional methods [21].
This paper is organized based on a large amount of realtime data collected from several field experiments performed in typical rural roads in China and aims to develop an AID model which is suitable for rural roads with a relatively low traffic volume, using parameter sensitivity analysis and machine learning (SVM).
The rest of the paper is organized as follows: Section 2 describes the field experiments in detail and the data collection process.Section 2 provides an introduction of the parameter sensitivity analysis process and a description of the method to build the machine learning based AID model.Section 3 shows the results of this paper, and Section 4 provides some discussion and suggestions for future research.

Field Experiment.
Several conditions must be satisfied to guarantee the typicality of the chosen rural road sections and the accuracy of the data obtained.First, the chosen road sections should belong to the range of the rural road (the AADT up to 9000 pcu/D, average speed more than 48 km/h, and traffic volume lower than 60% of the design capacity) [4,5], without special functions (e.g., tourist road, coal road).Second, straight sections with wide vision and simple geometric elements should be chosen.Third, villages and plant areas should be avoided, to prevent human influence.Therefore, three ideal experiment road sections were chosen.Table 1 present the basic information, while Figure 1 shows the experiment road conditions.
The experiment was designed to simulate a traffic accident spot which occupied a lane for 40 mins.The real-time data of the traffic flow parameters were collected upstream, before and after the settlement of the simulated accident spot.The experiments were repeatedly performed for 66 times in all of the three road sections during a period of 15 days in November 2016 to obtain sufficient real-time data.The days of the weekend and with bad weather (e.g., rain, snow, and strong wind) were removed.Figure 2 shows the implementation process.
In Figure 2, the accident simulation point was marked as "O," and four monitoring points upstream were marked as "A," "B," "C," and "D", respectively.The distance between each monitoring point and the accident simulation point is also shown in the figure.In a single experiment, the accident would not be settled at first, and the real-time data of speed and front distance would be collected, using the AxleLight Roadside Laser Vehicle Classification System, in all monitoring points, including point "O," as the background data.The accident simulation point would be settled after 20 min, and the data would be collected under the same  time series.Finally, 132 data sets (with total data volume of 5198) were collected in the field experiment after removing some invalid data sets (i.e., those affected by the external environment or were lost because of the equipment).

Parameter Sensitivity Analysis
2.2.1.Speed.The sensitivity of the parameters caused by the relatively low traffic volume in China's rural road was first analyzed.In the field experiment, the speed data were collected for points "O," "A," "B," "C," and "D" with the distance to accident points of 0 m, 200 m, 300 m, 400 m, and 600 m, respectively.During the experiment process, the accident happened in 1200 s.A scatter plot was made to observe the speed distribution before and after 1200 s, in which the horizontal axis represents the time series (s) and the vertical axis represents the speed (km/h).The scatter plot is shown in Figure 3.
As shown in Figure 3, the speed data in group "O" (0 m) presented a significant sensitivity to the accident that happened in 1200 s.The speed data after 1200 s was lower than that before the accident point.However, the distribution patterns in the other groups differed from each other.In groups "B" (300 m) and "D" (600 m), the speed data slightly decreased after the accident, while those in groups "A" (200 m) and "C" (400 m) showed no obvious change.Thus, speed should not be selected as the input data.

Front Distance.
The front distance data were collected from the same abovementioned points, in a similar manner.The scatter plot used to observe the front distance distribution before and after 1200 s was also made, in which the horizontal axis represents the time series (s) and the vertical axis represents the front distance (s). Figure 4 illustrates the scatter plot.
In Figure 4, the front distance data in all the groups showed no obvious change before and after 1200 s, illustrating that the front distance should not also be selected as the input data.

Vehicle Group Time
Interval.An interesting phenomenon was discovered during the experiment.The traffic flow in the rural road was uneven.The vehicles that traveled there tended to show up in groups (i.e., several vehicles consisted of a group or a single vehicle that traveled freely).Therefore, we treated a group as a single unit, and the time interval between each unit was called vehicle group time interval (VGTI).A hypothesis should be made to more intuitively study the VGTI.The "spring" would be compressed if the traffic flow was seen as a "spring" and when the accident happened.In other words, the VGTI between two specific units will continuously decrease upstream after the accident happens.The data recorded in three different monitoring points ("O," "B," and "D," which will cover the whole monitoring area) were picked; then single vehicles were divided into vehicle groups.For a further analysis, 1, 2, and 3 were set as the VGTI in points "D," "B," and "O," respectively.Accordingly, we set 1 = 2 − 1, 2 = 3 − 2.According to the abovementioned content, both 1 and 2 will be larger than if the accident happened.Two scatter plots were made to observe the VGTI distribution before and after the accident.The horizontal axis represents 1 (s), while the vertical axis represents 2 (s). Figure 5 shows the scatter plot.Figure 5(a) depicts that the distribution of the points in all quadrants was relatively even before the accident happened.However, after the accident, the points were much more concentrated in the 1st quadrant, which indicated an obvious decrease of the VGTI (Figure 5(b)).Although the VGTI parameter had a significant sensitivity to the accident, the data could not be directly used because the single group (one round experiment) consisted of many VGTIs.The circumstance of 1 > 0 and 2 > 0 was described as a reverse order to reflect the overall changing character of the VGTI in a single group.The data of the reverse order ratio (ROR), which is the ratio of the reverse order in a single group, before and after the accident, was selected to be the input data and described in detail in Section 3.

Free Driving Ratio.
The hypothesis that the settlement of the accident will affect the ratio of a free driving vehicle should be made based on the observation during the experiment process.In the data set of a single experiment, 5 s of the time interval between two specific vehicles was defined as the boundary of free driving [19], and the data of free driving ratio (FDR, before and after the accident) was calculated.A scatter plot was made to observe the distribution of the FDR before and after the accident.The horizontal axis represents  the data group order (s), while the vertical axis represents the FDR in all the monitoring points.Figure 6 presents the scatter plot.
After the accident happened, the FDR data in the monitoring range of 0-400 m obtained a lower value in nearly all of the data groups, indicating that the FDR parameter had an obvious sensitivity to the accident; thus, it could be selected as the input data.Furthermore, the FDR data collected in monitoring point "D" (600 m) showed an irregular change, implying that the boundary of the accident influence sphere was between 400 and 600 m.

SVM-Based AID Algorithm.
The mentioning machine learning method, SVM, was used herein.The accident detection using SVM can be seen as a linear separable problem, and the training set  can be defined as follows [22]: In (1),   ∈  =   ,   ∈  = {+1, −1},  = 1, . . ., .The hyperplane described below could be found in the dimensional Euclidean space   : The parameter pair (, ) is described in (3), while the decision function is shown in (4): According to the form and the necessary and sufficient condition of a standard hyperplane, the abovementioned problem could be converted to an optimization problem combined with the maximum spacing principle, shown in ( 5) and ( 6): To approximate the linear separable problem, the relaxation variable   ≥ 0 ( = 1, . . ., ) and penalty parameter  > 0 could be introduced to soften the restrictions and provided a penalty to the situation which takes a significant large   in the objective function.Therefore, ( 5) and ( 6) could be converted to (7) ≥ 0,  = 1, . . ., .
Combined with dual theory, the optimization problem could be seen as the following dual problem: Let us assume that  * = ( * 1 , . . .,  *  ) is an arbitrary solution to the dual problem, and an arbitrary solution ( * ,  * ,  * ) of ( 5) could be obtained using the linear support vector machine.A kernel function (  ,   ) which could be used to create the linear mapping was introduced in (9).A different kernel function (linear kernel function, polynomial kernel function, and radial basis kernel function, as well as sigmoid kernel function) will create a different support vector machine.The general form of the decision function is described as follows: All of the four kernel functions were applied to detect the accident, and the classification result of each kernel function is contrasted, to find the optimal algorithm.

Results
As mentioned in the previous content, the ROR and FDR parameters showed a significant sensitivity to the accident.Therefore, the traffic state feature vector (TSFV) was built using the data of ROR and FDR, consisting of 132 data sets (number, FDR, ROR, and State, in which accident = 1, normal = 2), shown in Table 2. Data sets 1-55 and 67-120 were used to form the training set attribute matrix, while data sets 56-66 and 121-132 were used to form the testing set attribute matrix.
A toolbox called "LIBSVM" was used herein based on the Matlab platform.Different kernel functions were also used to build the accident detection algorithm.The original detection accuracy rate was calculated by the LIBSVM before the parameters were optimized to obtain the detection with a higher accuracy.Table 3 shows the results.
According to the data shown in Table 3, the linear kernel function performed the best in both the aspects of training set accuracy (97.2%) and testing set accuracy (79.2%).However, the detection accuracy still needs to be further improved, and the method of -fold cross validation (K-CV) was also used.The stable setting type C-support vector classification (C-SVC) was used in building the SVM-based detection algorithm.Factor "" was an important parameter in the calculation process.The other important factor "" was the gamma parameter function setting in kernel function.We set the values of "" and "" in certain ranges.To the specific "" and "," the training data set was seen as the original data set.The detection accuracy rate of this group of "" and "" was obtained using the K-CV method.Finally, the best group of "" and "" was the group that performed the best detection accuracy.Figure 7 shows the result of the parameter optimization.The best values of "" and "" were  = 2 and  = 0.5, respectively.The accuracy under this condition was 98.15% (training data set), while that of the testing data set was

Figure 7 :
Figure 7: Parameter optimization result and detection rate result.

Table 1 :
Basic information of experiment road sections.

Table 2 :
Traffic state feature vector.