ROAD TRAFFIC FLOW FOREWARNING AND CONTROL MODEL WITH THE SLOPE OF THE CHANGE RATE

Preliminary communication Real-time, accurate and efficiency short term traffic flow prediction is one of the key technologies to realize traffic flow guidance and traffic control, which has been widely concerned in the domain of ITS (Intelligent Transport System) during recent years. Through the study of the existing traffic flow prediction model, road traffic flow control model with the slope of the change rate is proposed. The model can find out abnormal point from the traffic flow time series by the use of the slope change rate, and it can analyse this trend of traffic flow changes for control purposes of traffic flow. The achieved results indicate that the algorithm is suitable for road traffic flow peak control problem and could be effective for road traffic flow control.


Introduction
Traffic jams in urban areas have attracted widespread attention in a global context, with the development of socio-economic and transport industry [1,2].Particularly in China, car ownership has reached millions of vehicles [3], but the Chinese road construction now falls behind development of the automotive industry.Traffic congestion has become a widespread social phenomenon in Beijing, Shanghai, Guangzhou and other cities, and naturally it has become people's focus.
To some extent, traffic congestion has become an important problem in economic development and social stability, however, limited land and restricted economic and other factors fail to achieve relatively satisfactory road construction mileage [4,5].Therefore, the use of modern information technology and data analysis techniques to improve transportation efficiency and the traffic capacity of the road network is necessary and it has become the way to solve the road congestion in terms of the existing conditions.
At present, the research on traffic flow prediction methods is mainly focused on the traditional methods based on statistical theory, the method based on neural network, the method based on nonlinear theory and the method based on combined algorithm [6].Traditional theoretical predictions include: the historical average model, regression analysis, time series models, Kalman filter model and Markov etc. [7].However, these methods model is relatively simple, and the prediction accuracy is poor, although it can solve the problem of changing the traffic flow at different times, it is a poor deal for unexpected traffic flow and other special circumstances.Artificial neural network technology was born in the 1940s, and it was used for long-term traffic flow prediction by Chin in 1992, Dougherly and Clark, who respectively used neural network technology for shortterm traffic flow forecasting in 1993 and 1994 [8].The emergence of neural network algorithm got rid of the trouble to establish a precise mathematical model for the study of work, which opened up a new way of thinking.However, the accurate prediction of neural networks is based on a large number of historical training or unknown data, the amount of data train and the length of training time, which determines the accuracy of the model prediction.Therefore, if it is predicted to no historical data, there will be a big predictive error.Nonlinear prediction mainly in chaos theory [9,10], dissipative structure theory, self-organization theory and other theories as theoretical foundation, uses the concept of chaotic attractor, fractal concept phase space reconstruction methods to build predictive models.However, this model includes many parameters, and is not easy to determine.Thus, it makes nonlinear algorithms in prediction accurate so that it is not easy to control and reduce the usefulness of the nonlinear algorithm.Combined algorithm is based on the advantages of various algorithms [11,12], which takes complementary advantages principle and combines the advantages of different algorithms, and makes up for the lack of a single algorithm, leading the wide application of the type of prediction algorithm.However, this embodiment is relatively complex to structure of the algorithm, and the algorithm is more difficult to fuse in practical application, which means there are still many problems.
Using traffic data to predict traffic patterns, as a research direction, is studied by a lot of scholars.The given traffic prediction models become inaccurate under sensor malfunction or noise-contaminated data for a certain period of time in part of a transportation network.This problem frequently occurs in transportation networks Technical Gazette 24, Suppl.1(2017), 185-191 [13÷15].Many studies address the issue of traffic prediction with partially missing traffic data.For instance, van Lint et al. [23] presented a neural network for travel time prediction under missing traffic data.Sun et al. [16,17] introduced a Bayesian method to forecast traffic flows where a certain period of historical data is missing for some links of the transportation network.The missing portion of historical traffic data is approximated by using a Gaussian mixture model.Moreover, other statistical and probabilistic methods are used to address the missing traffic data problems [18÷22].Therefore, the problem of short-term traffic flow prediction based on completely unavailable traffic data in some links due to lack of sensors in the network is an open challenging problem.
In this paper, traffic flow prediction model with abnormal data mining algorithm has been proposed in current research methods.Based on the linear slope, model algorithm makes use of the slope calculation principle and the technology of data mining.To find out the abnormal data in traffic flow, it uses these abnormal points as traffic forewarning basis, helps the traffic management departments to make reasonable decision, guides the car pass smoothly, and avoids congestion phenomenon.
The rest of this paper is organized as follows: Section 2 describes the overall structure of early forewarning model based on data mining technology.Section 3 presents abnormal data mining algorithms based on the slope calculation principles, as well as early forewarning processing approach.Section 4 introduces algorithm simulation and prediction processing simulation by the use of real data.Section 5 summarizes the paper and outlines the application of the model algorithm.

Mode descriptions
In order to realize the traffic flow prediction, predict the road traffic conditions, make reasonable traffic guidance and avoid the occurrence of traffic jams, the early forewarning control model of traffic is presented.Realization diagram of the model is as follows in Fig. 1.

Detection and collection of road traffic flow
The forewarning effect to sources of traffic data in traffic flow forewarning will be determined.Therefore in this paper, which uses traffic flow detector acquisition technology based on microwave detector RTMS (Remote Traffic Microwave Sensor) [7], it can achieve traffic flow data collection.
As can be seen from Fig. 2, this road is a crossroads.Detector is placed in the four corners of the road, two detectors separated by 150 meters on each road.Within the prescribed time, the collection data are detected by the two detectors on each road.The collected data according to S i (d i , t i ) for storage, where S i is the acquisition time sequence group in i roads and i time, d i denotes the road occupancy rate, t i is collection point in time.

Traffic flow data processing
Time series of traffic flow will be calculated by use of the slope of the principle for abnormal data mining.With the abnormal points from the abnormal data analysed, it can determine the road traffic situation which will be changed.From the analysis of results, this change will be sent to confident control department.Traffic management departments will use the relevant processing mode, such as traffic electronic screen guidance, traffic broadcast, and traffic grooming.These ways will be used to change the route and prevent traffic jams (Fig. 3).Given three consecutive points with s i-1 and s i and s i+1 in traffic flow series times, their axes are (x i-1 , y i-1 ) and (x i , y i ) and (x i+1 , y i+1 ) in the coordinate axes, k i is the slope the straight line s i-1 s i , k i+1 is the slope the straight line s i-1 s i .The following four cases will be discussed, because the two straight lines which can be constructed by three consecutive points have different direction.
According to the principle of slope, K i >0 and K i+1 >0, as can be seen from Fig. 4(a).Two lines have the same directions, and their directions are upward and rightward.Case 2: If x i-1 <x i , y i-1 >y i and x i <x i+1 , y i >y i+1 , the establishment of the formula (2): 0. 0, According to the principle of slope, K i <0 and K i+1 <0, as can be seen from Fig. 4(b).Two lines have the same directions, and their directions are up down and rightward.
According to the principle of slope, K i >0 and K i+1 <0, as can be seen from Fig. 5(a), lines S i-1 S i direction is upward and rightward, lines S i S i+1 direction is up down and rightward.Case 4: If x i-1 <x i , y i-1 >y i and x i <x i+1 , y i <y i+1 , the establishment of the formula (4): 0. 0, According to the principle of slope, K i <0 and K i+1 >0, as can be seen from Fig. 5(b), lines S i-1 S i direction is up down and rightward, lines S i S i+1 direction is upward and rightward.
Corollary 3.1 is proved: (1) Assuming the two lines have different direction, and meet the following requirements x i-1 < x i , y i-1 < y i and x i <x i+1 , y i >y i+1 .Let S' i+1 and S" i+1 be two points in coordinate axis, their coordinates are (x' i+1 , y' i+1 ) and (x" i+1 , y" i+1 ), and meet the following requirements x i+1 = x' i+1 = x" i+1 > x i , y i+1 > y' i+1 > y" i+1 > y i .As can be seen from Fig. 6(a), the line slope of S i S i+1 and S i S' i+1 and S i S" i+1 can be given: ., , According to the case 3 and the slope theory, there are the following relations .
As can be seen from formula (6), the slope change rate of S i S i+1 and S i-1 S i is larger than the other slope change rate.Setting the threshold is m 1 in the slope change rate, if the slope change rate is bigger than m 1 , there is abnormal data, and s i is considered abnormal point.
(2) Assuming the two lines have different direction, and meeting the following requirements x i-1 < x i , y i-1 > y i and x i < x i+1 , y i < y i+1 .Let S' i+1 and S" i+1 be two points in coordinate axis ， their coordinates are (x' i+1 , y' i+1 ) and (x" i+1 , y" i+1 ), and meet the following requirements x i+1 = x' i+1 = x" i+1 > x i , y i+1 > y' i+1 > y" i+1 > y i , As can be seen from Fig. 6(b), the line slope of S i S i+1 and S i S' i+1 and S i S" i+1 can be given: ., , According to the case 4 and the slope theory, there are the following relations .
As can be seen from formula (8), the slope change rate of S i S i+1 and S i-1 S i is larger than the other slope change rate.Setting the threshold is m 1 in the slope change rate, if the slope change rate is bigger than m 1 , there is abnormal data, and s i is considered abnormal point.
Corollary 3.2 is proved: (1) The two lines have the same direction, and meet the following requirements x i-1 <x i , y i-1 <y i and x i <x i+1 , y i <y i+1 .Let S' i+1 and S" i+1 are two points in coordinate axis, their coordinates are (x' i+1 , y' i+1 ) and (x" i+1 , y" i+1 ), and meet the following requirements x i+1 = x' i+1 = x" i+1 >x i , y i+1 > y' i+1 >y" i+1 >y i .As can be seen from Fig. 7(a), the line slope of S i S i+1 and S i S' i+1 and S i S" i+1 can be given: ., , According to the case 3 and the slope theory, there are the following relations .
As can be seen from formula (10), the slope change rate of S i S i+1 and S i-1 S i is larger than the other slope change rate.Setting the threshold is m 2 in the slope change rate, if the slope change rate is bigger than m 2 , there is abnormal data, and s i is considered abnormal point.
(2) Assuming the two lines have the same direction, and meeting the following requirements x i-1 <x i , y i-1 >y i and x i <x i+1 , y i >y i+1 .Let S' i+1 and S" i+1 be two points in coordinate axis ， their coordinates are (x' i+1 , y' i+1 ) and (x" i+1 , y" i+1 ), and meet the following requirements x i+1 = x' i+1 =x i+1 >x i , y i+1 <y' i+1 <y" i+1 <y i .As can be seen from Fig. 7(b), the line slope of S i S i+1 and S i S' i+1 and S i S" i+1 can be given: ., , According to the case 4 and the slope theory, there are the following relations .
As can be seen from formula (12), the slope change rate of S i S i+1 and S i-1 S i is larger than the other slope change rate.Setting the threshold to m 2 in the slope change rate, if the slope change rate is bigger than m 2 , there is abnormal data, and s i is considered abnormal point.

Algorithm and program of traffic flow abnormal data mining
According to the above principle, the traffic flow sets S={S 1 , S 2 ,…, S n } and the slope sets K={K 1 , K 2 ,…, K n } can be calculated and decided as follows.Where S 1 =(d 1 , t 1 ), S 2 =(d 2 , t 2 ), S n =(d n , t n ), S n is data point, d n is traffic flow value, t n is a collection point in time, K n is a slope of linear which can be constructed by two continuous points. ( , there is abnormal data, and s i is considered as an abnormal point, this abnormal point s i means traffic flows continue to show signs of improvement. ( , there is abnormal data, and s i is considered as an abnormal point, this abnormal point s i means traffic flow continues to show signs of decrease. ( there is an abnormal data, and s i is considered as an abnormal point, this abnormal point s i means the traffic lights have changed from large to small.( there is an abnormal data, and s i is considered as an abnormal point, this abnormal point s i means the traffic lights have changed from small to large.
In order to achieve the exception processing of traffic flow and set array SN 1 as an abnormal storage point of traffic flow which include these continuous points to rise or change from small to large, set array SN 2 as an abnormal storage points of traffic flow and include these points of continuous to falling or from large to small.

Outlier identification and early forewarning
Array SN 1 and SN 2 is analysed, to determine the current road conditions.According to the result of processing, the traffic administration can decide with the abnormal points processing results to realize traffic flow data processing and prove experiment simulation testing results, there is an assuming condition that these measures can be effectively reduced by 30 % in large traffic flow, these measures include light time changes and the traffic police guidance and electronic screen guidance and traffic radio guidance.

Experimental emulation
In order to demonstrate the effectiveness of the algorithm model, this model used traffic data from the university of Minnesota Duluth (http://www.d.jumn.edu/tdrl/index.htm).Their traffic data research laboratory depends on the traffic management canter of Minnesota, and by more than 5000 toroidal coil detectors to collect all the year round, and the data stored in the "traffic."format.This article downloaded data from http://www.d.jumn.edu/tdrl/traffic/, and we used the software extracted data for analysis, and obtained the traffic flow data.We adopted data on October 1, 2013, on September 20, on September 4, stimulated by the MATLAB software.The computer used was Pentium (R) Dual -core CPUE5300 2.6 GHZ, 1.98 GB of memory.The experiment was stimulated by R2007b MATLAB software.As can be seen from Fig. 8, on October 1st, September 20, September 4, road traffic flow was small at 0:00-7:00 PM and 18:00-24:00 PM, and it shows that the capacity of road is good.At 11:00-16:00, traffic reached the peak, road traffic flow was larger.In this period of time, the road traffic flow is high, the capacity of road is poor, and it is easy to cause the road congestion.
To test and verify the feasibility of the algorithm, traffic flow time series are processed by using the slope gradient algorithm principle of time series and different slope gradient thresholds.As can be seen from Fig. 9(a) and Fig. 9(b), the early forewarning and control effect of traffic flow time series depends on the threshold; if the threshold is large, the forewarning and control effect is better at rush hour.If the threshold is small, the forewarning and controlling effect is worse at rush hour.But if the threshold is set too high, traffic flow control effect will decline, the reason is abnormal data points of the traffic flow time series were difficult to find by using the principle of the slope change rate, and unable to realize the early forewarning and controlling of traffic flow.As you can see from Fig. 9(c), for the low traffic flow on 1 October peak, forewarning threshold set at a small traffic flow control effect is better than the threshold value set.This algorithm is suitable for the peak forewarning and control of traffic flow in the threshold setting is opposite bigger, to the low peak forewarning Technical Gazette 24, Suppl.1(2017), [185][186][187][188][189][190][191] and control of traffic flow in the threshold value set is relatively small.As can be seen from Fig. 9(c), for traffic flow peak is low on 1 October, forewarning threshold is set small to control the effect of traffic flow better than the threshold value is set large.This means this algorithm is suitable for the large traffic flow peak, so if the early traffic flow peak is large, the threshold should be set large, the forewarning and control effect of traffic flows is better.If the early traffic flow peak is small, the threshold should be set small, the forewarning and control effect of traffic flow is better.
In short, the advantages of this algorithm do not rely on historical data and the size of the data, these data can be real-time collection, real-time processing and real-time analysis, this algorithm reduces the complexity of road traffic flow control.

Conclusions
Because time series data are massive and complex, storage and computation cost a high price, and if the data mining directly on the time series these may affect the accuracy and reliability of the algorithm.This paper draws on the basic theory of analytic geometry in slope, and combines the slope of the line segment with the characteristics of time series, the linear slope change of adjacent data points on the time axis is used to analyse the abnormal points in the traffic flow, so take the control measures to avoid road congestion.
According to the experimental test, we get some conclusions: (1) Traffic reaches the peak, threshold is set large better than threshold is set small -it can effectively reduce the traffic flow and avoid road congestion.However, if the threshold setting is too large, the control effect of traffic flow will be decreased.
(2) Traffic reaches a low peak, threshold is set small better then threshold is set large -it can effectively reduce the traffic flow and avoid road congestion.However, if the threshold setting is too small, traffic flow control is difficult to achieve.
The algorithm is feasible in traffic flow abnormal data mining, but it can be seen from this paper, algorithm of the key is set the threshold.The threshold value determines the accuracy of the prediction and control, it will be discussed in the subsequent paper.

Figure 1
Figure 1 Processing model of traffic flow based on abnormal data mining

Figure 2
Figure 2 Schematic of traffic flow data collection

Figure 4
Figure 4The two straight lines have the same direction Case 1: If x i-1 <x i , y i-1 <y i and x i <x i+1 , y i <y i+1 , the establishment of the formula (1):

Figure 5
Figure 5 The two straight lines have different direction Case 3: If x i-1 <x i , y i-1 <y i and x i <x i+1 , y i >y i+1 , the establishment of the formula (3):

Figure 6
Figure 6 Abnormal point between different direction of the line

Figure 7
Figure 7 Abnormal point between the different direction of the line

Figure 8
Traffic flow: a) Traffic flow on October 1, b) Traffic flow on September 20, c) Traffic flow on September 4.

Figure 9
Different slope gradient thresholds of road traffic stream processing: a) Traffic flow process on October 1st, b) Traffic flow process September 20, c) Traffic flow process September 4.