An Application of Neural Network on Traffic Speed Prediction Under ...

104 downloads 39639 Views 360KB Size Report
An Application of Neural Network on Traffic Speed Prediction Under. Adverse Weather ... network model for approaching the best prediction results. ... prediction information to deploy various traffic management strategies as well. A lot of ...
An Application of Neural Network on Traffic Speed Prediction Under Adverse Weather Condition S. H. Huang and Bin Ran

Abstract

A neural network model for predicting the traffic speed under adverse weather conditions is proposed. One link located in Chicago was chosen and all the data involved was collected from the Internet. The Back Propagation algorithm was used to train the neural network model for approaching the best prediction results. The MATLAB software was used to solve this model. The results has demonstrated that, neural network is an effective tool theory to predict traffic situation if appropriate model architecture and input data are available.

1. Introduction and Objectives

The impact of adverse weather on traffic speed can be severe so as to influence motorists’ driving significantly. On the other hand, traffic speed prediction is an important tool to support Intelligent Transportation System (ITS). With precise traffic speed prediction, travelers can easily obtain the travel time information so as to arrange their schedule by using a traveler information system. Moreover, traffic managers can exploit the prediction information to deploy various traffic management strategies as well.

A lot of factors could affect the traffic speed including Construction, Incident and Weather. Each one of them will reduce the vehicle speed by different level’s severity. The reduction of speed caused by those factors can be termed “impact”.

How to procure the traffic impact or predict the traffic speed under adverse weather conditions is the main objective of this paper. In this paper, a Neural Network based on back- propagation algorithm is proposed for predicting the impact of adverse weather.

TRB 2003 Annual Meeting CD-ROM

1

Paper revised from original submittal.

MATLAB, a powerful Mathematics software, is adopted to apply the model. All the raw data are acquired from the Internet.

2. Literature Review

Keeping traffic moving is the biggest challenge that all levels of government are facing worldwide. Nowadays, Advanced Traveler Information System (ATIS) is becoming more important to allow road users avoiding congestion. Several ATIS systems like The TravTek System and The Navmate System were developed to provide road users the updated information and guide them selecting the shortest or fastest routes (http://www.fhwa.dot.gov/tfhrc/safety/pubs/95197/sec2/body_sec2_02.html).

Traffic situation prediction is always a challenge in transportation field. Several different methods are used to predict the traffic situation and avoid the congestion. Traffic Density Prediction Map (TDPM) is one of the prediction methods, which is an interactive map with a time slider. It indicates the predicted traffic delay at the time indicated by the slider. Traffic density is predicted from several variables such as season and day of week, combined with historic traffic data from road sensors (http://www.halfbakery.com/idea/Traffic_20Density_20Prediction_20Map).

Other research methods have been proposed as well using other theories such as statistics, fuzzy, neural network, etc. Texas A&M University investigated the deterministic properties of traffic flow using a nonlinear time series analysis technique. The study concluded that the traffic data exhibits chaotic properties and techniques based on phase space dynamics can be used to analyze and predict the traffic flow. Helsinki University developed the models to predict the speed and flow 15 minutes ahead of the observation period in five-minute periods (Nair). The purpose of this research was to study the influence of various factors on the results of the short-time prediction of the traffic situation on motorways. Multi-layer perceptron networks were used as prediction modes (Innamaa, 2000).

TRB 2003 Annual Meeting CD-ROM

2

Paper revised from original submittal.

On the other hand, the Road Weather Information System (RWIS) technology has been proven to improve winter travel safety while reducing both the amount of deicing chemical and the cost of maintaining safer roads and runways for the traveling public (http://www.roadweather.com/wbpublic/RWISOverview.htm). Many state DOTs have tried to provide the road weather information for road users to improve the safety and adjust the route (http://www.wsdot.wa.gov/Rweather/) (http://www.dot.state.mn.us/aero/avoffice/avwxlinkx.html).

3. Traffic Speed Prediction Under Adverse Weather

The definition of adverse weather here is the weather condition that will decrease the visibility and worsen the pavement condition. Road users will slow down the vehicle in order to keep safe driving while the visibility is decreased or the pavement condition is bad. Generally, the types of adverse weather could be classified as below: 1. Fog (Reduce Visibility) 2. Rain (Reduce Visibility and Worsen Pavement Condition) 3. Snow (Reduce Visibility and Worsen Pavement Condition) 4. Flooding (Worsen Pavement Condition) 5. Ice (Worsen Pavement Condition)

A

Speed B

Link Capacity Flow Fig. 1. Speed-Flow Diagram.

TRB 2003 Annual Meeting CD-ROM

3

Paper revised from original submittal.

Fig 1. shows a common speed-flow diagram and the solid line is a normal speed-flow relationship. Speed decreases along with the increase of traffic flow till approaching the link capacity. Then, speed keeps decreasing along with the decreasing traffic flow. The dashed line indicates the speed-flow relationship while the link encounters the adverse weather condition. As shown in the figure, the impact of the adverse weather sould be the length of segment AB. In addition, the capacity of the link would be decreased because of the adverse weather.

3.1 Assumption of the Prediction Procedure

In order to predict the speed, there are some presumptions before it kicks off.

1. The weather forecast is assumed exactly correct. Because weather information is one of the parameters in prediction, it has to be valid. Otherwise the prediction will have large errors.

2. Part of the collected data that had been influenced by other factors (like construction, incident, etc.) should be found and separated from this prediction. Those data constitute another set of problems; only weather factor and normal traffic flow are discussed and concerned in this research.

3. Traffic flow in a specific hour of one week is similar to another week’s traffic flow in the same hour. For example, the traffic flow at 7:00~8:00 on Monday is similar to the traffic flow at 7:00~8:00 of last Monday. This assumption is not suited for long-term prediction because it doesn’t make sense the traffic flow is similar to the traffic flow 1 or 2 years ago or later even though one has exactly the same day and the same hour. That is because the city is changing, and the population and the life style keep changing over time. Therefore, this model is only appropriate for short-term prediction. Generally, the prediction time range shouldn’t be over 1 week.

TRB 2003 Annual Meeting CD-ROM

4

Paper revised from original submittal.

3.2 The Scenarios

The prediction models were developed for one link in the Chicago metropolitan area. The weather and traffic flow information about this link have been collected for six months. During this period, the weather conditions happened include snow, rain, fog, etc. The weather data were gathered each hour and speed data were gathered every five minutes. The link speed during each hour is the average speed of all the collected speeds during that hour. The traffic situation in the Chicago Metropolitan area is quite complex. However, since this research is focus on the influence of traffic speed by adverse weather, other situation won’t be discussed in the study.

3.3 Data Collection and Variables

3.3.1 Data Collection

Historic traffic data is fundamental for prediction systems. In this study, all the information could be retrieved from the Internet. The data needed in this model could be roughly categorized into two types, speed and the weather condition at the same time. Both of them could be downloaded from the Internet. Several JAVA programs were developed to connect to the Internet and retrieve information every five minutes for speed data and every one-hour for weather information. The information of weather condition consists of visibility, temperature, moisture, linguistic weather terms, etc.

There are quite a number of sensors were buried under the pavement by DOT (Department of Transportation) in order to count the passed vehicles and obtain the real time traffic speed. Therefore, traffic speed data can be acquired from the official DOT’s website. The weather condition information could be acquired from the National Oceanic and Atmospheric Administration (NOAA) website.

That information obtained from the Internet will be used directly or parsed to be the desired format as input variables.

TRB 2003 Annual Meeting CD-ROM

5

Paper revised from original submittal.

Fig. 2. The Internet resource of Weather Condition

TRB 2003 Annual Meeting CD-ROM

6

Paper revised from original submittal.

Fig. 3. The Internet Resource of Traffic Information Figure 2 and Figure 3 illustrate the Internet resource of weather and traffic information, respectively.(http://weather.noaa.gov/)

3.3.2 Variables

According to Figure. 1., the impacts are due to the interaction of weather and traffic flow. Therefore, all the variables needed in this model could be categorized into two types, weather and traffic flow. Both of them will be discussed below.

TRB 2003 Annual Meeting CD-ROM

7

Paper revised from original submittal.

3.3.2.1 Traffic Flow

According to the speed-flow relationship, traffic flow is definitely one of the important variables in this model. However, it is very difficult to use it directly in the model. That is because each traffic flow might be corresponding to two different traffic speeds. If the model receives only a value of traffic flow, say 500 vph, it is impossible to decide whether it is congested or not. Therefore, the time variable is used to represent traffic flow. Although the number of variables is increased, it is much clearer to descript the traffic.

3.3.2.2 Weather Condition

There are two main parameters to describe how the weather affects the traffic speed, which are visibility and pavement condition.

The value of visibility could be obtained from the Internet directly. Therefore, visibility would definitely be one of the variables in this model. It is not so convenient to define pavement condition. That is because there is no well-established index to describe how the pavement condition is affected by the weather. Therefore, other variables are used to represent the pavement condition. Here, temperature and moisture are recruited. The possible pavement conditions caused by adverse weather would be flooding, ice and snow on the pavement. The moisture should be high when it is flooding and the temperature should be below 32°F when snow or ice covers the pavement.

That would be perplexing when the fog comes or a pretty cold day (below 32°F) arrives without snow on the pavement. The temperature and moisture might be the same as it rains or snows. The solution is to add one more indicating variable in the model. For example, if it was raining, we then add one variable “rain” and assign the value “1” on it. In this case, the model will recognize that it is rain and there is water on the pavement.

TRB 2003 Annual Meeting CD-ROM

8

Paper revised from original submittal.

To sum up, according to the information obtained from the Internet and discussed above, we have identified several dozens of input parameters and they are illustrated as follows.

Input 1. Visibility (miles) Input 2. Temperature (ºF) Input 3. Moisture (%) Input 4 ~ 13. Weather Conditions (including Rain, Light Rain, Snow, Light Snow, Fog, Mist and so on. Each of them will have the value 1 if the situation happened, otherwise, the value will be assigned as 0 as defalt.) Input 14~44. Time variables. They are tow sequences of time variables, which are Date part and Time part. The Date part is a sequence as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday and the Time part is as 0, 1, 2, 3, ……., 23. Another four variable is included for indicating the order of the quarter hour such as first 15 minutes or second 15 minutes. These four variables and other time variables are having value either 0 or 1 as well to indicate the data time and imply the traffic flow. Input 45. Real time speed (MPH). This information was obtained directly from the Internet and will be use to adjust the weight of all link in the network.

4. Methodologies

4.1 Neural Network Model

In this study, multi-layer perceptron (MLP) networks were used as prediction models because of their good results in previous studies (Smith and Demetsky, 1994, 1997 and S Lee, 1998). Neural Network is a powerful model in solving complex problems. Since the neural network has natural potential of solving nonlinear problem and can easily achieve the input-output mapping, it is perfect to use it for solving the predicting problem (Haykin, 1999).

Figure 4 is the architectural graph of a multilayer perceptron. The layer consists of several nodes in the most left side called input layer. Each node in the input layer

TRB 2003 Annual Meeting CD-ROM

9

Paper revised from original submittal.

receives one input signal. Those signals flow from left to right layer by layer. The layer in the right hand side with only one neuron is called output layer. The number of input neurons was equal to the number of input parameters and the number of neurons in the output layer was equal to the number of output parameters.

There are two different kinds of signals identified in this network:

1. Function Signals. A function signal is an input signal that comes in at the input end of the network, propagates forward (neuron by neuron) through the network, and emerges at the output end of the network as an output signal. The function signal is also referred to as the input signal.

2. Error Signals. An error signal originates at an output neuron of the network, and propagates backward (layer by layer) through the network. We refer to it as an “error signal” because its computation by every neuron of the network involves an error-dependent function in one form or another.

These two signal flows of all data go forward and backward once called one epoch. In every epoch, the model will adjust the neuron’s weight based on minimizing the error flow. After a lot of iterations, the error equation will become converged. That means it is reaching the minima of the error surface. In this sense, the output is closest to the expected response. In this model, that means the predicted speed is closer to the real world speed as much as possible.

TRB 2003 Annual Meeting CD-ROM

10

Paper revised from original submittal.

Input signal Visibility Temperatur Moisture

Weather Condition Variables: Rain, Snow, etc.

Time Variables: Monday, 2:00~3:00, etc.

. . .

. . . Input Layer

Output Layer . . . . .

. . . . .

Output Signal

Last First Hidden………… Hidden Layer Layer .

Fig. 4. A comprehensive multilayer perceptron architecture

TRB 2003 Annual Meeting CD-ROM

11

Paper revised from original submittal.

4.2 Back-Propagation Algorithm

Back-Propagation is one of the most powerful algorithms to train the multiplayer perceptron and obtain the weight of each link. Basically, error back-propagation learning consists of two passes through different layers of the network: a forward pass and a backward pass. In the forward pass, an activity pattern (input vector) is applied to the sensory nodes of the network, and its effect propagates through the network layer by layer. Finally, a set of outputs is produced as the actual response of the network. During the forward pass, the synaptic weights of the networks are all fixed. During the backward pass, on the other hand, the synaptic weights are all adjusted in accordance with an errorcorrection rule. Specifically, the actual response of the network is subtracted from a desired (target) response to produce an error signal. This error signal is then propagated backward through the network, against the direction of synaptic connections-hence the name “error back-propagation.” The synaptic weights are adjusted to make the actual response of the network move closer to the desired response in a statistical sense (Li).

ε (n ) =

1 (d (n ) − y(n ))T (d (n ) − y(n )) 2

N

ε T = ∑ ε 2 (n ) n =1

(1) (2)

4.3 Training Criteria And Model Settings

In order to obtain the training results quickly and appropriately, there are some training criteria and model settings to be established. They are discussed as follows: 1. Learning rate (η). The larger the learning rate η, the larger the weight changes in each epoch, and the quicker the network learns. However, the size of the learning rate can also influence whether the network achieves a stable solution. If we make the learning-rate parameter η too large in order to speed up the rate of learning, the resulting large changes in the synaptic weights assume such a form that the network may become unstable (i.e., oscillatory). In this model, learning rate (η)

TRB 2003 Annual Meeting CD-ROM

12

Paper revised from original submittal.

has been set as 0.1 (http://www2.psy.uq.edu.au/~brainwav/Manual/BackProp.html#LearningRateMo mentum).

2. Momentum (α). A simple method of increasing the rate of learning yet avoiding the danger of instability has been proposed as a slight modification of the back propagation algorithm so that it includes a momentum term. Applied to back propagation, the concept of momentum is that previous changes in the weights should influence the current direction of movement in weight space. This concept is implemented by the revised weight-update rule: ∆w ji (n ) = α∆w ji (n − 1) + ηδ j (n ) y i (n )

where α is usually a positive number called the momentum constant and δ j is the local gradient for neuron j. Plus, w ji (n ) is the weight between neuron j and i at iteration n. In this model, α is set as 0.8.

3. Activation Function (ϕ(.)). The computation of the local gradient for each neuron of the multiplayer perceptron requires knowledge of the derivative of the activation function ϕ(.). For this derivative to exist, we require the function ϕ(.) to be continuous. In basic terms, differentiability is the only requirement that an activation function has to satisfy. In this model, Logistic Function has been chosen to be the activation function for each neuron. It follows that

ϕ j (v j (n )) =

1 1 + exp(− av j (n ))

a > 0 and − ∞ < v j (n ) < ∞ , where v j (n ) is the

induced local field of neuron j.

4. Epochs: In this study, epoch was set as 1000 for each training.

5. It is useful to preprocess the data before introducing it to the network. In this model, the data were scaled to vary between [-1,1].

TRB 2003 Annual Meeting CD-ROM

13

Paper revised from original submittal.

6. Training will be stopped if the mean squared error is less than 10e-5.

7. The order of input data had been randomized before introducing it to the network.

4.4 Analysis of Time Period

Before we determine the final input feature and model structure, the time period should be analyzed. In transportation, usually, the predicting time period is better to be shorter. That means if we can predict the traffic situation every minute is ideal. However, it is hardly to predict the traffic situation in such a short time period because the traffic condition is changing rapidly. Hence, the time period need to be increased in length to retain the stability. On the other hand, it is meaningless to predict the traffic situation in a long time period like tow hours even though the prediction is very precise. That is because this predicting result is not practicable in traffic management and other related fields. Therefore, to figure out the balance between stability and practicability become an important issue before we finalize the whole model.

According to the assumptions mentioned above, it is believed that this model is not able to predict the traffic speed in five-minute basis. That is because there is no guarantee the traffic flow is remaining similar to the same time period before or later. According the result of experiments, ten-minute period model was not able to produce reasonable and acceptable output. Ultimately, the fifteen-minute model illustrated acceptable performance and was selected to be the main model type.

4.5 Time-Series Model:

The time series model is employed to reproduce the other traffic speed prediction model. The model was developed to predict the observed speed by using fifteen minutes ahead of the observation period in five-minute periods. That means there are three input factors that are the speed five minutes, ten minutes and fifteen minutes prior to the predicting period. The establishment of this time-series model is similar to the model established

TRB 2003 Annual Meeting CD-ROM

14

Paper revised from original submittal.

previously, using neuron network along with back propagation algorithm. All the data preprocessing procedures are remaining the same as previous model. Since the previous model is a fifteen-minute basis model and this time-series model is a five-minute basis model, fifteen-minute average speed should be attained by the time-series model in order to be corresponding to the fifteen-minute model. The number of the neuron in the input layer is the same with the input feature and the number of neuron in the output layer is the same with the output feature.

This time-series model has been demonstrated as a short-term traffic situation prediction with precise output result. The purpose of establishing this time-series model here is to inspect the output of previous model. If previous model can produce even or better performance than the time-series model, then the output result is acceptable. However, the time-serious model is limited on short-term prediction unlike the NN model that can predict both short-term and long-term. Therefore, we can take more advantages from the NN predicting model. Denote the data at instant k as y(k), where y may be a vector, then the above treatment can be described as y k +1 = NN ( y k ) or y k +1 = NN ( y k , y k −1 ,

K, y

k −i

)

respectively, where NN()

stands for the neural network forecaster and i is the number of successive observations. This treatment considers the time series as a nonlinear time series and tends to generate a nonlinear "auto-regression" model to fit the series. Figure 5 illustrated the comprehensive time series model architecture. (Hu, 2001) y (t ) ^

MLP

y (t )

e(t)

U(t)

U(t-1)

U(t-m)

Fig 5. A Comprehensive Time Series Multilayer Perceptron Architecture

TRB 2003 Annual Meeting CD-ROM

15

Paper revised from original submittal.

5. Case Study Output

In total, 4214 eligible data were collected for this link and they are divided into 4189 training data points and 25 testing data points, respectively. After 1000 epochs, MATLAB will show the error between real speed and predicted speed.

Figure 6 shows the relationship between the real speed and the estimated speed. Each point means the average speed of one specific hour. The difference between real speed and predicted speed ( S r − S p = e ) is the error, where S r is the real speed and S p is the predicted speed. In this set of data, the mean of the error is 4.5843 and standard deviation is 2.9656. The results generated by the time-series model were also shown on the graph. The error mean is equal to 4.7497 and the error standard deviation is equal to 4.4619. Both models are giving the close performance. That means the output result from the model is reasonable and acceptable.

TRB 2003 Annual Meeting CD-ROM

16

Paper revised from original submittal.

Fig 6. The output chart of real speed and estimated speed

TRB 2003 Annual Meeting CD-ROM

17

Paper revised from original submittal.

Fig.7 The mean square error v.s. epoch

Figure 7 shows the mean square error versus epoch. The upper line indicates the mean square error and the lower line indicates the goal which is 1e-005. It shows obviously the error converged very early and the mean square error was 0.0181711. That means backpropagation algorithm is capable to reach the minimum of error surface effectively.

The results generated by the time-series model were also shown on the graph. The error mean is equal to 4.7497 and the error standard deviation is equal to 4.4619. Both models are giving the close performance. That means the output result from the NN model is reasonable and acceptable.

6. Conclusions and Future Research

This output demonstrated that Neural Network Model could help on predicting traffic speed in a little bit longer term than the Time Series Model with precise output. Having the predicting traffic speed data, road users can easily adjust their route and plan their trip

TRB 2003 Annual Meeting CD-ROM

18

Paper revised from original submittal.

and traffic managers can deploy and adapt their operations based on the prediction traffic situation.

This study shows that if we choose four hidden layers, we will obtain the closest results (mean error is the smallest). That may be because there were too many input features so that more hidden layers could train the network better.

Few predicting points on Figure 5 are not really close to the expected output. That is because of insufficient historic data. Since this model deals with an input-output mapping problem, sufficient historic traffic data are fundamental for prediction systems. That means if we want to obtain more precise predicted traffic speed, historic data should be collected as much as possible.

It is promising to obtain much better output if there is more complete information for pavement condition or other weather situations.

This predicting procedure is not only suitable for predicting the traffic speed under adverse weather but also suitable for predicting the traffic speed while other conditions are involved, including construction and incident. It is reasonable to substitute the variables of rain or snow for construction time; number of lanes closed and closed lanes’ distance. Once all the influential variables are decided, the same procedure will be taken to obtain the predicted speeds.

It is possible to predict the traffic speed of a route or a network by expanding this model. No matter how big the network is or how long the route is, they are all made of links. If all the links’ historic information is available, then the traffic speed is predictable.

7. Reference

[1] Smith B. and Demetsky M. (1994). Short-Term Traffic Flow prediction: Neural Network Approach. Transportation Research Record 1453. Pp. 98 –104.

TRB 2003 Annual Meeting CD-ROM

19

Paper revised from original submittal.

[2] Demetsky M. and Smith B. (1997). Traffic Flow Forecasting: Comparison of Modeling Approaches. Journal of Transportation Engineering. Vol. 123, No. 4, July / August 1997. Pp. 261 – 266.

[3] Haykin S. (1999). Neural Networks, A Comprehensive Foundation. International Edition, Second Edition. Prentice Hall International, Inc, USA. 842 s.

[4] Innamaa S. (2000). SHORT-TERM PREDICTION OF TRAFFIC SITUATION USING MLP-NEURAL NETWORKS (http://www.vtt.fi/rte/projects/tetra/ITS2000.pdf))

[5] Lee S., Kim D., Kim J. and Cho B. (1998). Comparison of Models for predicting Shout-Term Travel Speeds. Conference CD-ROM, 5th World Congress on Intelligent Transport Systems, 12 – 16 October 1998, Seoul, Korea. 9 p. (http://www.iro.umontreal.ca/~chapados/IJCNN2001/Proceedings/pdffiles/papers/078.pd f)

[6] Li S. H., Comparative Analysis of Backpropagation and Extended Kalman Filter in Pattern and Batch Forms for Training Neural Networks. (http://www.iro.umontreal.ca/~chapados/IJCNN2001/Proceedings/pdffiles/papers/078.pd f)

[7] Nair A. S., Liu J.C., Rilett L. and Gupta S., Non-Linear Analysis of Traffic Flow, http://translink.tamu.edu/docs/Research/LinearAnalysisTrafficFlow/chaos1.pdf

[8] http://www.dot.state.mn.us/aero/avoffice/avwxlinkx.html

[9] http://www.fhwa.dot.gov/tfhrc/safety/pubs/95197/sec2/body_sec2_02.html

[10] http://www.halfbakery.com/idea/Traffic_20Density_20Prediction_20Map

TRB 2003 Annual Meeting CD-ROM

20

Paper revised from original submittal.

[11] http://www.roadweather.com/wbpublic/RWISOverview.htm

[12] http://www.wsdot.wa.gov/Rweather/

[13] http://www2.psy.uq.edu.au/~brainwav/Manual/BackProp.html#LearningRateMomentum

TRB 2003 Annual Meeting CD-ROM

21

Paper revised from original submittal.