A NEURAL NETWORK BASED TRAFFIC-FLOW PREDICTION MODEL

- Prediction of traffic-flow in Istanbul has been a great concern for planners of the city. Istanbul as being one of the most crowded cities in the Europe has a rural population of more than 10 million. The related transportation agencies in Istanbul continuously collect data through many ways thanks to improvements in sensor technology and communication systems which allow to more closely monitor the condition of the city transportation system. Since monitoring alone cannot improve the safety or efficiency of the system, those agencies actively inform the drivers continuously through various media including television broadcasts, internet, and electronic display boards on many locations on the roads. Currently, the human expertise is employed to judge traffic-flow on the roads to inform the public. There is no reliance on past data and human experts give opinions only on the present condition without much idea on what will be the likely events in the next hours. Historical events such as school-timings, holidays and other periodic events cannot be utilized for judging the future traffic-flows. This paper makes a preliminary attempt to change scenario by using artificial neural networks (ANNs) to model the past historical data. It aims at the prediction of the traffic volume based on the historical data in each major junction in the city. ANNs have given very encouraging results with the suggested approach explained in the paper.


INTRODUCTION
Traffic in Istanbul has been increasingly a major concern for anyone involved in planning the facilities.Istanbul's rich heritage of two Empires, bridging two continents, having local and international transportation together, being center of international connections, center of historical, cultural and commercial activities, primary center of industry and economic core with an urban population of more than 10 million people require planners to collect and manage data on 24/7 basis.Traffic-flow problem is becoming worse everyday with the introduction of new vehicles into the city every year with the highest share among the Turkish cities.As an example, the number of registered vehicles in Istanbul was declared as the highest with 2,292,000 in November 2008 according to State Statistics Organization (TÜĐK).Istanbul has also the highest percentage with 31.4 % in Turkey with the newly registered vehicles between January-November 2006 [1]. Figure 1 shows the trend regarding the registered vehicles in Turkey.
Planning and control operations for transportation are managed under the umbrella of Istanbul Greater City Transportation Agency with several organizations each responsible for different aspects of transportation.Predicting the traffic population density in major locations plays a very important role in directing the daily traffic among different locations.Therefore, digital displays are located in major locations including the entrances of two intercontinental bridges connecting Asia and Europe to inform and make the drivers shift their directions towards less traffic flow areas.The main local council has an office for traffic surveillance of 180 major locations live on the cameras (in year 2007) and other sensor technologies used for transportation engineering [2].They continuously survey the traffic in those major locations and inform local media and the live results are published also on internet for drivers to select the best route in their daily usages.The live data is analyzed by the human experts and the information in digital displays in major locations of the city is updated manually.This information includes only currently available data and does not tell anything about the near future period of the next hours.In other words, there is no prediction for the future period for any of the locations.Hence, the prediction of traffic volume at major junctions is very important to make short-term (hourly) plans and provide prediction information to users.
This study aims at the prediction of the traffic volume based on the historical data in each major junction in the city.The prediction model is based on artificial neural networks.
Artificial neural networks (ANNs) have been used successfully for solving many engineering problems and more recently in transportation although preliminary evaluation of artificial neural networks in transportation engineering has been performed in early 1900s [3].The ability of ANNs to learn from given examples makes them perfect tools since there is no need to model each individual case mathematically.

Figure 1. Registered Vehicles in Turkey
The real data provided by ISBAK, the responsible semi-government organization for maintaining roads including traffic junctions in Istanbul, was used to model and predict the behavior of traffic volumetric data based on the collected data of day, hour and minutes.The set of data recorded in the intervals of 5 minutes consists of number of vehicles passing through the RTMS 12 at a specified day, hour and minute.The data was collected between 1 st of January, 2006 and 31 st of December, 2006.The prediction model that has been developed may be used in any period of time since the approach converts the timely information into a non-time period format when building the model.ANNs have given very encouraging results with the suggested approach explained in the paper.
Prediction of traffic flow is a major problem in metropolitan cities such as Istanbul.Planning and control operations for transportation are managed under the umbrella of Istanbul Greater City Transportation Agency with several organizations each responsible for different aspects of transportation.Predicting the traffic population density in major locations plays a very important role in directing the daily traffic among different locations.Therefore, digital displays are located in major locations including the entrances of two intercontinental bridges connecting Asia and Europe to inform and make the drivers shift their directions towards less traffic flow areas.The main local council has an office for traffic surveillance of 180 major locations live on the cameras.They continuously survey the traffic in those major locations and inform local media and the live results are published also on internet for drivers to select the best route in their daily usages.The live data is analyzed by the human experts and the information in digital displays in major locations of the city is updated manually.The analysis results of these surveillance operations are not automatic.Furthermore, this information includes only currently available data and does not tell anything about the traffic volume for the near future period of the next hours.In other words, there is no prediction for the future period for any of the locations.Hence, the prediction of traffic volume at major junctions is very important to make short-term plans and provide prediction information to users.
This study aims at the prediction of the traffic volume based on the historical data in each major junction in the city.The prediction model is based on artificial neural networks.
The real data provided by ISBAK was used to model and predict the behavior of traffic volumetric data based on the collected data of day, hour and minutes by using Remote Traffic Microwave Sensors (RTMS) technology.RTMS technology allows the organization to collect the traffic volumetric information by using microwave signals to detect vehicles.The set of data recorded in the intervals of 5 minutes consists of number of vehicles passing through the RTMS 12 (RTMS installed in location 12) at a specified day, hour and minute.The data was collected between 1 st of January, 2006 and 31 st of December, 2006.The number of data collected was 130,701 in the intervals of 5 minutes.The prediction model that has been developed may be used in any period of time since the approach converts the timely information into a non-time period format when building the model.ANNs have given very encouraging results with the suggested approach explained in the paper.
Traffic surveillance is a common technique in collecting the live data in transportation systems for planning and controlling purposes [4].Istanbul city council collects data in many major locations to plan and control the traffic activities.Istanbul is very interesting in the sense that major motorway E5 is included inside the city due to overcrowded population and development.Therefore, the situation is getting worse because of new vehicles coming into traffic (Figure 1).
The traffic control centre has a complex surveillance unit collecting data from video cameras and RTMS devices [5].This centre collects timely information monitoring the 180 major junctions in Istanbul 24 hours a day.The human experts then answer local media's questions for local TV and Radio stations' people with the relevant updated information and suggest the best ways for drivers to help them select their locations.They also update the digital information as 'flows' and 'dense' to inform the drivers via the digital boards to help them shift to their directions.A drawback in this method is that they make their decisions based only on the information from the live cameras.For example, they have no idea for what traffic volume to have in the coming hour.This is very important since one hour time is very critical for drivers.For example, displaying as 'not dense' before entering the way for the second bridge is not very useful since there is one hour delay to arrive at the bridge from this digital board.Once this road is selected by the drivers, it is too late to shift their direction towards other alternatives.The required system should also provide predicted results together with current value.
The main purpose of this study is to investigate the feasibility of applying the ANNs technique to close this important gap in their decision making.The system allows them to inform the drivers for the next coming hour's predicted volume of traffic.ANNs have been used successfully for solving many problems in various field of science via the available data [6][7][8].These include areas ranging from computer vision to business forecasting via the available data.Their ability to learn from given examples makes them more convenient due to lack of requirement for modeling each case.Neural networks are composed of a large number of interconnected units divided into input, output, and hidden nodes.A single processing unit merely sums up the weighted activation on its inputs, transforms this sum according to an activation function, and passes the resulting function to its output.Therefore, in general terms, information processing in neural networks consists of the units transforming their input into some output, which is then modulated by the weights of connections as inputs to other units.Learning in these systems is defined in terms of the total adjustments of the weights continuously so that the network's output tends toward the desired output without involving changes to the structure of the network.Possibility and ease of use in many areas therefore makes ANNs an ideal solution for many problems of science.
In this paper, we predict the number of vehicles passing through an RTMS junction using artificial neural networks.The real data obtained from the Istanbul Traffic Maintenance Department (ISBAK) has been used to model the behavior of volumetric traffic information in one of the major junctions.The set of data recorded every 5 minutes consists of vehicles passing through RTMS 12 together with parameter of date and time information.It covers one-whole-year period, from 1 st of January 2006 to 31 st of December 2006.
The prediction model that has been developed in this paper can be used in any period of time since the approach converts the date-time information to a format independent of date-time.
A software component described in [9] has been utilized to embed ANN functionality into our prediction of traffic volume.Architecture of the component is designed in an object-oriented fashion for the purpose of building such applications easily.
Literature shows that ANNs can be considered for solving many problems including transportation engineering problems [3].The prediction of traffic volume information for RTMS by using ANNs is relatively new; and, the adopted approach reported in this paper is unique as it will be explained in the following sections.

DATA COLLECTION AND STUDY DESIGN
130,701 data sets were collected in this study by the ISBAK.The data included values of date-time, and number of vehicles passing at that particular time.The considered data sets cover a one-year period, from the first day of January 2006 until the last day of 2006.The data was collected with 5-minutes-intervals.
Figure 2 demonstrates the number of vehicles passing through the year 2006; it clearly shows a fall in the number of vehicles in the first days of month 10 (relatively cold season in Istanbul).
The usage of data for training and testing of the networks has been explained in the following section.

ARTIFICIAL NEURAL NETWORKS MODEL FOR THE PREDICTION OF TRAFFIC VOLUME
The ANN model with back propagation algorithm was used in this study [10].The data set consisting of 130,701 measurements was split into two different data subsets called train data set and test data set, respectively.The main difference between train and test sets is that the train data set is used in training the neural networks and the test data set is the unseen data which is not presented to the network during training.The training data set was consisting of the first 20,000 data and the remaining 110,701 data sets were used to validate the feasibility of the model and to test the performance of the ANNs.The ratio of the selection in number of data was 20,000/110,701 (18.1%) which means pretty good validation if trained and tested successfully since the training data set contains much less data than the testing set.All the ANN models employed had three layers namely input layer, hidden layer and output layer.The data set was modified first to convert date-time information to a time-independent format.Therefore, the information of year and month was omitted and the day information was changed to day of the week.The day of week ranging 1 to 7 is an important attribute since the traffic volume is largely affected during the days.The month is also important feature for especially long-range prediction.However, the month attribute was omitted since the data set contains only one year's information.In case a larger dataset is employed for modeling, the month attribute may be selected in training.The initial network model was consisting of 4 parameters in its input layer namely day of week, hour, minute and last known case for number of vehicles.The last feature namely last known case for number of vehicles is the most recent number of vehicles measured or observed from the RTMS junction.This feature will be named as last case throughout the paper.The time interval for modeling the first network model was selected as 5 minutes.Therefore, the whole data contained 130,701 data points.
The output was selected as the number of vehicles passing through RTMS 12.The neural network was used in this case to predict the number of vehicles for the next five minutes.Therefore, the data set was preprocessed for a second network model with a time interval of 60 minutes.In the second network model, the minute information was excluded from the input parameters.Therefore, the second network model contained 3 input parameters namely day of week, hour, and last known case for number of vehicles.The other difference between two network models is the input parameter last cases which consisted of hourly data in the second network instead of five-minutes-intervals in the initial model.The input parameter last case in the first network involves the measurement of number of vehicles in the last five minutes.The second network contains an aggregated value of last case which sums up last 12 cases recorded.Therefore, predictive value of number of vehicles reflects the next one hour.An operational system to be build upon this predictive model may have different options for the users ranging from 5 minutes to one hour or more.The interval may be chosen depending on the time-distance graph between two junction points.
Both networks produced very good results and the correlation coefficient varied between 0.85 and 0.95 in the test data and more than 0.95 in training set.The other difference is in the output layer of two networks.Although the output layer has one neuron in both networks as the number of vehicles passing through RTMS 12, this number represents the vehicles passing within 5 minutes and one hour for network 1 and network 2, respectively.Figure 3 shows the structures of both neural networks.
ANNs were trained and tested to see the correlation of networks with different structures.A high correlation of 0.97 was achieved as expected when using the same data set (testing for training data) for both training and testing.The networks were trained and tested for performances by using the ANN component in [9] which makes training runs possible in a parallel fashion for a number of configurations.As a result, one hidden layer was decided to be optimum with four processing elements based on trial and error.

ANALYSIS AND RESULTS
The neural networks trained converged to results in less than 200 epochs and less than a minute.The following section describes the procedures for training and testing both of the networks.The first network was trained with the first 20,000 data in training set.The tests were done throughout the remaining test set.Figure 4 shows the results from the testing data for the first neural network in a range of data between 60,000 and 80,000.The correlation coefficient was 0.93.
The network was also tested in a narrower region shown as elliptical area in Figure 4.The test range was 68,945 and 70,129 in this test of the first network.As shown in Figure 5, the results were very good with a correlation coefficient of 0.92.
In the case of second network, data was filtered out to have hourly prediction instead of 5 minutes intervals.The data size was reduced to 2,015 from 130,701 after aggregating minutely data to hourly information.The data set for the second network was divided as training and testing set with the ranges of 1-1,000 and 1,001-2,015, respectively.Figure 6 shows the results for the test set.The correlation coefficient for the range was 0.88.where the input parameter for ANN included the data for the last five minutes   The model developed in this paper uses no direct timely information; therefore, the method may be used for any time period although it is suggested to be used in consequent basis.The performance of the network may be better when used with more data in train set.The data contains only one year's information and monthly information is hence eliminated due to lack of data for other years.We believe that better results may be obtained by adding the feature month to input layer because monthly data is a valuable information in traffic data due to trends of school days, vacations etc.

CONCLUSION
The purpose of this paper was to predict traffic volume using artificial neural networks based on a one-year recorded data.Results showed that the four important features namely day of week, hour, minute and last cases were very effective in predicting the number of traffic volume.The prediction was either 5-minutes-traffic data or one-hour-data based on two different network models.The suggestion was the use of hourly prediction since it is more valuable in the traffic of Istanbul city.The study gave very encouraging results with even limited number of training data.

Figure 2 :
Figure 2: Data set used for RTMS Vehicle Prediction

Figure 4 :
Figure 4: Testing result of the first neural network for data range 60,000 and 80,000where the input parameter for ANN included the data for the last five minutes

Figure 5 :
Figure 5: Testing result of the first neural network for data range 68,945 and 70,129 where the input parameter for ANN included the data for the last five minutes

Figure 6 :
Figure 6: Testing result of the second neural network for data range 1,001 and 2,015 where the input parameter for ANN included the data for the last hour

Figure 7 :
Figure 7: Testing result of the second neural network for data range 1,400 and 1,600 where the input parameter for ANN included the data for the last hour