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

Authors: Xingliang Liu; Jinliang Xu; Menghui Li; Jia Peng
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

Traditional automatic incident detection methods such as artificial neural networks, backpropagation neural network, and Markov 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 andk-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.


---

## Body

## 1. 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 real-time 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: Section2 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.


## 2. Materials and Methods

### 2.1. 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.Table 1
Basic information of experiment road sections.
Number Stakes Average speed (km/h) AADT (pcu/D) Volume (veh/h) Capacity (veh/h) G227 K17+200-K17+720 62 4720 576 1400 G227 K25+500-K26+100 62 4720 553 1400 S107 K109+400-K109+950 67 4100 476 1400Figure 1
Experiment road sections.
(a)
Experiment section in G227 (b)
Experiment section in S107The 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. Figure2 shows the implementation process.Figure 2
Experiment implementation process.In Figure2, 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).


### 2.2. 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 Figure3.Figure 3
Speed-time series scatter plot.As shown in Figure3, 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.


#### 2.2.2. 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). Figure4 illustrates the scatter plot.Figure 4
Front distance-time series scatter plot.In Figure4, 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.


#### 2.2.3. 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,T1, T2, and T3 were set as the VGTI in points “D,” “B,” and “O,” respectively. Accordingly, we set δ1=T2-T1, δ2=T3-T2. According to the abovementioned content, both δ1 and δ2 will be larger than 0 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
δ1-δ2 scatter plots (before and after the accident).
(a)
Before the accident (b)
After the accidentFigure5(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.


#### 2.2.4. 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.Figure 6
FDR-group order 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.


### 2.3. 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 setT can be defined as follows [22]:(1)T=x1,y1,…,xl,yl∈X∗Yl.In (1), xi∈X=Rn,yi∈Y=+1,-1,i=1,…,l. The hyperplane described below could be found in the n-dimensional Euclidean space Rn:(2)x∈Rn∣w·x+b=0,w∈Rn,b∈R.The parameter pair(w,b) is described in (3), while the decision function is shown in (4):(3)yi=sgnw·xi+b,i=1,…,l,(4)fx=sgnw·x+b.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):(5)minw,bτw=12w2,(6)s.t.yiw·xi+b≥1,i=1,…,l.To approximate the linear separable problem, the relaxation variableξi≥0(i=1,…,l) and penalty parameter C>0 could be introduced to soften the restrictions and provided a penalty to the situation which takes a significant large ξi in the objective function. Therefore, (5) and (6) could be converted to (7) as follows:(7)minw,b,ξ12w2+C∑i=1lξi,s.t.yiw·xi+b≥1-ξi,i=1,…,l,(8)ξi≥0,i=1,…,l.Combined with dual theory, the optimization problem could be seen as the following dual problem:(9)mina12∑i=1l∑j=1lyiyjαiαjxi·xj-∑j=1lαj,(10)s.t.∑i=1lyiαi=0,(11)0≤αi≤C,i=1,…,l.Let us assume thatα∗=(α1∗,…,αi∗)T is an arbitrary solution to the dual problem, and an arbitrary solution w∗,b∗,ξ∗ of (5) could be obtained using the linear support vector machine. A kernel functionK(xi,xj) 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:(12)fx=sgn∑i=1lαi∗yiKxi,xj+b∗.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.


## 2.1. 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.Table 1
Basic information of experiment road sections.
Number Stakes Average speed (km/h) AADT (pcu/D) Volume (veh/h) Capacity (veh/h) G227 K17+200-K17+720 62 4720 576 1400 G227 K25+500-K26+100 62 4720 553 1400 S107 K109+400-K109+950 67 4100 476 1400Figure 1
Experiment road sections.
(a)
Experiment section in G227 (b)
Experiment section in S107The 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. Figure2 shows the implementation process.Figure 2
Experiment implementation process.In Figure2, 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).


## 2.2. 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 Figure3.Figure 3
Speed-time series scatter plot.As shown in Figure3, 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.


### 2.2.2. 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). Figure4 illustrates the scatter plot.Figure 4
Front distance-time series scatter plot.In Figure4, 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.


### 2.2.3. 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,T1, T2, and T3 were set as the VGTI in points “D,” “B,” and “O,” respectively. Accordingly, we set δ1=T2-T1, δ2=T3-T2. According to the abovementioned content, both δ1 and δ2 will be larger than 0 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
δ1-δ2 scatter plots (before and after the accident).
(a)
Before the accident (b)
After the accidentFigure5(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.


### 2.2.4. 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.Figure 6
FDR-group order 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.


## 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 Figure3.Figure 3
Speed-time series scatter plot.As shown in Figure3, 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.


## 2.2.2. 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). Figure4 illustrates the scatter plot.Figure 4
Front distance-time series scatter plot.In Figure4, 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.


## 2.2.3. 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,T1, T2, and T3 were set as the VGTI in points “D,” “B,” and “O,” respectively. Accordingly, we set δ1=T2-T1, δ2=T3-T2. According to the abovementioned content, both δ1 and δ2 will be larger than 0 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
δ1-δ2 scatter plots (before and after the accident).
(a)
Before the accident (b)
After the accidentFigure5(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.


## 2.2.4. 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.Figure 6
FDR-group order 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.


## 2.3. 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 setT can be defined as follows [22]:(1)T=x1,y1,…,xl,yl∈X∗Yl.In (1), xi∈X=Rn,yi∈Y=+1,-1,i=1,…,l. The hyperplane described below could be found in the n-dimensional Euclidean space Rn:(2)x∈Rn∣w·x+b=0,w∈Rn,b∈R.The parameter pair(w,b) is described in (3), while the decision function is shown in (4):(3)yi=sgnw·xi+b,i=1,…,l,(4)fx=sgnw·x+b.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):(5)minw,bτw=12w2,(6)s.t.yiw·xi+b≥1,i=1,…,l.To approximate the linear separable problem, the relaxation variableξi≥0(i=1,…,l) and penalty parameter C>0 could be introduced to soften the restrictions and provided a penalty to the situation which takes a significant large ξi in the objective function. Therefore, (5) and (6) could be converted to (7) as follows:(7)minw,b,ξ12w2+C∑i=1lξi,s.t.yiw·xi+b≥1-ξi,i=1,…,l,(8)ξi≥0,i=1,…,l.Combined with dual theory, the optimization problem could be seen as the following dual problem:(9)mina12∑i=1l∑j=1lyiyjαiαjxi·xj-∑j=1lαj,(10)s.t.∑i=1lyiαi=0,(11)0≤αi≤C,i=1,…,l.Let us assume thatα∗=(α1∗,…,αi∗)T is an arbitrary solution to the dual problem, and an arbitrary solution w∗,b∗,ξ∗ of (5) could be obtained using the linear support vector machine. A kernel functionK(xi,xj) 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:(12)fx=sgn∑i=1lαi∗yiKxi,xj+b∗.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.


## 3. 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 Table2. 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.Table 2
Traffic state feature vector.
Number FDR ROR State Number FDR ROR State 1 0.20 0.41 2 67 0.48 0.17 1 2 0.19 0.41 2 68 0.48 0.18 1 3 0.21 0.41 2 69 0.48 0.19 1 4 0.24 0.40 2 70 0.69 0.20 1 5 0.31 0.40 2 71 0.69 0.23 1 6 0.29 0.40 2 72 0.69 0.23 1 7 0.28 0.23 2 73 0.65 0.22 1 8 0.31 0.23 2 74 0.65 0.30 1 9 0.26 0.23 2 75 0.65 0.26 1 10 0.24 0.23 2 76 0.69 0.17 1 11 0.28 0.23 2 77 0.69 0.23 1 12 0.25 0.23 2 78 0.69 0.19 1 13 0.30 0.32 2 79 0.67 0.21 1 14 0.25 0.32 2 80 0.67 0.26 1 15 0.28 0.32 2 81 0.67 0.23 1 16 0.27 0.31 2 82 0.68 0.21 1 17 0.25 0.31 2 83 0.68 0.18 1 18 0.24 0.31 2 84 0.68 0.21 1 19 0.49 0.31 2 85 0.70 0.30 1 20 0.39 0.31 2 86 0.70 0.29 1 21 0.44 0.31 2 87 0.70 0.33 1 22 0.38 0.31 2 88 0.62 0.37 1 23 0.37 0.31 2 89 0.62 0.36 1 24 0.37 0.31 2 90 0.62 0.33 1 25 0.45 0.32 2 91 0.67 0.37 1 26 0.35 0.32 2 92 0.67 0.34 1 27 0.47 0.32 2 93 0.67 0.30 1 28 0.31 0.35 2 94 0.57 0.22 1 29 0.25 0.35 2 95 0.57 0.24 1 30 0.28 0.35 2 96 0.57 0.19 1 31 0.29 0.30 2 97 0.59 0.22 1 32 0.30 0.30 2 98 0.59 0.24 1 33 0.29 0.30 2 99 0.59 0.19 1 34 0.36 0.27 2 100 0.68 0.26 1 35 0.40 0.27 2 101 0.68 0.33 1 36 0.40 0.27 2 102 0.68 0.34 1 37 0.47 0.30 2 103 0.55 0.45 1 38 0.41 0.30 2 104 0.55 0.37 1 39 0.42 0.30 2 105 0.55 0.32 1 40 0.50 0.45 2 106 0.52 0.32 1 41 0.38 0.45 2 107 0.52 0.35 1 42 0.52 0.45 2 108 0.52 0.42 1 43 0.41 0.48 2 109 0.58 0.35 1 44 0.37 0.48 2 110 0.58 0.33 1 45 0.34 0.48 2 111 0.58 0.31 1 46 0.45 0.37 2 112 0.62 0.37 1 47 0.41 0.37 2 113 0.62 0.28 1 48 0.38 0.37 2 114 0.62 0.31 1 49 0.40 0.38 2 115 0.47 0.37 1 50 0.43 0.38 2 116 0.47 0.39 1 51 0.39 0.38 2 117 0.47 0.33 1 52 0.28 0.30 2 118 0.59 0.22 1 53 0.33 0.30 2 119 0.59 0.27 1 54 0.37 0.30 2 120 0.59 0.32 1 55 0.37 0.30 2 121 0.59 0.28 1 56 0.34 0.30 2 122 0.59 0.29 1 57 0.33 0.30 2 123 0.59 0.28 1 58 0.32 0.27 2 124 0.46 0.24 1 59 0.31 0.27 2 125 0.46 0.25 1 60 0.36 0.27 2 126 0.46 0.24 1 61 0.35 0.25 2 127 0.45 0.30 1 62 0.34 0.25 2 128 0.45 0.30 1 63 0.32 0.25 2 129 0.45 0.27 1 64 0.38 0.37 2 130 0.55 0.30 1 65 0.36 0.37 2 131 0.55 0.32 1 66 0.34 0.37 2 132 0.55 0.27 1A 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. Table3 shows the results.Table 3
Original detection accuracy rate.
Original detection accuracy rate Linear Polynomial Radial Sigmoid Training set accuracy (%) 97.2 88.0 95.4 93.5 Testing set accuracy (%) 79.2 62.5 75.0 66.7According to the data shown in Table3, 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 k-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 “c” was an important parameter in the calculation process. The other important factor “g” was the gamma parameter function setting in kernel function. We set the values of “c” and “g” in certain ranges. To the specific “c” and “g,” the training data set was seen as the original data set. The detection accuracy rate of this group of “c” and “g” was obtained using the K-CV method. Finally, the best group of “c” and “g” was the group that performed the best detection accuracy. Figure 7 shows the result of the parameter optimization. The best values of “c” and “g” were c=2 and g=0.5, respectively. The accuracy under this condition was 98.15% (training data set), while that of the testing data set was 87.5%. The accident detection result was improved compared to the original accident detection accuracy rate (training set accuracy = 97.2% and testing set accuracy = 79.2%).Figure 7
Parameter optimization result and detection rate result.
(a)
Three-dimensional version (b)
Contour line version


## 4. Discussion

The AID technology is needed to address problems such as traffic congestions, bottlenecks, and incidents, because of the environment characters of China’s rural roads (i.e., lack of monitoring facilities, relatively high accident rate, and low reaction speed). Traditional algorithms (e.g., artificial neural networks, BP neural network, and Markov chains) are not suitable for the traffic feature of the relatively low traffic volume in rural roads. In this study, the machine learning method (SVM) and parameter sensitivity analysis were applied to build the accident detection algorithm in rural roads with a low traffic volume using real-time data collected in the field experiment. The sensitivity of the four traffic flow parameters, speed (S), front distance (FD), vehicle group time interval (VGTI), and free driving ratio (FDR), to the accident was analyzed. Furthermore, the FDR and the ROR (derived from the VGTI) were chosen to form the TSFV because of their significant sensitivity. The accident detection algorithm was built using SVM and K-CV parameter optimization method, which showed an excellent performance in the detection accuracy (98.15% of the training data set and 87.5% of the testing data set).The AID algorithm based on the SVM built herein could be used in the circumstance of a rural road with a relatively low traffic volume. The efficiency of the algorithm was proven herein. Therefore, the problem of low incident reaction speed in rural roads could be solved to some extent. However, some points remain to be further studied. Hence, future research will focus on specific types and characteristics of incidents. The time-space effect will also be studied.



---

*Source: 9583285-2018-04-22.xml*